diff --git a/ui (gen4)/css/widget/browse.css b/ui (gen4)/css/widget/browse.css index a88f7423..c3fe09cf 100755 --- a/ui (gen4)/css/widget/browse.css +++ b/ui (gen4)/css/widget/browse.css @@ -252,40 +252,40 @@ float: left; font-size: small; } -.browse-widget.filtering .list>div .text:before { +.browse-widget.filtering .list>div .text:first-child:before { display: none; } -.browse-widget .list>div .text:before { +.browse-widget .list>div .text:first-child:before { width: 12px; margin-left: -15px; } -.browse-widget .list>div:nth-of-type(1) .text:before { +.browse-widget .list>div:nth-of-type(1) .text:first-child:before { content: "1"; } -.browse-widget .list>div:nth-of-type(2) .text:before { +.browse-widget .list>div:nth-of-type(2) .text:first-child:before { content: "2"; } -.browse-widget .list>div:nth-of-type(3) .text:before { +.browse-widget .list>div:nth-of-type(3) .text:first-child:before { content: "3"; } -.browse-widget .list>div:nth-of-type(4) .text:before { +.browse-widget .list>div:nth-of-type(4) .text:first-child:before { content: "4"; } -.browse-widget .list>div:nth-of-type(5) .text:before { +.browse-widget .list>div:nth-of-type(5) .text:first-child:before { content: "5"; } -.browse-widget .list>div:nth-of-type(6) .text:before { +.browse-widget .list>div:nth-of-type(6) .text:first-child:before { content: "6"; } -.browse-widget .list>div:nth-of-type(7) .text:before { +.browse-widget .list>div:nth-of-type(7) .text:first-child:before { content: "7"; } -.browse-widget .list>div:nth-of-type(8) .text:before { +.browse-widget .list>div:nth-of-type(8) .text:first-child:before { content: "8"; } -.browse-widget .list>div:nth-of-type(9) .text:before { +.browse-widget .list>div:nth-of-type(9) .text:first-child:before { content: "9"; } diff --git a/ui (gen4)/features/exif.js b/ui (gen4)/features/exif.js index dc1abe34..5cf95c2c 100755 --- a/ui (gen4)/features/exif.js +++ b/ui (gen4)/features/exif.js @@ -21,6 +21,9 @@ define(function(require){ var module = {} var actions = require('lib/actions') var core = require('features/core') +var browse = require('lib/widget/browse') +var overlay = require('lib/widget/overlay') + /*********************************************************************/ @@ -191,6 +194,25 @@ var MetadataUIActions = actions.Actions({ // } // .metadata-browser .list>div .text:last-child { // } + + + var o = overlay.Overlay(this.ribbons.viewer, + browse.makeList( + null, + [ + ['aaa', 'bbb'], + ['bbb', 'ccc'], + ['ccc', 'ddd'], + ]) + // path selected... + .open(function(evt, path){ + console.log('!!!!!', path) + o.close() + })) + .close(function(){ + }) + + return o }] }) diff --git a/ui (gen4)/features/history.js b/ui (gen4)/features/history.js index 3613e156..bc0c6b6d 100755 --- a/ui (gen4)/features/history.js +++ b/ui (gen4)/features/history.js @@ -385,6 +385,8 @@ var URLHistoryUIActions = actions.Actions({ var top = this.filter('*', false).first() var cur = this.filter('"'+p+'"', false) + console.log('!!!', p) + if(!top.is(cur)){ top.before(cur) that.setTopURLHistory(p) diff --git a/ui (gen4)/lib/widget/browse.html b/ui (gen4)/lib/widget/browse.html index 6ea5fe37..f13a3271 100755 --- a/ui (gen4)/lib/widget/browse.html +++ b/ui (gen4)/lib/widget/browse.html @@ -160,7 +160,12 @@ TREE.dir_c.dir_b.tree = TREE var use_disabled = true var show_files = false -requirejs(['../keyboard', '../object', '../toggler', './browse'], function(k, o, t, br){ +requirejs([ + '../keyboard', + '../object', + '../toggler', + './browse' + ], function(k, o, t, br){ keyboard = k object = o toggler = t diff --git a/ui (gen4)/lib/widget/browse.js b/ui (gen4)/lib/widget/browse.js index 563b1de6..c889fbea 100755 --- a/ui (gen4)/lib/widget/browse.js +++ b/ui (gen4)/lib/widget/browse.js @@ -20,9 +20,9 @@ define(function(require){ var module = {} //var promise = require('promise') -var toggler = require('lib/toggler') -var keyboard = require('lib/keyboard') -var object = require('lib/object') +var toggler = require('../toggler') +var keyboard = require('../keyboard') +var object = require('../object') var widget = require('./widget') @@ -757,6 +757,7 @@ var BrowserPrototype = { var make = function(p, traversable, disabled){ // array of str... if(p.constructor === Array){ + var txt = p.join('') // XXX check if traversable... p = $(p.map(function(t){ return $('') @@ -766,12 +767,14 @@ var BrowserPrototype = { // jQuery or dom... } else if(p instanceof jQuery){ + // XXX is this the correct way to do this??? + var txt = p.text() // XXX disable search??? console.warn('jQuery objects as browse list elements not yet supported.') // str and other stuff... } else { - p = p + '' + var txt = p = p + '' // trailing '/' -- dir... var dir = /[\\\/]\s*$/ @@ -820,7 +823,7 @@ var BrowserPrototype = { : that.options.actionButton) .click(function(evt){ evt.stopPropagation() - that.select('"'+ p +'"') + that.select('"'+ txt +'"') that.action() })) } @@ -833,7 +836,7 @@ var BrowserPrototype = { : that.options.pushButton) .click(function(evt){ evt.stopPropagation() - that.push('"'+ p +'"') + that.push('"'+ txt +'"') })) } @@ -857,11 +860,11 @@ var BrowserPrototype = { // action name... if(typeof(func) == typeof('str')){ - that[func](p) + that[func](txt) // handler... } else { - func.call(that, p) + func.call(that, txt) } })) }) @@ -2092,8 +2095,10 @@ ListPrototype.options = { return keys .map(function(k){ var disable = null + var n = k - if(pattern){ + // XXX make this support list args as well... + if(pattern && typeof(k) == typeof('str')){ var n = k.replace(pattern, '') if(n != k){ disable = true