Skip to content

Commit

Permalink
update theme page
Browse files Browse the repository at this point in the history
  • Loading branch information
craftpip committed Mar 18, 2017
1 parent 128f869 commit ad6e23b
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 16 deletions.
44 changes: 36 additions & 8 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1007,14 +1007,42 @@ angular.module('application', ['cp.ngConfirm'])
btnClass: 'btn-orange',
},
},
onOpen: function ($scope) {
var that = this;
$scope.showLoading = function () {
that.loading(true);
$timeout(function () {
that.loading(false);
}, 2000)
}
onScopeReady: function (scope) {
var self = this;
scope.type = 'default';
scope.typeChange = function () {
self.setType(scope.type);
};

scope.theme = 'light';
scope.themeChange = function () {
self.setTheme(scope.theme);
};

scope.icon = self.icon;
scope.iconChange = function () {
self.setIcon(scope.icon);
};

scope.title = self.title;
scope.titleChange = function () {
self.setTitle(scope.title);
};

scope.closeIcon = self.closeIcon;
scope.closeIconChange = function () {
self.setCloseIcon(scope.closeIcon);
};

scope.rtl = self.rtl;
scope.rtlChange = function () {
self.setRtl(scope.rtl);
};

scope.closeIconClass = self.closeIconClass;
scope.closeIconClassChange = function () {
self.setCloseIconClass(scope.closeIconClass);
};
}
});
};
Expand Down
18 changes: 10 additions & 8 deletions themes_popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
<div class="form-group">
<label class="control-label">Modal type</label>
<select name="" class="form-control"
ng-model="ngc.type">
ng-change="typeChange()"
ng-model="type">
<option value="default">default</option>
<option value="blue">blue</option>
<option value="orange">orange</option>
Expand All @@ -19,7 +20,8 @@
<div class="form-group">
<label class="control-label">Theme</label>
<select name="" class="form-control"
ng-model="ngc.theme">
ng-change="themeChange()"
ng-model="theme">
<option value="light">light</option>
<option value="dark">dark</option>
<option value="supervan">supervan</option>
Expand All @@ -32,35 +34,35 @@
<div class="col-md-6">
<div class="form-group">
<label class="control-label">Icon</label>
<input type="text" class="form-control" ng-model="ngc.icon">
<input type="text" class="form-control" ng-model="icon" ng-change="iconChange()">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label">Title</label>
<input type="text" class="form-control" ng-model="ngc.title">
<input type="text" class="form-control" ng-model="title" ng-change="titleChange()">
</div>
</div>
<div class="col-md-4">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="ngc.closeIcon">
<input type="checkbox" ng-model="closeIcon" ng-change="closeIconChange()">
Close icon
</label>
</div>
</div>
<div class="col-md-4">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="ngc.rtl">
Rtl {{ngc.rtl}}
<input type="checkbox" ng-model="rtl" ng-change="rtlChange()">
Rtl
</label>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label class="control-label">Close icon class</label>
<input type="text" class="form-control" ng-model="ngc.closeIconClass">
<input type="text" class="form-control" ng-model="closeIconClass" ng-change="closeIconClassChange()">
</div>
</div>
</div>

0 comments on commit ad6e23b

Please sign in to comment.