function add_jsordering()
 {
     switch (get_config('block_configurable_reports', 'reporttableui')) {
         case 'datatables':
             cr_add_jsdatatables('#reporttable');
             break;
         case 'jquery':
             cr_add_jsordering('#reporttable');
             echo html_writer::tag('style', '#page-blocks-configurable_reports-viewreport .generaltable {
                 overflow: auto;
                 width: 100%;
                 display: block;}');
             break;
         case 'html':
             echo html_writer::tag('style', '#page-blocks-configurable_reports-viewreport .generaltable {
                 overflow: auto;
                 width: 100%;
                 display: block;}');
             break;
         default:
             break;
     }
 }
Example #2
0
 function add_jsordering($reportclass, $libraries = false, $blockinstanceid = null) {
     $components = cr_unserialize($reportclass->config->components);
     switch (get_config('block_cobalt_reports', 'reporttableui')) {
         case 'datatables':
             $html = '';
             if ($libraries == false)
                 $html .=cr_add_datatblejs();
             if ($blockinstanceid == null)
                 $blockinstanceid = $reportclass->config->id;
             $html .= cr_add_jsdatatables('#reporttable_' . $blockinstanceid . '', $reportclass->config->id);
             break;
         case 'jquery':
             if ($libraries == false)
                 $html = '';
             $html .= cr_add_jsorderingjs();
             if ($blockinstanceid == null)
                 $blockinstanceid = $reportclass->config->id;
             $html .= cr_add_jsordering('#reporttable_' . $blockinstanceid . '');
             $html .= html_writer::tag('style', '#page-blocks-cobalt_reports-viewreport .generaltable {
                 overflow: auto;
                 width: 100%;
                 display: block;}');
             break;
         case 'html':
             $html = html_writer::tag('style', '#page-blocks-cobalt_reports-viewreport .generaltable {
                 overflow: auto;
                 width: 100%;
                 display: block;}');
             break;
         default: break;
     }
     return $html;
 }