Skip to content

Commit 55257a4

Browse files
committed
#12 Add edit button in custom fileds list
1 parent 6355b90 commit 55257a4

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

ui/app/scripts/controllers/admin/AdminCustomFieldDialogCtrl.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
var postData = _.pick(self.customField, 'name', 'title', 'label', 'description', 'type');
2424
postData.options = _.isArray(self.customField.options) ? self.customField.options : self.customField.options.split('\n');
2525

26-
if(self.customField.id) {
26+
if(self.customField.id) {
2727
ListSrv.update(
2828
{'itemId': self.customField.id},
2929
{'value': JSON.stringify(postData)},

ui/app/views/partials/admin/case-templates.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ <h4 class="vpad10 text-primary">Case basic information</h4>
101101
<div class="row">
102102
<div class="col-md-6">
103103
<h4 class="vpad10 text-primary">
104-
Case tasks ({{template.tasks.length || 0}})
104+
Tasks ({{template.tasks.length || 0}})
105105
<a class="pull-right" href ng-click="addTask()">
106106
<i class="fa fa-plus"></i>
107107
Add task</a>
@@ -145,7 +145,7 @@ <h4 class="vpad10 text-primary">
145145
</div>
146146
<div class="col-md-6">
147147
<h4 class="vpad10 text-primary">
148-
Case metrics ({{template.metricNames.length || 0}})
148+
Metrics ({{template.metricNames.length || 0}})
149149

150150
<span uib-dropdown class="pull-right">
151151
<a href class="dropdown-toggle" uib-dropdown-toggle>
@@ -194,11 +194,11 @@ <h4 class="vpad10 text-primary">
194194
<div class="row">
195195
<div class="col-md-6">
196196
<h4 class="vpad10 text-primary">
197-
Case custom fields ({{keys(template.customFields).length}})
197+
Custom fields ({{keys(template.customFields).length}})
198198
<span uib-dropdown class="pull-right">
199199
<a href class="dropdown-toggle" uib-dropdown-toggle>
200200
<i class="fa fa-plus"></i>
201-
Add Custom Field
201+
Add custom field
202202
<span class="caret"></span>
203203
</a>
204204
<ul class="dropdown-menu" uib-dropdown-menu>

ui/app/views/partials/admin/custom-fields.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h3 class="box-title">Case custom fields ({{$vm.customFields.length}})</h3>
1919
<th width="250">Label</th>
2020
<th>Description</th>
2121
<th width="200">Options</th>
22-
<th width="200">Actions</th>
22+
<th width="80" class="text-center">Actions</th>
2323
</tr>
2424
</thead>
2525
<tbody>
@@ -38,6 +38,9 @@ <h3 class="box-title">Case custom fields ({{$vm.customFields.length}})</h3>
3838
<li>{{option}}</li>
3939
</ul>
4040
</td>
41+
<td align="center">
42+
<button class="btn btn-xs btn-primary" ng-click="$vm.showFieldDialog(field)"><i class="fa fa-pencil"></i> Edit</button>
43+
</td>
4144
</tr>
4245
</tbody>
4346
</table>

0 commit comments

Comments
 (0)