/** * Combine css files and script files before renderHead. * @param string the output to be inserted with scripts. */ public function renderHead(&$output) { if ($this->combineCssFiles) { $this->combineCssFiles(); } if ($this->combineScriptFiles && $this->enableJavaScript) { $this->combineScriptFiles(self::POS_HEAD); } $html = ''; foreach ($this->metaTags as $meta) { $html .= CHtml::metaTag($meta['content'], null, null, $meta) . "\n"; } foreach ($this->linkTags as $link) { $html .= CHtml::linkTag(null, null, null, null, $link) . "\n"; } foreach ($this->cssFiles as $url => $media) { $html .= CHtml::cssFile($url, $media) . "\n"; } foreach ($this->css as $css) { $html .= CHtml::css($css[0], $css[1]) . "\n"; } if ($this->enableJavaScript) { if (isset($this->scriptFiles[self::POS_HEAD])) { foreach ($this->scriptFiles[self::POS_HEAD] as $scriptFileValueUrl => $scriptFileValue) { if (is_array($scriptFileValue)) { $html .= CiiHtml::scriptFile($scriptFileValueUrl, $scriptFileValue) . "\n"; } else { $html .= CiiHtml::scriptFile($scriptFileValueUrl) . "\n"; } } } if (isset($this->scripts[self::POS_HEAD])) { $html .= $this->renderScriptBatch($this->scripts[self::POS_HEAD]); } } if ($html !== '') { $count = 0; $output = preg_replace('/(<title\\b[^>]*>|<\\/head\\s*>)/is', '<###head###>$1', $output, 1, $count); if ($count) { $output = str_replace('<###head###>', $html, $output); } else { $output = $html . $output; } } }
/** * Inserts the scripts in the head section. * @param string $output the output to be inserted with scripts. */ public function renderHead(&$output) { $html=''; foreach($this->metaTags as $meta) $html.=CHtml::metaTag($meta['content'],null,null,$meta)."\n"; foreach($this->linkTags as $link) $html.=CHtml::linkTag(null,null,null,null,$link)."\n"; foreach($this->cssFiles as $url=>$media) $html.=CHtml::cssFile($url,$media)."\n"; foreach($this->css as $css) $html.=CHtml::css($css[0],$css[1])."\n"; if($this->enableJavaScript) { if(isset($this->scriptFiles[self::POS_HEAD])) { foreach($this->scriptFiles[self::POS_HEAD] as $scriptFile) $html.=CHtml::scriptFile($scriptFile)."\n"; } if(isset($this->scripts[self::POS_HEAD])) $html.=CHtml::script(implode("\n",$this->scripts[self::POS_HEAD]))."\n"; } if($html!=='') { $count=0; $output=preg_replace('/(<title\b[^>]*>|<\\/head\s*>)/is','<###head###>$1',$output,1,$count); if($count) $output=str_replace('<###head###>',$html,$output); else $output=$html.$output; } }
echo CHtml::hiddenField('submit', 'true'); ?> <table class="detail-view"> <tr class="titlerow"> <td><?php echo Yii::t('admin', 'Setting'); ?> </td> <td></td> <td><?php echo Yii::t('admin', 'Default'); ?> </td> </tr> <?php echo CHtml::css('.adv { display: none; }'); $i = 0; $adv = false; foreach ($settings as $name => $setting) { if (@$setting['adv'] && !$adv) { ?> <tr class="<?php echo $i++ % 2 ? 'even' : 'odd'; ?> "style="height: 32px" > <td><?php echo Theme::img('icons/closed.png', '', array('id' => 'advImg', 'onclick' => 'return checkAdv()')); ?> </td> <td><?php echo CHtml::link(Yii::t('admin', 'Show Advanced Options'), '#', array('id' => 'advTxt', 'onclick' => 'return checkAdv()'));
/** * Inserts the scripts in the head section. * @param string $output the output to be inserted with scripts. * This method is Copyright (c) 2008-2014 by Yii Software LLC * http://www.yiiframework.com/license/ */ public function renderHead(&$output) { parent::renderHead($output); $html = ''; foreach ($this->metaTags as $meta) { $html .= CHtml::metaTag($meta['content'], null, null, $meta) . "\n"; } foreach ($this->linkTags as $link) { $html .= CHtml::linkTag(null, null, null, null, $link) . "\n"; } /* x2modstart */ if (Auxlib::getIEVer() < 10) { // group registered css files using import statements $mergedCss = ''; $mediaType = null; foreach ($this->cssFiles as $url => $media) { if ($mediaType === null) { $mediaType = $media; } $text = '@import url("' . $url . '");'; if ($media !== $mediaType) { $html .= CHtml::css($mergedCss, $mediaType) . "\n"; $mergedCss = ''; $mediaType = $media; } $mergedCss .= "\n" . $text; } if ($mergedCss) { $html .= CHtml::css($mergedCss, $mediaType) . "\n"; } } else { foreach ($this->cssFiles as $url => $media) { $html .= CHtml::cssFile($url, $media) . "\n"; } } if (Auxlib::getIEVer() < 10) { // merge inline css $mergedCss = ''; $mediaType = null; foreach ($this->css as $css) { $text = $css[0]; $media = $css[1]; if (is_array($text) && isset($text['text'])) { $text = $text['text']; } if ($mediaType === null) { $mediaType = $media; } if (preg_match('/@import/', $text)) { if ($mergedCss) { $html .= CHtml::css($mergedCss, $mediaType) . "\n"; } $mergedCss = ''; $mediaType = null; $html .= CHtml::css($text, $media) . "\n"; continue; } if ($media !== $mediaType) { $html .= CHtml::css($mergedCss, $mediaType) . "\n"; $mergedCss = ''; $mediaType = $media; } $mergedCss .= "\n" . $text; } if ($mergedCss) { $html .= CHtml::css($mergedCss, $mediaType) . "\n"; } } else { foreach ($this->css as $css) { $text = $css[0]; $media = $css[1]; if (is_array($text) && isset($text['text']) && isset($text['htmlOptions'])) { // special case for css registered with html options $html .= X2Html::css($text['text'], $media, $text['htmlOptions']); continue; } $html .= CHtml::css($text, $media) . "\n"; } } // prevent global css from being applied if this is an admin or guest request if (!Yii::app()->controller instanceof AdminController && !Yii::app()->user->isGuest) { $globalCssUrl = GlobalCSSFormModel::getGlobalCssUrl(); $html .= CHtml::cssFile($globalCssUrl . $this->getCacheBusterSuffix($globalCssUrl)) . "\n"; } /* x2modend */ if ($this->enableJavaScript) { if (isset($this->scriptFiles[self::POS_HEAD])) { foreach ($this->scriptFiles[self::POS_HEAD] as $scriptFileValueUrl => $scriptFileValue) { if (is_array($scriptFileValue)) { $html .= CHtml::scriptFile($scriptFileValueUrl, $scriptFileValue) . "\n"; } else { $html .= CHtml::scriptFile($scriptFileValueUrl) . "\n"; } } } if (isset($this->scripts[self::POS_HEAD])) { $html .= $this->renderScriptBatch($this->scripts[self::POS_HEAD]); } } if ($html !== '') { $count = 0; $output = preg_replace('/(<title\\b[^>]*>|<\\/head\\s*>)/is', '<###head###>$1', $output, 1, $count); if ($count) { $output = str_replace('<###head###>', $html, $output); } else { $output = $html . $output; } } }
<?php /** * * Copyright © 2010-2012 by xhost.ch GmbH * * All rights reserved. * **/ $this->pageTitle = Yii::app()->name . ' - ' . Yii::t('mc', 'Edit Config File'); $this->breadcrumbs = array(Yii::t('mc', 'Servers') => array('index'), $model->name => array('view', 'id' => $model->id), Yii::t('mc', 'Config Files') => array('configs', 'id' => $model->id), Yii::t('mc', 'Permissions Plugin')); $this->menu = array(array('label' => Yii::t('mc', 'Back'), 'url' => array('server/configs', 'id' => $model->id), 'icon' => 'back')); echo CHtml::css('table.detail-view .stdtable td { border: none }'); if ($error) { ?> <div class="flash-error"> <?php echo $error; ?> </div> <?php } $form = $this->beginWidget('CActiveForm', array('id' => 'cfgfile-form', 'enableAjaxValidation' => false)); function groupForm($role) { ob_start(); ?> <table class="stdtable"> <tr> <td>
?> </div> <?php } if (Yii::app()->user->hasFlash('plugin_unpack')) { ?> <div class="flash-success"> <?php echo Yii::app()->user->getFlash('plugin_unpack'); ?> </div> <?php } if (!$haveItems) { ?> <?php echo Yii::t('mc', 'There are no plugins available for the "JAR File" currently in use by the server.'); } else { ?> <?php $cols = array(array('name' => 'file', 'header' => Yii::t('mc', 'File'), 'value' => '$data["displayFile"]'), array('name' => 'desc', 'header' => Yii::t('mc', 'Description'), 'type' => 'html'), array('name' => 'status', 'header' => Yii::t('mc', 'Status'), 'headerHtmlOptions' => array('width' => '30'), 'htmlOptions' => array('style' => 'text-align: center'), 'type' => 'raw', 'value' => 'Theme::img("icons/plugin".$data["status"].".png", $data["status_alt"])'), array('header' => '', 'headerHtmlOptions' => array('width' => '120'), 'htmlOptions' => array('style' => 'text-align: center'), 'type' => 'raw', 'value' => '$data["action"]')); echo CHtml::css('.topalign td { vertical-align: top }'); $this->widget('zii.widgets.grid.CGridView', array('id' => 'configs-grid', 'filter' => $filter, 'ajaxUpdate' => false, 'rowCssClass' => array('even topalign', 'odd topalign'), 'dataProvider' => $dataProvider, 'columns' => $cols)); ?> <?php } ?>
public function init() { $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'media'; $url = Yii::app()->getAssetManager()->publish($path); $imgUrl = $url . '/print.gif'; echo CHtml::link("<img src=\"{$imgUrl}\" class=\"img_link\" title=\"" . Yii::t('lms', 'print') . "\">", "#", array_merge($this->htmlOptions, array('onclick' => 'return processPrint();'))); self::$count++; if (self::$count == 1) { $cs = Yii::app()->getClientScript(); $cs->registerCssFile($url . '/' . $this->cssFile); Yii::app()->clientScript->registerCoreScript('jquery'); echo CHtml::script("\n var firstTime = true;\n function processPrint()\n {\n if (firstTime) {\n \$('{$this->coverElement}').addClass('printWidgetScreenCover');\n \n title = '{$this->title}';\n if (title != '')\n \$('<h3 class=\\'printWidgetPrintedElement\\'>'+title+'</h3>').appendTo('body');\n \n arrayEl = \$('{$this->printedElement}').get();\n for (var i=0; i<arrayEl.length; i++) {\n clonedEl = \$(arrayEl[i]).clone();\n clonedEl.addClass('printWidgetPrintedElement');\n clonedEl.appendTo('body');\n }\n \n firstTime = false;\n }\n window.print();\n return false;\n }\n "); echo CHtml::css("\n .printWidgetScreenCover {display: none;}\n .printWidgetPrintedElement {display: block; padding-top:15px;margin-bottom: 0px;margin-top: 0px;margin-left: 20px;margin-right: 20px;}\n ", "print"); echo CHtml::css("\n .printWidgetPrintedElement {display: none;}\n ", "screen"); } }
echo $this->renderPartial('application.views.headerReport.headerDefault', array('judulLaporan' => $judulLaporan)); ?> <?php } ?> <?php echo CHtml::css(' label{ display:inline-block; float:left; width:200px; padding-right:10px; } .item{ display:inline-block; float:left; } .kanan{ text-align:right; } .kiri{ text-align:left; } '); ?> <table width="100%"> <tbody> <tr> <td width="50%" class='kanan'> <div class="mws-form-row">
* * Copyright © 2010-2012 by xhost.ch GmbH * * All rights reserved. * **/ $this->breadcrumbs = array(Yii::t('mc', 'Servers') => array('index'), $model->isNewRecord ? Yii::t('mc', 'New Server') : ($my ? 'Server' : CHtml::encode($model->name))); Yii::app()->getClientScript()->registerCoreScript('jquery'); echo CHtml::css(' .adv { display: none; } #advanced { display: none; } #files { display: none; } #buttons input { width: auto; margin-left: -1px; margin-right: 4px; padding: 2px; padding-left: 5px; padding-right: 5px; } '); if (!$model->isNewRecord) { $schedule = $manageUsers && (Yii::app()->user->isSuperuser() || $settings->user_schedule); $mysql = $editConfigs && @strlen($model->mysqlHost) && (Yii::app()->params['user_mysql'] && $settings->user_mysql || Yii::app()->user->isSuperuser()); $bgPlugins = Yii::app()->params['use_bukget']; $this->menu = array(array('label' => Yii::t('mc', 'Chat'), 'url' => array('chat', 'id' => $model->id), 'visible' => $chat, 'icon' => 'chat'), array('label' => $command ? Yii::t('mc', 'Console') : Yii::t('mc', 'Log'), 'url' => array('log', 'id' => $model->id), 'visible' => $viewLog, 'icon' => 'console'), array('label' => Yii::t('mc', 'Players'), 'url' => array('/player/index', 'sv' => $model->id), 'visible' => $manageUsers, 'icon' => 'player'), array('label' => Yii::t('mc', 'Files'), 'url' => 'javascript:showSub("files")', 'icon' => 'closed', 'linkOptions' => array('id' => 'files_main'), 'submenuOptions' => array('id' => 'files'), 'visible' => $editConfigs || $bgPlugins || $plugins || $manageUsers || $backup, 'items' => array(array('label' => Yii::t('mc', 'Config Files'), 'url' => array('configs', 'id' => $model->id), 'visible' => $editConfigs, 'icon' => 'config'), array('label' => Yii::t('mc', 'BukGet Plugins'), 'url' => array('bgPlugins', 'id' => $model->id), 'visible' => $bgPlugins ? true : false, 'icon' => 'plugin'), array('label' => Yii::t('mc', 'Local Plugins'), 'url' => array('plugins', 'id' => $model->id), 'visible' => $plugins, 'icon' => 'plugin'), array('label' => Yii::t('mc', 'FTP File Access'), 'url' => array(Yii::app()->params['ftp_client_disabled'] !== true ? '/ftpClient/index' : 'ftp', 'id' => $model->id), 'visible' => $manageUsers, 'icon' => 'file'), array('label' => Yii::t('mc', 'Backup'), 'url' => array('backup', 'id' => $model->id), 'visible' => $backup, 'icon' => 'backup'))), array('label' => Yii::t('mc', 'Advanced'), 'url' => 'javascript:showSub("advanced")', 'icon' => 'closed', 'linkOptions' => array('id' => 'advanced_main'), 'submenuOptions' => array('id' => 'advanced'), 'visible' => $manageUsers || $schedule || $mysql, 'items' => array(array('label' => Yii::t('mc', 'Commands'), 'url' => array('/command/index', 'sv' => $model->id), 'visible' => $manageUsers, 'icon' => 'command'), array('label' => Yii::t('mc', 'Scheduled Tasks'), 'url' => array('/schedule/index', 'sv' => $model->id), 'visible' => $schedule, 'icon' => 'schedule'), array('label' => Yii::t('mc', 'Users'), 'url' => array('users', 'id' => $model->id), 'visible' => $manageUsers, 'icon' => 'user'), array('label' => Yii::t('mc', 'MySQL Database'), 'url' => array('mysqlDb', 'id' => $model->id), 'visible' => $mysql, 'icon' => 'mysql'))), array('label' => Yii::t('mc', 'Delete Server'), 'url' => array('delete', 'id' => $model->id), 'visible' => $delete, 'icon' => 'delete')); } else { $this->menu = array(array('label' => Yii::t('mc', 'Back'), 'url' => array('index'), 'icon' => 'back')); }
<?php /** * * Copyright © 2010-2012 by xhost.ch GmbH * * All rights reserved. * **/ $this->pageTitle = Yii::app()->name . ' - ' . Yii::t('mc', 'Server List'); $this->breadcrumbs = array(Yii::t('mc', 'Servers')); echo CHtml::css(' #manage { display: none; } '); if (Yii::app()->user->isSuperuser()) { $this->menu = array(array('label' => Yii::t('mc', 'Create Server'), 'url' => array('create'), 'icon' => 'create'), array('label' => Yii::t('mc', 'Manage Server Data'), 'url' => 'javascript:showSub("manage")', 'icon' => 'closed', 'linkOptions' => array('id' => 'manage_main'), 'submenuOptions' => array('id' => 'manage'), 'items' => array(array('label' => Yii::t('mc', 'Manage Players'), 'url' => array('player/admin'), 'visible' => Yii::app()->user->isSuperuser(), 'icon' => 'player'), array('label' => Yii::t('mc', 'Manage Commands'), 'url' => array('command/admin'), 'visible' => Yii::app()->user->isSuperuser(), 'icon' => 'command'), array('label' => Yii::t('mc', 'Manage Tasks'), 'url' => array('schedule/admin'), 'visible' => Yii::app()->user->isSuperuser(), 'icon' => 'schedule'), array('label' => Yii::t('mc', 'Manage Servers'), 'url' => array('server/admin'), 'visible' => Yii::app()->user->isSuperuser(), 'icon' => 'server')))); } else { if (!$my) { $this->menu[] = array('label' => Yii::t('mc', 'My Servers'), 'url' => array('server/index', 'my' => true), 'visible' => !Yii::app()->user->isGuest, 'icon' => 'servers'); } else { $this->menu[] = array('label' => Yii::t('mc', 'All Servers'), 'url' => array('server/index'), 'visible' => !Yii::app()->user->isGuest, 'icon' => 'back'); } } echo CHtml::script(' imgOpen = "' . Theme::themeFile('images/icons/open.png') . '"; imgClosed = "' . Theme::themeFile('images/icons/closed.png') . '"; menuShown = {} function showSub(name) { menuShown[name] = !menuShown[name]; $("#"+name+"_main").children("img").attr("src", !menuShown[name] ? imgClosed : imgOpen);
/** * Inserts the scripts in the head section. * @param string $output the output to be inserted with scripts. */ public function renderHead(&$output) { $html = ''; foreach ($this->metaTags as $meta) { $html .= CHtml::metaTag($meta['content'], null, null, $meta) . "\n"; } foreach ($this->linkTags as $link) { $html .= CHtml::linkTag(null, null, null, null, $link) . "\n"; } foreach ($this->cssFiles as $url => $media) { $html .= CHtml::cssFile($url, $media) . "\n"; } foreach ($this->css as $css) { $html .= CHtml::css($css[0], $css[1]) . "\n"; } if ($this->enableJavaScript) { if (isset($this->scriptFiles[self::POS_HEAD])) { foreach ($this->scriptFiles[self::POS_HEAD] as $scriptFile) { $html .= '<script type="text/javascript" src="' . $scriptFile . '" charset="utf-8"></script>' . "\n"; } } if (isset($this->scripts[self::POS_HEAD])) { $html .= CHtml::script(implode("\n", $this->scripts[self::POS_HEAD])) . "\n"; } } if ($html !== '') { $count = 0; $output = preg_replace('/(<title\\b[^>]*>|<\\/head\\s*>)/is', '<###head###>$1', $output, 1, $count); if ($count) { $output = str_replace('<###head###>', $html, $output); } else { $output = $html . $output; } } }
* * Copyright © 2010-2012 by xhost.ch GmbH * * All rights reserved. * **/ $this->pageTitle = Yii::app()->name . ' - ' . Yii::t('mc', 'About'); $this->breadcrumbs = array(Yii::t('mc', 'About')); $this->menu = array(array('label' => Yii::t('mc', 'Back'), 'url' => array('', 'view' => 'home'), 'icon' => 'back')); echo CHtml::css(' .stdtable td { padding: 20px; background-color: white; text-align: center; border-top: 1px solid #dfdfdf; } .stdtable td.left { border-right: 1px solid #dfdfdf; } '); ?> <div style="margin-right: -8px; float: right"><?php echo Theme::img('about/swissmade.png'); ?> </div> <br/> <h2><?php echo Yii::t('mc', 'About Multicraft'); ?>
echo CHtml::css(' table.result { background:#f0f1f4 none repeat scroll 0% 0%; border-collapse:collapse; width:100%; } table.result th { background:#888; color: #fff; text-shadow: 0px 1px 0px #555555; text-align:left; font-weight: normal; } table.result th, table.result td { border-bottom: 1px solid #dedede; padding: 6px; } td.passed { background-color: #60BF60; border: 1px solid silver; padding: 2px; color: #fff; text-shadow: 0px 1px 0px #555; } td.warning { background-color: #FFFFBF; border: 1px solid silver; padding: 2px; color: #555; text-shadow: 0px 0px 0px; } td.failed { background-color: #FF8080; border: 1px solid silver; padding: 2px; color: #fff; text-shadow: 0px 1px 0px #555; } ');
/** * @desc some CSS... */ private function someCss() { echo CHtml::css(".hide-print {display: none;}", "print"); echo CHtml::css("#mprint {cursor: 'pointer';}", "screen"); }
/** * @dataProvider providerCss * * @param string $text * @param string $media * @param string $assertion */ public function testCss($text, $media, $assertion) { $this->assertEquals($assertion, CHtml::css($text, $media)); }
/** * Inserts the scripts in the head section. * @param string $output the output to be inserted with scripts. * This method is Copyright (c) 2008-2014 by Yii Software LLC * http://www.yiiframework.com/license/ */ public function renderHead(&$output) { parent::renderHead($output); $html = ''; foreach ($this->metaTags as $meta) { $html .= CHtml::metaTag($meta['content'], null, null, $meta) . "\n"; } foreach ($this->linkTags as $link) { $html .= CHtml::linkTag(null, null, null, null, $link) . "\n"; } foreach ($this->cssFiles as $url => $media) { $html .= CHtml::cssFile($url, $media) . "\n"; } /* x2modstart */ if (Auxlib::getIEVer() < 10) { // merge inline css $mergedCss = array(); $mediaType = null; foreach ($this->css as $css) { $text = $css[0]; if (is_array($text) && isset($text['text'])) { $text = $text['text']; } if (preg_match('/@import/', $text)) { $html .= CHtml::css($text, $css[1]) . "\n"; continue; } if ($mediaType === null) { $mediaType = $css[1]; } if ($css[1] === $mediaType) { if (!isset($mergedCss[$mediaType])) { $mergedCss[$mediaType] = ''; } $mergedCss[$mediaType] .= "\n" . $text; } } foreach ($mergedCss as $type => $css) { $html .= CHtml::css($css, $type) . "\n"; } } else { foreach ($this->css as $css) { $text = $css[0]; $media = $css[1]; if (is_array($text) && isset($text['text']) && isset($text['htmlOptions'])) { // special case for css registered with html options $html .= X2Html::css($text['text'], $media, $text['htmlOptions']); continue; } $html .= CHtml::css($text, $media) . "\n"; } } /* x2modend */ if ($this->enableJavaScript) { if (isset($this->scriptFiles[self::POS_HEAD])) { foreach ($this->scriptFiles[self::POS_HEAD] as $scriptFileValueUrl => $scriptFileValue) { if (is_array($scriptFileValue)) { $html .= CHtml::scriptFile($scriptFileValueUrl, $scriptFileValue) . "\n"; } else { $html .= CHtml::scriptFile($scriptFileValueUrl) . "\n"; } } } if (isset($this->scripts[self::POS_HEAD])) { $html .= $this->renderScriptBatch($this->scripts[self::POS_HEAD]); } } if ($html !== '') { $count = 0; $output = preg_replace('/(<title\\b[^>]*>|<\\/head\\s*>)/is', '<###head###>$1', $output, 1, $count); if ($count) { $output = str_replace('<###head###>', $html, $output); } else { $output = $html . $output; } } }
public function init() { $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'media'; $url = Yii::app()->getAssetManager()->publish($path); $imgUrl = $url . '/print.png'; echo CHtml::link("<i class='icon-white icon-print'></i> Imprimir", "#", array_merge($this->htmlOptions, array('onclick' => 'return processPrint();', 'class' => 'btn btn-info'))); self::$count++; if (self::$count == 1) { $cs = Yii::app()->getClientScript(); $cs->registerCssFile($url . '/' . $this->cssFile); Yii::app()->clientScript->registerCoreScript('jquery'); echo CHtml::script("\n var firstTime = true;\n function processPrint()\n {\n if (firstTime) {\n \$('{$this->coverElement}').addClass('printWidgetScreenCover');\n \n title = '{$this->title}';\n if (title != '')\n \$('<h3 class=\\'printWidgetPrintedElement\\'>'+title+'</h3>').appendTo('body');\n \n arrayEl = \$('{$this->printedElement}').get();\n for (var i=0; i<arrayEl.length; i++) {\n clonedEl = \$(arrayEl[i]).clone();\n \$(clonedEl).find('a').removeAttr('href');\n clonedEl.addClass('printWidgetPrintedElement');\n clonedEl.appendTo('body');\n }\n \n firstTime = false;\n }\n \$('{$this->coverElement}').addClass('printWidgetScreenCover');\n window.print();\n return false;\n }\n "); echo CHtml::css("\n .printWidgetScreenCover {display: none;}\n .printWidgetPrintedElement {display: block; margin: 0px;}\n ", "print"); echo CHtml::css("\n .printWidgetPrintedElement {display: none;}\n ", "screen"); } }
/** * @desc some CSS... */ private function someCss() { //hide those which should be ignored echo CHtml::css(".hide-print {display: none;}", "print"); //cursor type for the generated printer link echo CHtml::css("#mprint {cursor: 'pointer';}", "screen"); }
echo CHtml::css(' .semi { opacity: 0.5; filter: alpha(opacity=50); zoom: 1; } .stepbox { float:left; width: 90px; height: 90px; background-image: url(\'' . Theme::themeFile('images/installer/bg.png') . '\'); } .nextbox { float:left; padding-top: 32px; height: 30px; width: 24px; } img.step { margin-top: 13px; margin-left: 13px; } .centered { text-align: center; } ');
/** * * Copyright © 2010-2012 by xhost.ch GmbH * * All rights reserved. * **/ $this->pageTitle = Yii::app()->name . ' - ' . Yii::t('mc', 'View Task'); $this->breadcrumbs = array(Yii::t('mc', 'Servers') => array('server/index'), $sv ? @Server::model()->findByPk((int) $sv)->name : Yii::t('mc', 'All') => $sv ? array('server/view', 'id' => $sv) : array('/server'), Yii::t('mc', 'Scheduled Tasks') => $sv ? array('index', 'sv' => $sv) : array('admin'), $model->isNewRecord ? Yii::t('mc', 'New Task') : CHtml::encode($model->name)); if (!$model->isNewRecord) { $this->menu = array(array('label' => Yii::t('mc', 'Delete Task'), 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => Yii::t('mc', 'Are you sure you want to delete this task?'), 'csrf' => true), 'icon' => 'schedule_del')); } $this->menu[] = array('label' => Yii::t('mc', 'Back'), 'url' => $sv ? array('schedule/index', 'sv' => $sv) : array('schedule/admin'), 'icon' => 'back'); echo CHtml::css('#ival_do {width: auto;}'); echo CHtml::css('#ival_nr {min-width: 10px; display: none;}'); echo CHtml::css('#ival_type {min-width: 10px; display: none;}'); $form = $this->beginWidget('CActiveForm', array('id' => 'user-form', 'enableAjaxValidation' => false)); $attribs = array(); if (Yii::app()->user->isSuperuser()) { $attribs[] = array('label' => $form->labelEx($model, 'server_id'), 'type' => 'raw', 'value' => $form->textField($model, 'server_id') . ' ' . $form->error($model, 'server_id'), 'hint' => Yii::t('mc', 'The server ID, use 0 for "Global"')); $attribs[] = array('label' => $form->labelEx($model, 'hidden'), 'type' => 'raw', 'value' => $form->checkBox($model, 'hidden') . ' ' . $form->error($model, 'hidden'), 'hint' => Yii::t('mc', 'Only show this task to other superusers')); } $attribs[] = array('label' => $form->labelEx($model, 'name'), 'type' => 'raw', 'value' => $form->textField($model, 'name') . ' ' . $form->error($model, 'name')); if (!$model->isNewRecord) { $attribs[] = array('label' => $form->labelEx($model, 'last_run_ts'), 'value' => ($model->last_run_ts ? @date(Yii::t('mc', 'd. M Y, H:i'), $model->last_run_ts) : Yii::t('mc', 'Never')) . $form->error($model, 'last_run_ts')); $attribs[] = array('label' => $form->labelEx($model, 'status'), 'value' => Schedule::getStatusValues($model->status)); } $attribs[] = array('label' => $model->isNewRecord ? $form->labelEx($model, 'status') : Yii::t('mc', 'Change status to'), 'type' => 'raw', 'value' => $form->dropDownList($model, 'status', array(0 => Schedule::getStatusValues(0), 3 => Schedule::getStatusValues(3))) . ' ' . $form->error($model, 'status')); $attribs[] = array('label' => $form->labelEx($model, 'scheduled_ts'), 'type' => 'raw', 'value' => $this->widget('application.extensions.timepicker.EJuiDateTimePicker', array('value' => @date(Yii::t('mc', 'd. M Y H:i'), $model->scheduled_ts ? $model->scheduled_ts : time()), 'name' => 'scheduled_ts', 'options' => array('dateFormat' => Yii::t('mc', 'dd. M yy'))), true) . ' ' . $form->error($model, 'scheduled_ts')); $attribs[] = array('name' => 'interval', 'type' => 'raw', 'value' => CHtml::checkBox('ival_do', $model->interval > 0) . ' ' . CHtml::dropDownList('ival_nr', $ival_nr, range(1, 59)) . ' ' . CHtml::dropDownList('ival_type', $ival_type, array(Yii::t('mc', 'Minutes'), Yii::t('mc', 'Hours'), Yii::t('mc', 'Days')))); $fnd = array('server_id' => (int) $sv);