summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-09-29 14:45:58 +0000
committerTed Trask <ttrask01@yahoo.com>2014-09-29 14:46:20 +0000
commit5b9b0aab9782c6119f1523584c718ce490f59c53 (patch)
treefbd03933adbb931d16802720cba6b786379a15fd
parent4b794aac6a7ec3b3fc05199731d3bf85e05259ef (diff)
downloadacf-freeradius3-5b9b0aab9782c6119f1523584c718ce490f59c53.tar.bz2
acf-freeradius3-5b9b0aab9782c6119f1523584c718ce490f59c53.tar.xz
Move + for new line creation to the beginning of editmacauthfile HTML view
(cherry picked from commit 7129ea88b61aee345121503fe02196e6572d15ef)
-rw-r--r--freeradius3-editmacauthfile-html.lsp6
1 files changed, 3 insertions, 3 deletions
diff --git a/freeradius3-editmacauthfile-html.lsp b/freeradius3-editmacauthfile-html.lsp
index c604d82..940abf2 100644
--- a/freeradius3-editmacauthfile-html.lsp
+++ b/freeradius3-editmacauthfile-html.lsp
@@ -14,13 +14,13 @@
</td>';
var addEntry = '<tr><td> \
<a href="javascript:;"><img src="<%= html.html_escape(page_info.wwwprefix..page_info.staticdir) %>/tango/16x16/actions/list-add.png" width="16" height="16" title="Insert entry"></a> \
- </td></tr>';
+ </td><td></td></tr>';
function deleteLine(){
$(this).parent().parent().replaceWith();
}
function addLine(){
- addLinks($(this).parent().parent().before('<tr><td><input type="text" value=""></td></tr>').prev());
+ addLinks($(this).parent().parent().after('<tr><td><input type="text" value=""></td></tr>').next());
}
function addLinks(rows){
rows.each(function(){
@@ -66,7 +66,7 @@
});
$("#entries").find("input").each(validateLine);
addLinks($("#entries").find("tr"));
- $("#entries").append(addEntry).find("a:last").click(addLine);
+ $("#entries").prepend(addEntry).find("a:first").click(addLine);
$("form").submit(submitFile);
});
</script>