mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
d5088fae68
commit
44368d9f78
@ -462,7 +462,13 @@ var URLHistoryUIActions = actions.Actions({
|
|||||||
// pinned items...
|
// pinned items...
|
||||||
history
|
history
|
||||||
.filter(function(p){
|
.filter(function(p){
|
||||||
return that.url_history[p].pinned
|
// NOTE: yes direct access is faster, but
|
||||||
|
// calling the toggler (common API) here
|
||||||
|
// will isolate the level knowledge to a
|
||||||
|
// single point which will simplify things
|
||||||
|
// if anything changes...
|
||||||
|
//return that.url_history[p].pinned
|
||||||
|
return that.toggleURLPinned(p, '?') == 'on'
|
||||||
})
|
})
|
||||||
.forEach(function(p){
|
.forEach(function(p){
|
||||||
// prevent from drawing again...
|
// prevent from drawing again...
|
||||||
@ -515,7 +521,6 @@ var URLHistoryUIActions = actions.Actions({
|
|||||||
// pin to top...
|
// pin to top...
|
||||||
// XXX should this be standard functionality???
|
// XXX should this be standard functionality???
|
||||||
// XXX should this .setTopURLHistory(..)???
|
// XXX should this .setTopURLHistory(..)???
|
||||||
// XXX should we get pinned state via .toggleURLPinned(url, '?') here???
|
|
||||||
['<span class="pin-set">●</span>'
|
['<span class="pin-set">●</span>'
|
||||||
+'<span class="pin-unset">○</span>',
|
+'<span class="pin-unset">○</span>',
|
||||||
function(p){
|
function(p){
|
||||||
@ -528,13 +533,11 @@ var URLHistoryUIActions = actions.Actions({
|
|||||||
// pinned...
|
// pinned...
|
||||||
if(cur.hasClass('pinned')){
|
if(cur.hasClass('pinned')){
|
||||||
cur.removeClass('pinned')
|
cur.removeClass('pinned')
|
||||||
//delete that.url_history[p].pinned
|
|
||||||
that.toggleURLPinned(p, 'off')
|
that.toggleURLPinned(p, 'off')
|
||||||
|
|
||||||
// not pinned...
|
// not pinned...
|
||||||
} else {
|
} else {
|
||||||
cur.addClass('pinned')
|
cur.addClass('pinned')
|
||||||
//that.url_history[p].pinned = true
|
|
||||||
that.toggleURLPinned(p, 'on')
|
that.toggleURLPinned(p, 'on')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user