diff options
author | Rouslan Placella <rouslan@placella.com> | 2012-11-09 17:20:00 +0400 |
---|---|---|
committer | Rouslan Placella <rouslan@placella.com> | 2012-11-09 19:13:23 +0400 |
commit | 14a7be6e3784c4f5ceaa8328cc0ef67f1a9f6abd (patch) | |
tree | 52828060fcc2204f22a55032f69e9f87d86cc68c /js/server_variables.js | |
parent | 4acb613eea5e4bf530ece0a0c295cfe69f7661e3 (diff) |
Fixed direct linking to server variable name
Diffstat (limited to 'js/server_variables.js')
-rw-r--r-- | js/server_variables.js | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/js/server_variables.js b/js/server_variables.js index 5108426d77..474cbd0eb3 100644 --- a/js/server_variables.js +++ b/js/server_variables.js @@ -27,6 +27,12 @@ AJAX.registerOnload('server_variables.js', function() { } }); + /* Launches the variable editor */ + $('a.editLink').live('click', function (event) { + event.preventDefault(); + editVariable(this); + }); + /* Event handler for variables filter */ $('#filterText').keyup(function() { var textFilter = null, val = $(this).val(); @@ -36,20 +42,10 @@ AJAX.registerOnload('server_variables.js', function() { filterVariables(textFilter); }); - /* Launches the variable editor */ - $('a.editLink').live('click', function (event) { - event.preventDefault(); - editVariable(this); - }); - - /* FIXME: this seems broken as we now use the hash for the microhistory - if (location.hash.substr(1).split('=')[0] == 'filter') { - var name = location.hash.substr(1).split('=')[1]; - // Only allow variable names - if (! name.match(/[^0-9a-zA-Z_]+/)) { - $('#filterText').val(name).trigger('keyup'); - } - }*/ + /* Trigger filtering of the list based on incoming variable name */ + if ($('#filterText').val()) { + $('#filterText').trigger('keyup').select(); + } /* Filters the rows by the user given regexp */ function filterVariables(textFilter) { |