mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-30 19:00:09 +00:00 
			
		
		
		
	a bit more refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									f2233c93cf
								
							
						
					
					
						commit
						592e13d4e7
					
				| @ -1318,9 +1318,11 @@ module.Collection = core.ImageGridFeatures.Feature({ | |||||||
| 	suggested: [ | 	suggested: [ | ||||||
| 		'collections-local-config', | 		'collections-local-config', | ||||||
| 		'collection-tags', | 		'collection-tags', | ||||||
|  | 		'collection-marks', | ||||||
| 		'auto-collections', | 		'auto-collections', | ||||||
| 
 | 
 | ||||||
| 		'ui-collections', | 		'ui-collections', | ||||||
|  | 		'ui-collection-marks', | ||||||
| 		'fs-collections', | 		'fs-collections', | ||||||
| 	], | 	], | ||||||
| 
 | 
 | ||||||
| @ -2812,9 +2814,6 @@ module.UICollection = core.ImageGridFeatures.Feature({ | |||||||
| 		// XXX needed only for .addMarkedToCollection(..)
 | 		// XXX needed only for .addMarkedToCollection(..)
 | ||||||
| 		'collection-tags', | 		'collection-tags', | ||||||
| 	], | 	], | ||||||
| 	suggested: [ |  | ||||||
| 		'ui-collection-marks', |  | ||||||
| 	], |  | ||||||
| 
 | 
 | ||||||
| 	actions: UICollectionActions,  | 	actions: UICollectionActions,  | ||||||
| 
 | 
 | ||||||
| @ -2857,7 +2856,7 @@ module.UICollection = core.ImageGridFeatures.Feature({ | |||||||
| 
 | 
 | ||||||
| //---------------------------------------------------------------------
 | //---------------------------------------------------------------------
 | ||||||
| 
 | 
 | ||||||
| var UICollectionMarksActions = actions.Actions({ | var CollectionMarksActions = actions.Actions({ | ||||||
| 	config: { | 	config: { | ||||||
| 		'collection-local-tags':  | 		'collection-local-tags':  | ||||||
| 			// XXX need a way to exrtend config values in order of merge
 | 			// XXX need a way to exrtend config values in order of merge
 | ||||||
| @ -2880,22 +2879,6 @@ var UICollectionMarksActions = actions.Actions({ | |||||||
| 	}, | 	}, | ||||||
| 
 | 
 | ||||||
| 	// marked...
 | 	// marked...
 | ||||||
| 	markImagesInCollection: ['Collections|Mark/$Mark images in collection...', |  | ||||||
| 		{browseMode: 'cropImagesInCollection'}, |  | ||||||
| 		mixedModeCollectionAction(function(title){ |  | ||||||
| 			var that = this |  | ||||||
| 			this.ensureCollection(title) |  | ||||||
| 				.then(function(collection){ |  | ||||||
| 					var images = collection.data.getImages('all') |  | ||||||
| 
 |  | ||||||
| 					that.toggleMark(images, 'on') |  | ||||||
| 				}) |  | ||||||
| 		})], |  | ||||||
| 	addMarkedToCollection: ['Collections|Mark/Add marked to $collection...', |  | ||||||
| 		{browseMode: function(){  |  | ||||||
| 			return this.marked.length == 0 && 'disabled' }}, |  | ||||||
| 		mixedModeCollectionAction(function(title){ this.collectMarked(title) })], |  | ||||||
| 
 |  | ||||||
| 	collectMarked: ['- Collections|Mark/', | 	collectMarked: ['- Collections|Mark/', | ||||||
| 		function(collection){ | 		function(collection){ | ||||||
| 			return this.collectTagged('selected', collection) }], | 			return this.collectTagged('selected', collection) }], | ||||||
| @ -2916,6 +2899,45 @@ var UICollectionMarksActions = actions.Actions({ | |||||||
| 			return this.uncollectTagged('bookmark', collection) }], | 			return this.uncollectTagged('bookmark', collection) }], | ||||||
| }) | }) | ||||||
| 
 | 
 | ||||||
|  | var CollectionMarks =  | ||||||
|  | module.CollectionMarks = core.ImageGridFeatures.Feature({ | ||||||
|  | 	title: '', | ||||||
|  | 	doc: '', | ||||||
|  | 
 | ||||||
|  | 	tag: 'collection-marks', | ||||||
|  | 	depends: [ | ||||||
|  | 		'marks', | ||||||
|  | 		'collection-tags', | ||||||
|  | 		'ui-collections', | ||||||
|  | 	], | ||||||
|  | 
 | ||||||
|  | 	actions: CollectionMarksActions, | ||||||
|  | }) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | //---------------------------------------------------------------------
 | ||||||
|  | 
 | ||||||
|  | var UICollectionMarksActions = actions.Actions({ | ||||||
|  | 	// UI...
 | ||||||
|  | 	// XXX should these be a separate feature???
 | ||||||
|  | 	markImagesInCollection: ['Collections|Mark/$Mark images in collection...', | ||||||
|  | 		{browseMode: 'cropImagesInCollection'}, | ||||||
|  | 		mixedModeCollectionAction(function(title){ | ||||||
|  | 			var that = this | ||||||
|  | 			this.ensureCollection(title) | ||||||
|  | 				.then(function(collection){ | ||||||
|  | 					var images = collection.data.getImages('all') | ||||||
|  | 
 | ||||||
|  | 					that.toggleMark(images, 'on') | ||||||
|  | 				}) | ||||||
|  | 		})], | ||||||
|  | 	addMarkedToCollection: ['Collections|Mark/Add marked to $collection...', | ||||||
|  | 		{browseMode: function(){  | ||||||
|  | 			return this.marked.length == 0 && 'disabled' }}, | ||||||
|  | 		mixedModeCollectionAction(function(title){ this.collectMarked(title) })], | ||||||
|  | }) | ||||||
|  | 
 | ||||||
| var UICollectionMarks =  | var UICollectionMarks =  | ||||||
| module.UICollectionMarks = core.ImageGridFeatures.Feature({ | module.UICollectionMarks = core.ImageGridFeatures.Feature({ | ||||||
| 	title: '', | 	title: '', | ||||||
| @ -2923,10 +2945,8 @@ module.UICollectionMarks = core.ImageGridFeatures.Feature({ | |||||||
| 
 | 
 | ||||||
| 	tag: 'ui-collection-marks', | 	tag: 'ui-collection-marks', | ||||||
| 	depends: [ | 	depends: [ | ||||||
| 		'collections', | 		'collection-marks', | ||||||
| 		'collection-tags', |  | ||||||
| 		'ui-collections', | 		'ui-collections', | ||||||
| 		'marks', |  | ||||||
| 	], | 	], | ||||||
| 
 | 
 | ||||||
| 	actions: UICollectionMarksActions, | 	actions: UICollectionMarksActions, | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user