Пример #1
0
 function addCssFile($path, $media = 'screen')
 {
     if (substr($path, 0, 4) != 'http') {
         if (strpos($path, '/') === false) {
             $path = \GCore\Helpers\Assets::css($path);
         } else {
             //relative file path provided
             $path = $this->url . $path;
         }
     }
     if (!in_array($path, (array) Arr::getVal($this->cssfiles, array('[n]', 'href')))) {
         $this->cssfiles[] = array('href' => $path, 'media' => $media, 'rel' => 'stylesheet', 'type' => 'text/css');
     }
 }
Пример #2
0
 public static function loadFiles()
 {
     $doc = \GCore\Libs\Document::getInstance();
     $doc->_('jquery');
     $doc->addJsFile(\GCore\Helpers\Assets::js('toolbar', ''));
     $doc->addCssFile(\GCore\Helpers\Assets::css('toolbar', ''));
 }
Пример #3
0
 public function getNav($lang = array())
 {
     if ($this->total <= $this->limit) {
         return '';
     }
     $first = $this->getFirst($lang);
     $prev = $this->getPrevious($lang);
     $numbers = $this->getNumbers($lang);
     $next = $this->getNext($lang);
     $last = $this->getLast($lang);
     $full = $this->full_nav($first, $prev, $numbers, $next, $last);
     //add css file
     $doc = \GCore\Libs\Document::getInstance();
     $doc->addCssFile(\GCore\Helpers\Assets::css('paginator'));
     return $full;
 }