forked from 0x2620/oxjs
update VideoEditor/AnnotationPanel/Editable/...; update OxJS array functions
This commit is contained in:
parent
d64e39c5b2
commit
85652471c6
8 changed files with 280 additions and 120 deletions
|
|
@ -15,7 +15,7 @@ Ox.Editable = function(options, self) {
|
|||
|
||||
self = self || {};
|
||||
var that = Ox.Element({
|
||||
element: '<div>',
|
||||
element: options.type == 'textarea' ? '<div>' : '<span>',
|
||||
tooltip: options.tooltip
|
||||
}, self)
|
||||
.defaults({
|
||||
|
|
@ -25,6 +25,7 @@ Ox.Editable = function(options, self) {
|
|||
format: null,
|
||||
height: 0,
|
||||
placeholder: '',
|
||||
submitOnBlur: true,
|
||||
tooltip: '',
|
||||
value: '',
|
||||
width: 0,
|
||||
|
|
@ -125,18 +126,19 @@ Ox.Editable = function(options, self) {
|
|||
.appendTo(that.$element);
|
||||
self.$input = Ox.Input({
|
||||
changeOnKeypress: true,
|
||||
element: self.options.type == 'input' ? '<span>' : '<div>',
|
||||
style: 'square',
|
||||
type: self.options.type,
|
||||
value: formatInputValue(),
|
||||
})
|
||||
.css(self.css)
|
||||
.bindEvent({
|
||||
blur: submit,
|
||||
cancel: cancel,
|
||||
change: change,
|
||||
submit: submit
|
||||
})
|
||||
.appendTo(that.$element);
|
||||
self.options.submitOnBlur && self.$input.bindEvent({blur: submit});
|
||||
self.$input.find('input').css(self.css);
|
||||
}
|
||||
self.$input.options({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue