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 ================================================================================
22 <div class="manage-widget-txt">
24 <div class="b2b-modal-header">
25 <h2 class="title" id="manage-contactUs-home-manageWidgets-title">Manage {{widgetTypeDisplay}} Widgets</h2>
27 <div class="corner-button in">
28 <button type="button" class="close" aria-label="Close"
29 ng-click="$dismiss('cancel')"></button>
33 <div class="b2b-modal-body" tabindex="0" role="region" aria-label="Modal header text content" >
34 <div class="get-access-table">
35 <div class="table-control widget-table-control">
36 <div class="c-ecomp-portal-abs-table widget-table" >
37 <table b2b-table id="table-main"
38 table-data="ignoredTableData"
39 current-page="ignoredCurrentPage">
40 <thead b2b-table-row type="header">
42 <th id="th-users-1" b2b-table-header key="title" sortable="true" >Title</th>
43 <th id="th-users-2" b2b-table-header key="href" sortable="true" >URL</th>
44 <th ng-show="{{widgetType=='EVENTS'}}" id="th-users-3" b2b-table-header key="event_date" sortable="true" >Date</th>
45 <th ng-show="{{widgetType=='EVENTS'}}" id="th-users-4" b2b-table-header key="content" sortable="true" >Content</th>
46 <th id="th-users-5" b2b-table-header key="sortOrder" sortable="true" >Order</th>
47 <th id="th-users-6" b2b-table-header key="edit" sortable="false" >Edit</th>
48 <th id="th-users-7" b2b-table-header key="delete" sortable="false" >Delete</th>
51 <!-- Use track-by="UNIQUE KEY HERE" or leave out if no unique keys in data -->
52 <tbody b2b-table-row type="body" class="table-body" track-by="$index" row-repeat="rowData in widgetData">
53 <tr id="tr-rowData" ng-click="">
55 <div id="widget-td-title" ng-hide="rowData.showEdit" ng-bind="rowData.title"></div>
56 <input id="widget-input-title-{{$index}}" type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].title"/>
59 <div id="widget-td-href" ng-hide="rowData.showEdit" ng-bind="rowData.href"></div>
60 <input id="widget-input-href-{{$index}}" type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].href"/>
62 <td ng-show="{{widgetType=='EVENTS'}}" b2b-table-body>
63 <div id="widget-td-date" ng-hide="rowData.showEdit" ng-bind="rowData.eventDate"></div>
64 <input id="widget-input-date-{{$index}}" type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].eventDate"/>
66 <td ng-show="{{widgetType=='EVENTS'}}" b2b-table-body>
67 <div id="widget-td-content" ng-hide="rowData.showEdit">{{rowData.content | cut:true:20:' ...'}}</div>
68 <input id="widget-input-content-{{$index}}" type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].content"/>
71 <div id="widget-td-order" ng-hide="rowData.showEdit" ng-bind="rowData.sortOrder"></div>
72 <input id="widget-input-order-{{$index}}" type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].sortOrder"/>
75 <div id="edit-contact-us-button" class="delete-contact-us" ng-hide="rowData.showEdit" ng-click="setEdit($index);">
76 <span class="icon-edit"></span>
78 <span ng-show="rowData.showEdit">
79 <a id="save-button" ng-click="modify($index);" class="btn btn-alt btn-small" size="small" >Save</a>
83 <div id="remove-contact-us" class="delete-contact-us" ng-click="remove($index);">
84 <span class="icon-misc-trash"></span>
92 <div class="widget-field" >
93 <form name = "widgetForm" novalidate>
94 <div id="addWidgetHeader" class="contact-us-margin">
95 <h1 class="widget-add">Add</h1>
96 <div class="errMsg">{{errMsg}}</div>
97 <div class="sucessMsg" ng-bind="successMsg"></div>
99 <div id="addWidget" class="contact-us-margin">
102 <div class="add-widget-field">
103 <div id="mots-property-label" class="property-label">Title</div>
104 <input id="widget-input-add-title" class="input-text-area" type="text" ng-model="newWidgetObject.title" name="title" ng-required="true"/>
106 <div class="add-widget-field">
107 <div class="property-label">URL</div>
108 <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"/>
110 <div class="add-widget-field" >
111 <div class="property-label">Sort Order</div>
112 <input id="widget-input-add-order" class="input-text-area" type="text" ng-model="newWidgetObject.sortOrder"/>
115 <div class="add-widget-field">
117 <input class="notif-input-calendar" type="text" id="datepicker-end"
118 ng-model="newWidgetObject.eventDate" b2b-datepicker min="minDate" max="maxDate"
122 <div class="add-contact-us-field-des" ng-show="{{widgetType=='EVENTS'}}">
123 <div class="property-label">Content</div>
124 <textarea class="widget-type-txt-area" ng-model="newWidgetObject.content" name="content" ng-required = "widgetType =='EVENTS'">
140 <div class="b2b-modal-footer">
141 <div class="dialog-control">
142 <a id="add-button" class="btn btn-alt btn-small" ng-click="saveNew()">Add New</a>
144 <a id="close-button" class="btn btn-alt btn-small" ng-click="$dismiss('cancel')">Close</a>
152 <script type="application/javascript">
153 $(document).ready(function(){
154 $(".ngdialog-content").css("width","85%");
155 $(".ngdialog-close").attr('id','dialog-close');