Skip to content

Commit

Permalink
#12 Add edit button in custom fileds list
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Jun 22, 2017
1 parent 6355b90 commit 55257a4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
var postData = _.pick(self.customField, 'name', 'title', 'label', 'description', 'type');
postData.options = _.isArray(self.customField.options) ? self.customField.options : self.customField.options.split('\n');

if(self.customField.id) {
if(self.customField.id) {
ListSrv.update(
{'itemId': self.customField.id},
{'value': JSON.stringify(postData)},
Expand Down
8 changes: 4 additions & 4 deletions ui/app/views/partials/admin/case-templates.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h4 class="vpad10 text-primary">Case basic information</h4>
<div class="row">
<div class="col-md-6">
<h4 class="vpad10 text-primary">
Case tasks ({{template.tasks.length || 0}})
Tasks ({{template.tasks.length || 0}})
<a class="pull-right" href ng-click="addTask()">
<i class="fa fa-plus"></i>
Add task</a>
Expand Down Expand Up @@ -145,7 +145,7 @@ <h4 class="vpad10 text-primary">
</div>
<div class="col-md-6">
<h4 class="vpad10 text-primary">
Case metrics ({{template.metricNames.length || 0}})
Metrics ({{template.metricNames.length || 0}})

<span uib-dropdown class="pull-right">
<a href class="dropdown-toggle" uib-dropdown-toggle>
Expand Down Expand Up @@ -194,11 +194,11 @@ <h4 class="vpad10 text-primary">
<div class="row">
<div class="col-md-6">
<h4 class="vpad10 text-primary">
Case custom fields ({{keys(template.customFields).length}})
Custom fields ({{keys(template.customFields).length}})
<span uib-dropdown class="pull-right">
<a href class="dropdown-toggle" uib-dropdown-toggle>
<i class="fa fa-plus"></i>
Add Custom Field
Add custom field
<span class="caret"></span>
</a>
<ul class="dropdown-menu" uib-dropdown-menu>
Expand Down
5 changes: 4 additions & 1 deletion ui/app/views/partials/admin/custom-fields.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h3 class="box-title">Case custom fields ({{$vm.customFields.length}})</h3>
<th width="250">Label</th>
<th>Description</th>
<th width="200">Options</th>
<th width="200">Actions</th>
<th width="80" class="text-center">Actions</th>
</tr>
</thead>
<tbody>
Expand All @@ -38,6 +38,9 @@ <h3 class="box-title">Case custom fields ({{$vm.customFields.length}})</h3>
<li>{{option}}</li>
</ul>
</td>
<td align="center">
<button class="btn btn-xs btn-primary" ng-click="$vm.showFieldDialog(field)"><i class="fa fa-pencil"></i> Edit</button>
</td>
</tr>
</tbody>
</table>
Expand Down

0 comments on commit 55257a4

Please sign in to comment.