Esempio n. 1
0
 function init()
 {
     parent::init();
     Requirements::CSS('themes/openstack/css/enterprise.css');
     Requirements::CSS('themes/openstack/css/science.css');
     Requirements::javascript('themes/openstack/javascript/enterprise.js');
 }
 function init()
 {
     parent::init();
     Requirements::CSS('themes/openstack/css/learn.css');
     Requirements::javascript('themes/openstack/javascript/filetracking.jquery.js');
     Requirements::customScript("jQuery(document).ready(function(\$) {\n\n\n            \$('body').filetracking();\n\n             \$(document).on('click', '.outbound-link', function(event){\n                var href = \$(this).attr('href');\n                recordOutboundLink(this,'Outbound Links',href);\n                event.preventDefault();\n                event.stopPropagation()\n                return false;\n            });\n\n        });");
 }
 /**
  * Updates the fields used in the CMS
  * @see DataExtension::updateCMSFields()     
  */
 public function updateCMSFields(FieldList $fields)
 {
     Requirements::CSS('blogcategories/css/cms-blog-categories.css');
     // Try to fetch categories from cache
     $categories = $this->getAllBlogCategories();
     if ($categories->count() >= 1) {
         $cacheKey = md5($categories->sort('LastEdited', 'DESC')->First()->LastEdited);
         $cache = SS_Cache::factory('BlogCategoriesList');
         if (!($categoryList = $cache->load($cacheKey))) {
             $categoryList = "<ul>";
             foreach ($categories->column('Title') as $title) {
                 $categoryList .= "<li>" . Convert::raw2xml($title) . "</li>";
             }
             $categoryList .= "</ul>";
             $cache->save($categoryList, $cacheKey);
         }
     } else {
         $categoryList = "<ul><li>No categories exist. Categories can be added from the BlogTree or the BlogHolder page.</li></ul>";
     }
     //categories tab
     $gridFieldConfig = GridFieldConfig_RelationEditor::create();
     $fields->addFieldToTab('Root.Categories', GridField::create('BlogCategories', 'Blog Categories', $this->owner->BlogCategories(), $gridFieldConfig));
     $fields->addFieldToTab('Root.Categories', ToggleCompositeField::create('ExistingCategories', 'View Existing Categories', array(new LiteralField("CategoryList", $categoryList)))->setHeadingLevel(4));
     // Optionally default category to current holder
     if (Config::inst()->get('BlogCategory', 'limit_to_holder')) {
         $holder = $this->owner->Parent();
         $gridFieldConfig->getComponentByType('GridFieldDetailForm')->setItemEditFormCallback(function ($form, $component) use($holder) {
             $form->Fields()->push(HiddenField::create('ParentID', false, $holder->ID));
         });
     }
 }
 public static function load_requirements()
 {
     Requirements::CSS("photogallery/shadowbox/shadowbox.css");
     Requirements::CSS("photogallery/css/photogallery.css");
     Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js');
     Requirements::javascript("photogallery/shadowbox/shadowbox.js");
     Requirements::javascript("photogallery/js/shadowbox_init.js");
 }
 public function init()
 {
     parent::init();
     Requirements::CSS("photo_album/css/photoalbum.css");
     Requirements::javascript("http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js");
     Requirements::javascript("photo_album/javascript/jquery.photo.gallery.js");
     Requirements::javascript("photo_album/javascript/jquery.slide.show.js");
 }
 public function init()
 {
     parent::init();
     //if versioned we need to tell ModelAdmin to read from stage
     if (Singleton($this->modelClass)->isVersioned) {
         Versioned::reading_stage('Stage');
     }
     //Styling for preview links and status
     Requirements::CSS(MOD_DOAP_DIR . '/css/dataobjectaspageadmin.css');
 }
 public function __construct()
 {
     parent::__construct();
     Requirements::block("photogallery/shadowbox/shadowbox.css");
     Requirements::block("http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js");
     Requirements::block("photogallery/shadowbox/shadowbox.js");
     Requirements::block("photogallery/js/shadowbox_init.js");
     Requirements::CSS("silverstripe-video-embed/assests/javascript/shadowbox/shadowbox.css");
     Requirements::javascript("http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js");
     Requirements::javascript("silverstripe-video-embed/assests/javascript/shadowbox/shadowbox.js");
     Requirements::javascriptTemplate('silverstripe-video-embed/assests/javascript/shadowbox_init.js', array());
 }
 public function Field()
 {
     $this->getSource();
     //die($this->Link('findOrAdd'));
     //Requirements::javascript(THIRDPARTY_DIR."/jquery-livequery/jquery.livequery.js");
     Requirements::javascript(MOD_QA_DIR . '/javascript/quickAddField.js');
     Requirements::CSS(MOD_QA_DIR . '/css/quickaddfield.css');
     if ($this->fieldType == 'CheckboxSetField') {
         $selectAll = '';
         if ($this->selectAll) {
             $selectAll = '<a class="selectAll" href="#">Select All</a>';
         }
         return $selectAll . CheckboxSetField::Field();
     }
     return parent::Field();
 }
 public function init()
 {
     parent::init();
     Requirements::CSS("news/css/news.css");
     RSSFeed::linkToFeed($this->Link() . "rss", $this->SiteConfig->Title . " News");
 }
 public function init()
 {
     parent::init();
     Requirements::CSS("news/css/news.css");
 }
 public function init()
 {
     parent::init();
     Requirements::CSS("basiccalendar/css/calendar.css");
 }
 public function init()
 {
     parent::init();
     Requirements::CSS("videogallery/css/videogallery.css");
     Requirements::javascript($this->SublimeJS);
 }
 function init()
 {
     parent::init();
     Requirements::CSS('themes/openstack/css/hallofinnovation.css');
 }