mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-30 19:00:09 +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;
|
float: left;
|
||||||
font-size: small;
|
font-size: small;
|
||||||
}
|
}
|
||||||
.browse-widget.filtering .list>div .text:before {
|
.browse-widget.filtering .list>div .text:first-child:before {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.browse-widget .list>div .text:before {
|
.browse-widget .list>div .text:first-child:before {
|
||||||
width: 12px;
|
width: 12px;
|
||||||
margin-left: -15px;
|
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";
|
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";
|
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";
|
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";
|
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";
|
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";
|
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";
|
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";
|
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";
|
content: "9";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -21,6 +21,9 @@ define(function(require){ var module = {}
|
|||||||
var actions = require('lib/actions')
|
var actions = require('lib/actions')
|
||||||
var core = require('features/core')
|
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 {
|
// .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 top = this.filter('*', false).first()
|
||||||
var cur = this.filter('"'+p+'"', false)
|
var cur = this.filter('"'+p+'"', false)
|
||||||
|
|
||||||
|
console.log('!!!', p)
|
||||||
|
|
||||||
if(!top.is(cur)){
|
if(!top.is(cur)){
|
||||||
top.before(cur)
|
top.before(cur)
|
||||||
that.setTopURLHistory(p)
|
that.setTopURLHistory(p)
|
||||||
|
|||||||
@ -160,7 +160,12 @@ TREE.dir_c.dir_b.tree = TREE
|
|||||||
var use_disabled = true
|
var use_disabled = true
|
||||||
var show_files = false
|
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
|
keyboard = k
|
||||||
object = o
|
object = o
|
||||||
toggler = t
|
toggler = t
|
||||||
|
|||||||
@ -20,9 +20,9 @@ define(function(require){ var module = {}
|
|||||||
|
|
||||||
//var promise = require('promise')
|
//var promise = require('promise')
|
||||||
|
|
||||||
var toggler = require('lib/toggler')
|
var toggler = require('../toggler')
|
||||||
var keyboard = require('lib/keyboard')
|
var keyboard = require('../keyboard')
|
||||||
var object = require('lib/object')
|
var object = require('../object')
|
||||||
var widget = require('./widget')
|
var widget = require('./widget')
|
||||||
|
|
||||||
|
|
||||||
@ -757,6 +757,7 @@ var BrowserPrototype = {
|
|||||||
var make = function(p, traversable, disabled){
|
var make = function(p, traversable, disabled){
|
||||||
// array of str...
|
// array of str...
|
||||||
if(p.constructor === Array){
|
if(p.constructor === Array){
|
||||||
|
var txt = p.join('')
|
||||||
// XXX check if traversable...
|
// XXX check if traversable...
|
||||||
p = $(p.map(function(t){
|
p = $(p.map(function(t){
|
||||||
return $('<span>')
|
return $('<span>')
|
||||||
@ -766,12 +767,14 @@ var BrowserPrototype = {
|
|||||||
|
|
||||||
// jQuery or dom...
|
// jQuery or dom...
|
||||||
} else if(p instanceof jQuery){
|
} else if(p instanceof jQuery){
|
||||||
|
// XXX is this the correct way to do this???
|
||||||
|
var txt = p.text()
|
||||||
// XXX disable search???
|
// XXX disable search???
|
||||||
console.warn('jQuery objects as browse list elements not yet supported.')
|
console.warn('jQuery objects as browse list elements not yet supported.')
|
||||||
|
|
||||||
// str and other stuff...
|
// str and other stuff...
|
||||||
} else {
|
} else {
|
||||||
p = p + ''
|
var txt = p = p + ''
|
||||||
|
|
||||||
// trailing '/' -- dir...
|
// trailing '/' -- dir...
|
||||||
var dir = /[\\\/]\s*$/
|
var dir = /[\\\/]\s*$/
|
||||||
@ -820,7 +823,7 @@ var BrowserPrototype = {
|
|||||||
: that.options.actionButton)
|
: that.options.actionButton)
|
||||||
.click(function(evt){
|
.click(function(evt){
|
||||||
evt.stopPropagation()
|
evt.stopPropagation()
|
||||||
that.select('"'+ p +'"')
|
that.select('"'+ txt +'"')
|
||||||
that.action()
|
that.action()
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
@ -833,7 +836,7 @@ var BrowserPrototype = {
|
|||||||
: that.options.pushButton)
|
: that.options.pushButton)
|
||||||
.click(function(evt){
|
.click(function(evt){
|
||||||
evt.stopPropagation()
|
evt.stopPropagation()
|
||||||
that.push('"'+ p +'"')
|
that.push('"'+ txt +'"')
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -857,11 +860,11 @@ var BrowserPrototype = {
|
|||||||
|
|
||||||
// action name...
|
// action name...
|
||||||
if(typeof(func) == typeof('str')){
|
if(typeof(func) == typeof('str')){
|
||||||
that[func](p)
|
that[func](txt)
|
||||||
|
|
||||||
// handler...
|
// handler...
|
||||||
} else {
|
} else {
|
||||||
func.call(that, p)
|
func.call(that, txt)
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
@ -2092,8 +2095,10 @@ ListPrototype.options = {
|
|||||||
return keys
|
return keys
|
||||||
.map(function(k){
|
.map(function(k){
|
||||||
var disable = null
|
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, '')
|
var n = k.replace(pattern, '')
|
||||||
if(n != k){
|
if(n != k){
|
||||||
disable = true
|
disable = true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user