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;
self.units.reverse();
Ox.forEach(self.units, function(v, i) {
width = Math.round(v.seconds * pixelsPerSecond);
var width = Math.round(v.seconds * pixelsPerSecond);
if (width >= self.minLabelWidth) {
units = [self.units[i], self.units[i - 1]];
return false;

View file

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

View file

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

View file

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

View file

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

View file

@ -350,7 +350,7 @@ Ox.Menu = function(options, self) {
function mousemove(event) {
var item,
position,
$target = $(event.target);
$target = $(event.target),
$parent = $target.parent();
if ($parent.is('.OxCell')) {
$target = $parent;
@ -713,7 +713,7 @@ Ox.Menu = function(options, self) {
0, Ox.UI.$window.width() - that.width()
),
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);
if (self.options.parent) {
if (menuHeight > menuMaxHeight) {

View file

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

View file

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