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') {
|
} else if (key == 'range') {
|
||||||
updateAnnotations();
|
updateAnnotations();
|
||||||
|
self.$annotation.options({placeholder: getPlaceholder()});
|
||||||
} else if (key == 'selected') {
|
} else if (key == 'selected') {
|
||||||
if (value === '') {
|
if (value === '') {
|
||||||
self.editing = false;
|
self.editing = false;
|
||||||
|
@ -267,11 +268,7 @@ Ox.AnnotationFolder = function(options, self) {
|
||||||
: null,
|
: null,
|
||||||
highlight: self.options.highlight,
|
highlight: self.options.highlight,
|
||||||
items: self.annotations,
|
items: self.annotations,
|
||||||
placeholder: 'No ' + self.options.title.toLowerCase() + (
|
placeholder: getPlaceholder(),
|
||||||
self.options.range == 'position' ? ' at current position'
|
|
||||||
: self.options.range == 'selection' ? ' in current selection'
|
|
||||||
: ''
|
|
||||||
),
|
|
||||||
selected: self.options.selected,
|
selected: self.options.selected,
|
||||||
separator: ';',
|
separator: ';',
|
||||||
sort: self.sort,
|
sort: self.sort,
|
||||||
|
@ -432,6 +429,14 @@ Ox.AnnotationFolder = function(options, self) {
|
||||||
return events;
|
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() {
|
function getPlaces() {
|
||||||
var places = [];
|
var places = [];
|
||||||
self.annotations.filter(function(item) {
|
self.annotations.filter(function(item) {
|
||||||
|
|
Loading…
Reference in a new issue