diff options
Diffstat (limited to 'libs/bower_components/jScrollPane')
50 files changed, 558 insertions, 194 deletions
diff --git a/libs/bower_components/jScrollPane/.bower.json b/libs/bower_components/jScrollPane/.bower.json index 0dbc55afc6..160f8a019b 100644 --- a/libs/bower_components/jScrollPane/.bower.json +++ b/libs/bower_components/jScrollPane/.bower.json @@ -1,14 +1,32 @@ { "name": "jScrollPane", + "license": [ + "MIT", + "GPL-2.0" + ], + "main": [ + "./script/jquery.mousewheel.js", + "./script/mwheelIntent.js", + "./script/jquery.jscrollpane.js", + "./script/jquery.jscrollpane.min.js", + "./style/jquery.jscrollpane.css" + ], + "dependencies": { + "jquery": "latest" + }, + "repository": { + "type": "git", + "url": "git://github.com/vitch/jScrollPane.git" + }, "homepage": "https://github.com/vitch/jScrollPane", - "version": "2.0.14", - "_release": "2.0.14", + "version": "2.0.23", + "_release": "2.0.23", "_resolution": { "type": "version", - "tag": "2.0.14", - "commit": "f4042d628a6a593462239fe5eb74a7f7d386f2a7" + "tag": "v2.0.23", + "commit": "aea0f944db041ec93a70c6d076bd79428d026001" }, - "_source": "git://github.com/vitch/jScrollPane.git", + "_source": "https://github.com/vitch/jScrollPane.git", "_target": "~2.0.0", "_originalSource": "jScrollPane" }
\ No newline at end of file diff --git a/libs/bower_components/jScrollPane/README.md b/libs/bower_components/jScrollPane/README.md index 01b3a22bc0..7aebfaa97a 100644 --- a/libs/bower_components/jScrollPane/README.md +++ b/libs/bower_components/jScrollPane/README.md @@ -1,6 +1,23 @@ -jScrollPane - cross browser custom scrollbars -============================================= +#jScrollPane - cross browser custom scrollbars jScrollPane is a [jQuery](http://www.jquery.com/) plugin which allows you to replace a browser's default scrollbars (on an element which has **overflow: auto**) with a HTML structure that can be easily skinned using CSS. -To see a bunch of examples of jScrollPane in action please visit the [jScrollPane website](http://jscrollpane.kelvinluck.com/). All of the code for the website is available from this repository so please feel free to download and use it!
\ No newline at end of file +To see a bunch of examples of jScrollPane in action please visit the [jScrollPane website](http://jscrollpane.kelvinluck.com/). All of the code for the website is available from this repository so please feel free to download and use it! + +##Contributing + +There is a simple [grunt](http://gruntjs.com) based build script which will help to produce a minified version of +jScrollPane if you make any modifications and want to submit a pull request. You can find it in the `build/` directory. + +To use it first make sure you have [node](http://nodejs.org/), npm and the `grunt-cli` module installed: + +`npm install -g grunt-cli` + +Then: + +``` +cd build +grunt +``` + +Please remember to update the changelog in the comment at the header of both JS files when submitting a pull request.
\ No newline at end of file diff --git a/libs/bower_components/jScrollPane/ajax.html b/libs/bower_components/jScrollPane/ajax.html index 4e2bf43737..006006f019 100644 --- a/libs/bower_components/jScrollPane/ajax.html +++ b/libs/bower_components/jScrollPane/ajax.html @@ -21,7 +21,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/anchors.html b/libs/bower_components/jScrollPane/anchors.html index 3605862876..327ad57667 100644 --- a/libs/bower_components/jScrollPane/anchors.html +++ b/libs/bower_components/jScrollPane/anchors.html @@ -21,7 +21,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/api.html b/libs/bower_components/jScrollPane/api.html index 403c092504..0b5b381872 100644 --- a/libs/bower_components/jScrollPane/api.html +++ b/libs/bower_components/jScrollPane/api.html @@ -9,7 +9,7 @@ <link type="text/css" href="style/demo.css" rel="stylesheet" media="all" /> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- scripts specific to this demo site --> <script type="text/javascript" src="script/demo.js"></script> </head> @@ -115,7 +115,7 @@ var api = element.data('jsp');</pre> this). animate is optional and if not passed then the value of animateScroll from the settings object this jScrollPane was initialised with is used. </p> - <h2 id="animate">animate(ele, prop, value, stepCallback)</h2> + <h2 id="animate">animate(ele, prop, value, stepCallback, completeCallback)</h2> <p> This method is called when jScrollPane is trying to animate to a new position. You can override it if you want to provide advanced animation functionality. It is passed the following arguments: @@ -125,6 +125,7 @@ var api = element.data('jsp');</pre> <li><strong>prop</strong> - the property that is being animated</li> <li><strong>value</strong> - the value it's being animated to</li> <li><strong>stepCallback</strong> - a function that you must execute each time you update the value of the property</li> + <li><strong>completeCallback</strong> - a function that will be executed after the animation had finished</li> </ul> <p> You can use the default implementation (see <a href="script/jquery.jscrollpane.js">sourcecode</a>) as a @@ -187,4 +188,4 @@ var api = element.data('jsp');</pre> </p> </div> </body> -</html>
\ No newline at end of file +</html> diff --git a/libs/bower_components/jScrollPane/arrow_hover.html b/libs/bower_components/jScrollPane/arrow_hover.html index 2231746fc2..42775c6c52 100644 --- a/libs/bower_components/jScrollPane/arrow_hover.html +++ b/libs/bower_components/jScrollPane/arrow_hover.html @@ -26,7 +26,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/arrow_positions.html b/libs/bower_components/jScrollPane/arrow_positions.html index e1f486459a..bc3acf9eae 100644 --- a/libs/bower_components/jScrollPane/arrow_positions.html +++ b/libs/bower_components/jScrollPane/arrow_positions.html @@ -29,7 +29,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/arrows.html b/libs/bower_components/jScrollPane/arrows.html index 755183d801..7b667ab24e 100644 --- a/libs/bower_components/jScrollPane/arrows.html +++ b/libs/bower_components/jScrollPane/arrows.html @@ -26,7 +26,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/auto_reinitialise.html b/libs/bower_components/jScrollPane/auto_reinitialise.html index b11669ddda..7e1bbd7a17 100644 --- a/libs/bower_components/jScrollPane/auto_reinitialise.html +++ b/libs/bower_components/jScrollPane/auto_reinitialise.html @@ -21,7 +21,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/basic.html b/libs/bower_components/jScrollPane/basic.html index faa9b39664..79e0d7723e 100644 --- a/libs/bower_components/jScrollPane/basic.html +++ b/libs/bower_components/jScrollPane/basic.html @@ -26,7 +26,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/bower.json b/libs/bower_components/jScrollPane/bower.json new file mode 100644 index 0000000000..4f95e89f1d --- /dev/null +++ b/libs/bower_components/jScrollPane/bower.json @@ -0,0 +1,21 @@ +{ + "name": "jScrollPane", + "license": [ + "MIT", + "GPL-2.0" + ], + "main": [ + "./script/jquery.mousewheel.js", + "./script/mwheelIntent.js", + "./script/jquery.jscrollpane.js", + "./script/jquery.jscrollpane.min.js", + "./style/jquery.jscrollpane.css" + ], + "dependencies": { + "jquery": "latest" + }, + "repository": { + "type": "git", + "url": "git://github.com/vitch/jScrollPane.git" + } +} diff --git a/libs/bower_components/jScrollPane/build/.gitignore b/libs/bower_components/jScrollPane/build/.gitignore new file mode 100644 index 0000000000..b512c09d47 --- /dev/null +++ b/libs/bower_components/jScrollPane/build/.gitignore @@ -0,0 +1 @@ +node_modules
\ No newline at end of file diff --git a/libs/bower_components/jScrollPane/build/Gruntfile.js b/libs/bower_components/jScrollPane/build/Gruntfile.js new file mode 100644 index 0000000000..c48aba2f70 --- /dev/null +++ b/libs/bower_components/jScrollPane/build/Gruntfile.js @@ -0,0 +1,49 @@ +/* + * jScrollPane build script + * http://jscrollpane.kelvinluck.com/ + * + * Copyright (c) 2013 Kelvin Luck + * Licensed under the MIT license. + */ + +'use strict'; + +module.exports = function(grunt) { + + // Project configuration. + grunt.initConfig({ + + uglify: { + jsp: { + files: { + '../script/jquery.jscrollpane.min.js': '../script/jquery.jscrollpane.js' + }, + options: { + preserveComments: 'some' + } + } + }, + watch: { + content: { + files: ['../script/jquery.jscrollpane.js'], + tasks: 'uglify' + } + }, + connect: { + site: { + options: { + base: '../' + } + } + } + + }); + + grunt.loadNpmTasks('grunt-contrib-connect'); + grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + + grunt.registerTask('default', ['uglify']); + grunt.registerTask('serve', ['uglify', 'connect', 'watch']); + +}; diff --git a/libs/bower_components/jScrollPane/build/package.json b/libs/bower_components/jScrollPane/build/package.json new file mode 100644 index 0000000000..781719b1d6 --- /dev/null +++ b/libs/bower_components/jScrollPane/build/package.json @@ -0,0 +1,30 @@ +{ + "name": "jScrollPane-build", + "description": "Keep track of what you spend", + "version": "0.1.0", + "homepage": "http://jscrollpane.kelvinluck.com", + "author": { + "name": "Kelvin Luck", + "email": "git+jsp@kelvinluck.com" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/haggerstonjs/blob/master/LICENSE-MIT" + } + ], + "main": "Gruntfile.js", + "engines": { + "node": ">= 0.8.0" + }, + "dependencies": { + "grunt": "~0.4.1", + "grunt-contrib-uglify": "~0.2.0" + }, + "devDependencies": { + "grunt-contrib-connect": "~0.2.0", + "grunt-contrib-watch": "~0.2.0" + }, + "peerDependencies": {}, + "keywords": [] +} diff --git a/libs/bower_components/jScrollPane/caps.html b/libs/bower_components/jScrollPane/caps.html index 32ff8f12f1..065e77970d 100644 --- a/libs/bower_components/jScrollPane/caps.html +++ b/libs/bower_components/jScrollPane/caps.html @@ -37,7 +37,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/changelog.html b/libs/bower_components/jScrollPane/changelog.html index cded13a704..e5818a15eb 100644 --- a/libs/bower_components/jScrollPane/changelog.html +++ b/libs/bower_components/jScrollPane/changelog.html @@ -11,7 +11,7 @@ <link type="text/css" href="style/jquery.jscrollpane.css" rel="stylesheet" media="all" /> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/destroy.html b/libs/bower_components/jScrollPane/destroy.html index 496259154c..f98ae3f1d4 100644 --- a/libs/bower_components/jScrollPane/destroy.html +++ b/libs/bower_components/jScrollPane/destroy.html @@ -26,7 +26,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/drag_size.html b/libs/bower_components/jScrollPane/drag_size.html index de2dd216bd..1b084c4c87 100644 --- a/libs/bower_components/jScrollPane/drag_size.html +++ b/libs/bower_components/jScrollPane/drag_size.html @@ -21,7 +21,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/dynamic_content.html b/libs/bower_components/jScrollPane/dynamic_content.html index ad035b5353..4e476e6883 100644 --- a/libs/bower_components/jScrollPane/dynamic_content.html +++ b/libs/bower_components/jScrollPane/dynamic_content.html @@ -21,7 +21,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/dynamic_height.html b/libs/bower_components/jScrollPane/dynamic_height.html index fdfc01bb39..6b05550b88 100644 --- a/libs/bower_components/jScrollPane/dynamic_height.html +++ b/libs/bower_components/jScrollPane/dynamic_height.html @@ -34,7 +34,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> @@ -59,22 +59,18 @@ 'resize', function() { - if ($.browser.msie) { - // IE fires multiple resize events while you are dragging the browser window which - // causes it to crash if you try to update the scrollpane on every one. So we need - // to throttle it to fire a maximum of once every 50 milliseconds... - if (!throttleTimeout) { - throttleTimeout = setTimeout( - function() - { - api.reinitialise(); - throttleTimeout = null; - }, - 50 - ); - } - } else { - api.reinitialise(); + // IE fires multiple resize events while you are dragging the browser window which + // causes it to crash if you try to update the scrollpane on every one. So we need + // to throttle it to fire a maximum of once every 50 milliseconds... + if (!throttleTimeout) { + throttleTimeout = setTimeout( + function() + { + api.reinitialise(); + throttleTimeout = null; + }, + 50 + ); } } ); diff --git a/libs/bower_components/jScrollPane/dynamic_width.html b/libs/bower_components/jScrollPane/dynamic_width.html index 0a8949c289..90e5fdc085 100644 --- a/libs/bower_components/jScrollPane/dynamic_width.html +++ b/libs/bower_components/jScrollPane/dynamic_width.html @@ -35,7 +35,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> @@ -60,22 +60,15 @@ 'resize', function() { - if ($.browser.msie) { - // IE fires multiple resize events while you are dragging the browser window which - // causes it to crash if you try to update the scrollpane on every one. So we need - // to throttle it to fire a maximum of once every 50 milliseconds... - if (!throttleTimeout) { - throttleTimeout = setTimeout( - function() - { - api.reinitialise(); - throttleTimeout = null; - }, - 50 - ); - } - } else { - api.reinitialise(); + if (!throttleTimeout) { + throttleTimeout = setTimeout( + function() + { + api.reinitialise(); + throttleTimeout = null; + }, + 50 + ); } } ); diff --git a/libs/bower_components/jScrollPane/events.html b/libs/bower_components/jScrollPane/events.html index a782ec9faa..235bab7ee5 100644 --- a/libs/bower_components/jScrollPane/events.html +++ b/libs/bower_components/jScrollPane/events.html @@ -26,7 +26,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> @@ -47,6 +47,26 @@ } ) .bind( + 'jsp-will-scroll-x', + function(event, destX) + { + console.log( + 'Handle jsp-will-scroll-x', this, + 'destX=', destX + ); + } + ) + .bind( + 'jsp-will-scroll-y', + function(event, destY) + { + console.log( + 'Handle jsp-will-scroll-y', this, + 'destY=', destY + ); + } + ) + .bind( 'jsp-scroll-y', function(event, scrollPositionY, isAtTop, isAtBottom) { @@ -77,6 +97,30 @@ 'isAtRight=', isAtRight); } ) + .bind( + 'jsp-user-scroll-y', + function(event, destTop, isAtTop, isAtBottom) + { + console.log( + 'Handle jsp-user-scroll-y', this, + 'destTop=', destTop, + 'isAtTop=', isAtTop, + 'isAtBottom=', isAtBottom + ); + } + ) + .bind( + 'jsp-user-scroll-x', + function(event, destLeft, isAtLeft, isAtRight) + { + console.log( + 'Handle jsp-user-scroll-x', this, + 'destLeft=', destLeft, + 'isAtLeft=', isAtLeft, + 'isAtRight=', isAtRight + ); + } + ) .jScrollPane(); }); </script> @@ -123,6 +167,22 @@ the viewport). Note that this function isn't dependant on having <a href="settings.html#showArrows"> showArrows</a> set to true, indeed it is most useful when implementing your own arrow keys. </li> + <li> + <strong>jsp-user-scroll-y [event, -destTop, isAtTop, isAtBottom]</strong> - Fires only when the + scroll is caused by the user. Also, its fired after the actual scroll had happened. + </li> + <li> + <strong>jsp-user-scroll-x [event, -destLeft, isAtLeft, isAtRight]</strong> - Fires only when the + scroll is caused by the user. Also, its fired after the actual scroll had happened. + </li> + <li> + <strong>jsp-will-scroll-y [event, destY]</strong> - Fired before the actual scroll had happened. + This can be used to disable the scroll functionality if the event.preventDefault() is called. + </li> + <li> + <strong>jsp-will-scroll-x [event, destX]</strong> - Fired before the actual scroll had happened. + This can be used to disable the scroll functionality if the event.preventDefault() is called. + </li> </ul> <h2>Vertical only</h2> diff --git a/libs/bower_components/jScrollPane/faqs.html b/libs/bower_components/jScrollPane/faqs.html index 7411c2d2ba..70cd8c1e2b 100644 --- a/libs/bower_components/jScrollPane/faqs.html +++ b/libs/bower_components/jScrollPane/faqs.html @@ -9,7 +9,7 @@ <link type="text/css" href="style/demo.css" rel="stylesheet" media="all" /> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- scripts specific to this demo site --> <script type="text/javascript" src="script/demo.js"></script> </head> diff --git a/libs/bower_components/jScrollPane/fixed_width.html b/libs/bower_components/jScrollPane/fixed_width.html index 5b619d723b..23aafe8661 100644 --- a/libs/bower_components/jScrollPane/fixed_width.html +++ b/libs/bower_components/jScrollPane/fixed_width.html @@ -32,7 +32,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/focus.html b/libs/bower_components/jScrollPane/focus.html index e97ed7f27d..ae38d46d00 100644 --- a/libs/bower_components/jScrollPane/focus.html +++ b/libs/bower_components/jScrollPane/focus.html @@ -21,7 +21,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/fullpage_scroll.html b/libs/bower_components/jScrollPane/fullpage_scroll.html index 8219a8bd67..996f5e874b 100644 --- a/libs/bower_components/jScrollPane/fullpage_scroll.html +++ b/libs/bower_components/jScrollPane/fullpage_scroll.html @@ -34,7 +34,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/iframe.html b/libs/bower_components/jScrollPane/iframe.html index a0d940ab72..6e58671f4e 100644 --- a/libs/bower_components/jScrollPane/iframe.html +++ b/libs/bower_components/jScrollPane/iframe.html @@ -20,7 +20,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/iframe2.html b/libs/bower_components/jScrollPane/iframe2.html index 21398c332d..07d4c92fa1 100644 --- a/libs/bower_components/jScrollPane/iframe2.html +++ b/libs/bower_components/jScrollPane/iframe2.html @@ -26,7 +26,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/iframe_content1.html b/libs/bower_components/jScrollPane/iframe_content1.html index 74e95f221f..f0d42f6723 100644 --- a/libs/bower_components/jScrollPane/iframe_content1.html +++ b/libs/bower_components/jScrollPane/iframe_content1.html @@ -24,7 +24,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/iframe_content2.html b/libs/bower_components/jScrollPane/iframe_content2.html index c6b43766e1..2059b4f2e6 100644 --- a/libs/bower_components/jScrollPane/iframe_content2.html +++ b/libs/bower_components/jScrollPane/iframe_content2.html @@ -24,7 +24,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/image.html b/libs/bower_components/jScrollPane/image.html index 05e64ccf31..9c9055e64b 100644 --- a/libs/bower_components/jScrollPane/image.html +++ b/libs/bower_components/jScrollPane/image.html @@ -26,7 +26,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/image2.html b/libs/bower_components/jScrollPane/image2.html index a2c4df1f13..476eaa51df 100644 --- a/libs/bower_components/jScrollPane/image2.html +++ b/libs/bower_components/jScrollPane/image2.html @@ -38,7 +38,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/index.html b/libs/bower_components/jScrollPane/index.html index 81775e580e..be39c07e46 100644 --- a/libs/bower_components/jScrollPane/index.html +++ b/libs/bower_components/jScrollPane/index.html @@ -11,7 +11,7 @@ <link type="text/css" href="style/jquery.jscrollpane.css" rel="stylesheet" media="all" /> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> @@ -59,7 +59,7 @@ <link type="text/css" href="style/jquery.jscrollpane.css" rel="stylesheet" media="all" /> <!-- latest jQuery direct from google's CDN --> -<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"> +<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> </script> <!-- the mousewheel plugin - optional to provide mousewheel support --> @@ -223,6 +223,10 @@ <a href="events.html">Demo</a> showing the events that are dispatched by an element you apply jScrollPane to. </li> + <li> + <a href="https://github.com/bodrovis/jscrollpane-rails/">jscrollpane-rails</a> makes integrating jScrollPane + with Rails apps easier. + </li> </ul> <h2 id="themes">Themes</h2> diff --git a/libs/bower_components/jScrollPane/invisibles.html b/libs/bower_components/jScrollPane/invisibles.html index c006b687e9..33eabf6e00 100644 --- a/libs/bower_components/jScrollPane/invisibles.html +++ b/libs/bower_components/jScrollPane/invisibles.html @@ -54,7 +54,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/known_issues.html b/libs/bower_components/jScrollPane/known_issues.html index 4879af3dde..1d962fafda 100644 --- a/libs/bower_components/jScrollPane/known_issues.html +++ b/libs/bower_components/jScrollPane/known_issues.html @@ -9,7 +9,7 @@ <link type="text/css" href="style/demo.css" rel="stylesheet" media="all" /> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- scripts specific to this demo site --> <script type="text/javascript" src="script/demo.js"></script> </head> diff --git a/libs/bower_components/jScrollPane/less_basic.html b/libs/bower_components/jScrollPane/less_basic.html index 74ecee9084..db76f0201d 100644 --- a/libs/bower_components/jScrollPane/less_basic.html +++ b/libs/bower_components/jScrollPane/less_basic.html @@ -21,7 +21,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/mwheel_intent.html b/libs/bower_components/jScrollPane/mwheel_intent.html index 821f83bb99..c674cf14e7 100644 --- a/libs/bower_components/jScrollPane/mwheel_intent.html +++ b/libs/bower_components/jScrollPane/mwheel_intent.html @@ -26,7 +26,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the mwheelIntent plugin --> diff --git a/libs/bower_components/jScrollPane/override_animate.html b/libs/bower_components/jScrollPane/override_animate.html index 32275155b9..448e898cff 100644 --- a/libs/bower_components/jScrollPane/override_animate.html +++ b/libs/bower_components/jScrollPane/override_animate.html @@ -34,7 +34,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/runeimp.html b/libs/bower_components/jScrollPane/runeimp.html index 90010f3b01..394f4049bf 100644 --- a/libs/bower_components/jScrollPane/runeimp.html +++ b/libs/bower_components/jScrollPane/runeimp.html @@ -29,7 +29,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/runeimp2.html b/libs/bower_components/jScrollPane/runeimp2.html index c1a420720f..afe5fd01c4 100644 --- a/libs/bower_components/jScrollPane/runeimp2.html +++ b/libs/bower_components/jScrollPane/runeimp2.html @@ -34,7 +34,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/script/demo.js b/libs/bower_components/jScrollPane/script/demo.js index de2efdb51d..a93122f54e 100644 --- a/libs/bower_components/jScrollPane/script/demo.js +++ b/libs/bower_components/jScrollPane/script/demo.js @@ -42,7 +42,7 @@ if (window.location.hostname == 'jscrollpane.kelvinluck.com') { ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); -} else if(window.location.protocol == 'file:') { +} else if(window.location.protocol == 'file:' || window.location.hostname == 'localhost') { // Allow local testing without annoying alerts } else { alert('Do not include demo.js on your site!'); diff --git a/libs/bower_components/jScrollPane/script/jquery.jscrollpane.js b/libs/bower_components/jScrollPane/script/jquery.jscrollpane.js index 9bc41f914e..6db96c7afc 100644 --- a/libs/bower_components/jScrollPane/script/jquery.jscrollpane.js +++ b/libs/bower_components/jScrollPane/script/jquery.jscrollpane.js @@ -1,14 +1,14 @@ /*! - * jScrollPane - v2.0.14 - 2013-05-01 + * jScrollPane - v2.0.23 - 2016-01-28 * http://jscrollpane.kelvinluck.com/ * - * Copyright (c) 2010 Kelvin Luck + * Copyright (c) 2014 Kelvin Luck * Dual licensed under the MIT or GPL licenses. */ // Script: jScrollPane - cross browser customisable scrollbars // -// *Version: 2.0.14, Last updated: 2013-05-01* +// *Version: 2.0.23, Last updated: 2016-01-28* // // Project Home - http://jscrollpane.kelvinluck.com/ // GitHub - http://github.com/vitch/jScrollPane @@ -17,7 +17,7 @@ // // About: License // -// Copyright (c) 2013 Kelvin Luck +// Copyright (c) 2014 Kelvin Luck // Dual licensed under the MIT or GPL Version 2 licenses. // http://jscrollpane.kelvinluck.com/MIT-LICENSE.txt // http://jscrollpane.kelvinluck.com/GPL-LICENSE.txt @@ -32,13 +32,22 @@ // This plugin is tested on the browsers below and has been found to work reliably on them. If you run // into a problem on one of the supported browsers then please visit the support section on the jScrollPane // website (http://jscrollpane.kelvinluck.com/) for more information on getting support. You are also -// welcome to fork the project on GitHub if you can contribute a fix for a given issue. +// welcome to fork the project on GitHub if you can contribute a fix for a given issue. // // jQuery Versions - tested in 1.4.2+ - reported to work in 1.3.x // Browsers Tested - Firefox 3.6.8, Safari 5, Opera 10.6, Chrome 5.0, IE 6, 7, 8 // // About: Release History // +// 2.0.23 - (2016-01-28) Various +// 2.0.22 - (2015-04-25) Resolve a memory leak due to an event handler that isn't cleaned up in destroy (thanks @timjnh) +// 2.0.21 - (2015-02-24) Simplify UMD pattern: fixes browserify when loading jQuery outside of bundle +// 2.0.20 - (2014-10-23) Adds AMD support (thanks @carlosrberto) and support for overflow-x/overflow-y (thanks @darimpulso) +// 2.0.19 - (2013-11-16) Changes for more reliable scroll amount with latest mousewheel plugin (thanks @brandonaaron) +// 2.0.18 - (2013-10-23) Fix for issue with gutters and scrollToElement (thanks @Dubiy) +// 2.0.17 - (2013-08-17) Working correctly when box-sizing is set to border-box (thanks @pieht) +// 2.0.16 - (2013-07-30) Resetting left position when scroll is removed. Fixes #189 +// 2.0.15 - (2013-07-29) Fixed issue with scrollToElement where the destX and destY are undefined. // 2.0.14 - (2013-05-01) Updated to most recent mouse wheel plugin (see #106) and related changes for sensible scroll speed // 2.0.13 - (2013-05-01) Switched to semver compatible version name // 2.0.0beta12 - (2012-09-27) fix for jQuery 1.8+ @@ -56,7 +65,18 @@ // elements and dynamically sized elements. // 1.x - (2006-12-31 - 2010-07-31) Initial version, hosted at googlecode, deprecated -(function($,window,undefined){ +(function (factory) { + if ( typeof define === 'function' && define.amd ) { + // AMD. Register as an anonymous module. + define(['jquery'], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS style for Browserify + module.exports = factory(require('jquery')); + } else { + // Browser globals + factory(jQuery); + } +}(function($){ $.fn.jScrollPane = function(settings) { @@ -73,12 +93,17 @@ originalElement = elem.clone(false, false).empty(), mwEvent = $.fn.mwheelIntent ? 'mwheelIntent.jsp' : 'mousewheel.jsp'; - originalPadding = elem.css('paddingTop') + ' ' + - elem.css('paddingRight') + ' ' + - elem.css('paddingBottom') + ' ' + - elem.css('paddingLeft'); - originalPaddingTotalWidth = (parseInt(elem.css('paddingLeft'), 10) || 0) + - (parseInt(elem.css('paddingRight'), 10) || 0); + if (elem.css('box-sizing') === 'border-box') { + originalPadding = 0; + originalPaddingTotalWidth = 0; + } else { + originalPadding = elem.css('paddingTop') + ' ' + + elem.css('paddingRight') + ' ' + + elem.css('paddingBottom') + ' ' + + elem.css('paddingLeft'); + originalPaddingTotalWidth = (parseInt(elem.css('paddingLeft'), 10) || 0) + + (parseInt(elem.css('paddingRight'), 10) || 0); + } function initialise(s) { @@ -105,7 +130,7 @@ paneHeight = elem.innerHeight(); elem.width(paneWidth); - + pane = $('<div class="jspPane" />').css('padding', originalPadding).append(elem.children()); container = $('<div class="jspContainer" />') .css({ @@ -116,7 +141,7 @@ /* // Move any margins from the first and last children up to the container so they can still - // collapse with neighbouring elements as they would before jScrollPane + // collapse with neighbouring elements as they would before jScrollPane firstChild = pane.find(':first-child'); lastChild = pane.find(':last-child'); elem.css( @@ -151,7 +176,7 @@ return; } previousContentWidth = contentWidth; - + pane.css('width', ''); elem.width(paneWidth); @@ -178,7 +203,8 @@ if (!(isScrollableH || isScrollableV)) { elem.removeClass('jspScrollable'); pane.css({ - top: 0, + top: 0, + left: 0, width: container.width() - originalPaddingTotalWidth }); removeMousewheel(); @@ -206,14 +232,14 @@ initFocusHandler(); initMousewheel(); initTouch(); - + if (settings.enableKeyboardNavigation) { initKeyboardNav(); } if (settings.clickOnTrack) { initClickOnTrack(); } - + observeHash(); if (settings.hijackInternalLinks) { hijackInternalLinks(); @@ -474,7 +500,7 @@ function appendArrows(ele, p, a1, a2) { var p1 = "before", p2 = "after", aTemp; - + // Sniff for mac... Is there a better way to determine whether the arrows would naturally appear // at the top or the bottom of the bar? if (p == "os") { @@ -589,7 +615,7 @@ } ); } - + if (isScrollableH) { horizontalTrack.bind( 'mousedown.jsp', @@ -674,15 +700,33 @@ destY = dragMaxY; } + // allow for devs to prevent the JSP from being scrolled + var willScrollYEvent = new $.Event("jsp-will-scroll-y"); + elem.trigger(willScrollYEvent, [destY]); + + if (willScrollYEvent.isDefaultPrevented()) { + return; + } + + var tmpVerticalDragPosition = destY || 0; + + var isAtTop = tmpVerticalDragPosition === 0, + isAtBottom = tmpVerticalDragPosition == dragMaxY, + percentScrolled = destY/ dragMaxY, + destTop = -percentScrolled * (contentHeight - paneHeight); + // can't just check if(animate) because false is a valid value that could be passed in... if (animate === undefined) { animate = settings.animateScroll; } if (animate) { - jsp.animate(verticalDrag, 'top', destY, _positionDragY); + jsp.animate(verticalDrag, 'top', destY, _positionDragY, function() { + elem.trigger('jsp-user-scroll-y', [-destTop, isAtTop, isAtBottom]); + }); } else { verticalDrag.css('top', destY); _positionDragY(destY); + elem.trigger('jsp-user-scroll-y', [-destTop, isAtTop, isAtBottom]); } } @@ -694,7 +738,7 @@ } container.scrollTop(0); - verticalDragPosition = destY; + verticalDragPosition = destY || 0; var isAtTop = verticalDragPosition === 0, isAtBottom = verticalDragPosition == dragMaxY, @@ -706,7 +750,7 @@ wasAtBottom = isAtBottom; elem.trigger('jsp-arrow-change', [wasAtTop, wasAtBottom, wasAtLeft, wasAtRight]); } - + updateVerticalArrows(isAtTop, isAtBottom); pane.css('top', destTop); elem.trigger('jsp-scroll-y', [-destTop, isAtTop, isAtBottom]).trigger('scroll'); @@ -723,14 +767,33 @@ destX = dragMaxX; } + + // allow for devs to prevent the JSP from being scrolled + var willScrollXEvent = new $.Event("jsp-will-scroll-x"); + elem.trigger(willScrollXEvent, [destX]); + + if (willScrollXEvent.isDefaultPrevented()) { + return; + } + + var tmpHorizontalDragPosition = destX ||0; + + var isAtLeft = tmpHorizontalDragPosition === 0, + isAtRight = tmpHorizontalDragPosition == dragMaxX, + percentScrolled = destX / dragMaxX, + destLeft = -percentScrolled * (contentWidth - paneWidth); + if (animate === undefined) { animate = settings.animateScroll; } if (animate) { - jsp.animate(horizontalDrag, 'left', destX, _positionDragX); + jsp.animate(horizontalDrag, 'left', destX, _positionDragX, function() { + elem.trigger('jsp-user-scroll-x', [-destLeft, isAtLeft, isAtRight]); + }); } else { horizontalDrag.css('left', destX); _positionDragX(destX); + elem.trigger('jsp-user-scroll-x', [-destLeft, isAtLeft, isAtRight]); } } @@ -741,7 +804,7 @@ } container.scrollTop(0); - horizontalDragPosition = destX; + horizontalDragPosition = destX ||0; var isAtLeft = horizontalDragPosition === 0, isAtRight = horizontalDragPosition == dragMaxX, @@ -753,7 +816,7 @@ wasAtRight = isAtRight; elem.trigger('jsp-arrow-change', [wasAtTop, wasAtBottom, wasAtLeft, wasAtRight]); } - + updateHorizontalArrows(isAtLeft, isAtRight); pane.css('left', destLeft); elem.trigger('jsp-scroll-x', [-destLeft, isAtLeft, isAtRight]).trigger('scroll'); @@ -803,7 +866,7 @@ container.scrollTop(0); container.scrollLeft(0); - + // loop through parents adding the offset top of any elements that are relatively positioned between // the focused element and the jspPane so we can get the true distance from the top // of the focused element to the top of the scrollpane... @@ -820,14 +883,14 @@ viewportTop = contentPositionY(); maxVisibleEleTop = viewportTop + paneHeight; if (eleTop < viewportTop || stickToTop) { // element is above viewport - destY = eleTop - settings.verticalGutter; + destY = eleTop - settings.horizontalGutter; } else if (eleTop + eleHeight > maxVisibleEleTop) { // element is below viewport - destY = eleTop - paneHeight + eleHeight + settings.verticalGutter; + destY = eleTop - paneHeight + eleHeight + settings.horizontalGutter; } - if (destY) { + if (!isNaN(destY)) { scrollToY(destY, animate); } - + viewportLeft = contentPositionX(); maxVisibleEleLeft = viewportLeft + paneWidth; if (eleLeft < viewportLeft || stickToTop) { // element is to the left of viewport @@ -835,7 +898,7 @@ } else if (eleLeft + eleWidth > maxVisibleEleLeft) { // element is to the right viewport destX = eleLeft - paneWidth + eleWidth + settings.horizontalGutter; } - if (destX) { + if (!isNaN(destX)) { scrollToX(destX, animate); } @@ -868,8 +931,12 @@ container.unbind(mwEvent).bind( mwEvent, function (event, delta, deltaX, deltaY) { - var dX = horizontalDragPosition, dY = verticalDragPosition; - jsp.scrollBy(deltaX * settings.mouseWheelSpeed, -deltaY * settings.mouseWheelSpeed, false); + + if (!horizontalDragPosition) horizontalDragPosition = 0; + if (!verticalDragPosition) verticalDragPosition = 0; + + var dX = horizontalDragPosition, dY = verticalDragPosition, factor = event.deltaFactor || settings.mouseWheelSpeed; + jsp.scrollBy(deltaX * factor, -deltaY * factor, false); // return true if there was no movement so rest of screen can scroll return dX == horizontalDragPosition && dY == verticalDragPosition; } @@ -901,21 +968,22 @@ { pane.find(':input,a').unbind('focus.jsp'); } - + function initKeyboardNav() { var keyDown, elementHasScrolled, validParents = []; isScrollableH && validParents.push(horizontalBar[0]); isScrollableV && validParents.push(verticalBar[0]); - + // IE also focuses elements that don't have tabindex set. - pane.focus( + pane.bind( + 'focus.jsp', function() { elem.focus(); } ); - + elem.attr('tabindex', 0) .unbind('keydown.jsp keypress.jsp') .bind( @@ -957,10 +1025,14 @@ if (e.keyCode == keyDown) { keyDownHandler(); } + // If the keypress is not related to the area, ignore it. Fixes problem with inputs inside scrolled area. Copied from line 955. + if (e.target !== this && !(validParents.length && $(e.target).closest(validParents).length)){ + return; + } return !elementHasScrolled; } ); - + if (settings.hideFocus) { elem.css('outline', 'none'); if ('hideFocus' in container[0]){ @@ -972,7 +1044,7 @@ elem.attr('hideFocus', false); } } - + function keyDownHandler() { var dX = horizontalDragPosition, dY = verticalDragPosition; @@ -1002,12 +1074,14 @@ return elementHasScrolled; } } - + function removeKeyboardNav() { elem.attr('tabindex', '-1') .removeAttr('tabindex') .unbind('keydown.jsp keypress.jsp'); + + pane.unbind('.jsp'); } function observeHash() @@ -1057,7 +1131,7 @@ $(document.body).data('jspHijack', true); // use live handler to also capture newly created links - $(document.body).delegate('a[href*=#]', 'click', function(event) { + $(document.body).delegate('a[href*="#"]', 'click', function(event) { // does the link point to the same page? // this also takes care of cases with a <base>-Tag or Links not starting with the hash # // e.g. <a href="index.html#test"> when the current url already is index.html @@ -1114,7 +1188,7 @@ event.preventDefault(); }); } - + // Init touch on iPad, iPhone, iPod, Android function initTouch() { @@ -1124,7 +1198,7 @@ touchStartY, moved, moving = false; - + container.unbind('touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick').bind( 'touchstart.jsp', function(e) @@ -1144,14 +1218,14 @@ if(!moving) { return; } - + var touchPos = ev.originalEvent.touches[0], dX = horizontalDragPosition, dY = verticalDragPosition; - + jsp.scrollTo(startX + touchStartX - touchPos.pageX, startY + touchStartY - touchPos.pageY); - + moved = moved || Math.abs(touchStartX - touchPos.pageX) > 5 || Math.abs(touchStartY - touchPos.pageY) > 5; - + // return true if there was no movement so rest of screen can scroll return dX == horizontalDragPosition && dY == verticalDragPosition; } @@ -1175,11 +1249,12 @@ } ); } - + function destroy(){ var currentY = contentPositionY(), currentX = contentPositionX(); elem.removeClass('jspScrollable').unbind('.jsp'); + pane.unbind('.jsp'); elem.replaceWith(originalElement.append(pane.children())); originalElement.scrollTop(currentY); originalElement.scrollLeft(currentX); @@ -1291,8 +1366,9 @@ // * prop - the property that is being animated // * value - the value it's being animated to // * stepCallback - a function that you must execute each time you update the value of the property + // * completeCallback - a function that will be executed after the animation had finished // You can use the default implementation (below) as a starting point for your own implementation. - animate: function(ele, prop, value, stepCallback) + animate: function(ele, prop, value, stepCallback, completeCallback) { var params = {}; params[prop] = value; @@ -1302,7 +1378,8 @@ 'duration' : settings.animateDuration, 'easing' : settings.animateEase, 'queue' : false, - 'step' : stepCallback + 'step' : stepCallback, + 'complete' : completeCallback } ); }, @@ -1372,13 +1449,13 @@ } } ); - + initialise(s); } // Pluginifying code... settings = $.extend({}, $.fn.jScrollPane.defaults, settings); - + // Apply default speed $.each(['arrowButtonSpeed', 'trackClickSpeed', 'keyboardSpeed'], function() { settings[this] = settings[this] || settings.speed; @@ -1434,5 +1511,4 @@ scrollPagePercent : .8 // Percent of visible area scrolled when pageUp/Down or track area pressed }; -})(jQuery,this); - +})); diff --git a/libs/bower_components/jScrollPane/script/jquery.jscrollpane.min.js b/libs/bower_components/jScrollPane/script/jquery.jscrollpane.min.js index d7d9cae764..71e94c50c8 100644 --- a/libs/bower_components/jScrollPane/script/jquery.jscrollpane.min.js +++ b/libs/bower_components/jScrollPane/script/jquery.jscrollpane.min.js @@ -1,11 +1,8 @@ /*! - * jScrollPane - v2.0.14 - 2013-05-01 + * jScrollPane - v2.0.23 - 2016-01-28 * http://jscrollpane.kelvinluck.com/ * - * Copyright (c) 2010 Kelvin Luck + * Copyright (c) 2014 Kelvin Luck * Dual licensed under the MIT or GPL licenses. */ -(function(b,a,c){b.fn.jScrollPane=function(e){function d(D,O){var ay,Q=this,Y,aj,v,al,T,Z,y,q,az,aE,au,i,I,h,j,aa,U,ap,X,t,A,aq,af,am,G,l,at,ax,x,av,aH,f,L,ai=true,P=true,aG=false,k=false,ao=D.clone(false,false).empty(),ac=b.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";aH=D.css("paddingTop")+" "+D.css("paddingRight")+" "+D.css("paddingBottom")+" "+D.css("paddingLeft");f=(parseInt(D.css("paddingLeft"),10)||0)+(parseInt(D.css("paddingRight"),10)||0);function ar(aQ){var aL,aN,aM,aJ,aI,aP,aO=false,aK=false;ay=aQ;if(Y===c){aI=D.scrollTop();aP=D.scrollLeft();D.css({overflow:"hidden",padding:0});aj=D.innerWidth()+f;v=D.innerHeight();D.width(aj);Y=b('<div class="jspPane" />').css("padding",aH).append(D.children());al=b('<div class="jspContainer" />').css({width:aj+"px",height:v+"px"}).append(Y).appendTo(D)}else{D.css("width","");aO=ay.stickToBottom&&K();aK=ay.stickToRight&&B();aJ=D.innerWidth()+f!=aj||D.outerHeight()!=v;if(aJ){aj=D.innerWidth()+f;v=D.innerHeight();al.css({width:aj+"px",height:v+"px"})}if(!aJ&&L==T&&Y.outerHeight()==Z){D.width(aj);return}L=T;Y.css("width","");D.width(aj);al.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}Y.css("overflow","auto");if(aQ.contentWidth){T=aQ.contentWidth}else{T=Y[0].scrollWidth}Z=Y[0].scrollHeight;Y.css("overflow","");y=T/aj;q=Z/v;az=q>1;aE=y>1;if(!(aE||az)){D.removeClass("jspScrollable");Y.css({top:0,width:al.width()-f});n();E();R();w()}else{D.addClass("jspScrollable");aL=ay.maintainPosition&&(I||aa);if(aL){aN=aC();aM=aA()}aF();z();F();if(aL){N(aK?(T-aj):aN,false);M(aO?(Z-v):aM,false)}J();ag();an();if(ay.enableKeyboardNavigation){S()}if(ay.clickOnTrack){p()}C();if(ay.hijackInternalLinks){m()}}if(ay.autoReinitialise&&!av){av=setInterval(function(){ar(ay)},ay.autoReinitialiseDelay)}else{if(!ay.autoReinitialise&&av){clearInterval(av)}}aI&&D.scrollTop(0)&&M(aI,false);aP&&D.scrollLeft(0)&&N(aP,false);D.trigger("jsp-initialised",[aE||az])}function aF(){if(az){al.append(b('<div class="jspVerticalBar" />').append(b('<div class="jspCap jspCapTop" />'),b('<div class="jspTrack" />').append(b('<div class="jspDrag" />').append(b('<div class="jspDragTop" />'),b('<div class="jspDragBottom" />'))),b('<div class="jspCap jspCapBottom" />')));U=al.find(">.jspVerticalBar");ap=U.find(">.jspTrack");au=ap.find(">.jspDrag");if(ay.showArrows){aq=b('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp",aD(0,-1)).bind("click.jsp",aB);af=b('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp",aD(0,1)).bind("click.jsp",aB);if(ay.arrowScrollOnHover){aq.bind("mouseover.jsp",aD(0,-1,aq));af.bind("mouseover.jsp",aD(0,1,af))}ak(ap,ay.verticalArrowPositions,aq,af)}t=v;al.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){t-=b(this).outerHeight()});au.hover(function(){au.addClass("jspHover")},function(){au.removeClass("jspHover")}).bind("mousedown.jsp",function(aI){b("html").bind("dragstart.jsp selectstart.jsp",aB);au.addClass("jspActive");var s=aI.pageY-au.position().top;b("html").bind("mousemove.jsp",function(aJ){V(aJ.pageY-s,false)}).bind("mouseup.jsp mouseleave.jsp",aw);return false});o()}}function o(){ap.height(t+"px");I=0;X=ay.verticalGutter+ap.outerWidth();Y.width(aj-X-f);try{if(U.position().left===0){Y.css("margin-left",X+"px")}}catch(s){}}function z(){if(aE){al.append(b('<div class="jspHorizontalBar" />').append(b('<div class="jspCap jspCapLeft" />'),b('<div class="jspTrack" />').append(b('<div class="jspDrag" />').append(b('<div class="jspDragLeft" />'),b('<div class="jspDragRight" />'))),b('<div class="jspCap jspCapRight" />')));am=al.find(">.jspHorizontalBar");G=am.find(">.jspTrack");h=G.find(">.jspDrag");if(ay.showArrows){ax=b('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp",aD(-1,0)).bind("click.jsp",aB);x=b('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp",aD(1,0)).bind("click.jsp",aB); -if(ay.arrowScrollOnHover){ax.bind("mouseover.jsp",aD(-1,0,ax));x.bind("mouseover.jsp",aD(1,0,x))}ak(G,ay.horizontalArrowPositions,ax,x)}h.hover(function(){h.addClass("jspHover")},function(){h.removeClass("jspHover")}).bind("mousedown.jsp",function(aI){b("html").bind("dragstart.jsp selectstart.jsp",aB);h.addClass("jspActive");var s=aI.pageX-h.position().left;b("html").bind("mousemove.jsp",function(aJ){W(aJ.pageX-s,false)}).bind("mouseup.jsp mouseleave.jsp",aw);return false});l=al.innerWidth();ah()}}function ah(){al.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){l-=b(this).outerWidth()});G.width(l+"px");aa=0}function F(){if(aE&&az){var aI=G.outerHeight(),s=ap.outerWidth();t-=aI;b(am).find(">.jspCap:visible,>.jspArrow").each(function(){l+=b(this).outerWidth()});l-=s;v-=s;aj-=aI;G.parent().append(b('<div class="jspCorner" />').css("width",aI+"px"));o();ah()}if(aE){Y.width((al.outerWidth()-f)+"px")}Z=Y.outerHeight();q=Z/v;if(aE){at=Math.ceil(1/y*l);if(at>ay.horizontalDragMaxWidth){at=ay.horizontalDragMaxWidth}else{if(at<ay.horizontalDragMinWidth){at=ay.horizontalDragMinWidth}}h.width(at+"px");j=l-at;ae(aa)}if(az){A=Math.ceil(1/q*t);if(A>ay.verticalDragMaxHeight){A=ay.verticalDragMaxHeight}else{if(A<ay.verticalDragMinHeight){A=ay.verticalDragMinHeight}}au.height(A+"px");i=t-A;ad(I)}}function ak(aJ,aL,aI,s){var aN="before",aK="after",aM;if(aL=="os"){aL=/Mac/.test(navigator.platform)?"after":"split"}if(aL==aN){aK=aL}else{if(aL==aK){aN=aL;aM=aI;aI=s;s=aM}}aJ[aN](aI)[aK](s)}function aD(aI,s,aJ){return function(){H(aI,s,this,aJ);this.blur();return false}}function H(aL,aK,aO,aN){aO=b(aO).addClass("jspActive");var aM,aJ,aI=true,s=function(){if(aL!==0){Q.scrollByX(aL*ay.arrowButtonSpeed)}if(aK!==0){Q.scrollByY(aK*ay.arrowButtonSpeed)}aJ=setTimeout(s,aI?ay.initialDelay:ay.arrowRepeatFreq);aI=false};s();aM=aN?"mouseout.jsp":"mouseup.jsp";aN=aN||b("html");aN.bind(aM,function(){aO.removeClass("jspActive");aJ&&clearTimeout(aJ);aJ=null;aN.unbind(aM)})}function p(){w();if(az){ap.bind("mousedown.jsp",function(aN){if(aN.originalTarget===c||aN.originalTarget==aN.currentTarget){var aL=b(this),aO=aL.offset(),aM=aN.pageY-aO.top-I,aJ,aI=true,s=function(){var aR=aL.offset(),aS=aN.pageY-aR.top-A/2,aP=v*ay.scrollPagePercent,aQ=i*aP/(Z-v);if(aM<0){if(I-aQ>aS){Q.scrollByY(-aP)}else{V(aS)}}else{if(aM>0){if(I+aQ<aS){Q.scrollByY(aP)}else{V(aS)}}else{aK();return}}aJ=setTimeout(s,aI?ay.initialDelay:ay.trackClickRepeatFreq);aI=false},aK=function(){aJ&&clearTimeout(aJ);aJ=null;b(document).unbind("mouseup.jsp",aK)};s();b(document).bind("mouseup.jsp",aK);return false}})}if(aE){G.bind("mousedown.jsp",function(aN){if(aN.originalTarget===c||aN.originalTarget==aN.currentTarget){var aL=b(this),aO=aL.offset(),aM=aN.pageX-aO.left-aa,aJ,aI=true,s=function(){var aR=aL.offset(),aS=aN.pageX-aR.left-at/2,aP=aj*ay.scrollPagePercent,aQ=j*aP/(T-aj);if(aM<0){if(aa-aQ>aS){Q.scrollByX(-aP)}else{W(aS)}}else{if(aM>0){if(aa+aQ<aS){Q.scrollByX(aP)}else{W(aS)}}else{aK();return}}aJ=setTimeout(s,aI?ay.initialDelay:ay.trackClickRepeatFreq);aI=false},aK=function(){aJ&&clearTimeout(aJ);aJ=null;b(document).unbind("mouseup.jsp",aK)};s();b(document).bind("mouseup.jsp",aK);return false}})}}function w(){if(G){G.unbind("mousedown.jsp")}if(ap){ap.unbind("mousedown.jsp")}}function aw(){b("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp");if(au){au.removeClass("jspActive")}if(h){h.removeClass("jspActive")}}function V(s,aI){if(!az){return}if(s<0){s=0}else{if(s>i){s=i}}if(aI===c){aI=ay.animateScroll}if(aI){Q.animate(au,"top",s,ad)}else{au.css("top",s);ad(s)}}function ad(aI){if(aI===c){aI=au.position().top}al.scrollTop(0);I=aI;var aL=I===0,aJ=I==i,aK=aI/i,s=-aK*(Z-v);if(ai!=aL||aG!=aJ){ai=aL;aG=aJ;D.trigger("jsp-arrow-change",[ai,aG,P,k])}u(aL,aJ);Y.css("top",s);D.trigger("jsp-scroll-y",[-s,aL,aJ]).trigger("scroll")}function W(aI,s){if(!aE){return}if(aI<0){aI=0}else{if(aI>j){aI=j}}if(s===c){s=ay.animateScroll}if(s){Q.animate(h,"left",aI,ae) -}else{h.css("left",aI);ae(aI)}}function ae(aI){if(aI===c){aI=h.position().left}al.scrollTop(0);aa=aI;var aL=aa===0,aK=aa==j,aJ=aI/j,s=-aJ*(T-aj);if(P!=aL||k!=aK){P=aL;k=aK;D.trigger("jsp-arrow-change",[ai,aG,P,k])}r(aL,aK);Y.css("left",s);D.trigger("jsp-scroll-x",[-s,aL,aK]).trigger("scroll")}function u(aI,s){if(ay.showArrows){aq[aI?"addClass":"removeClass"]("jspDisabled");af[s?"addClass":"removeClass"]("jspDisabled")}}function r(aI,s){if(ay.showArrows){ax[aI?"addClass":"removeClass"]("jspDisabled");x[s?"addClass":"removeClass"]("jspDisabled")}}function M(s,aI){var aJ=s/(Z-v);V(aJ*i,aI)}function N(aI,s){var aJ=aI/(T-aj);W(aJ*j,s)}function ab(aV,aQ,aJ){var aN,aK,aL,s=0,aU=0,aI,aP,aO,aS,aR,aT;try{aN=b(aV)}catch(aM){return}aK=aN.outerHeight();aL=aN.outerWidth();al.scrollTop(0);al.scrollLeft(0);while(!aN.is(".jspPane")){s+=aN.position().top;aU+=aN.position().left;aN=aN.offsetParent();if(/^body|html$/i.test(aN[0].nodeName)){return}}aI=aA();aO=aI+v;if(s<aI||aQ){aR=s-ay.verticalGutter}else{if(s+aK>aO){aR=s-v+aK+ay.verticalGutter}}if(aR){M(aR,aJ)}aP=aC();aS=aP+aj;if(aU<aP||aQ){aT=aU-ay.horizontalGutter}else{if(aU+aL>aS){aT=aU-aj+aL+ay.horizontalGutter}}if(aT){N(aT,aJ)}}function aC(){return -Y.position().left}function aA(){return -Y.position().top}function K(){var s=Z-v;return(s>20)&&(s-aA()<10)}function B(){var s=T-aj;return(s>20)&&(s-aC()<10)}function ag(){al.unbind(ac).bind(ac,function(aL,aM,aK,aI){var aJ=aa,s=I;Q.scrollBy(aK*ay.mouseWheelSpeed,-aI*ay.mouseWheelSpeed,false);return aJ==aa&&s==I})}function n(){al.unbind(ac)}function aB(){return false}function J(){Y.find(":input,a").unbind("focus.jsp").bind("focus.jsp",function(s){ab(s.target,false)})}function E(){Y.find(":input,a").unbind("focus.jsp")}function S(){var s,aI,aK=[];aE&&aK.push(am[0]);az&&aK.push(U[0]);Y.focus(function(){D.focus()});D.attr("tabindex",0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp",function(aN){if(aN.target!==this&&!(aK.length&&b(aN.target).closest(aK).length)){return}var aM=aa,aL=I;switch(aN.keyCode){case 40:case 38:case 34:case 32:case 33:case 39:case 37:s=aN.keyCode;aJ();break;case 35:M(Z-v);s=null;break;case 36:M(0);s=null;break}aI=aN.keyCode==s&&aM!=aa||aL!=I;return !aI}).bind("keypress.jsp",function(aL){if(aL.keyCode==s){aJ()}return !aI});if(ay.hideFocus){D.css("outline","none");if("hideFocus" in al[0]){D.attr("hideFocus",true)}}else{D.css("outline","");if("hideFocus" in al[0]){D.attr("hideFocus",false)}}function aJ(){var aM=aa,aL=I;switch(s){case 40:Q.scrollByY(ay.keyboardSpeed,false);break;case 38:Q.scrollByY(-ay.keyboardSpeed,false);break;case 34:case 32:Q.scrollByY(v*ay.scrollPagePercent,false);break;case 33:Q.scrollByY(-v*ay.scrollPagePercent,false);break;case 39:Q.scrollByX(ay.keyboardSpeed,false);break;case 37:Q.scrollByX(-ay.keyboardSpeed,false);break}aI=aM!=aa||aL!=I;return aI}}function R(){D.attr("tabindex","-1").removeAttr("tabindex").unbind("keydown.jsp keypress.jsp")}function C(){if(location.hash&&location.hash.length>1){var aK,aI,aJ=escape(location.hash.substr(1));try{aK=b("#"+aJ+', a[name="'+aJ+'"]')}catch(s){return}if(aK.length&&Y.find(aJ)){if(al.scrollTop()===0){aI=setInterval(function(){if(al.scrollTop()>0){ab(aK,true);b(document).scrollTop(al.position().top);clearInterval(aI)}},50)}else{ab(aK,true);b(document).scrollTop(al.position().top)}}}}function m(){if(b(document.body).data("jspHijack")){return}b(document.body).data("jspHijack",true);b(document.body).delegate("a[href*=#]","click",function(s){var aI=this.href.substr(0,this.href.indexOf("#")),aK=location.href,aO,aP,aJ,aM,aL,aN;if(location.href.indexOf("#")!==-1){aK=location.href.substr(0,location.href.indexOf("#"))}if(aI!==aK){return}aO=escape(this.href.substr(this.href.indexOf("#")+1));aP;try{aP=b("#"+aO+', a[name="'+aO+'"]')}catch(aQ){return}if(!aP.length){return}aJ=aP.closest(".jspScrollable");aM=aJ.data("jsp");aM.scrollToElement(aP,true);if(aJ[0].scrollIntoView){aL=b(a).scrollTop();aN=aP.offset().top;if(aN<aL||aN>aL+b(a).height()){aJ[0].scrollIntoView()}}s.preventDefault() -})}function an(){var aJ,aI,aL,aK,aM,s=false;al.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp",function(aN){var aO=aN.originalEvent.touches[0];aJ=aC();aI=aA();aL=aO.pageX;aK=aO.pageY;aM=false;s=true}).bind("touchmove.jsp",function(aQ){if(!s){return}var aP=aQ.originalEvent.touches[0],aO=aa,aN=I;Q.scrollTo(aJ+aL-aP.pageX,aI+aK-aP.pageY);aM=aM||Math.abs(aL-aP.pageX)>5||Math.abs(aK-aP.pageY)>5;return aO==aa&&aN==I}).bind("touchend.jsp",function(aN){s=false}).bind("click.jsp-touchclick",function(aN){if(aM){aM=false;return false}})}function g(){var s=aA(),aI=aC();D.removeClass("jspScrollable").unbind(".jsp");D.replaceWith(ao.append(Y.children()));ao.scrollTop(s);ao.scrollLeft(aI);if(av){clearInterval(av)}}b.extend(Q,{reinitialise:function(aI){aI=b.extend({},ay,aI);ar(aI)},scrollToElement:function(aJ,aI,s){ab(aJ,aI,s)},scrollTo:function(aJ,s,aI){N(aJ,aI);M(s,aI)},scrollToX:function(aI,s){N(aI,s)},scrollToY:function(s,aI){M(s,aI)},scrollToPercentX:function(aI,s){N(aI*(T-aj),s)},scrollToPercentY:function(aI,s){M(aI*(Z-v),s)},scrollBy:function(aI,s,aJ){Q.scrollByX(aI,aJ);Q.scrollByY(s,aJ)},scrollByX:function(s,aJ){var aI=aC()+Math[s<0?"floor":"ceil"](s),aK=aI/(T-aj);W(aK*j,aJ)},scrollByY:function(s,aJ){var aI=aA()+Math[s<0?"floor":"ceil"](s),aK=aI/(Z-v);V(aK*i,aJ)},positionDragX:function(s,aI){W(s,aI)},positionDragY:function(aI,s){V(aI,s)},animate:function(aI,aL,s,aK){var aJ={};aJ[aL]=s;aI.animate(aJ,{duration:ay.animateDuration,easing:ay.animateEase,queue:false,step:aK})},getContentPositionX:function(){return aC()},getContentPositionY:function(){return aA()},getContentWidth:function(){return T},getContentHeight:function(){return Z},getPercentScrolledX:function(){return aC()/(T-aj)},getPercentScrolledY:function(){return aA()/(Z-v)},getIsScrollableH:function(){return aE},getIsScrollableV:function(){return az},getContentPane:function(){return Y},scrollToBottom:function(s){V(i,s)},hijackInternalLinks:b.noop,destroy:function(){g()}});ar(O)}e=b.extend({},b.fn.jScrollPane.defaults,e);b.each(["arrowButtonSpeed","trackClickSpeed","keyboardSpeed"],function(){e[this]=e[this]||e.speed});return this.each(function(){var f=b(this),g=f.data("jsp");if(g){g.reinitialise(e)}else{b("script",f).filter('[type="text/javascript"],:not([type])').remove();g=new d(f,e);f.data("jsp",g)}})};b.fn.jScrollPane.defaults={showArrows:false,maintainPosition:true,stickToBottom:false,stickToRight:false,clickOnTrack:true,autoReinitialise:false,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,contentWidth:c,animateScroll:false,animateDuration:300,animateEase:"linear",hijackInternalLinks:false,verticalGutter:4,horizontalGutter:4,mouseWheelSpeed:3,arrowButtonSpeed:0,arrowRepeatFreq:50,arrowScrollOnHover:false,trackClickSpeed:0,trackClickRepeatFreq:70,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:true,hideFocus:false,keyboardSpeed:0,initialDelay:300,speed:30,scrollPagePercent:0.8}})(jQuery,this);
\ No newline at end of file +!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.fn.jScrollPane=function(b){function c(b,c){function d(c){var f,h,j,k,l,o,p=!1,q=!1;if(N=c,void 0===O)l=b.scrollTop(),o=b.scrollLeft(),b.css({overflow:"hidden",padding:0}),P=b.innerWidth()+rb,Q=b.innerHeight(),b.width(P),O=a('<div class="jspPane" />').css("padding",qb).append(b.children()),R=a('<div class="jspContainer" />').css({width:P+"px",height:Q+"px"}).append(O).appendTo(b);else{if(b.css("width",""),p=N.stickToBottom&&A(),q=N.stickToRight&&B(),k=b.innerWidth()+rb!=P||b.outerHeight()!=Q,k&&(P=b.innerWidth()+rb,Q=b.innerHeight(),R.css({width:P+"px",height:Q+"px"})),!k&&sb==S&&O.outerHeight()==T)return void b.width(P);sb=S,O.css("width",""),b.width(P),R.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}O.css("overflow","auto"),S=c.contentWidth?c.contentWidth:O[0].scrollWidth,T=O[0].scrollHeight,O.css("overflow",""),U=S/P,V=T/Q,W=V>1,X=U>1,X||W?(b.addClass("jspScrollable"),f=N.maintainPosition&&($||bb),f&&(h=y(),j=z()),e(),g(),i(),f&&(w(q?S-P:h,!1),v(p?T-Q:j,!1)),F(),C(),L(),N.enableKeyboardNavigation&&H(),N.clickOnTrack&&m(),J(),N.hijackInternalLinks&&K()):(b.removeClass("jspScrollable"),O.css({top:0,left:0,width:R.width()-rb}),D(),G(),I(),n()),N.autoReinitialise&&!pb?pb=setInterval(function(){d(N)},N.autoReinitialiseDelay):!N.autoReinitialise&&pb&&clearInterval(pb),l&&b.scrollTop(0)&&v(l,!1),o&&b.scrollLeft(0)&&w(o,!1),b.trigger("jsp-initialised",[X||W])}function e(){W&&(R.append(a('<div class="jspVerticalBar" />').append(a('<div class="jspCap jspCapTop" />'),a('<div class="jspTrack" />').append(a('<div class="jspDrag" />').append(a('<div class="jspDragTop" />'),a('<div class="jspDragBottom" />'))),a('<div class="jspCap jspCapBottom" />'))),cb=R.find(">.jspVerticalBar"),db=cb.find(">.jspTrack"),Y=db.find(">.jspDrag"),N.showArrows&&(hb=a('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp",k(0,-1)).bind("click.jsp",E),ib=a('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp",k(0,1)).bind("click.jsp",E),N.arrowScrollOnHover&&(hb.bind("mouseover.jsp",k(0,-1,hb)),ib.bind("mouseover.jsp",k(0,1,ib))),j(db,N.verticalArrowPositions,hb,ib)),fb=Q,R.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){fb-=a(this).outerHeight()}),Y.hover(function(){Y.addClass("jspHover")},function(){Y.removeClass("jspHover")}).bind("mousedown.jsp",function(b){a("html").bind("dragstart.jsp selectstart.jsp",E),Y.addClass("jspActive");var c=b.pageY-Y.position().top;return a("html").bind("mousemove.jsp",function(a){p(a.pageY-c,!1)}).bind("mouseup.jsp mouseleave.jsp",o),!1}),f())}function f(){db.height(fb+"px"),$=0,eb=N.verticalGutter+db.outerWidth(),O.width(P-eb-rb);try{0===cb.position().left&&O.css("margin-left",eb+"px")}catch(a){}}function g(){X&&(R.append(a('<div class="jspHorizontalBar" />').append(a('<div class="jspCap jspCapLeft" />'),a('<div class="jspTrack" />').append(a('<div class="jspDrag" />').append(a('<div class="jspDragLeft" />'),a('<div class="jspDragRight" />'))),a('<div class="jspCap jspCapRight" />'))),jb=R.find(">.jspHorizontalBar"),kb=jb.find(">.jspTrack"),_=kb.find(">.jspDrag"),N.showArrows&&(nb=a('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp",k(-1,0)).bind("click.jsp",E),ob=a('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp",k(1,0)).bind("click.jsp",E),N.arrowScrollOnHover&&(nb.bind("mouseover.jsp",k(-1,0,nb)),ob.bind("mouseover.jsp",k(1,0,ob))),j(kb,N.horizontalArrowPositions,nb,ob)),_.hover(function(){_.addClass("jspHover")},function(){_.removeClass("jspHover")}).bind("mousedown.jsp",function(b){a("html").bind("dragstart.jsp selectstart.jsp",E),_.addClass("jspActive");var c=b.pageX-_.position().left;return a("html").bind("mousemove.jsp",function(a){r(a.pageX-c,!1)}).bind("mouseup.jsp mouseleave.jsp",o),!1}),lb=R.innerWidth(),h())}function h(){R.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){lb-=a(this).outerWidth()}),kb.width(lb+"px"),bb=0}function i(){if(X&&W){var b=kb.outerHeight(),c=db.outerWidth();fb-=b,a(jb).find(">.jspCap:visible,>.jspArrow").each(function(){lb+=a(this).outerWidth()}),lb-=c,Q-=c,P-=b,kb.parent().append(a('<div class="jspCorner" />').css("width",b+"px")),f(),h()}X&&O.width(R.outerWidth()-rb+"px"),T=O.outerHeight(),V=T/Q,X&&(mb=Math.ceil(1/U*lb),mb>N.horizontalDragMaxWidth?mb=N.horizontalDragMaxWidth:mb<N.horizontalDragMinWidth&&(mb=N.horizontalDragMinWidth),_.width(mb+"px"),ab=lb-mb,s(bb)),W&&(gb=Math.ceil(1/V*fb),gb>N.verticalDragMaxHeight?gb=N.verticalDragMaxHeight:gb<N.verticalDragMinHeight&&(gb=N.verticalDragMinHeight),Y.height(gb+"px"),Z=fb-gb,q($))}function j(a,b,c,d){var e,f="before",g="after";"os"==b&&(b=/Mac/.test(navigator.platform)?"after":"split"),b==f?g=b:b==g&&(f=b,e=c,c=d,d=e),a[f](c)[g](d)}function k(a,b,c){return function(){return l(a,b,this,c),this.blur(),!1}}function l(b,c,d,e){d=a(d).addClass("jspActive");var f,g,h=!0,i=function(){0!==b&&tb.scrollByX(b*N.arrowButtonSpeed),0!==c&&tb.scrollByY(c*N.arrowButtonSpeed),g=setTimeout(i,h?N.initialDelay:N.arrowRepeatFreq),h=!1};i(),f=e?"mouseout.jsp":"mouseup.jsp",e=e||a("html"),e.bind(f,function(){d.removeClass("jspActive"),g&&clearTimeout(g),g=null,e.unbind(f)})}function m(){n(),W&&db.bind("mousedown.jsp",function(b){if(void 0===b.originalTarget||b.originalTarget==b.currentTarget){var c,d=a(this),e=d.offset(),f=b.pageY-e.top-$,g=!0,h=function(){var a=d.offset(),e=b.pageY-a.top-gb/2,j=Q*N.scrollPagePercent,k=Z*j/(T-Q);if(0>f)$-k>e?tb.scrollByY(-j):p(e);else{if(!(f>0))return void i();e>$+k?tb.scrollByY(j):p(e)}c=setTimeout(h,g?N.initialDelay:N.trackClickRepeatFreq),g=!1},i=function(){c&&clearTimeout(c),c=null,a(document).unbind("mouseup.jsp",i)};return h(),a(document).bind("mouseup.jsp",i),!1}}),X&&kb.bind("mousedown.jsp",function(b){if(void 0===b.originalTarget||b.originalTarget==b.currentTarget){var c,d=a(this),e=d.offset(),f=b.pageX-e.left-bb,g=!0,h=function(){var a=d.offset(),e=b.pageX-a.left-mb/2,j=P*N.scrollPagePercent,k=ab*j/(S-P);if(0>f)bb-k>e?tb.scrollByX(-j):r(e);else{if(!(f>0))return void i();e>bb+k?tb.scrollByX(j):r(e)}c=setTimeout(h,g?N.initialDelay:N.trackClickRepeatFreq),g=!1},i=function(){c&&clearTimeout(c),c=null,a(document).unbind("mouseup.jsp",i)};return h(),a(document).bind("mouseup.jsp",i),!1}})}function n(){kb&&kb.unbind("mousedown.jsp"),db&&db.unbind("mousedown.jsp")}function o(){a("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp"),Y&&Y.removeClass("jspActive"),_&&_.removeClass("jspActive")}function p(c,d){if(W){0>c?c=0:c>Z&&(c=Z);var e=new a.Event("jsp-will-scroll-y");if(b.trigger(e,[c]),!e.isDefaultPrevented()){var f=c||0,g=0===f,h=f==Z,i=c/Z,j=-i*(T-Q);void 0===d&&(d=N.animateScroll),d?tb.animate(Y,"top",c,q,function(){b.trigger("jsp-user-scroll-y",[-j,g,h])}):(Y.css("top",c),q(c),b.trigger("jsp-user-scroll-y",[-j,g,h]))}}}function q(a){void 0===a&&(a=Y.position().top),R.scrollTop(0),$=a||0;var c=0===$,d=$==Z,e=a/Z,f=-e*(T-Q);(ub!=c||wb!=d)&&(ub=c,wb=d,b.trigger("jsp-arrow-change",[ub,wb,vb,xb])),t(c,d),O.css("top",f),b.trigger("jsp-scroll-y",[-f,c,d]).trigger("scroll")}function r(c,d){if(X){0>c?c=0:c>ab&&(c=ab);var e=new a.Event("jsp-will-scroll-x");if(b.trigger(e,[c]),!e.isDefaultPrevented()){var f=c||0,g=0===f,h=f==ab,i=c/ab,j=-i*(S-P);void 0===d&&(d=N.animateScroll),d?tb.animate(_,"left",c,s,function(){b.trigger("jsp-user-scroll-x",[-j,g,h])}):(_.css("left",c),s(c),b.trigger("jsp-user-scroll-x",[-j,g,h]))}}}function s(a){void 0===a&&(a=_.position().left),R.scrollTop(0),bb=a||0;var c=0===bb,d=bb==ab,e=a/ab,f=-e*(S-P);(vb!=c||xb!=d)&&(vb=c,xb=d,b.trigger("jsp-arrow-change",[ub,wb,vb,xb])),u(c,d),O.css("left",f),b.trigger("jsp-scroll-x",[-f,c,d]).trigger("scroll")}function t(a,b){N.showArrows&&(hb[a?"addClass":"removeClass"]("jspDisabled"),ib[b?"addClass":"removeClass"]("jspDisabled"))}function u(a,b){N.showArrows&&(nb[a?"addClass":"removeClass"]("jspDisabled"),ob[b?"addClass":"removeClass"]("jspDisabled"))}function v(a,b){var c=a/(T-Q);p(c*Z,b)}function w(a,b){var c=a/(S-P);r(c*ab,b)}function x(b,c,d){var e,f,g,h,i,j,k,l,m,n=0,o=0;try{e=a(b)}catch(p){return}for(f=e.outerHeight(),g=e.outerWidth(),R.scrollTop(0),R.scrollLeft(0);!e.is(".jspPane");)if(n+=e.position().top,o+=e.position().left,e=e.offsetParent(),/^body|html$/i.test(e[0].nodeName))return;h=z(),j=h+Q,h>n||c?l=n-N.horizontalGutter:n+f>j&&(l=n-Q+f+N.horizontalGutter),isNaN(l)||v(l,d),i=y(),k=i+P,i>o||c?m=o-N.horizontalGutter:o+g>k&&(m=o-P+g+N.horizontalGutter),isNaN(m)||w(m,d)}function y(){return-O.position().left}function z(){return-O.position().top}function A(){var a=T-Q;return a>20&&a-z()<10}function B(){var a=S-P;return a>20&&a-y()<10}function C(){R.unbind(zb).bind(zb,function(a,b,c,d){bb||(bb=0),$||($=0);var e=bb,f=$,g=a.deltaFactor||N.mouseWheelSpeed;return tb.scrollBy(c*g,-d*g,!1),e==bb&&f==$})}function D(){R.unbind(zb)}function E(){return!1}function F(){O.find(":input,a").unbind("focus.jsp").bind("focus.jsp",function(a){x(a.target,!1)})}function G(){O.find(":input,a").unbind("focus.jsp")}function H(){function c(){var a=bb,b=$;switch(d){case 40:tb.scrollByY(N.keyboardSpeed,!1);break;case 38:tb.scrollByY(-N.keyboardSpeed,!1);break;case 34:case 32:tb.scrollByY(Q*N.scrollPagePercent,!1);break;case 33:tb.scrollByY(-Q*N.scrollPagePercent,!1);break;case 39:tb.scrollByX(N.keyboardSpeed,!1);break;case 37:tb.scrollByX(-N.keyboardSpeed,!1)}return e=a!=bb||b!=$}var d,e,f=[];X&&f.push(jb[0]),W&&f.push(cb[0]),O.bind("focus.jsp",function(){b.focus()}),b.attr("tabindex",0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp",function(b){if(b.target===this||f.length&&a(b.target).closest(f).length){var g=bb,h=$;switch(b.keyCode){case 40:case 38:case 34:case 32:case 33:case 39:case 37:d=b.keyCode,c();break;case 35:v(T-Q),d=null;break;case 36:v(0),d=null}return e=b.keyCode==d&&g!=bb||h!=$,!e}}).bind("keypress.jsp",function(b){return b.keyCode==d&&c(),b.target===this||f.length&&a(b.target).closest(f).length?!e:void 0}),N.hideFocus?(b.css("outline","none"),"hideFocus"in R[0]&&b.attr("hideFocus",!0)):(b.css("outline",""),"hideFocus"in R[0]&&b.attr("hideFocus",!1))}function I(){b.attr("tabindex","-1").removeAttr("tabindex").unbind("keydown.jsp keypress.jsp"),O.unbind(".jsp")}function J(){if(location.hash&&location.hash.length>1){var b,c,d=escape(location.hash.substr(1));try{b=a("#"+d+', a[name="'+d+'"]')}catch(e){return}b.length&&O.find(d)&&(0===R.scrollTop()?c=setInterval(function(){R.scrollTop()>0&&(x(b,!0),a(document).scrollTop(R.position().top),clearInterval(c))},50):(x(b,!0),a(document).scrollTop(R.position().top)))}}function K(){a(document.body).data("jspHijack")||(a(document.body).data("jspHijack",!0),a(document.body).delegate('a[href*="#"]',"click",function(b){var c,d,e,f,g,h,i=this.href.substr(0,this.href.indexOf("#")),j=location.href;if(-1!==location.href.indexOf("#")&&(j=location.href.substr(0,location.href.indexOf("#"))),i===j){c=escape(this.href.substr(this.href.indexOf("#")+1));try{d=a("#"+c+', a[name="'+c+'"]')}catch(k){return}d.length&&(e=d.closest(".jspScrollable"),f=e.data("jsp"),f.scrollToElement(d,!0),e[0].scrollIntoView&&(g=a(window).scrollTop(),h=d.offset().top,(g>h||h>g+a(window).height())&&e[0].scrollIntoView()),b.preventDefault())}}))}function L(){var a,b,c,d,e,f=!1;R.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp",function(g){var h=g.originalEvent.touches[0];a=y(),b=z(),c=h.pageX,d=h.pageY,e=!1,f=!0}).bind("touchmove.jsp",function(g){if(f){var h=g.originalEvent.touches[0],i=bb,j=$;return tb.scrollTo(a+c-h.pageX,b+d-h.pageY),e=e||Math.abs(c-h.pageX)>5||Math.abs(d-h.pageY)>5,i==bb&&j==$}}).bind("touchend.jsp",function(){f=!1}).bind("click.jsp-touchclick",function(){return e?(e=!1,!1):void 0})}function M(){var a=z(),c=y();b.removeClass("jspScrollable").unbind(".jsp"),O.unbind(".jsp"),b.replaceWith(yb.append(O.children())),yb.scrollTop(a),yb.scrollLeft(c),pb&&clearInterval(pb)}var N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb,mb,nb,ob,pb,qb,rb,sb,tb=this,ub=!0,vb=!0,wb=!1,xb=!1,yb=b.clone(!1,!1).empty(),zb=a.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";"border-box"===b.css("box-sizing")?(qb=0,rb=0):(qb=b.css("paddingTop")+" "+b.css("paddingRight")+" "+b.css("paddingBottom")+" "+b.css("paddingLeft"),rb=(parseInt(b.css("paddingLeft"),10)||0)+(parseInt(b.css("paddingRight"),10)||0)),a.extend(tb,{reinitialise:function(b){b=a.extend({},N,b),d(b)},scrollToElement:function(a,b,c){x(a,b,c)},scrollTo:function(a,b,c){w(a,c),v(b,c)},scrollToX:function(a,b){w(a,b)},scrollToY:function(a,b){v(a,b)},scrollToPercentX:function(a,b){w(a*(S-P),b)},scrollToPercentY:function(a,b){v(a*(T-Q),b)},scrollBy:function(a,b,c){tb.scrollByX(a,c),tb.scrollByY(b,c)},scrollByX:function(a,b){var c=y()+Math[0>a?"floor":"ceil"](a),d=c/(S-P);r(d*ab,b)},scrollByY:function(a,b){var c=z()+Math[0>a?"floor":"ceil"](a),d=c/(T-Q);p(d*Z,b)},positionDragX:function(a,b){r(a,b)},positionDragY:function(a,b){p(a,b)},animate:function(a,b,c,d,e){var f={};f[b]=c,a.animate(f,{duration:N.animateDuration,easing:N.animateEase,queue:!1,step:d,complete:e})},getContentPositionX:function(){return y()},getContentPositionY:function(){return z()},getContentWidth:function(){return S},getContentHeight:function(){return T},getPercentScrolledX:function(){return y()/(S-P)},getPercentScrolledY:function(){return z()/(T-Q)},getIsScrollableH:function(){return X},getIsScrollableV:function(){return W},getContentPane:function(){return O},scrollToBottom:function(a){p(Z,a)},hijackInternalLinks:a.noop,destroy:function(){M()}}),d(c)}return b=a.extend({},a.fn.jScrollPane.defaults,b),a.each(["arrowButtonSpeed","trackClickSpeed","keyboardSpeed"],function(){b[this]=b[this]||b.speed}),this.each(function(){var d=a(this),e=d.data("jsp");e?e.reinitialise(b):(a("script",d).filter('[type="text/javascript"],:not([type])').remove(),e=new c(d,b),d.data("jsp",e))})},a.fn.jScrollPane.defaults={showArrows:!1,maintainPosition:!0,stickToBottom:!1,stickToRight:!1,clickOnTrack:!0,autoReinitialise:!1,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,contentWidth:void 0,animateScroll:!1,animateDuration:300,animateEase:"linear",hijackInternalLinks:!1,verticalGutter:4,horizontalGutter:4,mouseWheelSpeed:3,arrowButtonSpeed:0,arrowRepeatFreq:50,arrowScrollOnHover:!1,trackClickSpeed:0,trackClickRepeatFreq:70,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:!0,hideFocus:!1,keyboardSpeed:0,initialDelay:300,speed:30,scrollPagePercent:.8}});
\ No newline at end of file diff --git a/libs/bower_components/jScrollPane/script/jquery.mousewheel.js b/libs/bower_components/jScrollPane/script/jquery.mousewheel.js index 9d65c7162b..bf61ad0e16 100644 --- a/libs/bower_components/jScrollPane/script/jquery.mousewheel.js +++ b/libs/bower_components/jScrollPane/script/jquery.mousewheel.js @@ -1,13 +1,9 @@ -/*! Copyright (c) 2013 Brandon Aaron (http://brandonaaron.net) - * Licensed under the MIT License (LICENSE.txt). +/*! + * jQuery Mousewheel 3.1.12 * - * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. - * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. - * Thanks to: Seamus Leahy for adding deltaX and deltaY - * - * Version: 3.1.3 - * - * Requires: 1.2.2+ + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license */ (function (factory) { @@ -23,9 +19,11 @@ } }(function ($) { - var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll']; - var toBind = 'onwheel' in document || document.documentMode >= 9 ? ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll']; - var lowestDelta, lowestDeltaXY; + var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'], + toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ? + ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'], + slice = Array.prototype.slice, + nullLowestDeltaTimeout, lowestDelta; if ( $.event.fixHooks ) { for ( var i = toFix.length; i; ) { @@ -33,7 +31,9 @@ } } - $.event.special.mousewheel = { + var special = $.event.special.mousewheel = { + version: '3.1.12', + setup: function() { if ( this.addEventListener ) { for ( var i = toBind.length; i; ) { @@ -42,6 +42,9 @@ } else { this.onmousewheel = handler; } + // Store the line height and page height for this particular element + $.data(this, 'mousewheel-line-height', special.getLineHeight(this)); + $.data(this, 'mousewheel-page-height', special.getPageHeight(this)); }, teardown: function() { @@ -52,66 +55,167 @@ } else { this.onmousewheel = null; } + // Clean up the data we added to the element + $.removeData(this, 'mousewheel-line-height'); + $.removeData(this, 'mousewheel-page-height'); + }, + + getLineHeight: function(elem) { + var $elem = $(elem), + $parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent'](); + if (!$parent.length) { + $parent = $('body'); + } + return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16; + }, + + getPageHeight: function(elem) { + return $(elem).height(); + }, + + settings: { + adjustOldDeltas: true, // see shouldAdjustOldDeltas() below + normalizeOffset: true // calls getBoundingClientRect for each event } }; $.fn.extend({ mousewheel: function(fn) { - return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel"); + return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel'); }, unmousewheel: function(fn) { - return this.unbind("mousewheel", fn); + return this.unbind('mousewheel', fn); } }); function handler(event) { - var orgEvent = event || window.event, - args = [].slice.call(arguments, 1), - delta = 0, - deltaX = 0, - deltaY = 0, - absDelta = 0, - absDeltaXY = 0, - fn; + var orgEvent = event || window.event, + args = slice.call(arguments, 1), + delta = 0, + deltaX = 0, + deltaY = 0, + absDelta = 0, + offsetX = 0, + offsetY = 0; event = $.event.fix(orgEvent); - event.type = "mousewheel"; + event.type = 'mousewheel'; // Old school scrollwheel delta - if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta; } - if ( orgEvent.detail ) { delta = orgEvent.detail * -1; } + if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; } + if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; } + if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; } + if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; } + + // Firefox < 17 horizontal scrolling related to DOMMouseScroll event + if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) { + deltaX = deltaY * -1; + deltaY = 0; + } + + // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy + delta = deltaY === 0 ? deltaX : deltaY; // New school wheel delta (wheel event) - if ( orgEvent.deltaY ) { + if ( 'deltaY' in orgEvent ) { deltaY = orgEvent.deltaY * -1; delta = deltaY; } - if ( orgEvent.deltaX ) { + if ( 'deltaX' in orgEvent ) { deltaX = orgEvent.deltaX; - delta = deltaX * -1; + if ( deltaY === 0 ) { delta = deltaX * -1; } } - // Webkit - if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY; } - if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = orgEvent.wheelDeltaX * -1; } + // No change actually happened, no reason to go any further + if ( deltaY === 0 && deltaX === 0 ) { return; } + + // Need to convert lines and pages to pixels if we aren't already in pixels + // There are three delta modes: + // * deltaMode 0 is by pixels, nothing to do + // * deltaMode 1 is by lines + // * deltaMode 2 is by pages + if ( orgEvent.deltaMode === 1 ) { + var lineHeight = $.data(this, 'mousewheel-line-height'); + delta *= lineHeight; + deltaY *= lineHeight; + deltaX *= lineHeight; + } else if ( orgEvent.deltaMode === 2 ) { + var pageHeight = $.data(this, 'mousewheel-page-height'); + delta *= pageHeight; + deltaY *= pageHeight; + deltaX *= pageHeight; + } - // Look for lowest delta to normalize the delta values - absDelta = Math.abs(delta); - if ( !lowestDelta || absDelta < lowestDelta ) { lowestDelta = absDelta; } - absDeltaXY = Math.max(Math.abs(deltaY), Math.abs(deltaX)); - if ( !lowestDeltaXY || absDeltaXY < lowestDeltaXY ) { lowestDeltaXY = absDeltaXY; } + // Store lowest absolute delta to normalize the delta values + absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) ); - // Get a whole value for the deltas - fn = delta > 0 ? 'floor' : 'ceil'; - delta = Math[fn](delta / lowestDelta); - deltaX = Math[fn](deltaX / lowestDeltaXY); - deltaY = Math[fn](deltaY / lowestDeltaXY); + if ( !lowestDelta || absDelta < lowestDelta ) { + lowestDelta = absDelta; + + // Adjust older deltas if necessary + if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) { + lowestDelta /= 40; + } + } + + // Adjust older deltas if necessary + if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) { + // Divide all the things by 40! + delta /= 40; + deltaX /= 40; + deltaY /= 40; + } + + // Get a whole, normalized value for the deltas + delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta); + deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta); + deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta); + + // Normalise offsetX and offsetY properties + if ( special.settings.normalizeOffset && this.getBoundingClientRect ) { + var boundingRect = this.getBoundingClientRect(); + offsetX = event.clientX - boundingRect.left; + offsetY = event.clientY - boundingRect.top; + } + + // Add information to the event object + event.deltaX = deltaX; + event.deltaY = deltaY; + event.deltaFactor = lowestDelta; + event.offsetX = offsetX; + event.offsetY = offsetY; + // Go ahead and set deltaMode to 0 since we converted to pixels + // Although this is a little odd since we overwrite the deltaX/Y + // properties with normalized deltas. + event.deltaMode = 0; // Add event and delta to the front of the arguments args.unshift(event, delta, deltaX, deltaY); + // Clearout lowestDelta after sometime to better + // handle multiple device types that give different + // a different lowestDelta + // Ex: trackpad = 3 and mouse wheel = 120 + if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); } + nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200); + return ($.event.dispatch || $.event.handle).apply(this, args); } + function nullLowestDelta() { + lowestDelta = null; + } + + function shouldAdjustOldDeltas(orgEvent, absDelta) { + // If this is an older event and the delta is divisable by 120, + // then we are assuming that the browser is treating this as an + // older mouse wheel event and that we should divide the deltas + // by 40 to try and get a more usable deltaFactor. + // Side note, this actually impacts the reported scroll distance + // in older browsers and can cause scrolling to be slower than native. + // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false. + return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0; + } + })); diff --git a/libs/bower_components/jScrollPane/scroll_on_left.html b/libs/bower_components/jScrollPane/scroll_on_left.html index 6fc1c5eaba..1031dd418a 100644 --- a/libs/bower_components/jScrollPane/scroll_on_left.html +++ b/libs/bower_components/jScrollPane/scroll_on_left.html @@ -28,7 +28,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/scroll_to.html b/libs/bower_components/jScrollPane/scroll_to.html index e475ead469..3d8e173ac8 100644 --- a/libs/bower_components/jScrollPane/scroll_to.html +++ b/libs/bower_components/jScrollPane/scroll_to.html @@ -34,7 +34,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/scroll_to_animate.html b/libs/bower_components/jScrollPane/scroll_to_animate.html index 5d2dd5882a..3ae825a211 100644 --- a/libs/bower_components/jScrollPane/scroll_to_animate.html +++ b/libs/bower_components/jScrollPane/scroll_to_animate.html @@ -34,7 +34,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/settings.html b/libs/bower_components/jScrollPane/settings.html index dd62ca0105..aaa9ff50c5 100644 --- a/libs/bower_components/jScrollPane/settings.html +++ b/libs/bower_components/jScrollPane/settings.html @@ -9,7 +9,7 @@ <link type="text/css" href="style/demo.css" rel="stylesheet" media="all" /> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- scripts specific to this demo site --> <script type="text/javascript" src="script/demo.js"></script> </head> @@ -132,7 +132,9 @@ <h2 id="mouseWheelSpeed">mouseWheelSpeed <span class="setting-type">- int (default 10)</span></h2> <p> A multiplier which is used to control the amount that the scrollpane scrolls each time the mouse wheel - is turned. + is turned. If a recent version of the mousewheel plugin is used then the `deltaFactor` from that is used + to get a [more reliable](https://github.com/brandonaaron/jquery-mousewheel#getting-the-scroll-distance) + indication of how far the user wanted to scroll. </p> <h2 id="arrowButtonSpeed">arrowButtonSpeed <span class="setting-type">- int (default 10)</span></h2> <p> diff --git a/libs/bower_components/jScrollPane/short.html b/libs/bower_components/jScrollPane/short.html index 6b216c98e6..0e2115b257 100644 --- a/libs/bower_components/jScrollPane/short.html +++ b/libs/bower_components/jScrollPane/short.html @@ -21,7 +21,7 @@ </style> <!-- latest jQuery direct from google's CDN --> - <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!-- the mousewheel plugin --> <script type="text/javascript" src="script/jquery.mousewheel.js"></script> <!-- the jScrollPane script --> diff --git a/libs/bower_components/jScrollPane/style/jquery.jscrollpane.css b/libs/bower_components/jScrollPane/style/jquery.jscrollpane.css index a051caed0a..57ccca2531 100644 --- a/libs/bower_components/jScrollPane/style/jquery.jscrollpane.css +++ b/libs/bower_components/jScrollPane/style/jquery.jscrollpane.css @@ -36,13 +36,6 @@ background: red; } -.jspVerticalBar *, -.jspHorizontalBar * -{ - margin: 0; - padding: 0; -} - .jspCap { display: none; @@ -81,6 +74,8 @@ text-indent: -20000px; display: block; cursor: pointer; + padding: 0; + margin: 0; } .jspArrow.jspDisabled |