mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Fix jquery selector, selecting more than one help pane/popover and displaying incorrectly. (#970)
This commit is contained in:
		
				
					committed by
					
						
						Nick O'Leary
					
				
			
			
				
	
			
			
			
						parent
						
							9ebca91775
						
					
				
				
					commit
					2a2fc80931
				
			@@ -101,7 +101,7 @@ RED.palette = (function() {
 | 
			
		||||
            if (label != type) {
 | 
			
		||||
                l = "<p><b>"+label+"</b><br/><i>"+type+"</i></p>";
 | 
			
		||||
            }
 | 
			
		||||
            popOverContent = $(l+(info?info:$("script[data-help-name|='"+type+"']").html()||"<p>"+RED._("palette.noInfo")+"</p>").trim())
 | 
			
		||||
            popOverContent = $(l+(info?info:$("script[data-help-name$='"+type+"']").html()||"<p>"+RED._("palette.noInfo")+"</p>").trim())
 | 
			
		||||
                                .filter(function(n) {
 | 
			
		||||
                                    return (this.nodeType == 1 && this.nodeName == "P") || (this.nodeType == 3 && this.textContent.trim().length > 0)
 | 
			
		||||
                                }).slice(0,2);
 | 
			
		||||
@@ -210,7 +210,7 @@ RED.palette = (function() {
 | 
			
		||||
                if (nt.indexOf("subflow:") === 0) {
 | 
			
		||||
                    helpText = marked(RED.nodes.subflow(nt.substring(8)).info||"");
 | 
			
		||||
                } else {
 | 
			
		||||
                    helpText = $("script[data-help-name|='"+d.type+"']").html()||"";
 | 
			
		||||
                    helpText = $("script[data-help-name$='"+d.type+"']").html()||"";
 | 
			
		||||
                }
 | 
			
		||||
                var help = '<div class="node-help">'+helpText+"</div>";
 | 
			
		||||
                RED.sidebar.info.set(help);
 | 
			
		||||
 
 | 
			
		||||
@@ -139,7 +139,7 @@ RED.sidebar.info = (function() {
 | 
			
		||||
        }
 | 
			
		||||
        table += "</tbody></table><hr/>";
 | 
			
		||||
        if (!subflowNode && node.type != "comment") {
 | 
			
		||||
            var helpText = $("script[data-help-name|='"+node.type+"']").html()||"";
 | 
			
		||||
            var helpText = $("script[data-help-name$='"+node.type+"']").html()||"";
 | 
			
		||||
            table  += '<div class="node-help">'+helpText+"</div>";
 | 
			
		||||
        }
 | 
			
		||||
        if (subflowNode) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user