mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-12-21 18:51:39 +00:00
seporated url history depth and history dialog item limits...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
2bf70db73d
commit
de712c0e5e
@ -10,7 +10,8 @@
|
|||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
|
|
||||||
var BASE_URL_HISTORY = []
|
var BASE_URL_HISTORY = []
|
||||||
var BASE_URL_LIMIT = 15
|
var BASE_URL_HISTORY_LIMIT = 50
|
||||||
|
var BASE_URL_HISTORY_DIALOG_LIMIT = 15
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -62,8 +63,8 @@ function setupBaseURLHistory(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
// truncate the history if needed...
|
// truncate the history if needed...
|
||||||
if(BASE_URL_HISTORY.length > BASE_URL_LIMIT){
|
if(BASE_URL_HISTORY.length > BASE_URL_HISTORY_LIMIT){
|
||||||
BASE_URL_HISTORY.splice(BASE_URL_LIMIT, BASE_URL_HISTORY.length)
|
BASE_URL_HISTORY.splice(BASE_URL_HISTORY_LIMIT, BASE_URL_HISTORY.length)
|
||||||
updated = true
|
updated = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,7 +183,12 @@ function recentlyOpenedDialog(){
|
|||||||
var not_available = getNonExistingBaseURLs()
|
var not_available = getNonExistingBaseURLs()
|
||||||
|
|
||||||
var cfg = {}
|
var cfg = {}
|
||||||
cfg[title] = BASE_URL_HISTORY.map(function(e){
|
var c = 0
|
||||||
|
cfg[title] = $.map(BASE_URL_HISTORY, function(e){
|
||||||
|
c += 1
|
||||||
|
if(c > BASE_URL_HISTORY_DIALOG_LIMIT){
|
||||||
|
return
|
||||||
|
}
|
||||||
// cleanup the urls...
|
// cleanup the urls...
|
||||||
var ee = e.replace('file:///', '')
|
var ee = e.replace('file:///', '')
|
||||||
var disabled = not_available.indexOf(e) >= 0
|
var disabled = not_available.indexOf(e) >= 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user