mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 03:10:07 +00:00 
			
		
		
		
	minor tweaks and fixes to the alias feature...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									b236545451
								
							
						
					
					
						commit
						958cae1e1b
					
				| @ -156,7 +156,7 @@ var UIAliasActions = actions.Actions({ | |||||||
| 
 | 
 | ||||||
| 					make('---') | 					make('---') | ||||||
| 
 | 
 | ||||||
| 					make('New...', { events: { | 					make('$New...', { events: { | ||||||
| 						open: function(){  | 						open: function(){  | ||||||
| 							that.editAlias()  | 							that.editAlias()  | ||||||
| 								.on('close', function(){ dialog.update() }) | 								.on('close', function(){ dialog.update() }) | ||||||
| @ -204,7 +204,7 @@ var UIAliasActions = actions.Actions({ | |||||||
| 					} | 					} | ||||||
| 
 | 
 | ||||||
| 					// doc fields...
 | 					// doc fields...
 | ||||||
| 					make.Editable(['Path:', that.getActionAttr(alias, 'doc')], item_opts) | 					make.Editable(['$Path:', that.getActionAttr(alias, 'doc')], item_opts) | ||||||
| 						.on('edit-commit', function(evt, text){  | 						.on('edit-commit', function(evt, text){  | ||||||
| 							if(data.length > 1 && typeof(data[0]) == typeof('str')){ | 							if(data.length > 1 && typeof(data[0]) == typeof('str')){ | ||||||
| 								data[0] = text | 								data[0] = text | ||||||
| @ -219,7 +219,7 @@ var UIAliasActions = actions.Actions({ | |||||||
| 						multiline: true, | 						multiline: true, | ||||||
| 					} | 					} | ||||||
| 					doc_opts.__proto__ = item_opts | 					doc_opts.__proto__ = item_opts | ||||||
| 					make.Editable(['Doc:', that.getActionAttr(alias, 'long_doc')], doc_opts) | 					make.Editable(['$Doc:', that.getActionAttr(alias, 'long_doc')], doc_opts) | ||||||
| 						.on('edit-commit', function(evt, text){  | 						.on('edit-commit', function(evt, text){  | ||||||
| 							// existing .doc and .long_doc -> replace .long_doc...
 | 							// existing .doc and .long_doc -> replace .long_doc...
 | ||||||
| 							if(data.length > 2  | 							if(data.length > 2  | ||||||
| @ -243,11 +243,11 @@ var UIAliasActions = actions.Actions({ | |||||||
| 					make('---') | 					make('---') | ||||||
| 
 | 
 | ||||||
| 					// alias fields...
 | 					// alias fields...
 | ||||||
| 					make.Editable(['Alias:', alias || ''], item_opts) | 					make.Editable(['$Alias:', alias || ''], item_opts) | ||||||
| 						.on('edit-commit', function(evt, text){  | 						.on('edit-commit', function(evt, text){  | ||||||
| 							name = text | 							name = text | ||||||
| 						}) | 						}) | ||||||
| 					make.Editable(['Code:', ((that.config.aliases || {})[alias] || ['']).slice(-1)[0]], item_opts) | 					make.Editable(['$Code:', ((that.config.aliases || {})[alias] || ['']).slice(-1)[0]], item_opts) | ||||||
| 						.on('edit-commit', function(evt, text){  | 						.on('edit-commit', function(evt, text){  | ||||||
| 							data[data.length-1] = text | 							data[data.length-1] = text | ||||||
| 						}) | 						}) | ||||||
| @ -271,7 +271,8 @@ var UIAliasActions = actions.Actions({ | |||||||
| 				}) | 				}) | ||||||
| 				.on('close', function(_, mode){ | 				.on('close', function(_, mode){ | ||||||
| 					// do not save on cancel...
 | 					// do not save on cancel...
 | ||||||
| 					if(mode == 'cancel'){ | 					if(mode == 'cancel'  | ||||||
|  | 							|| ((name == '' || name == null) && !that[name])){ | ||||||
| 						return | 						return | ||||||
| 					} | 					} | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user