Skip to content

Commit ad6e23b

Browse files
committed
update theme page
1 parent 128f869 commit ad6e23b

File tree

2 files changed

+46
-16
lines changed

2 files changed

+46
-16
lines changed

app.js

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,14 +1007,42 @@ angular.module('application', ['cp.ngConfirm'])
10071007
btnClass: 'btn-orange',
10081008
},
10091009
},
1010-
onOpen: function ($scope) {
1011-
var that = this;
1012-
$scope.showLoading = function () {
1013-
that.loading(true);
1014-
$timeout(function () {
1015-
that.loading(false);
1016-
}, 2000)
1017-
}
1010+
onScopeReady: function (scope) {
1011+
var self = this;
1012+
scope.type = 'default';
1013+
scope.typeChange = function () {
1014+
self.setType(scope.type);
1015+
};
1016+
1017+
scope.theme = 'light';
1018+
scope.themeChange = function () {
1019+
self.setTheme(scope.theme);
1020+
};
1021+
1022+
scope.icon = self.icon;
1023+
scope.iconChange = function () {
1024+
self.setIcon(scope.icon);
1025+
};
1026+
1027+
scope.title = self.title;
1028+
scope.titleChange = function () {
1029+
self.setTitle(scope.title);
1030+
};
1031+
1032+
scope.closeIcon = self.closeIcon;
1033+
scope.closeIconChange = function () {
1034+
self.setCloseIcon(scope.closeIcon);
1035+
};
1036+
1037+
scope.rtl = self.rtl;
1038+
scope.rtlChange = function () {
1039+
self.setRtl(scope.rtl);
1040+
};
1041+
1042+
scope.closeIconClass = self.closeIconClass;
1043+
scope.closeIconClassChange = function () {
1044+
self.setCloseIconClass(scope.closeIconClass);
1045+
};
10181046
}
10191047
});
10201048
};

themes_popup.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
<div class="form-group">
77
<label class="control-label">Modal type</label>
88
<select name="" class="form-control"
9-
ng-model="ngc.type">
9+
ng-change="typeChange()"
10+
ng-model="type">
1011
<option value="default">default</option>
1112
<option value="blue">blue</option>
1213
<option value="orange">orange</option>
@@ -19,7 +20,8 @@
1920
<div class="form-group">
2021
<label class="control-label">Theme</label>
2122
<select name="" class="form-control"
22-
ng-model="ngc.theme">
23+
ng-change="themeChange()"
24+
ng-model="theme">
2325
<option value="light">light</option>
2426
<option value="dark">dark</option>
2527
<option value="supervan">supervan</option>
@@ -32,35 +34,35 @@
3234
<div class="col-md-6">
3335
<div class="form-group">
3436
<label class="control-label">Icon</label>
35-
<input type="text" class="form-control" ng-model="ngc.icon">
37+
<input type="text" class="form-control" ng-model="icon" ng-change="iconChange()">
3638
</div>
3739
</div>
3840
<div class="col-md-6">
3941
<div class="form-group">
4042
<label class="control-label">Title</label>
41-
<input type="text" class="form-control" ng-model="ngc.title">
43+
<input type="text" class="form-control" ng-model="title" ng-change="titleChange()">
4244
</div>
4345
</div>
4446
<div class="col-md-4">
4547
<div class="checkbox">
4648
<label>
47-
<input type="checkbox" ng-model="ngc.closeIcon">
49+
<input type="checkbox" ng-model="closeIcon" ng-change="closeIconChange()">
4850
Close icon
4951
</label>
5052
</div>
5153
</div>
5254
<div class="col-md-4">
5355
<div class="checkbox">
5456
<label>
55-
<input type="checkbox" ng-model="ngc.rtl">
56-
Rtl {{ngc.rtl}}
57+
<input type="checkbox" ng-model="rtl" ng-change="rtlChange()">
58+
Rtl
5759
</label>
5860
</div>
5961
</div>
6062
<div class="col-md-12">
6163
<div class="form-group">
6264
<label class="control-label">Close icon class</label>
63-
<input type="text" class="form-control" ng-model="ngc.closeIconClass">
65+
<input type="text" class="form-control" ng-model="closeIconClass" ng-change="closeIconClassChange()">
6466
</div>
6567
</div>
6668
</div>

0 commit comments

Comments
 (0)