diff options
author | Rouslan Placella <rouslan@placella.com> | 2012-11-09 15:15:33 +0400 |
---|---|---|
committer | Rouslan Placella <rouslan@placella.com> | 2012-11-09 17:23:51 +0400 |
commit | 56335b909a231542081f26619247a380857a7f8a (patch) | |
tree | 32a992cb4ea8bb8bb1383e06ae9120e548b34ca8 /js/server_variables.js | |
parent | 0120d79d9e7430eff5487ed162ea5162ff6d4c97 (diff) |
Use DIV based layout for server variables editor
Diffstat (limited to 'js/server_variables.js')
-rw-r--r-- | js/server_variables.js | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/js/server_variables.js b/js/server_variables.js index 829d8a6b3f..931b099c1c 100644 --- a/js/server_variables.js +++ b/js/server_variables.js @@ -121,19 +121,18 @@ function editVariable(link) varName: varName }, function(data) { if (data.success == true) { - $cell.data('content', $cell.html()).html(''); - - // put edit field and save/cancel link - $cell.prepend( - '<table class="serverVariableEditTable" border="0">' - + '<tr><td><input type="text" value="' + data.message + '" /></td>' - + '<td></td></tr>' - + '</table>' - ); - $cell.find('table td:last').append($mySaveLink); - $cell.find('table td:last').append(' '); - $cell.find('table td:last').append($myCancelLink); - + var $editor = $('<div />', {'class':'serverVariableEditor'}) + .append($myCancelLink) + .append(' ') + .append($mySaveLink) + .append(' ') + .append( + $('<div/>').append( + $('<input />', {type: 'text'}).val(data.message) + ) + ); + // Save and replace content + $cell.data('content', $cell.html()).html($editor); // Keyboard shortcuts to the rescue $cell.find('input').focus().keydown(function(event) { // Enter key |