Fix for nojs interface

This commit is contained in:
Laurent Destailleur 2020-02-26 16:17:31 +01:00
parent aba29207a3
commit 9c1c0ee08f

View File

@ -127,15 +127,17 @@ class box_task extends ModeleBoxes
$boxcontent .= '<button type="submit" class="button">'.$langs->trans("Refresh").'</button>';
$boxcontent .= '</form>'."\n";
$boxcontent .= '</div>'."\n";
$boxcontent .= '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery("#idsubimg'.$this->boxcode.'").click(function() {
jQuery(".showiffilter'.$this->boxcode.'").toggle();
if (! empty($conf->use_javascript_ajax)) {
$boxcontent .= '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery("#idsubimg'.$this->boxcode.'").click(function() {
jQuery(".showiffilter'.$this->boxcode.'").toggle();
});
});
});
</script>';
// set cookie by js
$boxcontent .= '<script>date = new Date(); date.setTime(date.getTime()+(30*86400000)); document.cookie = "'.$cookie_name.'='.$filterValue.'; expires= " + date.toGMTString() + "; path=/ "; </script>';
</script>';
// set cookie by js
$boxcontent .= '<script>date = new Date(); date.setTime(date.getTime()+(30*86400000)); document.cookie = "'.$cookie_name.'='.$filterValue.'; expires= " + date.toGMTString() + "; path=/ "; </script>';
}
$this->info_box_contents[0][] = array(
'tr'=>'class="nohover showiffilter'.$this->boxcode.' hideobject"',
'td' => 'class="nohover"',