2 ============LICENSE_START==========================================
4 ===================================================================
5 Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 ===================================================================
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
13 http://www.apache.org/licenses/LICENSE-2.0
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.
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
26 https://creativecommons.org/licenses/by/4.0/
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.
34 ============LICENSE_END============================================
40 <div class="manage-widget-txt">
42 <div class="b2b-modal-header">
43 <h2 class="title" id="manage-contactUs-home-manageWidgets-title">Manage {{widgetTypeDisplay}} Widgets</h2>
45 <div class="corner-button in">
46 <button type="button" class="close" aria-label="Close"
47 ng-click="$dismiss('cancel')"></button>
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">
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>
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="">
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"/>
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"/>
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"/>
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"/>
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"/>
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>
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>
101 <div id="remove-contact-us" class="delete-contact-us" ng-click="remove($index);">
102 <span class="icon-misc-trash"></span>
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>
117 <div id="addWidget" class="contact-us-margin">
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"/>
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"/>
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"/>
133 <div class="add-widget-field">
135 <input class="notif-input-calendar" type="text" id="datepicker-end"
136 ng-model="newWidgetObject.eventDate" b2b-datepicker min="minDate" max="maxDate"
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'">
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>
162 <a id="close-button" class="btn btn-alt btn-small" ng-click="$dismiss('cancel')">Close</a>
170 <script type="application/javascript">
171 $(document).ready(function(){
172 $(".ngdialog-content").css("width","85%");
173 $(".ngdialog-close").attr('id','dialog-close');