diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-09-17 19:11:47 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-09-17 19:11:47 +0200 |
commit | 3f7f6434d1875c2ef68363b7d495faaf9eb00ea8 (patch) | |
tree | ee59ae6c468b7b2199741d3c7480c52c4828c7f2 /core | |
parent | 86c4c83b861febed135707cf3d87047a8a43a043 (diff) | |
parent | 2e79aab0ce7ec9fa88ccbafd01e82574b93514f9 (diff) | |
download | nextcloud-server-3f7f6434d1875c2ef68363b7d495faaf9eb00ea8.tar.gz nextcloud-server-3f7f6434d1875c2ef68363b7d495faaf9eb00ea8.zip |
Merge branch 'master' into fix_3728_with_file_exists_dialog
Diffstat (limited to 'core')
-rw-r--r-- | core/js/js.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/core/js/js.js b/core/js/js.js index c09f80369f9..cb7287c02ae 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -906,7 +906,7 @@ OC.set=function(name, value) { * @param {type} start * @param {type} end */ -$.fn.selectRange = function(start, end) { +jQuery.fn.selectRange = function(start, end) { return this.each(function() { if (this.setSelectionRange) { this.focus(); @@ -922,6 +922,15 @@ $.fn.selectRange = function(start, end) { }; /** + * check if an element exists. + * allows you to write if ($('#myid').exists()) to increase readability + * @link http://stackoverflow.com/questions/31044/is-there-an-exists-function-for-jquery + */ +jQuery.fn.exists = function(){ + return this.length > 0; +} + +/** * Calls the server periodically every 15 mins to ensure that session doesnt * time out */ |