コード例 #1
0
 /**
  * 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));
 }
コード例 #2
0
 /**
  * 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');
 }
コード例 #3
0
ファイル: Highcharts.php プロジェクト: noloh/Highcharts
	/**
	* 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));	
	}
コード例 #4
0
ファイル: CKEditor.php プロジェクト: noloh/CKEditor
 /**
  * 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);
 }
コード例 #5
0
ファイル: FullCalendar.php プロジェクト: noloh/FullCalendar
 /**
  * Do not call manually! Override of default Show(). Triggers when FullCalendar instance is initially shown.
  */
 function Show()
 {
     parent::Show();
     $relativePath = System::GetRelativePath(getcwd(), dirname(__FILE__));
     //Add FullCalendar CSS
     WebPage::That()->CSSFiles->Add($relativePath . '/Vendor/' . self::$CalendarPath . '/fullcalendar/fullcalendar.css');
     //Add FullCalendar script files
     ClientScript::AddSource($relativePath . 'Vendor/' . self::$CalendarPath . '/jquery/' . 'jquery-1.7.2.min.js', false);
     ClientScript::AddSource($relativePath . 'Vendor/' . self::$CalendarPath . '/jquery/' . 'jquery-1.7.2.min.js', false);
     ClientScript::RaceAddSource('jQuery', $relativePath . 'Vendor/' . self::$CalendarPath . '/fullcalendar/' . 'fullcalendar.min.js');
     $this->Refresh(true);
 }
コード例 #6
0
ファイル: TinyMCE.php プロジェクト: noloh/TinyMCE
	/**
	* 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();");		
	}