private function setOrder($identifier, $order = null) { if (is_null($order)) { $order = self::$priorityCounter++; } else { self::$priorityCounter = $order; } $this->priority[$identifier] = $order; }
/** * Begins tracking this page, that is, reporting to Google servers activity associated with a particular account. * @param string $accountNumber This is a number given to you by Google that uniquely associates you with your account. */ static function Track($accountNumber) { // URL to download Google Analytics API JavaScripts. Note that there is a http and a https version. $url = (isset($_SERVER['HTTPS']) ? 'https://ssl.' : 'http://www.') . 'google-analytics.com/ga.js'; // Add those scripts. ClientScript::AddSource($url, false); // The code to report this use of the page to Google servers. ClientScript::RaceQueue(WebPage::That(), '_gat', "pageTracker = _gat._getTracker('{$accountNumber}');pageTracker._trackPageview();"); // Report back to Google servers every time tokens are changed too. URL::SetTracker(new RaceClientEvent('pageTracker', 'pageTracker._trackPageview', URL::Tokens)); }
/** * Do not call manually! Override of default Show(). Triggers when SyntaxHighlighter instance is initially shown. */ function Show() { parent::Show(); $relativePath = System::GetRelativePath(getcwd(), dirname(__FILE__)); //Add Non-Minified Version of shCore.js for debugging // ClientScript::AddSource($relativePath . '/src/shCore.js', false); ClientScript::AddSource($relativePath . '/scripts/shCore.js', false); ClientScript::AddSource($relativePath . '/scripts/shBrush' . $this->Language . '.js', false); WebPage::That()->CSSFiles->Add($relativePath . '/styles/shCore.css'); WebPage::That()->CSSFiles->Add($relativePath . '/styles/shThemeDefault.css'); }
public function reset() { $this->clientScript->reset(); $this->css = array(); $this->js = array(); }
/** * Do not call manually! Override of default Show(). Triggers when tinyMCE instance is initially shown. */ function Show() { parent::Show(); $relativePath = System::GetRelativePath(getcwd(), dirname(__FILE__)); //Add tinymce script files ClientScript::AddSource($relativePath . 'Vendor/jquery-1.5.2.min.js', false); ClientScript::AddSource($relativePath . 'Vendor/Highcharts/js/highcharts.js', false); ClientScript::AddSource($relativePath . 'Vendor/Highcharts/js/modules/exporting.js', false); $args = ClientScript::ClientFormat($this->Config); ClientScript::RaceQueue($this, 'Highcharts', 'new Highcharts.Chart', array($this->Config)); }
/** * Do not call manually! Override of default Show(). Triggers when CKEditor instance is initially shown. */ function Show() { parent::Show(); $relativePath = System::GetRelativePath(getcwd(), dirname(__FILE__)); //Add ckeditor script files ClientScript::AddSource($relativePath . 'ckeditor/ckeditor.js', false); //Add NOLOH bridge script file ClientScript::AddSource($relativePath . 'Bridge/bridge.js', false); if (isset($this->Config['toolbar']) && is_string($toolbar = $this->Config['toolbar'])) { $condition = 'CKEDITOR.status == "loaded" && (CKEDITOR.config.toolbar_' . $toolbar . '|| CKEDITOR.fire("toolbar"))'; } else { $condition = 'CKEDITOR.status == "loaded"'; } ClientScript::RaceQueue($this->TextHolder, $condition, 'CKEDITOR.replace', array($this->TextHolder->Id, $this->Config), false, Priority::Low); }
/** * Generic function handler to handle for native non-handled FullCalendar calls. * For example: ChangeView(), Prev(), Next(), PrevYear(), NextYear(), Today(), GoToDate(), IncrementDate(), GetDate() * * @param string $name Name of method you wish to call * @param mixed $args Method arguments */ function __call($name, $args) { if ($this->HasMethod($name)) { parent::__call($name, $args); } else { ClientScript::RaceQueue($this, 'jQuery.fullCalendar', "\$('#{$this}').fullCalendar." . lcfirst($name), $args); } }
/** * Do not call manually! Override of default Show(). Triggers when tinyMCE instance is initially shown. */ function Show() { parent::Show(); $relativePath = System::GetRelativePath(getcwd(), dirname(__FILE__)); //Add tinymce script files ClientScript::AddSource($relativePath . 'tinymce/jscripts/tiny_mce/tiny_mce.js', false); /*Add NOLOH bridge script file*/ //Debug Version // ClientScript::AddSource($relativePath . 'Bridge/bridge.js', false); //Minified Version ClientScript::AddSource($relativePath . 'Bridge/bridge-min.js', false); $args = ClientScript::ClientFormat($this->Config); ClientScript::RaceQueue($this, 'tinymce', "var e=new tinymce.Editor('$this', $args);e.render();"); }