當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Requirements::CSS方法代碼示例

本文整理匯總了PHP中Requirements::CSS方法的典型用法代碼示例。如果您正苦於以下問題:PHP Requirements::CSS方法的具體用法?PHP Requirements::CSS怎麽用?PHP Requirements::CSS使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Requirements的用法示例。


在下文中一共展示了Requirements::CSS方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: init

 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');
 }
開發者ID:OpenStackweb,項目名稱:openstack-org,代碼行數:7,代碼來源:SciencePage.php

示例2: init

 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        });");
 }
開發者ID:OpenStackweb,項目名稱:openstack-org,代碼行數:7,代碼來源:LearnLanding.php

示例3: updateCMSFields

 /**
  * 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));
         });
     }
 }
開發者ID:helpfulrobot,項目名稱:ioti-silverstripe-blogcategories,代碼行數:35,代碼來源:BlogCategoryEntry.php

示例4: load_requirements

 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");
 }
開發者ID:helpfulrobot,項目名稱:andrewhoule-silverstripe-photogallery,代碼行數:8,代碼來源:PhotoGallery.php

示例5: init

 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");
 }
開發者ID:petebacondarwin,項目名稱:SilverStripe-Photo-Album-Module,代碼行數:8,代碼來源:PhotoAlbumPage.php

示例6: init

 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');
 }
開發者ID:helpfulrobot,項目名稱:silverstripe-dataobjectaspage,代碼行數:10,代碼來源:DataObjectAsPageAdmin.php

示例7: __construct

 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());
 }
開發者ID:helpfulrobot,項目名稱:gdmedia-silverstripe-video-embed,代碼行數:12,代碼來源:PhotoGallery_ControllerExtension.php

示例8: Field

 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();
 }
開發者ID:betterbrief,項目名稱:silverstripe-quickaddfield,代碼行數:16,代碼來源:QuickAddField.php

示例9: init

 public function init()
 {
     parent::init();
     Requirements::CSS("news/css/news.css");
     RSSFeed::linkToFeed($this->Link() . "rss", $this->SiteConfig->Title . " News");
 }
開發者ID:helpfulrobot,項目名稱:andrewhoule-silverstripe-basicnews,代碼行數:6,代碼來源:NewsHolder.php

示例10: init

 public function init()
 {
     parent::init();
     Requirements::CSS("news/css/news.css");
 }
開發者ID:helpfulrobot,項目名稱:andrewhoule-silverstripe-basicnews,代碼行數:5,代碼來源:NewsPage.php

示例11: init

 public function init()
 {
     parent::init();
     Requirements::CSS("videogallery/css/videogallery.css");
     Requirements::javascript($this->SublimeJS);
 }
開發者ID:helpfulrobot,項目名稱:andrewhoule-silverstripe-videogallery,代碼行數:6,代碼來源:VideoPage.php

示例12: init

 function init()
 {
     parent::init();
     Requirements::CSS('themes/openstack/css/hallofinnovation.css');
 }
開發者ID:OpenStackweb,項目名稱:openstack-org,代碼行數:5,代碼來源:HallOfInnovation.php


注:本文中的Requirements::CSS方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。