Replaced text fields for ordering summary bar with movement buttons (CSS styling needed)

This commit is contained in:
str4d
2012-07-09 07:59:41 +00:00
parent 75046d11fb
commit c9fc3f11a6
2 changed files with 59 additions and 3 deletions

View File

@ -811,11 +811,36 @@ public class SummaryHelper extends HelperBase {
int i = sections.indexOf(section);
buf.append("<tr><td align=\"center\"><input type=\"checkbox\" class=\"optbox\" name=\"delete_")
.append(i)
.append("\"></td><td align=\"center\"><input type=\"text\" name=\"order_")
.append("\"></td><td align=\"center\"><input type=\"hidden\" name=\"order_")
.append(i + "_" + section)
.append("\" value=\"")
.append(i)
.append("\"></td><td align=\"left\">")
.append("\">");
if (i > 0) {
buf.append("<input type=\"submit\" class=\"buttonTop\" name=\"action\" value=\"[")
.append(i)
.append("] ")
.append(_("Top"))
.append("\">");
buf.append("<input type=\"submit\" class=\"buttonUp\" name=\"action\" value=\"[")
.append(i)
.append("] ")
.append(_("Up"))
.append("\">");
}
if (i < sections.size() - 1) {
buf.append("<input type=\"submit\" class=\"buttonDown\" name=\"action\" value=\"[")
.append(i)
.append("] ")
.append(_("Down"))
.append("\">");
buf.append("<input type=\"submit\" class=\"buttonBottom\" name=\"action\" value=\"[")
.append(i)
.append("] ")
.append(_("Bottom"))
.append("\">");
}
buf.append("</td><td align=\"left\">")
.append(section)
.append("</td></tr>\n");
}