mirror of https://github.com/akveo/blur-admin
small CR fixes for wizard
parent
03288fe6fb
commit
bfd1084fa0
|
@ -1,16 +1,14 @@
|
|||
<div class="wizard">
|
||||
<div class="row">
|
||||
<div class="wizard-navigation-container">
|
||||
<div ng-repeat="t in $baWizardController.tabs" class="wizard-navigation {{$baWizardController.tabNum == $index ? 'active' : ''}}" ng-click="$baWizardController.selectTab($index)">
|
||||
{{t.title}}
|
||||
</div>
|
||||
<div class="wizard-navigation-container">
|
||||
<div ng-repeat="t in $baWizardController.tabs" class="wizard-navigation {{$baWizardController.tabNum == $index ? 'active' : ''}}" ng-click="$baWizardController.selectTab($index)">
|
||||
{{t.title}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="progress progress-wizard">
|
||||
<div class="progress-bar progress-bar-info active" role="progressbar"
|
||||
aria-valuemin="0" aria-valuemax="100" style="{{'width: ' + $baWizardController.progress + '%;'}}">
|
||||
aria-valuemin="0" aria-valuemax="100" ng-style="{width: $baWizardController.progress + '%'}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
<select class="form-control" title="Category" selectpicker>
|
||||
<option selected>Electronics</option>
|
||||
<option>Toys</option>
|
||||
<option>Weed</option>
|
||||
<option>Accessories</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -95,7 +95,7 @@
|
|||
</ba-wizard-tab>
|
||||
<ba-wizard-tab title="Finish">
|
||||
<form class="form-horizontal" name="vm.finishForm" novalidate>
|
||||
Congratulations! You have successfully filled the form
|
||||
Congratulations! You have successfully filled the form!
|
||||
</form>
|
||||
</ba-wizard-tab>
|
||||
</ba-wizard>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
transclude: true,
|
||||
templateUrl: 'app/pages/form/wizard/wizard.html',
|
||||
controllerAs: '$baWizardController',
|
||||
controller: ['$scope', function ($scope) {
|
||||
controller: function ($scope) {
|
||||
var vm = this;
|
||||
vm.tabs = [];
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
|||
vm.selectTab(0);
|
||||
};
|
||||
|
||||
$scope.$watch(angular.bind(vm, function () {return vm.tabNum;}), countProgress);
|
||||
$scope.$watch(angular.bind(vm, function () {return vm.tabNum;}), calcProgress);
|
||||
|
||||
vm.selectTab = function (tabNum) {
|
||||
vm.tabs[vm.tabNum].submit();
|
||||
|
@ -70,10 +70,10 @@
|
|||
vm.selectTab(vm.tabNum - 1)
|
||||
};
|
||||
|
||||
function countProgress() {
|
||||
function calcProgress() {
|
||||
vm.progress = ((vm.tabNum + 1) / vm.tabs.length) * 100;
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue