remove change buttons for a locked table

This commit is contained in:
Stephen Birarda 2014-10-17 11:24:51 -07:00
parent 7c24186baa
commit 796b519fe0

View file

@ -281,11 +281,13 @@ function makeTable(setting, setting_name, setting_value, isLocked) {
html += "<td class='data'><strong>" + col.label + "</strong></td>" // Data html += "<td class='data'><strong>" + col.label + "</strong></td>" // Data
}) })
if (setting.can_order) { if (!isLocked) {
html += "<td class=" + Settings.REORDER_BUTTONS_CLASSES + if (setting.can_order) {
"><span class='glyphicon glyphicon-sort'></span></td>"; html += "<td class=" + Settings.REORDER_BUTTONS_CLASSES +
} "><span class='glyphicon glyphicon-sort'></span></td>";
}
html += "<td class=" + Settings.ADD_DEL_BUTTONS_CLASSES + "></td></tr>" html += "<td class=" + Settings.ADD_DEL_BUTTONS_CLASSES + "></td></tr>"
}
// populate rows in the table from existing values // populate rows in the table from existing values
var row_num = 1 var row_num = 1
@ -319,13 +321,16 @@ function makeTable(setting, setting_name, setting_value, isLocked) {
html += "</td>" html += "</td>"
}) })
if (setting.can_order) { if (!isLocked) {
html += "<td class='" + Settings.REORDER_BUTTONS_CLASSES+ if (setting.can_order) {
"'><span class='" + Settings.MOVE_UP_SPAN_CLASSES + "'></span><span class='" + html += "<td class='" + Settings.REORDER_BUTTONS_CLASSES+
Settings.MOVE_DOWN_SPAN_CLASSES + "'></span></td>" "'><span class='" + Settings.MOVE_UP_SPAN_CLASSES + "'></span><span class='" +
} Settings.MOVE_DOWN_SPAN_CLASSES + "'></span></td>"
}
html += "<td class='" + Settings.ADD_DEL_BUTTONS_CLASSES + html += "<td class='" + Settings.ADD_DEL_BUTTONS_CLASSES +
"'><span class='" + Settings.DEL_ROW_SPAN_CLASSES + "'></span></td>" "'><span class='" + Settings.DEL_ROW_SPAN_CLASSES + "'></span></td>"
}
html += "</tr>" html += "</tr>"
row_num++ row_num++