コード例 #1
0
ファイル: programuser.table.php プロジェクト: jamesmcq/elis
 /**
  * Get an array of options to pass to the deepsight_datatable javascript object.
  * Enables drag and drop, and multiselect.
  * @return array An array of options, ready to be passed to $this->get_init_js()
  */
 public function get_table_js_opts()
 {
     $opts = parent::get_table_js_opts();
     $opts['dragdrop'] = true;
     $opts['multiselect'] = true;
     return $opts;
 }
コード例 #2
0
ファイル: enrolments.table.php プロジェクト: jamesmcq/elis
 /**
  * Get an array of options to pass to the deepsight_datatable javascript object.
  *
  * Enables drag and drop, multiselect, and a rowfilter function to show enrolled users as disabled, if necessary.
  *
  * @return array An array of options, ready to be passed to $this->get_init_js()
  */
 public function get_table_js_opts()
 {
     $opts = parent::get_table_js_opts();
     $opts['dragdrop'] = true;
     $opts['multiselect'] = true;
     $langenroled = get_string('enroled', 'local_elisprogram');
     $opts['rowfilter'] = 'function(row, rowdata) {
                             if (rowdata.meta.enrolled == true) {
                                 row.addClass(\'disabled\').find(\'td.actions\').html(\'' . $langenroled . '\');
                             }
                             return row;
                         }';
     return $opts;
 }