Skip to content

Commit 7fc0a69

Browse files
author
jspdown
committed
Deleted trailing whitespaces. Uncommented sidebar tests. Undo Rename of wizard buttons
1 parent f25817f commit 7fc0a69

File tree

3 files changed

+28
-28
lines changed

3 files changed

+28
-28
lines changed

src/sidebar/test/sidebar.spec.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ describe('sidebar', function () {
1515
ctrl = $controller('SideBarController', { $scope: $scope });
1616
}));
1717

18-
// describe('add_sidebar_item', function() {
19-
// it("SideBarController add_sidebar_item test", function(){
20-
// var acc1, acc2;
21-
// ctrl.add_sidebar_items(acc1 = $scope.$new());
22-
// ctrl.add_sidebar_items(acc2 = $scope.$new());
23-
// expect($scope.side_bar_items.length).toBe(2);
24-
// });
25-
// });
26-
//
27-
// describe('remove_side_bar_item', function(){
28-
// it("SideBarController remove_side_bar test", function(){
29-
// var acc1, acc2;
30-
// ctrl.add_sidebar_items(acc1 = $scope.$new());
31-
// ctrl.add_sidebar_items(acc2 = $scope.$new());
32-
// ctrl.remove_side_bar_item(acc2);
33-
// expect($scope.side_bar_items.length).toBe(1);
34-
// })
35-
// });
18+
describe('add_sidebar_item', function() {
19+
it("SideBarController add_sidebar_item test", function(){
20+
var acc1, acc2;
21+
ctrl.add_sidebar_items(acc1 = $scope.$new());
22+
ctrl.add_sidebar_items(acc2 = $scope.$new());
23+
expect($scope.side_bar_items.length).toBe(2);
24+
});
25+
});
26+
27+
describe('remove_side_bar_item', function(){
28+
it("SideBarController remove_side_bar test", function(){
29+
var acc1, acc2;
30+
ctrl.add_sidebar_items(acc1 = $scope.$new());
31+
ctrl.add_sidebar_items(acc2 = $scope.$new());
32+
ctrl.remove_side_bar_item(acc2);
33+
expect($scope.side_bar_items.length).toBe(1);
34+
})
35+
});
3636
});
3737
});

src/wizard/doc/demo.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h1>Step 1</h1>
2323
<div class="ui input">
2424
<input type="text">
2525
</div>
26-
<button type="submit" class="ui button" wd-next>Next</button>
26+
<button type="submit" class="ui button" wz-next>Next</button>
2727
</form>
2828
</wizard-pane>
2929
<wizard-pane title="Step2">
@@ -32,7 +32,7 @@ <h1>Step 2</h1>
3232
<div class="ui input">
3333
<input type="text">
3434
</div>
35-
<button type="submit" class="ui button" wd-next>Next</button>
35+
<button type="submit" class="ui button" wz-next>Next</button>
3636
</form>
3737
</wizard-pane>
3838
<wizard-pane title="Step3">
@@ -41,8 +41,8 @@ <h1>Step 3</h1>
4141
<div class="ui input">
4242
<input type="text">
4343
</div>
44-
<button type="submit" class="ui button" wd-finish>Finish</button>
45-
<button type="submit" class="ui button" wd-previous>Previous</button>
44+
<button type="submit" class="ui button" wz-finish>Finish</button>
45+
<button type="submit" class="ui button" wz-previous>Previous</button>
4646
</form>
4747
</wizard-pane>
4848
</wizard>

src/wizard/wizard.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ angular.module('angularify.semantic.wizard', [])
1111
$scope.$watch('currentStep', function (step) {
1212
if (!step) return;
1313
var stepTitle = $scope.selectedStep.title;
14-
if ($scope.selectedStep && stepTitle !== $scope.currentStep) {
14+
if ($scope.selectedStep && stepTitle !== $scope.currentStep) {
1515
$scope.goTo($scope.steps.filter(function (step) {
1616
return step.title ==- $scope.currentStep;
1717
})[0]);
@@ -184,15 +184,15 @@ function wizardButtonDirective(action) {
184184
e.preventDefault();
185185
$scope.$apply(function () {
186186
$scope.$eval($attrs[action]);
187-
wizard[action.replace('wd', '').toLowerCase()]();
187+
wizard[action.replace('wz', '').toLowerCase()]();
188188
});
189189
});
190190
}
191191
};
192192
});
193193
}
194194

195-
wizardButtonDirective('wdNext');
196-
wizardButtonDirective('wdPrevious');
197-
wizardButtonDirective('wdFinish');
198-
wizardButtonDirective('wdCancel');
195+
wizardButtonDirective('wzNext');
196+
wizardButtonDirective('wzPrevious');
197+
wizardButtonDirective('wzFinish');
198+
wizardButtonDirective('wzCancel');

0 commit comments

Comments
 (0)