本文整理汇总了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');
}
示例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 });");
}
示例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));
});
}
}
示例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");
}
示例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");
}
示例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');
}
示例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();
}
示例9: init
public function init()
{
parent::init();
Requirements::CSS("news/css/news.css");
RSSFeed::linkToFeed($this->Link() . "rss", $this->SiteConfig->Title . " News");
}
示例10: init
public function init()
{
parent::init();
Requirements::CSS("news/css/news.css");
}
示例11: init
public function init()
{
parent::init();
Requirements::CSS("videogallery/css/videogallery.css");
Requirements::javascript($this->SublimeJS);
}
示例12: init
function init()
{
parent::init();
Requirements::CSS('themes/openstack/css/hallofinnovation.css');
}