mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix the switch show more/less
This commit is contained in:
parent
e1f0483b23
commit
2dae21259e
|
|
@ -271,10 +271,23 @@ class DolEditor
|
|||
$out.= ' var aceEditor = window.ace.edit("'.$this->htmlname.'aceeditorid");
|
||||
var StatusBar = window.ace.require("ace/ext/statusbar").StatusBar; // Init status bar. Need lib ext-statusbar
|
||||
var statusBar = new StatusBar(aceEditor, document.getElementById("statusBar'.$this->htmlname.'")); // Init status bar. Need lib ext-statusbar
|
||||
jQuery(".morelines'.$this->htmlname.'").click(function() {
|
||||
console.log("We click on more lines");
|
||||
var oldNbOfLines = 0
|
||||
jQuery(".morelines'.$this->htmlname.'").click(function() {
|
||||
var aceEditor = window.ace.edit("'.$this->htmlname.'aceeditorid");
|
||||
aceEditor.setOptions({ maxLines: 500 });
|
||||
currentline = aceEditor.getOption("maxLines");
|
||||
if (oldNbOfLines == 0)
|
||||
{
|
||||
oldNbOfLines = currentline;
|
||||
}
|
||||
console.log("We click on more lines - we have currently "+oldNbOfLines);
|
||||
if (currentline < 500)
|
||||
{
|
||||
aceEditor.setOptions({ maxLines: 500 });
|
||||
}
|
||||
else
|
||||
{
|
||||
aceEditor.setOptions({ maxLines: oldNbOfLines });
|
||||
}
|
||||
});
|
||||
})';
|
||||
$out.= '</script>'."\n";
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ function getURLContent($url,$postorget='GET',$param='',$followlocation=1,$addhea
|
|||
|
||||
dol_syslog("getURLContent request=".$request);
|
||||
//dol_syslog("getURLContent response =".response); // This may contains binary data, so we dont output it
|
||||
dol_syslog("getURLContent response size =".strlen($response)); // This may contains binary data, so we dont output it
|
||||
dol_syslog("getURLContent response size=".strlen($response)); // This may contains binary data, so we dont output it
|
||||
|
||||
$rep=array();
|
||||
if (curl_errno($ch))
|
||||
|
|
|
|||
|
|
@ -774,7 +774,7 @@ SetBankAccount=Define Bank Account
|
|||
AccountCurrency=Account currency
|
||||
ViewPrivateNote=View notes
|
||||
XMoreLines=%s line(s) hidden
|
||||
ShowMoreLines=Show more lines
|
||||
ShowMoreLines=Show more/less lines
|
||||
PublicUrl=Public URL
|
||||
AddBox=Add box
|
||||
SelectElementAndClick=Select an element and click %s
|
||||
|
|
|
|||
|
|
@ -1901,7 +1901,7 @@ if ($action == 'editmeta' || $action == 'create')
|
|||
print $formadmin->select_language($pagelang?$pagelang:$langs->defaultlang, 'WEBSITE_LANG', 0, null, '1');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>';
|
||||
print '<tr><td class="tdhtmlheader tdtop">';
|
||||
print $langs->trans('HtmlHeaderPage');
|
||||
print '</td><td>';
|
||||
$doleditor=new DolEditor('htmlheader', $pagehtmlheader, '', '220', 'ace', 'In', true, false, 'ace', 0, '100%', '');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user