0197e9dd46d3b49956d2df5bf4e55ff636244ca5
[portal.git] / ecomp-portal-FE-common / client / app / views / dashboard / dashboard-widget-manage.html
1 <!--
2   ============LICENSE_START==========================================
3   ONAP Portal
4   ===================================================================
5   Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6   ===================================================================
7  
8   Unless otherwise specified, all software contained herein is licensed
9   under the Apache License, Version 2.0 (the “License”);
10   you may not use this software except in compliance with the License.
11   You may obtain a copy of the License at
12  
13               http://www.apache.org/licenses/LICENSE-2.0
14  
15   Unless required by applicable law or agreed to in writing, software
16   distributed under the License is distributed on an "AS IS" BASIS,
17   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18   See the License for the specific language governing permissions and
19   limitations under the License.
20  
21   Unless otherwise specified, all documentation contained herein is licensed
22   under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
23   you may not use this documentation except in compliance with the License.
24   You may obtain a copy of the License at
25  
26               https://creativecommons.org/licenses/by/4.0/
27  
28   Unless required by applicable law or agreed to in writing, documentation
29   distributed under the License is distributed on an "AS IS" BASIS,
30   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31   See the License for the specific language governing permissions and
32   limitations under the License.
33  
34   ============LICENSE_END============================================
35  
36   ECOMP is a trademark and service mark of AT&T Intellectual Property.
37   -->
38  
39
40 <div class="manage-widget-txt">
41
42                 <div class="b2b-modal-header">
43                         <h2 class="title" id="manage-contactUs-home-manageWidgets-title">Manage {{widgetTypeDisplay}} Widgets</h2>
44
45                         <div class="corner-button in">
46                                 <button type="button" class="close" aria-label="Close"
47                                         ng-click="$dismiss('cancel')"></button>
48                         </div>
49                 </div>
50
51 <div class="b2b-modal-body" tabindex="0" role="region" aria-label="Modal header text content"   >
52             <div class="get-access-table">
53                 <div class="table-control widget-table-control">
54                                         <div class="c-ecomp-portal-abs-table widget-table" >
55                     <table b2b-table id="table-main" 
56                         table-data="ignoredTableData"
57                         current-page="ignoredCurrentPage">
58                         <thead b2b-table-row type="header">
59                                 <tr>
60                                     <th id="th-users-1" b2b-table-header key="title" sortable="true" >Title</th>
61                                     <th id="th-users-2" b2b-table-header key="href" sortable="true" >URL</th>
62                                     <th ng-show="{{widgetType=='EVENTS'}}" id="th-users-3" b2b-table-header key="event_date" sortable="true" >Date</th>
63                                     <th ng-show="{{widgetType=='EVENTS'}}" id="th-users-4" b2b-table-header key="content" sortable="true" >Content</th>
64                                     <th id="th-users-5" b2b-table-header key="sortOrder" sortable="true" >Order</th>
65                                     <th id="th-users-6" b2b-table-header key="edit" sortable="false" >Edit</th>
66                                      <th id="th-users-7" b2b-table-header key="delete" sortable="false" >Delete</th>
67                                 </tr>
68                         </thead>
69                         <!-- Use track-by="UNIQUE KEY HERE" or leave out if no unique keys in data -->
70                         <tbody b2b-table-row type="body" class="table-body" track-by="$index" row-repeat="rowData in widgetData">
71                                 <tr id="tr-rowData" ng-click="">
72                                     <td b2b-table-body>
73                                         <div id="widget-td-title" ng-hide="rowData.showEdit" ng-bind="rowData.title"></div>
74                                        <input id="widget-input-title-{{$index}}"  type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].title"/>
75                                     </td>
76                                     <td b2b-table-body>
77                                         <div id="widget-td-href" ng-hide="rowData.showEdit" ng-bind="rowData.href"></div>
78                                         <input id="widget-input-href-{{$index}}" type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].href"/>
79                                     </td>
80                                     <td  ng-show="{{widgetType=='EVENTS'}}" b2b-table-body>
81                                         <div id="widget-td-date" ng-hide="rowData.showEdit" ng-bind="rowData.eventDate"></div>
82                                         <input id="widget-input-date-{{$index}}" type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].eventDate"/>
83                                     </td>
84                                     <td  ng-show="{{widgetType=='EVENTS'}}" b2b-table-body>
85                                         <div id="widget-td-content" ng-hide="rowData.showEdit">{{rowData.content | cut:true:20:' ...'}}</div>
86                                         <input id="widget-input-content-{{$index}}"  type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].content"/>
87                                     </td>
88                                     <td b2b-table-body>
89                                         <div id="widget-td-order" ng-hide="rowData.showEdit" ng-bind="rowData.sortOrder"></div>
90                                         <input id="widget-input-order-{{$index}}"  type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].sortOrder"/>      
91                                     </td>                            
92                                     <td b2b-table-body>
93                                         <div id="edit-contact-us-button" class="delete-contact-us" ng-hide="rowData.showEdit" ng-click="setEdit($index);">
94                                                 <span class="icon-edit"></span>
95                                         </div>
96                                         <span ng-show="rowData.showEdit">
97                                                 <a id="save-button"  ng-click="modify($index);" class="btn btn-alt btn-small" size="small" >Save</a>
98                                         </span>
99                                     </td>
100                                     <td b2b-table-body>
101                                         <div id="remove-contact-us" class="delete-contact-us" ng-click="remove($index);">
102                                                 <span class="icon-misc-trash"></span>
103                                         </div>
104                                     </td>
105                                 </tr>
106                         </tbody>
107                     </table>
108                 </div>
109                 
110                                         <div class="widget-field" >
111                                         <form name = "widgetForm" novalidate>                           
112                                                 <div id="addWidgetHeader" class="contact-us-margin">                            
113                                                         <h1 class="widget-add">Add</h1>
114                                                         <div class="errMsg">{{errMsg}}</div>
115                                                         <div class="sucessMsg" ng-bind="successMsg"></div>
116                                                 </div>                                                            
117                                                 <div id="addWidget" class="contact-us-margin">
118                                                         <div>
119                                                                 <div>
120                                                                         <div class="add-widget-field">
121                                                                    <div id="mots-property-label" class="property-label">Title</div>
122                                                                     <input id="widget-input-add-title" class="input-text-area" type="text"  ng-model="newWidgetObject.title" name="title" ng-required="true"/>                                                            
123                                                                 </div>
124                                                                 <div class="add-widget-field">
125                                                                     <div  class="property-label">URL</div>
126                                                                     <input id="widget-input-add-url" class="input-text-area" type="text"  ng-model="newWidgetObject.href" type="url" size="3" name = "url"  ng-required = "true"/>
127                                                                 </div>
128                                                                 <div class="add-widget-field" >
129                                                                     <div class="property-label">Sort Order</div>
130                                                                     <input id="widget-input-add-order" class="input-text-area" type="text" ng-model="newWidgetObject.sortOrder"/>
131                                                                 </div>
132                                                         </div>
133                                                         <div  class="add-widget-field">
134                                                                 <h4>Event Date</h4>
135                                                                 <input class="notif-input-calendar" type="text" id="datepicker-end" 
136                                                                         ng-model="newWidgetObject.eventDate" b2b-datepicker min="minDate" max="maxDate" 
137                                                                         required />
138                                                                 </div>
139                                                                 
140                                                         <div class="add-contact-us-field-des"  ng-show="{{widgetType=='EVENTS'}}">
141                                                             <div  class="property-label">Content</div>
142                                                             <textarea class="widget-type-txt-area" ng-model="newWidgetObject.content" name="content" ng-required = "widgetType =='EVENTS'">
143                                                             </textarea>                                                     
144                                                         </div>
145                                                 </div>
146                                                         
147                                                         
148                                         
149                                                 </div>
150                                         </form>
151                                         </div>
152                                         
153             </div>
154     </div>
155         
156                         </div>
157                         <br>
158                         <div class="b2b-modal-footer">
159                         <div class="dialog-control">
160                                         <a id="add-button" class="btn btn-alt btn-small"  ng-click="saveNew()">Add New</a>
161                                         
162                                                 <a id="close-button"  class="btn btn-alt btn-small"  ng-click="$dismiss('cancel')">Close</a>
163   
164     </div>
165                         
166                 </div>
167
168 </div>
169
170 <script type="application/javascript">
171     $(document).ready(function(){
172         $(".ngdialog-content").css("width","85%");
173         $(".ngdialog-close").attr('id','dialog-close');
174     });
175 </script>