nexus site path corrected
[portal.git] / ecomp-portal-FE / client / app / views / dashboard / dashboard-widget-manage.html
1 <!--
2   ================================================================================
3   eCOMP Portal
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
10   
11        http://www.apache.org/licenses/LICENSE-2.0
12   
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   ================================================================================
19   -->
20 <div style="margin-top: 10px; margin-bottom: 10psx;">
21         <h1 class="heading1"></h1>
22 </div>
23 <br />
24
25 <div style="margin-top: 25px;">
26         <div id="title" class="manage-contactUs-home-manageWidgets-title">Manage {{widgetTypeDisplay}} Widgets</div>
27                 <div class="widgets-popup-margin">         
28             <div class="get-access-table">
29                 <div class="table-control" style="margin:30px;">
30                                         <div class="c-ecomp-att-abs-table" style="height:300px"">
31                     <table att-table id="table-main" 
32                         table-data="ignoredTableData"
33                         current-page="ignoredCurrentPage">
34                         <thead att-table-row type="header">
35                                 <tr>
36                                     <th id="th-users-1" att-table-header key="title" sortable="true" >Title</th>
37                                     <th id="th-users-2" att-table-header key="href" sortable="true" >URL</th>
38                                     <th ng-show="{{widgetType=='EVENTS'}}" id="th-users-3" att-table-header key="event_date" sortable="true" >Date</th>
39                                     <th ng-show="{{widgetType=='EVENTS'}}" id="th-users-4" att-table-header key="content" sortable="true" >Content</th>
40                                     <th id="th-users-5" att-table-header key="sortOrder" sortable="true" >Order</th>
41                                     <th id="th-users-6" att-table-header key="edit" sortable="false" >Edit</th>
42                                      <th id="th-users-7" att-table-header key="delete" sortable="false" >Delete</th>
43                                 </tr>
44                         </thead>
45                         <!-- Use track-by="UNIQUE KEY HERE" or leave out if no unique keys in data -->
46                         <tbody att-table-row type="body" class="table-body" track-by="$index" row-repeat="rowData in widgetData">
47                                 <tr id="tr-rowData" ng-click="">
48                                     <td att-table-body>
49                                         <div id="widget-td-title" ng-hide="rowData.showEdit" ng-bind="rowData.title"></div>
50                                        <input  type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].title"/>
51                                     </td>
52                                     <td att-table-body>
53                                         <div id="widget-td-href" ng-hide="rowData.showEdit" ng-bind="rowData.href"></div>
54                                         <input  type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].href"/>
55                                     </td>
56                                     <td  ng-show="{{widgetType=='EVENTS'}}" att-table-body>
57                                         <div id="widget-td-date" ng-hide="rowData.showEdit" ng-bind="rowData.eventDate"></div>
58                                         <input  type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].eventDate"/>
59                                     </td>
60                                     <td  ng-show="{{widgetType=='EVENTS'}}" att-table-body>
61                                         <div id="widget-td-content" ng-hide="rowData.showEdit">{{rowData.content | cut:true:20:' ...'}}</div>
62                                         <input  type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].content"/>
63                                     </td>
64                                     <td att-table-body>
65                                         <div id="widget-td-order" ng-hide="rowData.showEdit" ng-bind="rowData.sortOrder"></div>
66                                         <input  type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].sortOrder"/>      
67                                     </td>                            
68                                     <td att-table-body>
69                                         <div class="delete-contact-us" ng-hide="rowData.showEdit" ng-click="setEdit($index);">
70                                                 <span class="ion-edit"></span>
71                                         </div>
72                                         <span ng-show="rowData.showEdit">
73                                                 <a att-button btn-type="primary" ng-click="modify($index);" class="button button--primary" size="small" >Save</a>
74                                         </span>
75                                     </td>
76                                     <td att-table-body>
77                                         <div class="delete-contact-us" ng-click="remove($index);">
78                                                 <span class="ion-trash-b"></span>
79                                         </div>
80                                     </td>
81                                 </tr>
82                         </tbody>
83                     </table>
84                 </div>
85                 
86                 <div att-divider-lines></div>
87                                         <div style="margin-top: 15px; margin-left: -80px;" >
88                                         <form name = "widgetForm" novalidate>                           
89                                                 <div id="addWidgetHeader" class="contact-us-margin">                            
90                                                         <h1 style="font-size:18px;">Add</h1>
91                                                         <div class="errMsg">{{errMsg}}</div>
92                                                         <div class="sucessMsg" ng-bind="successMsg"></div>
93                                                 </div>                                                            
94                                                 <div id="addWidget" class="contact-us-margin">
95                                                         <div>
96                                                                 <div>
97                                                                         <div class="add-widget-field">
98                                                                    <div id="mots-property-label" class="property-label">Title</div>
99                                                                     <input class="input-text-area" type="text"  ng-model="newWidgetObject.title" name="title" ng-required="true"/>                                                                
100                                                                 </div>
101                                                                 <div class="add-widget-field">
102                                                                     <div  class="property-label">URL</div>
103                                                                     <input class="input-text-area" type="text"  ng-model="newWidgetObject.href" type="url" size="3" name = "url"  ng-required = "true"/>
104                                                                 </div>
105                                                                 <div class="add-widget-field" >
106                                                                     <div class="property-label">Sort Order</div>
107                                                                     <input class="input-text-area" type="text" ng-model="newWidgetObject.sortOrder"/>
108                                                                 </div>
109                                                         </div>
110                                                          <div  class="add-widget-field"  ng-controller="DatePickerController" ng-show="{{widgetType=='EVENTS'}}">
111                                                                     <h4>Event Date</h4>
112                                                                     <div>
113                                                                       <div>
114                                                                         <p class="input-group">
115                                                                           <input type="text" name = "eventDate" datetime="yyyy-MM-dd" class="input-text-area" uib-datepicker-popup="{{format}}" 
116                                                                                         ng-model="newWidgetObject.eventDate" is-open="popup1.opened" datepicker-options="dateOptions" close-text="Close" alt-input-formats="altInputFormats" 
117                                                                            ng-focus="open1()"
118                                                                            ng-required = "widgetType =='EVENTS'" />
119                                                                         </p>
120                                                                       </div>
121                                                                         </div>
122                                                                 </div>  
123                                                                 
124                                                         <div class="add-contact-us-field-des"  ng-show="{{widgetType=='EVENTS'}}">
125                                                             <div  class="property-label">Content</div>
126                                                             <textarea style="margin-top: 0px; margin-bottom: 0px; height: 150px" ng-model="newWidgetObject.content" name="content" ng-required = "widgetType =='EVENTS'">
127                                                             </textarea>                                                     
128                                                         </div>
129                                                 </div>
130                                                         <div style="height:50px;">
131                                                                         <a style="float:right; margin-top:20px;" att-button btn-type="primary" class="button button--primary" size="small" ng-click="saveNew()">Add New</a>
132                                         
133                                                         </div>
134                                                         
135                                                         <div att-divider-lines></div>
136                                         
137                                                 </div>
138                                         </form>
139                                         </div>
140                                     <div style="height:50px;">
141                                                 <a style="float:right;" att-button btn-type="primary" class="button button--primary" size="small" ng-click="closeDialog()">Close</a>
142                                         </div>           
143             </div>
144         </div>
145     </div>
146 </div>
147         
148 <script type="application/javascript">
149     $(document).ready(function(){
150         $(".ngdialog-content").css("width","85%")
151     });
152 </script>