update annotation folder
This commit is contained in:
parent
317b433a5c
commit
e7e20ecc3c
1 changed files with 10 additions and 5 deletions
|
@ -78,6 +78,7 @@ Ox.AnnotationFolder = function(options, self) {
|
|||
}
|
||||
} else if (key == 'range') {
|
||||
updateAnnotations();
|
||||
self.$annotation.options({placeholder: getPlaceholder()});
|
||||
} else if (key == 'selected') {
|
||||
if (value === '') {
|
||||
self.editing = false;
|
||||
|
@ -267,11 +268,7 @@ Ox.AnnotationFolder = function(options, self) {
|
|||
: null,
|
||||
highlight: self.options.highlight,
|
||||
items: self.annotations,
|
||||
placeholder: 'No ' + self.options.title.toLowerCase() + (
|
||||
self.options.range == 'position' ? ' at current position'
|
||||
: self.options.range == 'selection' ? ' in current selection'
|
||||
: ''
|
||||
),
|
||||
placeholder: getPlaceholder(),
|
||||
selected: self.options.selected,
|
||||
separator: ';',
|
||||
sort: self.sort,
|
||||
|
@ -432,6 +429,14 @@ Ox.AnnotationFolder = function(options, self) {
|
|||
return events;
|
||||
}
|
||||
|
||||
function getPlaceholder() {
|
||||
return 'No ' + self.options.title.toLowerCase() + (
|
||||
self.options.range == 'position' ? ' at current position'
|
||||
: self.options.range == 'selection' ? ' in current selection'
|
||||
: ''
|
||||
);
|
||||
}
|
||||
|
||||
function getPlaces() {
|
||||
var places = [];
|
||||
self.annotations.filter(function(item) {
|
||||
|
|
Loading…
Reference in a new issue