From b5023d9d57a618242a008432f143fdd8a2f46b1f Mon Sep 17 00:00:00 2001 From: Ivan Filippov Date: Mon, 7 Mar 2016 19:52:54 -0700 Subject: [PATCH] Add code to generate options in 'table-editable.js' to match RECORDS_ALLOW_EDIT in the config.py file. --- app/static/admin/pages/scripts/table-editable.js | 9 +++++++-- app/templates/domain.html | 3 ++- app/views.py | 2 +- config_template.py | 3 +-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/app/static/admin/pages/scripts/table-editable.js b/app/static/admin/pages/scripts/table-editable.js index 88c668b..f253bc5 100644 --- a/app/static/admin/pages/scripts/table-editable.js +++ b/app/static/admin/pages/scripts/table-editable.js @@ -22,9 +22,14 @@ var TableEditable = function () { function editRow(oTable, nRow) { var aData = oTable.fnGetData(nRow); var jqTds = $('>td', nRow); + var record_types = ""; + for(var i = 0; i < records_allow_edit.length; i++) { + var record_type = records_allow_edit[i]; + record_types += ""; + } jqTds[0].innerHTML = ''; //jqTds[1].innerHTML = ''; - jqTds[1].innerHTML = ''; + jqTds[1].innerHTML = ''; jqTds[2].innerHTML = ''; jqTds[3].innerHTML = ''; jqTds[4].innerHTML = ''; @@ -302,4 +307,4 @@ var TableEditable = function () { }; -}(); \ No newline at end of file +}(); diff --git a/app/templates/domain.html b/app/templates/domain.html index 274feb6..eb33cf6 100644 --- a/app/templates/domain.html +++ b/app/templates/domain.html @@ -185,7 +185,8 @@