Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
feat(config): Upgrade angular-bootstrap 0.13 to 1.0
Browse files Browse the repository at this point in the history
Many issues arise when using angular-bootstrap 0.13. Migration to 1.0 is
straightforward, offers a more stable interface, extra directives and fixes
many bugs.
Migration guide:
https://github.com/angular-ui/bootstrap/wiki/Migration-guide-for-prefixes

Fixes #1142
Fixes #1131
  • Loading branch information
trendzetter committed Jan 17, 2016
1 parent 6658774 commit 9cd4cec
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"angular-resource": "~1.3",
"angular-animate": "~1.3",
"angular-mocks": "~1.3",
"angular-bootstrap": "~0.13",
"angular-bootstrap": "~1.0",
"angular-ui-utils": "bower",
"angular-ui-router": "~0.2",
"angular-file-upload": "1.1.5",
Expand Down
10 changes: 5 additions & 5 deletions modules/core/client/views/header.client.view.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
</button>
<a ui-sref="home" class="navbar-brand">MEAN.JS</a>
</div>
<nav class="collapse navbar-collapse" collapse="!isCollapsed" role="navigation">
<nav class="collapse navbar-collapse" uib-collapse="!isCollapsed" role="navigation">
<ul class="nav navbar-nav" ng-if="menu.shouldRender(authentication.user);">
<li ng-repeat="item in menu.items | orderBy: 'position'" ng-if="item.shouldRender(authentication.user);" ng-switch="item.type" ng-class="{ active: $state.includes(item.state), dropdown: item.type === 'dropdown' }" class="{{item.class}}" dropdown="item.type === 'dropdown'">
<a ng-switch-when="dropdown" class="dropdown-toggle" dropdown-toggle role="button">{{::item.title}}&nbsp;<span class="caret"></span></a>
<li ng-repeat="item in menu.items | orderBy: 'position'" ng-if="item.shouldRender(authentication.user);" ng-switch="item.type" ng-class="{ active: $state.includes(item.state), dropdown: item.type === 'dropdown' }" class="{{item.class}}" uib-dropdown="item.type === 'dropdown'">
<a ng-switch-when="dropdown" class="dropdown-toggle" uib-dropdown-toggle role="button">{{::item.title}}&nbsp;<span class="caret"></span></a>
<ul ng-switch-when="dropdown" class="dropdown-menu">
<li ng-repeat="subitem in item.items | orderBy: 'position'" ng-if="subitem.shouldRender(authentication.user);" ui-sref-active="active">
<a ui-sref="{{subitem.state}}" ng-bind="subitem.title"></a>
Expand All @@ -30,8 +30,8 @@
</li>
</ul>
<ul class="nav navbar-nav navbar-right" ng-show="authentication.user">
<li class="dropdown" dropdown>
<a class="dropdown-toggle user-header-dropdown-toggle" dropdown-toggle role="button">
<li class="dropdown" uib-dropdown>
<a class="dropdown-toggle user-header-dropdown-toggle" uib-dropdown-toggle role="button">
<img ng-src="{{authentication.user.profileImageURL}}" alt="{{authentication.user.displayName}}" class="header-profile-image" />
<span ng-bind="authentication.user.displayName"></span> <b class="caret"></b>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ <h4 class="list-group-item-heading" ng-bind="user.username"></h4>
</a>
</div>

<pagination boundary-links="true" max-size="8" items-per-page="itemsPerPage" total-items="filterLength" ng-model="currentPage" ng-change="pageChanged()"></pagination>
<uib-pagination boundary-links="true" max-size="8" items-per-page="itemsPerPage" total-items="filterLength" ng-model="currentPage" ng-change="pageChanged()"></uib-pagination>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ <h3 class="col-md-12 text-center">Or with your account</h3>
<div class="text-center forgot-password">
<a ui-sref="password.forgot">Forgot your password?</a>
</div>
<alert type="danger" ng-show="error" class="text-center text-danger">
<uib-alert type="danger" ng-show="error" class="text-center text-danger">
<span ng-bind="error"></span>
</alert>
</uib-alert>
</fieldset>
</form>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h3 class="col-md-12 text-center">Or sign up using your email</h3>
</div>
<div class="form-group" show-errors>
<label for="password">Password</label>
<input type="password" id="password" name="password" class="form-control" ng-model="credentials.password" placeholder="Password" popover="{{popoverMsg}}" popover-trigger="focus" password-validator required>
<input type="password" id="password" name="password" class="form-control" ng-model="credentials.password" placeholder="Password" uib-popover="{{popoverMsg}}" uib-popover-trigger="focus" password-validator required>
<div ng-messages="userForm.password.$error" role="alert">
<p class="help-block error-text" ng-message="required">Password is required.</p>
<div ng-repeat="passwordError in passwordErrors">
Expand All @@ -44,7 +44,7 @@ <h3 class="col-md-12 text-center">Or sign up using your email</h3>
</div>
<div class="form-group" ng-show="!userForm.password.$error.required">
<label>Password Requirements</label>
<progressbar value="requirementsProgress" type="{{requirementsColor}}"><span style="color:white; white-space:nowrap;">{{requirementsProgress}}%</span></progressbar>
<uib-progressbar value="requirementsProgress" type="{{requirementsColor}}"><span style="color:white; white-space:nowrap;">{{requirementsProgress}}%</span></uib-progressbar>
</div>
<div class="text-center form-group">
<button type="submit" class="btn btn-primary">Sign up</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h3 class="col-md-12 text-center">Reset your password</h3>
<fieldset>
<div class="form-group" show-errors>
<label for="newPassword">New Password</label>
<input type="password" id="newPassword" name="newPassword" class="form-control" ng-model="passwordDetails.newPassword" placeholder="New Password" autocomplete="new-password" popover="{{popoverMsg}}" popover-trigger="focus" popover-placement="top" password-validator required>
<input type="password" id="newPassword" name="newPassword" class="form-control" ng-model="passwordDetails.newPassword" placeholder="New Password" autocomplete="new-password" uib-popover="{{popoverMsg}}" uib-popover-trigger="focus" uib-popover-placement="top" password-validator required>
<div ng-messages="resetPasswordForm.newPassword.$error" role="alert">
<p class="help-block error-text" ng-message="required">Enter a new password.</p>
<div ng-repeat="passwordError in passwordErrors">
Expand All @@ -23,7 +23,7 @@ <h3 class="col-md-12 text-center">Reset your password</h3>
</div>
<div class="form-group" ng-show="!resetPasswordForm.newPassword.$error.required">
<label>Password Requirements</label>
<progressbar value="requirementsProgress" type="{{requirementsColor}}"><span style="color:white; white-space:nowrap;">{{requirementsProgress}}%</span></progressbar>
<uib-progressbar value="requirementsProgress" type="{{requirementsColor}}"><span style="color:white; white-space:nowrap;">{{requirementsProgress}}%</span></uib-progressbar>
</div>
<div class="text-center form-group">
<button type="submit" class="btn btn-primary">Update Password</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</div>
<div class="form-group" show-errors>
<label for="newPassword">New Password</label>
<input type="password" id="newPassword" name="newPassword" class="form-control" ng-model="passwordDetails.newPassword" placeholder="New Password" popover="{{popoverMsg}}" popover-trigger="focus" password-validator required>
<input type="password" id="newPassword" name="newPassword" class="form-control" ng-model="passwordDetails.newPassword" placeholder="New Password" uib-popover="{{popoverMsg}}" uib-popover-trigger="focus" password-validator required>
<div ng-messages="passwordForm.newPassword.$error" role="alert">
<p class="help-block error-text" ng-message="required">Enter a new password.</p>
<div ng-repeat="passwordError in passwordErrors">
Expand All @@ -29,7 +29,7 @@
</div>
<div class="form-group" ng-show="!passwordForm.newPassword.$error.required">
<label>Password Requirements</label>
<progressbar value="requirementsProgress" type="{{requirementsColor}}"><span style="color:white; white-space:nowrap;">{{requirementsProgress}}%</span></progressbar>
<uib-progressbar value="requirementsProgress" type="{{requirementsColor}}"><span style="color:white; white-space:nowrap;">{{requirementsProgress}}%</span></uib-progressbar>
</div>
<div class="text-center form-group">
<button type="submit" class="btn btn-primary">Save Password</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
function compileDirective(template) {
// function to compile a fresh directive with the given template, or a default one
// input form with directive
if (!template) template = '<input type="password" id="newPassword" name="newPassword" class="form-control" ng-model="passwordMock.newPassword" placeholder="New Password" autocomplete="new-password" popover="{{popoverMsg}}" popover-trigger="focus" popover-placement="top" password-validator required>' +
if (!template) template = '<input type="password" id="newPassword" name="newPassword" class="form-control" ng-model="passwordMock.newPassword" placeholder="New Password" autocomplete="new-password" uib-popover="{{popoverMsg}}" uib-popover-trigger="focus" uib-popover-placement="top" password-validator required>' +
'<input type="password" id="verifyPassword" name="verifyPassword" class="form-control" ng-model="passwordMock.verifyPassword" placeholder="Verify Password" password-verify="passwordMock.newPassword" required>';
template = '<form name="form"><div>' + template + '<input type="submit">submit form</input></div></form>';

Expand Down

0 comments on commit 9cd4cec

Please sign in to comment.