Skip to content
This repository has been archived by the owner on Jun 19, 2018. It is now read-only.

Commit

Permalink
feat(ui-bootstrap): Upgraded ui-bootstrap to 0.14.3
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The minimum compatible version of ui-bootstrap is now 0.14.0
  • Loading branch information
Matt Lewis committed Nov 7, 2015
1 parent a0a5117 commit 07aedb6
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 22 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ The calendar has a few dependencies, these are as follows, and must be included
* [AngularJS](https://angularjs.org/) 1.3.x or 1.4.x are supported
* [Bootstrap](http://getbootstrap.com/) 3+ (CSS only)
* [Moment.js](http://momentjs.com/)
* [ui-bootstrap](http://angular-ui.github.io/bootstrap/) (optional, include for collapse animations and tooltips on the year and month views.
* [ui-bootstrap](http://angular-ui.github.io/bootstrap/) (0.14.0+, optional, include for collapse animations and tooltips.
* [interact.js](http://interactjs.io/) (optional, include to allow drag and drop on the calendar)
* [ngTouch](https://docs.angularjs.org/api/ngTouch) (optional, include if using the calendar on mobile devices)

It is recommended that you install the plugin and its dependencies through bower:
You can install through bower:

```
bower install --save angular-bootstrap-calendar
Expand Down
4 changes: 2 additions & 2 deletions demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

angular
.module('demo', ['mwl.calendar', 'ui.bootstrap', 'ngTouch', 'ngAnimate'])
.controller('MainCtrl', function ($modal, moment) {
.controller('MainCtrl', function ($uibModal, moment) {

var vm = this;

Expand Down Expand Up @@ -56,7 +56,7 @@ angular
}*/

function showModal(action, event) {
$modal.open({
$uibModal.open({
templateUrl: 'modalContent.html',
controller: function() {
var vm = this;
Expand Down
22 changes: 11 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ <h2 class="text-center">{{ vm.calendarTitle }}</h2>

<div class="col-md-6 text-center">
<div class="btn-group">
<label class="btn btn-primary" ng-model="vm.calendarView" btn-radio="'year'">Year</label>
<label class="btn btn-primary" ng-model="vm.calendarView" btn-radio="'month'">Month</label>
<label class="btn btn-primary" ng-model="vm.calendarView" btn-radio="'week'">Week</label>
<label class="btn btn-primary" ng-model="vm.calendarView" btn-radio="'day'">Day</label>
<label class="btn btn-primary" ng-model="vm.calendarView" uib-btn-radio="'year'">Year</label>
<label class="btn btn-primary" ng-model="vm.calendarView" uib-btn-radio="'month'">Month</label>
<label class="btn btn-primary" ng-model="vm.calendarView" uib-btn-radio="'week'">Week</label>
<label class="btn btn-primary" ng-model="vm.calendarView" uib-btn-radio="'day'">Day</label>
</div>
</div>

Expand Down Expand Up @@ -161,7 +161,7 @@ <h3 id="event-editor">
type="text"
class="form-control"
readonly
datepicker-popup="dd MMMM yyyy"
uib-datepicker-popup="dd MMMM yyyy"
ng-model="event.startsAt"
is-open="event.startOpen"
close-text="Close" >
Expand All @@ -174,20 +174,20 @@ <h3 id="event-editor">
</button>
</span>
</p>
<timepicker
<uib-timepicker
ng-model="event.startsAt"
hour-step="1"
minute-step="15"
show-meridian="true">
</timepicker>
</uib-timepicker>
</td>
<td>
<p class="input-group" style="max-width: 250px">
<input
type="text"
class="form-control"
readonly
datepicker-popup="dd MMMM yyyy"
uib-datepicker-popup="dd MMMM yyyy"
ng-model="event.endsAt"
is-open="event.endOpen"
close-text="Close">
Expand All @@ -200,12 +200,12 @@ <h3 id="event-editor">
</button>
</span>
</p>
<timepicker
<uib-timepicker
ng-model="event.endsAt"
hour-step="1"
minute-step="15"
show-meridian="true">
</timepicker>
</uib-timepicker>
</td>
<td>
<button
Expand All @@ -226,7 +226,7 @@ <h3 id="event-editor">
<script src="angular-bootstrap-calendar.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.6/angular-touch.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.6/angular-animate.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.13.4/ui-bootstrap-tpls.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.14.3/ui-bootstrap-tpls.min.js"></script>
<script src="demo/demo.js"></script>
</body>
</html>
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
"browser": "dist/js/angular-bootstrap-calendar-tpls.js",
"style": "dist/css/angular-bootstrap-calendar.css",
"optionalDependencies": {
"angular-ui-bootstrap": "~0.13.1",
"interact.js": "~1.2.4",
"angular-touch": ">=1.3.0"
"angular-touch": ">=1.3.0",
"angular-ui-bootstrap": "~0.14.3",
"interact.js": "~1.2.4"
},
"scripts": {
"test": "npm run test:min",
Expand Down
2 changes: 1 addition & 1 deletion src/directives/mwlCollapseFallback.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ angular
})
.directive('mwlCollapseFallback', function($injector) {

if ($injector.has('collapseDirective')) {
if ($injector.has('uibCollapseDirective')) {
return {};
}

Expand Down
13 changes: 13 additions & 0 deletions src/filters/calendarTrustAsHtml.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use strict';

var angular = require('angular');

angular
.module('mwl.calendar')
.filter('calendarTrustAsHtml', function($sce) {

return function(text) {
return $sce.trustAsHtml(text);
};

});
2 changes: 1 addition & 1 deletion src/templates/calendarMonthCellEvents.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
ng-mouseenter="vm.highlightEvent(event, true)"
ng-mouseleave="vm.highlightEvent(event, false)"
tooltip-append-to-body="true"
tooltip-html-unsafe="{{ (event.startsAt | calendarDate:'time':true) + (vm.calendarConfig.displayEventEndTimes && event.endsAt ? ' - ' + (event.endsAt | calendarDate:'time':true) : '') + ' - ' + event.title }}"
uib-tooltip-html="((event.startsAt | calendarDate:'time':true) + (vm.calendarConfig.displayEventEndTimes && event.endsAt ? ' - ' + (event.endsAt | calendarDate:'time':true) : '') + ' - ' + event.title) | calendarTrustAsHtml"
mwl-draggable="event.draggable === true"
drop-data="{event: event}">
</a>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/calendarSlideBox.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="cal-slide-box" collapse="vm.isCollapsed" mwl-collapse-fallback="vm.isCollapsed">
<div class="cal-slide-box" uib-collapse="vm.isCollapsed" mwl-collapse-fallback="vm.isCollapsed">
<div class="cal-slide-content cal-event-list">
<ul class="unstyled list-unstyled">

Expand Down
2 changes: 1 addition & 1 deletion src/templates/calendarWeekView.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
ng-click="vm.onEventClick({calendarEvent: event})"
class="event-item"
ng-bind-html="vm.$sce.trustAsHtml(event.title)"
tooltip-html-unsafe="{{ event.title }}"
uib-tooltip-html="event.title | calendarTrustAsHtml"
tooltip-placement="left"
tooltip-append-to-body="true">
</a>
Expand Down

0 comments on commit 07aedb6

Please sign in to comment.