bugfix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-02-08 22:59:16 +03:00
parent 1f38835e45
commit b4c7fe4499
2 changed files with 18 additions and 5 deletions

View File

@ -718,6 +718,7 @@ var URLHistoryUIActions = actions.Actions({
// be set to false on state update...
var state_saved = false
var to_sort = []
var to_remove = []
// cached fs state...
var fs_state = {}
@ -748,7 +749,8 @@ var URLHistoryUIActions = actions.Actions({
to_remove = []
// sort history...
that.sortURLHistory(urls)
//that.sortURLHistory(urls)
that.sortURLHistory(to_sort)
// toggle pins...
pins
.concat(orig_pins || [])
@ -848,6 +850,9 @@ var URLHistoryUIActions = actions.Actions({
.on('close', function(){
save()
})
.on('to_top_button', function(evt, p, e){
to_sort.splice(0, 0, p)
})
// handle 'O' button to browse path...
dialog.browsePath = function(p){

View File

@ -745,13 +745,17 @@ function(list, options){
move(p, -1)
&& e.prev().before(e)
// XXX hackish...
&& dialog.updateItemNumbers() }],
&& dialog
.updateItemNumbers()
.trigger('up_button', p, e) }],
DOWN: [options.shift_down_button || '&#9207;',
function(p, e){
move(p, 1)
&& e.next().after(e)
// XXX hackish...
&& dialog.updateItemNumbers() }],
&& dialog
.updateItemNumbers()
.trigger('down_button', p, e) }],
TO_TOP: [
(options.to_top_button === true
|| buttons.indexOf('TO_TOP') >= 0) ?
@ -762,7 +766,9 @@ function(list, options){
d
&& e.prevAll().eq(Math.abs(d+1)).before(e)
// XXX hackish...
&& dialog.updateItemNumbers()
&& dialog
.updateItemNumbers()
.trigger('to_top_button', p, e)
}],
TO_BOTTOM: [
(options.to_bottom_button === true
@ -774,7 +780,9 @@ function(list, options){
d
&& e.nextAll().eq(Math.abs(d-1)).after(e)
// XXX hackish...
&& dialog.updateItemNumbers()
&& dialog
.updateItemNumbers()
.trigger('to_bottom_button', p, e)
}],
REMOVE: Buttons.markForRemoval(
to_remove,