c80_estate 0.1.0.6 → 0.1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/admin/c80_estate/areas.rb +26 -2
- data/app/assets/javascript/c80_estate/lib/bootstrap-slider.min.js +29 -0
- data/app/assets/stylesheets/c80_estate/backend/admin_areas.scss +17 -3
- data/app/assets/stylesheets/c80_estate/lib/bootstrap-slider.scss +256 -0
- data/app/models/c80_estate/area.rb +10 -8
- data/lib/c80_estate/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51be21dfc7b817fbf3c99cad584bfa7c2aec9336
|
4
|
+
data.tar.gz: d1a7db257d0b45d4d2d390cfe0ac782b5bdbfefc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5d01cbf64293131e35ce9a26a012a1ef0b537725ca363c5e77486fd777effbed15c5b9f3bdc2aa41acc487c8c8c955056c2b118ac82566eb4c775509991506e
|
7
|
+
data.tar.gz: 292badf21737ac6f62a7b5155005437249179fbb73cb3e31057973026f9712110bed46a1280320c66f0c14233b74a832e2d5b2d75db39fbb2d16440f67cd0bb1
|
@@ -29,13 +29,37 @@ ActiveAdmin.register C80Estate::Area, as: 'Area' do
|
|
29
29
|
:collection => -> {C80Estate::Property.all.map { |p| ["#{p.title}", p.id]}},
|
30
30
|
:input_html => { :class => 'selectpicker', 'data-size' => "10", 'data-width' => '100%'}
|
31
31
|
|
32
|
+
# filter :item_prop_square_val_in,
|
33
|
+
# :as => :string,
|
34
|
+
# :label => 'Площадь (м.кв.)'
|
35
|
+
|
32
36
|
filter :item_prop_square_val_in,
|
33
37
|
:as => :string,
|
34
|
-
:label => 'Площадь (м.кв.)'
|
38
|
+
:label => 'Площадь (м.кв.)',
|
39
|
+
:input_html => { data: {
|
40
|
+
provide: 'slider',
|
41
|
+
slider_ticks: C80Estate::ItemProp.all_uniq_values(9).to_json, #'[0, 1, 2, 3]',
|
42
|
+
slider_labels: C80Estate::ItemProp.all_uniq_values(9).to_json, #'["none", short", "medium","long"]',
|
43
|
+
slider_min: C80Estate::ItemProp.all_uniq_values(9).last,
|
44
|
+
slider_max: C80Estate::ItemProp.all_uniq_values(9).first,
|
45
|
+
slider_step: 1,
|
46
|
+
slider_value: 0,
|
47
|
+
slider_range: true
|
48
|
+
}}
|
35
49
|
|
36
50
|
filter :item_prop_price_val_in,
|
37
51
|
:as => :string,
|
38
|
-
:label => 'Цена'
|
52
|
+
:label => 'Цена (руб/м.кв в месяц)',
|
53
|
+
:input_html => { data: {
|
54
|
+
provide: 'slider',
|
55
|
+
slider_ticks: C80Estate::ItemProp.all_uniq_values(1).to_json, #'[0, 1, 2, 3]',
|
56
|
+
slider_labels: C80Estate::ItemProp.all_uniq_values(1).to_json, #'["none", short", "medium","long"]',
|
57
|
+
slider_min: C80Estate::ItemProp.all_uniq_values(1).last,
|
58
|
+
slider_max: C80Estate::ItemProp.all_uniq_values(1).first,
|
59
|
+
slider_step: 1,
|
60
|
+
slider_value: 0,
|
61
|
+
slider_range: true
|
62
|
+
}}
|
39
63
|
|
40
64
|
filter :item_prop_oenter_in,
|
41
65
|
:as => :select,
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/*! =======================================================
|
2
|
+
VERSION 9.1.1
|
3
|
+
========================================================= */
|
4
|
+
"use strict";function _typeof(a){return a&&"undefined"!=typeof Symbol&&a.constructor===Symbol?"symbol":typeof a}/*! =========================================================
|
5
|
+
* bootstrap-slider.js
|
6
|
+
*
|
7
|
+
* Maintainers:
|
8
|
+
* Kyle Kemp
|
9
|
+
* - Twitter: @seiyria
|
10
|
+
* - Github: seiyria
|
11
|
+
* Rohit Kalkur
|
12
|
+
* - Twitter: @Rovolutionary
|
13
|
+
* - Github: rovolution
|
14
|
+
*
|
15
|
+
* =========================================================
|
16
|
+
*
|
17
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
18
|
+
* you may not use this file except in compliance with the License.
|
19
|
+
* You may obtain a copy of the License at
|
20
|
+
*
|
21
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
22
|
+
*
|
23
|
+
* Unless required by applicable law or agreed to in writing, software
|
24
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
25
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
26
|
+
* See the License for the specific language governing permissions and
|
27
|
+
* limitations under the License.
|
28
|
+
* ========================================================= */
|
29
|
+
!function(a){if("function"==typeof define&&define.amd)define(["jquery"],a);else if("object"===("undefined"==typeof module?"undefined":_typeof(module))&&module.exports){var b;try{b=require("jquery")}catch(c){b=null}module.exports=a(b)}else window&&(window.Slider=a(window.jQuery))}(function(a){var b="slider",c="bootstrapSlider";window.console||(window.console={}),window.console.log||(window.console.log=function(){}),window.console.warn||(window.console.warn=function(){});var d;return function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l&&l!==k)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}var m=this.map(function(){var d=a.data(this,b);return d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d)),a(this)});return!m||m.length>1?m:m[0]}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;c(a)}(a),function(a){function e(b,c){function d(a,b){var c="data-slider-"+b.replace(/_/g,"-"),d=a.getAttribute(c);try{return JSON.parse(d)}catch(e){return d}}this._state={value:null,enabled:null,offset:null,size:null,percentage:null,inDrag:!1,over:!1},"string"==typeof b?this.element=document.querySelector(b):b instanceof HTMLElement&&(this.element=b),c=c?c:{};for(var e=Object.keys(this.defaultOptions),f=0;f<e.length;f++){var h=e[f],i=c[h];i="undefined"!=typeof i?i:d(this.element,h),i=null!==i?i:this.defaultOptions[h],this.options||(this.options={}),this.options[h]=i}"vertical"!==this.options.orientation||"top"!==this.options.tooltip_position&&"bottom"!==this.options.tooltip_position?"horizontal"!==this.options.orientation||"left"!==this.options.tooltip_position&&"right"!==this.options.tooltip_position||(this.options.tooltip_position="top"):this.options.tooltip_position="right";var j,k,l,m,n,o=this.element.style.width,p=!1,q=this.element.parentNode;if(this.sliderElem)p=!0;else{this.sliderElem=document.createElement("div"),this.sliderElem.className="slider";var r=document.createElement("div");r.className="slider-track",k=document.createElement("div"),k.className="slider-track-low",j=document.createElement("div"),j.className="slider-selection",l=document.createElement("div"),l.className="slider-track-high",m=document.createElement("div"),m.className="slider-handle min-slider-handle",m.setAttribute("role","slider"),m.setAttribute("aria-valuemin",this.options.min),m.setAttribute("aria-valuemax",this.options.max),n=document.createElement("div"),n.className="slider-handle max-slider-handle",n.setAttribute("role","slider"),n.setAttribute("aria-valuemin",this.options.min),n.setAttribute("aria-valuemax",this.options.max),r.appendChild(k),r.appendChild(j),r.appendChild(l);var s=Array.isArray(this.options.labelledby);if(s&&this.options.labelledby[0]&&m.setAttribute("aria-labelledby",this.options.labelledby[0]),s&&this.options.labelledby[1]&&n.setAttribute("aria-labelledby",this.options.labelledby[1]),!s&&this.options.labelledby&&(m.setAttribute("aria-labelledby",this.options.labelledby),n.setAttribute("aria-labelledby",this.options.labelledby)),this.ticks=[],Array.isArray(this.options.ticks)&&this.options.ticks.length>0){for(this.ticksContainer=document.createElement("div"),this.ticksContainer.className="slider-tick-container",f=0;f<this.options.ticks.length;f++){var t=document.createElement("div");t.className="slider-tick",this.ticks.push(t),this.ticksContainer.appendChild(t)}j.className+=" tick-slider-selection"}if(this.tickLabels=[],Array.isArray(this.options.ticks_labels)&&this.options.ticks_labels.length>0)for(this.tickLabelContainer=document.createElement("div"),this.tickLabelContainer.className="slider-tick-label-container",f=0;f<this.options.ticks_labels.length;f++){var u=document.createElement("div"),v=0===this.options.ticks_positions.length,w=this.options.reversed&&v?this.options.ticks_labels.length-(f+1):f;u.className="slider-tick-label",u.innerHTML=this.options.ticks_labels[w],this.tickLabels.push(u),this.tickLabelContainer.appendChild(u)}var x=function(a){var b=document.createElement("div");b.className="tooltip-arrow";var c=document.createElement("div");c.className="tooltip-inner",a.appendChild(b),a.appendChild(c)},y=document.createElement("div");y.className="tooltip tooltip-main",y.setAttribute("role","presentation"),x(y);var z=document.createElement("div");z.className="tooltip tooltip-min",z.setAttribute("role","presentation"),x(z);var A=document.createElement("div");A.className="tooltip tooltip-max",A.setAttribute("role","presentation"),x(A),this.sliderElem.appendChild(r),this.sliderElem.appendChild(y),this.sliderElem.appendChild(z),this.sliderElem.appendChild(A),this.tickLabelContainer&&this.sliderElem.appendChild(this.tickLabelContainer),this.ticksContainer&&this.sliderElem.appendChild(this.ticksContainer),this.sliderElem.appendChild(m),this.sliderElem.appendChild(n),q.insertBefore(this.sliderElem,this.element),this.element.style.display="none"}if(a&&(this.$element=a(this.element),this.$sliderElem=a(this.sliderElem)),this.eventToCallbackMap={},this.sliderElem.id=this.options.id,this.touchCapable="ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,this.touchX=0,this.touchY=0,this.tooltip=this.sliderElem.querySelector(".tooltip-main"),this.tooltipInner=this.tooltip.querySelector(".tooltip-inner"),this.tooltip_min=this.sliderElem.querySelector(".tooltip-min"),this.tooltipInner_min=this.tooltip_min.querySelector(".tooltip-inner"),this.tooltip_max=this.sliderElem.querySelector(".tooltip-max"),this.tooltipInner_max=this.tooltip_max.querySelector(".tooltip-inner"),g[this.options.scale]&&(this.options.scale=g[this.options.scale]),p===!0&&(this._removeClass(this.sliderElem,"slider-horizontal"),this._removeClass(this.sliderElem,"slider-vertical"),this._removeClass(this.tooltip,"hide"),this._removeClass(this.tooltip_min,"hide"),this._removeClass(this.tooltip_max,"hide"),["left","top","width","height"].forEach(function(a){this._removeProperty(this.trackLow,a),this._removeProperty(this.trackSelection,a),this._removeProperty(this.trackHigh,a)},this),[this.handle1,this.handle2].forEach(function(a){this._removeProperty(a,"left"),this._removeProperty(a,"top")},this),[this.tooltip,this.tooltip_min,this.tooltip_max].forEach(function(a){this._removeProperty(a,"left"),this._removeProperty(a,"top"),this._removeProperty(a,"margin-left"),this._removeProperty(a,"margin-top"),this._removeClass(a,"right"),this._removeClass(a,"top")},this)),"vertical"===this.options.orientation?(this._addClass(this.sliderElem,"slider-vertical"),this.stylePos="top",this.mousePos="pageY",this.sizePos="offsetHeight"):(this._addClass(this.sliderElem,"slider-horizontal"),this.sliderElem.style.width=o,this.options.orientation="horizontal",this.stylePos="left",this.mousePos="pageX",this.sizePos="offsetWidth"),this._setTooltipPosition(),Array.isArray(this.options.ticks)&&this.options.ticks.length>0&&(this.options.max=Math.max.apply(Math,this.options.ticks),this.options.min=Math.min.apply(Math,this.options.ticks)),Array.isArray(this.options.value)?(this.options.range=!0,this._state.value=this.options.value):this.options.range?this._state.value=[this.options.value,this.options.max]:this._state.value=this.options.value,this.trackLow=k||this.trackLow,this.trackSelection=j||this.trackSelection,this.trackHigh=l||this.trackHigh,"none"===this.options.selection&&(this._addClass(this.trackLow,"hide"),this._addClass(this.trackSelection,"hide"),this._addClass(this.trackHigh,"hide")),this.handle1=m||this.handle1,this.handle2=n||this.handle2,p===!0)for(this._removeClass(this.handle1,"round triangle"),this._removeClass(this.handle2,"round triangle hide"),f=0;f<this.ticks.length;f++)this._removeClass(this.ticks[f],"round triangle hide");var B=["round","triangle","custom"],C=-1!==B.indexOf(this.options.handle);if(C)for(this._addClass(this.handle1,this.options.handle),this._addClass(this.handle2,this.options.handle),f=0;f<this.ticks.length;f++)this._addClass(this.ticks[f],this.options.handle);this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos],this.setValue(this._state.value),this.handle1Keydown=this._keydown.bind(this,0),this.handle1.addEventListener("keydown",this.handle1Keydown,!1),this.handle2Keydown=this._keydown.bind(this,1),this.handle2.addEventListener("keydown",this.handle2Keydown,!1),this.mousedown=this._mousedown.bind(this),this.touchstart=this._touchstart.bind(this),this.touchmove=this._touchmove.bind(this),this.touchCapable&&(this.sliderElem.addEventListener("touchstart",this.touchstart,!1),this.sliderElem.addEventListener("touchmove",this.touchmove,!1)),this.sliderElem.addEventListener("mousedown",this.mousedown,!1),this.resize=this._resize.bind(this),window.addEventListener("resize",this.resize,!1),"hide"===this.options.tooltip?(this._addClass(this.tooltip,"hide"),this._addClass(this.tooltip_min,"hide"),this._addClass(this.tooltip_max,"hide")):"always"===this.options.tooltip?(this._showTooltip(),this._alwaysShowTooltip=!0):(this.showTooltip=this._showTooltip.bind(this),this.hideTooltip=this._hideTooltip.bind(this),this.sliderElem.addEventListener("mouseenter",this.showTooltip,!1),this.sliderElem.addEventListener("mouseleave",this.hideTooltip,!1),this.handle1.addEventListener("focus",this.showTooltip,!1),this.handle1.addEventListener("blur",this.hideTooltip,!1),this.handle2.addEventListener("focus",this.showTooltip,!1),this.handle2.addEventListener("blur",this.hideTooltip,!1)),this.options.enabled?this.enable():this.disable()}var f={formatInvalidInputErrorMsg:function(a){return"Invalid input value '"+a+"' passed in"},callingContextNotSliderInstance:"Calling context element does not have instance of Slider bound to it. Check your code to make sure the JQuery object returned from the call to the slider() initializer is calling the method"},g={linear:{toValue:function(a){var b=a/100*(this.options.max-this.options.min),c=!0;if(this.options.ticks_positions.length>0){for(var d,e,f,g=0,h=1;h<this.options.ticks_positions.length;h++)if(a<=this.options.ticks_positions[h]){d=this.options.ticks[h-1],f=this.options.ticks_positions[h-1],e=this.options.ticks[h],g=this.options.ticks_positions[h];break}var i=(a-f)/(g-f);b=d+i*(e-d),c=!1}var j=c?this.options.min:0,k=j+Math.round(b/this.options.step)*this.options.step;return k<this.options.min?this.options.min:k>this.options.max?this.options.max:k},toPercentage:function(a){if(this.options.max===this.options.min)return 0;if(this.options.ticks_positions.length>0){for(var b,c,d,e=0,f=0;f<this.options.ticks.length;f++)if(a<=this.options.ticks[f]){b=f>0?this.options.ticks[f-1]:0,d=f>0?this.options.ticks_positions[f-1]:0,c=this.options.ticks[f],e=this.options.ticks_positions[f];break}if(f>0){var g=(a-b)/(c-b);return d+g*(e-d)}}return 100*(a-this.options.min)/(this.options.max-this.options.min)}},logarithmic:{toValue:function(a){var b=0===this.options.min?0:Math.log(this.options.min),c=Math.log(this.options.max),d=Math.exp(b+(c-b)*a/100);return d=this.options.min+Math.round((d-this.options.min)/this.options.step)*this.options.step,d<this.options.min?this.options.min:d>this.options.max?this.options.max:d},toPercentage:function(a){if(this.options.max===this.options.min)return 0;var b=Math.log(this.options.max),c=0===this.options.min?0:Math.log(this.options.min),d=0===a?0:Math.log(a);return 100*(d-c)/(b-c)}}};d=function(a,b){return e.call(this,a,b),this},d.prototype={_init:function(){},constructor:d,defaultOptions:{id:"",min:0,max:10,step:1,precision:0,orientation:"horizontal",value:5,range:!1,selection:"before",tooltip:"show",tooltip_split:!1,handle:"round",reversed:!1,enabled:!0,formatter:function(a){return Array.isArray(a)?a[0]+" : "+a[1]:a},natural_arrow_keys:!1,ticks:[],ticks_positions:[],ticks_labels:[],ticks_snap_bounds:0,scale:"linear",focus:!1,tooltip_position:null,labelledby:null},getElement:function(){return this.sliderElem},getValue:function(){return this.options.range?this._state.value:this._state.value[0]},setValue:function(a,b,c){a||(a=0);var d=this.getValue();this._state.value=this._validateInputValue(a);var e=this._applyPrecision.bind(this);this.options.range?(this._state.value[0]=e(this._state.value[0]),this._state.value[1]=e(this._state.value[1]),this._state.value[0]=Math.max(this.options.min,Math.min(this.options.max,this._state.value[0])),this._state.value[1]=Math.max(this.options.min,Math.min(this.options.max,this._state.value[1]))):(this._state.value=e(this._state.value),this._state.value=[Math.max(this.options.min,Math.min(this.options.max,this._state.value))],this._addClass(this.handle2,"hide"),"after"===this.options.selection?this._state.value[1]=this.options.max:this._state.value[1]=this.options.min),this.options.max>this.options.min?this._state.percentage=[this._toPercentage(this._state.value[0]),this._toPercentage(this._state.value[1]),100*this.options.step/(this.options.max-this.options.min)]:this._state.percentage=[0,0,100],this._layout();var f=this.options.range?this._state.value:this._state.value[0];return this._setDataVal(f),b===!0&&this._trigger("slide",f),d!==f&&c===!0&&this._trigger("change",{oldValue:d,newValue:f}),this},destroy:function(){this._removeSliderEventHandlers(),this.sliderElem.parentNode.removeChild(this.sliderElem),this.element.style.display="",this._cleanUpEventCallbacksMap(),this.element.removeAttribute("data"),a&&(this._unbindJQueryEventHandlers(),this.$element.removeData("slider"))},disable:function(){return this._state.enabled=!1,this.handle1.removeAttribute("tabindex"),this.handle2.removeAttribute("tabindex"),this._addClass(this.sliderElem,"slider-disabled"),this._trigger("slideDisabled"),this},enable:function(){return this._state.enabled=!0,this.handle1.setAttribute("tabindex",0),this.handle2.setAttribute("tabindex",0),this._removeClass(this.sliderElem,"slider-disabled"),this._trigger("slideEnabled"),this},toggle:function(){return this._state.enabled?this.disable():this.enable(),this},isEnabled:function(){return this._state.enabled},on:function(a,b){return this._bindNonQueryEventHandler(a,b),this},off:function(b,c){a?(this.$element.off(b,c),this.$sliderElem.off(b,c)):this._unbindNonQueryEventHandler(b,c)},getAttribute:function(a){return a?this.options[a]:this.options},setAttribute:function(a,b){return this.options[a]=b,this},refresh:function(){return this._removeSliderEventHandlers(),e.call(this,this.element,this.options),a&&a.data(this.element,"slider",this),this},relayout:function(){return this._resize(),this._layout(),this},_removeSliderEventHandlers:function(){this.handle1.removeEventListener("keydown",this.handle1Keydown,!1),this.handle2.removeEventListener("keydown",this.handle2Keydown,!1),this.showTooltip&&(this.handle1.removeEventListener("focus",this.showTooltip,!1),this.handle2.removeEventListener("focus",this.showTooltip,!1)),this.hideTooltip&&(this.handle1.removeEventListener("blur",this.hideTooltip,!1),this.handle2.removeEventListener("blur",this.hideTooltip,!1)),this.showTooltip&&this.sliderElem.removeEventListener("mouseenter",this.showTooltip,!1),this.hideTooltip&&this.sliderElem.removeEventListener("mouseleave",this.hideTooltip,!1),this.sliderElem.removeEventListener("touchstart",this.touchstart,!1),this.sliderElem.removeEventListener("touchmove",this.touchmove,!1),this.sliderElem.removeEventListener("mousedown",this.mousedown,!1),window.removeEventListener("resize",this.resize,!1)},_bindNonQueryEventHandler:function(a,b){void 0===this.eventToCallbackMap[a]&&(this.eventToCallbackMap[a]=[]),this.eventToCallbackMap[a].push(b)},_unbindNonQueryEventHandler:function(a,b){var c=this.eventToCallbackMap[a];if(void 0!==c)for(var d=0;d<c.length;d++)if(c[d]===b){c.splice(d,1);break}},_cleanUpEventCallbacksMap:function(){for(var a=Object.keys(this.eventToCallbackMap),b=0;b<a.length;b++){var c=a[b];this.eventToCallbackMap[c]=null}},_showTooltip:function(){this.options.tooltip_split===!1?(this._addClass(this.tooltip,"in"),this.tooltip_min.style.display="none",this.tooltip_max.style.display="none"):(this._addClass(this.tooltip_min,"in"),this._addClass(this.tooltip_max,"in"),this.tooltip.style.display="none"),this._state.over=!0},_hideTooltip:function(){this._state.inDrag===!1&&this.alwaysShowTooltip!==!0&&(this._removeClass(this.tooltip,"in"),this._removeClass(this.tooltip_min,"in"),this._removeClass(this.tooltip_max,"in")),this._state.over=!1},_layout:function(){var a;if(a=this.options.reversed?[100-this._state.percentage[0],this.options.range?100-this._state.percentage[1]:this._state.percentage[1]]:[this._state.percentage[0],this._state.percentage[1]],this.handle1.style[this.stylePos]=a[0]+"%",this.handle1.setAttribute("aria-valuenow",this._state.value[0]),this.handle2.style[this.stylePos]=a[1]+"%",this.handle2.setAttribute("aria-valuenow",this._state.value[1]),Array.isArray(this.options.ticks)&&this.options.ticks.length>0){var b="vertical"===this.options.orientation?"height":"width",c="vertical"===this.options.orientation?"marginTop":"marginLeft",d=this._state.size/(this.options.ticks.length-1);if(this.tickLabelContainer){var e=0;if(0===this.options.ticks_positions.length)"vertical"!==this.options.orientation&&(this.tickLabelContainer.style[c]=-d/2+"px"),e=this.tickLabelContainer.offsetHeight;else for(f=0;f<this.tickLabelContainer.childNodes.length;f++)this.tickLabelContainer.childNodes[f].offsetHeight>e&&(e=this.tickLabelContainer.childNodes[f].offsetHeight);"horizontal"===this.options.orientation&&(this.sliderElem.style.marginBottom=e+"px")}for(var f=0;f<this.options.ticks.length;f++){var g=this.options.ticks_positions[f]||this._toPercentage(this.options.ticks[f]);this.options.reversed&&(g=100-g),this.ticks[f].style[this.stylePos]=g+"%",this._removeClass(this.ticks[f],"in-selection"),this.options.range?g>=a[0]&&g<=a[1]&&this._addClass(this.ticks[f],"in-selection"):"after"===this.options.selection&&g>=a[0]?this._addClass(this.ticks[f],"in-selection"):"before"===this.options.selection&&g<=a[0]&&this._addClass(this.ticks[f],"in-selection"),this.tickLabels[f]&&(this.tickLabels[f].style[b]=d+"px","vertical"!==this.options.orientation&&void 0!==this.options.ticks_positions[f]?(this.tickLabels[f].style.position="absolute",this.tickLabels[f].style[this.stylePos]=g+"%",this.tickLabels[f].style[c]=-d/2+"px"):"vertical"===this.options.orientation&&(this.tickLabels[f].style.marginLeft=this.sliderElem.offsetWidth+"px",this.tickLabelContainer.style.marginTop=this.sliderElem.offsetWidth/2*-1+"px"))}}var h;if(this.options.range){h=this.options.formatter(this._state.value),this._setText(this.tooltipInner,h),this.tooltip.style[this.stylePos]=(a[1]+a[0])/2+"%","vertical"===this.options.orientation?this._css(this.tooltip,"margin-top",-this.tooltip.offsetHeight/2+"px"):this._css(this.tooltip,"margin-left",-this.tooltip.offsetWidth/2+"px"),"vertical"===this.options.orientation?this._css(this.tooltip,"margin-top",-this.tooltip.offsetHeight/2+"px"):this._css(this.tooltip,"margin-left",-this.tooltip.offsetWidth/2+"px");var i=this.options.formatter(this._state.value[0]);this._setText(this.tooltipInner_min,i);var j=this.options.formatter(this._state.value[1]);this._setText(this.tooltipInner_max,j),this.tooltip_min.style[this.stylePos]=a[0]+"%","vertical"===this.options.orientation?this._css(this.tooltip_min,"margin-top",-this.tooltip_min.offsetHeight/2+"px"):this._css(this.tooltip_min,"margin-left",-this.tooltip_min.offsetWidth/2+"px"),this.tooltip_max.style[this.stylePos]=a[1]+"%","vertical"===this.options.orientation?this._css(this.tooltip_max,"margin-top",-this.tooltip_max.offsetHeight/2+"px"):this._css(this.tooltip_max,"margin-left",-this.tooltip_max.offsetWidth/2+"px")}else h=this.options.formatter(this._state.value[0]),this._setText(this.tooltipInner,h),this.tooltip.style[this.stylePos]=a[0]+"%","vertical"===this.options.orientation?this._css(this.tooltip,"margin-top",-this.tooltip.offsetHeight/2+"px"):this._css(this.tooltip,"margin-left",-this.tooltip.offsetWidth/2+"px");if("vertical"===this.options.orientation)this.trackLow.style.top="0",this.trackLow.style.height=Math.min(a[0],a[1])+"%",this.trackSelection.style.top=Math.min(a[0],a[1])+"%",this.trackSelection.style.height=Math.abs(a[0]-a[1])+"%",this.trackHigh.style.bottom="0",this.trackHigh.style.height=100-Math.min(a[0],a[1])-Math.abs(a[0]-a[1])+"%";else{this.trackLow.style.left="0",this.trackLow.style.width=Math.min(a[0],a[1])+"%",this.trackSelection.style.left=Math.min(a[0],a[1])+"%",this.trackSelection.style.width=Math.abs(a[0]-a[1])+"%",this.trackHigh.style.right="0",this.trackHigh.style.width=100-Math.min(a[0],a[1])-Math.abs(a[0]-a[1])+"%";var k=this.tooltip_min.getBoundingClientRect(),l=this.tooltip_max.getBoundingClientRect();"bottom"===this.options.tooltip_position?k.right>l.left?(this._removeClass(this.tooltip_max,"bottom"),this._addClass(this.tooltip_max,"top"),this.tooltip_max.style.top="",this.tooltip_max.style.bottom="22px"):(this._removeClass(this.tooltip_max,"top"),this._addClass(this.tooltip_max,"bottom"),this.tooltip_max.style.top=this.tooltip_min.style.top,this.tooltip_max.style.bottom=""):k.right>l.left?(this._removeClass(this.tooltip_max,"top"),this._addClass(this.tooltip_max,"bottom"),this.tooltip_max.style.top="18px"):(this._removeClass(this.tooltip_max,"bottom"),this._addClass(this.tooltip_max,"top"),this.tooltip_max.style.top=this.tooltip_min.style.top)}},_resize:function(a){this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos],this._layout()},_removeProperty:function(a,b){a.style.removeProperty?a.style.removeProperty(b):a.style.removeAttribute(b)},_mousedown:function(a){if(!this._state.enabled)return!1;this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos];var b=this._getPercentage(a);if(this.options.range){var c=Math.abs(this._state.percentage[0]-b),d=Math.abs(this._state.percentage[1]-b);this._state.dragged=d>c?0:1,this._adjustPercentageForRangeSliders(b)}else this._state.dragged=0;this._state.percentage[this._state.dragged]=b,this._layout(),this.touchCapable&&(document.removeEventListener("touchmove",this.mousemove,!1),document.removeEventListener("touchend",this.mouseup,!1)),this.mousemove&&document.removeEventListener("mousemove",this.mousemove,!1),this.mouseup&&document.removeEventListener("mouseup",this.mouseup,!1),this.mousemove=this._mousemove.bind(this),this.mouseup=this._mouseup.bind(this),this.touchCapable&&(document.addEventListener("touchmove",this.mousemove,!1),document.addEventListener("touchend",this.mouseup,!1)),document.addEventListener("mousemove",this.mousemove,!1),document.addEventListener("mouseup",this.mouseup,!1),this._state.inDrag=!0;var e=this._calculateValue();return this._trigger("slideStart",e),this._setDataVal(e),this.setValue(e,!1,!0),this._pauseEvent(a),this.options.focus&&this._triggerFocusOnHandle(this._state.dragged),!0},_touchstart:function(a){if(void 0===a.changedTouches)return void this._mousedown(a);var b=a.changedTouches[0];this.touchX=b.pageX,this.touchY=b.pageY},_triggerFocusOnHandle:function(a){0===a&&this.handle1.focus(),1===a&&this.handle2.focus()},_keydown:function(a,b){if(!this._state.enabled)return!1;var c;switch(b.keyCode){case 37:case 40:c=-1;break;case 39:case 38:c=1}if(c){if(this.options.natural_arrow_keys){var d="vertical"===this.options.orientation&&!this.options.reversed,e="horizontal"===this.options.orientation&&this.options.reversed;(d||e)&&(c=-c)}var f=this._state.value[a]+c*this.options.step;return this.options.range&&(f=[a?this._state.value[0]:f,a?f:this._state.value[1]]),this._trigger("slideStart",f),this._setDataVal(f),this.setValue(f,!0,!0),this._setDataVal(f),this._trigger("slideStop",f),this._layout(),this._pauseEvent(b),!1}},_pauseEvent:function(a){a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),a.cancelBubble=!0,a.returnValue=!1},_mousemove:function(a){if(!this._state.enabled)return!1;var b=this._getPercentage(a);this._adjustPercentageForRangeSliders(b),this._state.percentage[this._state.dragged]=b,this._layout();var c=this._calculateValue(!0);return this.setValue(c,!0,!0),!1},_touchmove:function(a){if(void 0!==a.changedTouches){var b=a.changedTouches[0],c=b.pageX-this.touchX,d=b.pageY-this.touchY;this._state.inDrag||("vertical"===this.options.orientation&&5>=c&&c>=-5&&(d>=15||-15>=d)?this._mousedown(a):5>=d&&d>=-5&&(c>=15||-15>=c)&&this._mousedown(a))}},_adjustPercentageForRangeSliders:function(a){if(this.options.range){var b=this._getNumDigitsAfterDecimalPlace(a);b=b?b-1:0;var c=this._applyToFixedAndParseFloat(a,b);0===this._state.dragged&&this._applyToFixedAndParseFloat(this._state.percentage[1],b)<c?(this._state.percentage[0]=this._state.percentage[1],this._state.dragged=1):1===this._state.dragged&&this._applyToFixedAndParseFloat(this._state.percentage[0],b)>c&&(this._state.percentage[1]=this._state.percentage[0],this._state.dragged=0)}},_mouseup:function(){if(!this._state.enabled)return!1;this.touchCapable&&(document.removeEventListener("touchmove",this.mousemove,!1),document.removeEventListener("touchend",this.mouseup,!1)),document.removeEventListener("mousemove",this.mousemove,!1),document.removeEventListener("mouseup",this.mouseup,!1),this._state.inDrag=!1,this._state.over===!1&&this._hideTooltip();var a=this._calculateValue(!0);return this._layout(),this._setDataVal(a),this._trigger("slideStop",a),!1},_calculateValue:function(a){var b;if(this.options.range?(b=[this.options.min,this.options.max],0!==this._state.percentage[0]&&(b[0]=this._toValue(this._state.percentage[0]),b[0]=this._applyPrecision(b[0])),100!==this._state.percentage[1]&&(b[1]=this._toValue(this._state.percentage[1]),b[1]=this._applyPrecision(b[1]))):(b=this._toValue(this._state.percentage[0]),b=parseFloat(b),b=this._applyPrecision(b)),a){for(var c=[b,1/0],d=0;d<this.options.ticks.length;d++){var e=Math.abs(this.options.ticks[d]-b);e<=c[1]&&(c=[this.options.ticks[d],e])}if(c[1]<=this.options.ticks_snap_bounds)return c[0]}return b},_applyPrecision:function(a){var b=this.options.precision||this._getNumDigitsAfterDecimalPlace(this.options.step);return this._applyToFixedAndParseFloat(a,b)},_getNumDigitsAfterDecimalPlace:function(a){var b=(""+a).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return b?Math.max(0,(b[1]?b[1].length:0)-(b[2]?+b[2]:0)):0},_applyToFixedAndParseFloat:function(a,b){var c=a.toFixed(b);return parseFloat(c)},_getPercentage:function(a){!this.touchCapable||"touchstart"!==a.type&&"touchmove"!==a.type||(a=a.touches[0]);var b=a[this.mousePos],c=this._state.offset[this.stylePos],d=b-c,e=d/this._state.size*100;return e=Math.round(e/this._state.percentage[2])*this._state.percentage[2],this.options.reversed&&(e=100-e),Math.max(0,Math.min(100,e))},_validateInputValue:function(a){if("number"==typeof a)return a;if(Array.isArray(a))return this._validateArray(a),a;throw new Error(f.formatInvalidInputErrorMsg(a))},_validateArray:function(a){for(var b=0;b<a.length;b++){var c=a[b];if("number"!=typeof c)throw new Error(f.formatInvalidInputErrorMsg(c))}},_setDataVal:function(a){this.element.setAttribute("data-value",a),this.element.setAttribute("value",a),this.element.value=a},_trigger:function(b,c){c=c||0===c?c:void 0;var d=this.eventToCallbackMap[b];if(d&&d.length)for(var e=0;e<d.length;e++){var f=d[e];f(c)}a&&this._triggerJQueryEvent(b,c)},_triggerJQueryEvent:function(a,b){var c={type:a,value:b};this.$element.trigger(c),this.$sliderElem.trigger(c)},_unbindJQueryEventHandlers:function(){this.$element.off(),this.$sliderElem.off()},_setText:function(a,b){"undefined"!=typeof a.textContent?a.textContent=b:"undefined"!=typeof a.innerText&&(a.innerText=b)},_removeClass:function(a,b){for(var c=b.split(" "),d=a.className,e=0;e<c.length;e++){var f=c[e],g=new RegExp("(?:\\s|^)"+f+"(?:\\s|$)");d=d.replace(g," ")}a.className=d.trim()},_addClass:function(a,b){for(var c=b.split(" "),d=a.className,e=0;e<c.length;e++){var f=c[e],g=new RegExp("(?:\\s|^)"+f+"(?:\\s|$)"),h=g.test(d);h||(d+=" "+f)}a.className=d.trim()},_offsetLeft:function(a){return a.getBoundingClientRect().left},_offsetTop:function(a){for(var b=a.offsetTop;(a=a.offsetParent)&&!isNaN(a.offsetTop);)b+=a.offsetTop,"BODY"!==a.tagName&&(b-=a.scrollTop);return b},_offset:function(a){return{left:this._offsetLeft(a),top:this._offsetTop(a)}},_css:function(b,c,d){if(a)a.style(b,c,d);else{var e=c.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(a,b){return b.toUpperCase()});b.style[e]=d}},_toValue:function(a){return this.options.scale.toValue.apply(this,[a])},_toPercentage:function(a){return this.options.scale.toPercentage.apply(this,[a])},_setTooltipPosition:function(){var a=[this.tooltip,this.tooltip_min,this.tooltip_max];if("vertical"===this.options.orientation){var b=this.options.tooltip_position||"right",c="left"===b?"right":"left";a.forEach(function(a){this._addClass(a,b),a.style[c]="100%"}.bind(this))}else"bottom"===this.options.tooltip_position?a.forEach(function(a){this._addClass(a,"bottom"),a.style.top="22px"}.bind(this)):a.forEach(function(a){this._addClass(a,"top"),a.style.top=-this.tooltip.outerHeight-14+"px"}.bind(this))}},a&&!function(){var e=void 0;a.fn.slider?(window.console.warn("bootstrap-slider.js - WARNING: $.fn.slider namespace is already bound. Use the $.fn.bootstrapSlider namespace instead."),e=c):(a.bridget(b,d),e=b),a.bridget(c,d),a(function(){a("input[data-provide=slider]")[e]()})}()}(a),d});
|
@@ -105,9 +105,23 @@ body.admin_areas {
|
|
105
105
|
legend { display: none !important; }
|
106
106
|
}
|
107
107
|
|
108
|
-
|
109
|
-
|
110
|
-
|
108
|
+
}
|
109
|
+
|
110
|
+
a.delete_link {
|
111
|
+
display: none;
|
112
|
+
}
|
113
|
+
|
114
|
+
.slider.slider-horizontal {
|
115
|
+
width: 227px !important;
|
116
|
+
}
|
117
|
+
|
118
|
+
.slider.slider-horizontal .slider-handle {
|
119
|
+
margin-top: 0 !important;
|
120
|
+
}
|
111
121
|
|
122
|
+
.slider.slider-horizontal .slider-tick {
|
123
|
+
margin-top: 0 !important;
|
112
124
|
}
|
125
|
+
|
126
|
+
|
113
127
|
}
|
@@ -0,0 +1,256 @@
|
|
1
|
+
/*! =======================================================
|
2
|
+
VERSION 7.0.3
|
3
|
+
========================================================= */
|
4
|
+
/*! =========================================================
|
5
|
+
* bootstrap-slider.js
|
6
|
+
*
|
7
|
+
* Maintainers:
|
8
|
+
* Kyle Kemp
|
9
|
+
* - Twitter: @seiyria
|
10
|
+
* - Github: seiyria
|
11
|
+
* Rohit Kalkur
|
12
|
+
* - Twitter: @Rovolutionary
|
13
|
+
* - Github: rovolution
|
14
|
+
*
|
15
|
+
* =========================================================
|
16
|
+
*
|
17
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
18
|
+
* you may not use this file except in compliance with the License.
|
19
|
+
* You may obtain a copy of the License at
|
20
|
+
*
|
21
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
22
|
+
*
|
23
|
+
* Unless required by applicable law or agreed to in writing, software
|
24
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
25
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
26
|
+
* See the License for the specific language governing permissions and
|
27
|
+
* limitations under the License.
|
28
|
+
* ========================================================= */
|
29
|
+
.slider {
|
30
|
+
display: inline-block;
|
31
|
+
vertical-align: middle;
|
32
|
+
position: relative;
|
33
|
+
}
|
34
|
+
.slider.slider-horizontal {
|
35
|
+
width: 210px;
|
36
|
+
height: 20px;
|
37
|
+
}
|
38
|
+
.slider.slider-horizontal .slider-track {
|
39
|
+
height: 10px;
|
40
|
+
width: 100%;
|
41
|
+
margin-top: -5px;
|
42
|
+
top: 50%;
|
43
|
+
left: 0;
|
44
|
+
}
|
45
|
+
.slider.slider-horizontal .slider-selection,
|
46
|
+
.slider.slider-horizontal .slider-track-low,
|
47
|
+
.slider.slider-horizontal .slider-track-high {
|
48
|
+
height: 100%;
|
49
|
+
top: 0;
|
50
|
+
bottom: 0;
|
51
|
+
}
|
52
|
+
.slider.slider-horizontal .slider-tick,
|
53
|
+
.slider.slider-horizontal .slider-handle {
|
54
|
+
margin-left: -10px;
|
55
|
+
margin-top: -5px;
|
56
|
+
}
|
57
|
+
.slider.slider-horizontal .slider-tick.triangle,
|
58
|
+
.slider.slider-horizontal .slider-handle.triangle {
|
59
|
+
border-width: 0 10px 10px 10px;
|
60
|
+
width: 0;
|
61
|
+
height: 0;
|
62
|
+
border-bottom-color: #0480be;
|
63
|
+
margin-top: 0;
|
64
|
+
}
|
65
|
+
.slider.slider-horizontal .slider-tick-label-container {
|
66
|
+
white-space: nowrap;
|
67
|
+
margin-top: 20px;
|
68
|
+
}
|
69
|
+
.slider.slider-horizontal .slider-tick-label-container .slider-tick-label {
|
70
|
+
padding-top: 4px;
|
71
|
+
display: inline-block;
|
72
|
+
text-align: center;
|
73
|
+
}
|
74
|
+
.slider.slider-vertical {
|
75
|
+
height: 210px;
|
76
|
+
width: 20px;
|
77
|
+
}
|
78
|
+
.slider.slider-vertical .slider-track {
|
79
|
+
width: 10px;
|
80
|
+
height: 100%;
|
81
|
+
margin-left: -5px;
|
82
|
+
left: 50%;
|
83
|
+
top: 0;
|
84
|
+
}
|
85
|
+
.slider.slider-vertical .slider-selection {
|
86
|
+
width: 100%;
|
87
|
+
left: 0;
|
88
|
+
top: 0;
|
89
|
+
bottom: 0;
|
90
|
+
}
|
91
|
+
.slider.slider-vertical .slider-track-low,
|
92
|
+
.slider.slider-vertical .slider-track-high {
|
93
|
+
width: 100%;
|
94
|
+
left: 0;
|
95
|
+
right: 0;
|
96
|
+
}
|
97
|
+
.slider.slider-vertical .slider-tick,
|
98
|
+
.slider.slider-vertical .slider-handle {
|
99
|
+
margin-left: -5px;
|
100
|
+
margin-top: -10px;
|
101
|
+
}
|
102
|
+
.slider.slider-vertical .slider-tick.triangle,
|
103
|
+
.slider.slider-vertical .slider-handle.triangle {
|
104
|
+
border-width: 10px 0 10px 10px;
|
105
|
+
width: 1px;
|
106
|
+
height: 1px;
|
107
|
+
border-left-color: #0480be;
|
108
|
+
margin-left: 0;
|
109
|
+
}
|
110
|
+
.slider.slider-vertical .slider-tick-label-container {
|
111
|
+
white-space: nowrap;
|
112
|
+
}
|
113
|
+
.slider.slider-vertical .slider-tick-label-container .slider-tick-label {
|
114
|
+
padding-left: 4px;
|
115
|
+
}
|
116
|
+
.slider.slider-disabled .slider-handle {
|
117
|
+
background-image: -webkit-linear-gradient(top, #dfdfdf 0%, #bebebe 100%);
|
118
|
+
background-image: -o-linear-gradient(top, #dfdfdf 0%, #bebebe 100%);
|
119
|
+
background-image: linear-gradient(to bottom, #dfdfdf 0%, #bebebe 100%);
|
120
|
+
background-repeat: repeat-x;
|
121
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdfdfdf', endColorstr='#ffbebebe', GradientType=0);
|
122
|
+
}
|
123
|
+
.slider.slider-disabled .slider-track {
|
124
|
+
background-image: -webkit-linear-gradient(top, #e5e5e5 0%, #e9e9e9 100%);
|
125
|
+
background-image: -o-linear-gradient(top, #e5e5e5 0%, #e9e9e9 100%);
|
126
|
+
background-image: linear-gradient(to bottom, #e5e5e5 0%, #e9e9e9 100%);
|
127
|
+
background-repeat: repeat-x;
|
128
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe5e5e5', endColorstr='#ffe9e9e9', GradientType=0);
|
129
|
+
cursor: not-allowed;
|
130
|
+
}
|
131
|
+
.slider input {
|
132
|
+
display: none;
|
133
|
+
}
|
134
|
+
.slider .tooltip.top {
|
135
|
+
margin-top: -36px;
|
136
|
+
}
|
137
|
+
.slider .tooltip-inner {
|
138
|
+
white-space: nowrap;
|
139
|
+
max-width: none;
|
140
|
+
}
|
141
|
+
.slider .hide {
|
142
|
+
display: none;
|
143
|
+
}
|
144
|
+
.slider-track {
|
145
|
+
position: absolute;
|
146
|
+
cursor: pointer;
|
147
|
+
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #f9f9f9 100%);
|
148
|
+
background-image: -o-linear-gradient(top, #f5f5f5 0%, #f9f9f9 100%);
|
149
|
+
background-image: linear-gradient(to bottom, #f5f5f5 0%, #f9f9f9 100%);
|
150
|
+
background-repeat: repeat-x;
|
151
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);
|
152
|
+
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
|
153
|
+
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
|
154
|
+
border-radius: 4px;
|
155
|
+
}
|
156
|
+
.slider-selection {
|
157
|
+
position: absolute;
|
158
|
+
background-image: -webkit-linear-gradient(top, #f9f9f9 0%, #f5f5f5 100%);
|
159
|
+
background-image: -o-linear-gradient(top, #f9f9f9 0%, #f5f5f5 100%);
|
160
|
+
background-image: linear-gradient(to bottom, #f9f9f9 0%, #f5f5f5 100%);
|
161
|
+
background-repeat: repeat-x;
|
162
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff9f9f9', endColorstr='#fff5f5f5', GradientType=0);
|
163
|
+
-webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
|
164
|
+
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
|
165
|
+
-webkit-box-sizing: border-box;
|
166
|
+
-moz-box-sizing: border-box;
|
167
|
+
box-sizing: border-box;
|
168
|
+
border-radius: 4px;
|
169
|
+
}
|
170
|
+
.slider-selection.tick-slider-selection {
|
171
|
+
background-image: -webkit-linear-gradient(top, #89cdef 0%, #81bfde 100%);
|
172
|
+
background-image: -o-linear-gradient(top, #89cdef 0%, #81bfde 100%);
|
173
|
+
background-image: linear-gradient(to bottom, #89cdef 0%, #81bfde 100%);
|
174
|
+
background-repeat: repeat-x;
|
175
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff89cdef', endColorstr='#ff81bfde', GradientType=0);
|
176
|
+
}
|
177
|
+
.slider-track-low,
|
178
|
+
.slider-track-high {
|
179
|
+
position: absolute;
|
180
|
+
background: transparent;
|
181
|
+
-webkit-box-sizing: border-box;
|
182
|
+
-moz-box-sizing: border-box;
|
183
|
+
box-sizing: border-box;
|
184
|
+
border-radius: 4px;
|
185
|
+
}
|
186
|
+
.slider-handle {
|
187
|
+
position: absolute;
|
188
|
+
width: 20px;
|
189
|
+
height: 20px;
|
190
|
+
background-color: #337ab7;
|
191
|
+
background-image: -webkit-linear-gradient(top, #149bdf 0%, #0480be 100%);
|
192
|
+
background-image: -o-linear-gradient(top, #149bdf 0%, #0480be 100%);
|
193
|
+
background-image: linear-gradient(to bottom, #149bdf 0%, #0480be 100%);
|
194
|
+
background-repeat: repeat-x;
|
195
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);
|
196
|
+
filter: none;
|
197
|
+
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
|
198
|
+
box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
|
199
|
+
border: 0px solid transparent;
|
200
|
+
}
|
201
|
+
.slider-handle.round {
|
202
|
+
border-radius: 50%;
|
203
|
+
}
|
204
|
+
.slider-handle.triangle {
|
205
|
+
background: transparent none;
|
206
|
+
}
|
207
|
+
.slider-handle.custom {
|
208
|
+
background: transparent none;
|
209
|
+
}
|
210
|
+
.slider-handle.custom::before {
|
211
|
+
line-height: 20px;
|
212
|
+
font-size: 20px;
|
213
|
+
content: '\2605';
|
214
|
+
color: #726204;
|
215
|
+
}
|
216
|
+
.slider-tick {
|
217
|
+
position: absolute;
|
218
|
+
width: 20px;
|
219
|
+
height: 20px;
|
220
|
+
background-image: -webkit-linear-gradient(top, #f9f9f9 0%, #f5f5f5 100%);
|
221
|
+
background-image: -o-linear-gradient(top, #f9f9f9 0%, #f5f5f5 100%);
|
222
|
+
background-image: linear-gradient(to bottom, #f9f9f9 0%, #f5f5f5 100%);
|
223
|
+
background-repeat: repeat-x;
|
224
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff9f9f9', endColorstr='#fff5f5f5', GradientType=0);
|
225
|
+
-webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
|
226
|
+
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
|
227
|
+
-webkit-box-sizing: border-box;
|
228
|
+
-moz-box-sizing: border-box;
|
229
|
+
box-sizing: border-box;
|
230
|
+
filter: none;
|
231
|
+
opacity: 0.8;
|
232
|
+
border: 0px solid transparent;
|
233
|
+
}
|
234
|
+
.slider-tick.round {
|
235
|
+
border-radius: 50%;
|
236
|
+
}
|
237
|
+
.slider-tick.triangle {
|
238
|
+
background: transparent none;
|
239
|
+
}
|
240
|
+
.slider-tick.custom {
|
241
|
+
background: transparent none;
|
242
|
+
}
|
243
|
+
.slider-tick.custom::before {
|
244
|
+
line-height: 20px;
|
245
|
+
font-size: 20px;
|
246
|
+
content: '\2605';
|
247
|
+
color: #726204;
|
248
|
+
}
|
249
|
+
.slider-tick.in-selection {
|
250
|
+
background-image: -webkit-linear-gradient(top, #89cdef 0%, #81bfde 100%);
|
251
|
+
background-image: -o-linear-gradient(top, #89cdef 0%, #81bfde 100%);
|
252
|
+
background-image: linear-gradient(to bottom, #89cdef 0%, #81bfde 100%);
|
253
|
+
background-repeat: repeat-x;
|
254
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff89cdef', endColorstr='#ff81bfde', GradientType=0);
|
255
|
+
opacity: 1;
|
256
|
+
}
|
@@ -76,16 +76,18 @@ module C80Estate
|
|
76
76
|
sum
|
77
77
|
end
|
78
78
|
|
79
|
-
def self.
|
79
|
+
def self.where_price_range(range)
|
80
80
|
self.joins(:item_props)
|
81
81
|
.where(c80_estate_item_props: {prop_name_id: 1})
|
82
|
-
.where(c80_estate_item_props
|
82
|
+
.where('c80_estate_item_props.value > ?', range.split(',')[0].to_i-1)
|
83
|
+
.where('c80_estate_item_props.value < ?', range.split(',')[1].to_i+1)
|
83
84
|
end
|
84
85
|
|
85
|
-
def self.
|
86
|
+
def self.where_square_range(range)
|
86
87
|
C80Estate::Area.joins(:item_props)
|
87
88
|
.where(c80_estate_item_props: {prop_name_id: 9})
|
88
|
-
.where(c80_estate_item_props
|
89
|
+
.where('c80_estate_item_props.value > ?', range.split(',')[0].to_i-1)
|
90
|
+
.where('c80_estate_item_props.value < ?', range.split(',')[1].to_i+1)
|
89
91
|
end
|
90
92
|
|
91
93
|
def self.where_oenter(v)
|
@@ -156,16 +158,16 @@ module C80Estate
|
|
156
158
|
end
|
157
159
|
|
158
160
|
ransacker :item_prop_price_val,
|
159
|
-
formatter: proc { |
|
160
|
-
results = C80Estate::Area.
|
161
|
+
formatter: proc { |price_range| # 10,156
|
162
|
+
results = C80Estate::Area.where_price_range(price_range).map(&:id)
|
161
163
|
results = results.present? ? results : nil
|
162
164
|
}, splat_params: true do |parent|
|
163
165
|
parent.table[:id]
|
164
166
|
end
|
165
167
|
|
166
168
|
ransacker :item_prop_square_val,
|
167
|
-
formatter: proc { |
|
168
|
-
results = C80Estate::Area.
|
169
|
+
formatter: proc { |square_range|
|
170
|
+
results = C80Estate::Area.where_square_range(square_range).map(&:id)
|
169
171
|
results = results.present? ? results : nil
|
170
172
|
}, splat_params: true do |parent|
|
171
173
|
parent.table[:id]
|
data/lib/c80_estate/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: c80_estate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- C80609A
|
@@ -82,6 +82,7 @@ files:
|
|
82
82
|
- app/assets/javascript/c80_estate/backend/init.js
|
83
83
|
- app/assets/javascript/c80_estate/backend/init_selectpicker.js
|
84
84
|
- app/assets/javascript/c80_estate/lib/Chart.bundle.js
|
85
|
+
- app/assets/javascript/c80_estate/lib/bootstrap-slider.min.js
|
85
86
|
- app/assets/javascript/c80_estate/lib/google_charts_loader.js
|
86
87
|
- app/assets/javascript/c80_estate/lib/jalert.js
|
87
88
|
- app/assets/javascript/c80_estate/lib/jquery.canvasjs.min.js
|
@@ -95,6 +96,7 @@ files:
|
|
95
96
|
- app/assets/stylesheets/c80_estate/backend/dashboard/atype_in_list.scss
|
96
97
|
- app/assets/stylesheets/c80_estate/backend/dashboard/common.scss
|
97
98
|
- app/assets/stylesheets/c80_estate/backend/dashboard/prop_in_list.scss
|
99
|
+
- app/assets/stylesheets/c80_estate/lib/bootstrap-slider.scss
|
98
100
|
- app/assets/stylesheets/c80_estate/lib/mixins.scss
|
99
101
|
- app/assets/stylesheets/c80_estate_active_admin.scss
|
100
102
|
- app/controllers/c80_estate/ajax_controller.rb
|