cleanup, again
This commit is contained in:
parent
2809a5d06d
commit
094b1a59ec
34 changed files with 93 additions and 101 deletions
|
@ -126,7 +126,6 @@ Ox.Resizebar = function(options, self) {
|
||||||
? (self.isLeftOrTop ? 'n' : 's')
|
? (self.isLeftOrTop ? 'n' : 's')
|
||||||
: (self.isLeftOrTop ? 'w' : 'e');
|
: (self.isLeftOrTop ? 'w' : 'e');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return cursor + '-resize';
|
return cursor + '-resize';
|
||||||
}
|
}
|
||||||
|
|
|
@ -713,10 +713,11 @@ Ox.Calendar = function(options, self) {
|
||||||
width = getPosition(event.endTime, zoom) - left;
|
width = getPosition(event.endTime, zoom) - left;
|
||||||
}
|
}
|
||||||
return Ox.Element()
|
return Ox.Element()
|
||||||
.addClass('OxEvent' +
|
.addClass(
|
||||||
(event.type ? ' Ox' + Ox.toTitleCase(event.type) : '' ) +
|
'OxEvent'
|
||||||
(event.current ? ' OxCurrent' : '') +
|
+ (event.type ? ' Ox' + Ox.toTitleCase(event.type) : '' )
|
||||||
(event.id == self.options.selected ? ' OxSelected' : '')
|
+ (event.current ? ' OxCurrent' : '')
|
||||||
|
+ (event.id == self.options.selected ? ' OxSelected' : '')
|
||||||
)
|
)
|
||||||
.css({
|
.css({
|
||||||
left: left + 'px',
|
left: left + 'px',
|
||||||
|
@ -830,9 +831,8 @@ Ox.Calendar = function(options, self) {
|
||||||
|
|
||||||
function getPosition(date, zoom) {
|
function getPosition(date, zoom) {
|
||||||
return Math.round(
|
return Math.round(
|
||||||
self.options.width / 2 +
|
self.options.width / 2
|
||||||
(date - self.options.date) / 1000 *
|
+ (date - self.options.date) / 1000 * getPixelsPerSecond(zoom)
|
||||||
getPixelsPerSecond(zoom)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,10 +38,10 @@ Ox.DocPage = function(options, self) {
|
||||||
var $elements = [$('<div>')
|
var $elements = [$('<div>')
|
||||||
.css({paddingLeft: (level ? level * 32 - 16 : 0) + 'px'})
|
.css({paddingLeft: (level ? level * 32 - 16 : 0) + 'px'})
|
||||||
.html(
|
.html(
|
||||||
'<code><b>' + (name || item.name) + '</b> ' +
|
'<code><b>' + (name || item.name) + '</b> '
|
||||||
'<' + item.types.join('></code> or <code><') + '> </code>' +
|
+ '<' + item.types.join('></code> or <code><') + '> </code>'
|
||||||
(item['default'] ? '(default: <code>' + item['default'] + '</code>) ' : '') +
|
+ (item['default'] ? '(default: <code>' + item['default'] + '</code>) ' : '')
|
||||||
Ox.parseHTML(item.summary)
|
+ Ox.parseHTML(item.summary)
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
[
|
[
|
||||||
|
@ -112,11 +112,11 @@ Ox.DocPage = function(options, self) {
|
||||||
.addClass(className)
|
.addClass(className)
|
||||||
.css({marginLeft: (level * 32 + 16) + 'px'})
|
.css({marginLeft: (level * 32 + 16) + 'px'})
|
||||||
.html(
|
.html(
|
||||||
'<code><b>> ' +
|
'<code><b>> '
|
||||||
Ox.encodeHTML(example.statement)
|
+ Ox.encodeHTML(example.statement)
|
||||||
.replace(/ /g, ' ')
|
.replace(/ /g, ' ')
|
||||||
.replace(/\n/g, '<br/>\n ') +
|
.replace(/\n/g, '<br/>\n ')
|
||||||
'</b></code>'
|
+ '</b></code>'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
example.result && $elements.push($('<div>')
|
example.result && $elements.push($('<div>')
|
||||||
|
@ -133,8 +133,8 @@ Ox.DocPage = function(options, self) {
|
||||||
.addClass(className)
|
.addClass(className)
|
||||||
.css({marginLeft: 16 + 'px'})
|
.css({marginLeft: 16 + 'px'})
|
||||||
.html(
|
.html(
|
||||||
'<code><b>' + self.options.item.file.replace(Ox.PATH, '') +
|
'<code><b>' + self.options.item.file.replace(Ox.PATH, '')
|
||||||
'</b> line ' + self.options.item.line + '</code>'
|
+ '</b> line ' + self.options.item.line + '</code>'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$elements.push(
|
$elements.push(
|
||||||
|
|
|
@ -40,8 +40,8 @@ Ox.SyntaxHighlighter = function(options, self) {
|
||||||
var $lineNumbers, $line, $source, width,
|
var $lineNumbers, $line, $source, width,
|
||||||
lines, source = '', tokens,
|
lines, source = '', tokens,
|
||||||
linebreak = (
|
linebreak = (
|
||||||
self.options.showLinebreaks ?
|
self.options.showLinebreaks
|
||||||
'<span class="OxLinebreak">\u21A9</span>' : ''
|
? '<span class="OxLinebreak">\u21A9</span>' : ''
|
||||||
) + '<br/>',
|
) + '<br/>',
|
||||||
tab = (
|
tab = (
|
||||||
self.options.showTabs ?
|
self.options.showTabs ?
|
||||||
|
|
|
@ -33,10 +33,10 @@ Ox.Checkbox = function(options, self) {
|
||||||
width: 'auto'
|
width: 'auto'
|
||||||
})
|
})
|
||||||
.options(options || {})
|
.options(options || {})
|
||||||
.addClass('OxCheckbox'
|
.addClass('OxCheckbox' + (
|
||||||
+ (self.options.overlap == 'none' ? '' : ' OxOverlap'
|
self.options.overlap == 'none'
|
||||||
+ Ox.toTitleCase(self.options.overlap))
|
? '' : ' OxOverlap' + Ox.toTitleCase(self.options.overlap)
|
||||||
)
|
))
|
||||||
.attr({
|
.attr({
|
||||||
disabled: self.options.disabled
|
disabled: self.options.disabled
|
||||||
});
|
});
|
||||||
|
|
|
@ -10,7 +10,6 @@ Ox.CheckboxGroup <f:Ox.Element> CheckboxGroup Object
|
||||||
min <n|1> integer
|
min <n|1> integer
|
||||||
width <n> integer, width in px
|
width <n> integer, width in px
|
||||||
self <o> shared private variable
|
self <o> shared private variable
|
||||||
|
|
||||||
change <!> triggered when checked property changes
|
change <!> triggered when checked property changes
|
||||||
passes {checked, id, title}
|
passes {checked, id, title}
|
||||||
@*/
|
@*/
|
||||||
|
|
|
@ -98,7 +98,6 @@ Ox.Editable = function(options, self) {
|
||||||
width: width /*+ Ox.UI.SCROLLBAR_SIZE*/ + 'px'
|
width: width /*+ Ox.UI.SCROLLBAR_SIZE*/ + 'px'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//self.$input.find('input').css({width: width + 2})
|
|
||||||
/*
|
/*
|
||||||
that.triggerEvent('change', {
|
that.triggerEvent('change', {
|
||||||
value: event.value
|
value: event.value
|
||||||
|
|
|
@ -484,8 +484,8 @@ Ox.Input = function(options, self) {
|
||||||
var cursor,
|
var cursor,
|
||||||
length,
|
length,
|
||||||
regexp = type == 'float' ? new RegExp(
|
regexp = type == 'float' ? new RegExp(
|
||||||
'(^' + (self.options.min < 0 ? '\\-?' : '') + '\\d+\\.?\\d' +
|
'(^' + (self.options.min < 0 ? '\\-?' : '') + '\\d+\\.?\\d'
|
||||||
(self.options.decimals ? '{0,' + self.options.decimals + '}' : '*')
|
+ (self.options.decimals ? '{0,' + self.options.decimals + '}' : '*')
|
||||||
+ '$)'
|
+ '$)'
|
||||||
) : new RegExp('(^' + (self.options.min < 0 ? '\\-?' : '') + '\\d+)');
|
) : new RegExp('(^' + (self.options.min < 0 ? '\\-?' : '') + '\\d+)');
|
||||||
if (type == 'float') {
|
if (type == 'float') {
|
||||||
|
|
|
@ -5,7 +5,6 @@ Ox.Label <f:Ox.Element> Label Object
|
||||||
(options) -> <f> Label Object
|
(options) -> <f> Label Object
|
||||||
(options, self) -> <f> Label Object
|
(options, self) -> <f> Label Object
|
||||||
options <o> Options object
|
options <o> Options object
|
||||||
|
|
||||||
@*/
|
@*/
|
||||||
Ox.Label = function(options, self) {
|
Ox.Label = function(options, self) {
|
||||||
|
|
||||||
|
|
|
@ -883,10 +883,10 @@ Ox.Map = function(options, self) {
|
||||||
if (!self.isAsync) {
|
if (!self.isAsync) {
|
||||||
self.places.sort(function(a, b) {
|
self.places.sort(function(a, b) {
|
||||||
var sort = {
|
var sort = {
|
||||||
a: a.selected ? Infinity :
|
a: a.selected ? Infinity
|
||||||
bounds.contains(a.center) ? a.area : -Infinity,
|
: bounds.contains(a.center) ? a.area : -Infinity,
|
||||||
b: b.selected ? Infinity :
|
b: b.selected ? Infinity
|
||||||
bounds.contains(b.center) ? b.area : -Infinity,
|
: bounds.contains(b.center) ? b.area : -Infinity,
|
||||||
};
|
};
|
||||||
return sort.b - sort.a;
|
return sort.b - sort.a;
|
||||||
}).forEach(function(place, i) {
|
}).forEach(function(place, i) {
|
||||||
|
|
|
@ -66,8 +66,8 @@ Ox.MapRectangleMarker = function(options, self) {
|
||||||
if (that.position.indexOf('e') > -1) {
|
if (that.position.indexOf('e') > -1) {
|
||||||
that.place.east = lng;
|
that.place.east = lng;
|
||||||
}
|
}
|
||||||
Ox.print('west', that.place.west, 'east', that.place.east);
|
//Ox.print('west', that.place.west, 'east', that.place.east);
|
||||||
Ox.print('south', that.place.south, 'north', that.place.north);
|
//Ox.print('south', that.place.south, 'north', that.place.north);
|
||||||
that.place.update();
|
that.place.update();
|
||||||
that.place.marker.update();
|
that.place.marker.update();
|
||||||
that.place.rectangle.update();
|
that.place.rectangle.update();
|
||||||
|
|
|
@ -170,7 +170,6 @@ Ox.SplitPanel = function(options, self) {
|
||||||
}
|
}
|
||||||
self.$resizebars[i == 0 ? 0 : 1].options({size: element.size});
|
self.$resizebars[i == 0 ? 0 : 1].options({size: element.size});
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -172,7 +172,6 @@ Ox.BlockVideoTimeline = function(options, self) {
|
||||||
Ox.formatDuration(position)
|
Ox.formatDuration(position)
|
||||||
})
|
})
|
||||||
.show(e.clientX, e.clientY);
|
.show(e.clientX, e.clientY);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
self.$tooltip.hide();
|
self.$tooltip.hide();
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,8 +97,7 @@ Ox.SmallVideoTimeline = function(options, self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPosition(e) {
|
function getPosition(e) {
|
||||||
var position =
|
var position = (
|
||||||
(
|
|
||||||
(e.offsetX ? e.offsetX : e.clientX - $(e.target).offset().left) -
|
(e.offsetX ? e.offsetX : e.clientX - $(e.target).offset().left) -
|
||||||
(self.options.type == 'player' ? 8 : 0)
|
(self.options.type == 'player' ? 8 : 0)
|
||||||
) * self.options.duration / self.imageWidth;
|
) * self.options.duration / self.imageWidth;
|
||||||
|
|
|
@ -598,7 +598,6 @@ Ox.VideoEditor = function(options, self) {
|
||||||
{id: 'smallText', title: 'Small', checked: true},
|
{id: 'smallText', title: 'Small', checked: true},
|
||||||
{id: 'mediumText', title: 'Medium'},
|
{id: 'mediumText', title: 'Medium'},
|
||||||
{id: 'largeText', title: 'Large'}
|
{id: 'largeText', title: 'Large'}
|
||||||
|
|
||||||
],
|
],
|
||||||
max: 2,
|
max: 2,
|
||||||
title: 'set',
|
title: 'set',
|
||||||
|
@ -772,9 +771,9 @@ Ox.VideoEditor = function(options, self) {
|
||||||
function getSizes(scrollbarIsVisible) {
|
function getSizes(scrollbarIsVisible) {
|
||||||
//Ox.print('getSizes', scrollbarIsVisible)
|
//Ox.print('getSizes', scrollbarIsVisible)
|
||||||
var scrollbarWidth = Ox.UI.SCROLLBAR_SIZE,
|
var scrollbarWidth = Ox.UI.SCROLLBAR_SIZE,
|
||||||
contentWidth = self.options.width -
|
contentWidth = self.options.width
|
||||||
(self.options.showAnnotations * self.options.annotationsSize) - 1 -
|
- (self.options.showAnnotations * self.options.annotationsSize) - 1
|
||||||
(scrollbarIsVisible ? scrollbarWidth : 0),
|
- (scrollbarIsVisible ? scrollbarWidth : 0),
|
||||||
height,
|
height,
|
||||||
lines,
|
lines,
|
||||||
size = {
|
size = {
|
||||||
|
|
Loading…
Reference in a new issue