Skip to content

Commit

Permalink
merge from siddii master
Browse files Browse the repository at this point in the history
  • Loading branch information
rajexcited committed Apr 20, 2014
1 parent 2df4c9c commit 54b6788
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 8 deletions.
8 changes: 8 additions & 0 deletions app/js/timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ angular.module('timer', [])
},
controller: ['$scope', '$element', '$attrs', '$timeout', function ($scope, $element, $attrs, $timeout) {

// Checking for trim function since IE8 doesn't have it
// If not a function, create tirm with RegEx to mimic native trim
if(typeof String.prototype.trim !== 'function') {
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, '');
};
}

//angular 1.2 doesn't support attributes ending in "-start", so we're
//supporting both "autostart" and "auto-start" as a solution for
//backward and forward compatibility.
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"author": "Siddique Hameed",
"name": "angular-timer",
"version": "1.0.12",
"version": "1.1.0",
"homepage": "https://github.com/siddii/angular-timer",
"description": "Angular-Timer : A simple AngularJS directive demonstrating re-usability & interoperability",
"repository": {
Expand Down
4 changes: 4 additions & 0 deletions dist/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
##Change Log

###Version 1.1.0
* Plural/singular units. PR - https://github.com/siddii/angular-timer/pull/54
* IE8 support. PR - https://github.com/siddii/angular-timer/pull/62

###Version 1.0.12
* `clear` method. Please see this PR - https://github.com/siddii/angular-timer/pull/43

Expand Down
10 changes: 9 additions & 1 deletion dist/angular-timer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* angular-timer - v1.0.12 - 2014-04-20 7:17 PM
* angular-timer - v1.1.0 - 2014-04-20 7:46 PM
* https://github.com/siddii/angular-timer
*
* Copyright (c) 2014 Siddique Hameed
Expand All @@ -20,6 +20,14 @@ angular.module('timer', [])
},
controller: ['$scope', '$element', '$attrs', '$timeout', function ($scope, $element, $attrs, $timeout) {

// Checking for trim function since IE8 doesn't have it
// If not a function, create tirm with RegEx to mimic native trim
if(typeof String.prototype.trim !== 'function') {
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, '');
};
}

//angular 1.2 doesn't support attributes ending in "-start", so we're
//supporting both "autostart" and "auto-start" as a solution for
//backward and forward compatibility.
Expand Down
4 changes: 2 additions & 2 deletions dist/angular-timer.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,15 @@ <h3>Plural / Singular units</h3>
<div class="bs-docs-example">
<p>
Two stopped countdown timers to illustrate how to handle pluralization of time units.
<code ng-non-bindable="">
<code ng-non-bindable="">
&lt;timer autostart="false" countdown="90061"&gt;{{days}} day{{daysS}}, {{hours}} hour{{hoursS}}, {{minutes}} minute{{minutesS}}, {{seconds}} second{{secondsS}}.&lt;/timer&gt;
</code>

</code>
<h3 class="singular-counter">
<timer autostart="false" countdown="90061">{{days}} day{{daysS}}, {{hours}} hour{{hoursS}}, {{minutes}} minute{{minutesS}}, {{seconds}} second{{secondsS}}.</timer>
</h3>
<code ng-non-bindable="">
&lt;timer autostart="false" countdown="190061"&gt;{{days}} day{{daysS}}, {{hours}} hour{{hoursS}}, {{minutes}} minute{{minutesS}}, {{seconds}} second{{secondsS}}.&lt;/timer&gt;
</code>
<h3 class="plural-counter">
<timer autostart="false" countdown="190061">{{days}} day{{daysS}}, {{hours}} hour{{hoursS}}, {{minutes}} minute{{minutesS}}, {{seconds}} second{{secondsS}}.</timer>
</h3>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"author": "Siddique Hameed",
"name": "angular-timer",
"version": "1.0.12",
"version": "1.1.0",
"homepage": "https://github.com/siddii/angular-timer",
"licenses": {
"type": "MIT",
Expand Down

0 comments on commit 54b6788

Please sign in to comment.