/**
  * Usage:
  *  run this widget at html view file 
  */
 public function run()
 {
     AssetLoader::load($this->viewPath . '/scripts/jquery.cookie.js');
     AssetLoader::load($this->viewPath . '/scripts/email_subscription.js');
     AssetLoader::load($this->viewPath . '/scripts/maincontroller.js');
     //AssetLoader::load($this->viewPath.'/scripts/userrules.js');
     //AssetLoader::load($this->viewPath.'/scripts/uservoice.js');
     //AssetLoader::load($this->viewPath.'/scripts/jquery.masonry.js');
     //AssetLoader::load($this->viewPath.'/scripts/pin_view_caption.js');
 }
Exemple #2
0
 public function run()
 {
     $iconsDir = Yii::app()->theme->baseUrl . '/images/map_icons';
     $icons = array('beauty' => $iconsDir . '/beauty-w36.png', 'food' => $iconsDir . '/food-w36.png', 'fun' => $iconsDir . '/activities-w36.png', 'shopping' => $iconsDir . '/shopping-w36.png', 'travel' => $iconsDir . '/travel-w36.png', 'services' => $iconsDir . '/workshop-w36.png', 'beauty_dark' => $iconsDir . '/beauty-w36-onclick.png', 'food_dark' => $iconsDir . '/food-w36-onclick.png', 'fun_dark' => $iconsDir . '/activities-w36-onclick.png', 'shopping_dark' => $iconsDir . '/shopping-w36-onclick.png', 'travel_dark' => $iconsDir . '/travel-w36-onclick.png', 'services_dark' => $iconsDir . '/workshop-w36-onclick.png', 'userLocation' => $iconsDir . '/userLocation.png');
     AssetLoader::loadInline('iconsUrl', $this->publishPhpVars($icons));
     $gmapUrl = "http://maps.googleapis.com/maps/api/js?key=AIzaSyA3rRFHFRuCY_c7M5v7MpYtDtL7h0fElUg&sensor=true";
     AssetLoader::loadExternal($gmapUrl);
     AssetLoader::load($this->viewPath . '/latlon.js');
     AssetLoader::load($this->viewPath . '/gmap.js');
     $this->render('dealsmap');
 }
 public function actionIndex()
 {
     $this->pageTitle = "Dealschrome - Map";
     $iconsDir = Yii::app()->theme->baseUrl . '/images/map_icons';
     $icons = array('beauty' => $iconsDir . '/beauty-w36.png', 'food' => $iconsDir . '/food-w36.png', 'fun' => $iconsDir . '/activities-w36.png', 'shopping' => $iconsDir . '/shopping-w36.png', 'travel' => $iconsDir . '/travel-w36.png', 'services' => $iconsDir . '/workshop-w36.png', 'userLocation' => $iconsDir . '/userLocation.png');
     AssetLoader::loadInline('iconsUrl', $this->publishPhpVars($icons));
     AssetLoader::load($this->viewPath . '/latlon.js');
     AssetLoader::load($this->viewPath . '/dialogues.js');
     AssetLoader::load($this->viewPath . '/gmap.js');
     $this->render('page_map');
 }
 public function actionIndex()
 {
     $this->pageTitle = "Dealschrome - Map";
     $iconsDir = Yii::app()->theme->baseUrl . '/images/map_icons';
     $icons = array('beauty' => $iconsDir . '/beauty-w36.png', 'food' => $iconsDir . '/food-w36.png', 'fun' => $iconsDir . '/activities-w36.png', 'shopping' => $iconsDir . '/shopping-w36.png', 'travel' => $iconsDir . '/travel-w36.png', 'services' => $iconsDir . '/workshop-w36.png', 'beauty_dark' => $iconsDir . '/beauty-w36-onclick.png', 'food_dark' => $iconsDir . '/food-w36-onclick.png', 'fun_dark' => $iconsDir . '/activities-w36-onclick.png', 'shopping_dark' => $iconsDir . '/shopping-w36-onclick.png', 'travel_dark' => $iconsDir . '/travel-w36-onclick.png', 'services_dark' => $iconsDir . '/workshop-w36-onclick.png', 'userLocation' => $iconsDir . '/userLocation.png');
     AssetLoader::loadInline('iconsUrl', $this->publishPhpVars($icons));
     AssetLoader::load($this->viewPath . '/scripts/globalvars.js');
     AssetLoader::load($this->viewPath . '/scripts/latlon.js');
     AssetLoader::load($this->viewPath . '/scripts/gmap_utils.js');
     AssetLoader::load($this->viewPath . '/scripts/dealfilter.js');
     AssetLoader::load($this->viewPath . '/scripts/gmap.js');
     AssetLoader::load($this->viewPath . '/scripts/queryform.js');
     AssetLoader::load($this->viewPath . '/scripts/mapcontroller.js');
     $this->render('page_map');
 }
 public function run()
 {
     AssetLoader::load($this->viewPath . '/organictabs.jquery.js');
     AssetLoader::loadInline('homepagetabs', $this->getWidgetJs());
     $query_options = array('sort' => array('bought desc'), 'fq' => array('expiry:[' . time() . ' TO *]'));
     $mostWanted = $this->renderDealList($query_options);
     $query_options = array('sort' => array('bought desc'), 'fq' => array('category_raw:Eateries', 'expiry:[' . time() . ' TO *]'));
     $mostWantedFood = $this->renderDealList($query_options);
     $query_options = array('sort' => array('bought desc'), 'fq' => array('category_raw:Travel', 'expiry:[' . time() . ' TO *]'));
     $mostWantedTravel = $this->renderDealList($query_options);
     $query_options = array('sort' => array('bought desc'), 'fq' => array('category_raw:"Beauty & Wellness"', 'expiry:[' . time() . ' TO *]'));
     $mostWantedBeauty = $this->renderDealList($query_options);
     $query_options = array('sort' => array('bought desc'), 'fq' => array('category_raw:"Fun & Activities"', 'expiry:[' . time() . ' TO *]'));
     $mostWantedFun = $this->renderDealList($query_options);
     $this->render('HomepageTabs', array('mostWanted' => $mostWanted, 'mostWantedFood' => $mostWantedFood, 'mostWantedTravel' => $mostWantedTravel, 'mostWantedBeauty' => $mostWantedBeauty, 'mostWantedFun' => $mostWantedFun));
 }
 public function run()
 {
     switch ($this->view) {
         case "sidebar":
             $this->render('filterlinks');
             break;
         case "dropdown":
             $this->render('dropdown');
             break;
         case "layout_picker":
             $this->render("layout_picker");
             break;
         case "query_form":
             $this->render("query_form");
             break;
     }
     AssetLoader::load($this->viewPath . '/dealcontroller.js');
     AssetLoader::load($this->viewPath . '/scripts/queryform.js');
 }
 public static function init($serverRootPath, $jsDirectoryPath, $cssDirectoryPath)
 {
     self::$_serverRootPath = rtrim($serverRootPath, DIRECTORY_SEPARATOR);
     self::$_jsDirectoryPath = rtrim($jsDirectoryPath, DIRECTORY_SEPARATOR);
     self::$_cssDirectoryPath = rtrim($cssDirectoryPath, DIRECTORY_SEPARATOR);
 }
Exemple #8
0
<?php

AssetLoader::init(__DIR__ . '/app', __DIR__ . '/app/assets/javascripts', __DIR__ . '/app/assets/stylesheets');
 public function actionAjaxFullBody()
 {
     AssetLoader::load($this->viewPath . '/scripts/depagify.js');
     AssetLoader::load($this->viewPath . '/scripts/gobacktop_button.js');
     $this->renderPartial('page_listing', NULL, false, true);
 }
 /**
  * Usage:
  *  run this widget at html view file 
  */
 public function run()
 {
     $this->buildVars();
     $this->buildScript();
     AssetLoader::loadInline('phpvar', $this->varsScript);
 }
Exemple #11
0
 protected function script_init()
 {
     // http://jscompress.com/
     AssetLoader::load($this->viewPath . '/scripts/depagify.js');
     AssetLoader::load($this->viewPath . '/scripts/gobacktop_button.js');
 }
 public function testLoadCss()
 {
     $this->assertEquals(array('/assets/stylesheets/application.css', '/assets/stylesheets/ui.css/global/menu.css', '/assets/stylesheets/ui.css/base.less', '/assets/stylesheets/ui.css/bootstrap.scss', '/assets/stylesheets/home.css'), AssetLoader::loadCss('home'));
 }