diff options
author | Git <git@what.cd> | 2013-08-28 23:08:41 +0000 |
---|---|---|
committer | Git <git@what.cd> | 2013-08-28 23:08:41 +0000 |
commit | 3e3fdfb804b3faea02df1c0a40ed2cba3b5f3663 (patch) | |
tree | 0dfbaae1ba2bc758afcdf45dacb3471552f9849c /static/functions/script_start.js | |
parent | db7ddd03782cae2be19499450d3948c5950e43fa (diff) | |
download | Gazelle-3e3fdfb804b3faea02df1c0a40ed2cba3b5f3663.zip Gazelle-3e3fdfb804b3faea02df1c0a40ed2cba3b5f3663.tar.gz Gazelle-3e3fdfb804b3faea02df1c0a40ed2cba3b5f3663.tar.bz2 |
Empty commit
Diffstat (limited to 'static/functions/script_start.js')
-rw-r--r-- | static/functions/script_start.js | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/static/functions/script_start.js b/static/functions/script_start.js index b6f43de..434cb06 100644 --- a/static/functions/script_start.js +++ b/static/functions/script_start.js @@ -199,17 +199,32 @@ function URL() { var path = path[path.length - 1].split(".")[0]; var splitted = window.location.search.substr(1).split("&"); var query = {}; + var length = 0; for (var i = 0; i < splitted.length; i++) { var q = splitted[i].split("="); - query[q[0]] = q[1]; + if(q != "") { + query[q[0]] = q[1]; + length++; + } }; - + query['length'] = length; var response = new Array(); response['path'] = path; response['query'] = query; return response; } +function isNumberKey(e) { + var charCode = (e.which) ? e.which : e.keyCode + if (charCode == 46) { + return true; + } + if (charCode > 31 && (charCode < 48 || charCode > 57)) { + return false; + } + return true; +} + // jQuery plugin to prevent double submission of forms jQuery.fn.preventDoubleSubmission = function() { $(this).bind('submit', function(e){ @@ -228,7 +243,7 @@ jQuery.fn.preventDoubleSubmission = function() { return this; }; -jQuery.extend(jQuery.prototype, { +$.fn.extend({ results: function () { return this.size(); }, @@ -348,5 +363,12 @@ jQuery.extend(jQuery.prototype, { here = here.nextSibling; } while (here.nodeType != 1); return $(here); + }, + updateTooltip: function(tooltip) { + if ($.fn.tooltipster) { + $(this).tooltipster('update', tooltip); + } else { + $(this).attr('title', tooltip); + } } }); |