mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
cleanup, fixes and tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
5c78c95297
commit
2827e9e679
@ -955,6 +955,10 @@ function(list, options){
|
|||||||
: txt
|
: txt
|
||||||
// account for '$' as key binding marker...
|
// account for '$' as key binding marker...
|
||||||
var ntxt = txt.replace(/\$/g, '')
|
var ntxt = txt.replace(/\$/g, '')
|
||||||
|
// unique-test text...
|
||||||
|
var utxt = options.unique instanceof Function ?
|
||||||
|
options.unique(txt)+''
|
||||||
|
: null
|
||||||
|
|
||||||
// invalid format...
|
// invalid format...
|
||||||
if(options.check && !options.check(txt)){
|
if(options.check && !options.check(txt)){
|
||||||
@ -982,13 +986,13 @@ function(list, options){
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check if item pre-existed...
|
// check if item pre-existed...
|
||||||
var preexisted = options.unique instanceof Function ?
|
var preexisted = utxt ?
|
||||||
//lst.indexOf(options.unique(txt)) >= 0
|
//lst.indexOf(options.unique(txt)) >= 0
|
||||||
(lst.indexOf(options.unique(txt)) >= 0
|
(lst.indexOf(utxt) >= 0
|
||||||
// account for '$' as key binding marker... (XXX ???)
|
// account for '$' as key binding marker... (XXX ???)
|
||||||
|| normalized.indexOf(options.unique(txt).replace(/\$/g, '')))
|
|| normalized.indexOf(utxt.replace(/\$/g, '')) >= 0)
|
||||||
: (lst.indexOf(txt) >= 0
|
: (lst.indexOf(txt) >= 0
|
||||||
|| normalized.indexOf(ntxt) >= 0)
|
|| normalized.indexOf(ntxt) >= 0)
|
||||||
|
|
||||||
// add new value and sort list...
|
// add new value and sort list...
|
||||||
lst.push(txt)
|
lst.push(txt)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user