alecpl
2010-05-28 b231f68ba2a6adf7b63ce150ebe0cfcab4be90c0
- Fix typo in last commit + some code cleanup


1 files modified
27 ■■■■ changed files
program/js/common.js 27 ●●●● patch | view | raw | blame | history
program/js/common.js
@@ -46,7 +46,7 @@
  this.dom = document.getElementById ? true : false;
  this.dom2 = (document.addEventListener && document.removeEventListener);
  this.ie = (document.all && !window.opery);
  this.ie = (document.all && !window.opera);
  this.ie4 = (this.ie && !this.dom);
  this.ie5 = (this.dom && this.appver.indexOf('MSIE 5')>0);
  this.ie8 = (this.dom && this.appver.indexOf('MSIE 8')>0);
@@ -192,8 +192,8 @@
get_mouse_pos: function(e)
{
  if (!e) e = window.event;
  var mX = (e.pageX) ? e.pageX : e.clientX;
  var mY = (e.pageY) ? e.pageY : e.clientY;
  var mX = (e.pageX) ? e.pageX : e.clientX,
    mY = (e.pageY) ? e.pageY : e.clientY;
  if (document.body && document.all) {
    mX += document.body.scrollLeft;
@@ -369,15 +369,13 @@
  // create a new layer in the current document
  this.create = function(arg)
  {
    var l = (arg.x) ? arg.x : 0;
    var t = (arg.y) ? arg.y : 0;
    var w = arg.width;
    var h = arg.height;
    var z = arg.zindex;
    var vis = arg.vis;
    var parent = arg.parent;
    var obj;
    var l = (arg.x) ? arg.x : 0,
      t = (arg.y) ? arg.y : 0,
      w = arg.width,
      h = arg.height,
      z = arg.zindex,
      vis = arg.vis,
      parent = arg.parent,
    obj = document.createElement('DIV');
    with(obj) {
@@ -391,7 +389,8 @@
          width = w.toString().match(/\%$/) ? w : w+'px';
        if (h)
          height = h.toString().match(/\%$/) ? h : h+'px';
        if(z) zIndex = z;
        if (z)
          zIndex = z;
      }
    }
@@ -654,4 +653,4 @@
    return obj;
  }
};
}