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