mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	more work on external viewer/editor ui...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									9f7e267527
								
							
						
					
					
						commit
						598af58101
					
				| @ -387,6 +387,8 @@ module.WidgetTest = core.ImageGridFeatures.Feature({ | ||||
| // 		- pretty name
 | ||||
| // 		- shortcut key
 | ||||
| // 		- image type to open
 | ||||
| // XXX add root button...
 | ||||
| // XXX disable the remove button on "System default"
 | ||||
| // XXX move this to a separate feature...
 | ||||
| 
 | ||||
| var ExternalEditorActions = actions.Actions({ | ||||
| @ -461,8 +463,6 @@ module.ExternalEditor = core.ImageGridFeatures.Feature({ | ||||
| 
 | ||||
| 
 | ||||
| var ExternalEditorUIActions = actions.Actions({ | ||||
| 	// XXX add root button...
 | ||||
| 	// XXX disable the remove button on "System default"
 | ||||
| 	listExtenalEditors: ['Edit/List external editors', | ||||
| 		function(){ | ||||
| 			var that = this | ||||
| @ -529,15 +529,35 @@ var ExternalEditorUIActions = actions.Actions({ | ||||
| 							// move to top...
 | ||||
| 							['♦',  | ||||
| 								function(p){ | ||||
| 									var top = this.filter('*', false).first() | ||||
| 									var target = this.filter(0, false) | ||||
| 									var cur = this.filter('"'+p+'"', false) | ||||
| 
 | ||||
| 									var i = _getEditor(p)  | ||||
| 
 | ||||
| 									if(!top.is(cur)){ | ||||
| 										top.before(cur) | ||||
| 									if(!target.is(cur)){ | ||||
| 										target.before(cur) | ||||
| 										editors.splice(0, 0, editors.splice(i, 1)[0]) | ||||
| 
 | ||||
| 										that.config['external-editors'] = editors | ||||
| 									} | ||||
| 								}], | ||||
| 							// set secondary editor...
 | ||||
| 							// XXX make a simpler icon....
 | ||||
| 							['<span style="letter-spacing: -4px">♦♦</span>',  | ||||
| 								function(p){ | ||||
| 									var target = this.filter(1, false) | ||||
| 									var cur = this.filter('"'+p+'"', false) | ||||
| 
 | ||||
| 									var i = _getEditor(p)  | ||||
| 
 | ||||
| 									if(!target.is(cur)){ | ||||
| 										if(target.prev().is(cur)){ | ||||
| 											target.after(cur) | ||||
| 										} else { | ||||
| 											target.before(cur) | ||||
| 										} | ||||
| 										editors.splice(1, 0, editors.splice(i, 1)[0]) | ||||
| 
 | ||||
| 										that.config['external-editors'] = editors | ||||
| 									} | ||||
| 								}], | ||||
| @ -582,6 +602,7 @@ var ExternalEditorUIActions = actions.Actions({ | ||||
| 					}) | ||||
| 				}) | ||||
| 
 | ||||
| 			o.client.select(0) | ||||
| 			o.client.dom.addClass('editor-list') | ||||
| 
 | ||||
| 			return o | ||||
|  | ||||
| @ -125,12 +125,18 @@ body { | ||||
| 
 | ||||
| 
 | ||||
| .browse-widget.editor-list .list div:first-child .text:after { | ||||
| 	content: "(default)"; | ||||
| 	content: "(primary)"; | ||||
| 	margin-left: 5px; | ||||
| 	opacity: 0.5; | ||||
| 	font-style: italic; | ||||
| } | ||||
| .browse-widget.editor-list .list div:last-child { | ||||
| .browse-widget.editor-list .list div:nth-child(2) .text:after { | ||||
| 	content: "(secondary)"; | ||||
| 	margin-left: 5px; | ||||
| 	opacity: 0.5; | ||||
| 	font-style: italic; | ||||
| } | ||||
| .browse-widget.editor-list .list div:last-child .text { | ||||
| 	font-style: italic; | ||||
| } | ||||
| .browse-widget.editor-list .list div:last-child .button { | ||||
|  | ||||
| @ -230,6 +230,7 @@ module.GLOBAL_KEYBOARD = { | ||||
| 		}, | ||||
| 		E: { | ||||
| 			default: 'openInExtenalEditor', | ||||
| 			shift: 'openInExtenalEditor: 1', | ||||
| 			alt: 'listExtenalEditors', | ||||
| 		}, | ||||
| 		C: 'browseActions: "/Crop/"', | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user