some minor refactoring...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-12-24 06:48:59 +03:00
parent 4ebdf562dd
commit 2557947a15
4 changed files with 30 additions and 20 deletions

View File

@ -2596,10 +2596,12 @@ var UICollectionActions = actions.Actions({
this.collect(gids || 'current', title) }, 2)],
collectRibbon: ['Collections|Ribbon/Add $ribbon to collection...',
// NOTE: this is not an alias as we need it to be marked as a dialog...
widgets.uiDialog(function(){ return this.collect('ribbon') })],
//widgets.uiDialog(function(){ return this.collect('ribbon') })],
'collect: "ribbon"'],
collectLoaded: ['Collections/$Add loaded images to collection...',
// NOTE: this is not an alias as we need it to be marked as a dialog...
widgets.uiDialog(function(){ return this.collect('loaded') })],
//widgets.uiDialog(function(){ return this.collect('loaded') })],
'collect: "loaded"'],
joinCollect: [
collectionGetterWrapper(function(title){ this.joinCollect(title) })],

View File

@ -644,18 +644,26 @@ var DialogsActions = actions.Actions({
},
// testers...
//
// XXX should these test only the root action or the whole tree???
isUIContainer: ['- Interface/',
actions.doWithRootAction(function(action){
return action != null
&& action.__container__ == true })],
function(action){
return !!this.getActionAttr(action, '__container__') }],
//actions.doWithRootAction(function(action){
// return action != null
// && action.__container__ == true })],
isUIDialog: ['- Interface/',
actions.doWithRootAction(function(action){
return action != null
&& action.__dialog__ == true })],
function(action){
return !!this.getActionAttr(action, '__dialog__') }],
//actions.doWithRootAction(function(action){
// return action != null
// && action.__dialog__ == true })],
isUIElement: ['- Interface/',
actions.doWithRootAction(function(action){
return action != null
&& (action.__dialog__ == true || action.__container__ == true) })],
function(action){
return this.isUIDialog(action) || this.isUIContainer(action) }],
//actions.doWithRootAction(function(action){
// return action != null
// && (action.__dialog__ == true || action.__container__ == true) })],
// container constructors...

View File

@ -145,7 +145,7 @@
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=",
"dev": true,
"requires": {
"brace-expansion": "1.1.8"
@ -200,7 +200,7 @@
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=",
"dev": true,
"requires": {
"brace-expansion": "1.1.8"
@ -2377,7 +2377,7 @@
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=",
"dev": true,
"requires": {
"brace-expansion": "1.1.8"
@ -2527,9 +2527,9 @@
"dev": true
},
"ig-actions": {
"version": "3.11.0",
"resolved": "https://registry.npmjs.org/ig-actions/-/ig-actions-3.11.0.tgz",
"integrity": "sha512-gAWFKy03jdTCJL2xnr9y+JucO2ORXj8wsQUbBlXqoZK0rduSDtgTS+lSEI5DhspFT6lgyTxq/4ULkShdszNTQA==",
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/ig-actions/-/ig-actions-3.12.0.tgz",
"integrity": "sha512-9fRwJKN2K9lP87NS5Cagdp5CEu/Z4CYF59dv++1IjNkvGmrpgHV41nSSW90vk8p1yKlu3zBV6+i7suLFljT90g==",
"requires": {
"ig-object": "1.0.2"
}
@ -2539,7 +2539,7 @@
"resolved": "https://registry.npmjs.org/ig-features/-/ig-features-3.3.2.tgz",
"integrity": "sha512-NSvuVkLUI47f1mpG03/fVqJaMYLDUFVcg2FNXUtqvDqQqKhlZuXJfxsGcoFQ1eIZ1pqYcYeYHmjNbgmK6rT5cA==",
"requires": {
"ig-actions": "3.11.0",
"ig-actions": "3.12.0",
"ig-object": "1.0.2"
}
},
@ -9784,7 +9784,7 @@
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=",
"dev": true,
"requires": {
"brace-expansion": "1.1.8"

View File

@ -22,7 +22,7 @@
"fs-walk": "^0.0.1",
"glob": "^4.0.6",
"guarantee-events": "^1.0.0",
"ig-actions": "^3.11.0",
"ig-actions": "^3.12.0",
"ig-features": "^3.3.2",
"ig-object": "^1.0.2",
"npm": "^5.6.0",