├── LICENSE ├── README.md ├── apexplugin.json ├── preview01.png ├── server ├── css │ ├── advanced.slider.1.0.0.css │ ├── jquery-ui-1.10.4.slider.min.css │ └── jquery-ui-slider-pips.css └── js │ ├── advanced.slider.1.0.0.js │ ├── advanced.slider.1.0.0.min.js │ ├── jquery-ui-1.10.4.slider.min.js │ ├── jquery-ui-1.12.1.slider.js │ ├── jquery-ui-1.12.1.slider.min.js │ ├── jquery-ui-slider-pips.js │ └── jquery-ui-slider-pips.min.js └── source ├── item_type_plugin_hr_bilog_mgoricki_advanced_slider.sql ├── pck_advanced_plugin.pkb └── pck_advanced_plugin.pks /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Marko Gorički 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Oracle APEX Advanced Slider Plugin 2 | 3 | APEX (5.1+) Plugin build by using [jQuery UI Slider Pips](https://github.com/simeydotme/jQuery-ui-Slider-Pips) and [jQuery UI Slider Widget](http://api.jqueryui.com/slider/) that creates advanced slider APEX item. 4 | 5 | ## Changelog 6 | 7 | 1.0.3 20180911 New version of jQuery UI 1.12.1 - fixes modal dialog close icon 8 | 9 | 1.0.2 20170911 Changed default value for component settings (static file path) 10 | 11 | 1.0.1 20170911 Added On Change Event 12 | 13 | 1.0.0 20170315 Initial Release 14 | 15 | ## Install 16 | - Import plugin file *item_type_plugin_hr_bilog_mgoricki_advanced_slider.sql* from *source* directory 17 | - (Optional) To optimize performance upload static files (CSS and JS) from *server* directory to Webserver and change File Prefix to point on server directory 18 | - (Optional) Compile package pck_advanced_plugin (from *source*) in DB schema (available to APEX parsing schema) and change parameter Render Procedure/Function Name 19 | to pck_advanced_plugin.p_render_item 20 | 21 | ## Settings 22 | - **Range** - choose between range and simple slider. If it's range slider, value is saved concatenated with colon, for example 10:15 where 10 is min value, and 15 is max value. 23 | - **Background color** - (optional) if Range = Yes you can define hex background color, like #D8FFC4 24 | - **Min. value** - minimal value 25 | - **Max. value** - maximal value 26 | - **Steps** - slider steps (default 1) 27 | - **Show Pips** - show pips below slider 28 | - **Pip Steps** - (if Show Pips = Yes) - pip steps (default 1) 29 | - **Pip Prefix** - (if Show Pips = Yes) - pip prefix 30 | - **Pip Sufix** - (if Show Pips = Yes) - pip sufix 31 | - **Show Tooltip** - show tooltip (Yes) or labels inside slider (No) 32 | 33 | ## Component Settings 34 | - **CSS Path** - path to CSS files. Complete path is concatenation of Plugin File Prefix itema and this property. 35 | - **JS Path** - path to JS files. Complete path is concatenation of Plugin File Prefix itema and this property. 36 | 37 | ## Demo 38 | - You can find demo on [apex.oracle.com](http://apex.oracle.com/pls/apex/f?p=apexbyg:advancedslider) 39 | -------------------------------------------------------------------------------- /apexplugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "Advanced Slider", 3 | "version" : "1.0.3", 4 | "description" : "APEX Plugin build by using jQuery UI Slider Pips and jQuery UI Slider Widget that creates advanced slider APEX item.", 5 | "keywords" : ["slider", "item plugin"], 6 | "homepage" : "https://github.com/mgoricki/apex-plugin-advanced-slider", 7 | "bugs" : { 8 | "url" : "https://github.com/mgoricki/apex-plugin-advanced-slider/issues", 9 | "email" : "mgoricki8@gmail.com" 10 | }, 11 | "license" : "MIT", 12 | "author" : { 13 | "name" : "Marko Goricki", 14 | "email" : "mgoricki8@gmail.com", 15 | "url" : "http://apexbyg.blogspot.com", 16 | "twitter" : "mgoricki", 17 | "donationUrl" : "https://www.paypal.me/mgoricki" 18 | }, 19 | "repository" : { 20 | "type" : "git", 21 | "url" : "https://github.com/mgoricki/apex-plugin-advanced-slider" 22 | }, 23 | "oracle" : { 24 | "versions" : ["11.2.0.1", "12.1.0.1"], 25 | "apex" : { 26 | "versions" : ["5.1.0.00.45", "18.1.0.00.45"], 27 | "plugin" : { 28 | "internalName" : "HR.BILOG.MGORICKI.ADVANCED_SLIDER", 29 | "type" : "item", 30 | "demo" : "https://apex.oracle.com/pls/apex/f?p=apexbyg:advancedslider", 31 | "previewImage" : "https://raw.githubusercontent.com/mgoricki/apex-plugin-advanced-slider/master/preview01.png" 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /preview01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgoricki/apex-plugin-advanced-slider/0ca528398c94c69301f82ec8d31a83dbb86f6b96/preview01.png -------------------------------------------------------------------------------- /server/css/advanced.slider.1.0.0.css: -------------------------------------------------------------------------------- 1 | /* slider */ 2 | .t-Region-body>.container{overflow:visible} /* because of slider width 100%*/ 3 | .t-Form-inputContainer{overflow:visible} /* because of slider width 100%*/ 4 | .slider_container{width:100%} 5 | .slider_container > div{margin:8px 0} 6 | .slider_container .ui-slider-handle{ 7 | background-color: #3C629B !important; 8 | width:auto !important; 9 | min-width:1.6em !important; 10 | padding:0 2px; 11 | height:1.6em !important; 12 | top:-0.5em !important; 13 | color: #fff !important; 14 | text-align: center; 15 | } 16 | .slider_container .ui-slider{ 17 | position:relative; 18 | top:7px; 19 | border-color: #ccc; 20 | } -------------------------------------------------------------------------------- /server/css/jquery-ui-1.10.4.slider.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.10.4 - 2017-03-06 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.accordion.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.theme.css 4 | * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Arial%2CHelvetica%2Csans-serif&fsDefault=1em&fwDefault=normal&cornerRadius=3px&bgColorHeader=e9e9e9&bgTextureHeader=flat&borderColorHeader=dddddd&fcHeader=333333&iconColorHeader=444444&bgColorContent=ffffff&bgTextureContent=flat&borderColorContent=dddddd&fcContent=333333&iconColorContent=444444&bgColorDefault=f6f6f6&bgTextureDefault=flat&borderColorDefault=c5c5c5&fcDefault=454545&iconColorDefault=777777&bgColorHover=ededed&bgTextureHover=flat&borderColorHover=cccccc&fcHover=2b2b2b&iconColorHover=555555&bgColorActive=007fff&bgTextureActive=flat&borderColorActive=003eff&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=fffa90&bgTextureHighlight=flat&borderColorHighlight=dad55e&fcHighlight=777620&iconColorHighlight=777620&bgColorError=fddfdf&bgTextureError=flat&borderColorError=f1a899&fcError=5f3f3f&iconColorError=cc0000&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=666666&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=5px&offsetTopShadow=0px&offsetLeftShadow=0px&cornerRadiusShadow=8px 5 | * Copyright jQuery Foundation and other contributors; Licensed MIT */ 6 | 7 | .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;min-height:0}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("images/animated-overlay.gif");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-widget{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Arial,Helvetica,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#fff;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #ddd;background:#e9e9e9;color:#333;font-weight:bold}.ui-widget-header a{color:#333}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #c5c5c5;background:#f6f6f6;font-weight:normal;color:#454545}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#454545;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #ccc;background:#ededed;font-weight:normal;color:#2b2b2b}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#2b2b2b;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #003eff;background:#007fff;font-weight:normal;color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #dad55e;background:#fffa90;color:#777620}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#777620}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #f1a899;background:#fddfdf;color:#5f3f3f}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#5f3f3f}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#5f3f3f}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_777777_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_555555_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_777620_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cc0000_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:3px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:3px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:3px}.ui-widget-overlay{background:#aaa;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:0 0 0 0;padding:5px;background:#666;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px} -------------------------------------------------------------------------------- /server/css/jquery-ui-slider-pips.css: -------------------------------------------------------------------------------- 1 | /*! jQuery-ui-Slider-Pips - v1.11.4 - 2016-09-04 2 | * Copyright (c) 2016 Simon Goellner ; Licensed MIT */ 3 | 4 | /* HORIZONTAL */ 5 | /* increase bottom margin to fit the pips */ 6 | .ui-slider-horizontal.ui-slider-pips { 7 | margin-bottom: 1.4em; 8 | } 9 | 10 | /* default hide the labels and pips that arnt visible */ 11 | /* we just use css to hide incase we want to show certain */ 12 | /* labels/pips individually later */ 13 | .ui-slider-pips .ui-slider-label, 14 | .ui-slider-pips .ui-slider-pip-hide { 15 | display: none; 16 | } 17 | 18 | /* now we show any labels that we've set to show in the options */ 19 | .ui-slider-pips .ui-slider-pip-label .ui-slider-label { 20 | display: block; 21 | } 22 | 23 | /* PIP/LABEL WRAPPER */ 24 | /* position each pip absolutely just below the default slider */ 25 | /* and also prevent accidental selection */ 26 | .ui-slider-pips .ui-slider-pip { 27 | width: 2em; 28 | height: 1em; 29 | line-height: 1em; 30 | position: absolute; 31 | font-size: 0.8em; 32 | color: #999; 33 | overflow: visible; 34 | text-align: center; 35 | top: 20px; 36 | left: 20px; 37 | margin-left: -1em; 38 | cursor: pointer; 39 | -webkit-touch-callout: none; 40 | -webkit-user-select: none; 41 | -moz-user-select: none; 42 | -ms-user-select: none; 43 | user-select: none; 44 | } 45 | 46 | .ui-state-disabled.ui-slider-pips .ui-slider-pip { 47 | cursor: default; 48 | } 49 | 50 | /* little pip/line position & size */ 51 | .ui-slider-pips .ui-slider-line { 52 | background: #999; 53 | width: 1px; 54 | height: 3px; 55 | position: absolute; 56 | left: 50%; 57 | } 58 | 59 | /* the text label postion & size */ 60 | /* it overflows so no need for width to be accurate */ 61 | .ui-slider-pips .ui-slider-label { 62 | position: absolute; 63 | top: 5px; 64 | left: 50%; 65 | margin-left: -1em; 66 | width: 2em; 67 | } 68 | 69 | /* make it easy to see when we hover a label */ 70 | .ui-slider-pips:not(.ui-slider-disabled) .ui-slider-pip:hover .ui-slider-label { 71 | color: black; 72 | font-weight: bold; 73 | } 74 | 75 | /* VERTICAL */ 76 | /* vertical slider needs right-margin, not bottom */ 77 | .ui-slider-vertical.ui-slider-pips { 78 | margin-bottom: 1em; 79 | margin-right: 2em; 80 | } 81 | 82 | /* align vertical pips left and to right of the slider */ 83 | .ui-slider-vertical.ui-slider-pips .ui-slider-pip { 84 | text-align: left; 85 | top: auto; 86 | left: 20px; 87 | margin-left: 0; 88 | margin-bottom: -0.5em; 89 | } 90 | 91 | /* vertical line/pip should be horizontal instead */ 92 | .ui-slider-vertical.ui-slider-pips .ui-slider-line { 93 | width: 3px; 94 | height: 1px; 95 | position: absolute; 96 | top: 50%; 97 | left: 0; 98 | } 99 | 100 | .ui-slider-vertical.ui-slider-pips .ui-slider-label { 101 | top: 50%; 102 | left: 0.5em; 103 | margin-left: 0; 104 | margin-top: -0.5em; 105 | width: 2em; 106 | } 107 | 108 | /* FLOATING HORIZTONAL TOOLTIPS */ 109 | /* remove the godawful looking focus outline on handle and float */ 110 | .ui-slider-float .ui-slider-handle:focus, 111 | .ui-slider-float .ui-slider-handle.ui-state-focus .ui-slider-tip-label, 112 | .ui-slider-float .ui-slider-handle:focus .ui-slider-tip, 113 | .ui-slider-float .ui-slider-handle.ui-state-focus .ui-slider-tip-label, 114 | .ui-slider-float .ui-slider-handle:focus .ui-slider-tip-label 115 | .ui-slider-float .ui-slider-handle.ui-state-focus .ui-slider-tip-label { 116 | outline: none; 117 | } 118 | 119 | /* style tooltips on handles and on labels */ 120 | /* also has a nice transition */ 121 | .ui-slider-float .ui-slider-tip, 122 | .ui-slider-float .ui-slider-tip-label { 123 | position: absolute; 124 | visibility: hidden; 125 | top: -40px; 126 | display: block; 127 | width: 34px; 128 | margin-left: -18px; 129 | left: 50%; 130 | height: 20px; 131 | line-height: 20px; 132 | background: white; 133 | border-radius: 3px; 134 | border: 1px solid #888; 135 | text-align: center; 136 | font-size: 12px; 137 | opacity: 0; 138 | color: #333; 139 | -webkit-transition-property: opacity, top, visibility; 140 | transition-property: opacity, top, visibility; 141 | -webkit-transition-timing-function: ease-in; 142 | transition-timing-function: ease-in; 143 | -webkit-transition-duration: 200ms, 200ms, 0ms; 144 | transition-duration: 200ms, 200ms, 0ms; 145 | -webkit-transition-delay: 0ms, 0ms, 200ms; 146 | transition-delay: 0ms, 0ms, 200ms; 147 | } 148 | 149 | /* show the tooltip on hover or focus */ 150 | /* also switch transition delay around */ 151 | .ui-slider-float .ui-slider-handle:hover .ui-slider-tip, 152 | .ui-slider-float .ui-slider-handle.ui-state-hover .ui-slider-tip, 153 | .ui-slider-float .ui-slider-handle:focus .ui-slider-tip, 154 | .ui-slider-float .ui-slider-handle.ui-state-focus .ui-slider-tip, 155 | .ui-slider-float .ui-slider-handle.ui-state-active .ui-slider-tip, 156 | .ui-slider-float .ui-slider-pip:hover .ui-slider-tip-label { 157 | opacity: 1; 158 | top: -30px; 159 | visibility: visible; 160 | -webkit-transition-timing-function: ease-out; 161 | transition-timing-function: ease-out; 162 | -webkit-transition-delay: 200ms, 200ms, 0ms; 163 | transition-delay: 200ms, 200ms, 0ms; 164 | } 165 | 166 | /* put label tooltips below slider */ 167 | .ui-slider-float .ui-slider-pip .ui-slider-tip-label { 168 | top: 42px; 169 | } 170 | 171 | .ui-slider-float .ui-slider-pip:hover .ui-slider-tip-label { 172 | top: 32px; 173 | font-weight: normal; 174 | } 175 | 176 | /* give the tooltip a css triangle arrow */ 177 | .ui-slider-float .ui-slider-tip:after, 178 | .ui-slider-float .ui-slider-pip .ui-slider-tip-label:after { 179 | content: " "; 180 | width: 0; 181 | height: 0; 182 | border: 5px solid rgba(255, 255, 255, 0); 183 | border-top-color: white; 184 | position: absolute; 185 | bottom: -10px; 186 | left: 50%; 187 | margin-left: -5px; 188 | } 189 | 190 | /* put a 1px border on the tooltip arrow to match tooltip border */ 191 | .ui-slider-float .ui-slider-tip:before, 192 | .ui-slider-float .ui-slider-pip .ui-slider-tip-label:before { 193 | content: " "; 194 | width: 0; 195 | height: 0; 196 | border: 5px solid rgba(255, 255, 255, 0); 197 | border-top-color: #888; 198 | position: absolute; 199 | bottom: -11px; 200 | left: 50%; 201 | margin-left: -5px; 202 | } 203 | 204 | /* switch the arrow to top on labels */ 205 | .ui-slider-float .ui-slider-pip .ui-slider-tip-label:after { 206 | border: 5px solid rgba(255, 255, 255, 0); 207 | border-bottom-color: white; 208 | top: -10px; 209 | } 210 | 211 | .ui-slider-float .ui-slider-pip .ui-slider-tip-label:before { 212 | border: 5px solid rgba(255, 255, 255, 0); 213 | border-bottom-color: #888; 214 | top: -11px; 215 | } 216 | 217 | /* FLOATING VERTICAL TOOLTIPS */ 218 | /* tooltip floats to left of handle */ 219 | .ui-slider-vertical.ui-slider-float .ui-slider-tip, 220 | .ui-slider-vertical.ui-slider-float .ui-slider-tip-label { 221 | top: 50%; 222 | margin-top: -11px; 223 | width: 34px; 224 | margin-left: 0px; 225 | left: -60px; 226 | color: #333; 227 | -webkit-transition-duration: 200ms, 200ms, 0; 228 | transition-duration: 200ms, 200ms, 0; 229 | -webkit-transition-property: opacity, left, visibility; 230 | transition-property: opacity, left, visibility; 231 | -webkit-transition-delay: 0, 0, 200ms; 232 | transition-delay: 0, 0, 200ms; 233 | } 234 | 235 | .ui-slider-vertical.ui-slider-float .ui-slider-handle:hover .ui-slider-tip, 236 | .ui-slider-vertical.ui-slider-float .ui-slider-handle.ui-state-hover .ui-slider-tip, 237 | .ui-slider-vertical.ui-slider-float .ui-slider-handle:focus .ui-slider-tip, 238 | .ui-slider-vertical.ui-slider-float .ui-slider-handle.ui-state-focus .ui-slider-tip, 239 | .ui-slider-vertical.ui-slider-float .ui-slider-handle.ui-state-active .ui-slider-tip, 240 | .ui-slider-vertical.ui-slider-float .ui-slider-pip:hover .ui-slider-tip-label { 241 | top: 50%; 242 | margin-top: -11px; 243 | left: -50px; 244 | } 245 | 246 | /* put label tooltips to right of slider */ 247 | .ui-slider-vertical.ui-slider-float .ui-slider-pip .ui-slider-tip-label { 248 | left: 47px; 249 | } 250 | 251 | .ui-slider-vertical.ui-slider-float .ui-slider-pip:hover .ui-slider-tip-label { 252 | left: 37px; 253 | } 254 | 255 | /* give the tooltip a css triangle arrow */ 256 | .ui-slider-vertical.ui-slider-float .ui-slider-tip:after, 257 | .ui-slider-vertical.ui-slider-float .ui-slider-pip .ui-slider-tip-label:after { 258 | border: 5px solid rgba(255, 255, 255, 0); 259 | border-left-color: white; 260 | border-top-color: transparent; 261 | position: absolute; 262 | bottom: 50%; 263 | margin-bottom: -5px; 264 | right: -10px; 265 | margin-left: 0; 266 | top: auto; 267 | left: auto; 268 | } 269 | 270 | .ui-slider-vertical.ui-slider-float .ui-slider-tip:before, 271 | .ui-slider-vertical.ui-slider-float .ui-slider-pip .ui-slider-tip-label:before { 272 | border: 5px solid rgba(255, 255, 255, 0); 273 | border-left-color: #888; 274 | border-top-color: transparent; 275 | position: absolute; 276 | bottom: 50%; 277 | margin-bottom: -5px; 278 | right: -11px; 279 | margin-left: 0; 280 | top: auto; 281 | left: auto; 282 | } 283 | 284 | .ui-slider-vertical.ui-slider-float .ui-slider-pip .ui-slider-tip-label:after { 285 | border: 5px solid rgba(255, 255, 255, 0); 286 | border-right-color: white; 287 | right: auto; 288 | left: -10px; 289 | } 290 | 291 | .ui-slider-vertical.ui-slider-float .ui-slider-pip .ui-slider-tip-label:before { 292 | border: 5px solid rgba(255, 255, 255, 0); 293 | border-right-color: #888; 294 | right: auto; 295 | left: -11px; 296 | } 297 | 298 | /* SELECTED STATES */ 299 | /* Comment out this chuck of code if you don't want to have 300 | the new label colours shown */ 301 | .ui-slider-pips [class*=ui-slider-pip-initial] { 302 | font-weight: bold; 303 | color: #14CA82; 304 | } 305 | 306 | .ui-slider-pips .ui-slider-pip-initial-2 { 307 | color: #1897C9; 308 | } 309 | 310 | .ui-slider-pips [class*=ui-slider-pip-selected] { 311 | font-weight: bold; 312 | color: #FF7A00; 313 | } 314 | 315 | .ui-slider-pips .ui-slider-pip-inrange { 316 | color: black; 317 | } 318 | 319 | .ui-slider-pips .ui-slider-pip-selected-2 { 320 | color: #E70081; 321 | } 322 | 323 | .ui-slider-pips [class*=ui-slider-pip-selected] .ui-slider-line, 324 | .ui-slider-pips .ui-slider-pip-inrange .ui-slider-line { 325 | background: black; 326 | } 327 | -------------------------------------------------------------------------------- /server/js/advanced.slider.1.0.0.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Plugin: Advanced Slider 3 | * Version: 1.0.0 (07.03.2017.) 4 | * 5 | * Author: Marko Goricki, BiLog 6 | * Mail: mgoricki@gmail.com 7 | * Twitter: @mgoricki 8 | * Blog: apexbyg.blogspot.com 9 | * 10 | * Depends: 11 | * apex/debug.js 12 | * apex/item.js 13 | * 14 | * Changes: 15 | * 16 | * v.1.0.0 - 20170307 - Initial Version 17 | * v.1.0.1 - 20170911 - Added on triggering on change DA event 18 | */ 19 | (function (debug, item, $){ 20 | "use strict"; 21 | 22 | $.widget( "apex.advancedslider", { 23 | plugin: "APEX advanced slider...", 24 | version: "1.0", 25 | item$: null, 26 | slider$: null, 27 | options: { 28 | }, 29 | 30 | // create function 31 | _create: function(a){ 32 | var self = this; 33 | self.itemId = this.element.attr('id'); 34 | self.item$ = $('#'+self.itemId); 35 | self.slider$ = $('#'+self.itemId+'_slider'); 36 | self.itemVal = self.item$.val(); 37 | self.isRange = self.options.range=='Y' ? true:false; 38 | self.isDisabled = false; 39 | 40 | // init slider 41 | var vSlider = 42 | self.slider$ 43 | // main slider 44 | .slider({ 45 | range: self.isRange, 46 | min: parseInt(self.options.min), 47 | max: parseInt(self.options.max), 48 | step: parseInt(self.options.step), 49 | slide: function(e, ui){ 50 | debug.log(self.plugin, 'Slider Slide', e, ui); 51 | // show label 52 | if(self.options.showTooltips!='Y'){ 53 | $(ui.handle).html(ui.value); 54 | } 55 | }, 56 | change: function(e,ui){ 57 | debug.log(self.plugin, 'Slider Change', e, ui); 58 | // show label 59 | if(self.options.showTooltips!='Y'){ 60 | $(ui.handle).html(ui.value); 61 | } 62 | self.item$.trigger('change'); 63 | }, 64 | stop: function(e,ui){ 65 | debug.log(self.plugin, 'Slider Stop', e, ui); 66 | var vValue; 67 | if(self.isRange){ 68 | vValue = ui.values.join(':'); 69 | }else{ 70 | vValue = ui.value; 71 | } 72 | // set item value 73 | self._setValue(vValue); 74 | } 75 | }); 76 | 77 | // Pips 78 | if (self.options.showPips=='Y'){ 79 | vSlider.slider("pips", 80 | { 81 | first: "label", 82 | last: "label", 83 | rest: "label", 84 | step: parseInt(self.options.pipStep), 85 | prefix: self.options.pipPrefix, 86 | suffix: self.options.pipSufix 87 | } 88 | ); 89 | } 90 | 91 | // Tooltips 92 | if (self.options.showTooltips=='Y'){ 93 | vSlider.slider("float", 94 | { 95 | prefix: "" 96 | } 97 | ); 98 | } 99 | 100 | // Readonly 101 | if (self.options.readonly=='Y'){ 102 | self.slider$.slider('disable'); 103 | } 104 | 105 | // Set Slider Color 106 | if(self.isRange&&self.options.sliderColor){ 107 | self.slider$.find('.ui-slider-range').css('background-color',self.options.sliderColor); 108 | } 109 | 110 | // set slider value 111 | self._setSliderValue(); 112 | 113 | // APEX item 114 | apex.item.create(self.itemId, { 115 | setValue: function(pValue,a){ 116 | debug.log(self.plugin, 'Set Value'); 117 | if(!self.isDisabled){ 118 | self.itemVal = pValue; 119 | self.item$.val(pValue); 120 | self._setSliderValue(); 121 | }else{ 122 | debug.log(self.plugin, 'Slider disabled, cant change value'); 123 | } 124 | }, 125 | disable: function() { 126 | debug.log(self.plugin, 'Disable'); 127 | self.slider$.slider('disable'); 128 | self.isDisabled = true; 129 | }, 130 | enable: function() { 131 | debug.log(self.plugin, 'Enable'); 132 | self.slider$.slider('enable'); 133 | self.isDisabled = false; 134 | } 135 | }); 136 | }, 137 | 138 | // set item value 139 | _setValue: function(pValue){ 140 | debug.log('Set Slider Item Value'); 141 | var self = this; 142 | self.item$.val(pValue); 143 | }, 144 | 145 | // set slider value 146 | _setSliderValue: function(){ 147 | var self = this; 148 | debug.log('Set Slider Value = '+self.itemVal); 149 | // set default value or values 150 | var vOptVal = 'value'; 151 | 152 | /* 153 | if(!self.itemVal){ 154 | if (self.isRange){ 155 | self.itemVal = '0:0'; 156 | }else{ 157 | self.itemVal = '0'; 158 | } 159 | } 160 | */ 161 | 162 | if (self.isRange){ 163 | vOptVal = 'values'; 164 | self.itemVal = self.itemVal.split(':'); 165 | } 166 | if($.trim(self.itemVal).length>0){ 167 | self.slider$.slider( "option", vOptVal, self.itemVal); 168 | } 169 | } 170 | 171 | }); 172 | })(apex.debug, apex.item, apex.jQuery ); 173 | 174 | //# sourceMappingURL=advanced.slider.1.0.0.js.map 175 | -------------------------------------------------------------------------------- /server/js/advanced.slider.1.0.0.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Plugin: Advanced Slider 3 | * Version: 1.0.0 (07.03.2017.) 4 | * 5 | * Author: Marko Goricki, BiLog 6 | * Mail: mgoricki@gmail.com 7 | * Twitter: @mgoricki 8 | * Blog: apexbyg.blogspot.com 9 | * 10 | * Depends: 11 | * apex/debug.js 12 | * apex/item.js 13 | * 14 | * Changes: 15 | * 16 | * v.1.0.0 - 20170307 - Initial Version 17 | * v.1.0.1 - 20170911 - Added on triggering on change DA event 18 | */ 19 | !function(e,i,l){"use strict";l.widget("apex.advancedslider",{plugin:"APEX advanced slider...",version:"1.0",item$:null,slider$:null,options:{},_create:function(i){var s=this;s.itemId=this.element.attr("id"),s.item$=l("#"+s.itemId),s.slider$=l("#"+s.itemId+"_slider"),s.itemVal=s.item$.val(),s.isRange="Y"==s.options.range,s.isDisabled=!1;var t=s.slider$.slider({range:s.isRange,min:parseInt(s.options.min),max:parseInt(s.options.max),step:parseInt(s.options.step),slide:function(i,t){e.log(s.plugin,"Slider Slide",i,t),"Y"!=s.options.showTooltips&&l(t.handle).html(t.value)},change:function(i,t){e.log(s.plugin,"Slider Change",i,t),"Y"!=s.options.showTooltips&&l(t.handle).html(t.value),s.item$.trigger("change")},stop:function(i,l){e.log(s.plugin,"Slider Stop",i,l);var t;t=s.isRange?l.values.join(":"):l.value,s._setValue(t)}});"Y"==s.options.showPips&&t.slider("pips",{first:"label",last:"label",rest:"label",step:parseInt(s.options.pipStep),prefix:s.options.pipPrefix,suffix:s.options.pipSufix}),"Y"==s.options.showTooltips&&t.slider("float",{prefix:""}),"Y"==s.options.readonly&&s.slider$.slider("disable"),s.isRange&&s.options.sliderColor&&s.slider$.find(".ui-slider-range").css("background-color",s.options.sliderColor),s._setSliderValue(),apex.item.create(s.itemId,{setValue:function(i,l){e.log(s.plugin,"Set Value"),s.isDisabled?e.log(s.plugin,"Slider disabled, cant change value"):(s.itemVal=i,s.item$.val(i),s._setSliderValue())},disable:function(){e.log(s.plugin,"Disable"),s.slider$.slider("disable"),s.isDisabled=!0},enable:function(){e.log(s.plugin,"Enable"),s.slider$.slider("enable"),s.isDisabled=!1}})},_setValue:function(i){e.log("Set Slider Item Value"),this.item$.val(i)},_setSliderValue:function(){var i=this;e.log("Set Slider Value = "+i.itemVal);var s="value";i.isRange&&(s="values",i.itemVal=i.itemVal.split(":")),l.trim(i.itemVal).length>0&&i.slider$.slider("option",s,i.itemVal)}})}(apex.debug,apex.item,apex.jQuery); 20 | //# sourceMappingURL=advanced.slider.1.0.0.min.js.map 21 | -------------------------------------------------------------------------------- /server/js/jquery-ui-1.12.1.slider.js: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.12.1 - 2018-09-11 2 | * http://jqueryui.com 3 | * Includes: widget.js, keycode.js, widgets/mouse.js, widgets/slider.js 4 | * Copyright jQuery Foundation and other contributors; Licensed MIT */ 5 | 6 | (function( factory ) { 7 | if ( typeof define === "function" && define.amd ) { 8 | 9 | // AMD. Register as an anonymous module. 10 | define([ "jquery" ], factory ); 11 | } else { 12 | 13 | // Browser globals 14 | factory( jQuery ); 15 | } 16 | }(function( $ ) { 17 | 18 | $.ui = $.ui || {}; 19 | 20 | var version = $.ui.version = "1.12.1"; 21 | 22 | 23 | /*! 24 | * jQuery UI Widget 1.12.1 25 | * http://jqueryui.com 26 | * 27 | * Copyright jQuery Foundation and other contributors 28 | * Released under the MIT license. 29 | * http://jquery.org/license 30 | */ 31 | 32 | //>>label: Widget 33 | //>>group: Core 34 | //>>description: Provides a factory for creating stateful widgets with a common API. 35 | //>>docs: http://api.jqueryui.com/jQuery.widget/ 36 | //>>demos: http://jqueryui.com/widget/ 37 | 38 | 39 | 40 | var widgetUuid = 0; 41 | var widgetSlice = Array.prototype.slice; 42 | 43 | $.cleanData = ( function( orig ) { 44 | return function( elems ) { 45 | var events, elem, i; 46 | for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) { 47 | try { 48 | 49 | // Only trigger remove when necessary to save time 50 | events = $._data( elem, "events" ); 51 | if ( events && events.remove ) { 52 | $( elem ).triggerHandler( "remove" ); 53 | } 54 | 55 | // Http://bugs.jquery.com/ticket/8235 56 | } catch ( e ) {} 57 | } 58 | orig( elems ); 59 | }; 60 | } )( $.cleanData ); 61 | 62 | $.widget = function( name, base, prototype ) { 63 | var existingConstructor, constructor, basePrototype; 64 | 65 | // ProxiedPrototype allows the provided prototype to remain unmodified 66 | // so that it can be used as a mixin for multiple widgets (#8876) 67 | var proxiedPrototype = {}; 68 | 69 | var namespace = name.split( "." )[ 0 ]; 70 | name = name.split( "." )[ 1 ]; 71 | var fullName = namespace + "-" + name; 72 | 73 | if ( !prototype ) { 74 | prototype = base; 75 | base = $.Widget; 76 | } 77 | 78 | if ( $.isArray( prototype ) ) { 79 | prototype = $.extend.apply( null, [ {} ].concat( prototype ) ); 80 | } 81 | 82 | // Create selector for plugin 83 | $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { 84 | return !!$.data( elem, fullName ); 85 | }; 86 | 87 | $[ namespace ] = $[ namespace ] || {}; 88 | existingConstructor = $[ namespace ][ name ]; 89 | constructor = $[ namespace ][ name ] = function( options, element ) { 90 | 91 | // Allow instantiation without "new" keyword 92 | if ( !this._createWidget ) { 93 | return new constructor( options, element ); 94 | } 95 | 96 | // Allow instantiation without initializing for simple inheritance 97 | // must use "new" keyword (the code above always passes args) 98 | if ( arguments.length ) { 99 | this._createWidget( options, element ); 100 | } 101 | }; 102 | 103 | // Extend with the existing constructor to carry over any static properties 104 | $.extend( constructor, existingConstructor, { 105 | version: prototype.version, 106 | 107 | // Copy the object used to create the prototype in case we need to 108 | // redefine the widget later 109 | _proto: $.extend( {}, prototype ), 110 | 111 | // Track widgets that inherit from this widget in case this widget is 112 | // redefined after a widget inherits from it 113 | _childConstructors: [] 114 | } ); 115 | 116 | basePrototype = new base(); 117 | 118 | // We need to make the options hash a property directly on the new instance 119 | // otherwise we'll modify the options hash on the prototype that we're 120 | // inheriting from 121 | basePrototype.options = $.widget.extend( {}, basePrototype.options ); 122 | $.each( prototype, function( prop, value ) { 123 | if ( !$.isFunction( value ) ) { 124 | proxiedPrototype[ prop ] = value; 125 | return; 126 | } 127 | proxiedPrototype[ prop ] = ( function() { 128 | function _super() { 129 | return base.prototype[ prop ].apply( this, arguments ); 130 | } 131 | 132 | function _superApply( args ) { 133 | return base.prototype[ prop ].apply( this, args ); 134 | } 135 | 136 | return function() { 137 | var __super = this._super; 138 | var __superApply = this._superApply; 139 | var returnValue; 140 | 141 | this._super = _super; 142 | this._superApply = _superApply; 143 | 144 | returnValue = value.apply( this, arguments ); 145 | 146 | this._super = __super; 147 | this._superApply = __superApply; 148 | 149 | return returnValue; 150 | }; 151 | } )(); 152 | } ); 153 | constructor.prototype = $.widget.extend( basePrototype, { 154 | 155 | // TODO: remove support for widgetEventPrefix 156 | // always use the name + a colon as the prefix, e.g., draggable:start 157 | // don't prefix for widgets that aren't DOM-based 158 | widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name 159 | }, proxiedPrototype, { 160 | constructor: constructor, 161 | namespace: namespace, 162 | widgetName: name, 163 | widgetFullName: fullName 164 | } ); 165 | 166 | // If this widget is being redefined then we need to find all widgets that 167 | // are inheriting from it and redefine all of them so that they inherit from 168 | // the new version of this widget. We're essentially trying to replace one 169 | // level in the prototype chain. 170 | if ( existingConstructor ) { 171 | $.each( existingConstructor._childConstructors, function( i, child ) { 172 | var childPrototype = child.prototype; 173 | 174 | // Redefine the child widget using the same prototype that was 175 | // originally used, but inherit from the new version of the base 176 | $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, 177 | child._proto ); 178 | } ); 179 | 180 | // Remove the list of existing child constructors from the old constructor 181 | // so the old child constructors can be garbage collected 182 | delete existingConstructor._childConstructors; 183 | } else { 184 | base._childConstructors.push( constructor ); 185 | } 186 | 187 | $.widget.bridge( name, constructor ); 188 | 189 | return constructor; 190 | }; 191 | 192 | $.widget.extend = function( target ) { 193 | var input = widgetSlice.call( arguments, 1 ); 194 | var inputIndex = 0; 195 | var inputLength = input.length; 196 | var key; 197 | var value; 198 | 199 | for ( ; inputIndex < inputLength; inputIndex++ ) { 200 | for ( key in input[ inputIndex ] ) { 201 | value = input[ inputIndex ][ key ]; 202 | if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { 203 | 204 | // Clone objects 205 | if ( $.isPlainObject( value ) ) { 206 | target[ key ] = $.isPlainObject( target[ key ] ) ? 207 | $.widget.extend( {}, target[ key ], value ) : 208 | 209 | // Don't extend strings, arrays, etc. with objects 210 | $.widget.extend( {}, value ); 211 | 212 | // Copy everything else by reference 213 | } else { 214 | target[ key ] = value; 215 | } 216 | } 217 | } 218 | } 219 | return target; 220 | }; 221 | 222 | $.widget.bridge = function( name, object ) { 223 | var fullName = object.prototype.widgetFullName || name; 224 | $.fn[ name ] = function( options ) { 225 | var isMethodCall = typeof options === "string"; 226 | var args = widgetSlice.call( arguments, 1 ); 227 | var returnValue = this; 228 | 229 | if ( isMethodCall ) { 230 | 231 | // If this is an empty collection, we need to have the instance method 232 | // return undefined instead of the jQuery instance 233 | if ( !this.length && options === "instance" ) { 234 | returnValue = undefined; 235 | } else { 236 | this.each( function() { 237 | var methodValue; 238 | var instance = $.data( this, fullName ); 239 | 240 | if ( options === "instance" ) { 241 | returnValue = instance; 242 | return false; 243 | } 244 | 245 | if ( !instance ) { 246 | return $.error( "cannot call methods on " + name + 247 | " prior to initialization; " + 248 | "attempted to call method '" + options + "'" ); 249 | } 250 | 251 | if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) { 252 | return $.error( "no such method '" + options + "' for " + name + 253 | " widget instance" ); 254 | } 255 | 256 | methodValue = instance[ options ].apply( instance, args ); 257 | 258 | if ( methodValue !== instance && methodValue !== undefined ) { 259 | returnValue = methodValue && methodValue.jquery ? 260 | returnValue.pushStack( methodValue.get() ) : 261 | methodValue; 262 | return false; 263 | } 264 | } ); 265 | } 266 | } else { 267 | 268 | // Allow multiple hashes to be passed on init 269 | if ( args.length ) { 270 | options = $.widget.extend.apply( null, [ options ].concat( args ) ); 271 | } 272 | 273 | this.each( function() { 274 | var instance = $.data( this, fullName ); 275 | if ( instance ) { 276 | instance.option( options || {} ); 277 | if ( instance._init ) { 278 | instance._init(); 279 | } 280 | } else { 281 | $.data( this, fullName, new object( options, this ) ); 282 | } 283 | } ); 284 | } 285 | 286 | return returnValue; 287 | }; 288 | }; 289 | 290 | $.Widget = function( /* options, element */ ) {}; 291 | $.Widget._childConstructors = []; 292 | 293 | $.Widget.prototype = { 294 | widgetName: "widget", 295 | widgetEventPrefix: "", 296 | defaultElement: "
", 297 | 298 | options: { 299 | classes: {}, 300 | disabled: false, 301 | 302 | // Callbacks 303 | create: null 304 | }, 305 | 306 | _createWidget: function( options, element ) { 307 | element = $( element || this.defaultElement || this )[ 0 ]; 308 | this.element = $( element ); 309 | this.uuid = widgetUuid++; 310 | this.eventNamespace = "." + this.widgetName + this.uuid; 311 | 312 | this.bindings = $(); 313 | this.hoverable = $(); 314 | this.focusable = $(); 315 | this.classesElementLookup = {}; 316 | 317 | if ( element !== this ) { 318 | $.data( element, this.widgetFullName, this ); 319 | this._on( true, this.element, { 320 | remove: function( event ) { 321 | if ( event.target === element ) { 322 | this.destroy(); 323 | } 324 | } 325 | } ); 326 | this.document = $( element.style ? 327 | 328 | // Element within the document 329 | element.ownerDocument : 330 | 331 | // Element is window or document 332 | element.document || element ); 333 | this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow ); 334 | } 335 | 336 | this.options = $.widget.extend( {}, 337 | this.options, 338 | this._getCreateOptions(), 339 | options ); 340 | 341 | this._create(); 342 | 343 | if ( this.options.disabled ) { 344 | this._setOptionDisabled( this.options.disabled ); 345 | } 346 | 347 | this._trigger( "create", null, this._getCreateEventData() ); 348 | this._init(); 349 | }, 350 | 351 | _getCreateOptions: function() { 352 | return {}; 353 | }, 354 | 355 | _getCreateEventData: $.noop, 356 | 357 | _create: $.noop, 358 | 359 | _init: $.noop, 360 | 361 | destroy: function() { 362 | var that = this; 363 | 364 | this._destroy(); 365 | $.each( this.classesElementLookup, function( key, value ) { 366 | that._removeClass( value, key ); 367 | } ); 368 | 369 | // We can probably remove the unbind calls in 2.0 370 | // all event bindings should go through this._on() 371 | this.element 372 | .off( this.eventNamespace ) 373 | .removeData( this.widgetFullName ); 374 | this.widget() 375 | .off( this.eventNamespace ) 376 | .removeAttr( "aria-disabled" ); 377 | 378 | // Clean up events and states 379 | this.bindings.off( this.eventNamespace ); 380 | }, 381 | 382 | _destroy: $.noop, 383 | 384 | widget: function() { 385 | return this.element; 386 | }, 387 | 388 | option: function( key, value ) { 389 | var options = key; 390 | var parts; 391 | var curOption; 392 | var i; 393 | 394 | if ( arguments.length === 0 ) { 395 | 396 | // Don't return a reference to the internal hash 397 | return $.widget.extend( {}, this.options ); 398 | } 399 | 400 | if ( typeof key === "string" ) { 401 | 402 | // Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } 403 | options = {}; 404 | parts = key.split( "." ); 405 | key = parts.shift(); 406 | if ( parts.length ) { 407 | curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); 408 | for ( i = 0; i < parts.length - 1; i++ ) { 409 | curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; 410 | curOption = curOption[ parts[ i ] ]; 411 | } 412 | key = parts.pop(); 413 | if ( arguments.length === 1 ) { 414 | return curOption[ key ] === undefined ? null : curOption[ key ]; 415 | } 416 | curOption[ key ] = value; 417 | } else { 418 | if ( arguments.length === 1 ) { 419 | return this.options[ key ] === undefined ? null : this.options[ key ]; 420 | } 421 | options[ key ] = value; 422 | } 423 | } 424 | 425 | this._setOptions( options ); 426 | 427 | return this; 428 | }, 429 | 430 | _setOptions: function( options ) { 431 | var key; 432 | 433 | for ( key in options ) { 434 | this._setOption( key, options[ key ] ); 435 | } 436 | 437 | return this; 438 | }, 439 | 440 | _setOption: function( key, value ) { 441 | if ( key === "classes" ) { 442 | this._setOptionClasses( value ); 443 | } 444 | 445 | this.options[ key ] = value; 446 | 447 | if ( key === "disabled" ) { 448 | this._setOptionDisabled( value ); 449 | } 450 | 451 | return this; 452 | }, 453 | 454 | _setOptionClasses: function( value ) { 455 | var classKey, elements, currentElements; 456 | 457 | for ( classKey in value ) { 458 | currentElements = this.classesElementLookup[ classKey ]; 459 | if ( value[ classKey ] === this.options.classes[ classKey ] || 460 | !currentElements || 461 | !currentElements.length ) { 462 | continue; 463 | } 464 | 465 | // We are doing this to create a new jQuery object because the _removeClass() call 466 | // on the next line is going to destroy the reference to the current elements being 467 | // tracked. We need to save a copy of this collection so that we can add the new classes 468 | // below. 469 | elements = $( currentElements.get() ); 470 | this._removeClass( currentElements, classKey ); 471 | 472 | // We don't use _addClass() here, because that uses this.options.classes 473 | // for generating the string of classes. We want to use the value passed in from 474 | // _setOption(), this is the new value of the classes option which was passed to 475 | // _setOption(). We pass this value directly to _classes(). 476 | elements.addClass( this._classes( { 477 | element: elements, 478 | keys: classKey, 479 | classes: value, 480 | add: true 481 | } ) ); 482 | } 483 | }, 484 | 485 | _setOptionDisabled: function( value ) { 486 | this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value ); 487 | 488 | // If the widget is becoming disabled, then nothing is interactive 489 | if ( value ) { 490 | this._removeClass( this.hoverable, null, "ui-state-hover" ); 491 | this._removeClass( this.focusable, null, "ui-state-focus" ); 492 | } 493 | }, 494 | 495 | enable: function() { 496 | return this._setOptions( { disabled: false } ); 497 | }, 498 | 499 | disable: function() { 500 | return this._setOptions( { disabled: true } ); 501 | }, 502 | 503 | _classes: function( options ) { 504 | var full = []; 505 | var that = this; 506 | 507 | options = $.extend( { 508 | element: this.element, 509 | classes: this.options.classes || {} 510 | }, options ); 511 | 512 | function processClassString( classes, checkOption ) { 513 | var current, i; 514 | for ( i = 0; i < classes.length; i++ ) { 515 | current = that.classesElementLookup[ classes[ i ] ] || $(); 516 | if ( options.add ) { 517 | current = $( $.unique( current.get().concat( options.element.get() ) ) ); 518 | } else { 519 | current = $( current.not( options.element ).get() ); 520 | } 521 | that.classesElementLookup[ classes[ i ] ] = current; 522 | full.push( classes[ i ] ); 523 | if ( checkOption && options.classes[ classes[ i ] ] ) { 524 | full.push( options.classes[ classes[ i ] ] ); 525 | } 526 | } 527 | } 528 | 529 | this._on( options.element, { 530 | "remove": "_untrackClassesElement" 531 | } ); 532 | 533 | if ( options.keys ) { 534 | processClassString( options.keys.match( /\S+/g ) || [], true ); 535 | } 536 | if ( options.extra ) { 537 | processClassString( options.extra.match( /\S+/g ) || [] ); 538 | } 539 | 540 | return full.join( " " ); 541 | }, 542 | 543 | _untrackClassesElement: function( event ) { 544 | var that = this; 545 | $.each( that.classesElementLookup, function( key, value ) { 546 | if ( $.inArray( event.target, value ) !== -1 ) { 547 | that.classesElementLookup[ key ] = $( value.not( event.target ).get() ); 548 | } 549 | } ); 550 | }, 551 | 552 | _removeClass: function( element, keys, extra ) { 553 | return this._toggleClass( element, keys, extra, false ); 554 | }, 555 | 556 | _addClass: function( element, keys, extra ) { 557 | return this._toggleClass( element, keys, extra, true ); 558 | }, 559 | 560 | _toggleClass: function( element, keys, extra, add ) { 561 | add = ( typeof add === "boolean" ) ? add : extra; 562 | var shift = ( typeof element === "string" || element === null ), 563 | options = { 564 | extra: shift ? keys : extra, 565 | keys: shift ? element : keys, 566 | element: shift ? this.element : element, 567 | add: add 568 | }; 569 | options.element.toggleClass( this._classes( options ), add ); 570 | return this; 571 | }, 572 | 573 | _on: function( suppressDisabledCheck, element, handlers ) { 574 | var delegateElement; 575 | var instance = this; 576 | 577 | // No suppressDisabledCheck flag, shuffle arguments 578 | if ( typeof suppressDisabledCheck !== "boolean" ) { 579 | handlers = element; 580 | element = suppressDisabledCheck; 581 | suppressDisabledCheck = false; 582 | } 583 | 584 | // No element argument, shuffle and use this.element 585 | if ( !handlers ) { 586 | handlers = element; 587 | element = this.element; 588 | delegateElement = this.widget(); 589 | } else { 590 | element = delegateElement = $( element ); 591 | this.bindings = this.bindings.add( element ); 592 | } 593 | 594 | $.each( handlers, function( event, handler ) { 595 | function handlerProxy() { 596 | 597 | // Allow widgets to customize the disabled handling 598 | // - disabled as an array instead of boolean 599 | // - disabled class as method for disabling individual parts 600 | if ( !suppressDisabledCheck && 601 | ( instance.options.disabled === true || 602 | $( this ).hasClass( "ui-state-disabled" ) ) ) { 603 | return; 604 | } 605 | return ( typeof handler === "string" ? instance[ handler ] : handler ) 606 | .apply( instance, arguments ); 607 | } 608 | 609 | // Copy the guid so direct unbinding works 610 | if ( typeof handler !== "string" ) { 611 | handlerProxy.guid = handler.guid = 612 | handler.guid || handlerProxy.guid || $.guid++; 613 | } 614 | 615 | var match = event.match( /^([\w:-]*)\s*(.*)$/ ); 616 | var eventName = match[ 1 ] + instance.eventNamespace; 617 | var selector = match[ 2 ]; 618 | 619 | if ( selector ) { 620 | delegateElement.on( eventName, selector, handlerProxy ); 621 | } else { 622 | element.on( eventName, handlerProxy ); 623 | } 624 | } ); 625 | }, 626 | 627 | _off: function( element, eventName ) { 628 | eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) + 629 | this.eventNamespace; 630 | element.off( eventName ).off( eventName ); 631 | 632 | // Clear the stack to avoid memory leaks (#10056) 633 | this.bindings = $( this.bindings.not( element ).get() ); 634 | this.focusable = $( this.focusable.not( element ).get() ); 635 | this.hoverable = $( this.hoverable.not( element ).get() ); 636 | }, 637 | 638 | _delay: function( handler, delay ) { 639 | function handlerProxy() { 640 | return ( typeof handler === "string" ? instance[ handler ] : handler ) 641 | .apply( instance, arguments ); 642 | } 643 | var instance = this; 644 | return setTimeout( handlerProxy, delay || 0 ); 645 | }, 646 | 647 | _hoverable: function( element ) { 648 | this.hoverable = this.hoverable.add( element ); 649 | this._on( element, { 650 | mouseenter: function( event ) { 651 | this._addClass( $( event.currentTarget ), null, "ui-state-hover" ); 652 | }, 653 | mouseleave: function( event ) { 654 | this._removeClass( $( event.currentTarget ), null, "ui-state-hover" ); 655 | } 656 | } ); 657 | }, 658 | 659 | _focusable: function( element ) { 660 | this.focusable = this.focusable.add( element ); 661 | this._on( element, { 662 | focusin: function( event ) { 663 | this._addClass( $( event.currentTarget ), null, "ui-state-focus" ); 664 | }, 665 | focusout: function( event ) { 666 | this._removeClass( $( event.currentTarget ), null, "ui-state-focus" ); 667 | } 668 | } ); 669 | }, 670 | 671 | _trigger: function( type, event, data ) { 672 | var prop, orig; 673 | var callback = this.options[ type ]; 674 | 675 | data = data || {}; 676 | event = $.Event( event ); 677 | event.type = ( type === this.widgetEventPrefix ? 678 | type : 679 | this.widgetEventPrefix + type ).toLowerCase(); 680 | 681 | // The original event may come from any element 682 | // so we need to reset the target on the new event 683 | event.target = this.element[ 0 ]; 684 | 685 | // Copy original event properties over to the new event 686 | orig = event.originalEvent; 687 | if ( orig ) { 688 | for ( prop in orig ) { 689 | if ( !( prop in event ) ) { 690 | event[ prop ] = orig[ prop ]; 691 | } 692 | } 693 | } 694 | 695 | this.element.trigger( event, data ); 696 | return !( $.isFunction( callback ) && 697 | callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false || 698 | event.isDefaultPrevented() ); 699 | } 700 | }; 701 | 702 | $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { 703 | $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { 704 | if ( typeof options === "string" ) { 705 | options = { effect: options }; 706 | } 707 | 708 | var hasOptions; 709 | var effectName = !options ? 710 | method : 711 | options === true || typeof options === "number" ? 712 | defaultEffect : 713 | options.effect || defaultEffect; 714 | 715 | options = options || {}; 716 | if ( typeof options === "number" ) { 717 | options = { duration: options }; 718 | } 719 | 720 | hasOptions = !$.isEmptyObject( options ); 721 | options.complete = callback; 722 | 723 | if ( options.delay ) { 724 | element.delay( options.delay ); 725 | } 726 | 727 | if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { 728 | element[ method ]( options ); 729 | } else if ( effectName !== method && element[ effectName ] ) { 730 | element[ effectName ]( options.duration, options.easing, callback ); 731 | } else { 732 | element.queue( function( next ) { 733 | $( this )[ method ](); 734 | if ( callback ) { 735 | callback.call( element[ 0 ] ); 736 | } 737 | next(); 738 | } ); 739 | } 740 | }; 741 | } ); 742 | 743 | var widget = $.widget; 744 | 745 | 746 | /*! 747 | * jQuery UI Keycode 1.12.1 748 | * http://jqueryui.com 749 | * 750 | * Copyright jQuery Foundation and other contributors 751 | * Released under the MIT license. 752 | * http://jquery.org/license 753 | */ 754 | 755 | //>>label: Keycode 756 | //>>group: Core 757 | //>>description: Provide keycodes as keynames 758 | //>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/ 759 | 760 | 761 | var keycode = $.ui.keyCode = { 762 | BACKSPACE: 8, 763 | COMMA: 188, 764 | DELETE: 46, 765 | DOWN: 40, 766 | END: 35, 767 | ENTER: 13, 768 | ESCAPE: 27, 769 | HOME: 36, 770 | LEFT: 37, 771 | PAGE_DOWN: 34, 772 | PAGE_UP: 33, 773 | PERIOD: 190, 774 | RIGHT: 39, 775 | SPACE: 32, 776 | TAB: 9, 777 | UP: 38 778 | }; 779 | 780 | 781 | 782 | 783 | // This file is deprecated 784 | var ie = $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); 785 | 786 | /*! 787 | * jQuery UI Mouse 1.12.1 788 | * http://jqueryui.com 789 | * 790 | * Copyright jQuery Foundation and other contributors 791 | * Released under the MIT license. 792 | * http://jquery.org/license 793 | */ 794 | 795 | //>>label: Mouse 796 | //>>group: Widgets 797 | //>>description: Abstracts mouse-based interactions to assist in creating certain widgets. 798 | //>>docs: http://api.jqueryui.com/mouse/ 799 | 800 | 801 | 802 | var mouseHandled = false; 803 | $( document ).on( "mouseup", function() { 804 | mouseHandled = false; 805 | } ); 806 | 807 | var widgetsMouse = $.widget( "ui.mouse", { 808 | version: "1.12.1", 809 | options: { 810 | cancel: "input, textarea, button, select, option", 811 | distance: 1, 812 | delay: 0 813 | }, 814 | _mouseInit: function() { 815 | var that = this; 816 | 817 | this.element 818 | .on( "mousedown." + this.widgetName, function( event ) { 819 | return that._mouseDown( event ); 820 | } ) 821 | .on( "click." + this.widgetName, function( event ) { 822 | if ( true === $.data( event.target, that.widgetName + ".preventClickEvent" ) ) { 823 | $.removeData( event.target, that.widgetName + ".preventClickEvent" ); 824 | event.stopImmediatePropagation(); 825 | return false; 826 | } 827 | } ); 828 | 829 | this.started = false; 830 | }, 831 | 832 | // TODO: make sure destroying one instance of mouse doesn't mess with 833 | // other instances of mouse 834 | _mouseDestroy: function() { 835 | this.element.off( "." + this.widgetName ); 836 | if ( this._mouseMoveDelegate ) { 837 | this.document 838 | .off( "mousemove." + this.widgetName, this._mouseMoveDelegate ) 839 | .off( "mouseup." + this.widgetName, this._mouseUpDelegate ); 840 | } 841 | }, 842 | 843 | _mouseDown: function( event ) { 844 | 845 | // don't let more than one widget handle mouseStart 846 | if ( mouseHandled ) { 847 | return; 848 | } 849 | 850 | this._mouseMoved = false; 851 | 852 | // We may have missed mouseup (out of window) 853 | ( this._mouseStarted && this._mouseUp( event ) ); 854 | 855 | this._mouseDownEvent = event; 856 | 857 | var that = this, 858 | btnIsLeft = ( event.which === 1 ), 859 | 860 | // event.target.nodeName works around a bug in IE 8 with 861 | // disabled inputs (#7620) 862 | elIsCancel = ( typeof this.options.cancel === "string" && event.target.nodeName ? 863 | $( event.target ).closest( this.options.cancel ).length : false ); 864 | if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) { 865 | return true; 866 | } 867 | 868 | this.mouseDelayMet = !this.options.delay; 869 | if ( !this.mouseDelayMet ) { 870 | this._mouseDelayTimer = setTimeout( function() { 871 | that.mouseDelayMet = true; 872 | }, this.options.delay ); 873 | } 874 | 875 | if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) { 876 | this._mouseStarted = ( this._mouseStart( event ) !== false ); 877 | if ( !this._mouseStarted ) { 878 | event.preventDefault(); 879 | return true; 880 | } 881 | } 882 | 883 | // Click event may never have fired (Gecko & Opera) 884 | if ( true === $.data( event.target, this.widgetName + ".preventClickEvent" ) ) { 885 | $.removeData( event.target, this.widgetName + ".preventClickEvent" ); 886 | } 887 | 888 | // These delegates are required to keep context 889 | this._mouseMoveDelegate = function( event ) { 890 | return that._mouseMove( event ); 891 | }; 892 | this._mouseUpDelegate = function( event ) { 893 | return that._mouseUp( event ); 894 | }; 895 | 896 | this.document 897 | .on( "mousemove." + this.widgetName, this._mouseMoveDelegate ) 898 | .on( "mouseup." + this.widgetName, this._mouseUpDelegate ); 899 | 900 | event.preventDefault(); 901 | 902 | mouseHandled = true; 903 | return true; 904 | }, 905 | 906 | _mouseMove: function( event ) { 907 | 908 | // Only check for mouseups outside the document if you've moved inside the document 909 | // at least once. This prevents the firing of mouseup in the case of IE<9, which will 910 | // fire a mousemove event if content is placed under the cursor. See #7778 911 | // Support: IE <9 912 | if ( this._mouseMoved ) { 913 | 914 | // IE mouseup check - mouseup happened when mouse was out of window 915 | if ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && 916 | !event.button ) { 917 | return this._mouseUp( event ); 918 | 919 | // Iframe mouseup check - mouseup occurred in another document 920 | } else if ( !event.which ) { 921 | 922 | // Support: Safari <=8 - 9 923 | // Safari sets which to 0 if you press any of the following keys 924 | // during a drag (#14461) 925 | if ( event.originalEvent.altKey || event.originalEvent.ctrlKey || 926 | event.originalEvent.metaKey || event.originalEvent.shiftKey ) { 927 | this.ignoreMissingWhich = true; 928 | } else if ( !this.ignoreMissingWhich ) { 929 | return this._mouseUp( event ); 930 | } 931 | } 932 | } 933 | 934 | if ( event.which || event.button ) { 935 | this._mouseMoved = true; 936 | } 937 | 938 | if ( this._mouseStarted ) { 939 | this._mouseDrag( event ); 940 | return event.preventDefault(); 941 | } 942 | 943 | if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) { 944 | this._mouseStarted = 945 | ( this._mouseStart( this._mouseDownEvent, event ) !== false ); 946 | ( this._mouseStarted ? this._mouseDrag( event ) : this._mouseUp( event ) ); 947 | } 948 | 949 | return !this._mouseStarted; 950 | }, 951 | 952 | _mouseUp: function( event ) { 953 | this.document 954 | .off( "mousemove." + this.widgetName, this._mouseMoveDelegate ) 955 | .off( "mouseup." + this.widgetName, this._mouseUpDelegate ); 956 | 957 | if ( this._mouseStarted ) { 958 | this._mouseStarted = false; 959 | 960 | if ( event.target === this._mouseDownEvent.target ) { 961 | $.data( event.target, this.widgetName + ".preventClickEvent", true ); 962 | } 963 | 964 | this._mouseStop( event ); 965 | } 966 | 967 | if ( this._mouseDelayTimer ) { 968 | clearTimeout( this._mouseDelayTimer ); 969 | delete this._mouseDelayTimer; 970 | } 971 | 972 | this.ignoreMissingWhich = false; 973 | mouseHandled = false; 974 | event.preventDefault(); 975 | }, 976 | 977 | _mouseDistanceMet: function( event ) { 978 | return ( Math.max( 979 | Math.abs( this._mouseDownEvent.pageX - event.pageX ), 980 | Math.abs( this._mouseDownEvent.pageY - event.pageY ) 981 | ) >= this.options.distance 982 | ); 983 | }, 984 | 985 | _mouseDelayMet: function( /* event */ ) { 986 | return this.mouseDelayMet; 987 | }, 988 | 989 | // These are placeholder methods, to be overriden by extending plugin 990 | _mouseStart: function( /* event */ ) {}, 991 | _mouseDrag: function( /* event */ ) {}, 992 | _mouseStop: function( /* event */ ) {}, 993 | _mouseCapture: function( /* event */ ) { return true; } 994 | } ); 995 | 996 | 997 | /*! 998 | * jQuery UI Slider 1.12.1 999 | * http://jqueryui.com 1000 | * 1001 | * Copyright jQuery Foundation and other contributors 1002 | * Released under the MIT license. 1003 | * http://jquery.org/license 1004 | */ 1005 | 1006 | //>>label: Slider 1007 | //>>group: Widgets 1008 | //>>description: Displays a flexible slider with ranges and accessibility via keyboard. 1009 | //>>docs: http://api.jqueryui.com/slider/ 1010 | //>>demos: http://jqueryui.com/slider/ 1011 | //>>css.structure: ../../themes/base/core.css 1012 | //>>css.structure: ../../themes/base/slider.css 1013 | //>>css.theme: ../../themes/base/theme.css 1014 | 1015 | 1016 | 1017 | var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, { 1018 | version: "1.12.1", 1019 | widgetEventPrefix: "slide", 1020 | 1021 | options: { 1022 | animate: false, 1023 | classes: { 1024 | "ui-slider": "ui-corner-all", 1025 | "ui-slider-handle": "ui-corner-all", 1026 | 1027 | // Note: ui-widget-header isn't the most fittingly semantic framework class for this 1028 | // element, but worked best visually with a variety of themes 1029 | "ui-slider-range": "ui-corner-all ui-widget-header" 1030 | }, 1031 | distance: 0, 1032 | max: 100, 1033 | min: 0, 1034 | orientation: "horizontal", 1035 | range: false, 1036 | step: 1, 1037 | value: 0, 1038 | values: null, 1039 | 1040 | // Callbacks 1041 | change: null, 1042 | slide: null, 1043 | start: null, 1044 | stop: null 1045 | }, 1046 | 1047 | // Number of pages in a slider 1048 | // (how many times can you page up/down to go through the whole range) 1049 | numPages: 5, 1050 | 1051 | _create: function() { 1052 | this._keySliding = false; 1053 | this._mouseSliding = false; 1054 | this._animateOff = true; 1055 | this._handleIndex = null; 1056 | this._detectOrientation(); 1057 | this._mouseInit(); 1058 | this._calculateNewMax(); 1059 | 1060 | this._addClass( "ui-slider ui-slider-" + this.orientation, 1061 | "ui-widget ui-widget-content" ); 1062 | 1063 | this._refresh(); 1064 | 1065 | this._animateOff = false; 1066 | }, 1067 | 1068 | _refresh: function() { 1069 | this._createRange(); 1070 | this._createHandles(); 1071 | this._setupEvents(); 1072 | this._refreshValue(); 1073 | }, 1074 | 1075 | _createHandles: function() { 1076 | var i, handleCount, 1077 | options = this.options, 1078 | existingHandles = this.element.find( ".ui-slider-handle" ), 1079 | handle = "", 1080 | handles = []; 1081 | 1082 | handleCount = ( options.values && options.values.length ) || 1; 1083 | 1084 | if ( existingHandles.length > handleCount ) { 1085 | existingHandles.slice( handleCount ).remove(); 1086 | existingHandles = existingHandles.slice( 0, handleCount ); 1087 | } 1088 | 1089 | for ( i = existingHandles.length; i < handleCount; i++ ) { 1090 | handles.push( handle ); 1091 | } 1092 | 1093 | this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) ); 1094 | 1095 | this._addClass( this.handles, "ui-slider-handle", "ui-state-default" ); 1096 | 1097 | this.handle = this.handles.eq( 0 ); 1098 | 1099 | this.handles.each( function( i ) { 1100 | $( this ) 1101 | .data( "ui-slider-handle-index", i ) 1102 | .attr( "tabIndex", 0 ); 1103 | } ); 1104 | }, 1105 | 1106 | _createRange: function() { 1107 | var options = this.options; 1108 | 1109 | if ( options.range ) { 1110 | if ( options.range === true ) { 1111 | if ( !options.values ) { 1112 | options.values = [ this._valueMin(), this._valueMin() ]; 1113 | } else if ( options.values.length && options.values.length !== 2 ) { 1114 | options.values = [ options.values[ 0 ], options.values[ 0 ] ]; 1115 | } else if ( $.isArray( options.values ) ) { 1116 | options.values = options.values.slice( 0 ); 1117 | } 1118 | } 1119 | 1120 | if ( !this.range || !this.range.length ) { 1121 | this.range = $( "
" ) 1122 | .appendTo( this.element ); 1123 | 1124 | this._addClass( this.range, "ui-slider-range" ); 1125 | } else { 1126 | this._removeClass( this.range, "ui-slider-range-min ui-slider-range-max" ); 1127 | 1128 | // Handle range switching from true to min/max 1129 | this.range.css( { 1130 | "left": "", 1131 | "bottom": "" 1132 | } ); 1133 | } 1134 | if ( options.range === "min" || options.range === "max" ) { 1135 | this._addClass( this.range, "ui-slider-range-" + options.range ); 1136 | } 1137 | } else { 1138 | if ( this.range ) { 1139 | this.range.remove(); 1140 | } 1141 | this.range = null; 1142 | } 1143 | }, 1144 | 1145 | _setupEvents: function() { 1146 | this._off( this.handles ); 1147 | this._on( this.handles, this._handleEvents ); 1148 | this._hoverable( this.handles ); 1149 | this._focusable( this.handles ); 1150 | }, 1151 | 1152 | _destroy: function() { 1153 | this.handles.remove(); 1154 | if ( this.range ) { 1155 | this.range.remove(); 1156 | } 1157 | 1158 | this._mouseDestroy(); 1159 | }, 1160 | 1161 | _mouseCapture: function( event ) { 1162 | var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle, 1163 | that = this, 1164 | o = this.options; 1165 | 1166 | if ( o.disabled ) { 1167 | return false; 1168 | } 1169 | 1170 | this.elementSize = { 1171 | width: this.element.outerWidth(), 1172 | height: this.element.outerHeight() 1173 | }; 1174 | this.elementOffset = this.element.offset(); 1175 | 1176 | position = { x: event.pageX, y: event.pageY }; 1177 | normValue = this._normValueFromMouse( position ); 1178 | distance = this._valueMax() - this._valueMin() + 1; 1179 | this.handles.each( function( i ) { 1180 | var thisDistance = Math.abs( normValue - that.values( i ) ); 1181 | if ( ( distance > thisDistance ) || 1182 | ( distance === thisDistance && 1183 | ( i === that._lastChangedValue || that.values( i ) === o.min ) ) ) { 1184 | distance = thisDistance; 1185 | closestHandle = $( this ); 1186 | index = i; 1187 | } 1188 | } ); 1189 | 1190 | allowed = this._start( event, index ); 1191 | if ( allowed === false ) { 1192 | return false; 1193 | } 1194 | this._mouseSliding = true; 1195 | 1196 | this._handleIndex = index; 1197 | 1198 | this._addClass( closestHandle, null, "ui-state-active" ); 1199 | closestHandle.trigger( "focus" ); 1200 | 1201 | offset = closestHandle.offset(); 1202 | mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" ); 1203 | this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : { 1204 | left: event.pageX - offset.left - ( closestHandle.width() / 2 ), 1205 | top: event.pageY - offset.top - 1206 | ( closestHandle.height() / 2 ) - 1207 | ( parseInt( closestHandle.css( "borderTopWidth" ), 10 ) || 0 ) - 1208 | ( parseInt( closestHandle.css( "borderBottomWidth" ), 10 ) || 0 ) + 1209 | ( parseInt( closestHandle.css( "marginTop" ), 10 ) || 0 ) 1210 | }; 1211 | 1212 | if ( !this.handles.hasClass( "ui-state-hover" ) ) { 1213 | this._slide( event, index, normValue ); 1214 | } 1215 | this._animateOff = true; 1216 | return true; 1217 | }, 1218 | 1219 | _mouseStart: function() { 1220 | return true; 1221 | }, 1222 | 1223 | _mouseDrag: function( event ) { 1224 | var position = { x: event.pageX, y: event.pageY }, 1225 | normValue = this._normValueFromMouse( position ); 1226 | 1227 | this._slide( event, this._handleIndex, normValue ); 1228 | 1229 | return false; 1230 | }, 1231 | 1232 | _mouseStop: function( event ) { 1233 | this._removeClass( this.handles, null, "ui-state-active" ); 1234 | this._mouseSliding = false; 1235 | 1236 | this._stop( event, this._handleIndex ); 1237 | this._change( event, this._handleIndex ); 1238 | 1239 | this._handleIndex = null; 1240 | this._clickOffset = null; 1241 | this._animateOff = false; 1242 | 1243 | return false; 1244 | }, 1245 | 1246 | _detectOrientation: function() { 1247 | this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal"; 1248 | }, 1249 | 1250 | _normValueFromMouse: function( position ) { 1251 | var pixelTotal, 1252 | pixelMouse, 1253 | percentMouse, 1254 | valueTotal, 1255 | valueMouse; 1256 | 1257 | if ( this.orientation === "horizontal" ) { 1258 | pixelTotal = this.elementSize.width; 1259 | pixelMouse = position.x - this.elementOffset.left - 1260 | ( this._clickOffset ? this._clickOffset.left : 0 ); 1261 | } else { 1262 | pixelTotal = this.elementSize.height; 1263 | pixelMouse = position.y - this.elementOffset.top - 1264 | ( this._clickOffset ? this._clickOffset.top : 0 ); 1265 | } 1266 | 1267 | percentMouse = ( pixelMouse / pixelTotal ); 1268 | if ( percentMouse > 1 ) { 1269 | percentMouse = 1; 1270 | } 1271 | if ( percentMouse < 0 ) { 1272 | percentMouse = 0; 1273 | } 1274 | if ( this.orientation === "vertical" ) { 1275 | percentMouse = 1 - percentMouse; 1276 | } 1277 | 1278 | valueTotal = this._valueMax() - this._valueMin(); 1279 | valueMouse = this._valueMin() + percentMouse * valueTotal; 1280 | 1281 | return this._trimAlignValue( valueMouse ); 1282 | }, 1283 | 1284 | _uiHash: function( index, value, values ) { 1285 | var uiHash = { 1286 | handle: this.handles[ index ], 1287 | handleIndex: index, 1288 | value: value !== undefined ? value : this.value() 1289 | }; 1290 | 1291 | if ( this._hasMultipleValues() ) { 1292 | uiHash.value = value !== undefined ? value : this.values( index ); 1293 | uiHash.values = values || this.values(); 1294 | } 1295 | 1296 | return uiHash; 1297 | }, 1298 | 1299 | _hasMultipleValues: function() { 1300 | return this.options.values && this.options.values.length; 1301 | }, 1302 | 1303 | _start: function( event, index ) { 1304 | return this._trigger( "start", event, this._uiHash( index ) ); 1305 | }, 1306 | 1307 | _slide: function( event, index, newVal ) { 1308 | var allowed, otherVal, 1309 | currentValue = this.value(), 1310 | newValues = this.values(); 1311 | 1312 | if ( this._hasMultipleValues() ) { 1313 | otherVal = this.values( index ? 0 : 1 ); 1314 | currentValue = this.values( index ); 1315 | 1316 | if ( this.options.values.length === 2 && this.options.range === true ) { 1317 | newVal = index === 0 ? Math.min( otherVal, newVal ) : Math.max( otherVal, newVal ); 1318 | } 1319 | 1320 | newValues[ index ] = newVal; 1321 | } 1322 | 1323 | if ( newVal === currentValue ) { 1324 | return; 1325 | } 1326 | 1327 | allowed = this._trigger( "slide", event, this._uiHash( index, newVal, newValues ) ); 1328 | 1329 | // A slide can be canceled by returning false from the slide callback 1330 | if ( allowed === false ) { 1331 | return; 1332 | } 1333 | 1334 | if ( this._hasMultipleValues() ) { 1335 | this.values( index, newVal ); 1336 | } else { 1337 | this.value( newVal ); 1338 | } 1339 | }, 1340 | 1341 | _stop: function( event, index ) { 1342 | this._trigger( "stop", event, this._uiHash( index ) ); 1343 | }, 1344 | 1345 | _change: function( event, index ) { 1346 | if ( !this._keySliding && !this._mouseSliding ) { 1347 | 1348 | //store the last changed value index for reference when handles overlap 1349 | this._lastChangedValue = index; 1350 | this._trigger( "change", event, this._uiHash( index ) ); 1351 | } 1352 | }, 1353 | 1354 | value: function( newValue ) { 1355 | if ( arguments.length ) { 1356 | this.options.value = this._trimAlignValue( newValue ); 1357 | this._refreshValue(); 1358 | this._change( null, 0 ); 1359 | return; 1360 | } 1361 | 1362 | return this._value(); 1363 | }, 1364 | 1365 | values: function( index, newValue ) { 1366 | var vals, 1367 | newValues, 1368 | i; 1369 | 1370 | if ( arguments.length > 1 ) { 1371 | this.options.values[ index ] = this._trimAlignValue( newValue ); 1372 | this._refreshValue(); 1373 | this._change( null, index ); 1374 | return; 1375 | } 1376 | 1377 | if ( arguments.length ) { 1378 | if ( $.isArray( arguments[ 0 ] ) ) { 1379 | vals = this.options.values; 1380 | newValues = arguments[ 0 ]; 1381 | for ( i = 0; i < vals.length; i += 1 ) { 1382 | vals[ i ] = this._trimAlignValue( newValues[ i ] ); 1383 | this._change( null, i ); 1384 | } 1385 | this._refreshValue(); 1386 | } else { 1387 | if ( this._hasMultipleValues() ) { 1388 | return this._values( index ); 1389 | } else { 1390 | return this.value(); 1391 | } 1392 | } 1393 | } else { 1394 | return this._values(); 1395 | } 1396 | }, 1397 | 1398 | _setOption: function( key, value ) { 1399 | var i, 1400 | valsLength = 0; 1401 | 1402 | if ( key === "range" && this.options.range === true ) { 1403 | if ( value === "min" ) { 1404 | this.options.value = this._values( 0 ); 1405 | this.options.values = null; 1406 | } else if ( value === "max" ) { 1407 | this.options.value = this._values( this.options.values.length - 1 ); 1408 | this.options.values = null; 1409 | } 1410 | } 1411 | 1412 | if ( $.isArray( this.options.values ) ) { 1413 | valsLength = this.options.values.length; 1414 | } 1415 | 1416 | this._super( key, value ); 1417 | 1418 | switch ( key ) { 1419 | case "orientation": 1420 | this._detectOrientation(); 1421 | this._removeClass( "ui-slider-horizontal ui-slider-vertical" ) 1422 | ._addClass( "ui-slider-" + this.orientation ); 1423 | this._refreshValue(); 1424 | if ( this.options.range ) { 1425 | this._refreshRange( value ); 1426 | } 1427 | 1428 | // Reset positioning from previous orientation 1429 | this.handles.css( value === "horizontal" ? "bottom" : "left", "" ); 1430 | break; 1431 | case "value": 1432 | this._animateOff = true; 1433 | this._refreshValue(); 1434 | this._change( null, 0 ); 1435 | this._animateOff = false; 1436 | break; 1437 | case "values": 1438 | this._animateOff = true; 1439 | this._refreshValue(); 1440 | 1441 | // Start from the last handle to prevent unreachable handles (#9046) 1442 | for ( i = valsLength - 1; i >= 0; i-- ) { 1443 | this._change( null, i ); 1444 | } 1445 | this._animateOff = false; 1446 | break; 1447 | case "step": 1448 | case "min": 1449 | case "max": 1450 | this._animateOff = true; 1451 | this._calculateNewMax(); 1452 | this._refreshValue(); 1453 | this._animateOff = false; 1454 | break; 1455 | case "range": 1456 | this._animateOff = true; 1457 | this._refresh(); 1458 | this._animateOff = false; 1459 | break; 1460 | } 1461 | }, 1462 | 1463 | _setOptionDisabled: function( value ) { 1464 | this._super( value ); 1465 | 1466 | this._toggleClass( null, "ui-state-disabled", !!value ); 1467 | }, 1468 | 1469 | //internal value getter 1470 | // _value() returns value trimmed by min and max, aligned by step 1471 | _value: function() { 1472 | var val = this.options.value; 1473 | val = this._trimAlignValue( val ); 1474 | 1475 | return val; 1476 | }, 1477 | 1478 | //internal values getter 1479 | // _values() returns array of values trimmed by min and max, aligned by step 1480 | // _values( index ) returns single value trimmed by min and max, aligned by step 1481 | _values: function( index ) { 1482 | var val, 1483 | vals, 1484 | i; 1485 | 1486 | if ( arguments.length ) { 1487 | val = this.options.values[ index ]; 1488 | val = this._trimAlignValue( val ); 1489 | 1490 | return val; 1491 | } else if ( this._hasMultipleValues() ) { 1492 | 1493 | // .slice() creates a copy of the array 1494 | // this copy gets trimmed by min and max and then returned 1495 | vals = this.options.values.slice(); 1496 | for ( i = 0; i < vals.length; i += 1 ) { 1497 | vals[ i ] = this._trimAlignValue( vals[ i ] ); 1498 | } 1499 | 1500 | return vals; 1501 | } else { 1502 | return []; 1503 | } 1504 | }, 1505 | 1506 | // Returns the step-aligned value that val is closest to, between (inclusive) min and max 1507 | _trimAlignValue: function( val ) { 1508 | if ( val <= this._valueMin() ) { 1509 | return this._valueMin(); 1510 | } 1511 | if ( val >= this._valueMax() ) { 1512 | return this._valueMax(); 1513 | } 1514 | var step = ( this.options.step > 0 ) ? this.options.step : 1, 1515 | valModStep = ( val - this._valueMin() ) % step, 1516 | alignValue = val - valModStep; 1517 | 1518 | if ( Math.abs( valModStep ) * 2 >= step ) { 1519 | alignValue += ( valModStep > 0 ) ? step : ( -step ); 1520 | } 1521 | 1522 | // Since JavaScript has problems with large floats, round 1523 | // the final value to 5 digits after the decimal point (see #4124) 1524 | return parseFloat( alignValue.toFixed( 5 ) ); 1525 | }, 1526 | 1527 | _calculateNewMax: function() { 1528 | var max = this.options.max, 1529 | min = this._valueMin(), 1530 | step = this.options.step, 1531 | aboveMin = Math.round( ( max - min ) / step ) * step; 1532 | max = aboveMin + min; 1533 | if ( max > this.options.max ) { 1534 | 1535 | //If max is not divisible by step, rounding off may increase its value 1536 | max -= step; 1537 | } 1538 | this.max = parseFloat( max.toFixed( this._precision() ) ); 1539 | }, 1540 | 1541 | _precision: function() { 1542 | var precision = this._precisionOf( this.options.step ); 1543 | if ( this.options.min !== null ) { 1544 | precision = Math.max( precision, this._precisionOf( this.options.min ) ); 1545 | } 1546 | return precision; 1547 | }, 1548 | 1549 | _precisionOf: function( num ) { 1550 | var str = num.toString(), 1551 | decimal = str.indexOf( "." ); 1552 | return decimal === -1 ? 0 : str.length - decimal - 1; 1553 | }, 1554 | 1555 | _valueMin: function() { 1556 | return this.options.min; 1557 | }, 1558 | 1559 | _valueMax: function() { 1560 | return this.max; 1561 | }, 1562 | 1563 | _refreshRange: function( orientation ) { 1564 | if ( orientation === "vertical" ) { 1565 | this.range.css( { "width": "", "left": "" } ); 1566 | } 1567 | if ( orientation === "horizontal" ) { 1568 | this.range.css( { "height": "", "bottom": "" } ); 1569 | } 1570 | }, 1571 | 1572 | _refreshValue: function() { 1573 | var lastValPercent, valPercent, value, valueMin, valueMax, 1574 | oRange = this.options.range, 1575 | o = this.options, 1576 | that = this, 1577 | animate = ( !this._animateOff ) ? o.animate : false, 1578 | _set = {}; 1579 | 1580 | if ( this._hasMultipleValues() ) { 1581 | this.handles.each( function( i ) { 1582 | valPercent = ( that.values( i ) - that._valueMin() ) / ( that._valueMax() - 1583 | that._valueMin() ) * 100; 1584 | _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; 1585 | $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); 1586 | if ( that.options.range === true ) { 1587 | if ( that.orientation === "horizontal" ) { 1588 | if ( i === 0 ) { 1589 | that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 1590 | left: valPercent + "%" 1591 | }, o.animate ); 1592 | } 1593 | if ( i === 1 ) { 1594 | that.range[ animate ? "animate" : "css" ]( { 1595 | width: ( valPercent - lastValPercent ) + "%" 1596 | }, { 1597 | queue: false, 1598 | duration: o.animate 1599 | } ); 1600 | } 1601 | } else { 1602 | if ( i === 0 ) { 1603 | that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 1604 | bottom: ( valPercent ) + "%" 1605 | }, o.animate ); 1606 | } 1607 | if ( i === 1 ) { 1608 | that.range[ animate ? "animate" : "css" ]( { 1609 | height: ( valPercent - lastValPercent ) + "%" 1610 | }, { 1611 | queue: false, 1612 | duration: o.animate 1613 | } ); 1614 | } 1615 | } 1616 | } 1617 | lastValPercent = valPercent; 1618 | } ); 1619 | } else { 1620 | value = this.value(); 1621 | valueMin = this._valueMin(); 1622 | valueMax = this._valueMax(); 1623 | valPercent = ( valueMax !== valueMin ) ? 1624 | ( value - valueMin ) / ( valueMax - valueMin ) * 100 : 1625 | 0; 1626 | _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; 1627 | this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); 1628 | 1629 | if ( oRange === "min" && this.orientation === "horizontal" ) { 1630 | this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 1631 | width: valPercent + "%" 1632 | }, o.animate ); 1633 | } 1634 | if ( oRange === "max" && this.orientation === "horizontal" ) { 1635 | this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 1636 | width: ( 100 - valPercent ) + "%" 1637 | }, o.animate ); 1638 | } 1639 | if ( oRange === "min" && this.orientation === "vertical" ) { 1640 | this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 1641 | height: valPercent + "%" 1642 | }, o.animate ); 1643 | } 1644 | if ( oRange === "max" && this.orientation === "vertical" ) { 1645 | this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { 1646 | height: ( 100 - valPercent ) + "%" 1647 | }, o.animate ); 1648 | } 1649 | } 1650 | }, 1651 | 1652 | _handleEvents: { 1653 | keydown: function( event ) { 1654 | var allowed, curVal, newVal, step, 1655 | index = $( event.target ).data( "ui-slider-handle-index" ); 1656 | 1657 | switch ( event.keyCode ) { 1658 | case $.ui.keyCode.HOME: 1659 | case $.ui.keyCode.END: 1660 | case $.ui.keyCode.PAGE_UP: 1661 | case $.ui.keyCode.PAGE_DOWN: 1662 | case $.ui.keyCode.UP: 1663 | case $.ui.keyCode.RIGHT: 1664 | case $.ui.keyCode.DOWN: 1665 | case $.ui.keyCode.LEFT: 1666 | event.preventDefault(); 1667 | if ( !this._keySliding ) { 1668 | this._keySliding = true; 1669 | this._addClass( $( event.target ), null, "ui-state-active" ); 1670 | allowed = this._start( event, index ); 1671 | if ( allowed === false ) { 1672 | return; 1673 | } 1674 | } 1675 | break; 1676 | } 1677 | 1678 | step = this.options.step; 1679 | if ( this._hasMultipleValues() ) { 1680 | curVal = newVal = this.values( index ); 1681 | } else { 1682 | curVal = newVal = this.value(); 1683 | } 1684 | 1685 | switch ( event.keyCode ) { 1686 | case $.ui.keyCode.HOME: 1687 | newVal = this._valueMin(); 1688 | break; 1689 | case $.ui.keyCode.END: 1690 | newVal = this._valueMax(); 1691 | break; 1692 | case $.ui.keyCode.PAGE_UP: 1693 | newVal = this._trimAlignValue( 1694 | curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages ) 1695 | ); 1696 | break; 1697 | case $.ui.keyCode.PAGE_DOWN: 1698 | newVal = this._trimAlignValue( 1699 | curVal - ( ( this._valueMax() - this._valueMin() ) / this.numPages ) ); 1700 | break; 1701 | case $.ui.keyCode.UP: 1702 | case $.ui.keyCode.RIGHT: 1703 | if ( curVal === this._valueMax() ) { 1704 | return; 1705 | } 1706 | newVal = this._trimAlignValue( curVal + step ); 1707 | break; 1708 | case $.ui.keyCode.DOWN: 1709 | case $.ui.keyCode.LEFT: 1710 | if ( curVal === this._valueMin() ) { 1711 | return; 1712 | } 1713 | newVal = this._trimAlignValue( curVal - step ); 1714 | break; 1715 | } 1716 | 1717 | this._slide( event, index, newVal ); 1718 | }, 1719 | keyup: function( event ) { 1720 | var index = $( event.target ).data( "ui-slider-handle-index" ); 1721 | 1722 | if ( this._keySliding ) { 1723 | this._keySliding = false; 1724 | this._stop( event, index ); 1725 | this._change( event, index ); 1726 | this._removeClass( $( event.target ), null, "ui-state-active" ); 1727 | } 1728 | } 1729 | } 1730 | } ); 1731 | 1732 | 1733 | 1734 | 1735 | })); -------------------------------------------------------------------------------- /server/js/jquery-ui-1.12.1.slider.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.12.1 - 2018-09-11 2 | * http://jqueryui.com 3 | * Includes: widget.js, keycode.js, widgets/mouse.js, widgets/slider.js 4 | * Copyright jQuery Foundation and other contributors; Licensed MIT */ 5 | 6 | (function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){t.ui=t.ui||{},t.ui.version="1.12.1";var e=0,i=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},l=e.split(".")[0];e=e.split(".")[1];var h=l+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][h.toLowerCase()]=function(e){return!!t.data(e,h)},t[l]=t[l]||{},n=t[l][e],o=t[l][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:l,widgetName:e,widgetFullName:h}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var s,n,o=i.call(arguments,1),a=0,r=o.length;r>a;a++)for(s in o[a])n=o[a][s],o[a].hasOwnProperty(s)&&void 0!==n&&(e[s]=t.isPlainObject(n)?t.isPlainObject(e[s])?t.widget.extend({},e[s],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,s){var n=s.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=i.call(arguments,1),l=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(l=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):l=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new s(o,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?n.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var s=!1;t(document).on("mouseup",function(){s=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!s){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,n=1===e.which,o="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return n&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),s=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,s=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o="",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("
").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,l,h,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),l=o.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-o.width()/2,top:e.pageY-l.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n,o=this.value(),a=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&this.options.range===!0&&(i=0===e?Math.min(n,i):Math.max(n,i)),a[e]=i),i!==o&&(s=this._trigger("slide",t,this._uiHash(e,i,a)),s!==!1&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void 0;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=n-1;s>=0;s--)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step,s=Math.round((t-e)/i)*i;t=s+e,t>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,l=this,h=this._animateOff?!1:r.animate,c={};this._hasMultipleValues()?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())),c["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](c,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,s,n,o,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),i=this._start(e,a),i===!1))return}switch(o=this.options.step,s=n=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-o)}this._slide(e,a,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}})}); -------------------------------------------------------------------------------- /server/js/jquery-ui-slider-pips.js: -------------------------------------------------------------------------------- 1 | /*! jQuery-ui-Slider-Pips - v1.11.4 - 2016-09-04 2 | * Copyright (c) 2016 Simon Goellner ; Licensed MIT */ 3 | 4 | (function($) { 5 | 6 | "use strict"; 7 | 8 | var extensionMethods = { 9 | 10 | 11 | 12 | 13 | 14 | // pips 15 | 16 | pips: function( settings ) { 17 | 18 | var slider = this, 19 | i, j, p, 20 | collection = "", 21 | mousedownHandlers, 22 | min = slider._valueMin(), 23 | max = slider._valueMax(), 24 | pips = ( max - min ) / slider.options.step, 25 | $handles = slider.element.find(".ui-slider-handle"), 26 | $pips; 27 | 28 | var options = { 29 | 30 | first: "label", 31 | /* "label", "pip", false */ 32 | 33 | last: "label", 34 | /* "label", "pip", false */ 35 | 36 | rest: "pip", 37 | /* "label", "pip", false */ 38 | 39 | labels: false, 40 | /* [array], { first: "string", rest: [array], last: "string" }, false */ 41 | 42 | prefix: "", 43 | /* "", string */ 44 | 45 | suffix: "", 46 | /* "", string */ 47 | 48 | step: ( pips > 100 ) ? Math.floor( pips * 0.05 ) : 1, 49 | /* number */ 50 | 51 | formatLabel: function(value) { 52 | return this.prefix + value + this.suffix; 53 | } 54 | /* function 55 | must return a value to display in the pip labels */ 56 | 57 | }; 58 | 59 | if ( $.type( settings ) === "object" || $.type( settings ) === "undefined" ) { 60 | 61 | $.extend( options, settings ); 62 | slider.element.data("pips-options", options ); 63 | 64 | } else { 65 | 66 | if ( settings === "destroy" ) { 67 | 68 | destroy(); 69 | 70 | } else if ( settings === "refresh" ) { 71 | 72 | slider.element.slider( "pips", slider.element.data("pips-options") ); 73 | 74 | } 75 | 76 | return; 77 | 78 | } 79 | 80 | 81 | // we don't want the step ever to be a floating point or negative 82 | // (or 0 actually, so we'll set it to 1 in that case). 83 | slider.options.pipStep = Math.abs( Math.round( options.step ) ) || 1; 84 | 85 | // get rid of all pips that might already exist. 86 | slider.element 87 | .off( ".selectPip" ) 88 | .addClass("ui-slider-pips") 89 | .find(".ui-slider-pip") 90 | .remove(); 91 | 92 | // small object with functions for marking pips as selected. 93 | 94 | var selectPip = { 95 | 96 | single: function(value) { 97 | 98 | this.resetClasses(); 99 | 100 | $pips 101 | .filter(".ui-slider-pip-" + this.classLabel(value) ) 102 | .addClass("ui-slider-pip-selected"); 103 | 104 | if ( slider.options.range ) { 105 | 106 | $pips.each(function(k, v) { 107 | 108 | var pipVal = $(v).children(".ui-slider-label").data("value"); 109 | 110 | if (( slider.options.range === "min" && pipVal < value ) || 111 | ( slider.options.range === "max" && pipVal > value )) { 112 | 113 | $(v).addClass("ui-slider-pip-inrange"); 114 | 115 | } 116 | 117 | }); 118 | 119 | } 120 | 121 | }, 122 | 123 | range: function(values) { 124 | 125 | this.resetClasses(); 126 | 127 | for ( i = 0; i < values.length; i++ ) { 128 | 129 | $pips 130 | .filter(".ui-slider-pip-" + this.classLabel(values[i]) ) 131 | .addClass("ui-slider-pip-selected-" + ( i + 1 ) ); 132 | 133 | } 134 | 135 | if ( slider.options.range ) { 136 | 137 | $pips.each(function(k, v) { 138 | 139 | var pipVal = $(v).children(".ui-slider-label").data("value"); 140 | 141 | if ( pipVal > values[0] && pipVal < values[1] ) { 142 | 143 | $(v).addClass("ui-slider-pip-inrange"); 144 | 145 | } 146 | 147 | }); 148 | 149 | } 150 | 151 | }, 152 | 153 | classLabel: function(value) { 154 | 155 | return value.toString().replace(".", "-"); 156 | 157 | }, 158 | 159 | resetClasses: function() { 160 | 161 | var regex = /(^|\s*)(ui-slider-pip-selected|ui-slider-pip-inrange)(-{1,2}\d+|\s|$)/gi; 162 | 163 | $pips.removeClass( function(index, css) { 164 | return ( css.match(regex) || [] ).join(" "); 165 | }); 166 | 167 | } 168 | 169 | }; 170 | 171 | function getClosestHandle( val ) { 172 | 173 | var h, k, 174 | sliderVals, 175 | comparedVals, 176 | closestVal, 177 | tempHandles = [], 178 | closestHandle = 0; 179 | 180 | if ( slider.values() && slider.values().length ) { 181 | 182 | // get the current values of the slider handles 183 | sliderVals = slider.values(); 184 | 185 | // find the offset value from the `val` for each 186 | // handle, and store it in a new array 187 | comparedVals = $.map( sliderVals, function(v) { 188 | return Math.abs( v - val ); 189 | }); 190 | 191 | // figure out the closest handles to the value 192 | closestVal = Math.min.apply( Math, comparedVals ); 193 | 194 | // if a comparedVal is the closestVal, then 195 | // set the value accordingly, and set the closest handle. 196 | for ( h = 0; h < comparedVals.length; h++ ) { 197 | if ( comparedVals[h] === closestVal ) { 198 | tempHandles.push(h); 199 | } 200 | } 201 | 202 | // set the closest handle to the first handle in array, 203 | // just incase we have no _lastChangedValue to compare to. 204 | closestHandle = tempHandles[0]; 205 | 206 | // now we want to find out if any of the closest handles were 207 | // the last changed handle, if so we specify that handle to change 208 | for ( k = 0; k < tempHandles.length; k++ ) { 209 | if ( slider._lastChangedValue === tempHandles[k] ) { 210 | closestHandle = tempHandles[k]; 211 | } 212 | } 213 | 214 | if ( slider.options.range && tempHandles.length === 2 ) { 215 | 216 | if ( val > sliderVals[1] ) { 217 | 218 | closestHandle = tempHandles[1]; 219 | 220 | } else if ( val < sliderVals[0] ) { 221 | 222 | closestHandle = tempHandles[0]; 223 | 224 | } 225 | 226 | } 227 | 228 | } 229 | 230 | return closestHandle; 231 | 232 | } 233 | 234 | function destroy() { 235 | 236 | slider.element 237 | .off(".selectPip") 238 | .on("mousedown.slider", slider.element.data("mousedown-original") ) 239 | .removeClass("ui-slider-pips") 240 | .find(".ui-slider-pip") 241 | .remove(); 242 | 243 | } 244 | 245 | // when we click on a label, we want to make sure the 246 | // slider's handle actually goes to that label! 247 | // so we check all the handles and see which one is closest 248 | // to the label we clicked. If 2 handles are equidistant then 249 | // we move both of them. We also want to trigger focus on the 250 | // handle. 251 | 252 | // without this method the label is just treated like a part 253 | // of the slider and there's no accuracy in the selected value 254 | 255 | function labelClick( label, e ) { 256 | 257 | if (slider.option("disabled")) { 258 | return; 259 | } 260 | 261 | var val = $(label).data("value"), 262 | indexToChange = getClosestHandle( val ); 263 | 264 | if ( slider.values() && slider.values().length ) { 265 | 266 | slider.options.values[ indexToChange ] = slider._trimAlignValue( val ); 267 | 268 | } else { 269 | 270 | slider.options.value = slider._trimAlignValue( val ); 271 | 272 | } 273 | 274 | slider._refreshValue(); 275 | slider._change( e, indexToChange ); 276 | 277 | } 278 | 279 | // method for creating a pip. We loop this for creating all 280 | // the pips. 281 | 282 | function createPip( which ) { 283 | 284 | var label, 285 | percent, 286 | number = which, 287 | classes = "ui-slider-pip", 288 | css = "", 289 | value = slider.value(), 290 | values = slider.values(), 291 | labelValue, 292 | classLabel, 293 | labelIndex; 294 | 295 | if ( which === "first" ) { 296 | 297 | number = 0; 298 | 299 | } else if ( which === "last" ) { 300 | 301 | number = pips; 302 | 303 | } 304 | 305 | // labelValue is the actual value of the pip based on the min/step 306 | labelValue = min + ( slider.options.step * number ); 307 | 308 | // classLabel replaces any decimals with hyphens 309 | classLabel = labelValue.toString().replace(".", "-"); 310 | 311 | // get the index needed for selecting labels out of the array 312 | labelIndex = ( number + min ) - min; 313 | 314 | // we need to set the human-readable label to either the 315 | // corresponding element in the array, or the appropriate 316 | // item in the object... or an empty string. 317 | 318 | if ( $.type(options.labels) === "array" ) { 319 | 320 | label = options.labels[ labelIndex ] || ""; 321 | 322 | } else if ( $.type( options.labels ) === "object" ) { 323 | 324 | if ( which === "first" ) { 325 | 326 | // set first label 327 | label = options.labels.first || ""; 328 | 329 | } else if ( which === "last" ) { 330 | 331 | // set last label 332 | label = options.labels.last || ""; 333 | 334 | } else if ( $.type( options.labels.rest ) === "array" ) { 335 | 336 | // set other labels, but our index should start at -1 337 | // because of the first pip. 338 | label = options.labels.rest[ labelIndex - 1 ] || ""; 339 | 340 | } else { 341 | 342 | // urrggh, the options must be f**ked, just show nothing. 343 | label = labelValue; 344 | 345 | } 346 | 347 | } else { 348 | 349 | label = labelValue; 350 | 351 | } 352 | 353 | 354 | 355 | 356 | if ( which === "first" ) { 357 | 358 | // first Pip on the Slider 359 | percent = "0%"; 360 | 361 | classes += " ui-slider-pip-first"; 362 | classes += ( options.first === "label" ) ? " ui-slider-pip-label" : ""; 363 | classes += ( options.first === false ) ? " ui-slider-pip-hide" : ""; 364 | 365 | } else if ( which === "last" ) { 366 | 367 | // last Pip on the Slider 368 | percent = "100%"; 369 | 370 | classes += " ui-slider-pip-last"; 371 | classes += ( options.last === "label" ) ? " ui-slider-pip-label" : ""; 372 | classes += ( options.last === false ) ? " ui-slider-pip-hide" : ""; 373 | 374 | } else { 375 | 376 | // all other Pips 377 | percent = (( 100 / pips ) * which ).toFixed(4) + "%"; 378 | 379 | classes += ( options.rest === "label" ) ? " ui-slider-pip-label" : ""; 380 | classes += ( options.rest === false ) ? " ui-slider-pip-hide" : ""; 381 | 382 | } 383 | 384 | classes += " ui-slider-pip-" + classLabel; 385 | 386 | 387 | // add classes for the initial-selected values. 388 | if ( values && values.length ) { 389 | 390 | for ( i = 0; i < values.length; i++ ) { 391 | 392 | if ( labelValue === values[i] ) { 393 | 394 | classes += " ui-slider-pip-initial-" + ( i + 1 ); 395 | classes += " ui-slider-pip-selected-" + ( i + 1 ); 396 | 397 | } 398 | 399 | } 400 | 401 | if ( slider.options.range ) { 402 | 403 | if ( labelValue > values[0] && 404 | labelValue < values[1] ) { 405 | 406 | classes += " ui-slider-pip-inrange"; 407 | 408 | } 409 | 410 | } 411 | 412 | } else { 413 | 414 | if ( labelValue === value ) { 415 | 416 | classes += " ui-slider-pip-initial"; 417 | classes += " ui-slider-pip-selected"; 418 | 419 | } 420 | 421 | if ( slider.options.range ) { 422 | 423 | if (( slider.options.range === "min" && labelValue < value ) || 424 | ( slider.options.range === "max" && labelValue > value )) { 425 | 426 | classes += " ui-slider-pip-inrange"; 427 | 428 | } 429 | 430 | } 431 | 432 | } 433 | 434 | 435 | 436 | css = ( slider.options.orientation === "horizontal" ) ? 437 | "left: " + percent : 438 | "bottom: " + percent; 439 | 440 | 441 | // add this current pip to the collection 442 | return "" + 443 | "" + 444 | "" + options.formatLabel(label) + "" + 446 | ""; 447 | 448 | } 449 | 450 | // create our first pip 451 | collection += createPip("first"); 452 | 453 | // for every stop in the slider where we need a pip; create one. 454 | for ( p = slider.options.pipStep; p < pips; p += slider.options.pipStep ) { 455 | collection += createPip( p ); 456 | } 457 | 458 | // create our last pip 459 | collection += createPip("last"); 460 | 461 | // append the collection of pips. 462 | slider.element.append( collection ); 463 | 464 | // store the pips for setting classes later. 465 | $pips = slider.element.find(".ui-slider-pip"); 466 | 467 | 468 | 469 | // store the mousedown handlers for later, just in case we reset 470 | // the slider, the handler would be lost! 471 | 472 | if ( $._data( slider.element.get(0), "events").mousedown && 473 | $._data( slider.element.get(0), "events").mousedown.length ) { 474 | 475 | mousedownHandlers = $._data( slider.element.get(0), "events").mousedown; 476 | 477 | } else { 478 | 479 | mousedownHandlers = slider.element.data("mousedown-handlers"); 480 | 481 | } 482 | 483 | slider.element.data("mousedown-handlers", mousedownHandlers.slice() ); 484 | 485 | // loop through all the mousedown handlers on the slider, 486 | // and store the original namespaced (.slider) event handler so 487 | // we can trigger it later. 488 | for ( j = 0; j < mousedownHandlers.length; j++ ) { 489 | if ( mousedownHandlers[j].namespace === "slider" ) { 490 | slider.element.data("mousedown-original", mousedownHandlers[j].handler ); 491 | } 492 | } 493 | 494 | // unbind the mousedown.slider event, because it interferes with 495 | // the labelClick() method (stops smooth animation), and decide 496 | // if we want to trigger the original event based on which element 497 | // was clicked. 498 | slider.element 499 | .off("mousedown.slider") 500 | .on("mousedown.selectPip", function(e) { 501 | 502 | var $target = $(e.target), 503 | closest = getClosestHandle( $target.data("value") ), 504 | $handle = $handles.eq( closest ); 505 | 506 | $handle.addClass("ui-state-active"); 507 | 508 | if ( $target.is(".ui-slider-label") ) { 509 | 510 | labelClick( $target, e ); 511 | 512 | slider.element 513 | .one("mouseup.selectPip", function() { 514 | 515 | $handle 516 | .removeClass("ui-state-active") 517 | .focus(); 518 | 519 | }); 520 | 521 | } else { 522 | 523 | var originalMousedown = slider.element.data("mousedown-original"); 524 | originalMousedown(e); 525 | 526 | } 527 | 528 | }); 529 | 530 | 531 | 532 | 533 | slider.element.on( "slide.selectPip slidechange.selectPip", function(e, ui) { 534 | 535 | var $slider = $(this), 536 | value = $slider.slider("value"), 537 | values = $slider.slider("values"); 538 | 539 | if ( ui ) { 540 | 541 | value = ui.value; 542 | values = ui.values; 543 | 544 | } 545 | 546 | if ( slider.values() && slider.values().length ) { 547 | 548 | selectPip.range( values ); 549 | 550 | } else { 551 | 552 | selectPip.single( value ); 553 | 554 | } 555 | 556 | }); 557 | 558 | 559 | 560 | 561 | }, 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | // floats 571 | 572 | float: function( settings ) { 573 | 574 | var i, 575 | slider = this, 576 | min = slider._valueMin(), 577 | max = slider._valueMax(), 578 | value = slider._value(), 579 | values = slider._values(), 580 | tipValues = [], 581 | $handles = slider.element.find(".ui-slider-handle"); 582 | 583 | var options = { 584 | 585 | handle: true, 586 | /* false */ 587 | 588 | pips: false, 589 | /* true */ 590 | 591 | labels: false, 592 | /* [array], { first: "string", rest: [array], last: "string" }, false */ 593 | 594 | prefix: "", 595 | /* "", string */ 596 | 597 | suffix: "", 598 | /* "", string */ 599 | 600 | event: "slidechange slide", 601 | /* "slidechange", "slide", "slidechange slide" */ 602 | 603 | formatLabel: function(value) { 604 | return this.prefix + value + this.suffix; 605 | } 606 | /* function 607 | must return a value to display in the floats */ 608 | 609 | }; 610 | 611 | if ( $.type( settings ) === "object" || $.type( settings ) === "undefined" ) { 612 | 613 | $.extend( options, settings ); 614 | slider.element.data("float-options", options ); 615 | 616 | } else { 617 | 618 | if ( settings === "destroy" ) { 619 | 620 | destroy(); 621 | 622 | } else if ( settings === "refresh" ) { 623 | 624 | slider.element.slider( "float", slider.element.data("float-options") ); 625 | 626 | } 627 | 628 | return; 629 | 630 | } 631 | 632 | 633 | 634 | 635 | if ( value < min ) { 636 | value = min; 637 | } 638 | 639 | if ( value > max ) { 640 | value = max; 641 | } 642 | 643 | if ( values && values.length ) { 644 | 645 | for ( i = 0; i < values.length; i++ ) { 646 | 647 | if ( values[i] < min ) { 648 | values[i] = min; 649 | } 650 | 651 | if ( values[i] > max ) { 652 | values[i] = max; 653 | } 654 | 655 | } 656 | 657 | } 658 | 659 | // add a class for the CSS 660 | slider.element 661 | .addClass("ui-slider-float") 662 | .find(".ui-slider-tip, .ui-slider-tip-label") 663 | .remove(); 664 | 665 | 666 | 667 | function destroy() { 668 | 669 | slider.element 670 | .off(".sliderFloat") 671 | .removeClass("ui-slider-float") 672 | .find(".ui-slider-tip, .ui-slider-tip-label") 673 | .remove(); 674 | 675 | } 676 | 677 | 678 | function getPipLabels( values ) { 679 | 680 | // when checking the array we need to divide 681 | // by the step option, so we store those values here. 682 | 683 | var vals = [], 684 | steppedVals = $.map( values, function(v) { 685 | return Math.ceil(( v - min ) / slider.options.step); 686 | }); 687 | 688 | // now we just get the values we need to return 689 | // by looping through the values array and assigning the 690 | // label if it exists. 691 | 692 | if ( $.type( options.labels ) === "array" ) { 693 | 694 | for ( i = 0; i < values.length; i++ ) { 695 | 696 | vals[i] = options.labels[ steppedVals[i] ] || values[i]; 697 | 698 | } 699 | 700 | } else if ( $.type( options.labels ) === "object" ) { 701 | 702 | for ( i = 0; i < values.length; i++ ) { 703 | 704 | if ( values[i] === min ) { 705 | 706 | vals[i] = options.labels.first || min; 707 | 708 | } else if ( values[i] === max ) { 709 | 710 | vals[i] = options.labels.last || max; 711 | 712 | } else if ( $.type( options.labels.rest ) === "array" ) { 713 | 714 | vals[i] = options.labels.rest[ steppedVals[i] - 1 ] || values[i]; 715 | 716 | } else { 717 | 718 | vals[i] = values[i]; 719 | 720 | } 721 | 722 | } 723 | 724 | } else { 725 | 726 | for ( i = 0; i < values.length; i++ ) { 727 | 728 | vals[i] = values[i]; 729 | 730 | } 731 | 732 | } 733 | 734 | return vals; 735 | 736 | } 737 | 738 | // apply handle tip if settings allows. 739 | if ( options.handle ) { 740 | 741 | // we need to set the human-readable label to either the 742 | // corresponding element in the array, or the appropriate 743 | // item in the object... or an empty string. 744 | 745 | tipValues = ( slider.values() && slider.values().length ) ? 746 | getPipLabels( values ) : 747 | getPipLabels( [ value ] ); 748 | 749 | for ( i = 0; i < tipValues.length; i++ ) { 750 | 751 | $handles 752 | .eq( i ) 753 | .append( $(""+ options.formatLabel(tipValues[i]) +"") ); 754 | 755 | } 756 | 757 | } 758 | 759 | if ( options.pips ) { 760 | 761 | // if this slider also has pip-labels, we make those into tips, too. 762 | slider.element.find(".ui-slider-label").each(function(k, v) { 763 | 764 | var $this = $(v), 765 | val = [ $this.data("value") ], 766 | label, 767 | $tip; 768 | 769 | 770 | label = options.formatLabel( getPipLabels( val )[0] ); 771 | 772 | // create a tip element 773 | $tip = 774 | $("" + label + "") 775 | .insertAfter( $this ); 776 | 777 | }); 778 | 779 | } 780 | 781 | // check that the event option is actually valid against our 782 | // own list of the slider's events. 783 | if ( options.event !== "slide" && 784 | options.event !== "slidechange" && 785 | options.event !== "slide slidechange" && 786 | options.event !== "slidechange slide" ) { 787 | 788 | options.event = "slidechange slide"; 789 | 790 | } 791 | 792 | // when slider changes, update handle tip label. 793 | slider.element 794 | .off(".sliderFloat") 795 | .on( options.event + ".sliderFloat", function( e, ui ) { 796 | 797 | var uiValue = ( $.type( ui.value ) === "array" ) ? ui.value : [ ui.value ], 798 | val = options.formatLabel( getPipLabels( uiValue )[0] ); 799 | 800 | $(ui.handle) 801 | .find(".ui-slider-tip") 802 | .html( val ); 803 | 804 | }); 805 | 806 | } 807 | 808 | }; 809 | 810 | $.extend(true, $.ui.slider.prototype, extensionMethods); 811 | 812 | })(jQuery); 813 | -------------------------------------------------------------------------------- /server/js/jquery-ui-slider-pips.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery-ui-Slider-Pips - v1.11.4 - 2016-09-04 2 | * Copyright (c) 2016 Simon Goellner ; Licensed MIT */ 3 | !function(e){"use strict";var i={pips:function(i){function l(i){var l,s,t,a,n,r=[],o=0;if(u.values()&&u.values().length){for(t=u.values(),a=e.map(t,function(e){return Math.abs(e-i)}),n=Math.min.apply(Math,a),l=0;lt[1]?o=r[1]:iv[0]&&tf)&&(p+=" ui-slider-pip-inrange");return d="horizontal"===u.options.orientation?"left: "+s:"bottom: "+s,''+g.formatLabel(l)+""}var n,r,o,p,d,u=this,f="",c=u._valueMin(),v=u._valueMax(),h=(v-c)/u.options.step,m=u.element.find(".ui-slider-handle"),g={first:"label",last:"label",rest:"pip",labels:!1,prefix:"",suffix:"",step:h>100?Math.floor(.05*h):1,formatLabel:function(e){return this.prefix+e+this.suffix}};if("object"!==e.type(i)&&"undefined"!==e.type(i))return void("destroy"===i?s():"refresh"===i&&u.element.slider("pips",u.element.data("pips-options")));e.extend(g,i),u.element.data("pips-options",g),u.options.pipStep=Math.abs(Math.round(g.step))||1,u.element.off(".selectPip").addClass("ui-slider-pips").find(".ui-slider-pip").remove();var b={single:function(i){this.resetClasses(),d.filter(".ui-slider-pip-"+this.classLabel(i)).addClass("ui-slider-pip-selected"),u.options.range&&d.each(function(l,s){var t=e(s).children(".ui-slider-label").data("value");("min"===u.options.range&&ti)&&e(s).addClass("ui-slider-pip-inrange")})},range:function(i){for(this.resetClasses(),n=0;ni[0]&&tr&&(o=r),p&&p.length)for(t=0;tr&&(p[t]=r);if(a.element.addClass("ui-slider-float").find(".ui-slider-tip, .ui-slider-tip-label").remove(),f.handle)for(d=s(a.values()&&a.values().length?p:[o]),t=0;t'+f.formatLabel(d[t])+""));f.pips&&a.element.find(".ui-slider-label").each(function(i,l){var t,a,n=e(l),r=[n.data("value")];t=f.formatLabel(s(r)[0]),a=e(''+t+"").insertAfter(n)}),"slide"!==f.event&&"slidechange"!==f.event&&"slide slidechange"!==f.event&&"slidechange slide"!==f.event&&(f.event="slidechange slide"),a.element.off(".sliderFloat").on(f.event+".sliderFloat",function(i,l){var t="array"===e.type(l.value)?l.value:[l.value],a=f.formatLabel(s(t)[0]);e(l.handle).find(".ui-slider-tip").html(a)})}};e.extend(!0,e.ui.slider.prototype,i)}(jQuery); 4 | //# sourceMappingURL=jquery-ui-slider-pips.min.js.map 5 | -------------------------------------------------------------------------------- /source/pck_advanced_plugin.pkb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------- 2 | -- File created - Saturday-March-11-2017 3 | -------------------------------------------------------- 4 | -------------------------------------------------------- 5 | -- DDL for Package Body PCK_ADVANCED_PLUGIN 6 | -------------------------------------------------------- 7 | 8 | CREATE OR REPLACE PACKAGE BODY "PCK_ADVANCED_PLUGIN" as 9 | 10 | ------------------------------------------------------------------------------------ 11 | -- PROCEDURE p_render_item 12 | -- %usage procedure for renderin APEX Advenced Slider Plugin 13 | -- %param p_item 14 | -- %param p_plugin 15 | -- %param p_param 16 | -- %param p_result 17 | procedure p_render_item ( 18 | p_item in apex_plugin.t_item, 19 | p_plugin in apex_plugin.t_plugin, 20 | p_param in apex_plugin.t_item_render_param, 21 | p_result in out nocopy apex_plugin.t_item_render_result) 22 | AS 23 | v_css_path varchar2(200) := p_plugin.file_prefix||p_plugin.attribute_01; 24 | v_js_path varchar2(200) := p_plugin.file_prefix||p_plugin.attribute_02; 25 | v_onload_code varchar2(2000); 26 | v_name varchar2(30); 27 | v_readonly varchar2(1) := 'N'; 28 | v_file_version pls_integer := 1; 29 | BEGIN 30 | v_name := apex_plugin.get_input_name_for_page_item(false); 31 | 32 | sys.htp.prn('
'); 33 | 34 | p_result.is_navigable := true; 35 | 36 | -- add cssPCK_PLUGINS 37 | 38 | apex_css.add_file (p_name => 'jquery-ui-1.10.4.slider.min.css?v='||v_file_version 39 | , p_directory => v_css_path 40 | , p_skip_extension => true); 41 | 42 | apex_css.add_file (p_name => 'jquery-ui-slider-pips.css?v='||v_file_version 43 | , p_directory => v_css_path 44 | , p_skip_extension => true); 45 | 46 | apex_css.add_file (p_name => 'advanced.slider.1.0.0.css?v='||v_file_version 47 | , p_directory => v_css_path 48 | , p_skip_extension => true); 49 | 50 | if p_param.is_readonly then 51 | v_readonly := 'Y'; 52 | end if; 53 | 54 | -- add JS 55 | apex_javascript.add_library (p_name => 'jquery-ui-1.12.1.slider.min.js?v='||v_file_version 56 | , p_directory => v_js_path 57 | , p_skip_extension => true); 58 | 59 | apex_javascript.add_library (p_name => 'jquery-ui-slider-pips#MIN#.js?v='||v_file_version 60 | , p_directory => v_js_path 61 | , p_skip_extension => true); 62 | 63 | apex_javascript.add_library (p_name => 'advanced.slider.1.0.0#MIN#.js?v='||v_file_version 64 | , p_directory => v_js_path 65 | , p_skip_extension => true); 66 | 67 | 68 | -- onload kod 69 | v_onload_code := 'apex.jQuery("#'||p_item.name||'").advancedslider({ '|| 70 | apex_javascript.add_attribute (p_name => 'range' 71 | , p_value => p_item.attribute_01 72 | , p_add_comma => true)|| 73 | apex_javascript.add_attribute (p_name => 'sliderColor' 74 | , p_value => p_item.attribute_10 75 | , p_add_comma => true)|| 76 | apex_javascript.add_attribute (p_name => 'min' 77 | , p_value => p_item.attribute_02 78 | , p_add_comma => true)|| 79 | apex_javascript.add_attribute (p_name => 'max' 80 | , p_value => p_item.attribute_03 81 | , p_add_comma => true)|| 82 | apex_javascript.add_attribute (p_name => 'step' 83 | , p_value => p_item.attribute_07 84 | , p_add_comma => true)|| 85 | apex_javascript.add_attribute (p_name => 'showPips' 86 | , p_value => p_item.attribute_05 87 | , p_add_comma => true)|| 88 | apex_javascript.add_attribute (p_name => 'pipPrefix' 89 | , p_value => p_item.attribute_08 90 | , p_add_comma => true)|| 91 | apex_javascript.add_attribute (p_name => 'pipSufix' 92 | , p_value => p_item.attribute_09 93 | , p_add_comma => true)|| 94 | apex_javascript.add_attribute (p_name => 'showTooltips' 95 | , p_value => p_item.attribute_06 96 | , p_add_comma => true)|| 97 | apex_javascript.add_attribute (p_name => 'readonly' 98 | , p_value => v_readonly 99 | , p_add_comma => true)|| 100 | apex_javascript.add_attribute (p_name => 'pipStep' 101 | , p_value => p_item.attribute_04 102 | , p_add_comma => false) 103 | ||'})'; 104 | 105 | 106 | apex_javascript.add_onload_code (p_code => v_onload_code); 107 | -- 108 | 109 | END p_render_item; 110 | 111 | end pck_advanced_plugin; 112 | 113 | / 114 | -------------------------------------------------------------------------------- /source/pck_advanced_plugin.pks: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------- 2 | -- File created - Saturday-March-11-2017 3 | -------------------------------------------------------- 4 | -------------------------------------------------------- 5 | -- DDL for Package PCK_ADVANCED_PLUGIN 6 | -------------------------------------------------------- 7 | 8 | CREATE OR REPLACE PACKAGE "PCK_ADVANCED_PLUGIN" is 9 | 10 | -- ******** ******** ******** ******** -- 11 | -- Plugin: Advanced Slider 12 | -- Version: 1.0.0 (07.03.2017.) 13 | -- 14 | -- Author: Marko Goricki, BiLog 15 | -- Mail: mgoricki@gmail.com 16 | -- Twitter: @mgoricki 17 | -- Blog: apexbyg.blogspot.com 18 | -- ******** ******** ******** ******** -- 19 | 20 | ------------------------------------------------------------------------------------ 21 | -- PROCEDURE p_render_item 22 | -- %usage procedure for renderin APEX Advenced Slider Plugin 23 | -- %param p_item 24 | -- %param p_plugin 25 | -- %param p_param 26 | -- %param p_result 27 | procedure p_render_item ( 28 | p_item in apex_plugin.t_item, 29 | p_plugin in apex_plugin.t_plugin, 30 | p_param in apex_plugin.t_item_render_param, 31 | p_result in out nocopy apex_plugin.t_item_render_result); 32 | 33 | end pck_advanced_plugin; 34 | 35 | / 36 | --------------------------------------------------------------------------------