angular-time-picker
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -9,2 +9,8 @@ 'use strict'; | ||
dest: 'src/templates.js' | ||
}, | ||
options: { | ||
module:'html2js', | ||
rename: function (moduleName) { | ||
return '/' + moduleName; | ||
} | ||
} | ||
@@ -34,4 +40,14 @@ }, | ||
files: { | ||
'dist/angular-time-picker.min.js': ['src/angular-time-picker.js'] | ||
'dist/angular-time-picker.min.js': ['src/templates.js','src/angular-time-picker.js'] | ||
} | ||
}, | ||
dev: { | ||
files: { | ||
'dist/angular-time-picker.js': ['src/templates.js','dist/angular-time-picker.js'] | ||
}, | ||
options: { | ||
compress: false, | ||
mangle: false, | ||
beautify: true | ||
} | ||
} | ||
@@ -38,0 +54,0 @@ }, |
{ | ||
"name": "angular-time-picker", | ||
"description": "Angular Time Picker - AngularJS directive for time picker", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"main":"dist/angular-time-picker.js", | ||
@@ -6,0 +6,0 @@ "style":"dist/angular-time-picker.css", |
@@ -23,7 +23,10 @@ # <img src="images/time-picker.png" alt="Time Picker" width="50" height="50"/> wyTimePicker | ||
[LIVE DEMO](http://engineering.wingify.com/angular-time-picker/live-demo.html) | ||
[LIVE DEMO on Plunkr](https://plnkr.co/edit/P38jXpcLPnAzWVcpN5Sv?p=preview) | ||
[Read More](http://engineering.wingify.com/angular-time-picker/introduction.html) | ||
## Installation | ||
`bower install angular-time-picker --save` | ||
* Via [bower](https://bower.io/search/?q=angular-time-picker) - **`bower install angular-time-picker --save`** | ||
* Via [npm](https://www.npmjs.com/package/angular-time-picker) - **`npm install angular-time-picker --save-dev`** | ||
@@ -143,2 +146,6 @@ ## Usage | ||
## Contributors | ||
* **[@pra85](https://github.com/pra85)** - PRs - [#1](https://github.com/wingify/angular-time-picker/pull/1), [#2](https://github.com/wingify/angular-time-picker/pull/2), [#3](https://github.com/wingify/angular-time-picker/pull/3), [#5](https://github.com/wingify/angular-time-picker/pull/5), [#6](https://github.com/wingify/angular-time-picker/pull/6), [#7](https://github.com/wingify/angular-time-picker/pull/7) | ||
## Copyright and license | ||
@@ -145,0 +152,0 @@ |
@@ -35,50 +35,4 @@ /** | ||
function getTemplate() { | ||
return '<div class="angular-time-picker-rapper">' + | ||
' <span class="angular-time-picker-button"' + | ||
' ng-class="theme"' + | ||
' title="Time Range Filter"' + | ||
' ng-click="dropdownToggleState = !dropdownToggleState;">' + | ||
' <span ng-show="!noRange">{{ timeSettings.fromHour + ":" + timeSettings.fromMinute + " - " + timeSettings.toHour + ":" + timeSettings.toMinute }}</span>' + | ||
' <span ng-show="noRange">{{ timeSettings.fromHour + ":" + timeSettings.fromMinute }}</span>' + | ||
' <i class="angular-time-picker-caret" ng-class="theme"></i>' + | ||
' </span>' + | ||
' <div ng-show="dropdownToggleState" class="angular-time-picker-dropdown__menu angular-time-picker-theme" ng-class="theme">' + | ||
' <div>' + | ||
' Start:' + | ||
' <span class="angular-time-picker-float--right">' + | ||
' <!-- `browser-default` class is being used as materializecss framework override default select css-->' + | ||
' <!-- Thus to prevent this, adding a class. Materializecss is a famous framework for Material Design. -->' + | ||
' <select ng-model="startingHour" class="browser-default">' + | ||
' <option ng-repeat="option in startingTimeHoursRange" ng-disabled="option.disabled" value="{{option.value}}">{{option.name}}</option>' + | ||
' </select>' + | ||
' :' + | ||
' <select ng-model="startingMinute" class="browser-default">' + | ||
' <option ng-repeat="option in startingTimeHMinutesRange" ng-disabled="option.disabled" value="{{option.value}}">{{option.name}}</option>' + | ||
' </select>' + | ||
' </span>' + | ||
' </div>' + | ||
' <div class="angular-time-picker-push--top" ng-show="!noRange">' + | ||
' End:' + | ||
' <span class="angular-time-picker-float--right">' + | ||
' <select ng-model="endingHour" class="browser-default">' + | ||
' <option ng-repeat="option in endingTimeHoursRange" ng-disabled="option.disabled" value="{{option.value}}">{{option.name}}</option>' + | ||
' </select>' + | ||
' :' + | ||
' <select ng-model="endingMinute" class="browser-default">' + | ||
' <option ng-repeat="option in endingTimeHMinutesRange" ng-disabled="option.disabled" value="{{option.value}}">{{option.name}}</option>' + | ||
' </select>' + | ||
' </span>' + | ||
' </div>' + | ||
' <div class="angular-time-picker-push--top">' + | ||
' <button ng-click="resetToOriginalTimeSettings()">Reset</button>' + | ||
' <button class="angular-time-picker-push-half--left angular-time-picker-float--right angular-time-picker-apply-btn" ng-click="applyTimeRangeFilter()">Apply</button>' + | ||
' <button class="angular-time-picker-push-half--left angular-time-picker-float--right angular-time-picker-cancel-btn" ng-click="closeTimeFilterDropdown()">Cancel</button>'+ | ||
' </div>' + | ||
' </div>' + | ||
'</div>'; | ||
} | ||
/* global angular */ | ||
angular.module('wingify.timePicker', []) | ||
angular.module('wingify.timePicker', ['html2js']) | ||
.directive('wyTimePicker', [ '$timeout', function ($timeout) { | ||
@@ -88,3 +42,3 @@ return { | ||
replace: true, | ||
template: getTemplate(), | ||
templateUrl: '/angular-time-picker.tpl.html', | ||
scope: { | ||
@@ -240,3 +194,3 @@ timeSettings: '=', | ||
if (!scope.areInitialSettingsValidated) { | ||
if (scope.areInitialSettingsValidated) { | ||
scope.applyTimeRangeFilter(); | ||
@@ -243,0 +197,0 @@ } |
Sorry, the diff of this file is not supported yet
160
165045
1365