mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Allow toolip action/content to be updated
This commit is contained in:
		| @@ -436,18 +436,17 @@ RED.popover = (function() { | ||||
|     return { | ||||
|         create: createPopover, | ||||
|         tooltip: function(target,content, action) { | ||||
|             var label = content; | ||||
|             if (action) { | ||||
|                 label = function() { | ||||
|                     var label = content; | ||||
|             var label = function() { | ||||
|                 var label = content; | ||||
|                 if (action) { | ||||
|                     var shortcut = RED.keyboard.getShortcut(action); | ||||
|                     if (shortcut && shortcut.key) { | ||||
|                         label = $('<span>'+content+' <span class="red-ui-popover-key">'+RED.keyboard.formatKey(shortcut.key, true)+'</span></span>'); | ||||
|                     } | ||||
|                     return label; | ||||
|                 } | ||||
|                 return label; | ||||
|             } | ||||
|             return RED.popover.create({ | ||||
|             var popover = RED.popover.create({ | ||||
|                 tooltip: true, | ||||
|                 target:target, | ||||
|                 trigger: "hover", | ||||
| @@ -456,6 +455,14 @@ RED.popover = (function() { | ||||
|                 content: label, | ||||
|                 delay: { show: 750, hide: 50 } | ||||
|             }); | ||||
|             popover.setContent = function(newContent) { | ||||
|                 content = newContent; | ||||
|             } | ||||
|             popover.setAction = function(newAction) { | ||||
|                 action = newAction; | ||||
|             } | ||||
|             return popover; | ||||
|  | ||||
|         }, | ||||
|         menu: function(options) { | ||||
|             var list = $('<ul class="red-ui-menu"></ul>'); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user