From 6831bfcddb4b887647a26a7e3981347ae5a314d1 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 10 Dec 2015 03:46:11 +0300 Subject: [PATCH] fixed a couple of small bugs... Signed-off-by: Alex A. Naanou --- ui (gen4)/ui.js | 1 + ui (gen4)/viewer.js | 31 +++++++++++++++++++------------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/ui (gen4)/ui.js b/ui (gen4)/ui.js index a9edbe34..1050055b 100755 --- a/ui (gen4)/ui.js +++ b/ui (gen4)/ui.js @@ -105,6 +105,7 @@ module.GLOBAL_KEYBOARD = { H: { default: 'flipHorizontal', ctrl: 'listURLHistory', + alt: 'browseActions: "/History/"', }, V: 'flipVertical', P: { diff --git a/ui (gen4)/viewer.js b/ui (gen4)/viewer.js index 83df73e9..a9e566e6 100755 --- a/ui (gen4)/viewer.js +++ b/ui (gen4)/viewer.js @@ -263,18 +263,19 @@ actions.Actions({ // NOTE: for complete isolation it is best to completely copy the // .config... - clone: [function(full){ - var res = actions.MetaActions.clone.call(this, full) + clone: ['File/', + function(full){ + var res = actions.MetaActions.clone.call(this, full) - if(this.data){ - res.data = this.data.clone() - } - if(this.images){ - res.images = this.images.clone() - } + if(this.data){ + res.data = this.data.clone() + } + if(this.images){ + res.images = this.images.clone() + } - return res - }], + return res + }], // XXX should this be here??? // XXX should this use .load(..) @@ -4182,6 +4183,12 @@ var URLHistoryUIActions = actions.Actions({ }) to_remove = [] } + var makeRE = function(path){ + return RegExp('^' + // quote regular expression chars... + +p.replace(/([\.\\\/\(\)\[\]\$\*\+\-\{\}\@\^\&\?\<\>])/g, '\\$1') + +'$') + } var o = overlay.Overlay(this.ribbons.viewer, browse.makeList( @@ -4194,7 +4201,7 @@ var URLHistoryUIActions = actions.Actions({ ['♦', function(p){ var top = this.filter().first() - var cur = this.filter(p) + var cur = this.filter(makeRE(p)) if(!top.is(cur)){ top.before(cur) @@ -4204,7 +4211,7 @@ var URLHistoryUIActions = actions.Actions({ // mark for removal... ['×', function(p){ - var e = this.filter(p) + var e = this.filter(makeRE(p)) .toggleClass('strike-out') if(e.hasClass('strike-out')){