mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
now make supports list args, still not final...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
7b63f5e3c2
commit
4b1a73e30b
@ -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";
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
}]
|
||||
})
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 $('<span>')
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user