forked from 0x2620/oxjs
self.setOption ~> that.update
This commit is contained in:
parent
9ee0742b53
commit
005d50c389
56 changed files with 919 additions and 933 deletions
|
|
@ -37,6 +37,27 @@ Ox.Dialog = function(options, self) {
|
|||
width: 400
|
||||
})
|
||||
.options(options || {})
|
||||
.update({
|
||||
buttons: setButtons,
|
||||
content: setContent,
|
||||
height: function() {
|
||||
setMinAndMax();
|
||||
setCSS({height: self.options.height});
|
||||
},
|
||||
title: function() {
|
||||
self.$title.animate({
|
||||
opacity: 0
|
||||
}, 50, function() {
|
||||
self.$title.html(self.options.title).animate({
|
||||
opacity: 1
|
||||
}, 50);
|
||||
});
|
||||
},
|
||||
width: function() {
|
||||
setMinAndMax();
|
||||
setCSS({width: self.options.width});
|
||||
}
|
||||
})
|
||||
.addClass('OxDialog')
|
||||
.bindEvent({
|
||||
key_enter: function() {
|
||||
|
|
@ -606,28 +627,6 @@ Ox.Dialog = function(options, self) {
|
|||
Ox.Log('Window', 'sMM', self, window.innerHeight, maxRatio)
|
||||
}
|
||||
|
||||
self.setOption = function(key, value) {
|
||||
if (key == 'buttons') {
|
||||
setButtons();
|
||||
} else if (key == 'content') {
|
||||
setContent();
|
||||
} else if (key == 'height') {
|
||||
setMinAndMax();
|
||||
setCSS({height: value});
|
||||
} else if (key == 'title') {
|
||||
self.$title.animate({
|
||||
opacity: 0
|
||||
}, 50, function() {
|
||||
self.$title.html(value).animate({
|
||||
opacity: 1
|
||||
}, 50);
|
||||
});
|
||||
} else if (key == 'width') {
|
||||
setMinAndMax();
|
||||
setCSS({width: value});
|
||||
}
|
||||
};
|
||||
|
||||
/*@
|
||||
close <f> close
|
||||
(callback) -> <o> close
|
||||
|
|
|
|||
|
|
@ -31,12 +31,6 @@ Ox.Tooltip = function(options, self) {
|
|||
opacity: 0
|
||||
});
|
||||
|
||||
self.setOption = function(key, value) {
|
||||
if (key == 'title') {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
/*@
|
||||
hide <f> hide tooltip
|
||||
() -> <o> hide tooltip
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue