Changeset 951
- Timestamp:
- 01/27/08 17:13:50 (4 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 modified
-
Xinha.css (modified) (1 diff)
-
XinhaCore.js (modified) (5 diffs)
-
contrib/compress.php (modified) (5 diffs)
-
contrib/compress_yui.php (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Xinha.css
r944 r951 71 71 .htmlarea .toolbar select:hover, 72 72 .htmlarea .toolbar select:active { 73 /* These settings don't work with Firefox 3 Linux 74 margin-top: 2px; 75 margin-bottom: 1px; 76 height: 17px; 77 */ 73 position:relative; 74 top:-2px; 75 margin-bottom:-2px; 78 76 color: ButtonText; 79 77 } -
trunk/XinhaCore.js
r949 r951 178 178 Xinha.checkSupportedBrowser = function() 179 179 { 180 if ( Xinha.is_gecko )181 {182 if ( navigator.productSub < 20021201 )183 {184 alert("You need at least Mozilla-1.3 Alpha.\nSorry, your Gecko is not supported.");185 return false;186 }187 if ( navigator.productSub < 20030210 )188 {189 alert("Mozilla < 1.3 Beta is not supported!\nI'll try, though, but it might not work.");190 }191 }192 180 if ( Xinha.is_opera ) 193 181 { … … 476 464 Xinha.Config = function() 477 465 { 478 var cfg = this;479 466 this.version = Xinha.version.Revision; 480 467 … … 3212 3199 var plugin = arguments[0]; 3213 3200 3214 // @todo : try to avoid the use of eval()3215 3201 // We can only register plugins that have been succesfully loaded 3216 if ( plugin === null || typeof plugin == 'undefined' || (typeof plugin == 'string' && eval('typeof ' + plugin)== 'undefined') )3202 if ( plugin === null || typeof plugin == 'undefined' || (typeof plugin == 'string' && typeof window[plugin] == 'undefined') ) 3217 3203 { 3218 3204 return false; … … 3234 3220 Xinha.prototype.registerPlugin2 = function(plugin, args) 3235 3221 { 3236 // @todo : try to avoid the use of eval() 3237 if ( typeof plugin == "string" ) 3238 { 3239 plugin = eval(plugin); 3222 if ( typeof plugin == "string" && typeof window[plugin] == 'function' ) 3223 { 3224 plugin = window[plugin]; 3240 3225 } 3241 3226 if ( typeof plugin == "undefined" ) … … 3287 3272 3288 3273 Xinha.setLoadingMessage (Xinha._lc("Loading plugin $plugin="+pluginName+"$")); 3289 // @todo : try to avoid the use of eval() 3274 3290 3275 // Might already be loaded 3291 //if ( eval('typeof ' + pluginName) != 'undefined' )3292 // @todo: try if this works to avoid the use of eval, I've been never getting here when testing3293 3276 if ( typeof window['pluginName'] != 'undefined' ) 3294 3277 { -
trunk/contrib/compress.php
r905 r951 1 1 <? 2 2 die("Run this script to batch-compress the current Xinha snapshot. To run the script, open the file and comment out the die() command"); 3 3 $repository_url = 'http://svn.xinha.webfactional.com/trunk'; 4 $version =''; 5 $date = date('r'); 4 6 error_reporting(E_ALL); 5 7 ini_set('show_errors',1); 6 8 7 9 $return = array(); 8 function scan($dir, $durl = '',$min_size=" 3000")10 function scan($dir, $durl = '',$min_size="0") 9 11 { 10 12 static $seen = array(); … … 48 50 scan("../"); 49 51 $cwd = getcwd(); 52 53 $root_dir = realpath($cwd.'/..'); 54 50 55 print "Processing ".count($return)." files<br />"; 51 56 52 $prefix = "/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */"; 57 $prefix = "/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */"; 58 if ($version) $prefix .= "\n/* This file is part of version $version released $date */"; 59 53 60 $core_prefix = ' 54 61 /*-------------------------------------------------------------------------- … … 58 65 -- BSD license) please read license.txt in this package for details. 59 66 -- 60 -- Copyright (c) 2005-200 7Xinha Developer Team and contributors67 -- Copyright (c) 2005-2008 Xinha Developer Team and contributors 61 68 -- 62 69 -- Xinha was originally based on work by Mihai Bazon which is: … … 71 78 print "Processed $file<br />"; 72 79 flush(); 80 $file_url = $repository_url.str_replace($root_dir,'',$file); 81 73 82 copy($file,$file."_uncompr.js"); 74 75 exec("echo \"".(preg_match('/XinhaCore.js$/',$file) ? $prefix.$core_prefix : $prefix)."\" > $file && java -jar ${cwd}/dojo_js_compressor.jar -c ${file}_uncompr.js >> $file 2>&1"); 83 84 $file_prefix = $prefix."\n/* The URL of the most recent version of this file is $file_url */"; 85 86 exec("echo \"".(preg_match('/XinhaCore.js$/',$file) ? $file_prefix.$core_prefix : $file_prefix)."\" > $file && java -jar ${cwd}/dojo_js_compressor.jar -c ${file}_uncompr.js >> $file 2>&1"); 76 87 if (preg_match('/js: ".*?", line \d+:/',file_get_contents($file))) 77 88 { … … 83 94 unlink($file."_uncompr.js"); 84 95 } 96 85 97 } 86 98 print "Operation complete."
