protected function loaded($reloaded = false) { parent::loaded($reloaded); $this->associateParents('show'); $model = self::$models[get_class($this)]; if (!isset($this->instanceClass) || !isset($this->property)) { $rs = $model->query(array('kind' => 'series', 'parent' => $this->uuid)); if ($rs->next()) { $ic = 'http://purl.org/ontology/po/Brand'; $pr = 'http://purl.org/ontology/po/brand'; } else { $ic = 'http://purl.org/ontology/po/Series'; $pr = 'http://purl.org/ontology/po/series'; } if (!isset($this->instanceClass)) { $this->instanceClass = $ic; } if (!isset($this->property)) { $this->property = $pr; } } }
$constant = get_defined_constants(true); $constant_js = ""; foreach ($constant['user'] as $k => $v) { $constant_js .= $k . '=' . json_encode($v) . ','; } unset($constant); $cargo = array('segment' => $segment, 'language' => $config->language, 'languages' => Config::get('DASHBOARD.languages', array()), 'html_parser' => Config::get('html_parser'), 'file_extension_allow' => implode(',', File::$config['file_extension_allow']), 'url' => array('protocol' => $config->url_protocol, 'base' => $config->url_base, 'host' => $config->url_host, 'url' => $config->url_url, 'path' => $config->url_path, 'current' => $config->url_current, 'query' => $config->url_query)); $output = O_BEGIN . '<script>var ' . rtrim($constant_js, ',') . ';'; foreach ($cargo as $k => $v) { $output .= 'DASHBOARD.' . $k . '=' . json_encode($v) . ';'; } $output .= 'DASHBOARD.url.hash=window.location.hash;'; echo $output . '</script>' . O_END; }, 20); Weapon::add('shell_after', function () use($config) { if (!Asset::loaded($config->protocol . ICON_LIBRARY_PATH)) { echo Asset::stylesheet($config->protocol . ICON_LIBRARY_PATH); } $path = __DIR__ . DS . 'assets' . DS . 'shell' . DS; echo Asset::stylesheet(array($path . 'row.css', $path . 'upload.css', $path . 'tab.css', $path . 'toggle.css', $path . 'modal.css', $path . 'tooltip.css', $path . 'sortable.css', $path . 'accordion.css', $path . 'layout.css', SHIELD . DS . $config->shield . DS . 'assets' . DS . 'shell' . DS . 'manager.css'), "", 'shell/manager.min.css'); }, 10); Weapon::add('cargo_after', function () use($config, $speak) { if (Config::get('widget_manager_bar_id', 0) <= 1) { echo Widget::manager('BAR'); // include once ... } }, 20); Weapon::add('SHIPMENT_REGION_BOTTOM', function () use($config) { Session::kill('recent_item_update'); $path = __DIR__ . DS . 'assets' . DS . 'sword' . DS; echo Asset::javascript(array($path . 'ajax.js', $path . 'row.js', $path . 'slug.js', $path . 'upload.js', $path . 'tab.js', $path . 'toggle.js', $path . 'modal.js', $path . 'tooltip.js', $path . 'sortable.js', $path . 'accordion.js', SHIELD . DS . $config->shield . DS . 'assets' . DS . 'sword' . DS . 'manager.js'), "", 'sword/manager.min.js');
protected function loaded($reloaded = false) { parent::loaded($reloaded); $this->associateParents('episode'); }
function do_response_reply_x($post) { global $config, $speak, $parent; $s = Asset::loaded($config->protocol . ICON_LIBRARY_PATH) ? '<i class="fa fa-times-circle"></i> ' : ""; echo ' <a href="' . $post->url . '" class="btn btn-reject btn-reject-reply"' . ($parent === false ? ' style="display:none;"' : "") . '>' . $s . $speak->cancel . '</a>'; }
protected function loaded($reloaded = false) { parent::loaded($reloaded); $this->associateParents('series', 'show'); }