NIFI-216:

- Code clean up.
- Ensuring the appropriate scripts/stylesheets are referenced in Summary page.
This commit is contained in:
Matt Gilman 2015-01-07 07:46:57 -05:00
parent 4d11ff7830
commit 645837491c
3 changed files with 26 additions and 2 deletions

View File

@ -25,10 +25,15 @@
<link rel="stylesheet" href="js/jquery/tabbs/jquery.tabbs.css?${project.version}" type="text/css" /> <link rel="stylesheet" href="js/jquery/tabbs/jquery.tabbs.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/combo/jquery.combo.css?${project.version}" type="text/css" /> <link rel="stylesheet" href="js/jquery/combo/jquery.combo.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/modal/jquery.modal.css?${project.version}" type="text/css" /> <link rel="stylesheet" href="js/jquery/modal/jquery.modal.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/codemirror/lib/codemirror.css" type="text/css" />
<link rel="stylesheet" href="js/codemirror/addon/hint/show-hint.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/nfeditor/jquery.nfeditor.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/nfeditor/languages/nfel.css?${project.version}" type="text/css" />
<link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.min.css?" type="text/css" /> <link rel="stylesheet" href="js/jquery/qtip2/jquery.qtip.min.css?" type="text/css" />
<link rel="stylesheet" href="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.css" type="text/css" /> <link rel="stylesheet" href="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick.grid.css" type="text/css" /> <link rel="stylesheet" href="js/jquery/slickgrid/css/slick.grid.css" type="text/css" />
<link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.css" type="text/css" /> <link rel="stylesheet" href="js/jquery/slickgrid/css/slick-default-theme.css" type="text/css" />
<script type="text/javascript" src="js/codemirror/lib/codemirror-compressed.js"></script>
<script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script> <script type="text/javascript" src="js/jquery/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.js"></script> <script type="text/javascript" src="js/jquery/ui-smoothness/jquery-ui-1.10.4.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.center.js"></script> <script type="text/javascript" src="js/jquery/jquery.center.js"></script>
@ -50,6 +55,8 @@
<script type="text/javascript" src="js/jquery/slickgrid/slick.grid.js"></script> <script type="text/javascript" src="js/jquery/slickgrid/slick.grid.js"></script>
<script type="text/javascript" src="js/nf/nf-namespace.js?${project.version}"></script> <script type="text/javascript" src="js/nf/nf-namespace.js?${project.version}"></script>
${nf.summary.script.tags} ${nf.summary.script.tags}
<script type="text/javascript" src="js/jquery/nfeditor/languages/nfel.js?${project.version}"></script>
<script type="text/javascript" src="js/jquery/nfeditor/jquery.nfeditor.js?${project.version}"></script>
</head> </head>
<body> <body>
<jsp:include page="/WEB-INF/partials/message-pane.jsp"/> <jsp:include page="/WEB-INF/partials/message-pane.jsp"/>

View File

@ -55,6 +55,7 @@
}; };
var methods = { var methods = {
/** /**
* Initializes the nf editor. * Initializes the nf editor.
* *
@ -118,7 +119,7 @@
} }
} }
}); });
// set the size // set the size
var width = null; var width = null;
if (isDefinedAndNotNull(options.width)) { if (isDefinedAndNotNull(options.width)) {
@ -183,6 +184,7 @@
} }
}); });
}, },
/** /**
* Refreshes the editor. * Refreshes the editor.
*/ */
@ -196,6 +198,7 @@
} }
}); });
}, },
/** /**
* Sets the size of the editor. * Sets the size of the editor.
* *
@ -212,6 +215,7 @@
} }
}); });
}, },
/** /**
* Gets the value of the editor in the first matching selector. * Gets the value of the editor in the first matching selector.
*/ */
@ -231,6 +235,7 @@
return value; return value;
}, },
/** /**
* Sets the value of the editor. * Sets the value of the editor.
* *
@ -249,6 +254,7 @@
} }
}); });
}, },
/** /**
* Sets the focus. * Sets the focus.
*/ */
@ -262,6 +268,7 @@
} }
}); });
}, },
/** /**
* Sets the focus. * Sets the focus.
*/ */
@ -275,6 +282,7 @@
} }
}); });
}, },
/** /**
* Gets whether the value of the editor in the first matching selector has been modified. * Gets whether the value of the editor in the first matching selector has been modified.
*/ */
@ -288,6 +296,7 @@
return modified; return modified;
}, },
/** /**
* Destroys the editor. * Destroys the editor.
*/ */

View File

@ -59,6 +59,8 @@ nf.ProcessorDetails = (function () {
'left': offset.left - 5 'left': offset.left - 5
}).appendTo('body'); }).appendTo('body');
var editor = null;
// so the nfel editor is appropriate // so the nfel editor is appropriate
if (supportsEl(propertyDescriptor)) { if (supportsEl(propertyDescriptor)) {
var languageId = 'nfel'; var languageId = 'nfel';
@ -71,7 +73,7 @@ nf.ProcessorDetails = (function () {
}); });
// create the editor // create the editor
$('<div></div>').addClass(editorClass).appendTo(wrapper).nfeditor({ editor = $('<div></div>').addClass(editorClass).appendTo(wrapper).nfeditor({
languageId: languageId, languageId: languageId,
width: cellNode.width(), width: cellNode.width(),
content: property.value, content: property.value,
@ -101,6 +103,12 @@ nf.ProcessorDetails = (function () {
// add an ok button that will remove the entire pop up // add an ok button that will remove the entire pop up
var ok = $('<div class="button button-normal">Ok</div>').on('click', function () { var ok = $('<div class="button button-normal">Ok</div>').on('click', function () {
// clean up the editor
if (editor !== null) {
editor.nfeditor('destroy');
}
// clean up the rest
wrapper.hide().remove(); wrapper.hide().remove();
}); });
$('<div></div>').css({ $('<div></div>').css({