public function step4_cols() { $b = $this->base_url(); // CSS wp_register_style(self::SLUG.'-jqx-base', $b.'styles/jqx.base.css', [], null); wp_register_style(self::SLUG.'-jqx-light', $b.'styles/jqx.light.css', [], null); wp_enqueue_style(self::SLUG.'-jqx-base'); wp_enqueue_style(self::SLUG.'-jqx-light'); // Core + deps wp_register_script(self::SLUG.'-jqxcore', $b.'jqxcore.js', ['jquery'], null, true); wp_register_script(self::SLUG.'-jqxdata', $b.'jqxdata.js', [self::SLUG.'-jqxcore'], null, true); wp_register_script(self::SLUG.'-jqxbtn', $b.'jqxbuttons.js', [self::SLUG.'-jqxcore'], null, true); wp_register_script(self::SLUG.'-jqxscroll', $b.'jqxscrollbar.js', [self::SLUG.'-jqxcore'], null, true); wp_register_script(self::SLUG.'-jqxmenu', $b.'jqxmenu.js', [self::SLUG.'-jqxcore'], null, true); // Extra UI pieces required by filter/pager menus wp_register_script(self::SLUG.'-jqxlistbox', $b.'jqxlistbox.js', [self::SLUG.'-jqxcore'], null, true); wp_register_script(self::SLUG.'-jqxdropdownlist',$b.'jqxdropdownlist.js',[self::SLUG.'-jqxcore', self::SLUG.'-jqxlistbox'], null, true); wp_register_script(self::SLUG.'-jqxcheckbox', $b.'jqxcheckbox.js', [self::SLUG.'-jqxcore'], null, true); wp_register_script(self::SLUG.'-jqxgrid', $b.'jqxgrid.js', [self::SLUG.'-jqxcore', self::SLUG.'-jqxdata', self::SLUG.'-jqxbtn', self::SLUG.'-jqxscroll', self::SLUG.'-jqxmenu'], null, true ); // Grid helpers used by our features wp_register_script(self::SLUG.'-jqxgrid-selection', $b.'jqxgrid.selection.js', [self::SLUG.'-jqxgrid'], null, true); wp_register_script(self::SLUG.'-jqxgrid-sort', $b.'jqxgrid.sort.js', [self::SLUG.'-jqxgrid'], null, true); wp_register_script(self::SLUG.'-jqxgrid-filter', $b.'jqxgrid.filter.js', [self::SLUG.'-jqxgrid'], null, true); wp_register_script(self::SLUG.'-jqxgrid-pager', $b.'jqxgrid.pager.js', [self::SLUG.'-jqxgrid'], null, true); wp_register_script(self::SLUG.'-jqxgrid-columnsresize', $b.'jqxgrid.columnsresize.js', [self::SLUG.'-jqxgrid'], null, true); // Boot runs AFTER all needed modules (prevents "Missing references..." errors) wp_register_script(self::SLUG.'-boot4', '', [ self::SLUG.'-jqxlistbox', self::SLUG.'-jqxdropdownlist', self::SLUG.'-jqxcheckbox', self::SLUG.'-jqxgrid', self::SLUG.'-jqxgrid-selection', self::SLUG.'-jqxgrid-sort', self::SLUG.'-jqxgrid-filter', self::SLUG.'-jqxgrid-pager', self::SLUG.'-jqxgrid-columnsresize' ], time(), true); $boot = <<'; } })(); JS; wp_add_inline_script(self::SLUG.'-boot4', $boot, 'after'); wp_enqueue_script(self::SLUG.'-boot4'); // Fallback table so something is always visible $fallback = '
Date Order # SKU Product Qty Unit Price Line Total
Loading grid…
'; return '
'.$fallback.'
'; }