fix tooltip of splitpanel resizebar; allow for setting the showannotations option of video player and editor panels from outside

This commit is contained in:
rlx 2011-10-13 10:10:39 +00:00
parent 126fb3956e
commit 768dd6c7aa
35 changed files with 20 additions and 24 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 B

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 408 B

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 866 B

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 866 B

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 B

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 449 B

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

After

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 642 B

After

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 397 B

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 866 B

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 558 B

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 B

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 311 B

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 558 B

After

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 543 B

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 543 B

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 482 B

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 B

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 B

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 B

After

Width:  |  Height:  |  Size: 702 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 B

After

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 385 B

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 543 B

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 348 B

After

Width:  |  Height:  |  Size: 339 B

View file

@ -14,11 +14,9 @@ Ox.Resizebar <f:Ox.Element> Resizebar
resizeable <b|true> can bar be resized
resize <a|[]> array with possible sizes
size <n|0> default size
tooltop <b|s|false> tooltip or not
tooltip <b|s|false> tooltip or not
self <o> Shared private variable
@*/
/**
*/
Ox.Resizebar = function(options, self) {
self = self || {};
@ -162,24 +160,6 @@ Ox.Resizebar = function(options, self) {
that.css({cursor: getCursor()});
self.$tooltip.options({title: getTitle()});
}
/*
//Ox.print('toggle');
if (Ox.isUndefined(self.options.position)) {
self.options.position = parseInt(self.options.parent.css(self.options.edge)) +
(self.options.collapsed ? self.options.size : 0);
}
var size = self.options.position -
(self.options.collapsed ? 0 : self.options.size),
animate = {};
//Ox.print('s.o.e', self.options.edge);
animate[self.options.edge] = size;
self.options.parent.animate(animate, 200, function() {
var i = (self.options.edge == 'left' || self.options.edge == 'top') ? 0 : 1;
self.options.collapsed = !self.options.collapsed;
Ox.Event.trigger(self.ids[i], 'toggle', self.options.collapsed);
Ox.Event.trigger(self.ids[1 - i], 'resize', self.options.elements[1 - i][self.dimensions[1]]());
});
*/
}
function triggerEvents(event) {
@ -195,6 +175,13 @@ Ox.Resizebar = function(options, self) {
});
}
self.setOption = function(key, value) {
if (key == 'collapsed') {
that.css({cursor: getCursor()});
self.$tooltip.options({title: getTitle()});
}
}
return that;
};

View file

@ -227,6 +227,11 @@ Ox.MainMenu = function(options, self) {
return that;
};
that.setItemTitle = function(id, title) {
that.getItem(id).options({title: title});
return that;
};
/*@
uncheckItem <f> uncheckItem
@*/

View file

@ -61,11 +61,9 @@ Ox.SplitPanel = function(options, self) {
// create resizebars
self.options.elements.forEach(function(element, i) {
//that.append(element)
//Ox.print('V: ', v, that.$elements[i])
var index = i == 0 ? 0 : 1;
that.$elements[i].appendTo(that.$element); // fixme: that.$content
if (element.collapsible || element.resizable) {
//Ox.print('v.size', v.size)
self.resizebarElements[index] = i < 2 ? [0, 1] : [1, 2];
self.$resizebars[index] = Ox.Resizebar({
collapsed: element.collapsed,
@ -103,7 +101,6 @@ Ox.SplitPanel = function(options, self) {
return false;
}
});
//Ox.print('getPositionById', id, position);
return position;
}
@ -298,6 +295,7 @@ Ox.SplitPanel = function(options, self) {
element.element.triggerEvent('toggle', {
'collapsed': element.collapsed
});
self.$resizebars[pos == 0 ? 0 : 1].options({collapsed: element.collapsed});
element = self.options.elements[pos == 0 ? 1 : pos - 1];
element.element.triggerEvent('resize', {
size: element.element[self.dimensions[0]]()
@ -322,6 +320,7 @@ Ox.SplitPanel = function(options, self) {
};
// fixme: remove!
/*
Ox.SplitPanel_ = function(options, self) {
self = self || {};
@ -507,3 +506,4 @@ Ox.SplitPanel_ = function(options, self) {
return that;
};
*/

View file

@ -1021,6 +1021,8 @@ Ox.VideoEditor = function(options, self) {
setSizes();
} else if (key == 'position') {
setPosition(value);
} else if (key == 'showAnnotations') {
that.$element.toggle(1);
}
};

View file

@ -259,6 +259,8 @@ Ox.VideoPanelPlayer = function(options, self) {
self.$timeline.options({
position: value
});
} else if (key == 'showAnnotations') {
that.$element.toggle(1);
} else if (key == 'width') {
self.$video.options({
width: getPlayerWidth()