2 ================================================================================
4 ================================================================================
5 Copyright (C) 2017 AT&T Intellectual Property
6 ================================================================================
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 ================================================================================
20 <%@ page import="org.openecomp.portalsdk.analytics.model.runtime.*" %>
21 <%@ page import="org.openecomp.portalsdk.analytics.system.*" %>
22 <%@ page import="org.openecomp.portalsdk.analytics.util.*" %>
24 <%@ page import="java.net.*" %>
27 <script src='dwr/engine.js'></script>
28 <script src='dwr/util.js'></script>
29 <script src='dwr/interface/fusionAjax.js'></script>
31 <%@ include file="/WEB-INF/fusion/jsp/include.jsp" %>
34 String url = request.getParameter("returnUrl");
37 request.setAttribute("returnUrl", URLDecoder.decode(url, "UTF-8"));
43 <form name="listForm" action="<%=request.getAttribute("returnUrl")%>" method="POST" target="_parent">
44 <input type="hidden" name="selected" value=""/>
48 <!-- Submit record action functionality -->
49 <script type="text/javascript">
50 function submitAction(actionUrl, task, actionUrlParameters) {
52 var formFieldParameters = "";
53 var actionUrlHtml = actionUrl;
55 <!-- Keep track of form field params to ensure the refreshed list matches -->
56 <c:if test="${(param['reset_action'] ne 'Y') && (param['reset_action'] ne 'y')}">
57 <c:forEach items="${param}" var="request_param">
58 <c:if test="${fn:startsWith(request_param.key,\"ff\")}">
59 <c:if test="${!empty request_param.value}">
60 formFieldParameters += "&${request_param.key}=${v:decodeUrl(request_param.value)}";
67 actionUrlHtml += "?task=" + task;
70 if (actionUrlParameters != null) {
71 actionUrlHtml += "&" + actionUrlParameters;
75 document.listForm.action = actionUrlHtml + formFieldParameters;
76 document.listForm.submit();
80 <!-- Select Profile functionality -->
81 <script type="text/javascript">
82 function submitSelection() {
83 var selectedProfiles = document.listForm.selected;
84 var allProfiles = document.formd.selected;
88 numRows = allProfiles.length;
91 for (i=0; i < numRows; i++) {
92 if (allProfiles[i].checked) {
93 selectedProfiles.value += allProfiles[i].value + ",";
97 if (selectedProfiles.value != '') {
98 selectedProfiles.value = selectedProfiles.value.substring(0, selectedProfiles.value.length-1);
102 if (allProfiles.checked) {
103 selectedProfiles.value += allProfiles.value;
108 //alert(selectedProfiles.value);
109 document.listForm.submit();
114 <!-- Profile Search activation/deactivation functionality -->
115 <script type="text/javascript">
116 function toggleUserActive(element, userId) {
117 var user_id = "'"+${user.id}+"'";
118 if(user_id.length == 0) user_id = 1;
120 fusionAjax.toggleUserActive(${user.id}, userId, toggleUserActiveCB);
124 function toggleUserActiveCB(data) {
125 var element = document.getElementById('user_active_' + data);
126 if(element.alt == "Activate") {
127 element.src = "static/fusion/images/active.gif";
128 element.alt = "Inactivate";
131 element.src = "static/fusion/images/inactive.gif";
132 element.alt = "Activate";