Exemplo n.º 1
0
	function Save($editor)
	{
		$comment = $editor->Text;
		$editor->Leave();
		$this->Controls->Clear();
		$this->Controls->Add(new MarkupRegion($comment, 0, 0, '100%', '100%'));
		WebPage::That()->Controls->Add(new BlogComment())	
			->Layout = Layout::Relative;
	}
Exemplo n.º 2
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));
 }
Exemplo n.º 3
0
	function ContentSlider($content=null, $left, $top, $width, $height)
	{
		parent::Panel($left, $top, $width, $height);
		WebPage::That()->CSSFiles->Add(GetRelativePath(getcwd(), dirname(__FILE__)) . '/Styles/default.css');
		$this->CSSClasses->Add('ContentSlider');
		$this->SlideHolder = new Panel(0, 0, '100%', '100%');
		$this->Slides = new Group();
		$this->Slides->Change = new ServerEvent($this, 'SlideContent');
		$this->SlideHolder->Controls->Add($this->Slides);
		if($content)
			$this->SetContent($content);
		$this->Controls->Add($this->SlideHolder);
		$this->SetPrevious();
		$this->SetNext();
	}
Exemplo n.º 4
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');
 }
Exemplo n.º 5
0
 /**
  * Create a new global Toolbar that can be used across all CKEditor instances.
  * 
  * After CreateToolbar() is used, you can then set your CKEditor instances to use your new toolbar via $object->Toolbar = $name;.
  * 
  * @param string $name
  * @param array|array(arrays) $strips
  */
 static function CreateToolbar($name, $strips)
 {
     ClientScript::RaceQueue(WebPage::That(), 'CKEDITOR.status == "loaded"', 'CKEDITOR.on("toolbar", function(e)' . '{CKEDITOR.config.toolbar_' . $name . '=' . ClientEvent::ClientFormat($strips) . ';});', null, false, Priority::High);
 }
Exemplo n.º 6
0
 /**
  * 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);
 }