forked from 0x2620/oxjs
add clickLink to video widgets
This commit is contained in:
parent
41e191f217
commit
f2d7beeb22
6 changed files with 23 additions and 4 deletions
|
|
@ -22,6 +22,7 @@ Ox.AnnotationFolder = function(options, self) {
|
|||
self = self || {};
|
||||
var that = Ox.Element({}, self)
|
||||
.defaults({
|
||||
clickLink: null,
|
||||
collapsed: false,
|
||||
editable: false,
|
||||
id: '',
|
||||
|
|
@ -127,7 +128,8 @@ Ox.AnnotationFolder = function(options, self) {
|
|||
})
|
||||
.bindEvent({
|
||||
select: function(data) {
|
||||
if (!data.id && Ox.getObjectById(self.options.items, self.options.selected).event) {
|
||||
Ox.print('SELECT >>> ', data)
|
||||
if (!data.id && self.options.selected && Ox.getObjectById(self.options.items, self.options.selected).event) {
|
||||
// only deselect annotation if the event deselect was not
|
||||
// caused by switching to an annotation without event
|
||||
self.$annotations.options({selected: ''});
|
||||
|
|
@ -154,7 +156,7 @@ Ox.AnnotationFolder = function(options, self) {
|
|||
.bindEvent({
|
||||
// FIXME: should be select, not selectplace
|
||||
selectplace: function(data) {
|
||||
if (!data.id && Ox.getObjectById(self.options.items, self.options.selected).place) {
|
||||
if (!data.id && self.options.selected && Ox.getObjectById(self.options.items, self.options.selected).place) {
|
||||
// only deselect annotation if the place deselect was not
|
||||
// caused by switching to an annotation without place
|
||||
self.$annotations.options({selected: ''});
|
||||
|
|
@ -189,6 +191,7 @@ Ox.AnnotationFolder = function(options, self) {
|
|||
}
|
||||
|
||||
self.$annotations = Ox.ArrayEditable({
|
||||
clickLink: self.options.clickLink,
|
||||
editable: self.options.editable,
|
||||
items: self.annotations,
|
||||
placeholder: 'No ' + self.options.title,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue