apollo_developers/assets/js/directives/touchspin.js
venbatechnologies@gmail.com 1809bcf9c9 fixed table for student details
2018-04-23 18:34:11 +05:30

39 lines
785 B
JavaScript
Executable File

'use strict';
app.directive('touchspin', function() {
return {
restrict: 'EA',
link: function(scope, elem, attr) {
var tsOptions = [
'initval',
'min',
'max',
'step',
'forcestepdivisibility',
'decimals',
'stepinterval',
'stepintervaldelay',
'verticalbuttons',
'verticalupclass',
'verticaldownclass',
'prefix',
'postfix',
'prefix_extraclass',
'postfix_extraclass',
'booster',
'boostat',
'maxboostedstep',
'mousewheel',
'buttondown_class',
'buttonup_class'
];
var options = {};
for(var i = 0, l = tsOptions.length; i < l; i++) {
var opt = tsOptions[i];
if(attr[opt] !== undefined) {
options[opt] = attr[opt];
}
}
elem.TouchSpin(options);
}
};
});