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="wizard">
|
||||||
<div class="row">
|
<div class="wizard-navigation-container">
|
||||||
<div class="wizard-navigation-container">
|
<div ng-repeat="t in $baWizardController.tabs" class="wizard-navigation {{$baWizardController.tabNum == $index ? 'active' : ''}}" ng-click="$baWizardController.selectTab($index)">
|
||||||
<div ng-repeat="t in $baWizardController.tabs" class="wizard-navigation {{$baWizardController.tabNum == $index ? 'active' : ''}}" ng-click="$baWizardController.selectTab($index)">
|
{{t.title}}
|
||||||
{{t.title}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="progress progress-wizard">
|
<div class="progress progress-wizard">
|
||||||
<div class="progress-bar progress-bar-info active" role="progressbar"
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<select class="form-control" title="Category" selectpicker>
|
<select class="form-control" title="Category" selectpicker>
|
||||||
<option selected>Electronics</option>
|
<option selected>Electronics</option>
|
||||||
<option>Toys</option>
|
<option>Toys</option>
|
||||||
<option>Weed</option>
|
<option>Accessories</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
</ba-wizard-tab>
|
</ba-wizard-tab>
|
||||||
<ba-wizard-tab title="Finish">
|
<ba-wizard-tab title="Finish">
|
||||||
<form class="form-horizontal" name="vm.finishForm" novalidate>
|
<form class="form-horizontal" name="vm.finishForm" novalidate>
|
||||||
Congratulations! You have successfully filled the form
|
Congratulations! You have successfully filled the form!
|
||||||
</form>
|
</form>
|
||||||
</ba-wizard-tab>
|
</ba-wizard-tab>
|
||||||
</ba-wizard>
|
</ba-wizard>
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
transclude: true,
|
transclude: true,
|
||||||
templateUrl: 'app/pages/form/wizard/wizard.html',
|
templateUrl: 'app/pages/form/wizard/wizard.html',
|
||||||
controllerAs: '$baWizardController',
|
controllerAs: '$baWizardController',
|
||||||
controller: ['$scope', function ($scope) {
|
controller: function ($scope) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
vm.tabs = [];
|
vm.tabs = [];
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
vm.selectTab(0);
|
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.selectTab = function (tabNum) {
|
||||||
vm.tabs[vm.tabNum].submit();
|
vm.tabs[vm.tabNum].submit();
|
||||||
|
@ -70,10 +70,10 @@
|
||||||
vm.selectTab(vm.tabNum - 1)
|
vm.selectTab(vm.tabNum - 1)
|
||||||
};
|
};
|
||||||
|
|
||||||
function countProgress() {
|
function calcProgress() {
|
||||||
vm.progress = ((vm.tabNum + 1) / vm.tabs.length) * 100;
|
vm.progress = ((vm.tabNum + 1) / vm.tabs.length) * 100;
|
||||||
}
|
}
|
||||||
}]
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue