示例#1
1
 public function onRun()
 {
     $this->addCss(CombineAssets::combine(['~/plugins/zingabory/gallery/bower_components/photoswipe/dist/photoswipe.css', '~/plugins/zingabory/gallery/bower_components/photoswipe/dist/default-skin/default-skin.css']));
     $this->addJs(CombineAssets::combine(['~/plugins/zingabory/gallery/bower_components/photoswipe/dist/photoswipe.js', '~/plugins/zingabory/gallery/bower_components/photoswipe/dist/photoswipe-ui-default.js', '~/plugins/zingabory/gallery/bower_components/eventie/eventie.js', '~/plugins/zingabory/gallery/bower_components/classie/classie.js', '~/plugins/zingabory/gallery/bower_components/masonry/dist/masonry.pkgd.js', '~/plugins/zingabory/gallery/bower_components/imagesloaded/imagesloaded.pkgd.js', '~/plugins/zingabory/gallery/assets/js/gallery.js']));
     $this->categoryPage = $this->page['categoryPage'] = $this->property('categoryPage');
     $this->gallery = $this->page['gallery'] = $this->loadGallery();
 }
示例#2
0
 public function testCombine()
 {
     $combiner = new CombineAssets();
     $url = $combiner->combine(['assets/css/style1.css', 'assets/css/style2.css'], '/tests/fixtures/cms/themes/test');
     $this->assertNotNull($url);
     $this->assertRegExp('/\\w+[-]\\d+/i', $url);
     // Must contain hash-number
     $url = $combiner->combine(['assets/js/script1.js', 'assets/js/script2.js'], '/tests/fixtures/cms/themes/test');
     $this->assertNotNull($url);
     $this->assertRegExp('/\\w+[-]\\d+/i', $url);
     // Must contain hash-number
 }
 public function onRun()
 {
     $css = ['assets/css/magnific-popup.css'];
     $js = ['assets/js/masonry.pkgd.min.js', 'assets/js/magnific-popup.min.js', 'assets/js/magnific-init.js'];
     $this->addCss(CombineAssets::combine($css, plugins_path() . '/umar/masongallery'));
     $this->addJs(CombineAssets::combine($js, plugins_path() . '/umar/masongallery'));
 }
示例#4
0
 public function onRun()
 {
     $css = ['assets/css/magnific-popup.css'];
     $js = ['assets/js/jquery.magnific-popup.min.js', 'assets/js/magnific.js'];
     $this->addCss(CombineAssets::combine($css, plugins_path() . '/mohsin/magnificgallery'));
     $this->addJs(CombineAssets::combine($js, plugins_path() . '/mohsin/magnificgallery'));
 }
 public function boot()
 {
     \Backend\Controllers\Auth::extend(function ($controller) {
         if (\Backend\Classes\BackendController::$action == 'signin') {
             if (Settings::get('google_button') == 'light') {
                 $CSS[] = 'ssologin-light.css';
             } else {
                 $CSS[] = 'ssologin.css';
             }
             if (Settings::get('hide_login_fields') == 1) {
                 $CSS[] = 'hide-login.css';
             }
             $controller->addCss(CombineAssets::combine($CSS, plugins_path() . '/martin/ssologin/assets/css/'));
         }
     });
     Event::listen('backend.auth.extendSigninView', function ($controller) {
         return View::make("martin.ssologin::login");
     });
 }
示例#6
0
 public function onRender()
 {
     $css = ['assets/vendor/photoswipe/photoswipe.css', 'assets/vendor/photoswipe/default-skin/default-skin.css'];
     $js = ['assets/vendor/photoswipe/photoswipe.js', 'assets/vendor/photoswipe/photoswipe-ui-default.js', 'assets/js/performance-gallery.js'];
     $this->addCss(CombineAssets::combine($css, plugins_path() . '/abnmt/photoswipe'));
     $this->addJs(CombineAssets::combine($js, plugins_path() . '/abnmt/photoswipe'));
     $gallery = $this->property('images');
     if (!is_null($gallery)) {
         $gallery->each(function ($image) {
             $image['sizes'] = getimagesize('./' . $image->getPath());
             if ($image['sizes'][0] < $image['sizes'][1]) {
                 $image['thumb'] = $image->getThumb(177, null);
             } else {
                 $image['thumb'] = $image->getThumb(null, 177);
             }
         });
     }
     $this->gallery = $this->page['gallery'] = $gallery;
 }
示例#7
0
 /**
  * Converts supplied URL to a theme URL relative to the website root. If the URL provided is an
  * array then the files will be combined.
  * @param mixed $url Specifies the theme-relative URL. If null, the theme path is returned.
  * @return string
  */
 public function themeUrl($url = null)
 {
     $themeDir = $this->getTheme()->getDirName();
     if (is_array($url)) {
         $_url = URL::to(CombineAssets::combine($url, themes_path() . '/' . $themeDir));
     } else {
         $_url = Config::get('cms.themesPath', '/themes') . '/' . $themeDir;
         if ($url !== null) {
             $_url .= '/' . $url;
         }
         $_url = URL::asset($_url);
     }
     return $_url;
 }
示例#8
0
 public function onRun()
 {
     $this->addJs(CombineAssets::combine(['~/plugins/zingabory/extendblog/bower_components/moment/min/moment-with-locales.min.js']));
 }
示例#9
0
 public function onRun()
 {
     $this->addJs(CombineAssets::combine(['~/plugins/zingabory/extendblog/bower_components/accounting.js/accounting.js']));
     $this->addJs(CombineAssets::combine(['~/plugins/zingabory/extendblog/bower_components/money.js/money.js']));
 }
示例#10
0
 /**
  * Converts supplied URL to a theme URL relative to the website root. If the URL provided is an
  * array then the files will be combined.
  * @param mixed $url Specifies the theme-relative URL. If null, the theme path is returned.
  * @return string
  */
 public function themeUrl($url = null)
 {
     $themePath = Config::get('cms.themesDir') . '/' . $this->getTheme()->getDirName();
     if (is_array($url)) {
         $_url = Request::getBaseUrl();
         $_url .= CombineAssets::combine($url, $themePath);
     } else {
         $_url = Request::getBasePath() . $themePath;
         if ($url !== null) {
             $_url .= '/' . $url;
         }
     }
     return $_url;
 }
示例#11
0
 public function onRun()
 {
     $this->addJs(CombineAssets::combine(['~/plugins/zingabory/gallery/bower_components/eventie/eventie.js', '~/plugins/zingabory/gallery/bower_components/classie/classie.js', '~/plugins/zingabory/gallery/bower_components/masonry/dist/masonry.pkgd.js', '~/plugins/zingabory/gallery/bower_components/imagesloaded/imagesloaded.pkgd.js']));
 }