コード例 #1
0
 /**
  * Formats a value
  *
  * @param string $value The value which should be transformed
  * @param string $type  The type of the value
  * @param string $style The style of the value
  *
  * @return mixed
  */
 public function transform($value, $type, $style)
 {
     switch ($type) {
         case static::TYPE_BOOL:
             return '1' === $value;
         case static::TYPE_SHARED_STRING:
             return rtrim($this->sharedStrings->get($value));
         case '':
         case static::TYPE_NUMBER:
             return $style && Styles::FORMAT_DATE === $this->styles->get($style) ? $this->dateTransformer->transform($value) : $value * 1;
         default:
             return rtrim($value);
     }
 }
コード例 #2
0
ファイル: Styles.php プロジェクト: oanav/closetshare
 public static function newInstance()
 {
     if (!self::$instance instanceof self) {
         self::$instance = new self();
     }
     return self::$instance;
 }
コード例 #3
0
ファイル: index.php プロジェクト: oanav/closetshare
function minify_filter_external_css()
{
    $styles = Styles::newInstance()->getStyles();
    foreach ($styles as $key => $url) {
        if (false === strpos($url, osc_base_url())) {
            unset($styles[$key]);
        } else {
            osc_remove_style($key);
        }
    }
    return $styles;
}
コード例 #4
0
ファイル: Themes.php プロジェクト: jmcclenon/Osclass
 /**
  * Get the css styles urls
  *
  * @deprecated deprecated since version 3.1
  */
 public function getStyles()
 {
     return Styles::newInstance()->getStyles();
 }
コード例 #5
0
ファイル: Page.class.php プロジェクト: nclco/magicboard3
 public function SetStyle($style)
 {
     $this->use_style = $style;
     if ($this->use_style) {
         Styles::Add($this->css());
     } else {
         Styles::Del($this->css());
     }
 }
コード例 #6
0
ファイル: hTheme.php プロジェクト: jmcclenon/Osclass
/**
 * Print the HTML tags to make the style load
 */
function osc_load_styles()
{
    Styles::newInstance()->printStyles();
}
コード例 #7
0
ファイル: init.php プロジェクト: nclco/magicboard3
    $this->root['link'] = Path::Root('/?' . $this->Config('root') . '=' . $this->root['m_id']);
}
$this->main['link'] = Path::Root('/?' . $this->Config('root') . '=' . $this->root['m_id'] . '&' . $this->Config('main') . '=' . $this->main['m_id']);
$this->sub['link'] = Path::Root('/?' . $this->Config('root') . '=' . $this->root['m_id'] . '&' . $this->Config('main') . '=' . $this->main['m_id'] . '&' . $this->Config('sub') . '=' . $this->sub['m_id']);
/*
if($this->root['m_id']!='mobile' && $this->root['m_id']!='mobile_member' && Util::checkMobile() && is_dir(Path::Root('magic/skin/Layout/mobile'))) {
	Url::GoReplace(Path::Root('?r=mobile'));
}
*/
// 현재메뉴 정보를 불러옴
// redirection 정보가 있으면 바로 이동해줌
// redirection 보다는 메뉴주소자체를 바로 바꾸어줌
$menu = '';
if ($sub['m_no']) {
    $menu = $sub;
} else {
    if ($main['m_no']) {
        $menu = $main;
    } else {
        $menu = $root;
    }
}
if (isset($menu['m_redirection']) && $menu['m_redirection']) {
    Url::GoReplace($menu['m_redirection']);
}
/*
 * 테마에 따른 css 입력
 * 테마는 관리자에서 설정하도록 추가할 예정
 */
Styles::Add(Path::Group('/magic/css/' . $this->Config('theme') . '/jquery-ui-all.css'));
コード例 #8
0
ファイル: init.php プロジェクト: nclco/magicboard3
<?php

if (!defined("__MAGIC__")) {
    exit;
}
Styles::Add($this->path_view('jquery.mobile-1.1.0.min.css'));
Scripts::Add($this->path_view('jquery.mobile-1.1.0.min.js'));
コード例 #9
0
ファイル: init.php プロジェクト: nclco/magicboard3
<?php

if (!defined("__MAGIC__")) {
    exit;
}
/*
 * 해당 레이아웃에서 사용할 css/js set
 */
Styles::Add(Path::Group('magic/css/basic/jquery-ui-all.css'));
/*
 * 페이지 엘리먼트 불러오기
 */
$this->header = PageElement::Inst('admin_header')->html();
$this->side = PageElement::Inst('admin_side')->html();
$this->menu = PageElement::Inst('admin_menu')->html();
$this->head = PageElement::Inst('head')->html();
コード例 #10
0
ファイル: Module.class.php プロジェクト: nclco/magicboard3
 protected function Init()
 {
     if ($this->called_init) {
         return;
     }
     if (is_file($this->path_view('style.css'))) {
         Styles::Add($this->path_view('style.css'));
     }
     if (is_file($this->path_view('script.js'))) {
         Scripts::Add($this->path_view('script.js'));
     }
     if (is_file($this->path_controller('auth.php'))) {
         include $this->path_controller('auth.php');
     }
     if (is_file($this->path_controller('auth.' . $this->CurrentState() . '.php'))) {
         include $this->path_controller('auth.' . $this->CurrentState() . '.php');
     }
     // 2012.03.19 - 초기화 함수를 뒤로 옮김 삭제나 추가 같은 액션은 초기화에서 삭제나 추가를 하기때문에....
     // 예전에 init을 위로 올린 이유가 있었는데... 지금은 해결되었길 바란다.
     if (is_file($this->path_controller('init.php'))) {
         include $this->path_controller('init.php');
     }
     if (is_file($this->path_controller('init.' . $this->CurrentState() . '.php'))) {
         include $this->path_controller('init.' . $this->CurrentState() . '.php');
     }
     $this->called_init = true;
 }
コード例 #11
0
ファイル: config.php プロジェクト: nclco/magicboard3
<?php

if (!defined("__MAGIC__")) {
    exit;
}
$cfg = array();
/*
 * 기본값
 */
if (Config::Inst()->hp_title) {
    $cfg['title'][0] = Config::Inst()->hp_title;
}
$cfg['title'] = Magic::Inst()->Action('title_chain');
$cfg['script'] = Scripts::Get();
$cfg['style'] = Styles::Get();
コード例 #12
0
ファイル: Styles.class.php プロジェクト: nclco/magicboard3
            return;
        }
        $source = '<link rel="stylesheet" href="' . $href . '" type="text/css"/>';
        if (in_array($source, self::$css)) {
            return;
        }
        self::$css[] = $source;
    }
    // 스타일 제거
    static function Del($href)
    {
        if (!isset($href)) {
            return;
        }
        $source = '<link rel="stylesheet" href="' . $href . '" type="text/css"/>';
        if (FALSE !== ($key = array_search($source, self::$css))) {
            unset(self::$css[$key]);
        }
    }
    static function Get()
    {
        return self::$css;
    }
}
// mb_js, mb_css에 있는 파일은 자동으로 인크루드 함
$dir = dir(Path::MB_css());
while ($name = $dir->read()) {
    if (is_file(Path::MB_css($name))) {
        Styles::Add(Path::MB_css($name));
    }
}