mirror of
https://github.com/flynx/ImageGrid.git
synced 2026-01-07 02:41:08 +00:00
some refactoring and docs updated...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
219726e71b
commit
7641b95538
@ -21,6 +21,7 @@ define(function(require){ var module = {}
|
|||||||
var object = require('../object')
|
var object = require('../object')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
// helpers...
|
// helpers...
|
||||||
|
|
||||||
@ -32,6 +33,7 @@ function proxyToDom(name){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
|
|
||||||
// NOTE: the widget itself does not need a title, that's the job for
|
// NOTE: the widget itself does not need a title, that's the job for
|
||||||
@ -90,6 +92,8 @@ var BrowserClassPrototype = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// XXX Q: should we make a base list dialog and build this on that or
|
// XXX Q: should we make a base list dialog and build this on that or
|
||||||
// simplify this to implement a list (removing the path and disabling
|
// simplify this to implement a list (removing the path and disabling
|
||||||
// traversal)??
|
// traversal)??
|
||||||
@ -148,6 +152,7 @@ var BrowserPrototype = {
|
|||||||
'/',
|
'/',
|
||||||
'A',
|
'A',
|
||||||
|
|
||||||
|
// let the system handle copy paste...
|
||||||
'C',
|
'C',
|
||||||
'V',
|
'V',
|
||||||
'X',
|
'X',
|
||||||
@ -172,6 +177,7 @@ var BrowserPrototype = {
|
|||||||
'/',
|
'/',
|
||||||
'A',
|
'A',
|
||||||
|
|
||||||
|
// let the system handle copy paste...
|
||||||
'C',
|
'C',
|
||||||
'V',
|
'V',
|
||||||
'X',
|
'X',
|
||||||
@ -342,16 +348,18 @@ var BrowserPrototype = {
|
|||||||
set path(value){
|
set path(value){
|
||||||
return this.update(value)
|
return this.update(value)
|
||||||
},
|
},
|
||||||
|
|
||||||
// String path...
|
// String path...
|
||||||
|
//
|
||||||
|
// NOTE: the setter is just a shorthand to .path setter for uniformity...
|
||||||
get strPath(){
|
get strPath(){
|
||||||
return '/' + this.path.join('/')
|
return '/' + this.path.join('/')
|
||||||
},
|
},
|
||||||
// NOTE: this is just a shorthand to .path for uniformity...
|
|
||||||
set strPath(value){
|
set strPath(value){
|
||||||
this.path = value
|
this.path = value
|
||||||
},
|
},
|
||||||
|
|
||||||
// Copy/Paste...
|
// Copy/Paste actions...
|
||||||
//
|
//
|
||||||
// XXX use 'Test' for IE...
|
// XXX use 'Test' for IE...
|
||||||
copy: function(){
|
copy: function(){
|
||||||
@ -1043,8 +1051,8 @@ var BrowserPrototype = {
|
|||||||
|
|
||||||
// Push an element to path / go down one level...
|
// Push an element to path / go down one level...
|
||||||
//
|
//
|
||||||
// XXX trigger a "push" event... (???)
|
|
||||||
// XXX might be a good idea to add a live traversable check...
|
// XXX might be a good idea to add a live traversable check...
|
||||||
|
// XXX revise event...
|
||||||
push: function(elem){
|
push: function(elem){
|
||||||
var browser = this.dom
|
var browser = this.dom
|
||||||
var elem = this.select(elem || '!')
|
var elem = this.select(elem || '!')
|
||||||
@ -1061,8 +1069,13 @@ var BrowserPrototype = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var path = this.path
|
var path = this.path
|
||||||
|
var txt = elem.text()
|
||||||
path.push(elem.text())
|
path.push(elem.text())
|
||||||
|
|
||||||
|
// XXX should this be before or after the actual path update???
|
||||||
|
// XXX can we cancel the update from a handler???
|
||||||
|
this.trigger('push', path)
|
||||||
|
|
||||||
// do the actual traverse...
|
// do the actual traverse...
|
||||||
this.path = path
|
this.path = path
|
||||||
|
|
||||||
@ -1073,7 +1086,7 @@ var BrowserPrototype = {
|
|||||||
|
|
||||||
// Pop an element off the path / go up one level...
|
// Pop an element off the path / go up one level...
|
||||||
//
|
//
|
||||||
// XXX trigger a "pop" event... (???)
|
// XXX revise event...
|
||||||
pop: function(){
|
pop: function(){
|
||||||
var browser = this.dom
|
var browser = this.dom
|
||||||
|
|
||||||
@ -1084,6 +1097,10 @@ var BrowserPrototype = {
|
|||||||
var path = this.path
|
var path = this.path
|
||||||
var dir = path.pop()
|
var dir = path.pop()
|
||||||
|
|
||||||
|
// XXX should this be before or after the actual path update???
|
||||||
|
// XXX can we cancel the update from a handler???
|
||||||
|
this.trigger('pop', path)
|
||||||
|
|
||||||
this.update(path)
|
this.update(path)
|
||||||
|
|
||||||
this.select('"'+dir+'"')
|
this.select('"'+dir+'"')
|
||||||
@ -1116,7 +1133,8 @@ var BrowserPrototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
// extension methods...
|
// Extension methods...
|
||||||
|
// ...these are resolved from .options
|
||||||
|
|
||||||
// Open action...
|
// Open action...
|
||||||
//
|
//
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user