From 7c385a7877aa4b0163dda6206f656846db2cf039 Mon Sep 17 00:00:00 2001 From: Arjun Roychowdhury Date: Thu, 17 Sep 2015 12:32:47 -0400 Subject: iOS9 fixes (which includes ionic updates to 1.1.0) --- .../src/core/config/constants.js | 6 +- www/lib/angular-awesome-slider/src/core/index.js | 28 +-- .../src/core/model/draggable.factory.js | 26 +-- .../src/core/model/pointer.factory.js | 2 +- .../src/core/model/slider.factory.js | 164 ++++++++-------- .../src/core/template/slider.tmpl.js | 2 +- .../src/core/utils/utils.factory.js | 26 +-- .../angular-awesome-slider/src/css/less/main.less | 208 ++++++++++----------- .../src/css/less/skin-blue.less | 34 ++-- .../src/css/less/skin-css.less | 90 ++++----- .../src/css/less/skin-plastic.less | 30 +-- .../src/css/less/skin-round.less | 36 ++-- www/lib/angular-awesome-slider/src/index.html | 8 +- .../angular-awesome-slider/src/jquery.slider.js | 166 ++++++++-------- 14 files changed, 414 insertions(+), 412 deletions(-) (limited to 'www/lib/angular-awesome-slider/src') diff --git a/www/lib/angular-awesome-slider/src/core/config/constants.js b/www/lib/angular-awesome-slider/src/core/config/constants.js index ed032d4d..1bda35ef 100644 --- a/www/lib/angular-awesome-slider/src/core/config/constants.js +++ b/www/lib/angular-awesome-slider/src/core/config/constants.js @@ -8,7 +8,7 @@ step: 1, smooth: true, limits: false, - round: false, + round: false, value: "3", dimension: "", vertical: false, @@ -25,8 +25,8 @@ } }, EVENTS: { - + } }); -}(angular)); +}(angular)); \ No newline at end of file diff --git a/www/lib/angular-awesome-slider/src/core/index.js b/www/lib/angular-awesome-slider/src/core/index.js index 75ca7888..069c02df 100644 --- a/www/lib/angular-awesome-slider/src/core/index.js +++ b/www/lib/angular-awesome-slider/src/core/index.js @@ -49,7 +49,7 @@ if (scope.options.calculate && typeof scope.options.calculate === 'function') { scope.from = scope.options.calculate(scope.from); scope.to = scope.options.calculate(scope.to); - } + } var OPTIONS = { from: !scope.options.round ? parseInt(scope.options.from, 10) : parseFloat(scope.options.from), @@ -88,7 +88,7 @@ if (scope.ngDisabled) { disabler(scope.ngDisabled); - } + } initialized = true; }; @@ -118,16 +118,16 @@ } if (scope.slider) { - var firstPtr = scope.slider.getPointers()[0]; - // reset to lowest value - firstPtr.set(scope.from, true); - if (ngModel.$viewValue.split(';')[1]) { - var secondPtr = scope.slider.getPointers()[1]; - // reset to biggest value - firstPtr.set(scope.to, true); - secondPtr.set(ngModel.$viewValue.split(';')[1], true); + var vals = ngModel.$viewValue.split(";"); + scope.slider.getPointers()[0].set(vals[0], true); + if (vals[1]) { + scope.slider.getPointers()[1].set(vals[1], true); + //if moving left to right with two pointers + //we need to "finish" moving the first + if(parseInt(vals[1]) > parseInt(vals[0])){ + scope.slider.getPointers()[0].set(vals[0], true); + } } - firstPtr.set(ngModel.$viewValue.split(';')[0], true); } }; @@ -161,14 +161,14 @@ scope.$watch('ngDisabled', function(value) { disabler(value); - }); + }); scope.limitValue = function(value) { if (scope.options.modelLabels) { if (angular.isFunction(scope.options.modelLabels)) { return scope.options.modelLabels(value); - } - return scope.options.modelLabels[value] !== undefined ? scope.options.modelLabels[value] : value; + } + return scope.options.modelLabels[value] !== undefined ? scope.options.modelLabels[value] : value; } return value; }; diff --git a/www/lib/angular-awesome-slider/src/core/model/draggable.factory.js b/www/lib/angular-awesome-slider/src/core/model/draggable.factory.js index 892b13a8..56dd625f 100644 --- a/www/lib/angular-awesome-slider/src/core/model/draggable.factory.js +++ b/www/lib/angular-awesome-slider/src/core/model/draggable.factory.js @@ -70,7 +70,7 @@ if( this.supportTouches_ ){ ptr[0].addEventListener( this.events_[ eventType ].touch, handler, false ); } - + ptr.bind( this.events_[ eventType ].nonTouch, handler ); }; @@ -88,13 +88,13 @@ var documentElt = angular.element(window.document); - this._bindEvent(documentElt, 'move', function(event) { + this._bindEvent(documentElt, 'move', function(event) { if(self.is.drag) { event.stopPropagation(); event.preventDefault(); if (!self.parent.disabled) { - self._mousemove(event); - } + self._mousemove(event); + } } }); this._bindEvent(documentElt, 'down', function(event) { @@ -103,8 +103,8 @@ event.preventDefault(); } }); - this._bindEvent(documentElt, 'up', function(event) { - self._mouseup(event); + this._bindEvent(documentElt, 'up', function(event) { + self._mouseup(event); }); this._bindEvent( this.ptr, 'down', function(event) { @@ -113,8 +113,8 @@ }); this._bindEvent( this.ptr, 'up', function(event) { self._mouseup( event ); - }); - + }); + // TODO see if needed this.events(); }; @@ -122,13 +122,13 @@ Draggable.prototype._mousedown = function( evt ){ this.is.drag = true; this.is.clicked = false; - this.is.mouseup = false; + this.is.mouseup = false; var coords = this._getPageCoords( evt ); this.cx = coords.x - this.ptr[0].offsetLeft; this.cy = coords.y - this.ptr[0].offsetTop; - angular.extend(this.d, { + angular.extend(this.d, { left: coords.x, top: coords.y, width: this.ptr[0].clientWidth, @@ -146,7 +146,7 @@ this.is.toclick = false; var coords = this._getPageCoords( evt ); this.onmousemove( evt, coords.x - this.cx, coords.y - this.cy ); - }; + }; Draggable.prototype._mouseup = function( evt ){ var oThis = this; @@ -171,7 +171,7 @@ // } else { // this.outer.css({ height: "auto" }); // } - + } this.onmouseup( evt ); @@ -180,4 +180,4 @@ return Draggable; }]); -}(angular)); +}(angular)); \ No newline at end of file diff --git a/www/lib/angular-awesome-slider/src/core/model/pointer.factory.js b/www/lib/angular-awesome-slider/src/core/model/pointer.factory.js index 6b23c5f7..8f938b12 100644 --- a/www/lib/angular-awesome-slider/src/core/model/pointer.factory.js +++ b/www/lib/angular-awesome-slider/src/core/model/pointer.factory.js @@ -97,4 +97,4 @@ return SliderPointer; }]); -}(angular)); +}(angular)); \ No newline at end of file diff --git a/www/lib/angular-awesome-slider/src/core/model/slider.factory.js b/www/lib/angular-awesome-slider/src/core/model/slider.factory.js index 4a905e4e..f04672b2 100644 --- a/www/lib/angular-awesome-slider/src/core/model/slider.factory.js +++ b/www/lib/angular-awesome-slider/src/core/model/slider.factory.js @@ -7,13 +7,13 @@ return this.init.apply(this, arguments); } - Slider.prototype.init = function( inputNode, templateNode, settings ){ - this.settings = settings; + Slider.prototype.init = function( inputNode, templateNode, settings ){ + this.settings = settings; this.inputNode = inputNode; this.inputNode.addClass("ng-hide"); this.settings.interval = this.settings.to-this.settings.from; - + if(this.settings.calculate && angular.isFunction(this.settings.calculate)) this.nice = this.settings.calculate; @@ -27,7 +27,7 @@ this.isAsc = settings.from < settings.to; this.create(templateNode); - + return this; }; @@ -56,20 +56,20 @@ indicator2 = angElt(is[4]), indicator3 = angElt(is[5]), indicator4 = angElt(is[6]), - pointers = [pointer1, pointer2], + pointers = [pointer1, pointer2], off = utils.offset(this.domNode), offset = { left: off.left, top: off.top, width: this.domNode[0].clientWidth, height: this.domNode[0].clientHeight - }, + }, values = self.settings.value.split(';'); - this.sizes = { + this.sizes = { domWidth: this.domNode[0].clientWidth, domHeight: this.domNode[0].clientHeight, - domOffset: offset + domOffset: offset }; // find some objects @@ -87,9 +87,9 @@ angExt(this.o.labels[1], { value: this.o.labels[1].o.find("span") }); - + // single pointer - this.settings.single = !self.settings.value.split(";")[1]; + this.settings.single = !self.settings.value.split(";")[1]; if (this.settings.single) { range.addClass('ng-hide'); @@ -121,38 +121,38 @@ /* test = self.isAsc ? value < self.settings.from : value > self.settings.from, value1 = test ? self.settings.from : value; */ - test = self.isAsc ? value > self.settings.to : value < self.settings.to; + test = self.isAsc ? value > self.settings.to : value < self.settings.to; value1 = test ? self.settings.to : value; self.o.pointers[key].set( value1, true ); - + // reinit position d offset = utils.offset(self.o.pointers[key].ptr); self.o.pointers[key].d = { left: offset.left, top: offset.top - }; - } + }; + } }); self.domNode.bind('mousedown', self.clickHandler.apply(self)); - this.o.value = angElt(this.domNode.find("i")[2]); + this.o.value = angElt(this.domNode.find("i")[2]); this.is.init = true; // CSS SKIN - if (this.settings.css) { + if (this.settings.css) { indicatorLeft.css(this.settings.css.background ? this.settings.css.background : {}); indicatorRight.css(this.settings.css.background ? this.settings.css.background : {}); if (!this.o.pointers[1]) { - indicator1.css(this.settings.css.before ? this.settings.css.before : {}); + indicator1.css(this.settings.css.before ? this.settings.css.before : {}); indicator4.css(this.settings.css.after ? this.settings.css.after : {}); } - indicator2.css(this.settings.css.default ? this.settings.css.default : {}); + indicator2.css(this.settings.css.default ? this.settings.css.default : {}); indicator3.css(this.settings.css.default ? this.settings.css.default : {}); - + range.css(this.settings.css.range ? this.settings.css.range : {}); pointer1.css(this.settings.css.pointer ? this.settings.css.pointer : {}); pointer2.css(this.settings.css.pointer ? this.settings.css.pointer : {}); @@ -165,7 +165,7 @@ }; Slider.prototype.clickHandler = function() { - var self = this; + var self = this; // in case of showing/hiding var resetPtrSize = function( ptr ) { @@ -191,51 +191,51 @@ return function(evt) { if (self.disabled) - return; + return; var vertical = self.settings.vertical, targetIdx = 0, _off = utils.offset(self.domNode), firstPtr = self.o.pointers[0], secondPtr = self.o.pointers[1] ? self.o.pointers[1] : null, - tmpPtr, + tmpPtr, evtPosition = evt.originalEvent ? evt.originalEvent: evt, - mouse = vertical ? evtPosition.pageY : evtPosition.pageX, + mouse = vertical ? evtPosition.pageY : evtPosition.pageX, css = vertical ? 'top' : 'left', offset = { left: _off.left, top: _off.top, width: self.domNode[0].clientWidth, height: self.domNode[0].clientHeight }, targetPtr = self.o.pointers[targetIdx]; - + if (secondPtr) { if (!secondPtr.d.width) { resetPtrSize(); - } + } var firstPtrPosition = utils.offset(firstPtr.ptr)[css]; var secondPtrPosition = utils.offset(secondPtr.ptr)[css]; - var middleGap = Math.abs((secondPtrPosition - firstPtrPosition) / 2); + var middleGap = Math.abs((secondPtrPosition - firstPtrPosition) / 2); var testSecondPtrToMove = mouse >= secondPtrPosition || mouse >= (secondPtrPosition - middleGap); if (testSecondPtrToMove) { targetPtr = secondPtr; } } targetPtr._parent = {offset: offset, width: offset.width, height: offset.height}; - var coords = firstPtr._getPageCoords( evt ); + var coords = firstPtr._getPageCoords( evt ); targetPtr.cx = coords.x - targetPtr.d.left; - targetPtr.cy = coords.y - targetPtr.d.top; + targetPtr.cy = coords.y - targetPtr.d.top; targetPtr.onmousemove( evt, coords.x, coords.y); - targetPtr.onmouseup(); + targetPtr.onmouseup(); angular.extend(targetPtr.d, { left: coords.x, - top: coords.y - }); - + top: coords.y + }); + self.redraw(targetPtr); return false; }; }; - Slider.prototype.disable = function( bool ) { + Slider.prototype.disable = function( bool ) { this.disabled = bool; - }; + }; Slider.prototype.nice = function( value ){ return value; @@ -260,7 +260,7 @@ if(x > 100) x = 100; return Math.round(x*10) / 10; - }; + }; Slider.prototype.getPointers = function(){ return this.o.pointers; @@ -283,7 +283,7 @@ str += '' + ( s[i] != '|' ? '' + s[i] + '' : '' ) + ''; } - if (s[i].val <= this.settings.to && s[i].val >= this.settings.from && ! duplicate[s[i].val]) { + if (s[i].val <= this.settings.to && s[i].val >= this.settings.from && ! duplicate[s[i].val]) { duplicate[s[i].val] = true; prc = this.valueToPrc(s[i].val); label = s[i].label ? s[i].label : s[i].val; @@ -318,15 +318,15 @@ Slider.prototype.update = function(){ this.onresize(); this.drawScale(); - }; + }; Slider.prototype.drawScale = function( scaleDiv ){ angular.forEach(angular.element(scaleDiv).find('ins'), function(scaleLabel, key) { scaleLabel.style.marginLeft = - scaleLabel.clientWidth / 2; }); - }; + }; - Slider.prototype.redraw = function( pointer ){ + Slider.prototype.redraw = function( pointer ){ if(!this.is.init) { // this.settings.single if(this.o.pointers[0] && !this.o.pointers[1]) { @@ -348,13 +348,13 @@ var newPos, newWidth; - // redraw range line + // redraw range line if(this.o.pointers[0] && this.o.pointers[1]) { - newPos = !this.settings.vertical ? + newPos = !this.settings.vertical ? { left: this.o.pointers[0].value.prc + "%", width: ( this.o.pointers[1].value.prc - this.o.pointers[0].value.prc ) + "%" } : { top: this.o.pointers[0].value.prc + "%", height: ( this.o.pointers[1].value.prc - this.o.pointers[0].value.prc ) + "%" }; - + this.o.value.css(newPos); // both pointer overlap on limits @@ -363,7 +363,7 @@ } } - + if(this.o.pointers[0] && !this.o.pointers[1]) { newWidth = this.o.pointers[0].value.prc - this.originValue; if (newWidth >= 0) { @@ -378,9 +378,9 @@ } else { this.o.indicators[0].css(!this.settings.vertical ? {width: this.originValue + "%"} : {height: this.originValue + "%"}); - } + } - } + } var value = this.nice(pointer.value.origin); if (this.settings.modelLabels) { @@ -391,8 +391,8 @@ value = this.settings.modelLabels[value] !== undefined ? this.settings.modelLabels[value] : value; } } - - this.o.labels[pointer.uid].value.html(value); + + this.o.labels[pointer.uid].value.html(value); // redraw position of labels this.redrawLabels( pointer ); @@ -415,10 +415,10 @@ sizes.margin = 0; sizes.right = true; } else - sizes.right = false; - } + sizes.right = false; + } - if (!self.settings.vertical) + if (!self.settings.vertical) label.o.css({ left: prc + "%", marginLeft: sizes.margin+"px", right: "auto" }); else label.o.css({ top: prc + "%", marginLeft: "20px", marginTop: sizes.margin, bottom: "auto" }); @@ -436,9 +436,9 @@ prc = pointer.value.prc, // case hidden labelWidthSize = label.o[0].offsetWidth === 0 ? (label.o[0].textContent.length)*7 : label.o[0].offsetWidth; - + this.sizes.domWidth = this.domNode[0].clientWidth; - this.sizes.domHeight = this.domNode[0].clientHeight; + this.sizes.domHeight = this.domNode[0].clientHeight; var sizes = { label: !self.settings.vertical ? labelWidthSize : label.o[0].offsetHeight, @@ -448,12 +448,12 @@ var anotherIdx = pointer.uid === 0 ? 1:0, anotherLabel, - anotherPtr; + anotherPtr; if (!this.settings.single && !this.settings.vertical){ - // glue if near; + // glue if near; anotherLabel = this.o.labels[anotherIdx]; - anotherPtr = this.o.pointers[anotherIdx]; + anotherPtr = this.o.pointers[anotherIdx]; var label1 = this.o.labels[0], label2 = this.o.labels[1], ptr1 = this.o.pointers[0], @@ -465,27 +465,27 @@ label2.o.css(this.css.visible); value = this.getLabelValue(value); - + if (gapBetweenLabel + 10 < label1.o[0].offsetWidth+label2.o[0].offsetWidth) { anotherLabel.o.css(this.css.hidden); - + anotherLabel.value.html(value); prc = (anotherPtr.value.prc - prc) / 2 + prc; if(anotherPtr.value.prc != pointer.value.prc){ value = this.nice(this.o.pointers[0].value.origin); var value1 = this.nice(this.o.pointers[1].value.origin); value = this.getLabelValue(value); - value1 = this.getLabelValue(value1); - + value1 = this.getLabelValue(value1); + label.value.html(value + " – " + value1); sizes.label = label.o[0].offsetWidth; sizes.border = (prc * domSize) / 100; } } - else { + else { anotherLabel.value.html(value); anotherLabel.o.css(this.css.visible); - } + } } sizes = setPosition(label, sizes, prc); @@ -503,9 +503,9 @@ }; sizes = setPosition(anotherLabel, sizes2, anotherPtr.value.prc); } - + this.redrawLimits(); - }; + }; Slider.prototype.redrawLimits = function() { if (this.settings.limits) { @@ -528,19 +528,19 @@ limit = this.o.limits[1]; if(label_left + label.o[0].clientWidth > this.sizes.domWidth - limit[0].clientWidth){ - limits[1] = false; + limits[1] = false; } - + } } for(; i < limits.length; i++){ if(limits[i]){ // TODO animate - angular.element(this.o.limits[i]).addClass("animate-show"); + angular.element(this.o.limits[i]).addClass("animate-show"); } else{ angular.element(this.o.limits[i]).addClass("animate-hidde"); - } + } } } }; @@ -557,7 +557,7 @@ var value = ""; angular.forEach(this.o.pointers, function(pointer, key){ - if(pointer.value.prc !== undefined && !isNaN(pointer.value.prc)) + if(pointer.value.prc !== undefined && !isNaN(pointer.value.prc)) value += (key > 0 ? ";" : "") + $this.prcToValue(pointer.value.prc); }); return value; @@ -565,14 +565,14 @@ Slider.prototype.getLabelValue = function(value){ if (this.settings.modelLabels) { - if (angular.isFunction(this.settings.modelLabels)) { + if (angular.isFunction(this.settings.modelLabels)) { return this.settings.modelLabels(value); } else { return this.settings.modelLabels[value] !== undefined ? this.settings.modelLabels[value] : value; } - } - + } + return value; }; @@ -590,7 +590,7 @@ Slider.prototype.prcToValue = function( prc ){ var value; - if (this.settings.heterogeneity && this.settings.heterogeneity.length > 0){ + if (this.settings.heterogeneity && this.settings.heterogeneity.length > 0){ var h = this.settings.heterogeneity, _start = 0, _from = this.settings.round ? parseFloat(this.settings.from) : parseInt(this.settings.from, 10), @@ -599,7 +599,7 @@ for (; i <= h.length; i++){ var v; - if(h[i]) + if(h[i]) v = h[i].split('/'); else v = [100, _to]; @@ -614,10 +614,10 @@ _start = v1; _from = v2; } - } + } else { value = this.settings.from + (prc * this.settings.interval) / 100; - } + } return this.round(value); }; @@ -625,10 +625,10 @@ Slider.prototype.valueToPrc = function( value, pointer ){ var prc, _from = this.settings.round ? parseFloat(this.settings.from) : parseInt(this.settings.from, 10); - + if (this.settings.heterogeneity && this.settings.heterogeneity.length > 0){ var h = this.settings.heterogeneity, - _start = 0, + _start = 0, i = 0; for (; i <= h.length; i++) { @@ -636,7 +636,7 @@ if(h[i]) v = h[i].split('/'); else - v = [100, this.settings.to]; + v = [100, this.settings.to]; var v1 = this.settings.round ? parseFloat(v[0]) : parseInt(v[0], 10); var v2 = this.settings.round ? parseFloat(v[1]) : parseInt(v[1], 10); @@ -666,14 +666,14 @@ Slider.prototype.round = function( value ){ value = Math.round(value / this.settings.step) * this.settings.step; - if(this.settings.round) + if(this.settings.round) value = Math.round(value * Math.pow(10, this.settings.round)) / Math.pow(10, this.settings.round); - else + else value = Math.round(value); - return value; + return value; }; return Slider; }]); -}(angular)); +}(angular)); \ No newline at end of file diff --git a/www/lib/angular-awesome-slider/src/core/template/slider.tmpl.js b/www/lib/angular-awesome-slider/src/core/template/slider.tmpl.js index 9529f46d..af2b1499 100644 --- a/www/lib/angular-awesome-slider/src/core/template/slider.tmpl.js +++ b/www/lib/angular-awesome-slider/src/core/template/slider.tmpl.js @@ -13,7 +13,7 @@ ''+ ''+ ''+ - ''+ + ''+ '' + '
' + '
' + diff --git a/www/lib/angular-awesome-slider/src/core/utils/utils.factory.js b/www/lib/angular-awesome-slider/src/core/utils/utils.factory.js index 180d1071..52ff8f5f 100644 --- a/www/lib/angular-awesome-slider/src/core/utils/utils.factory.js +++ b/www/lib/angular-awesome-slider/src/core/utils/utils.factory.js @@ -3,21 +3,21 @@ angular.module('angularAwesomeSlider').factory('sliderUtils', ['$window', function(win) { return { - offset: function(elm) { - // try {return elm.offset();} catch(e) {} - var rawDom = elm[0]; - var _x = 0; - var _y = 0; - var body = document.documentElement || document.body; - var scrollX = window.pageXOffset || body.scrollLeft; - var scrollY = window.pageYOffset || body.scrollTop; - _x = rawDom.getBoundingClientRect().left + scrollX; - _y = rawDom.getBoundingClientRect().top + scrollY; + offset: function(elm) { + // try {return elm.offset();} catch(e) {} + var rawDom = elm[0]; + var _x = 0; + var _y = 0; + var body = document.documentElement || document.body; + var scrollX = window.pageXOffset || body.scrollLeft; + var scrollY = window.pageYOffset || body.scrollTop; + _x = rawDom.getBoundingClientRect().left + scrollX; + _y = rawDom.getBoundingClientRect().top + scrollY; return { left: _x, top:_y }; }, browser: function() { // TODO finish browser detection and this case - var userAgent = win.navigator.userAgent; + var userAgent = win.navigator.userAgent; var browsers = {mozilla: /mozilla/i, chrome: /chrome/i, safari: /safari/i, firefox: /firefox/i, ie: /internet explorer/i}; for(var key in browsers) { if (browsers[key].test(userAgent)) { @@ -27,8 +27,8 @@ return 'unknown'; } }; - }]); + }]); })(angular); - + diff --git a/www/lib/angular-awesome-slider/src/css/less/main.less b/www/lib/angular-awesome-slider/src/css/less/main.less index 5182d4af..ce03b5fa 100644 --- a/www/lib/angular-awesome-slider/src/css/less/main.less +++ b/www/lib/angular-awesome-slider/src/css/less/main.less @@ -13,26 +13,26 @@ top: 0.6em; /* Box-model */ - cursor: pointer; - display: block; - width: 100%; + cursor: pointer; + display: block; + width: 100%; height: 1em; - /* Typography */ + /* Typography */ font-family: @font-family-base; // disabled &.disabled { opacity: 0.5; } table { - border-collapse: collapse; + border-collapse: collapse; border: 0; width: 100%; td, th { width: 100%; vertical-align: top; border: 0; - padding: 0; + padding: 0; text-align: left; vertical-align: top; } @@ -45,73 +45,73 @@ div.jslider-bg { position: relative; - i { + i { position: absolute; top: 0; height: 5px; - &.left { + &.left { left: 0; - width: 50%; - background-position: 0 0; + width: 50%; + background-position: 0 0; } &.right { left: 50%; - width: 50%; + width: 50%; background-position: right 0; } - &.range { + &.range { position: absolute; top: 0; left: 20%; width: 60%; height: 5px; z-index: 1; - background-repeat: repeat-x; - background-position: 0 -40px; + background-repeat: repeat-x; + background-position: 0 -40px; } &.default { left: 0; width: 1px; - z-index: 1; + z-index: 1; background-color: @color-pointers-default-value; - } + } - } + } } // END RANGES // POINTERS // single value hide to &.jslider-single { - div.jslider-pointer-to, - div.jslider-value-to, + div.jslider-pointer-to, + div.jslider-value-to, div.jslider-bg .v, .jslider-limitless .jslider-label { display: none; - } + } } div.jslider-pointer { position: absolute; top: -4px; - left: 20%; - z-index: 2; - width: 15px; - height: 15px; - background-position: 2px -60px; - margin-left: -8px; - cursor: pointer; + left: 20%; + z-index: 2; + width: 15px; + height: 15px; + background-position: 2px -60px; + margin-left: -8px; + cursor: pointer; cursor: hand; - &.jslider-pointer-to { + &.jslider-pointer-to { left: 80%; } - &.jslider-pointer-hover { + &.jslider-pointer-hover { background-position: -18px -60px; } } @@ -119,27 +119,27 @@ // LABELS div.jslider-label small, - div.jslider-value small { - position: relative; - top: -0.4em; + div.jslider-value small { + position: relative; + top: -0.4em; } - // limits + // limits div.jslider-label { position: absolute; - top: -18px; + top: -18px; left: 0px; padding: 0px 2px; opacity: 0.4; - color: @color-pointers-label; - font-size: @font-size-pointers-label; - line-height: @line-height-pointers-label; - white-space: nowrap; - - &.jslider-label-to { - left: auto; + color: @color-pointers-label; + font-size: @font-size-pointers-label; + line-height: @line-height-pointers-label; + white-space: nowrap; + + &.jslider-label-to { + left: auto; right: 0; - } + } } // END LABELS @@ -152,66 +152,66 @@ background: white; font-size: @font-size-pointers-value; line-height: @line-height-pointers-value; - white-space: nowrap; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - -o-border-radius: 2px; + white-space: nowrap; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; border-radius: 2px; &.jslider-value-to { left: 80%; - } + } } - // END POINTERS VALUE + // END POINTERS VALUE // SCALE - div.jslider-scale { - position: relative; + div.jslider-scale { + position: relative; top: 9px; - span { - position: absolute; - height: 5px; - border-left: 1px solid #999; - font-size: 0; + span { + position: absolute; + height: 5px; + border-left: 1px solid #999; + font-size: 0; } ins { position: absolute; top: 5px; - left: 0px; + left: 0px; font-size: 9px; - text-decoration: none; + text-decoration: none; color: #999; } } // END SCALE // VERTICAL &.vertical { - display: block; + display: block; width: 17px; height: 100%; position: relative; top: 0.6em; font-family: Arial, sans-serif; table { - height: 100%; + height: 100%; } - + &.sliderCSS .jslider-bg i, &.jslider-pointer { background-color: silver; background-image: none; } - // RANGES + // RANGES div.jslider-bg i,.jslider-pointer { background: url(../img/jslider.vertical.png) no-repeat 0 0; } - div.jslider-bg { - position: relative; + div.jslider-bg { + position: relative; height:100%; i { position: absolute; - top: 0; + top: 0; width: 5px; font-size: 0; @@ -223,16 +223,16 @@ &.left { top: 0; left: 50%; - height: 50%; - background-position: right 0; + height: 50%; + background-position: right 0; background-repeat: repeat-y } &.right { top: 50%; left: 50%; - height: 50%; - background-position: right 0; + height: 50%; + background-position: right 0; background-repeat: repeat-y } @@ -243,37 +243,37 @@ width: 60%; height: 100%; z-index: 1; - background-repeat: repeat-y; - background-position: -36px 0px; + background-repeat: repeat-y; + background-position: -36px 0px; } &.default { left: 50%; width: 5px; height:1px; - z-index: 1; + z-index: 1; background-color: @color-pointers-default-value; } - } + } } // END RANGES // POINTERS - div.jslider-pointer { - left: 62%; + div.jslider-pointer { + left: 62%; background-position: -7px -1px; - &.jslider-pointer-hover { - background-position: -7px -21px; + &.jslider-pointer-hover { + background-position: -7px -21px; } - &.jslider-pointer-to { - left: 62%; + &.jslider-pointer-to { + left: 62%; } - &.jslider-pointer-to.jslider-pointer-hover { - background-position: -7px -21px; + &.jslider-pointer-to.jslider-pointer-hover { + background-position: -7px -21px; } } // END POINTERS @@ -281,54 +281,54 @@ // LABELS div.jslider-label { top: -5px; - margin-left: 22px; + margin-left: 22px; &.jslider-label-to { top:100%; - left: inherit; + left: inherit; right: inherit; margin-top: -5px; } } // END LABELS - + // POINTERS VALUE div.jslider-value { top: 0; - left: 0; + left: 0; } - + div.jslider-value-to { top: 80%; - left: 0; + left: 0; } // END POINTERS VALUE - - // SCALES - div.jslider-scale { - position: inherit; - span { - position: absolute; - width: 5px; - height: 1px; - border-left: none; - font-size: 0; + + // SCALES + div.jslider-scale { + position: inherit; + span { + position: absolute; + width: 5px; + height: 1px; + border-left: none; + font-size: 0; border-top: 1px solid #999; } ins { - position: absolute; - left: 0px; - top: 5px; - font-size: 9px; - text-decoration: none; - color: @color-scale; + position: absolute; + left: 0px; + top: 5px; + font-size: 9px; + text-decoration: none; + color: @color-scale; } } - + } // END VERTICAL - + // SKINS @import "skin-css.less"; diff --git a/www/lib/angular-awesome-slider/src/css/less/skin-blue.less b/www/lib/angular-awesome-slider/src/css/less/skin-blue.less index 931c6afb..b5dc3545 100644 --- a/www/lib/angular-awesome-slider/src/css/less/skin-blue.less +++ b/www/lib/angular-awesome-slider/src/css/less/skin-blue.less @@ -4,8 +4,8 @@ &.jslider_blue { .jslider-bg i, - .jslider-pointer { - background: url(../img/jslider.blue.png) no-repeat 0 0; + .jslider-pointer { + background: url(../img/jslider.blue.png) no-repeat 0 0; } .jslider-bg { @@ -15,29 +15,29 @@ background-color: @color-skin-pointers-default-value; } - &.range { + &.range { z-index: 1; background-position: 0 -40px; } } } - + div.jslider-pointer { top: -6px; - width: 20px; + width: 20px; height: 17px; background-position: 2px -60px; z-index: 2; - - &.jslider-pointer-hover { + + &.jslider-pointer-hover { background-position: -20px -60px; } } - + &.vertical { div.jslider-bg i, - div.jslider-pointer { - background: url(../img/jslider.blue.vertical.png) no-repeat 0 0; + div.jslider-pointer { + background: url(../img/jslider.blue.vertical.png) no-repeat 0 0; } div.jslider-bg { @@ -48,7 +48,7 @@ background-position: -37px 0; } - &.before, + &.before, &.after { background: none; } @@ -60,15 +60,15 @@ } div.jslider-pointer { - top: -6px; - width: 20px; - height: 17px; + top: -6px; + width: 20px; + height: 17px; background-position: -7px 0; - &.jslider-pointer-hover { + &.jslider-pointer-hover { background-position: -7px -20px; } - + } div.jslider-value { @@ -76,4 +76,4 @@ } } -} +} \ No newline at end of file diff --git a/www/lib/angular-awesome-slider/src/css/less/skin-css.less b/www/lib/angular-awesome-slider/src/css/less/skin-css.less index 43b45901..8c06ba85 100644 --- a/www/lib/angular-awesome-slider/src/css/less/skin-css.less +++ b/www/lib/angular-awesome-slider/src/css/less/skin-css.less @@ -8,56 +8,56 @@ i { &.left { left: 0; - width: 50%; - background-color: @color-skin-background; + width: 50%; + background-color: @color-skin-background; background-image: none; } - &.right { - width: 50%; - left: 50%; - background-color: @color-skin-background; + &.right { + width: 50%; + left: 50%; + background-color: @color-skin-background; background-image: none; } - &.before { - left: 0; - width: 1px; - background-color: @color-skin-css-pointers-before-value; + &.before { + left: 0; + width: 1px; + background-color: @color-skin-css-pointers-before-value; background-image: none; } &.default { - left: 0; + left: 0; width: 1px; - z-index: 1; - background-color: @color-skin-css-pointers-default-value; + z-index: 1; + background-color: @color-skin-css-pointers-default-value; background-image: none; } - &.after { - left: 0; - background-color: @color-skin-css-pointers-after-value; + &.after { + left: 0; + background-color: @color-skin-css-pointers-after-value; background-image: none; } &.range { position: absolute; top: 0; left: 20%; - width: 60%; + width: 60%; height: 5px; - z-index: 1; - background-image: none; - background-color: #777575 + z-index: 1; + background-image: none; + background-color: #777575 } } } div.jslider-pointer { top: -3px; - left: 15px; - width: 10px; + left: 15px; + width: 10px; height: 10px; margin-left: -5px; - background-color: silver; - background-color: #615959; - border-radius: 50%; + background-color: silver; + background-color: #615959; + border-radius: 50%; } div.jslider-bg i,div.jslider-pointer { @@ -78,45 +78,45 @@ width: 5px; &.left { - top: 0; - height: 50%; - background-color: @color-skin-background; + top: 0; + height: 50%; + background-color: @color-skin-background; background-image: none; } - &.right { - height: 50%; - top: 50%; - background-color: @color-skin-background; + &.right { + height: 50%; + top: 50%; + background-color: @color-skin-background; background-image: none; } - &.range { + &.range { height: 100%; z-index: 1; - background-color: #777575; + background-color: #777575; background-image: none; } - &.before { - background-color: @color-skin-css-pointers-before-value; + &.before { + background-color: @color-skin-css-pointers-before-value; background-image: none; } &.default { height: 1px; - background-color: @color-skin-css-pointers-default-value; + background-color: @color-skin-css-pointers-default-value; background-image: none; - z-index: 2; + z-index: 2; } - &.after { - background-color: @color-skin-css-pointers-after-value; + &.after { + background-color: @color-skin-css-pointers-after-value; background-image: none; } } - + } div.jslider-bg i,div.jslider-pointer { @@ -125,10 +125,10 @@ div.jslider-pointer { left: 50%; - width: 10px; + width: 10px; height: 10px; - background-color: #615959; - border-radius: 50%; + background-color: #615959; + border-radius: 50%; margin-left: -3px; &.jslider-pointer-to { @@ -136,4 +136,4 @@ } } } -} +} diff --git a/www/lib/angular-awesome-slider/src/css/less/skin-plastic.less b/www/lib/angular-awesome-slider/src/css/less/skin-plastic.less index 31ebf55d..a6c41106 100644 --- a/www/lib/angular-awesome-slider/src/css/less/skin-plastic.less +++ b/www/lib/angular-awesome-slider/src/css/less/skin-plastic.less @@ -4,8 +4,8 @@ &.jslider_plastic { .jslider-bg i, - .jslider-pointer { - background: url(../img/jslider.plastic.png) no-repeat 0 0; + .jslider-pointer { + background: url(../img/jslider.plastic.png) no-repeat 0 0; } .jslider-bg { @@ -15,29 +15,29 @@ background-color: @color-skin-pointers-default-value; } - &.range { + &.range { z-index: 1; background-position: 0 -40px; } } } - + .jslider-pointer { - z-index: 2; - width: 20px; - height: 17px; + z-index: 2; + width: 20px; + height: 17px; top: -4px; background-position: 2px -60px; - &.jslider-pointer-hover { + &.jslider-pointer-hover { background-position: -18px -60px; } } - + &.vertical { div.jslider-bg i, - div.jslider-pointer { - background: url(../img/jslider.plastic.vertical.png) no-repeat 0 0; + div.jslider-pointer { + background: url(../img/jslider.plastic.vertical.png) no-repeat 0 0; } div.jslider-bg { @@ -49,7 +49,7 @@ background-position: -35px 0; } - &.before, + &.before, &.after { background: none; } @@ -63,11 +63,11 @@ div.jslider-pointer { top: -6px; margin-left: -6px; - width: 20px; - height: 17px; + width: 20px; + height: 17px; background-position: -7px -1px; - &.jslider-pointer-hover { + &.jslider-pointer-hover { background-position: -7px -21px; } diff --git a/www/lib/angular-awesome-slider/src/css/less/skin-round.less b/www/lib/angular-awesome-slider/src/css/less/skin-round.less index b0247d7b..4e7ddf1c 100644 --- a/www/lib/angular-awesome-slider/src/css/less/skin-round.less +++ b/www/lib/angular-awesome-slider/src/css/less/skin-round.less @@ -4,10 +4,10 @@ &.jslider_round { div.jslider-bg i, - div.jslider-pointer { - background: url(../img/jslider.round.png) no-repeat 0 0; + div.jslider-pointer { + background: url(../img/jslider.round.png) no-repeat 0 0; } - + div.jslider-bg { i { background-position: 0 -20px; @@ -15,29 +15,29 @@ background-color: #C2C7CA; } - &.range { + &.range { z-index: 1; background-position: 0 -40px; } } - } + } div.jslider-pointer { top: -6px; - width: 20px; - height: 17px; + width: 20px; + height: 17px; background-position: 0 -60px; z-index: 2; - &.jslider-pointer-hover { + &.jslider-pointer-hover { background-position: -20px -60px; } } &.vertical { div.jslider-bg i, - div.jslider-pointer { - background: url(../img/jslider.round.vertical.png) no-repeat 0 0; + div.jslider-pointer { + background: url(../img/jslider.round.vertical.png) no-repeat 0 0; } div.jslider-bg { @@ -47,7 +47,7 @@ background-position: -37px 0; } - &.before, + &.before, &.after { background: none; } @@ -55,17 +55,17 @@ &.default { background-color: @color-skin-pointers-default-value; } - } + } } div.jslider-pointer { - top: -6px; - width: 20px; - height: 17px; + top: -6px; + width: 20px; + height: 17px; background-position: -4px -3px; - &.jslider-pointer-hover { - background-position: -4px -23px; + &.jslider-pointer-hover { + background-position: -4px -23px; } &.jslider-value-to { @@ -78,4 +78,4 @@ } } -} +} \ No newline at end of file diff --git a/www/lib/angular-awesome-slider/src/index.html b/www/lib/angular-awesome-slider/src/index.html index 06b3eb90..2f34491b 100644 --- a/www/lib/angular-awesome-slider/src/index.html +++ b/www/lib/angular-awesome-slider/src/index.html @@ -16,6 +16,8 @@ + +