Ejemplo n.º 1
0
 static function add_soundmanager($where = 'head', $debug = false)
 {
     css::add('#soundmanager-debug {position:absolute;right:0px;bottom:0px;width:50em;height:18em;overflow:auto;background:#fff;color:#000;margin:1em;padding:1em;border:1px solid #999;font-family:"lucida console",verdana,tahoma,"sans serif";font-size:x-small;line-height:1.5em;}');
     if ($debug) {
         self::add('js/soundmanager2.js', $where);
         self::add("soundManager.url = '/pics/soundmanager2.swf';", $where);
     } else {
         self::add('js/sm2.js', $where);
         self::add("soundManager.url = '/pics/soundmanager2.swf'; soundManager.debugMode = false;", $where);
     }
 }
Ejemplo n.º 2
0
 public function page($pagenum)
 {
     css::add(array('media/css/rating.css'));
     $this->template->content = new View('content/rating');
     $db = new Database();
     $query = $db->query("SELECT Company FROM ambestf");
     $this->pagination = new Pagination(array('directory' => 'pagination', 'style' => 'trinhall', 'uri_segment' => 3, 'query_string' => '', 'items_per_page' => 23, 'auto_hide' => FALSE, 'total_items' => $query->count()));
     $this->pagination->extras = array('hide_count' => TRUE);
     $b = $this->pagination->items_per_page;
     $offset = ($pagenum - 1) * $b;
     $result = $db->query("SELECT Company, Rating1, Rating2, Rating3, Rating4 FROM ambestf ORDER BY Company ASC LIMIT {$b} OFFSET {$offset}");
     $this->template->content->result = $result;
 }
Ejemplo n.º 3
0
 public function page($pagenum)
 {
     css::add(array('media/css/fee.css'));
     javascript::add(array('media/js/ext-base.js', 'media/js/ext-all.js', 'media/js/app.js'));
     $this->template->content = new View('content/fees');
     $db = new Database('fees');
     $query = $db->query("SELECT co_name FROM feesNew");
     $this->pagination = new Pagination(array('uri_segment' => 'page', 'total_items' => $query->count(), 'items_per_page' => 28, 'style' => 'punbb'));
     $b = $this->pagination->items_per_page;
     $offset = ($pagenum - 1) * $b;
     $result = $db->query("SELECT co_name FROM feesNew ORDER BY co_name ASC LIMIT {$b} OFFSET {$offset}");
     $this->template->content->result = $result;
 }
Ejemplo n.º 4
0
 public function __construct()
 {
     parent::__construct();
     $menu = array(array('link' => 'home', 'text' => '<span>Home</span>', 'class' => ''), array('link' => 'rating', 'text' => '<span>Ratings</span>', 'class' => ''), array('link' => 'fees', 'text' => '<span>Filing Fees</span>', 'class' => ''), array('link' => 'liqfees', 'text' => '<span>Liquid Fees</span>', 'class' => ''), array('link' => 'liqajax', 'text' => '<span>Liquid Ajax</span>', 'class' => ''), array('link' => 'contact', 'text' => '<span>Contact</span>', 'class' => ''));
     css::add(array('media/css/screen.css', 'media/css/fancy-type/screen.css'));
     $tvalue = $this->uri->segment(1);
     if (empty($tvalue)) {
         $menu[0]['class'] = 'current';
     } else {
         for ($i = 0, $cnt = count($menu); $i < $cnt; $i++) {
             if ($menu[$i]['link'] == $tvalue) {
                 $menu[$i]['class'] = 'current';
             } else {
                 $menu[$i]['class'] = '';
             }
         }
     }
     $this->template->menu = $menu;
     $this->template->footer = '&#169; Public Regulation Commission';
 }
Ejemplo n.º 5
0
<?php

js::import($jsRoot . 'jplayer/dist/jplayer/jquery.jplayer.min.js');
css::import($jsRoot . 'jplayer/dist/skin/blue.monday/css/jplayer.blue.monday.min.css');
?>
 
<script type="text/javascript">
$(document).ready(function()
{
    $('embed').hide();
    $('embed').each(function(index)
    {
        src = $(this).attr('src');
        w = $(this).width();
        h = $(this).height();
        containerID = "media_container_" + index;
        id = "media_" + index;
        
        var reg = /\.flv$|\.flv\?|\.webm$|\.webm\?|\.wmv$|\.rtmp\?|\.rtmp$|\.mp3\?|\.mp3$|\.ogg\?|\.ogg$|\.mp4\?|\.mp4$|\.mp4\?/;
        mediaType = reg.exec(src);

        if(mediaType)
        {
            mediaType = mediaType.toString().replace('.', '');
            mediaType = mediaType.toString().replace('?', '');
            mediaTypeList = <?php 
echo json_encode($this->config->file->mediaTypes);
?>
;
            mediaType = eval("mediaTypeList." + mediaType.toLowerCase());
        }
Ejemplo n.º 6
0
<?php

/**
 * The view file of fullcalendar module of ZenTaoPMS.
 *
 * @copyright   Copyright 2009-2012 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
 * @license     business(商业软件) 
 * @author      Yangyang Shi <*****@*****.**>
 * @package     fullcalendar 
 * @version     $Id$
 * @link        http://www.zentao.net
 */
css::import($defaultTheme . 'jsgantt.css', $config->version);
js::import($jsRoot . 'jquery/gantt/jsgantt.js', $config->version);
<?php

if ($extView = $this->getExtViewFile(__FILE__)) {
    include $extView;
    return helper::cd();
}
css::import($defaultTheme . 'colorbox.css');
js::import($jsRoot . 'jquery/colorbox/min.js');
Ejemplo n.º 8
0
            if (isset($blockInfos['block_category'])) {
                $categBlock = $blockInfos['block_category'];
            } else {
                $categBlock = $module;
            }
            if (!isset($blocksCat[$categBlock])) {
                $blocksCat[$categBlock] = '';
            }
            if (isset($blockInfos['description'])) {
                $description = ucfirst(s($blockInfos['description']));
            }
            $blocksCat[$categBlock] .= '<div class="admin_core_block tooltip" data-title="' . trim(ucfirst(s($blockInfos['title']))) . '" data-tooltip="' . $description . '" draggable="true" id="' . str_replace('\\', '', $blockClassName) . '" data-block="' . $blockClassName . '" style="background:url(' . BASE_PATH . $module . '/blocks/' . $blockName . '/icon.png) center center no-repeat;"></div>';
        }
        /* List default stylables selecteurs */
        if (is_file('modules/' . $module . '/blocks/' . $blockName . '/default.css')) {
            $css = new css('modules/' . $module . '/blocks/' . $blockName . '/default.css');
            $CSSValues = $css->getCSSValues();
            if (!isset($stylableElements[$module . '_' . $blockName])) {
                $stylableElements[$module . '_' . $blockName] = array();
            }
            foreach ($CSSValues as $selecteur => $components) {
                preg_match('@\\{(.*)\\}@', $components['b'], $res);
                if (!empty($res)) {
                    $stylableElements[$module . '_' . $blockName][$res[1]] = $selecteur;
                }
            }
        }
    }
}
foreach ($blocksCat as $title => $blocks) {
    echo '<div class="titleTab ellipsis">' . t(ucfirst($title), FALSE) . '</div>';
Ejemplo n.º 9
0
 * @version     $Id$
 * @link        http://www.chanzhi.org
 */
include TPL_ROOT . 'common/header.html.php';
include TPL_ROOT . 'common/treeview.html.php';
/* set categoryPath for topNav highlight. */
js::set('path', $product->path);
js::set('productID', $product->id);
js::set('categoryID', $category->id);
js::set('categoryPath', explode(',', trim($category->path, ',')));
js::set('addToCartSuccess', $lang->product->addToCartSuccess);
js::set('gotoCart', $lang->product->gotoCart);
js::set('goback', $lang->product->goback);
js::set('stockOpened', $stockOpened);
js::set('stock', $product->amount);
css::internal($product->css);
js::execute($product->js);
?>
<div class="main-content">
<?php 
$common->printPositionBar($category, $product);
?>

  <div class="main-box">
    <!-- 左边分类列表开始 -->
    <div class="left">
      <?php 
foreach ($children as $sub1) {
    ?>
        <a href="<?php 
    echo $siteRoot . "product/c" . $sub1->id . ".html";
Ejemplo n.º 10
0
<?php

if ($extView = $this->getExtViewFile(__FILE__)) {
    include $extView;
    return helper::cd();
}
css::import($jsRoot . 'jquery/chosen/min.css');
js::import($jsRoot . 'jquery/chosen/min.js');
$clientLang = $this->app->getClientLang();
?>

<script language='javascript'> 
$(document).ready(function()
{
    $(".chosen").chosen({no_results_text: '<?php 
echo $lang->noResultsMatch;
?>
', placeholder_text:' ', disable_search_threshold: 10, width: '100%', search_contains: true});
    $('select.chosen-icons').chosenIcons({lang: '<?php 
echo $clientLang;
?>
'});
});
</script>
Ejemplo n.º 11
0
<?php

include TPL_ROOT . 'common/header.html.php';
include TPL_ROOT . 'common/treeview.html.php';
js::set('pageID', $page->id);
css::internal($page->css);
js::execute($page->js);
$common->printPositionBar($page);
?>
<div class='row blocks' data-region='page_view-topBanner'><?php 
$this->block->printRegion($layouts, 'page_view', 'topBanner', true);
?>
</div>
<div class='row'>
  <?php 
if (!empty($layouts['page_view'])) {
    ?>
  <div class='col-md-9 col-main'>
  <?php 
} else {
    ?>
  <div class='col-md-12'>
  <?php 
}
?>
    <div class='row blocks' data-region='page_view-top'><?php 
$this->block->printRegion($layouts, 'page_view', 'top', true);
?>
</div>
    <div class='article' id='page<?php 
echo $page->id;
Ejemplo n.º 12
0
<?php

/**
 * The treeview view of common module of RanZhi.
 *
 * @copyright   Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     ZPL (http://zpl.pub/page/zplv12.html)
 * @author      Chunsheng Wang <*****@*****.**>
 * @package     common 
 * @version     $Id: treeview.html.php 3138 2015-11-09 07:32:18Z chujilu $
 * @link        http://www.ranzhico.com
 */
css::import($jsRoot . 'jquery/treeview/min.css');
js::import($jsRoot . 'jquery/treeview/min.js');
?>
<script language='javascript'>$(function()
{
    $('.tree').each(function()
    {
        var $this = $(this);
        $this.treeview($.extend({collapsed: false, unique: false}, $this.data()));
    });
})</script>
Ejemplo n.º 13
0
    js::import($jsRoot . 'all.ie8.js');
}
?>
<![endif]-->
<!--[if lt IE 10]>
<?php 
if ($config->debug) {
    js::import($jsRoot . 'jquery/placeholder/min.js');
} else {
    js::import($jsRoot . 'all.ie9.js');
}
?>
<![endif]-->
<?php 
if (isset($this->config->site->basestyle)) {
    css::internal($this->config->site->basestyle);
}
if (isset($this->config->site->basejs)) {
    js::execute($this->config->site->basejs);
}
?>
</head>
<body>
<div class='page-container page-blog'>
  <header id='header' class='clearfix'>
    <div id='headNav'><div class='wrapper'><?php 
echo commonModel::printTopBar();
?>
</div></div>
    <div id='headTitle'>
      <div class="wrapper">
Ejemplo n.º 14
0
<?php

/**
 * The html template file of index method of index module of ZenTaoPMS.
 *
 * @copyright   Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     ZPL (http://zpl.pub/page/zplv11.html)
 * @author      Chunsheng Wang <*****@*****.**>
 * @package     ZenTaoPMS
 * @version     $Id: index.html.php 1947 2011-06-29 11:58:03Z wwccss $
 */
include '../../common/view/header.html.php';
include '../../common/view/sparkline.html.php';
css::import($defaultTheme . 'index.css', $config->version);
?>
<div class="row">
  <div class="col-md-8">
    <?php 
include './blockprojects.html.php';
?>
    <?php 
include './blockproducts.html.php';
?>
  </div>
  <div class="col-md-4">
    <?php 
if (common::hasPriv('company', 'dynamic')) {
    include './blockdynamic.html.php';
}
?>
  </div>
<?php

if ($extView = $this->getExtViewFile(__FILE__)) {
    include $extView;
    return helper::cd();
}
css::import($defaultTheme . 'datepicker.css');
js::import($jsRoot . 'jquery/datepicker/min.js');
js::import($jsRoot . 'jquery/datepicker/date.js');
?>
<script language='javascript'>
Date.firstDayOfWeek = 1;
Date.format = 'yyyy-mm-dd';
$.dpText = {
    TEXT_PREV_YEAR      :   '去年',
    TEXT_PREV_MONTH     :   '上个月',
    TEXT_NEXT_YEAR      :   '明年',
    TEXT_NEXT_MONTH     :   '下个月',
    TEXT_CLOSE          :   '关闭',
    TEXT_CHOOSE_DATE    :   '&nbsp;&nbsp;&nbsp;&nbsp;'
}
Date.dayNames       = ['日', '一', '二', '三', '四', '五', '六'];
Date.abbrDayNames   = ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
Date.monthNames     = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];
 
$(function() {
    startDate = new Date(1970, 1, 1);
    $(".date").datePicker({createButton:true, startDate:startDate})
    .dpSetPosition($.dpConst.POS_TOP, $.dpConst.POS_RIGHT)
});
</script>
 * @license     LGPL (http://www.gnu.org/licenses/lgpl.html)
 * @author      Chunsheng Wang <*****@*****.**>
 * @package     productplan
 * @version     $Id: view.html.php 3341 2012-07-14 07:26:53Z chencongzhi520@gmail.com $
 * @link        http://www.zentao.net
 */
include '../../common/view/header.html.php';
include '../../common/view/tablesorter.html.php';
?>

<?php 
if (!empty($planStories) && true == false) {
    $webRoot = PM_SITE;
    $defaultTheme = $webRoot . 'theme/default/';
    css::import($defaultTheme . 'gante_styles/css/screen.css', 2.3);
    css::import($defaultTheme . 'gante_styles/css/gantti.css', 2.3);
    require '../../m_gante/lib/gantti.php';
    date_default_timezone_set('UTC');
    setlocale(LC_ALL, 'en_US');
    $data = array();
    foreach ($planStories as $storyID => $story) {
        foreach ($story->tasklist as $tasklists) {
            foreach ($tasklists as $key => $value) {
                if ($value->type == 'test') {
                    $data[] = array('label' => $story->id . "[" . $users[$value->assignedTo] . "]" . $value->name, 'storyid' => $story->id, 'start' => $value->estStarted, 'end' => $value->deadline . " 24:00:00", 'class' => 'urgent');
                } else {
                    $data[] = array('label' => $story->id . "[" . $users[$value->assignedTo] . "]" . $value->name, 'storyid' => $story->id, 'start' => $value->estStarted, 'end' => $value->deadline . " 24:00:00");
                }
            }
        }
    }
Ejemplo n.º 17
0
<?php

if ($extView = $this->getExtViewFile(__FILE__)) {
    include $extView;
    return helper::cd();
}
include $this->app->getBasePath() . 'app/sys/common/view/header.html.php';
css::import($this->app->getClientTheme() . 'theme.oa.css');
<?php

if ($extView = $this->getExtViewFile(__FILE__)) {
    include $extView;
    return helper::cd();
}
css::import($defaultTheme . 'chosen.css');
js::import($jsRoot . 'jquery/chosen/chosen.min.js');
?>
<style>
#colorbox, #cboxOverlay, #cboxWrapper{z-index:9999;}
</style>
<script> 
noResultsMatch = '<?php 
echo $lang->noResultsMatch;
?>
';
$(document).ready(function()
{
    $("#productID").chosen({no_results_text: noResultsMatch});
    $("#projectID").chosen({no_results_text: noResultsMatch});
});
</script>
$clientTheme = $this->app->getClientTheme();
?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dli'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
  <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
  <?php 
$header = isset($header) ? (object) $header : new stdclass();
if (!isset($header->title)) {
    $header->title = $lang->ZenTaoPMS;
}
echo html::title($header->title . ' / ' . $lang->ZenTaoPMS);
js::exportConfigVars();
js::import($jsRoot . 'jquery/lib.js', $config->version);
js::import($jsRoot . 'my.min.js', $config->version);
js::import($jsRoot . 'highchars/exporting.js', $config->version);
js::import($jsRoot . 'highchars/highcharts.js', $config->version);
css::import($defaultTheme . 'yui.css', $config->version);
css::import($defaultTheme . 'style.css', $config->version);
css::import($langTheme, $config->version);
if (strpos($clientTheme, 'default') === false) {
    css::import($clientTheme . 'style.css', $config->version);
}
if (isset($pageCss)) {
    css::internal($pageCss);
}
echo html::icon($webRoot . 'favicon.ico');
?>
</head>
<body>
Ejemplo n.º 20
0
<?php

/**
 * The view of doc module of ZenTaoPMS.
 *
 * @copyright   Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     ZPL (http://zpl.pub/page/zplv11.html)
 * @author      Jia Fu <*****@*****.**>
 * @package     doc
 * @version     $Id: view.html.php 975 2010-07-29 03:30:25Z jajacn@126.com $
 * @link        http://www.zentao.net
 */
include '../../common/view/header.html.php';
echo css::internal($keTableCSS);
?>
<div id='titlebar'>
  <div class='heading'>
    <span class='prefix' title='DOC'><?php 
echo html::icon($lang->icons['doc']);
?>
 <strong><?php 
echo $doc->id;
?>
</strong></span>
    <strong><?php 
echo $doc->title;
?>
</strong>
    <?php 
if ($doc->deleted) {
    ?>
Ejemplo n.º 21
0
/**
 * The view file of blog view method of chanzhiEPS.
 *
 * @copyright   Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     ZPLV12 (http://zpl.pub/page/zplv12.html)
 * @author      Xiying Guan <*****@*****.**>
 * @package     blog
 * @version     $Id$
 * @link        http://www.chanzhi.org
 */
include TPL_ROOT . 'blog/header.html.php';
$path = !empty($category->pathNames) ? array_keys($category->pathNames) : array();
js::set('path', $path);
js::set('categoryID', $category->id);
js::set('articleID', $article->id);
css::internal($article->css);
js::execute($article->js);
include TPL_ROOT . 'common/treeview.html.php';
$root = '<li>' . $this->lang->currentPos . $this->lang->colon . html::a($this->inlink('index'), $lang->blog->home) . '</li>';
$common->printPositionBar($category, $article, '', $root);
?>
<div class='row blocks' data-region='blog_view-topBanner'><?php 
$this->block->printRegion($layouts, 'blog_view', 'topBanner', true);
?>
</div>
<div class='row'>
  <div class='col-md-9 col-main'>
    <div class='row blocks' data-region='blog_view-top'><?php 
$this->block->printRegion($layouts, 'blog_view', 'top', true);
?>
</div>
Ejemplo n.º 22
0
<?php

if ($extView = $this->getExtViewFile(__FILE__)) {
    include $extView;
    return helper::cd();
}
if ($config->debug) {
    css::import($defaultTheme . 'treeview.css');
    js::import($jsRoot . 'jquery/treeview/min.js');
}
?>
<script language='javascript'>$(function() { $("#tree").treeview({ persist: "cookie", collapsed: true, unique: true }) })</script>
Ejemplo n.º 23
0
<?php

/**
 * The create view file of repo module of ZenTaoPMS.
 *
 * @copyright   Copyright 2009-2012 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
 * @author      Wang Yidong, Zhu Jinyong 
 * @package     repo
 * @version     $Id: blame.html.php $
 */
include '../../common/view/header.lite.html.php';
js::import($jsRoot . 'misc/highlight/highlight.pack.js');
css::import($jsRoot . 'misc/highlight/styles/github.css');
?>
<div class="code panel">
  <div class='panel-heading'>
    <strong class='text-14px'><?php 
echo $entry;
?>
</strong>
    <?php 
$encodePath = $this->repo->encodePath($entry);
?>
    <div class='panel-actions'>
      <div class='btn-group'>
        <?php 
echo html::commonButton(zget($lang->repo->encodingList, $encoding, $lang->repo->encoding) . "<span class='caret'></span>", "id='encoding' data-toggle='dropdown'", 'btn dropdown-toggle');
?>
        <ul class='dropdown-menu' role='menu' aria-labelledby='encoding'>
          <?php 
foreach ($lang->repo->encodingList as $key => $val) {
Ejemplo n.º 24
0
Archivo: css.php Proyecto: richardw/Web
 function chooseFile($fname = null)
 {
     if (!self::$operatorString) {
         self::$operatorString = '(' . implode('|', array_map(array($this, 'preg_quote'), array_keys(self::$precedence))) . ')';
     }
     if ($fname) {
         if (!is_file($fname)) {
             throw new Exception('load error: failed to find ' . $fname);
         }
         $pi = pathinfo($fname);
         $this->fileName = $fname;
         $this->importDir = $pi['dirname'] . '/';
         $this->buffer = file_get_contents($fname);
     }
 }
Ejemplo n.º 25
0
    if (file_exists($customCssFile)) {
        css::import(sprintf($webRoot . 'data/css/%s/%s/style.css?' . $this->config->template->customVersion, $config->template->{$this->device}->name, $config->template->{$this->device}->theme));
    }
}
js::exportConfigVars();
if ($config->debug) {
    js::import($jsRoot . 'jquery/min.js');
    js::import($jsRoot . 'zui/min.js');
    js::import($jsRoot . 'chanzhi.js');
    js::import($jsRoot . 'jquery/treeview/min.js');
    js::import($jsRoot . 'my.js');
} else {
    js::import($jsRoot . 'all.js');
}
if (isset($pageCSS)) {
    css::internal($pageCSS);
}
echo isset($this->config->site->favicon) ? html::icon(json_decode($this->config->site->favicon)->webPath) : html::icon($webRoot . 'favicon.ico');
echo html::rss($this->createLink('rss', 'index', '', '', 'xml'), $config->site->name);
js::set('lang', $lang->js);
if (!empty($config->oauth->sina)) {
    $sina = json_decode($config->oauth->sina);
}
if (!empty($config->oauth->qq)) {
    $qq = json_decode($config->oauth->qq);
}
if (!empty($sina->verification)) {
    echo $sina->verification;
}
if (!empty($qq->verification)) {
    echo $qq->verification;
Ejemplo n.º 26
0
<?php

include '../../common/view/header.lite.html.php';
js::import($jsRoot . 'md5.js');
js::set('scriptName', $_SERVER['SCRIPT_NAME']);
js::set('random', $this->session->random);
css::internal('body{background-color:#f6f5f5}');
?>
 
<div class='container'>
  <div id='adminLogin'>
    <form method='post' id='ajaxForm'>
      <div id='logo' class='text-center'><?php 
echo html::image("{$themeRoot}/default/images/main/logo.login.png");
?>
</div>
      <div id='formError' class='alert alert-danger hiding'></div>
      <?php 
echo html::input('account', '', "class='form-control' placeholder='{$lang->user->inputAccountOrEmail}'");
?>
      <?php 
echo html::password('password', '', "class='form-control' placeholder='{$lang->user->inputPassword}'");
?>
      <?php 
echo html::hidden('referer', $referer);
?>
      <?php 
echo html::submitButton($lang->user->login->common, 'btn btn-primary btn-block');
?>
    </form>
  </div>
Ejemplo n.º 27
0
}
/* Export $jsRoot var. */
js::set('jsRoot', $jsRoot);
js::set('webRoot', $webRoot);
/* Get editor settings for current page. */
$editors = $config->{$module}->editor->{$method};
$editors['id'] = explode(',', $editors['id']);
js::set('editors', $editors);
$this->app->loadLang('file');
js::set('errorUnwritable', $lang->file->errorUnwritable);
/* Get current lang. */
$editorLangs = array('en' => 'en', 'zh-cn' => 'zh_CN', 'zh-tw' => 'zh_TW');
$editorLang = isset($editorLangs[$app->getClientLang()]) ? $editorLangs[$app->getClientLang()] : 'en';
js::set('editorLang', $editorLang);
/* Import css and js for kindeditor. */
css::import($jsRoot . 'kindeditor/themes/default/default.css');
js::import($jsRoot . 'kindeditor/kindeditor-min.js');
js::import($jsRoot . 'kindeditor/lang/' . $editorLang . '.js');
/* set uid for upload. */
$uid = uniqid('');
js::set('uid', $uid);
?>

<script>
var simple = 
[ 'formatblock', 'fontsize', '|', 'bold', 'italic','underline', '|', 
'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|',
'emoticons', 'image', 'media', 'link', '|', 'removeformat','undo', 'redo', 'source' ];

var full = 
[ 'formatblock', 'fontsize', 'lineheight', '|', 'forecolor', 'hilitecolor', '|', 'bold', 'italic','underline', 'strikethrough', '|',
Ejemplo n.º 28
0
<?php

if ($extView = $this->getExtViewFile(__FILE__)) {
    include $extView;
    return helper::cd();
}
$clientLang = $this->app->getClientLang();
if ($config->debug) {
    css::import($jsRoot . 'jquery/datetimepicker/min.css');
    js::import($jsRoot . 'jquery/datetimepicker/min.js');
}
?>
<script language='javascript'>
$(function()
{
    $.fn.fixedDate = function()
    {
        return $(this).each(function()
        {
            var $this = $(this);
            if($this.offset().top + 200 > $(document.body).height())
            {
                $this.attr('data-picker-position', 'top-right');
            }

            if($this.val() == '0000-00-00')
            {
                $this.focus(function(){if($this.val() == '0000-00-00') $this.val('').datetimepicker('update');}).blur(function(){if($this.val() == '') $this.val('0000-00-00')});
            }
        });
    };
Ejemplo n.º 29
0
 /**
  * Save CSS
  * @param string $filePath
  * @param string $selector
  * @return string 
  */
 protected function saveCSSAction($changes)
 {
     $changes = json_decode($changes, TRUE);
     if (!empty($changes)) {
         foreach ($changes as $file => $selectors) {
             /* If CSS file doesn't exists in profile/ dir, we create a copy from modules/ */
             if (!is_file(PROFILE_PATH . $file) && is_file('modules/' . $file)) {
                 \tools::file_put_contents(PROFILE_PATH . $file, file_get_contents('modules/' . $file));
             }
             $filePath = PROFILE_PATH . $file;
             $cssFile = new \css($filePath);
             if (!empty($selectors)) {
                 foreach ($selectors as $rule) {
                     $code = trim($rule['value']);
                     if (!empty($code)) {
                         if (!$cssFile->selectorExists($rule['selector'], $rule['media'])) {
                             $cssFile->addSelector($rule['selector'], $rule['media']);
                         }
                     }
                     $cssFile->replaceSelector($rule['selector'], $code, $rule['media']);
                 }
                 $cssFile->save();
             }
         }
     }
     $return = array('notification' => t('The style sheet has been saved'), 'notificationType' => 'positive');
     return $this->returnResult($return);
 }
Ejemplo n.º 30
0
<?php

if ($extView = $this->getExtViewFile(__FILE__)) {
    include $extView;
    return helper::cd();
}
$webRoot = $this->app->getWebRoot();
$jsRoot = $webRoot . "js/";
$defaultTheme = $webRoot . 'theme/default/';
if ($config->debug) {
    css::import($defaultTheme . 'alert.css');
    js::import($jsRoot . 'jquery/alert/min.js');
}