1
0
Fork 0
forked from 0x2620/oxjs

fix alphabetical order of annotations with tags, fixes #681

This commit is contained in:
rlx 2012-03-20 09:34:50 +00:00
commit bc3fedb125
4 changed files with 30 additions and 17 deletions

View file

@ -199,6 +199,11 @@ Ox.AnnotationFolder = function(options, self) {
self.$annotations = Ox.ArrayEditable({
clickLink: self.options.clickLink,
editable: self.options.editable,
getSortValue: self.options.type == 'text'
? function(value) {
return Ox.stripTags(value);
}
: null,
highlight: self.options.highlight,
items: self.annotations,
placeholder: 'No ' + self.options.title,
@ -540,7 +545,6 @@ Ox.AnnotationFolder = function(options, self) {
if (value === '') {
self.editing = false;
}
value && Ox.print('----------------- select item in folder', value, self.options.collapsed)
if (value && self.options.collapsed) {
self.$panel.options({animate: false});
self.$panel.options({collapsed: false});
@ -620,7 +624,6 @@ Ox.AnnotationFolder = function(options, self) {
};
that.updateItem = function(id, data) {
Ox.print('-- UPDATE ITEM', id, data);
var item = Ox.getObjectById(self.options.items, id);
Ox.forEach(data, function(value, key) {
item[key] = value;