1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

jslib path update

e_css removal related JS fix (Prototype environment only)
This commit is contained in:
SecretR
2012-11-26 20:06:19 +02:00
parent c05a723b87
commit 5f227ef66c
3 changed files with 16 additions and 16 deletions

View File

@@ -398,11 +398,12 @@ e107::getJs()->renderJs('header', 5);
* TODO - remove it from here, should be registered to e_jsmanager
* or better - moved to core init.js(.php)
*/
e107::js('inline',"\$('e-js-css').remove();
//\$('e-js-css').remove();
e107::js('inline',"
document.observe('dom:loaded', function () {
e107Event.trigger('loaded', null, document);
});",'prototype',5);
});
",'prototype',5);
e107::getJs()->renderJs('header_inline', 5);

View File

@@ -389,7 +389,7 @@ e107::getJs()->renderJs('header_inline', 4);
// [JSManager] Load JS Includes - Zone 5 - End of header JS, just before e_meta content and e107:loaded trigger
e107::getJs()->renderJs('header', 5);
e107::getJs()->renderJs('header_inline', 5);
//
// F: Send Meta Tags, Icon links
@@ -510,17 +510,16 @@ if (count($js_body_onload)) $body_onload = " onload=\"".implode(" ",$js_body_onl
* Fire Event e107:loaded
* core JS available only in Prototype front-end environment
*/
// e_css.php is removed
//\$('e-js-css').remove();
echo "<script type='text/javascript'>\n";
echo "<!--\n";
echo "if(typeof e107 != 'undefined') {\n";
echo "\$('e-js-css').remove();\n"; // unobtrusive JS - moved here from external e_css.php
echo "document.observe('dom:loaded', function() {\n";
echo "e107Event.trigger('loaded', {element: null}, document);\n";
echo "});\n";
echo "}\n";
echo "// -->\n";
echo "</script>\n";
e107::js('inline',"
document.observe('dom:loaded', function () {
e107Event.trigger('loaded', null, document);
});
",'prototype',5);
e107::getJs()->renderJs('header_inline', 5);
echo "</head>
<body".$body_onload.">\n";

View File

@@ -57,7 +57,7 @@ e_jslib_cache_out();
$_E107['minimal'] = true;
//call jslib handler, render content
require_once ("../class2.php");
require_once ("../../class2.php");
//require_once (e_HANDLER.'jslib_handler.php');
//$jslib = new e_jslib();
$jslib = e107::getObject('e_jslib', null, e_HANDLER.'jslib_handler.php');
@@ -224,7 +224,7 @@ function e_jslib_cache_path()
if(null === $eJslibCacheDir)
{
include('../e107_config.php');
include('../../e107_config.php');
if($CACHE_DIRECTORY)
{