summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE-common/client/app/views/dashboard/dashboard-widget-manage.html
blob: 5e78201e2248c4c56085b2dba97929035050bfe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!--
  ================================================================================
  ECOMP Portal
  ================================================================================
  Copyright (C) 2017 AT&T Intellectual Property
  ================================================================================
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
       http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  ================================================================================
  -->
 

<div class="manage-widget-txt">

		<div class="b2b-modal-header">
			<h2 class="title" id="manage-contactUs-home-manageWidgets-title">Manage {{widgetTypeDisplay}} Widgets</h2>

			<div class="corner-button in">
				<button type="button" class="close" aria-label="Close"
					ng-click="$dismiss('cancel')"></button>
			</div>
		</div>

<div class="b2b-modal-body" tabindex="0" role="region" aria-label="Modal header text content"	>
            <div class="get-access-table">
                <div class="table-control widget-table-control">
				  	<div class="c-ecomp-portal-abs-table widget-table" >
                    <table b2b-table id="table-main" 
                    	table-data="ignoredTableData"
                        current-page="ignoredCurrentPage">
                        <thead b2b-table-row type="header">
	                        <tr>
	                            <th id="th-users-1" b2b-table-header key="title" sortable="true" >Title</th>
	                            <th id="th-users-2" b2b-table-header key="href" sortable="true" >URL</th>
	                            <th ng-show="{{widgetType=='EVENTS'}}" id="th-users-3" b2b-table-header key="event_date" sortable="true" >Date</th>
	                            <th ng-show="{{widgetType=='EVENTS'}}" id="th-users-4" b2b-table-header key="content" sortable="true" >Content</th>
	                            <th id="th-users-5" b2b-table-header key="sortOrder" sortable="true" >Order</th>
	                            <th id="th-users-6" b2b-table-header key="edit" sortable="false" >Edit</th>
	                             <th id="th-users-7" b2b-table-header key="delete" sortable="false" >Delete</th>
	                        </tr>
                        </thead>
                        <!-- Use track-by="UNIQUE KEY HERE" or leave out if no unique keys in data -->
                        <tbody b2b-table-row type="body" class="table-body" track-by="$index" row-repeat="rowData in widgetData">
	                        <tr id="tr-rowData" ng-click="">
	                            <td b2b-table-body>
	                                <div id="widget-td-title" ng-hide="rowData.showEdit" ng-bind="rowData.title"></div>
	                               <input id="widget-input-title-{{$index}}"  type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].title"/>
	                            </td>
	                            <td b2b-table-body>
	                                <div id="widget-td-href" ng-hide="rowData.showEdit" ng-bind="rowData.href"></div>
	                                <input id="widget-input-href-{{$index}}" type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].href"/>
	                            </td>
	                            <td  ng-show="{{widgetType=='EVENTS'}}" b2b-table-body>
	                                <div id="widget-td-date" ng-hide="rowData.showEdit" ng-bind="rowData.eventDate"></div>
	                                <input id="widget-input-date-{{$index}}" type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].eventDate"/>
	                            </td>
	                            <td  ng-show="{{widgetType=='EVENTS'}}" b2b-table-body>
	                                <div id="widget-td-content" ng-hide="rowData.showEdit">{{rowData.content | cut:true:20:' ...'}}</div>
	                                <input id="widget-input-content-{{$index}}"  type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].content"/>
	                            </td>
	                            <td b2b-table-body>
	                                <div id="widget-td-order" ng-hide="rowData.showEdit" ng-bind="rowData.sortOrder"></div>
	                                <input id="widget-input-order-{{$index}}"  type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].sortOrder"/>      
	                            </td>                            
	                            <td b2b-table-body>
                                	<div id="edit-contact-us-button" class="delete-contact-us" ng-hide="rowData.showEdit" ng-click="setEdit($index);">
                                		<span class="icon-edit"></span>
                                	</div>
                                	<span ng-show="rowData.showEdit">
                                		<a id="save-button"  ng-click="modify($index);" class="btn btn-alt btn-small" size="small" >Save</a>
                               		</span>
	                            </td>
	                            <td b2b-table-body>
                                	<div id="remove-contact-us" class="delete-contact-us" ng-click="remove($index);">
                                		<span class="icon-misc-trash"></span>
                                	</div>
	                            </td>
	                        </tr>
                        </tbody>
                    </table>
                </div>
                
					<div class="widget-field" >
					<form name = "widgetForm" novalidate>				
						<div id="addWidgetHeader" class="contact-us-margin">				
							<h1 class="widget-add">Add</h1>
							<div class="errMsg">{{errMsg}}</div>
							<div class="sucessMsg" ng-bind="successMsg"></div>
						</div>								  
						<div id="addWidget" class="contact-us-margin">
							<div>
								<div>
									<div class="add-widget-field">
							           <div id="mots-property-label" class="property-label">Title</div>
							            <input id="widget-input-add-title" class="input-text-area" type="text"  ng-model="newWidgetObject.title" name="title" ng-required="true"/>							          
							        </div>
							        <div class="add-widget-field">
							            <div  class="property-label">URL</div>
							            <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"/>
							        </div>
							        <div class="add-widget-field" >
							            <div class="property-label">Sort Order</div>
							            <input id="widget-input-add-order" class="input-text-area" type="text" ng-model="newWidgetObject.sortOrder"/>
							        </div>
						        </div>
						        <div  class="add-widget-field">
							        <h4>Event Date</h4>
							        <input class="notif-input-calendar" type="text" id="datepicker-end" 
									ng-model="newWidgetObject.eventDate" b2b-datepicker min="minDate" max="maxDate" 
									required />
								</div>
								
						        <div class="add-contact-us-field-des"  ng-show="{{widgetType=='EVENTS'}}">
						            <div  class="property-label">Content</div>
						            <textarea class="widget-type-txt-area" ng-model="newWidgetObject.content" name="content" ng-required = "widgetType =='EVENTS'">
						            </textarea>						            
						        </div>
					        </div>
							
							
					
						</div>
					</form>
					</div>
				        
            </div>
    </div>
	
			</div>
			<br>
			<div class="b2b-modal-footer">
			<div class="dialog-control">
					<a id="add-button" class="btn btn-alt btn-small"  ng-click="saveNew()">Add New</a>
					
						<a id="close-button"  class="btn btn-alt btn-small"  ng-click="$dismiss('cancel')">Close</a>
  
    </div>
			
		</div>

</div>

<script type="application/javascript">
    $(document).ready(function(){
        $(".ngdialog-content").css("width","85%");
        $(".ngdialog-close").attr('id','dialog-close');
    });
</script>