Changeset 1057 for trunk


Ignore:
Timestamp:
10/04/08 11:54:52 (11 years ago)
Author:
ray
Message:

fixed some unnecessarily global variables

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/XinhaCore.js

    r1055 r1057  
    7777  // convert _editor_url to absolute 
    7878  if(!_editor_url.match(/^([^:]+\:)?\//)){ 
    79     var path = window.location.toString().replace(/\?.*$/,'').split("/"); 
    80     path.pop(); 
    81     _editor_url = Xinha._resolveRelativeUrl(path.join("/"), _editor_url); 
     79    Xinha.tmpPath = window.location.toString().replace(/\?.*$/,'').split("/"); 
     80    Xinha.tmpPath.pop(); 
     81    _editor_url = Xinha._resolveRelativeUrl(Xinha.tmpPath.join("/"), _editor_url); 
     82    delete(Xinha.tmpPath);   
    8283  } 
    8384} 
     
    19011902}; 
    19021903 
    1903 // @todo : is this some kind of test not finished ? 
    1904 //         Why the hell this is not in the config object ? 
    1905 var use_clone_img = false; 
    19061904/** creates a button (i.e. container element + image) 
    19071905 * @private 
     
    19501948      img.style.width = "18px"; 
    19511949      img.style.height = "18px"; 
    1952       if ( use_clone_img ) 
    1953       { 
    1954         doc._xinhaImgCache[imgDef] = img.cloneNode(); 
    1955       } 
    19561950    } 
    19571951  } 
     
    19671961      img.src = imgDef[0]; 
    19681962      img.style.position = 'relative'; 
    1969       if ( use_clone_img ) 
    1970       { 
    1971         doc._xinhaImgCache[imgDef[0]] = img.cloneNode(); 
    1972       } 
    19731963    } 
    19741964    // @todo: Using 18 dont let us use a theme with its own icon toolbar height 
     
    68866876Xinha.getElementTopLeft = function(element)  
    68876877{ 
    6888   var curleft = curtop = 0; 
     6878  var curleft = 0; 
     6879  var curtop =  0; 
    68896880  if (element.offsetParent)  
    68906881  { 
  • trunk/XinhaLoader.js

    r962 r1057  
    5858Xinha.getElementTopLeft = function(element)  
    5959{ 
    60   var curleft = curtop = 0; 
     60  var curleft = 0; 
     61  var curtop = 0; 
    6162  if (element.offsetParent)  
    6263  { 
  • trunk/modules/Dialogs/XinhaDialog.js

    r1056 r1057  
    5050    undefined, the options passed in above will be used. 
    5151  */ 
    52   globalOptions = editor.config.dialogOptions 
     52  var globalOptions = editor.config.dialogOptions 
    5353  if (globalOptions) { 
    5454    if (typeof(globalOptions.centered) != 'undefined') { 
     
    271271  rootElem = null; 
    272272  main = null; 
    273   resizeHandle = null; 
    274273   
    275274  Xinha.freeLater(this,"rootElem"); 
  • trunk/modules/FullScreen/full-screen.js

    r961 r1057  
    33  this.editor = editor; 
    44  editor._superclean_on = false; 
    5   cfg = editor.config; 
     5  var cfg = editor.config; 
    66 
    77  cfg.registerButton 
     
    4444{ 
    4545  var e = this; 
     46  var cfg = e.config; 
    4647  function sizeItUp() 
    4748  { 
  • trunk/plugins/ExtendedFileManager/assets/dragTableCols.js

    r937 r1057  
    102102dragTableCols.getElementTopLeft = function(element)  
    103103{ 
    104   var curleft = curtop = 0; 
     104  var curleft = 0; 
     105  var curtop = 0; 
    105106  if (element.offsetParent)  
    106107  { 
  • trunk/plugins/Stylist/stylist.js

    r1044 r1057  
    482482  // We are only interested in the selectors, the rules are not important 
    483483  //  so we'll drop out all coments and rules 
    484   RE_comment = /\/\*(.|\r|\n)*?\*\//g; 
    485   RE_rule    = /\{(.|\r|\n)*?\}/g; 
     484  var RE_comment = /\/\*(.|\r|\n)*?\*\//g; 
     485  var RE_rule    = /\{(.|\r|\n)*?\}/g; 
    486486  css = css.replace(RE_comment, ''); 
    487487  css = css.replace(RE_rule, ','); 
Note: See TracChangeset for help on using the changeset viewer.