summaryrefslogtreecommitdiffstats
path: root/idrop-web/grails-app/views/rule
diff options
context:
space:
mode:
authormconway <michael_conway@unc.edu>2013-10-25 13:23:27 (GMT)
committer mconway <michael_conway@unc.edu>2013-10-25 13:23:27 (GMT)
commit96097f863f1271d6c519c6fe32bfa1ef704305fc (patch)
tree08a8481a809324aa2398d33868f488aaa3b59fe1 /idrop-web/grails-app/views/rule
parent02a585f5d26addf2a3920d3c860200166b805483 (diff)
downloadQCG-Data-96097f863f1271d6c519c6fe32bfa1ef704305fc.zip
QCG-Data-96097f863f1271d6c519c6fe32bfa1ef704305fc.tar.gz
QCG-Data-96097f863f1271d6c519c6fe32bfa1ef704305fc.tar.bz2
[#1458] delete parms
Diffstat (limited to 'idrop-web/grails-app/views/rule')
-rw-r--r--idrop-web/grails-app/views/rule/_ruleDetails.gsp5
-rwxr-xr-xidrop-web/grails-app/views/rule/index.gsp54
2 files changed, 53 insertions, 6 deletions
diff --git a/idrop-web/grails-app/views/rule/_ruleDetails.gsp b/idrop-web/grails-app/views/rule/_ruleDetails.gsp
index 24793c4..dbd0578 100644
--- a/idrop-web/grails-app/views/rule/_ruleDetails.gsp
+++ b/idrop-web/grails-app/views/rule/_ruleDetails.gsp
@@ -27,7 +27,7 @@
<g:hiddenField name="inputParamName" value="${it.uniqueName}" id="inputParamName"/>
<td>${it.uniqueName}</td>
<td><g:textField name="inputParamValue" id="inputParamValue" value="${it.getStringValue()}" size="80"/></td>
- <td><i class='icon-remove' onclick='deleteInputParam(${it.uniqueName})'></i></td>
+ <td><i class='icon-remove' onclick='deleteInputParam(${"\"" + it.uniqueName + "\""})'></i></td>
</tr>
</g:each>
@@ -38,11 +38,10 @@
<caption><g:message code="text.output.parameters"/></caption>
<g:each in="${rule.outputParameters}">
-
<tr>
<g:hiddenField name="outputParamName" value="${it.uniqueName}" id="outputParamName"/>
<td>${it.uniqueName}</td>
- <td><i class='icon-remove' onclick='deleteOutputParam(${it.uniqueName})'></i></td>
+ <td><i class='icon-remove' onclick='deleteOutputParam(${"\"" + it.uniqueName + "\""})'></i></td>
</tr>
</g:each>
diff --git a/idrop-web/grails-app/views/rule/index.gsp b/idrop-web/grails-app/views/rule/index.gsp
index 246a909..ea4201f 100755
--- a/idrop-web/grails-app/views/rule/index.gsp
+++ b/idrop-web/grails-app/views/rule/index.gsp
@@ -55,13 +55,61 @@
function deleteInputParam(param) {
- alert("input param:" + param);
+
+ if (!param) {
+ return false;
+ }
+
+ var absPath = $("#ruleAbsPath").val();
+ if (absPath == null || absPath == "") {
+ showError("no absPath for rule");
+ return false;
+ }
+
+ var params = {
+ ruleAbsPath : absPath,
+ inputParamName : param
+ }
+
+
+ var jqxhr = $.post(context + "/rule/deleteRuleInputParameter", params, "html").success(
+ function(returnedData, status, xhr) {
+ var continueReq = checkForSessionTimeout(returnedData, xhr);
+ if (!continueReq) {
+ return false;
+ }
+ setMessage("Parameter deleted");
+ $("#ruleDetailDiv").html(returnedData);
+ }).error(function(xhr, status, error) {
+ setErrorMessage(xhr.responseText);
+ });
}
function deleteOutputParam(param) {
- alert("output param:" + param);
- }
+ var absPath = $("#ruleAbsPath").val();
+ if (absPath == null || absPath == "") {
+ showError("no absPath for rule");
+ return false;
+ }
+
+ var params = {
+ ruleAbsPath : absPath,
+ outputParamName : param
+ }
+
+
+ var jqxhr = $.post(context + "/rule/deleteRuleOutputParameter", params, "html").success(
+ function(returnedData, status, xhr) {
+ var continueReq = checkForSessionTimeout(returnedData, xhr);
+ if (!continueReq) {
+ return false;
+ }
+ setMessage("Parameter deleted");
+ $("#ruleDetailDiv").html(returnedData);
+ }).error(function(xhr, status, error) {
+ setErrorMessage(xhr.responseText);
+ }); }
function callSaveRule() {
editor.mirror.save();