Fix javascript error

This commit is contained in:
Laurent Destailleur 2017-12-10 19:54:04 +01:00
parent d701a7617b
commit 748aee9a54
3 changed files with 8 additions and 8 deletions

View File

@ -273,20 +273,20 @@ class DolEditor
var statusBar = new StatusBar(aceEditor, document.getElementById("statusBar'.$this->htmlname.'")); // Init status bar. Need lib ext-statusbar
var oldNbOfLines = 0
jQuery(".morelines'.$this->htmlname.'").click(function() {
var aceEditor = window.ace.edit("'.$this->htmlname.'aceeditorid");
currentline = aceEditor.getOption("maxLines");
var aceEditorClicked = window.ace.edit("'.$this->htmlname.'aceeditorid");
currentline = aceEditorClicked.getOption("maxLines");
if (oldNbOfLines == 0)
{
oldNbOfLines = currentline;
}
console.log("We click on more lines - we have currently "+oldNbOfLines);
console.log("We click on more lines, oldNbOfLines is "+oldNbOfLines+", we have currently "+currentline);
if (currentline < 500)
{
aceEditor.setOptions({ maxLines: 500 });
aceEditorClicked.setOptions({ maxLines: 500 });
}
else
{
aceEditor.setOptions({ maxLines: oldNbOfLines });
aceEditorClicked.setOptions({ maxLines: oldNbOfLines });
}
});
})';

View File

@ -5,11 +5,11 @@ DeleteWebsite=Delete website
ConfirmDeleteWebsite=Are you sure you want to delete this web site. All its pages and content will also be removed.
WEBSITE_TYPE_CONTAINER=Type of page/container
WEBSITE_PAGENAME=Page name/alias
WEBSITE_HTML_HEADER=HTML Header (common to all pages)
HtmlHeaderPage=HTML specific header for page
WEBSITE_CSS_URL=URL of external CSS file
WEBSITE_CSS_INLINE=CSS file content (common to all pages)
WEBSITE_JS_INLINE=Javascript file content (common to all pages)
WEBSITE_HTML_HEADER=Addition at bottom of HTML Header (common to all pages)
WEBSITE_ROBOT=Robot file (robots.txt)
WEBSITE_HTACCESS=Web site .htaccess file
PageNameAliasHelp=Name or alias of the page.<br>This alias is also used to forge a SEO URL when website is ran from a Virtual host of a Web server (like Apacke, Nginx, ...). Use the button "<strong>%s</strong>" to edit this alias.

View File

@ -1695,7 +1695,7 @@ if ($action == 'editcss')
print '</td><td>';
$doleditor=new DolEditor('WEBSITE_ROBOT', $robotcontent, '', '220', 'ace', 'In', true, false, 'ace', 0, '100%', '');
print $doleditor->Create(1, '', true, 'Robot file', 'txt');
print $doleditor->Create(1, '', true, 'Robot file', 'text');
print '</td></tr>';
@ -1705,7 +1705,7 @@ if ($action == 'editcss')
print '</td><td>';
$doleditor=new DolEditor('WEBSITE_HTACCESS', $htaccesscontent, '', '220', 'ace', 'In', true, false, 'ace', 0, '100%', '');
print $doleditor->Create(1, '', true, $langs->trans("File").' .htaccess', 'txt');
print $doleditor->Create(1, '', true, $langs->trans("File").' .htaccess', 'text');
print '</td></tr>';