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


PHP Requirements::Javascript方法代码示例

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


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

示例1: init

 public function init()
 {
     parent::init();
     Requirements::css($this->ThemeDir() . "/css/bootstrap.min.css");
     Requirements::css("http://fonts.googleapis.com/css?family=Merriweather:400,300,300italic,400italic,700,700italic,900,900italic");
     Requirements::css("http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800");
     Requirements::css($this->ThemeDir() . "/font-awesome/css/font-awesome.min.css");
     Requirements::css($this->ThemeDir() . "/css/animate.min.css");
     Requirements::css($this->ThemeDir() . "/css/creative.css");
     Requirements::css($this->ThemeDir() . "/css/AboutPage.css");
     Requirements::css($this->ThemeDir() . "/css/ContactPage.css");
     Requirements::css($this->ThemeDir() . "/css/FAQ.css");
     Requirements::css($this->ThemeDir() . "/css/HomePage.css");
     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/jquery.fittext.js");
     Requirements::Javascript($this->ThemeDir() . "/js/wow.min.js");
     Requirements::Javascript($this->ThemeDir() . "/js/creative.js");
     // You can include any CSS or JS required by your project here.
     // See: http://doc.silverstripe.org/framework/en/reference/requirements
 }
开发者ID:jbrown40,项目名称:nvweb,代码行数:22,代码来源:Page.php

示例2: Field

    /**
     * Returns a <select> tag containing all the appropriate <option> tags and with add/useExisting link
     */
    function Field()
    {
        //Add these js file so that the DropdownField_WithAdd can work alone (in a webpage, rather than CMS).
        Requirements::javascript('jsparty/prototype.js');
        Requirements::javascript('jsparty/behaviour.js');
        Requirements::javascript('jsparty/prototype_improvements.js');
        Requirements::Javascript("sapphire/javascript/DropdownField_WithAdd.js");
        $dropdown = parent::Field();
        if ($this->addLink) {
            $addLink = <<<HTML
<a class="addlink link" id="{$this->name}_addLink" href="{$this->addLink}" style="display: inline; padding-left: 1em; text-decoration: underline;">{$this->addText}</a>
HTML;
        }
        if ($this->useExistingLink) {
            $useExistingLink = <<<HTML
<a class="useExistinglink link" id="{$this->name}_useExistingLink" href="{$this->useExistingLink}" style="display: none; padding-left: 1em; text-decoration: underline;">{$this->useExistingText}</a>
HTML;
        }
        if ($this->editLink) {
            $editLink = <<<HTML
<a class="editlink" id="{$this->name}_editLink" href="{$this->editLink}" style="display: inline; padding-left: 1em; text-decoration: underline;">edit</a>
HTML;
        }
        return $dropdown . $addLink . $useExistingLink . $editLink;
    }
开发者ID:ramziammar,项目名称:websites,代码行数:28,代码来源:DropdownField.php


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