Work on website

This commit is contained in:
Laurent Destailleur 2017-11-15 19:47:07 +01:00
parent e760568a78
commit 5c3d8acfbb
4 changed files with 56 additions and 29 deletions

View File

@ -21,6 +21,7 @@ AddWebsite=Add website
Webpage=Web page/container Webpage=Web page/container
AddPage=Add page/container AddPage=Add page/container
HomePage=Home Page HomePage=Home Page
PageContainer=Page/container
PreviewOfSiteNotYetAvailable=Preview of your website <strong>%s</strong> not yet available. You must first add a page. PreviewOfSiteNotYetAvailable=Preview of your website <strong>%s</strong> not yet available. You must first add a page.
RequestedPageHasNoContentYet=Requested page with id %s has no content yet, or cache file .tpl.php was removed. Edit content of the page to solve this. RequestedPageHasNoContentYet=Requested page with id %s has no content yet, or cache file .tpl.php was removed. Edit content of the page to solve this.
PageContent=Page/Contenair PageContent=Page/Contenair

View File

@ -3445,11 +3445,19 @@ tr.visible {
/* Module website */ /* Module website */
/* ============================================================================== */ /* ============================================================================== */
.nobordertransp {
border: 0px;
background-color: transparent;
background-image: none;
}
.websitebar { .websitebar {
border-bottom: 1px solid #888; border-bottom: 1px solid #ccc;
background: #eee; background: #eee;
display: inline-block; display: inline-block;
} }
.websitebar .buttonDelete, .websitebar .button {
text-shadow: none;
}
.websitebar .button, .websitebar .buttonDelete .websitebar .button, .websitebar .buttonDelete
{ {
padding: 2px 5px 3px 5px !important; padding: 2px 5px 3px 5px !important;
@ -3460,13 +3468,12 @@ tr.visible {
display: inline-block; display: inline-block;
padding-left: 10px; padding-left: 10px;
vertical-align: middle; vertical-align: middle;
/* line-height: 29px; */
} }
.websitetools { .websitetools {
float: right; float: right;
/* height: 28px; */
} }
.websiteselection, .websitetools { .websiteselection, .websitetools {
margin-top: 3px;
padding-top: 3px; padding-top: 3px;
padding-bottom: 3px; padding-bottom: 3px;
} }
@ -3816,12 +3823,13 @@ a.cke_dialog_ui_button_ok span {
.aceeditorstatusbar { .aceeditorstatusbar {
margin: 0; margin: 0;
padding: 0; padding: 0;
padding-<?php echo $left; ?>: 10px;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
height: 20px;
background-color: #ebebeb; background-color: #ebebeb;
color: #666; height: 28px;
line-height: 2.2em;
} }
.ace_status-indicator { .ace_status-indicator {
color: gray; color: gray;

View File

@ -3535,8 +3535,13 @@ tr.visible {
/* Module website */ /* Module website */
/* ============================================================================== */ /* ============================================================================== */
.nobordertransp {
border: 0px;
background-color: transparent;
background-image: none;
}
.websitebar { .websitebar {
border-bottom: 1px solid #888; border-bottom: 1px solid #ccc;
background: #eee; background: #eee;
} }
.websitebar .button, .websitebar .buttonDelete .websitebar .button, .websitebar .buttonDelete
@ -3549,12 +3554,16 @@ tr.visible {
display: inline-block; display: inline-block;
padding-left: 10px; padding-left: 10px;
vertical-align: middle; vertical-align: middle;
line-height: 29px;
} }
.websitetools { .websitetools {
float: right; float: right;
height: 28px;
} }
.websiteselection, .websitetools {
margin-top: 3px;
padding-top: 3px;
padding-bottom: 3px;
}
.websiteinputurl { .websiteinputurl {
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
@ -3912,11 +3921,13 @@ a.cke_dialog_ui_button_ok span {
.aceeditorstatusbar { .aceeditorstatusbar {
margin: 0; margin: 0;
padding: 0; padding: 0;
padding-<?php echo $left; ?>: 10px;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
height: 20px;
color: #666; color: #666;
height: 28px;
line-height: 2.2em;
} }
.ace_status-indicator { .ace_status-indicator {
color: gray; color: gray;

View File

@ -1117,7 +1117,8 @@ $moreheadjs.='</script>'."\n";
llxHeader($moreheadcss.$moreheadjs, $langs->trans("websiteetup"), $help_url, '', 0, 0, $arrayofjs, $arrayofcss, '', '', '<!-- Begin div class="fiche" -->'."\n".'<div class="fichebutwithotherclass">'); llxHeader($moreheadcss.$moreheadjs, $langs->trans("websiteetup"), $help_url, '', 0, 0, $arrayofjs, $arrayofcss, '', '', '<!-- Begin div class="fiche" -->'."\n".'<div class="fichebutwithotherclass">');
print "\n".'<form action="'.$_SERVER["PHP_SELF"].'" method="POST"><div>'; print "\n".'<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
if ($action == 'createsite') if ($action == 'createsite')
{ {
@ -1156,6 +1157,7 @@ if ($action == 'edit')
print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="action" value="update">';
} }
print '<div>';
// Add a margin under toolbar ? // Add a margin under toolbar ?
$style=''; $style='';
@ -1170,12 +1172,12 @@ if (count($object->records) > 0)
{ {
// ***** Part for web sites // ***** Part for web sites
print '<div class="websiteselection hideonsmartphoneimp minwwidth100">'; print '<div class="websiteselection hideonsmartphoneimp minwidth100 tdoverflowmax100">';
print '<input type="submit"'.$disabled.' class="button" value="'.dol_escape_htmltag($langs->trans("AddWebsite")).'" name="createsite">'; print $langs->trans("Website").' : ';
print '</div>'; print '</div>';
print '<div class="websiteselection hideonsmartphoneimp">'; print '<div class="websiteselection hideonsmartphoneimp">';
print $langs->trans("WebSite").': '; print ' <input type="submit"'.$disabled.' class="button" value="'.dol_escape_htmltag($langs->trans("Add")).'" name="createsite">';
print '</div>'; print '</div>';
// List of website // List of website
@ -1199,7 +1201,9 @@ if (count($object->records) > 0)
$out.='</select>'; $out.='</select>';
$out.=ajax_combobox('website'); $out.=ajax_combobox('website');
print $out; print $out;
print '<input type="submit" class="button" name="refreshsite" value="'.$langs->trans("Load").'">'; //print '<input type="submit" class="button" name="refreshsite" value="'.$langs->trans("Load").'">';
print '<input type="image" class="valignbottom" src="'.img_picto('', 'refresh', '', 0, 1).'" name="refreshpage" value="'.$langs->trans("Load").'">';
if ($website) if ($website)
{ {
@ -1215,14 +1219,14 @@ if (count($object->records) > 0)
print ' &nbsp; '; print ' &nbsp; ';
print '<input type="submit" class="button"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditCss")).'" name="editcss">'; print '<input type="submit" class="button nobordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditCss")).'" name="editcss">';
//print '<input type="submit" class="button"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditMenu")).'" name="editmenu">'; //print '<input type="submit" class="button"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditMenu")).'" name="editmenu">';
print '<input type="submit" class="button"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("CloneSite")).'" name="createfromclone">'; print '<input type="submit" class="button nobordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("CloneSite")).'" name="createfromclone">';
print '<input type="submit" class="button"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("ExportSite")).'" name="exportsite">'; print '<input type="submit" class="button nobordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("ExportSite")).'" name="exportsite">';
print ' &nbsp; '; print ' &nbsp; ';
print '<input type="submit" class="button"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("MediaFiles")).'" name="file_manager">'; print '<input type="submit" class="button nobordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("MediaFiles")).'" name="file_manager">';
/*print '<a class="button button_file_manager"'.$disabled.'>'.dol_escape_htmltag($langs->trans("MediaFiles")).'</a>'; /*print '<a class="button button_file_manager"'.$disabled.'>'.dol_escape_htmltag($langs->trans("MediaFiles")).'</a>';
print '<script language="javascript"> print '<script language="javascript">
jQuery(document).ready(function () { jQuery(document).ready(function () {
@ -1289,13 +1293,14 @@ if (count($object->records) > 0)
print '<div class="centpercent websitebar"'.($style?' style="'.$style.'"':'').'">'; print '<div class="centpercent websitebar"'.($style?' style="'.$style.'"':'').'">';
print '<div class="websiteselection hideonsmartphoneimp minwidth100">'; print '<div class="websiteselection hideonsmartphoneimp minwidth100 tdoverflowmax100">';
print '<input type="submit"'.$disabled.' class="button" value="'.dol_escape_htmltag($langs->trans("AddPage")).'" name="create">'; print $langs->trans("PageContainer").': ';
print '</div>'; print '</div>';
print '<div class="websiteselection hideonsmartphoneimp">'; print '<div class="websiteselection hideonsmartphoneimp">';
print $langs->trans("Page").': '; print '<input type="submit"'.$disabled.' class="button" value="'.dol_escape_htmltag($langs->trans("Add")).'" name="create">';
print '</div>'; print '</div>';
print '<div class="websiteselection">'; print '<div class="websiteselection">';
if ($action != 'add') if ($action != 'add')
@ -1335,7 +1340,8 @@ if (count($object->records) > 0)
print $langs->trans("New"); print $langs->trans("New");
} }
print '<input type="submit" class="button" name="refreshpage" value="'.$langs->trans("Load").'"'.($atleastonepage?'':' disabled="disabled"').'>'; //print '<input type="submit" class="button" name="refreshpage" value="'.$langs->trans("Load").'"'.($atleastonepage?'':' disabled="disabled"').'>';
print '<input type="image" class="valignbottom" src="'.img_picto('', 'refresh', '', 0, 1).'" name="refreshpage" value="'.$langs->trans("Load").'"'.($atleastonepage?'':' disabled="disabled"').'>';
if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone') if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone')
{ {
@ -1376,12 +1382,12 @@ if (count($object->records) > 0)
print ' &nbsp; '; print ' &nbsp; ';
print '<input type="submit" class="button"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditPageMeta")).'" name="editmeta">'; print '<input type="submit" class="button nobordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditPageMeta")).'" name="editmeta">';
print '<input type="submit" class="button"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditWithEditor")).'" name="editcontent">'; print '<input type="submit" class="button nobordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditWithEditor")).'" name="editcontent">';
print '<input type="submit" class="button"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditHTMLSource")).'" name="editsource">'; print '<input type="submit" class="button nobordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("EditHTMLSource")).'" name="editsource">';
if ($object->fk_default_home > 0 && $pageid == $object->fk_default_home) print '<input type="submit" class="button" disabled="disabled" value="'.dol_escape_htmltag($langs->trans("SetAsHomePage")).'" name="setashome">'; if ($object->fk_default_home > 0 && $pageid == $object->fk_default_home) print '<input type="submit" class="button nobordertransp" disabled="disabled" value="'.dol_escape_htmltag($langs->trans("SetAsHomePage")).'" name="setashome">';
else print '<input type="submit" class="button"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("SetAsHomePage")).'" name="setashome">'; else print '<input type="submit" class="button nobordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("SetAsHomePage")).'" name="setashome">';
print '<input type="submit" class="button"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("ClonePage")).'" name="createpagefromclone">'; print '<input type="submit" class="button nobordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("ClonePage")).'" name="createpagefromclone">';
print '<input type="submit" class="buttonDelete" name="delete" value="'.$langs->trans("Delete").'"'.($atleastonepage?'':' disabled="disabled"').'>'; print '<input type="submit" class="buttonDelete" name="delete" value="'.$langs->trans("Delete").'"'.($atleastonepage?'':' disabled="disabled"').'>';
} }
} }
@ -1429,7 +1435,7 @@ if (count($object->records) > 0)
print '<div class="websitehelp">'; print '<div class="websitehelp">';
if (GETPOST('editsource', 'alpha') || GETPOST('editcontent', 'alpha')) if (GETPOST('editsource', 'alpha') || GETPOST('editcontent', 'alpha'))
{ {
$htmltext=$langs->transnoentitiesnoconv("YouCanEditHtmlSource"); $htmltext=$langs->transnoentitiesnoconv("YouCanEditHtmlSource").'<br>';
print $form->textwithpicto($langs->trans("SyntaxHelp"), $htmltext, 1, 'help', 'inline-block', 1, 2, 'tooltipsubstitution'); print $form->textwithpicto($langs->trans("SyntaxHelp"), $htmltext, 1, 'help', 'inline-block', 1, 2, 'tooltipsubstitution');
} }
print '</div>'; // end websitehelp print '</div>'; // end websitehelp
@ -1885,6 +1891,7 @@ if ($action == 'preview' || $action == 'createfromclone' || $action == 'createpa
$out = '<!-- Page content '.$filetpl.' : Div with (CSS Of website from file + Style/htmlheader of page from database + Page content from database) -->'."\n"; $out = '<!-- Page content '.$filetpl.' : Div with (CSS Of website from file + Style/htmlheader of page from database + Page content from database) -->'."\n";
$out.='<div id="websitecontentundertopmenu" class="websitecontentundertopmenu">'."\n"; $out.='<div id="websitecontentundertopmenu" class="websitecontentundertopmenu">'."\n";
// TODO Use contenteditable="true" / document.getElementById("myP").contentEditable="true" for part coming from CKEditor
// REPLACEMENT OF LINKS When page called by website editor // REPLACEMENT OF LINKS When page called by website editor