Attached Files |
js_css_compress_core.patch [^] (44,612 bytes) 2010-05-04 14:05
[Show Content]
Index: admin_templates/browser/browser_header.tpl
===================================================================
--- admin_templates/browser/browser_header.tpl (revision 13400)
+++ admin_templates/browser/browser_header.tpl (working copy)
@@ -15,12 +15,14 @@
<link rel="icon" href="img/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
-<link rel="stylesheet" rev="stylesheet" href="browser/browser.css" type="text/css" />
+<link rel="stylesheet" rev="stylesheet" href="<inp2:m_Compress files='browser/browser.css'/>" type="text/css" />
-<script type="text/javascript" src="js/is.js"></script>
-<script type="text/javascript" src="js/ajax.js"></script>
-<script type="text/javascript" src="js/application.js"></script>
-<script type="text/javascript" src="js/script.js"></script>
+<script type="text/javascript" src="<inp2:m_Compress files='
+ js/is.js|
+ js/ajax.js|
+ js/application.js|
+ js/script.js
+'/>"></script>
<script type="text/javascript">
var t = '<inp2:m_get param="t"/>';
Index: admin_templates/catalog/advanced_view.tpl
===================================================================
--- admin_templates/catalog/advanced_view.tpl (revision 13400)
+++ admin_templates/catalog/advanced_view.tpl (working copy)
@@ -11,10 +11,13 @@
<tr>
<td>
<input type="hidden" name="m_cat_id" value="<inp2:m_get name="m_cat_id"/>"/>
- <link rel="stylesheet" rev="stylesheet" href="incs/nlsmenu.css" type="text/css" />
- <script type="text/javascript" src="js/nlsmenu.js"></script>
- <script type="text/javascript" src="js/nlsmenueffect_1_2_1.js"></script>
- <script type="text/javascript" src="js/catalog.js"></script>
+ <link rel="stylesheet" rev="stylesheet" href="<inp2:m_Compress files='incs/nlsmenu.css'/>" type="text/css" />
+ <script type="text/javascript" src="<inp2:m_Compress files='
+ js/nlsmenu.js|
+ js/nlsmenueffect_1_2_1.js|
+ js/catalog.js
+ '/>"></script>
+
<script type="text/javascript">
<inp2:m_if check="adm_CheckPermCache">
$(document).ready(
Index: admin_templates/catalog/catalog.tpl
===================================================================
--- admin_templates/catalog/catalog.tpl (revision 13400)
+++ admin_templates/catalog/catalog.tpl (working copy)
@@ -12,11 +12,13 @@
<tr>
<td>
<input type="hidden" name="m_cat_id" value="<inp2:m_get name="m_cat_id"/>"/>
- <link rel="stylesheet" rev="stylesheet" href="incs/nlsmenu.css" type="text/css" />
- <script type="text/javascript" src="js/nlsmenu.js"></script>
- <script type="text/javascript" src="js/nlsmenueffect_1_2_1.js"></script>
+ <link rel="stylesheet" rev="stylesheet" href="<inp2:m_Compress files='incs/nlsmenu.css'/>" type="text/css" />
+ <script type="text/javascript" src="<inp2:m_Compress files='
+ js/nlsmenu.js|
+ js/nlsmenueffect_1_2_1.js|
+ js/catalog.js
+ '/>"></script>
- <script type="text/javascript" src="js/catalog.js"></script>
<script type="text/javascript">
<inp2:m_if check="adm_CheckPermCache">
$(document).ready(
Index: admin_templates/catalog/item_selector/item_selector_toolbar.tpl
===================================================================
--- admin_templates/catalog/item_selector/item_selector_toolbar.tpl (revision 13400)
+++ admin_templates/catalog/item_selector/item_selector_toolbar.tpl (working copy)
@@ -1,8 +1,10 @@
-<script type="text/javascript" src="js/ajax.js"></script>
-<link rel="stylesheet" rev="stylesheet" href="incs/nlsmenu.css" type="text/css" />
-<script type="text/javascript" src="js/nlsmenu.js"></script>
-<script type="text/javascript" src="js/nlsmenueffect_1_2_1.js"></script>
-<script type="text/javascript" src="js/catalog.js"></script>
+<link rel="stylesheet" rev="stylesheet" href="<inp2:m_Compress files='incs/nlsmenu.css'/>" type="text/css" />
+<script type="text/javascript" src="<inp2:m_Compress files='
+ js/nlsmenu.js|
+ js/nlsmenueffect_1_2_1.js|
+ js/catalog.js
+'/>"></script>
+
<script type="text/javascript">
var menuMgr = new NlsMenuManager("mgr");
menuMgr.timeout = 500;
Index: admin_templates/incs/grid_blocks.tpl
===================================================================
--- admin_templates/incs/grid_blocks.tpl (revision 13400)
+++ admin_templates/incs/grid_blocks.tpl (working copy)
@@ -635,9 +635,8 @@
<inp2:m_if check="m_ParamEquals" name="ajax" value="0">
<inp2:m_if check="m_GetEquals" name="fw_menu_included" value="">
- <link rel="stylesheet" rev="stylesheet" href="incs/nlsmenu.css" type="text/css" />
- <script type="text/javascript" src="js/nlsmenu.js"></script>
- <script type="text/javascript" src="js/nlsmenueffect_1_2_1.js"></script>
+ <link rel="stylesheet" rev="stylesheet" href="<inp2:m_Compress files='incs/nlsmenu.css'/>" type="text/css" />
+ <script type="text/javascript" src="<inp2:m_Compress files='js/nlsmenu.js|js/nlsmenueffect_1_2_1.js'/>"></script>
<script type="text/javascript">
var menuMgr = new NlsMenuManager("mgr");
@@ -841,12 +840,9 @@
<inp2:m_if check="m_ParamEquals" name="ajax" value="0">
<inp2:m_if check="m_GetEquals" name="fw_menu_included" value="">
- <script type="text/javascript" src="incs/fw_menu.js"></script>
+ <link rel="stylesheet" rev="stylesheet" href="<inp2:m_Compress files='incs/nlsmenu.css'/>" type="text/css" />
+ <script type="text/javascript" src="<inp2:m_Compress files='js/nlsmenu.js|js/nlsmenueffect_1_2_1.js'/>"></script>
- <link rel="stylesheet" rev="stylesheet" href="incs/nlsmenu.css" type="text/css" />
- <script type="text/javascript" src="js/nlsmenu.js"></script>
- <script type="text/javascript" src="js/nlsmenueffect_1_2_1.js"></script>
-
<script type="text/javascript">
var menuMgr = new NlsMenuManager("mgr");
menuMgr.timeout = 500;
Index: admin_templates/incs/header.tpl
===================================================================
--- admin_templates/incs/header.tpl (revision 13400)
+++ admin_templates/incs/header.tpl (working copy)
@@ -18,34 +18,38 @@
<link rel="icon" href="img/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
-<inp2:adm_AdminSkin/>
+<inp2:adm_AdminSkin file_only="1" result_to_var="skin_css"/>
-<link rel="stylesheet" href="js/jquery/thickbox/thickbox.css" type="text/css" media="screen" />
+<link rel="stylesheet" href="<inp2:m_Compress files='
+ js/jquery/thickbox/thickbox.css|
+ js/calendar/calendar-blue.css|
+ $skin_css
+'/>" type="text/css" media="screen" />
<script type="text/javascript" src="js/jquery/jquery.pack.js"></script>
<script type="text/javascript" src="js/jquery/jquery-ui.custom.min.js"></script>
-<script type="text/javascript" src="js/is.js"></script>
-<script type="text/javascript" src="js/ajax.js"></script>
-<script type="text/javascript" src="js/application.js"></script>
-<script type="text/javascript" src="js/script.js"></script>
-<script type="text/javascript" src="js/in-portal.js"></script>
-<script type="text/javascript" src="js/toolbar.js"></script>
-<script type="text/javascript" src="js/grid.js"></script>
-<script type="text/javascript" src="js/simple_grid.js"></script>
-<script type="text/javascript" src="js/grid_scroller.js"></script>
-<script type="text/javascript" src="js/forms.js"></script>
-<script type="text/javascript" src="js/drag.js"></script>
-<script type="text/javascript" src="js/ajax_dropdown.js"></script>
-<script type="text/javascript" src="js/form_controls.js"></script>
+<script type="text/javascript" src="<inp2:m_Compress files='
+ js/is.js|
+ js/ajax.js|
+ js/application.js|
+ js/script.js|
+ js/in-portal.js|
+ js/toolbar.js|
+ js/grid.js|
+ js/simple_grid.js|
+ js/grid_scroller.js|
+ js/forms.js|
+ js/drag.js|
+ js/ajax_dropdown.js|
+ js/form_controls.js|
+ js/jquery/thickbox/thickbox.js|
+ js/tab_scroller.js|
+ js/calendar/calendar.js|
+ js/calendar/calendar-setup.js|
+ js/calendar/calendar-en.js
+'/>"></script>
-<script type="text/javascript" src="js/jquery/thickbox/thickbox.js"></script>
-<script type="text/javascript" src="js/tab_scroller.js"></script>
-
-<link rel="stylesheet" rev="stylesheet" href="js/calendar/calendar-blue.css" type="text/css" />
-<script type="text/javascript" src="js/calendar/calendar.js"></script>
-<script type="text/javascript" src="js/calendar/calendar-setup.js"></script>
-<script type="text/javascript" src="js/calendar/calendar-en.js"></script>
<script type="text/javascript">
TB.pathToImage = 'js/jquery/thickbox/loadingAnimation.gif';
var t = '<inp2:m_get param="t"/>';
Index: admin_templates/reviews/reviews.tpl
===================================================================
--- admin_templates/reviews/reviews.tpl (revision 13400)
+++ admin_templates/reviews/reviews.tpl (working copy)
@@ -11,11 +11,13 @@
<tr>
<td>
<input type="hidden" name="m_cat_id" value="<inp2:m_get name="m_cat_id"/>"/>
- <link rel="stylesheet" rev="stylesheet" href="incs/nlsmenu.css" type="text/css" />
- <script type="text/javascript" src="js/nlsmenu.js"></script>
- <script type="text/javascript" src="js/nlsmenueffect_1_2_1.js"></script>
- <script type="text/javascript" src="js/ajax.js"></script>
- <script type="text/javascript" src="js/catalog.js"></script>
+ <link rel="stylesheet" rev="stylesheet" href="<inp2:m_Compress files='incs/nlsmenu.css'/>" type="text/css" />
+ <script type="text/javascript" src="<inp2:m_Compress files='
+ js/nlsmenu.js|
+ js/nlsmenueffect_1_2_1.js|
+ js/catalog.js'
+ />"></script>
+
<script type="text/javascript">
var menuMgr = new NlsMenuManager("mgr");
menuMgr.timeout = 500;
Index: admin_templates/sections_list.tpl
===================================================================
--- admin_templates/sections_list.tpl (revision 13400)
+++ admin_templates/sections_list.tpl (working copy)
@@ -1,6 +1,6 @@
<inp2:m_include t="incs/header"/>
-<link rel="stylesheet" rev="stylesheet" href="incs/sections_list.css" type="text/css" />
+<link rel="stylesheet" rev="stylesheet" href="<inp2:m_Compress files='incs/sections_list.css'/>" type="text/css" />
<inp2:m_DefineElement name="section_list_header" icon_module="">
<inp2:m_RenderElement name="combined_header" prefix="$SectionPrefix" section="$section_name" title_preset="tree_#section#" parent="0"/>
Index: admin_templates/users/user_edit_items.tpl
===================================================================
--- admin_templates/users/user_edit_items.tpl (revision 13400)
+++ admin_templates/users/user_edit_items.tpl (working copy)
@@ -9,13 +9,14 @@
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
- <td>
- <link rel="stylesheet" rev="stylesheet" href="incs/nlsmenu.css" type="text/css" />
- <script type="text/javascript" src="js/nlsmenu.js"></script>
- <script type="text/javascript" src="js/nlsmenueffect_1_2_1.js"></script>
+ <td>
+ <link rel="stylesheet" rev="stylesheet" href="<inp2:m_Compress files='incs/nlsmenu.css'/>" type="text/css" />
+ <script type="text/javascript" src="<inp2:m_Compress files='
+ js/nlsmenu.js|
+ js/nlsmenueffect_1_2_1.js|
+ js/catalog.js
+ '/>"></script>
- <script type="text/javascript" src="js/ajax.js"></script>
- <script type="text/javascript" src="js/catalog.js"></script>
<script type="text/javascript">
var menuMgr = new NlsMenuManager("mgr");
menuMgr.timeout = 500;
Index: kernel/nparser/nparser.php
===================================================================
--- kernel/nparser/nparser.php (revision 13400)
+++ kernel/nparser/nparser.php (working copy)
@@ -1102,4 +1102,26 @@
echo $ret;
}
+
+ /**
+ * Performs compression of given files or text
+ *
+ * @param mixed $data
+ * @param bool $raw_script
+ * @param string $file_extension
+ * @return string
+ */
+ function CompressScript($data, $raw_script = false, $file_extension = '')
+ {
+ $minify_helper =& $this->Application->recallObject('MinifyHelper');
+ /* @var $minify_helper MinifyHelper */
+
+ if ($raw_script) {
+ $minify_helper->compressString($data, $file_extension);
+
+ return $data;
+ }
+
+ return $minify_helper->CompressScriptTag($data);
+ }
}
\ No newline at end of file
Index: kernel/nparser/ntags.php
===================================================================
--- kernel/nparser/ntags.php (revision 13400)
+++ kernel/nparser/ntags.php (working copy)
@@ -617,4 +617,73 @@
return $o;
}
+}
+
+class _Tag_Compress extends _BlockTag {
+
+ function _Tag_Compress($tag)
+ {
+ parent::_BlockTag($tag);
+
+ if ($tag['is_closing']) {
+ if (!array_key_exists('files', $tag['NP'])) {
+ $this->_requiredParams = Array ('from');
+ }
+ else {
+ $this->_requiredParams = Array ('files');
+ }
+ }
+ else {
+ $this->_requiredParams = Array ('type'); // js/css
+ }
+ }
+
+ /**
+ * When used as non-block tag, then compress given files and return url to result
+ *
+ * @param Array $tag
+ * @return string
+ */
+ function Open($tag)
+ {
+ $o = parent::Open($tag);
+
+ if ($o === false) {
+ // some required params not passed
+ return $o;
+ }
+
+ if ($tag['is_closing']) {
+ $to_pass = $this->Parser->CompileParamsArray($tag['NP']);
+ $this->AppendCode($o, "echo \$_parser->CompressScript($to_pass, false);");
+ }
+ else {
+ $this->AppendCode($o, "ob_start();");
+ }
+
+ return $o;
+ }
+
+ /**
+ * When used as block tag, then compress contents between tags
+ *
+ * @param Array $tag
+ * @return string
+ */
+ function Close($tag)
+ {
+ if ($this->Tag['is_closing']) {
+ return parent::Close($tag);
+ }
+
+ $o = parent::Close($tag);
+
+ $code = Array ();
+ $code[] = '$res = ob_get_clean();';
+ $code[] = 'echo $_parser->CompressScript($res, true, \'' . $this->Tag['NP']['type'] . '\');';
+
+ $this->AppendCode($o, $code);
+
+ return $o;
+ }
}
\ No newline at end of file
Index: units/categories/categories_tag_processor.php
===================================================================
--- units/categories/categories_tag_processor.php (revision 13461)
+++ units/categories/categories_tag_processor.php (working copy)
@@ -1337,25 +1337,41 @@
}
$this->Application->SetVar('admin_scripts_included', 1);
-
$js_url = $this->Application->BaseURL() . 'core/admin_templates/js';
- $ret = '<link rel="stylesheet" href="' . $js_url . '/jquery/thickbox/thickbox.css" type="text/css" media="screen"/>' . "\n";
- $ret .= '<link rel="stylesheet" href="' . $js_url . '/../incs/cms.css" type="text/css" media="screen"/>' . "\n";
+ $minify_helper =& $this->Application->recallObject('MinifyHelper');
+ /* @var $minify_helper MinifyHelper */
+ $to_compress = Array (
+ $js_url . '/jquery/thickbox/thickbox.css',
+ $js_url . '/../incs/cms.css',
+ );
+
+ $css_compressed = $minify_helper->CompressScriptTag( Array ('files' => implode('|', $to_compress)) );
+
+ $ret = '<link rel="stylesheet" href="' . $css_compressed . '" type="text/css" media="screen"/>' . "\n";
+
if (EDITING_MODE == EDITING_MODE_DESIGN) {
$ret .= ' <style type="text/css" media="all">
div.movable-element .movable-header { cursor: move; }
</style>';
}
+
$ret .= '<script type="text/javascript" src="' . $js_url . '/jquery/jquery.pack.js"></script>' . "\n";
$ret .= '<script type="text/javascript" src="' . $js_url . '/jquery/jquery-ui.custom.min.js"></script>' . "\n";
- $ret .= '<script type="text/javascript" src="' . $js_url . '/is.js"></script>' . "\n";
- $ret .= '<script type="text/javascript" src="' . $js_url . '/application.js"></script>' . "\n";
- $ret .= '<script type="text/javascript" src="' . $js_url . '/script.js"></script>' . "\n";
- $ret .= '<script type="text/javascript" src="' . $js_url . '/jquery/thickbox/thickbox.js"></script>' . "\n";
- $ret .= '<script type="text/javascript" src="' . $js_url . '/template_manager.js"></script>' . "\n";
+
+ $to_compress = Array (
+ $js_url . '/is.js',
+ $js_url . '/application.js',
+ $js_url . '/script.js',
+ $js_url . '/jquery/thickbox/thickbox.js',
+ $js_url . '/template_manager.js',
+ );
+
+ $js_compressed = $minify_helper->CompressScriptTag( Array ('files' => implode('|', $to_compress)) );
+
+ $ret .= '<script type="text/javascript" src="' . $js_compressed . '"></script>' . "\n";
$ret .= '<script language="javascript">' . "\n";
$ret .= "TB.pathToImage = '" . $js_url . "/jquery/thickbox/loadingAnimation.gif';" . "\n";
Index: units/helpers/minifiers/css_minify_helper.php
===================================================================
--- units/helpers/minifiers/css_minify_helper.php (revision 0)
+++ units/helpers/minifiers/css_minify_helper.php (revision 0)
@@ -0,0 +1,218 @@
+<?php
+/**
+ * Class Minify_CSS_Compressor
+ * @package Minify
+ */
+
+/**
+ * Compress CSS
+ *
+ * This is a heavy regex-based removal of whitespace, unnecessary
+ * comments and tokens, and some CSS value minimization, where practical.
+ * Many steps have been taken to avoid breaking comment-based hacks,
+ * including the ie5/mac filter (and its inversion), but expect tricky
+ * hacks involving comment tokens in 'content' value strings to break
+ * minimization badly. A test suite is available.
+ *
+ * @package Minify
+ * @author Stephen Clay <steve@mrclay.org>
+ * @author http://code.google.com/u/1stvamp/ (Issue 64 patch)
+ */
+class CssMinifyHelper extends kHelper {
+
+ /**
+ * @var bool Are we "in" a hack?
+ *
+ * I.e. are some browsers targetted until the next comment?
+ */
+ var $_inHack = false;
+
+ /**
+ * Minify a CSS string
+ *
+ * @param string $css
+ *
+ * @return string
+ */
+ function minify($css)
+ {
+ $css = str_replace("\r\n", "\n", $css);
+
+ // preserve empty comment after '>'
+ // http://www.webdevout.net/css-hacks#in_css-selectors
+ $css = preg_replace('@>/\\*\\s*\\*/@', '>/*keep*/', $css);
+
+ // preserve empty comment between property and value
+ // http://css-discuss.incutio.com/?page=BoxModelHack
+ $css = preg_replace('@/\\*\\s*\\*/\\s*:@', '/*keep*/:', $css);
+ $css = preg_replace('@:\\s*/\\*\\s*\\*/@', ':/*keep*/', $css);
+
+ // apply callback to all valid comments (and strip out surrounding ws
+ $css = preg_replace_callback('@\\s*/\\*([\\s\\S]*?)\\*/\\s*@'
+ ,array($this, '_commentCB'), $css);
+
+ // remove ws around { } and last semicolon in declaration block
+ $css = preg_replace('/\\s*{\\s*/', '{', $css);
+ $css = preg_replace('/;?\\s*}\\s*/', '}', $css);
+
+ // remove ws surrounding semicolons
+ $css = preg_replace('/\\s*;\\s*/', ';', $css);
+
+ // remove ws around urls
+ $css = preg_replace('/
+ url\\( # url(
+ \\s*
+ ([^\\)]+?) # 1 = the URL (really just a bunch of non right parenthesis)
+ \\s*
+ \\) # )
+ /x', 'url($1)', $css);
+
+ // remove ws between rules and colons
+ $css = preg_replace('/
+ \\s*
+ ([{;]) # 1 = beginning of block or rule separator
+ \\s*
+ ([\\*_]?[\\w\\-]+) # 2 = property (and maybe IE filter)
+ \\s*
+ :
+ \\s*
+ (\\b|[#\'"]) # 3 = first character of a value
+ /x', '$1$2:$3', $css);
+
+ // remove ws in selectors
+ $css = preg_replace_callback('/
+ (?: # non-capture
+ \\s*
+ [^~>+,\\s]+ # selector part
+ \\s*
+ [,>+~] # combinators
+ )+
+ \\s*
+ [^~>+,\\s]+ # selector part
+ { # open declaration block
+ /x'
+ ,array($this, '_selectorsCB'), $css);
+
+ // minimize hex colors
+ $css = preg_replace('/([^=])#([a-f\\d])\\2([a-f\\d])\\3([a-f\\d])\\4([\\s;\\}])/i'
+ , '$1#$2$3$4$5', $css);
+
+ // remove spaces between font families
+ $css = preg_replace_callback('/font-family:([^;}]+)([;}])/'
+ ,array($this, '_fontFamilyCB'), $css);
+
+ $css = preg_replace('/@import\\s+url/', '@import url', $css);
+
+ // replace any ws involving newlines with a single newline
+ $css = preg_replace('/[ \\t]*\\n+\\s*/', "\n", $css);
+
+ // separate common descendent selectors w/ newlines (to limit line lengths)
+ $css = preg_replace('/([\\w#\\.\\*]+)\\s+([\\w#\\.\\*]+){/', "$1\n$2{", $css);
+
+ // Use newline after 1st numeric value (to limit line lengths).
+ $css = preg_replace('/
+ ((?:padding|margin|border|outline):\\d+(?:px|em)?) # 1 = prop : 1st numeric value
+ \\s+
+ /x'
+ ,"$1\n", $css);
+
+ // prevent triggering IE6 bug: http://www.crankygeek.com/ie6pebug/
+ $css = preg_replace('/:first-l(etter|ine)\\{/', ':first-l$1 {', $css);
+
+ return trim($css);
+ }
+
+ /**
+ * Replace what looks like a set of selectors
+ *
+ * @param array $m regex matches
+ *
+ * @return string
+ */
+ function _selectorsCB($m)
+ {
+ // remove ws around the combinators
+ return preg_replace('/\\s*([,>+~])\\s*/', '$1', $m[0]);
+ }
+
+ /**
+ * Process a comment and return a replacement
+ *
+ * @param array $m regex matches
+ *
+ * @return string
+ */
+ function _commentCB($m)
+ {
+ $hasSurroundingWs = (trim($m[0]) !== $m[1]);
+ $m = $m[1];
+ // $m is the comment content w/o the surrounding tokens,
+ // but the return value will replace the entire comment.
+ if ($m === 'keep') {
+ return '/**/';
+ }
+ if ($m === '" "') {
+ // component of http://tantek.com/CSS/Examples/midpass.html
+ return '/*" "*/';
+ }
+ if (preg_match('@";\\}\\s*\\}/\\*\\s+@', $m)) {
+ // component of http://tantek.com/CSS/Examples/midpass.html
+ return '/*";}}/* */';
+ }
+ if ($this->_inHack) {
+ // inversion: feeding only to one browser
+ if (preg_match('@
+ ^/ # comment started like /*/
+ \\s*
+ (\\S[\\s\\S]+?) # has at least some non-ws content
+ \\s*
+ /\\* # ends like /*/ or /**/
+ @x', $m, $n)) {
+ // end hack mode after this comment, but preserve the hack and comment content
+ $this->_inHack = false;
+ return "/*/{$n[1]}/**/";
+ }
+ }
+ if (substr($m, -1) === '\\') { // comment ends like \*/
+ // begin hack mode and preserve hack
+ $this->_inHack = true;
+ return '/*\\*/';
+ }
+ if ($m !== '' && $m[0] === '/') { // comment looks like /*/ foo */
+ // begin hack mode and preserve hack
+ $this->_inHack = true;
+ return '/*/*/';
+ }
+ if ($this->_inHack) {
+ // a regular comment ends hack mode but should be preserved
+ $this->_inHack = false;
+ return '/**/';
+ }
+ // Issue 107: if there's any surrounding whitespace, it may be important, so
+ // replace the comment with a single space
+ return $hasSurroundingWs // remove all other comments
+ ? ' '
+ : '';
+ }
+
+ /**
+ * Process a font-family listing and return a replacement
+ *
+ * @param array $m regex matches
+ *
+ * @return string
+ */
+ function _fontFamilyCB($m)
+ {
+ $m[1] = preg_replace('/
+ \\s*
+ (
+ "[^"]+" # 1 = family in double qutoes
+ |\'[^\']+\' # or 1 = family in single quotes
+ |[\\w\\-]+ # or 1 = unquoted family
+ )
+ \\s*
+ /x', '$1', $m[1]);
+ return 'font-family:' . $m[1] . $m[2];
+ }
+}
Index: units/helpers/minifiers/js_minify_helper.php
===================================================================
--- units/helpers/minifiers/js_minify_helper.php (revision 0)
+++ units/helpers/minifiers/js_minify_helper.php (revision 0)
@@ -0,0 +1,296 @@
+<?php
+/**
+ * jsmin.php - PHP implementation of Douglas Crockford's JSMin.
+ *
+ * This is a direct port of jsmin.c to PHP with a few PHP performance tweaks and
+ * modifications to preserve some comments (see below). Also, rather than using
+ * stdin/stdout, JSMin::minify() accepts a string as input and returns another
+ * string as output.
+ *
+ * Comments containing IE conditional compilation are preserved, as are multi-line
+ * comments that begin with "/*!" (for documentation purposes). In the latter case
+ * newlines are inserted around the comment to enhance readability.
+ *
+ * PHP 5 or higher is required.
+ *
+ * Permission is hereby granted to use this version of the library under the
+ * same terms as jsmin.c, which has the following license:
+ *
+ * --
+ * Copyright (c) 2002 Douglas Crockford (www.crockford.com)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
+ * this software and associated documentation files (the "Software"), to deal in
+ * the Software without restriction, including without limitation the rights to
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is furnished to do
+ * so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * The Software shall be used for Good, not Evil.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ * --
+ *
+ * @package JSMin
+ * @author Ryan Grove <ryan@wonko.com> (PHP port)
+ * @author Steve Clay <steve@mrclay.org> (modifications + cleanup)
+ * @author Andrea Giammarchi <http://www.3site.eu> (spaceBeforeRegExp)
+ * @copyright 2002 Douglas Crockford <douglas@crockford.com> (jsmin.c)
+ * @copyright 2008 Ryan Grove <ryan@wonko.com> (PHP port)
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @link http://code.google.com/p/jsmin-php/
+ */
+
+define('JSM_ORD_LF', 10);
+define('JSM_ORD_SPACE', 32);
+define('JSM_ACTION_KEEP_A', 1);
+define('JSM_ACTION_DELETE_A', 2);
+define('JSM_ACTION_DELETE_A_B', 3);
+
+class JsMinifyHelper extends kHelper {
+ /*const ORD_LF = 10;
+ const ORD_SPACE = 32;
+ const ACTION_KEEP_A = 1;
+ const ACTION_DELETE_A = 2;
+ const ACTION_DELETE_A_B = 3;*/
+
+ /* protected */ var $a = "\n";
+ /* protected */ var $b = '';
+ /* protected */ var $input = '';
+ /* protected */ var $inputIndex = 0;
+ /* protected */ var $inputLength = 0;
+ /* protected */ var $lookAhead = null;
+ /* protected */ var $output = '';
+
+ /**
+ * Perform minification, return result
+ */
+ /* public*/ function minify($input)
+ {
+ $this->input = str_replace("\r\n", "\n", $input);
+ $this->inputLength = strlen($this->input);
+
+ if ($this->output !== '') { // min already run
+ return $this->output;
+ }
+ $this->action(JSM_ACTION_DELETE_A_B/*self::ACTION_DELETE_A_B*/);
+
+ while ($this->a !== null) {
+ // determine next command
+ $command = JSM_ACTION_KEEP_A/*self::ACTION_KEEP_A*/; // default
+ if ($this->a === ' ') {
+ if (! $this->isAlphaNum($this->b)) {
+ $command = JSM_ACTION_DELETE_A/*self::ACTION_DELETE_A*/;
+ }
+ } elseif ($this->a === "\n") {
+ if ($this->b === ' ') {
+ $command = JSM_ACTION_DELETE_A_B/*self::ACTION_DELETE_A_B*/;
+ } elseif (false === strpos('{[(+-', $this->b)
+ && ! $this->isAlphaNum($this->b)) {
+ $command = JSM_ACTION_DELETE_A/*self::ACTION_DELETE_A*/;
+ }
+ } elseif (! $this->isAlphaNum($this->a)) {
+ if ($this->b === ' '
+ || ($this->b === "\n"
+ && (false === strpos('}])+-"\'', $this->a)))) {
+ $command = JSM_ACTION_DELETE_A_B/*self::ACTION_DELETE_A_B*/;
+ }
+ }
+ $this->action($command);
+ }
+ $this->output = trim($this->output);
+ return $this->output;
+ }
+
+ /**
+ * ACTION_KEEP_A = Output A. Copy B to A. Get the next B.
+ * ACTION_DELETE_A = Copy B to A. Get the next B.
+ * ACTION_DELETE_A_B = Get the next B.
+ */
+ /* protected */ function action($command)
+ {
+ switch ($command) {
+ case JSM_ACTION_KEEP_A/*self::ACTION_KEEP_A*/:
+ $this->output .= $this->a;
+ // fallthrough
+ case JSM_ACTION_DELETE_A/*self::ACTION_DELETE_A*/:
+ $this->a = $this->b;
+ if ($this->a === "'" || $this->a === '"') { // string literal
+ $str = $this->a; // in case needed for exception
+ while (true) {
+ $this->output .= $this->a;
+ $this->a = $this->get();
+ if ($this->a === $this->b) { // end quote
+ break;
+ }
+ if (ord($this->a) <= JSM_ORD_LF/*self::ORD_LF*/) {
+ trigger_error('Unterminated String: ' . var_export($str, true), E_USER_ERROR);
+ }
+ $str .= $this->a;
+ if ($this->a === '\\') {
+ $this->output .= $this->a;
+ $this->a = $this->get();
+ $str .= $this->a;
+ }
+ }
+ }
+ // fallthrough
+ case JSM_ACTION_DELETE_A_B/*self::ACTION_DELETE_A_B*/:
+ $this->b = $this->next();
+ if ($this->b === '/' && $this->isRegexpLiteral()) { // RegExp literal
+ $this->output .= $this->a . $this->b;
+ $pattern = '/'; // in case needed for exception
+ while (true) {
+ $this->a = $this->get();
+ $pattern .= $this->a;
+ if ($this->a === '/') { // end pattern
+ break; // while (true)
+ } elseif ($this->a === '\\') {
+ $this->output .= $this->a;
+ $this->a = $this->get();
+ $pattern .= $this->a;
+ } elseif (ord($this->a) <= JSM_ORD_LF/*self::ORD_LF*/) {
+ trigger_error('Unterminated RegExp: '. var_export($pattern, true), E_USER_ERROR);
+ }
+ $this->output .= $this->a;
+ }
+ $this->b = $this->next();
+ }
+ // end case ACTION_DELETE_A_B
+ }
+ }
+
+ /* protected */ function isRegexpLiteral()
+ {
+ if (false !== strpos("\n{;(,=:[!&|?", $this->a)) { // we aren't dividing
+ return true;
+ }
+ if (' ' === $this->a) {
+ $length = strlen($this->output);
+ if ($length < 2) { // weird edge case
+ return true;
+ }
+ // you can't divide a keyword
+ if (preg_match('/(?:case|else|in|return|typeof)$/', $this->output, $m)) {
+ if ($this->output === $m[0]) { // odd but could happen
+ return true;
+ }
+ // make sure it's a keyword, not end of an identifier
+ $charBeforeKeyword = substr($this->output, $length - strlen($m[0]) - 1, 1);
+ if (! $this->isAlphaNum($charBeforeKeyword)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Get next char. Convert ctrl char to space.
+ */
+ /* protected */ function get()
+ {
+ $c = $this->lookAhead;
+ $this->lookAhead = null;
+ if ($c === null) {
+ if ($this->inputIndex < $this->inputLength) {
+ $c = $this->input[$this->inputIndex];
+ $this->inputIndex += 1;
+ } else {
+ return null;
+ }
+ }
+ if ($c === "\r" || $c === "\n") {
+ return "\n";
+ }
+ if (ord($c) < JSM_ORD_SPACE/*self::ORD_SPACE*/) { // control char
+ return ' ';
+ }
+ return $c;
+ }
+
+ /**
+ * Get next char. If is ctrl character, translate to a space or newline.
+ */
+ /* protected */ function peek()
+ {
+ $this->lookAhead = $this->get();
+ return $this->lookAhead;
+ }
+
+ /**
+ * Is $c a letter, digit, underscore, dollar sign, escape, or non-ASCII?
+ */
+ /* protected */ function isAlphaNum($c)
+ {
+ return (preg_match('/^[0-9a-zA-Z_\\$\\\\]$/', $c) || ord($c) > 126);
+ }
+
+ /* protected */ function singleLineComment()
+ {
+ $comment = '';
+ while (true) {
+ $get = $this->get();
+ $comment .= $get;
+ if (ord($get) <= JSM_ORD_LF/*self::ORD_LF*/) { // EOL reached
+ // if IE conditional comment
+ if (preg_match('/^\\/@(?:cc_on|if|elif|else|end)\\b/', $comment)) {
+ return "/{$comment}";
+ }
+ return $get;
+ }
+ }
+ }
+
+ /* protected */ function multipleLineComment()
+ {
+ $this->get();
+ $comment = '';
+ while (true) {
+ $get = $this->get();
+ if ($get === '*') {
+ if ($this->peek() === '/') { // end of comment reached
+ $this->get();
+ // if comment preserved by YUI Compressor
+ if (0 === strpos($comment, '!')) {
+ return "\n/*" . substr($comment, 1) . "*/\n";
+ }
+ // if IE conditional comment
+ if (preg_match('/^@(?:cc_on|if|elif|else|end)\\b/', $comment)) {
+ return "/*{$comment}*/";
+ }
+ return ' ';
+ }
+ } elseif ($get === null) {
+ trigger_error('Unterminated Comment: ' . var_export('/*' . $comment, true), E_USER_ERROR);
+ }
+ $comment .= $get;
+ }
+ }
+
+ /**
+ * Get the next character, skipping over comments.
+ * Some comments may be preserved.
+ */
+ /* protected */ function next()
+ {
+ $get = $this->get();
+ if ($get !== '/') {
+ return $get;
+ }
+ switch ($this->peek()) {
+ case '/': return $this->singleLineComment();
+ case '*': return $this->multipleLineComment();
+ default: return $get;
+ }
+ }
+}
\ No newline at end of file
Index: units/helpers/minifiers/minifiers_config.php
===================================================================
--- units/helpers/minifiers/minifiers_config.php (revision 0)
+++ units/helpers/minifiers/minifiers_config.php (revision 0)
@@ -0,0 +1,26 @@
+<?php
+/**
+* @version $Id: controls_config.php 13086 2010-01-12 19:47:40Z alex $
+* @package In-Portal
+* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
+* @license GNU/GPL
+* In-Portal is Open Source software.
+* This means that this software may have been modified pursuant
+* the GNU General Public License, and as distributed it includes
+* or is derivative of works licensed under the GNU General Public License
+* or other free or open source software licenses.
+* See http://www.in-portal.org/license for copyright notices and details.
+*/
+
+defined('FULL_PATH') or die('restricted access!');
+
+ $config = Array (
+ 'Prefix' => 'minify-helpers',
+ 'EventHandlerClass' => Array ('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
+
+ 'RegisterClasses' => Array (
+ Array ('pseudo' => 'CssMinifyHelper', 'class' => 'CssMinifyHelper', 'file' => 'css_minify_helper.php', 'build_event' => '', 'require_classes' => 'kHelper'),
+ Array ('pseudo' => 'JsMinifyHelper', 'class' => 'JsMinifyHelper', 'file' => 'js_minify_helper.php', 'build_event' => '', 'require_classes' => Array ('kHelper')),
+ Array ('pseudo' => 'MinifyHelper', 'class' => 'MinifyHelper', 'file' => 'minify_helper.php', 'build_event' => '', 'require_classes' => Array ('kHelper')),
+ ),
+ );
\ No newline at end of file
Index: units/helpers/minifiers/minify_helper.php
===================================================================
--- units/helpers/minifiers/minify_helper.php (revision 0)
+++ units/helpers/minifiers/minify_helper.php (revision 0)
@@ -0,0 +1,231 @@
+<?php
+
+ class MinifyHelper extends kHelper {
+
+ /**
+ * Debug mode mark
+ *
+ * @var bool
+ */
+ var $debugMode = false;
+
+ /**
+ * Path to compress information file
+ *
+ * @var string
+ */
+ var $infoFile = '';
+
+ /**
+ * Compress information
+ *
+ * @var Array
+ */
+ var $compressInfo = Array ();
+
+ function MinifyHelper()
+ {
+ parent::kHelper();
+
+ $this->debugMode = $this->Application->isDebugMode();
+ $this->infoFile = WRITEABLE . '/cache/compress_info.txt';
+
+ if ( file_exists($this->infoFile) ) {
+ $this->compressInfo = unserialize( file_get_contents($this->infoFile) );
+ }
+ }
+
+ /**
+ * When used as non-block tag, then compress given files and return url to result
+ *
+ * @param Array $files
+ * @return string
+ */
+ function CompressScriptTag($params)
+ {
+ // put to queue
+ if (array_key_exists('to', $params)) {
+ $files = $this->Application->GetVar($params['to'], '');
+ $this->Application->SetVar($params['to'], $files . '|' . $params['files']);
+
+ return '';
+ }
+
+ if (array_key_exists('from', $params)) {
+ // get from queue
+ $files = $this->Application->GetVar($params['from']);
+ }
+ else {
+ // get from tag
+ $files = $params['files'];
+ }
+
+ $files = $this->_getTemplatePaths( array_map('trim', explode('|', $files)) );
+ $extension = pathinfo($files[0], PATHINFO_EXTENSION);
+
+ $hash = $this->_getHash($files);
+ $file_mask = 'cache/' . ($this->debugMode ? 'd' : 'c') . '_' . $hash . '_%s.' . $extension;
+
+ $was_compressed = array_key_exists($hash, $this->compressInfo);
+
+ if ($was_compressed) {
+ $current_file = WRITEABLE . '/' . sprintf($file_mask, $this->compressInfo[$hash]);
+
+ if (!file_exists($current_file)) {
+ // when info exists, but file doesn't -> re-compress
+ $was_compressed = false;
+ }
+
+ if ($this->debugMode) {
+ // check if any of listed files was changed since compressed file was created (only, when in debug mode)
+ foreach ($files as $file) {
+ if (filemtime($file) > $this->compressInfo[$hash]) {
+ $was_compressed = false;
+ break;
+ }
+ }
+ }
+ }
+
+ if (!$was_compressed) {
+ $string = '';
+ $path_length = strlen(FULL_PATH) + 1;
+
+ foreach ($files as $file) {
+ // add filename before for easier debugging
+ if ($this->debugMode) {
+ $string .= '/* === File: ' . substr($file, $path_length) . ' === */' . "\n";
+ $string .= '/* ' . str_repeat('=', strlen(substr($file, $path_length)) + 14) . ' */' . "\n\n";
+ }
+
+ // add file content
+ $string .= file_get_contents($file) . "\n\n";
+ }
+
+ // remove previous version of compressed file
+ if (isset($current_file)) {
+ if (file_exists($current_file)) {
+ unlink($current_file);
+ }
+ }
+
+ // replace templates base
+ $templates_base = $this->Application->ProcessParsedTag('m', 'TemplatesBase', Array ());
+ $string = str_replace('@templates_base@', rtrim($templates_base, '/'), $string);
+
+ // compress collected data
+ $this->compressInfo[$hash] = adodb_mktime();
+
+ if (!$this->debugMode) {
+ // don't compress merged js/css file in debug mode to allow js/css debugging
+ $this->compressString($string, $extension);
+ }
+
+ // save compressed file
+ $fp = fopen(WRITEABLE . '/' . sprintf($file_mask, $this->compressInfo[$hash]), 'w');
+ fwrite($fp, $string);
+ fclose($fp);
+
+ $this->_saveInfo();
+ }
+
+ // got compressed file -> use it
+ return $this->Application->BaseURL(WRITEBALE_BASE) . sprintf($file_mask, $this->compressInfo[$hash]);
+ }
+
+ /**
+ * Returns hash string based on given files
+ *
+ * @param Array $files
+ * @return int
+ */
+ function _getHash($files)
+ {
+ $hash = $files;
+
+ if ($this->Application->isAdmin) {
+ array_unshift($hash, 'A:1');
+ }
+ else {
+ array_unshift($hash, 'A:0;T:' . $this->Application->GetVar('m_theme'));
+ }
+
+ return crc32( implode('|', $hash) );
+ }
+
+ /**
+ * Saves file with compress information
+ *
+ */
+ function _saveInfo()
+ {
+ $fp = fopen($this->infoFile, 'w');
+ fwrite($fp, serialize($this->compressInfo));
+ fclose($fp);
+ }
+
+ /**
+ * Deletes compression info file
+ *
+ * @todo also delete all listed there files
+ */
+ function delete()
+ {
+ if (file_exists($this->infoFile)) {
+ unlink($this->infoFile);
+ }
+ }
+
+ /**
+ * Compress $string based on $extension
+ *
+ * @param string $string
+ * @param string $extension
+ */
+ function compressString(&$string, $extension)
+ {
+ if ($extension == 'js') {
+ $minifier =& $this->Application->makeClass('JsMinifyHelper');
+ /* @var $minifier JsMinifyHelper */
+
+ $string = $minifier->minify($string);
+ }
+ elseif ($extension == 'css') {
+ $minifier =& $this->Application->makeClass('CssMinifyHelper');
+ /* @var $minifier CssMinifyHelper */
+
+ $string = $minifier->minify($string);
+ }
+ }
+
+ /**
+ * Get full paths on disk for each of given templates
+ *
+ * @param Array $templates
+ * @return Array
+ */
+ function _getTemplatePaths($templates)
+ {
+ $ret = Array ();
+ $reg_exp = '/^' . preg_quote($this->Application->BaseURL(), '/') . '(.*)/';
+
+ foreach ($templates as $template) {
+ if (!$template) {
+ continue;
+ }
+
+ if (preg_match($reg_exp, $template, $regs)) {
+ // full url (from current domain) to a file
+ $path = FULL_PATH . '/' . $regs[1];
+ }
+ else {
+ list ($path, $module_filename) = $this->Application->TemplatesCache->GetTemplatePaths($template);
+ $path .= DIRECTORY_SEPARATOR . $module_filename;
+ }
+
+ $ret[] = $path;
+ }
+
+ return $ret;
+ }
+ }
\ No newline at end of file
Index: units/helpers/themes_helper.php
===================================================================
--- units/helpers/themes_helper.php (revision 13400)
+++ units/helpers/themes_helper.php (working copy)
@@ -390,6 +390,11 @@
$this->Application->incrementCacheSerial('theme');
$this->Application->incrementCacheSerial('theme-file');
+
+ $minify_helper =& $this->Application->recallObject('MinifyHelper');
+ /* @var $minify_helper MinifyHelper */
+
+ $minify_helper->delete();
}
/**
js_css_compress_modules.patch [^] (1,554 bytes) 2010-05-04 14:05
[Show Content]
Index: in-auction/admin_templates/inc/form_blocks_parent.tpl
===================================================================
--- in-auction/admin_templates/inc/form_blocks_parent.tpl (revision 13400)
+++ in-auction/admin_templates/inc/form_blocks_parent.tpl (working copy)
@@ -1,6 +1,5 @@
-<link rel="stylesheet" rev="stylesheet" href="incs/nlsmenu.css" type="text/css" />
-<script type="text/javascript" src="js/nlsmenu.js"></script>
-<script type="text/javascript" src="js/nlsmenueffect_1_2_1.js"></script>
+<link rel="stylesheet" rev="stylesheet" href="<inp2:m_Compress files='incs/nlsmenu.css'/>" type="text/css" />
+<script type="text/javascript" src="<inp2:m_Compress files='js/nlsmenu.js|js/nlsmenueffect_1_2_1.js'/>"></script>
<script type="text/javascript">
Index: in-commerce/admin_templates/orders/orders_print.tpl
===================================================================
--- in-commerce/admin_templates/orders/orders_print.tpl (revision 13400)
+++ in-commerce/admin_templates/orders/orders_print.tpl (working copy)
@@ -2,7 +2,7 @@
<inp2:m_include t="incs/header" nobody="yes"/>
<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF" onload="window.print();">
- <link rel="stylesheet" rev="stylesheet" href="<inp2:adm_ModulePath module='In-Commerce'/>incs/order_print.css" type="text/css" />
+ <link rel="stylesheet" rev="stylesheet" href="<inp2:m_Compress files='in-commerce/incs/order_print.css'/>" type="text/css" />
<script type="text/javascript">
$(document).ready(
js_css_compress_themes.patch [^] (41,426 bytes) 2010-05-04 14:06
[Show Content]
Index: advanced/in-bulletin/elements/html_head.elm.tpl
===================================================================
--- advanced/in-bulletin/elements/html_head.elm.tpl (revision 13400)
+++ advanced/in-bulletin/elements/html_head.elm.tpl (working copy)
@@ -1,6 +1,12 @@
-<link rel="stylesheet" rev="stylesheet" href="<inp2:m_TemplatesBase module="In-Bulletin"/>inc/styles.css" type="text/css" />
-<script type="text/javascript" src="<inp2:m_TemplatesBase module="In-Bulletin"/>inc/script.js"></script>
+<inp2:m_Compress files="in-bulletin/inc/styles.css" to="all_css"/>
+<inp2:m_Compress files="in-bulletin/inc/script.js" to="all_js"/>
<script type="text/javascript">
- var aPollManager = new PollManager('<inp2:m_Link template="in-bulletin/elements/side_boxes/poll_results.elm" events[#PREFIX#]="OnMakeVote" poll_id="#POLL_ID#" option_id="#OPTION_ID#" no_amp="1"/>');
+ var aPollManager = null;
+
+ $(document).ready(
+ function () {
+ aPollManager = new PollManager('<inp2:m_Link template="in-bulletin/elements/side_boxes/poll_results.elm" events[#PREFIX#]="OnMakeVote" poll_id="#POLL_ID#" option_id="#OPTION_ID#" no_amp="1"/>');
+ }
+ );
</script>
\ No newline at end of file
Index: advanced/in-bulletin/inc/styles.css
===================================================================
--- advanced/in-bulletin/inc/styles.css (revision 13400)
+++ advanced/in-bulletin/inc/styles.css (working copy)
@@ -106,15 +106,15 @@
/* --- Topic Button Styles --- */
.big-button-left-border {
- background: #EFEFEF url('../img/big_buttons/left_border.gif') repeat-y top left;
+ background: #EFEFEF url('@templates_base@/in-bulletin/img/big_buttons/left_border.gif') repeat-y top left;
}
.big-button-bottom td {
- background: #EFEFEF url('../img/big_buttons/bottom_border.gif') repeat-x top left;
+ background: #EFEFEF url('@templates_base@/in-bulletin/img/big_buttons/bottom_border.gif') repeat-x top left;
}
.big-button-text {
- background: #EFEFEF url('../img/big_buttons/top_border.gif') repeat-x top left;
+ background: #EFEFEF url('@templates_base@/in-bulletin/img/big_buttons/top_border.gif') repeat-x top left;
font: bold 11px Arial, sans-serif;
letter-spacing: 0px;
color: #1F569A;
@@ -127,11 +127,11 @@
/* --- Post Button Styles --- */
.small-button-bottom td {
- background: #efefef url('../img/small_buttons/bottom_border.gif') repeat-x top left
+ background: #efefef url('@templates_base@/in-bulletin/img/small_buttons/bottom_border.gif') repeat-x top left
}
.small-button-text {
- background: url('../img/small_buttons/top_border.gif') repeat-x top left;
+ background: url('@templates_base@/in-bulletin/img/small_buttons/top_border.gif') repeat-x top left;
font: 10px Arial, sans-serif;
color: #153C6A;
padding-top: 15px;
Index: advanced/in-commerce/elements/html_head.elm.tpl
===================================================================
--- advanced/in-commerce/elements/html_head.elm.tpl (revision 13400)
+++ advanced/in-commerce/elements/html_head.elm.tpl (working copy)
@@ -1,6 +1,6 @@
<!--## CSS & JAVASCRIPT FOR IN-COMMERCE ##-->
-<link rel="stylesheet" rev="stylesheet" href="<inp2:m_TemplatesBase module="In-Commerce"/>inc/styles.css" type="text/css" />
-<!--<script type="text/javascript" src="<inp2:m_TemplatesBase module="In-Commerce"/>inc/script.js"></script>-->
+<inp2:m_Compress files="in-commerce/inc/styles.css" to="all_css"/>
+<!--## <inp2:m_Compress files="in-commerce/inc/script.js" to="all_js"/> ##-->
<!--## /CSS & JAVASCRIPT FOR IN-COMMERCE ##-->
Index: advanced/in-link/elements/html_head.elm.tpl
===================================================================
--- advanced/in-link/elements/html_head.elm.tpl (revision 13400)
+++ advanced/in-link/elements/html_head.elm.tpl (working copy)
@@ -1,11 +1,11 @@
-<link rel="stylesheet" rev="stylesheet" href="<inp2:m_TemplatesBase module="In-Link"/>inc/styles.css" type="text/css" />
-<!--<script type="text/javascript" src="<inp2:m_TemplatesBase module="In-Link"/>inc/script.js"></script>-->
+<inp2:m_Compress files="in-link/inc/styles.css" to="all_css"/>
+<!--## <inp2:m_Compress files="in-link/inc/script.js" to="all_js"/> ##-->
<!--## GOOGLE MAPS API INTEGRATION ##-->
<inp2:m_if check="m_IsActive" t="in-link/detail">
<inp2:m_if check="m_GetConfig" name="l_EnableGoogleMaps">
-<script type="text/javascript" src="http://www.google.com/jsapi?key=<inp2:m_GetConfig name="l_GoogleMapsAPIKey"/>"></script>
-<script type="text/javascript" src="<inp2:m_TemplatesBase module="In-Link"/>inc/googlemaps.js"></script>
+ <script type="text/javascript" src="http://www.google.com/jsapi?key=<inp2:m_GetConfig name='l_GoogleMapsAPIKey'/>"></script>
+ <inp2:m_Compress files="in-link/inc/googlemaps.js" to="all_js"/>
</inp2:m_if>
</inp2:m_if>
<!--## GOOGLE MAPS API INTEGRATION ##-->
Index: advanced/in-news/elements/html_head.elm.tpl
===================================================================
--- advanced/in-news/elements/html_head.elm.tpl (revision 13400)
+++ advanced/in-news/elements/html_head.elm.tpl (working copy)
@@ -1,3 +1,3 @@
-<link rel="stylesheet" rev="stylesheet" href="<inp2:m_TemplatesBase module="In-News"/>inc/styles.css" type="text/css" />
-<!--<script type="text/javascript" src="<inp2:m_TemplatesBase module="In-News"/>inc/script.js"></script>-->
+<inp2:m_Compress files="in-news/inc/styles.css" to="all_css"/>
+<!--## <inp2:m_Compress files="in-news/inc/script.js" to="all_js"/> ##-->
Index: advanced/platform/designs/default_design.des.tpl
===================================================================
--- advanced/platform/designs/default_design.des.tpl (revision 13400)
+++ advanced/platform/designs/default_design.des.tpl (working copy)
@@ -15,6 +15,9 @@
<!--## Include module specific HEADER (META INFORMATION inside) template ##-->
<inp2:m_ModuleInclude template="elements/html_head.elm" in-portal_template="platform/elements/html_head.elm"/>
+ <link rel="stylesheet" rev="stylesheet" href="<inp2:m_Compress from='all_css'/>" type="text/css" />
+ <script type="text/javascript" src="<inp2:m_Compress from='all_js'/>"></script>
+
<inp2:st_EditingScripts/>
<!--## /Include module specific HEADER template ##-->
</head>
Index: advanced/platform/elements/html_head.elm.tpl
===================================================================
--- advanced/platform/elements/html_head.elm.tpl (revision 13400)
+++ advanced/platform/elements/html_head.elm.tpl (working copy)
@@ -1,39 +1,49 @@
<!--## Meta Info (Keywords and Description) ##-->
-<meta http-equiv="Content-Type" content="text/html; charset=<inp2:lang.current_Field name="Charset"/>" />
+<meta http-equiv="Content-Type" content="text/html; charset=<inp2:lang.current_Field name='Charset'/>" />
-<meta name="Description" content="<inp2:st_PageInfo type="meta_description"/>" />
-<meta name="Keywords" content="<inp2:st_PageInfo type="meta_keywords"/>" />
+<meta name="Description" content="<inp2:st_PageInfo type='meta_description'/>" />
+<meta name="Keywords" content="<inp2:st_PageInfo type='meta_keywords'/>" />
<!--## /Meta Keywords and Description ##-->
<inp2:theme.current_StylesheetFile/>
<inp2:m_ifnot check="m_GetConst" name="EDITING_MODE">
- <link rel="stylesheet" href="<inp2:m_TemplatesBase module='In-Portal'/>inc/jquery/thickbox/thickbox.css" type="text/css" media="screen" />
+ <inp2:m_Compress files="platform/inc/jquery/thickbox/thickbox.css" to="all_css"/>
</inp2:m_ifnot>
-<link rel="stylesheet" rev="stylesheet" href="<inp2:m_TemplatesBase module='In-Portal'/>inc/styles.css" type="text/css" />
+<inp2:m_Compress files="platform/inc/styles.css" to="all_css"/>
-<script type="text/javascript" src="<inp2:m_TemplatesBase module='In-Portal'/>inc/script.js"></script>
-<script type="text/javascript" src="<inp2:m_TemplatesBase module='In-Portal'/>inc/ajax.js"></script>
-<script type="text/javascript" src="<inp2:m_TemplatesBase module='In-Portal'/>inc/calendar.js"></script>
+<inp2:m_Compress files="platform/inc/script.js|platform/inc/ajax.js|platform/inc/calendar.js" to="all_js"/>
<script type="text/javascript">var inportalBase = '<inp2:m_TemplatesBase module="In-Portal"/>';</script>
<script type="text/javascript" src="<inp2:m_TemplatesBase module='In-Portal'/>inc/jquery/jquery.pack.js"></script>
<inp2:m_ifnot check="m_GetConst" name="EDITING_MODE">
- <script type="text/javascript" src="<inp2:m_TemplatesBase module='In-Portal'/>inc/jquery/thickbox/thickbox.js"></script>
+ <inp2:m_Compress files="platform/inc/jquery/thickbox/thickbox.js" to="all_js"/>
</inp2:m_ifnot>
<script type="text/javascript">
- var aRatingManager = new RatingManager('<inp2:m_Link template="index" events[#PREFIX#]="OnMakeVote" rating="#VOTE#" id="#ID#" no_amp="1" size="#SIZE#"/>');
+ var aRatingManager = null;
+ $(document).ready(
+ function () {
+ aRatingManager = new RatingManager('<inp2:m_Link template="index" events[#PREFIX#]="OnMakeVote" rating="#VOTE#" id="#ID#" no_amp="1" size="#SIZE#"/>');
+ }
+ );
+
<inp2:m_Cache key="prefix:lang;skip_var:t,page,per_page,sort_by">
<inp2:m_DefineElement name="ml_selector_language_element">
<inp2:Field name="LanguageId"/>: {'on': '<inp2:Field name="IconURL" js_ecape="1"/>', 'off': '<inp2:Field name="IconDisabledURL" js_ecape="1"/>'}
<inp2:m_ifnot check="m_Param" name="is_last">,</inp2:m_ifnot>
</inp2:m_DefineElement>
- var aMultiLanguageSelector = new MultiLanguageSelector({<inp2:lang.enabled_PrintList render_as="ml_selector_language_element" per_page="-1" no_editing="1" strip_nl="2"/>}, <inp2:m_Get name="m_lang"/>);
+ var aMultiLanguageSelector = null;
+
+ $(document).ready(
+ function () {
+ aMultiLanguageSelector = new MultiLanguageSelector({<inp2:lang.enabled_PrintList render_as="ml_selector_language_element" per_page="-1" no_editing="1" strip_nl="2"/>}, <inp2:m_Get name="m_lang"/>);
+ }
+ );
</inp2:m_Cache>
</script>
Index: advanced/platform/elements/menu.elm.tpl
===================================================================
--- advanced/platform/elements/menu.elm.tpl (revision 13400)
+++ advanced/platform/elements/menu.elm.tpl (working copy)
@@ -4,12 +4,14 @@
<table style="width: auto;">
<tr>
<td>
- <script type="text/javascript" src="<inp2:m_TemplatesBase module='In-Portal'/>inc/nlsmenu.js"></script>
- <script type="text/javascript" src="<inp2:m_TemplatesBase module='In-Portal'/>inc/nlsmenueffect.js"></script>
- <script type="text/javascript" src="<inp2:m_TemplatesBase module='In-Portal'/>inc/nlsmenuext_dyn.js"></script>
- <script type="text/javascript" src="<inp2:m_TemplatesBase module='In-Portal'/>inc/nlsmenuext_xml.js"></script>
+ <script type="text/javascript" src="<inp2:m_Compress files='
+ platform/inc/nlsmenu.js|
+ platform/inc/nlsmenueffect.js|
+ platform/inc/nlsmenuext_dyn.js|
+ platform/inc/nlsmenuext_xml.js
+ '/>"></script>
- <link rel="StyleSheet" href="<inp2:m_TemplatesBase module='In-Portal'/>inc/dmenu.css" type="text/css" />
+ <link rel="StyleSheet" href="<inp2:m_Compress files='platform/inc/dmenu.css'/>" type="text/css" />
<div id="xmlMenuDiv"></div>
<script type="text/javascript">
Index: advanced/platform/inc/dmenu.css
===================================================================
--- advanced/platform/inc/dmenu.css (revision 13400)
+++ advanced/platform/inc/dmenu.css (working copy)
@@ -22,7 +22,7 @@
.horz_nlsitemcontainerover {
height: 37px;
- background:url(../img/top_menu_select.gif);
+ background:url(@templates_base@/platform/img/top_menu_select.gif);
padding: 0px 13px;
}
.horz_nlsiconcellover {width:16px;}
@@ -92,7 +92,7 @@
.nlsitemcontainerover {
height:25px;
border: 1px solid #6291BB;
- background:url(../img/top_menu_select.gif);
+ background:url(@templates_base@/platform/img/top_menu_select.gif);
padding: 2px 10px 2px 10px;
}
.nlsiconcellover {width:22px;}
Index: advanced/platform/inc/styles.css
===================================================================
--- advanced/platform/inc/styles.css (revision 13400)
+++ advanced/platform/inc/styles.css (working copy)
@@ -31,11 +31,11 @@
}
.horizontal-separator {
- background: url('../img/horizontal_dashed_line.gif') bottom repeat-x;
+ background: url('@templates_base@/platform/img/horizontal_dashed_line.gif') bottom repeat-x;
}
.vertical-separator {
- background: url('../img/vertical_dashed_line.gif') top center repeat-y;
+ background: url('@templates_base@/platform/img/vertical_dashed_line.gif') top center repeat-y;
}
img, img A {
@@ -47,7 +47,7 @@
}
.top-background {
- background: url('../img/top_background.gif') right repeat-y;
+ background: url('@templates_base@/platform/img/top_background.gif') right repeat-y;
}
.top-baner-cell
@@ -57,7 +57,7 @@
}
.menu-background {
- background: url('../img/menu_background.gif') top repeat-x #1865AC;
+ background: url('@templates_base@/platform/img/menu_background.gif') top repeat-x #1865AC;
width: 100%;
}
@@ -66,7 +66,7 @@
}
.footer-table td {
- background: url('../img/footer_blue.gif') top repeat-x;
+ background: url('@templates_base@/platform/img/footer_blue.gif') top repeat-x;
height: 26px;
color: #F7EEE4;
font-size: 10px;
@@ -115,7 +115,7 @@
/* --- Side Box Styles --- */
.side-box-header {
- background: url('../img/side_boxes_background.gif') bottom repeat-x #83AFD6;
+ background: url('@templates_base@/platform/img/side_boxes_background.gif') bottom repeat-x #83AFD6;
height: 29px;
padding: 0px 8px 0px 20px;
}
@@ -137,7 +137,7 @@
}
.side-box-content {
- background: url('../img/side_boxes_content.gif') top repeat-x;
+ background: url('@templates_base@/platform/img/side_boxes_content.gif') top repeat-x;
padding: 20px 20px;
}
@@ -162,7 +162,7 @@
/* --- Form Control Styles --- */
.input-text, .input-textarea {
- background: url('../img/input_text_background.gif') top repeat-x #FFFFFF;
+ background: url('@templates_base@/platform/img/input_text_background.gif') top repeat-x #FFFFFF;
border: 1px solid #7091B9;
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
@@ -178,7 +178,7 @@
}
.button {
- background: url('../img/input_button_background.gif') bottom repeat-x #efefef;
+ background: url('@templates_base@/platform/img/input_button_background.gif') bottom repeat-x #efefef;
border: 1px solid #688BAC;
padding: 0px;
font-size: 11px;
@@ -186,7 +186,7 @@
}
.delete-button {
- background: url('../img/delete_button_background.gif') bottom repeat-x #FF6D6D;
+ background: url('@templates_base@/platform/img/delete_button_background.gif') bottom repeat-x #FF6D6D;
color: #FFFFFF;
border: 1px solid #CC0000;
padding: 0px;
@@ -247,7 +247,7 @@
/* --- Navigation Bar Styles --- */
.navigation-bar {
- background: url('../img/side_boxes_background.gif') bottom repeat-x #83AFD6;
+ background: url('@templates_base@/platform/img/side_boxes_background.gif') bottom repeat-x #83AFD6;
height: 29px;
padding: 0px 20px;
font-size: 12px;
@@ -264,7 +264,7 @@
/* --- Top Right Menu Styles --- */
.menu-top-active-icon, .menu-top-active-text {
- background: url('../img/top_menu_select.gif');
+ background: url('@templates_base@/platform/img/top_menu_select.gif');
}
td.top-menu-padding {
@@ -309,7 +309,7 @@
}
.tab-bottom-line {
- background: url('../img/pixel_blue.gif') bottom repeat-x;
+ background: url('@templates_base@/platform/img/pixel_blue.gif') bottom repeat-x;
}
.tab-bottom-content {
@@ -337,15 +337,15 @@
/* --- Item Listing Page & Item Details Page Styles --- */
.item-listing {
- background: url('../img/gradient_background.gif') top repeat-x #FFFFFF;
+ background: url('@templates_base@/platform/img/gradient_background.gif') top repeat-x #FFFFFF;
}
.item-listing-featured {
- background: url('../img/gradient_background_gr.gif') top repeat-x #FFFFFF;
+ background: url('@templates_base@/platform/img/gradient_background_gr.gif') top repeat-x #FFFFFF;
}
.item-listing-lead {
- background: url('../img/gradient_background_red.gif') top repeat-x #FFFFFF;
+ background: url('@templates_base@/platform/img/gradient_background_red.gif') top repeat-x #FFFFFF;
}
.item-padding {
@@ -537,7 +537,7 @@
.star-rating a:active,
.star-rating a:focus,
.star-rating .current-rating{
- background: url('../img/starrating.gif') left -1000px repeat-x;
+ background: url('@templates_base@/platform/img/starrating.gif') left -1000px repeat-x;
}
.star-rating {
position:relative;
Index: default/elements/html_head.elm.tpl
===================================================================
--- default/elements/html_head.elm.tpl (revision 13400)
+++ default/elements/html_head.elm.tpl (working copy)
@@ -8,11 +8,11 @@
<inp2:m_else/>
<meta name="Description" content="<inp2:m_GetConfig name='Category_MetaDesc'/>"/>
</inp2:m_if>
-<meta name="author" content="<inp2:m_GetConfig name='Site_Name'/>"/>
+<meta name="author" content="<inp2:m_GetConfig name='Site_Name'/>"/>
<meta http-equiv="content-type" content="text/html; charset=<inp2:lang.current_Field name='Charset'/>" />
<!-- CSS -->
-<link rel="stylesheet" type="text/css" href="<inp2:m_TemplatesBase />inc/screen.css" media="screen" charset="<inp2:lang.current_Field name='Charset'/>"/>
+<link rel="stylesheet" type="text/css" href="<inp2:m_Compress files='inc/reset.css|inc/styles.css'/>" media="screen" charset="<inp2:lang.current_Field name='Charset'/>"/>
<!-- JS FOR ADMIN -->
<inp2:st_EditingScripts/>
Index: default/inc/styles.css
===================================================================
--- default/inc/styles.css (revision 13400)
+++ default/inc/styles.css (working copy)
@@ -1,7 +1,7 @@
/* Basic Blocks
*******************************************************************************/
body {
- background: #fff url('../img/bg_header_new.jpg') no-repeat 50% 0;
+ background: #fff url('@templates_base@/img/bg_header_new.jpg') no-repeat 50% 0;
color: #000;
font: 0.75em/1.333em Sans-Serif,Arial,Tahoma,Verdana;
min-width: 800px;
@@ -20,7 +20,7 @@
/* Layout
*******************************************************************************/
#wrapper.inner {
- background: url('../img/bg_inner_lines.gif') repeat-x 0 100%;
+ background: url('@templates_base@/img/bg_inner_lines.gif') repeat-x 0 100%;
}
#wrapper .title_system {
color: #fff;
@@ -46,7 +46,7 @@
width: 480px;
}
#header h1.logo a {
- background: url('../img/logo_xyz.gif') no-repeat 0 0;
+ background: url('@templates_base@/img/logo_xyz.gif') no-repeat 0 0;
color: #CF0;
display: block;
font-family: sans-serif;
@@ -71,7 +71,7 @@
/*** Menu ***/
#menu {
- background: url('../img/menu/top_sup_menju.gif') repeat-x 0 100%;
+ background: url('@templates_base@/img/menu/top_sup_menju.gif') repeat-x 0 100%;
height: 76px;
}
#menu ul {
@@ -80,14 +80,14 @@
width: 770px;
}
#menu li {
- background: url('../img/menu/nav_rcorn.jpg') no-repeat 100% 0;
+ background: url('@templates_base@/img/menu/nav_rcorn.jpg') no-repeat 100% 0;
display: inline-block;
float: left;
padding: 0 26px 0 0;
_width: 1%;
}
#menu li a {
- background: url('../img/menu/arr_nav.gif') no-repeat 0 0;
+ background: url('@templates_base@/img/menu/arr_nav.gif') no-repeat 0 0;
color: #fff;
font-family: sans-serif;
font-size: 1.25em;
@@ -101,18 +101,18 @@
text-decoration: none;
}
#menu li .first {
- background: url('../img/menu/nav_1lcorn.jpg') no-repeat 0 0;
+ background: url('@templates_base@/img/menu/nav_1lcorn.jpg') no-repeat 0 0;
display: block;
height: 39px;
padding: 0 0 0 26px;
}
-#menu li.last { background: url('../img/menu/nav_last_rcorn.gif') no-repeat 100% 0; }
-#menu li.last.active { background: url('../img/menu/nav_last_rcorn_a.gif') no-repeat 100% 0; }
-#menu li.active { background: url('../img/menu/nav_1rcorn_a.jpg') no-repeat 100% 0; }
-#menu li.active .first { background: url('../img/menu/nav_1lcorn_a.jpg') no-repeat 0 0; }
-#menu li.beforeactive { background: url('../img/menu/nav_lcorn_a.jpg') no-repeat 100% 0; }
+#menu li.last { background: url('@templates_base@/img/menu/nav_last_rcorn.gif') no-repeat 100% 0; }
+#menu li.last.active { background: url('@templates_base@/img/menu/nav_last_rcorn_a.gif') no-repeat 100% 0; }
+#menu li.active { background: url('@templates_base@/img/menu/nav_1rcorn_a.jpg') no-repeat 100% 0; }
+#menu li.active .first { background: url('@templates_base@/img/menu/nav_1lcorn_a.jpg') no-repeat 0 0; }
+#menu li.beforeactive { background: url('@templates_base@/img/menu/nav_lcorn_a.jpg') no-repeat 100% 0; }
#menu li.active a {
- background: url('../img/menu/arr_nav_a.gif') no-repeat 0 0;
+ background: url('@templates_base@/img/menu/arr_nav_a.gif') no-repeat 0 0;
color: #000;
_background: none;
}
@@ -148,21 +148,21 @@
width: 270px;
}
#content .text { padding: 0 40px 130px 40px; }
-#content .text.about { background: url('../img/sections/about_pic.jpg') no-repeat 50% 100%; }
-#content .text.services { background: url('../img/sections/services_pic.jpg') no-repeat 50% 100%; }
-#content .text.products { background: url('../img/sections/products_pic.jpg') no-repeat 50% 100%; }
-#content .text.contacts { background: url('../img/sections/contacts_pic.jpg') no-repeat 50% 100%; }
+#content .text.about { background: url('@templates_base@/img/sections/about_pic.jpg') no-repeat 50% 100%; }
+#content .text.services { background: url('@templates_base@/img/sections/services_pic.jpg') no-repeat 50% 100%; }
+#content .text.products { background: url('@templates_base@/img/sections/products_pic.jpg') no-repeat 50% 100%; }
+#content .text.contacts { background: url('@templates_base@/img/sections/contacts_pic.jpg') no-repeat 50% 100%; }
/*** News ***/
.block-news h3 {
- background: #4F739F url('../img/bg_news_shade.gif') repeat-x 0 0;
+ background: #4F739F url('@templates_base@/img/bg_news_shade.gif') repeat-x 0 0;
padding: 13px 6px 0;
}
.block-news h3 img { margin-bottom: -3px; }
-.block-news dl { background: #DCE4F1 url('../img/bg_right_colmn.gif') repeat-y 0 0; }
+.block-news dl { background: #DCE4F1 url('@templates_base@/img/bg_right_colmn.gif') repeat-y 0 0; }
.block-news dl dt {
- background: url('../img/pix_news.gif') no-repeat 0 15px;
+ background: url('@templates_base@/img/pix_news.gif') no-repeat 0 15px;
color: #0066CC;
font-weight: bold;
margin: 0 0 0 6px;
@@ -174,15 +174,15 @@
margin: 0 0 0 6px;
padding: 0 10px 5px 34px;
}
-.block-promo { background: #fff url('../img/bg_promo.jpg') repeat-x 0 27px; }
+.block-promo { background: #fff url('@templates_base@/img/bg_promo.jpg') repeat-x 0 27px; }
.block-promo h3 {
- background: #DDF47F url('../img/bg_promo_shade.gif') repeat-x 0 0;
+ background: #DDF47F url('@templates_base@/img/bg_promo_shade.gif') repeat-x 0 0;
padding: 7px 6px 0;
}
.block-promo h3 img { margin-bottom: -4px; }
-.block-promo dl { background: url('../img/bg_promo_fade.jpg') no-repeat 0 0; }
+.block-promo dl { background: url('@templates_base@/img/bg_promo_fade.jpg') no-repeat 0 0; }
.block-promo dl dt {
- background: url('../img/pix_promo.gif') no-repeat 0 15px;
+ background: url('@templates_base@/img/pix_promo.gif') no-repeat 0 15px;
color: #006600;
font-weight: bold;
margin: 0 0 0 6px;
@@ -208,9 +208,9 @@
.contacts-block .contacts-form .note { color: #777; font-size: 0.917em; }
.contacts-block .contacts-form .red { color: red; }
-.contacts-block .contacts-form .bg-contacts { background: url('../img/bg-contacts.png') repeat-y 0 0; margin: 0 0 30px 0; }
-.contacts-block .contacts-form .bg-contacts-up { background: url('../img/bg-contacts-up.png') no-repeat 0 0; }
-.contacts-block .contacts-form .bg-contacts-down { background: url('../img/bg-contacts-down.png') no-repeat 0 100%; padding: 15px 10px; }
+.contacts-block .contacts-form .bg-contacts { background: url('@templates_base@/img/bg-contacts.png') repeat-y 0 0; margin: 0 0 30px 0; }
+.contacts-block .contacts-form .bg-contacts-up { background: url('@templates_base@/img/bg-contacts-up.png') no-repeat 0 0; }
+.contacts-block .contacts-form .bg-contacts-down { background: url('@templates_base@/img/bg-contacts-down.png') no-repeat 0 100%; padding: 15px 10px; }
.contacts-block .contacts-form .bg-contacts p { clear: both; float: left; width: 100%; }
.contacts-block .contacts-form .bg-contacts label { float: left; width: 120px; padding: 0 5px 0 0; }
.contacts-block .contacts-form .bg-contacts em { float: left; width: 215px; }
@@ -245,11 +245,11 @@
/* Footer
*******************************************************************************/
#footer {
- background: url('../img/bg_footer_left.jpg') repeat-x 0 0;
+ background: url('@templates_base@/img/bg_footer_left.jpg') repeat-x 0 0;
margin-top: 20px;
overflow: hidden;
}
-#footer .footer-bg { background: url('../img/bg_footer.jpg') no-repeat 0 0; }
+#footer .footer-bg { background: url('@templates_base@/img/bg_footer.jpg') no-repeat 0 0; }
#footer .footer-center {
font-size: 0.833em;
height: 54px;
Index: onlinestore/inc/lbox/lightbox.css
===================================================================
--- onlinestore/inc/lbox/lightbox.css (revision 13400)
+++ onlinestore/inc/lbox/lightbox.css (working copy)
@@ -44,13 +44,13 @@
#prevLink, #nextLink{
width: 49%;
height: 100%;
- background: transparent url(../../img/s.gif) no-repeat; /* Trick IE into showing hover */
+ background: transparent url(@templates_base@/img/s.gif) no-repeat; /* Trick IE into showing hover */
display: block;
}
#prevLink { left: 0; float: left;}
#nextLink { right: 0; float: right;}
-#prevLink:hover, #prevLink:visited:hover { background: url(../../img/lbox/prevlabel.gif) left 15% no-repeat; }
-#nextLink:hover, #nextLink:visited:hover { background: url(../../img/lbox/nextlabel.gif) right 15% no-repeat; }
+#prevLink:hover, #prevLink:visited:hover { background: url(@templates_base@/img/lbox/prevlabel.gif) left 15% no-repeat; }
+#nextLink:hover, #nextLink:visited:hover { background: url(@templates_base@/img/lbox/nextlabel.gif) right 15% no-repeat; }
#imageDataContainer{
@@ -59,15 +59,15 @@
margin: 0 auto;
line-height: 1.4em;
overflow: auto;
- width: 100%
+ width: 100%
}
#imageData{ padding:0 10px; color: #666; }
-#imageData #imageDetails{ width: 70%; float: left; text-align: left; }
+#imageData #imageDetails{ width: 70%; float: left; text-align: left; }
#imageData #caption{ font-weight: bold; }
-#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; }
-#imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.7em; }
-
+#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; }
+#imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.7em; }
+
#overlay{
position: absolute;
top: 0;
Index: onlinestore/platform/blocks/common/html_head.tpl
===================================================================
--- onlinestore/platform/blocks/common/html_head.tpl (revision 13400)
+++ onlinestore/platform/blocks/common/html_head.tpl (working copy)
@@ -9,15 +9,14 @@
<meta name="keywords" content="<inp2:c_Meta name="Keywords"/>" />
</inp2:m_if>
<inp2:m_base_ref />
-<script type="text/javascript" src="inc/prototype.js"></script>
+<script type="text/javascript" src="<inp2:m_Compress files='inc/prototype.js|inc/ajax.js'/>"></script>
<script type="text/javascript" src="inc/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="inc/lightbox.js"></script>
-<script type="text/javascript" src="inc/ajax.js"></script>
<script type="text/javascript">
var aRatingManager = new RatingManager('<inp2:m_Link template="index" events[#PREFIX#]="OnMakeVote" rating="#VOTE#" id="#ID#" no_amp="1" size="#SIZE#"/>');
</script>
-<link href="inc/style.css" rel="stylesheet" type="text/css" />
-<link rel="stylesheet" href="inc/lightbox.css" type="text/css" media="screen" />
+<link href="<inp2:m_Compress files='inc/style.css'/>" rel="stylesheet" type="text/css" />
+<link rel="stylesheet" href="<inp2:m_Compress files='inc/lightbox.css'/>" type="text/css" media="screen" />
<inp2:theme.current_StylesheetFile/>
\ No newline at end of file
Index: simple/elements/html_head.elm.tpl
===================================================================
--- simple/elements/html_head.elm.tpl (revision 13400)
+++ simple/elements/html_head.elm.tpl (working copy)
@@ -8,15 +8,21 @@
<inp2:m_else/>
<meta name="Description" content="<inp2:m_GetConfig name='Category_MetaDesc'/>"/>
</inp2:m_if>
-<meta name="author" content="<inp2:m_GetConfig name='Site_Name'/>"/>
+<meta name="author" content="<inp2:m_GetConfig name='Site_Name'/>"/>
<meta http-equiv="content-type" content="text/html; charset=<inp2:lang.current_Field name='Charset'/>" />
<!-- CSS -->
-<link rel="stylesheet" type="text/css" href="<inp2:m_TemplatesBase />inc/screen.css" media="screen" />
-<link rel="stylesheet" type="text/css" href="<inp2:m_TemplatesBase />inc/print.css" media="print" />
-<link rel="stylesheet" type="text/css" href="<inp2:m_TemplatesBase />inc/override.css" media="all" />
+<link rel="stylesheet" type="text/css" href="<inp2:m_Compress files='
+ inc/reset.css|
+ inc/typography.css|
+ inc/layout.css|
+ inc/content.css|
+ inc/screen.css|
+'/>" media="screen" />
+<link rel="stylesheet" type="text/css" href="<inp2:m_Compress files='inc/print.css'/>" media="print" />
+<link rel="stylesheet" type="text/css" href="<inp2:m_Compress files='inc/override.css'/>" media="all" />
<!--[if IE 6]>
-<link rel="stylesheet" type="text/css" href="<inp2:m_TemplatesBase module="In-Portal"/>inc/ie6.css" media="screen" />
+<link rel="stylesheet" type="text/css" href="<inp2:m_Compress files='inc/ie6.css'/>" media="screen" />
<![endif]-->
<!-- JS -->
@@ -27,4 +33,4 @@
</inp2:m_ifnot> <!--## EXCLUDE JS WHEN IN ADMIN ##-->
<script type="text/javascript" src="<inp2:m_TemplatesBase />inc/jquery/jcookie.js"></script>
-<script type="text/javascript" src="<inp2:m_TemplatesBase />inc/general.js"></script>
\ No newline at end of file
+<script type="text/javascript" src="<inp2:m_Compress files='inc/general.js'/>"></script>
\ No newline at end of file
Index: simple/inc/content.css
===================================================================
--- simple/inc/content.css (revision 13400)
+++ simple/inc/content.css (working copy)
@@ -1,6 +1,6 @@
/* -- RSS Feed Icon -- */
.link-rss a {
- background:url('../img/icon-rss.png') no-repeat left top;
+ background:url('@templates_base@/img/icon-rss.png') no-repeat left top;
display:block;
height:19px;
text-indent:-999em;
@@ -49,28 +49,28 @@
}
#side-box .round-top-red {
- background:url('../img/bg-side-box-top-red.png') no-repeat left top;
+ background:url('@templates_base@/img/bg-side-box-top-red.png') no-repeat left top;
height:16px;
margin:0 -17px;
}
#side-box .round-bottom,
#side-box-plain .round-bottom {
- background:url('../img/bg-side-box-bottom.png') no-repeat left bottom;
+ background:url('@templates_base@/img/bg-side-box-bottom.png') no-repeat left bottom;
height:16px;
margin:0 -17px;
}
#side-box .round-top,
#side-box-plain .round-top {
- background:url('../img/bg-side-box-top.png') no-repeat left top;
+ background:url('@templates_base@/img/bg-side-box-top.png') no-repeat left top;
height:16px;
margin:0 -17px;
}
/* -- !Side Box -- */
#side-box h3 {
- background:#960c03 url('../img/bg-side-box-top-red.png') no-repeat left top;
+ background:#960c03 url('@templates_base@/img/bg-side-box-top-red.png') no-repeat left top;
border:none;
color:#FFF;
font-size:1.16em;
@@ -80,7 +80,7 @@
}
#side-box label {
-background:url('../img/icon-email.png') no-repeat left center;
+background:url('@templates_base@/img/icon-email.png') no-repeat left center;
color:#9b9b9b;
font-size:12px;
display:block;
@@ -97,7 +97,7 @@
}
#side-box .submit input {
- background:url('../img/bg-form-email-submit.png') no-repeat left top;
+ background:url('@templates_base@/img/bg-form-email-submit.png') no-repeat left top;
border:none;
color:#666;
cursor:pointer;
@@ -110,7 +110,7 @@
}
#side-box .submit input:hover {
- background-image:url('../img/bg-form-email-submit-hover.png');
+ background-image:url('@templates_base@/img/bg-form-email-submit-hover.png');
color:#FFF;
}
@@ -167,20 +167,20 @@
}
#content-main .round-top {
- background:url('../img/bg-content-top.png') no-repeat left top;
+ background:url('@templates_base@/img/bg-content-top.png') no-repeat left top;
height:21px;
margin:0 -21px;
}
#content-main .round-bottom {
- background:url('../img/bg-content-bottom.png') no-repeat left bottom;
+ background:url('@templates_base@/img/bg-content-bottom.png') no-repeat left bottom;
height:21px;
margin:0 -21px;
}
/* -- !Latest -- */
#block-latest .feature {
-background:url('../img/bg-block-latest-featured.png') no-repeat 237px top;
+background:url('@templates_base@/img/bg-block-latest-featured.png') no-repeat 237px top;
color:#666;
margin:5px 0 0;
padding:10px 0 0 194px;
Index: simple/inc/layout.css
===================================================================
--- simple/inc/layout.css (revision 13400)
+++ simple/inc/layout.css (working copy)
@@ -6,7 +6,7 @@
body {
margin:0;
padding:28px 0 0;
- background: #f8f8f8 url('../img/bg-body.png') repeat-x left top;
+ background: #f8f8f8 url('@templates_base@/img/bg-body.png') repeat-x left top;
}
#wrapper {
@@ -84,7 +84,7 @@
}
h1#branding a {
-background:url('../img/logo.png') no-repeat left top;
+background:url('@templates_base@/img/logo.png') no-repeat left top;
display:block;
height:105px;
text-indent:-999em;
@@ -110,7 +110,7 @@
}
#nav-sec li {
- background:url('../img/bg-nav-sec-li.png') no-repeat left center;
+ background:url('@templates_base@/img/bg-nav-sec-li.png') no-repeat left center;
float:left;
margin:0 0 0 15px;
padding:0 0 0 16px;
@@ -155,7 +155,7 @@
/* -- !Navigation -- */
ul#nav {
-background:#282828 url('../img/bg-nav.png') repeat-x left top;
+background:#282828 url('@templates_base@/img/bg-nav.png') repeat-x left top;
border-top:1px solid #FFF;
font-size:12px;
margin:0;
@@ -167,7 +167,7 @@
}
#nav li a {
-background:url('../img/bg-nav.png') no-repeat left -35px;
+background:url('@templates_base@/img/bg-nav.png') no-repeat left -35px;
color:#FFF;
display:block;
font-weight:700;
@@ -178,7 +178,7 @@
}
#nav li:hover a,#nav li.hover a,#nav li a.active {
- background:url('../img/bg-nav.png') no-repeat left -70px;
+ background:url('@templates_base@/img/bg-nav.png') no-repeat left -70px;
}
#nav li a:hover {
@@ -187,16 +187,16 @@
/* Rounded Corner */
#nav li:first-child a,#nav li.first-child a {
-background:url('../img/bg-nav.png') no-repeat left -105px;
+background:url('@templates_base@/img/bg-nav.png') no-repeat left -105px;
}
#nav li:first-child:hover a,#nav li:first-child a.active,#nav li.first-child:hover a,#nav li.first-child-hover a,#nav li.first-child a.active {
-background:url('../img/bg-nav.png') no-repeat left -140px;
+background:url('@templates_base@/img/bg-nav.png') no-repeat left -140px;
}
/* Contact Us */
#nav li.last-child a {
-background:url('../img/bg-nav.png') no-repeat left -315px;
+background:url('@templates_base@/img/bg-nav.png') no-repeat left -315px;
}
/* Red Border on Hover */
@@ -256,7 +256,7 @@
/* -- !Search Form -- */
#masthead form {
- background:#282828 url('../img/bg-form-search.png') no-repeat right top;
+ background:#282828 url('@templates_base@/img/bg-form-search.png') no-repeat right top;
border-top:1px solid #FFF;
bottom:0;
position:absolute;
@@ -285,7 +285,7 @@
}
#masthead form .submit input {
- background:url('../img/bg-form-search-submit.png') no-repeat left top;
+ background:url('@templates_base@/img/bg-form-search-submit.png') no-repeat left top;
border:none;
color:#FFF;
cursor:pointer;
@@ -323,7 +323,7 @@
}
#content-tools a {
-background:url('../img/ir-content-tools.png') no-repeat 0 50%;
+background:url('@templates_base@/img/ir-content-tools.png') no-repeat 0 50%;
display:block;
float:left;
height:11px;
@@ -365,7 +365,7 @@
}
#site-info ul {
- background:url('../img/bg-nav.png') repeat-x 0 -350px;
+ background:url('@templates_base@/img/bg-nav.png') repeat-x 0 -350px;
}
#site-info ul li {
@@ -374,7 +374,7 @@
}
#site-info ul li a {
- background:url('../img/bg-nav.png') no-repeat left -35px;
+ background:url('@templates_base@/img/bg-nav.png') no-repeat left -35px;
color:#FFF;
display:block;
font-weight:700;
@@ -386,7 +386,7 @@
#site-info ul li a:hover,
#site-info ul li a.active {
- background:url('../img/bg-nav.png') no-repeat left -70px;
+ background:url('@templates_base@/img/bg-nav.png') no-repeat left -70px;
}
#site-info ul li a:hover {
@@ -396,14 +396,14 @@
/* Rounded Corner */
#site-info ul li:first-child a,
#site-info ul li.first-child a {
- background:url('../img/bg-nav.png') no-repeat left -175px;
+ background:url('@templates_base@/img/bg-nav.png') no-repeat left -175px;
}
#site-info ul li:first-child a:hover,
#site-info ul li:first-child a.active,
#site-info ul li.first-child a:hover,
#site-info ul li.first-child a.active {
- background:url('../img/bg-nav.png') no-repeat left -210px;
+ background:url('@templates_base@/img/bg-nav.png') no-repeat left -210px;
}
/* Back to top */
@@ -412,12 +412,12 @@
}
#site-info ul li.last-child a {
- background:url('../img/bg-nav.png') no-repeat right -245px;
+ background:url('@templates_base@/img/bg-nav.png') no-repeat right -245px;
}
#site-info ul li.last-child a:hover,
#site-info ul li.last-child a.active {
- background:url('../img/bg-nav.png') no-repeat right -280px;
+ background:url('@templates_base@/img/bg-nav.png') no-repeat right -280px;
}
/* Red Border on Hover */
@@ -447,13 +447,13 @@
}
#content-main.inner .round-top {
-background:url('../img/bg-content-inside-top.png') no-repeat left top;
+background:url('@templates_base@/img/bg-content-inside-top.png') no-repeat left top;
height:21px;
margin:0 -21px;
}
#content-main.inner .round-bottom {
-background:url('../img/bg-content-inside-bottom.png') no-repeat left bottom;
+background:url('@templates_base@/img/bg-content-inside-bottom.png') no-repeat left bottom;
height:21px;
margin:0 -21px;
}
@@ -461,11 +461,11 @@
/* !Sub Navigation
--------------------- */
#nav-sub {
-background:#46474b url('../img/bg-nav-sub-bottom.png') no-repeat left bottom;
+background:#46474b url('@templates_base@/img/bg-nav-sub-bottom.png') no-repeat left bottom;
}
#nav-sub ul {
-background:url('../img/bg-nav-sub-top.png') no-repeat left top;
+background:url('@templates_base@/img/bg-nav-sub-top.png') no-repeat left top;
list-style:none;
margin:0;
padding:15px 0;
@@ -478,7 +478,7 @@
}
#nav-sub li a {
-background:url('../img/bg-nav-sub-li.png') no-repeat 12px .65em;
+background:url('@templates_base@/img/bg-nav-sub-li.png') no-repeat 12px .65em;
border-bottom:1px solid #1c1d21;
color:#FFF;
display:block;
@@ -487,7 +487,7 @@
}
#nav-sub li.expanded a {
-background:#6a6b6d url('../img/bg-nav-sub-li-expanded.png') no-repeat 10px .65em;
+background:#6a6b6d url('@templates_base@/img/bg-nav-sub-li-expanded.png') no-repeat 10px .65em;
text-decoration:none;
}
Index: simple/inc/override.css
===================================================================
--- simple/inc/override.css (revision 13400)
+++ simple/inc/override.css (working copy)
@@ -1,4 +1,4 @@
-#block-latest .feature { height: auto !important; padding: 10px 0 0 0; background: url('../img/bg-block-latest-featured.png') repeat-x -2px top; }
+#block-latest .feature { height: auto !important; padding: 10px 0 0 0; background: url('@templates_base@/img/bg-block-latest-featured.png') repeat-x -2px top; }
#block-latest .feature div { padding-bottom: 4px; }
#block-latest .feature div div { padding-bottom: 0; }
#block-latest .feature-1 { padding: 0; background: none; }
Index: simple/inc/print.css
===================================================================
--- simple/inc/print.css (revision 13400)
+++ simple/inc/print.css (working copy)
@@ -1,4 +1,4 @@
- @import url(typography.css);
+@import url(typography.css);
#nav, #nav-sec, #nav-sub, #content-tools, #nav-accessibility, #masthead form, #site-info ul {
display: none;
Index: simple/inc/screen.css
===================================================================
--- simple/inc/screen.css (revision 13400)
+++ simple/inc/screen.css (working copy)
@@ -1,12 +1,3 @@
-@import 'reset.css'; /* Reset */
- @import url(typography.css);
- /* Typography */
- @import url(layout.css);
- /* Structure */
- @import url(content.css);
- /* Content */
-
-
/* !Hacks
--------------------- */
/* Add height to containers */
Index: simple/inc/typography.css
===================================================================
--- simple/inc/typography.css (revision 13400)
+++ simple/inc/typography.css (working copy)
@@ -96,7 +96,7 @@
}
#content li {
-background:url('../img/li.png') no-repeat 0 .31em;
+background:url('@templates_base@/img/li.png') no-repeat 0 .31em;
margin:6px 0;
padding:0 0 0 12px;
}
disabled_compression_during_debugging.patch [^] (449 bytes) 2010-05-12 04:38
[Show Content]
Index: minify_helper.php
===================================================================
--- minify_helper.php (revision 13557)
+++ minify_helper.php (working copy)
@@ -41,7 +41,7 @@
{
parent::kHelper();
- $this->debugMode = $this->Application->isDebugMode();
+ $this->debugMode = $this->Application->isDebugMode(false);
$this->infoFile = WRITEABLE . '/cache/compress_info.txt';
if ( file_exists($this->infoFile) ) {
infinite_compression_fix.patch [^] (744 bytes) 2010-05-15 07:36
[Show Content]
Index: units/helpers/minifiers/minify_helper.php
===================================================================
--- units/helpers/minifiers/minify_helper.php (revision 13560)
+++ units/helpers/minifiers/minify_helper.php (working copy)
@@ -77,8 +77,8 @@
$files = $this->_getTemplatePaths( array_map('trim', explode('|', $files)) );
$extension = pathinfo($files[0], PATHINFO_EXTENSION);
- $hash = $this->_getHash($files);
- $file_mask = 'cache/' . ($this->debugMode ? 'd' : 'c') . '_' . $hash . '_%s.' . $extension;
+ $hash = ($this->debugMode ? 'd' : 'c') . '_' . $this->_getHash($files);
+ $file_mask = 'cache/' . $hash . '_%s.' . $extension;
$was_compressed = array_key_exists($hash, $this->compressInfo);
still_using_old_compressed_code_after_upgrade.patch [^] (410 bytes) 2010-05-18 08:02
[Show Content]
Index: install.php
===================================================================
--- install.php (revision 13557)
+++ install.php (working copy)
@@ -920,6 +920,7 @@
case 'finish':
// delete cache
$this->toolkit->deleteCache();
+ $this->toolkit->rebuildThemes();
// set installation finished mark
if ($this->Application->ConfigValue('InstallFinished') === false) {
|