Skip to content

Commit 8dd74fd

Browse files
committed
fix custom fields js bug
1 parent 4f238b0 commit 8dd74fd

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

src/Darryldecode/Backend/Components/Dashboard/Views/info.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
RELEASES:
3838
</h3>
3939
</div>
40-
<div class="panel-body">
40+
<div class="panel-body released-body-list">
4141
<ul class="list-group">
4242
<li data-ng-repeat="r in releases" class="list-group-item">
4343
<table class="table table-striped">

src/Darryldecode/Backend/Public/backend/cb/app/custom-fields/controller.manage.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,18 @@ angular.module('cb.customFields').controller('ManageCustomFieldsController', ['$
6262

6363
if( field.key == $scope.fieldGroup.fieldToBeAdded ) {
6464

65+
var fieldCopy = angular.copy(field);
66+
6567
// the name of the custom field, this will be the key for this custom field
6668
// when save on our database and is used for queries
67-
field.data.name = field.key + '_' + $scope.fieldGroup.lastAddedFieldId;
69+
fieldCopy.data.name = field.key + '_' + $scope.fieldGroup.lastAddedFieldId;
6870

6971
// the key of the field, this is only used to hold a unique value of the field
7072
// so we can avoid duplicate error when a same field is added to a form group
71-
field.key = field.key + '_' + $scope.fieldGroup.lastAddedFieldId;
73+
fieldCopy.key = field.key + '_' + $scope.fieldGroup.lastAddedFieldId;
7274

7375
// copy it to avoid reference effect
74-
$scope.fieldGroup.fields.push(angular.copy(field));
76+
$scope.fieldGroup.fields.push(fieldCopy);
7577
}
7678

7779
});

src/Darryldecode/Backend/Public/backend/cb/css/backend.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,15 @@ ul.ul-clear li {
431431
color: #FFF !important;
432432
}
433433

434+
/* DASHBOARD */
435+
.released-body-list {
436+
max-height: 500px;
437+
overflow: auto;
438+
}
439+
.released-body-list table td:first-child {
440+
width: 110px;
441+
}
442+
434443
/* BOOT SWITCH */
435444
.bootstrap-switch {
436445
z-index: auto;

0 commit comments

Comments
 (0)