mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
cleanup + minor tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
2fa1e5a510
commit
c407ddd658
@ -134,6 +134,9 @@ var URLHistoryActions = actions.Actions({
|
|||||||
url = url || this.location.path
|
url = url || this.location.path
|
||||||
var l = this.config['url-history-length'] || -1
|
var l = this.config['url-history-length'] || -1
|
||||||
|
|
||||||
|
var logger = this.logger
|
||||||
|
&& this.logger.push('History')
|
||||||
|
|
||||||
if(l == 0){
|
if(l == 0){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -151,10 +154,6 @@ var URLHistoryActions = actions.Actions({
|
|||||||
|
|
||||||
// push url to history...
|
// push url to history...
|
||||||
this.url_history[url] = item
|
this.url_history[url] = item
|
||||||
/*this.url_history[url] = {
|
|
||||||
open: open,
|
|
||||||
check: check,
|
|
||||||
}*/
|
|
||||||
|
|
||||||
// update history length...
|
// update history length...
|
||||||
var to_remove = Object.keys(this.url_history)
|
var to_remove = Object.keys(this.url_history)
|
||||||
@ -169,7 +168,8 @@ var URLHistoryActions = actions.Actions({
|
|||||||
to_remove
|
to_remove
|
||||||
.slice(l)
|
.slice(l)
|
||||||
.forEach(function(e){
|
.forEach(function(e){
|
||||||
console.log('Removing url from history:', e)
|
logger
|
||||||
|
&& logger.emit(`Removing URL from history: "${e}"`)
|
||||||
that.dropURLFromHistory(e) })
|
that.dropURLFromHistory(e) })
|
||||||
}],
|
}],
|
||||||
// NOTE: url can be an index, 0 being the last url added to history;
|
// NOTE: url can be an index, 0 being the last url added to history;
|
||||||
|
|||||||
@ -135,11 +135,15 @@ $(function(){
|
|||||||
// XXX STUB...
|
// XXX STUB...
|
||||||
} else if(e == 'error' ){
|
} else if(e == 'error' ){
|
||||||
ig.showProgress(['Error'].concat(msg), '+0', '+1')
|
ig.showProgress(['Error'].concat(msg), '+0', '+1')
|
||||||
console.log(' '+ (msg || []).join(': ') + ':', e, v)
|
console.log(msg ?
|
||||||
|
' '+ msg.join(': ') + ':'
|
||||||
|
: '', ...arguments)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// console...
|
// console...
|
||||||
console.log(' '+ (msg || []).join(': ') + ':', e, v)
|
console.log(msg ?
|
||||||
|
' '+ msg.join(': ') + ':'
|
||||||
|
: '', ...arguments)
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXX
|
// XXX
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user