当前位置: 首页>>代码示例>>PHP>>正文


PHP Requirements::set_force_js_to_bottom方法代码示例

本文整理汇总了PHP中Requirements::set_force_js_to_bottom方法的典型用法代码示例。如果您正苦于以下问题:PHP Requirements::set_force_js_to_bottom方法的具体用法?PHP Requirements::set_force_js_to_bottom怎么用?PHP Requirements::set_force_js_to_bottom使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Requirements的用法示例。


在下文中一共展示了Requirements::set_force_js_to_bottom方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: include_requirements

 /**
  * Include requirements that deploynaut needs, such as javascript.
  */
 public static function include_requirements()
 {
     // JS should always go to the bottom, otherwise there's the risk that Requirements
     // puts them halfway through the page to the nearest <script> tag. We don't want that.
     Requirements::set_force_js_to_bottom(true);
     Requirements::combine_files('deploynaut.js', array('deploynaut/javascript/jquery.js', 'deploynaut/javascript/bootstrap.js', 'deploynaut/javascript/q.js', 'deploynaut/javascript/deploynaut.js', 'deploynaut/javascript/react-with-addons.min.js', 'deploynaut/javascript/deploy.min.js', 'deploynaut/javascript/bootstrap.file-input.js', 'deploynaut/thirdparty/select2/dist/js/select2.min.js', 'deploynaut/javascript/material.js'));
 }
开发者ID:antons-,项目名称:deploynaut,代码行数:10,代码来源:DNRoot.php

示例2: include_requirements

 /**
  * Include requirements that deploynaut needs, such as javascript.
  */
 public static function include_requirements()
 {
     // JS should always go to the bottom, otherwise there's the risk that Requirements
     // puts them halfway through the page to the nearest <script> tag. We don't want that.
     Requirements::set_force_js_to_bottom(true);
     // todo these should be bundled into the same JS as the others in "static" below.
     // We've deliberately not used combined_files as it can mess with some of the JS used
     // here and cause sporadic errors.
     Requirements::javascript('deploynaut/javascript/jquery.js');
     Requirements::javascript('deploynaut/javascript/bootstrap.js');
     Requirements::javascript('deploynaut/javascript/q.js');
     Requirements::javascript('deploynaut/javascript/tablefilter.js');
     Requirements::javascript('deploynaut/javascript/deploynaut.js');
     Requirements::javascript('deploynaut/javascript/react-with-addons.js');
     Requirements::javascript('deploynaut/javascript/bootstrap.file-input.js');
     Requirements::javascript('deploynaut/thirdparty/select2/dist/js/select2.min.js');
     Requirements::javascript('deploynaut/javascript/material.js');
     // Load the buildable dependencies only if not loaded centrally.
     if (!is_dir(BASE_PATH . DIRECTORY_SEPARATOR . 'static')) {
         if (\Director::isDev()) {
             \Requirements::javascript('deploynaut/static/bundle-debug.js');
         } else {
             \Requirements::javascript('deploynaut/static/bundle.js');
         }
     }
     Requirements::css('deploynaut/static/style.css');
 }
开发者ID:udomsak,项目名称:deploynaut,代码行数:30,代码来源:DNRoot.php

示例3: init

 public function init()
 {
     Requirements::set_backend(new BetterRequirements_Backend());
     parent::init();
     Requirements::set_combined_files_folder(project() . '/_combinedfiles');
     Requirements::set_force_js_to_bottom(true);
     $this->requireJS();
     $this->requireCSS();
 }
开发者ID:silverstripe-europe-meetup,项目名称:website-2015,代码行数:9,代码来源:Page.php

示例4: init

 function init()
 {
     parent::init();
     Requirements::css('events/css/events.css');
     Requirements::css('events/css/events.list.css');
     Requirements::set_force_js_to_bottom(true);
     Requirements::javascript('events/js/events.js');
     $this->buildEventManager();
 }
开发者ID:OpenStackweb,项目名称:openstack-org,代码行数:9,代码来源:EventHolder.php

示例5: init

 public function init()
 {
     //Pull in parent properties for controller e.g css & js assets
     parent::init();
     Requirements::css($this->ThemeDir() . '/css/homepage.css');
     Requirements::set_force_js_to_bottom(true);
     Requirements::javascript($this->ThemeDir() . '/js/jquery.mobile.custom.min.js');
     Requirements::javascript($this->ThemeDir() . '/js/tron-swipe.js');
 }
开发者ID:dunatron,项目名称:onbaord-revamp,代码行数:9,代码来源:HomePage.php

示例6: init

 public function init()
 {
     parent::init();
     // You can include any CSS or JS required by your project here.
     // See: http://doc.silverstripe.org/framework/en/reference/requirements
     Requirements::set_force_js_to_bottom(true);
     Requirements::javascript('http://code.jquery.com/jquery-2.1.4.min.js');
     Requirements::javascript('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js');
     Requirements::css($this->ThemeDir() . '/css/homepage.css');
     Requirements::javascript($this->ThemeDir() . '/js/homepage.js');
 }
开发者ID:dunatron,项目名称:onbaord-revamp,代码行数:11,代码来源:Page.php

示例7: init

 public function init()
 {
     parent::init();
     // You can include any CSS or JS required by your project here.
     // See: http://doc.silverstripe.org/framework/en/reference/requirements
     Requirements::set_force_js_to_bottom(true);
     //        Requirements::javascript('http://code.jquery.com/jquery-2.1.4.min.js');
     //        Requirements::javascript('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js');
     //        Requirements::javascript('https://maps.googleapis.com/maps/api/js?key=AIzaSyCRngKslUGJTlibkQ3FkfTxj3Xss1UlZDA&sensor=false');
     Requirements::css($this->ThemeDir() . '/css/homepage.css');
 }
开发者ID:dunatron,项目名称:hairdresser,代码行数:11,代码来源:HomePage.php

示例8: Field

 public function Field($properties = array())
 {
     $this->addExtraClass('form-control icp icp-auto');
     Requirements::css("//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css");
     Requirements::css("//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css");
     Requirements::css(FONTAWESOMEICONPICKER_DIR . '/code/thirdparty/fontawesome-iconpicker-1.0.0/dist/css/fontawesome-iconpicker.min.css');
     Requirements::css(FONTAWESOMEICONPICKER_DIR . '/assets/setup-icon-picker.css');
     Requirements::set_force_js_to_bottom(true);
     Requirements::javascript(FONTAWESOMEICONPICKER_DIR . '/code/thirdparty/fontawesome-iconpicker-1.0.0/dist/js/fontawesome-iconpicker.min.js');
     Requirements::javascript(FONTAWESOMEICONPICKER_DIR . '/assets/setup-icon-picker.js');
     return parent::Field($properties);
 }
开发者ID:helpfulrobot,项目名称:thisisbd-silverstripe-fontawesome-iconpickerfield,代码行数:12,代码来源:FontAwesomeIconPickerField.php

示例9: Field

 /**
  * @param array $properties
  *
  * @return mixed
  */
 public function Field($properties = array())
 {
     $this->addExtraClass('form-control icp icp-auto');
     //Libraries
     Requirements::css(FONT_AWESOME_DIR . '/css/lib/bootstrap.min.css');
     Requirements::css(FONT_AWESOME_DIR . '/css/lib/font-awesome.min.css');
     Requirements::css(FONT_AWESOME_DIR . '/css/lib/font-awesome-iconpicker.min.css');
     Requirements::javascript(FONT_AWESOME_DIR . '/js/lib/font-awesome-iconpicker.min.js');
     // Module
     Requirements::css(FONT_AWESOME_DIR . '/css/font-awesome-module.css');
     Requirements::javascript(FONT_AWESOME_DIR . '/js/font-awesome-module.js');
     Requirements::set_force_js_to_bottom(true);
     return parent::Field($properties);
 }
开发者ID:helpfulrobot,项目名称:anselmdk-silverstripe-iconfont-picker,代码行数:19,代码来源:FontAwesomeField.php

示例10: Field

 /**
  * @param array $properties
  *
  * @return mixed
  */
 public function Field($properties = array())
 {
     $this->addExtraClass('form-control color-swab');
     //Libraries
     Requirements::css(COLOR_SWAB_DIR . '/css/lib/colorswab-iconpicker.css');
     Requirements::javascript(COLOR_SWAB_DIR . '/js/color-swabs.js');
     Requirements::javascript(COLOR_SWAB_DIR . '/js/lib/colorswab-iconpicker.js');
     // Module
     Requirements::css(COLOR_SWAB_DIR . '/css/lib/bootstrap.min.css');
     Requirements::css(COLOR_SWAB_DIR . '/css/color-swab-module.css');
     Requirements::css(COLOR_SWAB_DIR . '/css/color-swabs.css');
     Requirements::javascript(COLOR_SWAB_DIR . '/js/color-swab-module.js');
     Requirements::set_force_js_to_bottom(true);
     return parent::Field($properties);
 }
开发者ID:helpfulrobot,项目名称:moe-color-swab,代码行数:20,代码来源:ColorSwabField.php

示例11: init

 public function init()
 {
     parent::init();
     //Set a custom combined folder under themes so relative paths to images within CSS files don't break
     Requirements::set_combined_files_folder($this->ThemeDir() . '/combined');
     Requirements::set_force_js_to_bottom(true);
     $requiredJS = array('thirdparty/jquery/dist/jquery.min.js', 'thirdparty/foundation-sites/dist/foundation.min.js', 'thirdparty/jquery-cycle2/build/jquery.cycle2.min.js', 'thirdparty/jquery-cycle2/build/plugin/jquery.cycle2.swipe.min.js', $this->ThemeDir() . '/js/app.js');
     if (class_exists('GalleryItem')) {
         $requiredJS[] = 'thirdparty/fancybox/source/jquery.fancybox.pack.js';
         $requiredJS[] = 'thirdparty/fancybox/source/helpers/jquery.fancybox-media.js';
     }
     $requiredJS[] = $this->ThemeDir() . '/js/app.js';
     // [1] use this is this is a custom build
     Requirements::combine_files('app.js', $requiredJS);
     // Requirements::customScript();
 }
开发者ID:mediabeastnz,项目名称:plato-silverstripe-installer,代码行数:16,代码来源:Page.php

示例12: init

 public function init()
 {
     parent::init();
     //Set a custom combined folder under themes so relative paths to images within CSS files don't break
     Requirements::set_combined_files_folder($this->ThemeDir() . '/combined');
     Requirements::block(THIRDPARTY_DIR . '/jquery/jquery.js');
     Requirements::set_force_js_to_bottom(true);
     // [1] use this is this is a custom build
     Requirements::combine_files('app.js', array($this->ThemeDir() . '/js/jquery/dist/jquery.min.js', $this->ThemeDir() . '/foundation/js/foundation.min.js', $this->ThemeDir() . '/js/app.js'));
     if (class_exists('HomeSlide') || class_exists('GalleryItem')) {
         Requirements::javascript($this->ThemeDir() . '/js/cycle2/jquery.cycle2.min.js');
         Requirements::javascript($this->ThemeDir() . '/js/cycle2/jquery.cycle2.swipe.min.js');
         Requirements::javascript($this->ThemeDir() . '/js/fancybox/source/jquery.fancybox.pack.js');
         Requirements::javascript($this->ThemeDir() . '/js/fancybox/source/helpers/jquery.fancybox-media.js');
     }
     // Requirements::customScript();
 }
开发者ID:helpfulrobot,项目名称:plato-creative-plato-silverstripe-installer,代码行数:17,代码来源:Page.php

示例13: init

 public function init()
 {
     $baseHref = Director::BaseURL();
     /** -----------------------------------------
      * Javascript
      * ----------------------------------------*/
     Requirements::insertHeadTags('<script type="text/javascript" src="' . $baseHref . project() . '/javascript/lib/modernizr.min.js"></script>', 'Modernizr');
     /**
      * Set All JS to be right before the closing </body> tag.
      */
     Requirements::set_force_js_to_bottom(true);
     if (Director::isDev()) {
         Requirements::javascript(project() . '/javascript/main.js');
     } else {
         Requirements::javascript(project() . '/javascript/main.min.js');
     }
     /** -----------------------------------------
      * CSS
      * ----------------------------------------*/
     Requirements::css(project() . '/css/main.min.css', 'all');
     parent::init();
 }
开发者ID:helpfulrobot,项目名称:toastnz-silverstripe-boilerplate-installer,代码行数:22,代码来源:Page.php

示例14: init

 public function init()
 {
     parent::init();
     // You can include any CSS or JS required by your project here.
     // See: http://doc.silverstripe.org/framework/en/reference/requirements
     Requirements::set_force_js_to_bottom(true);
     // Requirements::javascript('http://code.jquery.com/jquery-2.1.4.min.js');
     //Requirements::javascript('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js');
     Requirements::css($this->ThemeDir() . '/css/bootstrap.min.css');
     //        Requirements::css($this->ThemeDir().'/css/grayscale.css');
     Requirements::css($this->ThemeDir() . '/css/main.css');
     //        Requirements::javascript($this->ThemeDir().'/js/main.js');
     Requirements::javascript($this->ThemeDir() . '/js/jquery.js');
     Requirements::javascript($this->ThemeDir() . '/js/bootstrap.min.js');
     Requirements::javascript($this->ThemeDir() . '/js/jquery.easing.min.js');
     Requirements::javascript($this->ThemeDir() . '/js/grayscale.js');
     // GRAYSCALE JS, just dumping it and getting it going for now. Do HTML and functions 1st, animation last
     //        Requirements::javascript($this->ThemeDir().'/js/grayscale.js');
     //        Requirements::javascript($this->ThemeDir().'/js/jquery.easing.min.js');
     //        Requirements::javascript($this->ThemeDir().'/js/grayscale.js');
     //Note im not using grayscale jquery.js. Up the top im loading in a specific version
     // from CDN(content distribution network) common files like this will last very quick on a CDN
     // eg. our test server is in NYC USA, a cdn will pick the closest jquery server in a nutshell
 }
开发者ID:dunatron,项目名称:hairdresser,代码行数:24,代码来源:Page.php

示例15:

global $project;
$project = 'mysite';
global $database;
//!!! YOU HAVE TO DEFINE YOUR DATABASE FIRST, MAN. !!!
$database = 'iowa-parents';
// Use _ss_environment.php file for configuration
require_once "conf/ConfigureFromEnv.php";
// Set the site locale
i18n::set_locale('en_US');
FulltextSearchable::enable();
// Enable nested URLs for this site (e.g. page/sub-page/)
if (class_exists('SiteTree')) {
    SiteTree::enable_nested_urls();
}
if (Director::isLive()) {
    Director::forceSSL();
}
Requirements::set_force_js_to_bottom(true);
// add a button to remove formatting
HtmlEditorConfig::get('cms')->insertButtonsBefore('styleselect', 'removeformat');
// tell the button which tags it may remove
HtmlEditorConfig::get('cms')->setOption('removeformat_selector', 'b,strong,em,i,span,ins');
//remove font->span conversion
HtmlEditorConfig::get('cms')->setOption('convert_fonts_to_spans', 'false,');
HtmlEditorConfig::get('cms')->setOptions(array('valid_elements' => "@[id|class|style|title],#a[id|rel|rev|dir|tabindex|accesskey|type|name|href|target|title|class],-strong/-b[class],-em/-i[class],-strike[class],-u[class],#p[id|dir|class|align|style],-ol[class],-ul[class],-li[class],br,img[id|dir|longdesc|usemap|class|src|border|alt=|title|width|height|align],-sub[class],-sup[class],-blockquote[dir|class],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|dir|id|style],-tr[id|dir|class|rowspan|width|height|align|valign|bgcolor|background|bordercolor|style],tbody[id|class|style],thead[id|class|style],tfoot[id|class|style],#td[id|dir|class|colspan|rowspan|width|height|align|valign|scope|style],-th[id|dir|class|colspan|rowspan|width|height|align|valign|scope|style],caption[id|dir|class],-h1[id|dir|class|align|style],-h2[id|dir|class|align|style],-h3[id|dir|class|align|style],-h4[id|dir|class|align|style],-h5[id|dir|class|align|style],-h6[id|dir|class|align|style],hr[class],dd[id|class|title|dir],dl[id|class|title|dir],dt[id|class|title|dir],@[id,style,class],small", 'extended_valid_elements' => "img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|usemap],#iframe[src|name|width|height|align|frameborder|marginwidth|marginheight|scrolling],object[width|height|data|type],param[name|value],map[class|name|id],area[shape|coords|href|target|alt]"));
// TinyMCE cleanup on paste
HtmlEditorConfig::get('cms')->setOption('paste_auto_cleanup_on_paste', 'true');
HtmlEditorConfig::get('cms')->setOption('paste_remove_styles', 'true');
HtmlEditorConfig::get('cms')->setOption('paste_remove_styles_if_webkit', 'true');
HtmlEditorConfig::get('cms')->setOption('paste_strip_class_attributes', 'true');
GD::set_default_quality(80);
开发者ID:StudentLifeMarketingAndDesign,项目名称:iowa-parents,代码行数:31,代码来源:_config.php


注:本文中的Requirements::set_force_js_to_bottom方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。