当前位置: 首页>>代码示例>>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;未经允许,请勿转载。