forked from 0x2620/oxjs
first demo of auto-resizing textarea
This commit is contained in:
parent
67c154547c
commit
7f904cda1f
5 changed files with 175 additions and 50 deletions
|
|
@ -8,8 +8,8 @@ Ox.AnnotationPanel <f:Ox.Element> AnnotationPanel Object
|
|||
options <o> Options object
|
||||
id <s> id
|
||||
items <a|[]> items
|
||||
titles <s> title
|
||||
type <s|text> panel type
|
||||
title <s> title
|
||||
type <s|'text'> panel type
|
||||
width <n|0>
|
||||
self <o> shared private variable
|
||||
@*/
|
||||
|
|
@ -35,7 +35,8 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
new Ox.Button({
|
||||
id: 'add',
|
||||
style: 'symbol',
|
||||
title: 'Add',
|
||||
title: 'add',
|
||||
tooltip: 'Add',
|
||||
type: 'image'
|
||||
}).bindEvent({
|
||||
click: function(event, data) {
|
||||
|
|
@ -67,15 +68,17 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
unique: 'id'
|
||||
})
|
||||
.bindEvent({
|
||||
cancel: function() {
|
||||
|
||||
},
|
||||
open: function(event, data) {
|
||||
if (data.ids.length == 1) {
|
||||
var pos = Ox.getPositionById(self.$annotations.options('items'), data.ids[0]);
|
||||
self.$annotations.editItem(pos);
|
||||
|
||||
}
|
||||
},
|
||||
'delete': function(event, data) {
|
||||
that.triggerEvent('delete', data);
|
||||
'remove': function(event, data) {
|
||||
that.triggerEvent('remove', data);
|
||||
},
|
||||
select: selectAnnotation,
|
||||
submit: updateAnnotation
|
||||
|
|
@ -138,6 +141,7 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
if(self.$annotations.options('selected'))
|
||||
self.$annotations.options('selected',[]);
|
||||
}
|
||||
|
||||
return that;
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue