catch some global vars

This commit is contained in:
rlx 2011-11-05 17:27:11 +00:00
parent 56370aa0a7
commit 1deb616942
8 changed files with 9 additions and 9 deletions

View file

@ -891,7 +891,7 @@ Ox.Calendar = function(options, self) {
units; units;
self.units.reverse(); self.units.reverse();
Ox.forEach(self.units, function(v, i) { Ox.forEach(self.units, function(v, i) {
width = Math.round(v.seconds * pixelsPerSecond); var width = Math.round(v.seconds * pixelsPerSecond);
if (width >= self.minLabelWidth) { if (width >= self.minLabelWidth) {
units = [self.units[i], self.units[i - 1]]; units = [self.units[i], self.units[i - 1]];
return false; return false;

View file

@ -265,7 +265,7 @@ Ox.URL = function(options) {
function encodeValue(str) { function encodeValue(str) {
// var chars = '/&|()=*:'; // var chars = '/&|()=*:';
var chars = '&|()=*'; var chars = '&|()=*',
ret = ''; ret = '';
str.split('').forEach(function(char) { str.split('').forEach(function(char) {
var index = chars.indexOf(char); var index = chars.indexOf(char);

View file

@ -106,7 +106,7 @@ Ox.InfoList = function(options, self) {
marginTop: '-2px', marginTop: '-2px',
overflow: 'hidden' overflow: 'hidden'
}) })
.appendTo($info); .appendTo($info),
$item = Ox.Element() $item = Ox.Element()
.css({ .css({
width: getItemWidth() - 8 + 'px', width: getItemWidth() - 8 + 'px',

View file

@ -797,7 +797,8 @@ Ox.List = function(options, self) {
} }
function mousedown(data) { function mousedown(data) {
var pos = findItemPosition(data); var pos = findItemPosition(data),
$cell, clickable, editable;
//self.hadFocus = that.hasFocus(); //self.hadFocus = that.hasFocus();
that.gainFocus(); that.gainFocus();
if (pos > -1) { if (pos > -1) {

View file

@ -614,7 +614,7 @@ Ox.TextList = function(options, self) {
//Ox.Log('List', 'getItem', id) //Ox.Log('List', 'getItem', id)
var $item = null; var $item = null;
that.$element.find('.OxItem').each(function() { that.$element.find('.OxItem').each(function() {
$this = $(this); var $this = $(this);
if ($this.data('id') == id) { if ($this.data('id') == id) {
$item = $this; $item = $this;
return false; return false;

View file

@ -350,7 +350,7 @@ Ox.Menu = function(options, self) {
function mousemove(event) { function mousemove(event) {
var item, var item,
position, position,
$target = $(event.target); $target = $(event.target),
$parent = $target.parent(); $parent = $target.parent();
if ($parent.is('.OxCell')) { if ($parent.is('.OxCell')) {
$target = $parent; $target = $parent;
@ -713,7 +713,7 @@ Ox.Menu = function(options, self) {
0, Ox.UI.$window.width() - that.width() 0, Ox.UI.$window.width() - that.width()
), ),
top = offset.top + self.options.offset.top + (self.options.side == 'bottom' ? height : 0), top = offset.top + self.options.offset.top + (self.options.side == 'bottom' ? height : 0),
menuHeight = that.$content.outerHeight(); // fixme: why is outerHeight 0 when hidden? menuHeight = that.$content.outerHeight(), // fixme: why is outerHeight 0 when hidden?
menuMaxHeight = Math.floor(Ox.UI.$window.height() - top - 16); menuMaxHeight = Math.floor(Ox.UI.$window.height() - top - 16);
if (self.options.parent) { if (self.options.parent) {
if (menuHeight > menuMaxHeight) { if (menuHeight > menuMaxHeight) {

View file

@ -536,7 +536,7 @@ Ox.Dialog = function(options, self) {
} }
function setContent() { function setContent() {
var animate = !!self.$content var animate = !!self.$content,
isImage = !self.options.content.ox && self.options.content.is('img'); isImage = !self.options.content.ox && self.options.content.is('img');
if (animate) { if (animate) {
self.$content.animate({ self.$content.animate({

View file

@ -115,7 +115,6 @@ Ox.load = function() {
length = Ox.len(modules); length = Ox.len(modules);
Ox.forEach(modules, function(options, module) { Ox.forEach(modules, function(options, module) {
Ox.loadFile(Ox.PATH + 'Ox.' + module + '/Ox.' + module + '.js', function() { Ox.loadFile(Ox.PATH + 'Ox.' + module + '/Ox.' + module + '.js', function() {
Ox.print('?', module)
Ox.load[module](options, function(s) { Ox.load[module](options, function(s) {
success += s; success += s;
++counter == length && callback(success == counter); ++counter == length && callback(success == counter);