[Change] 去掉前端html中的hardcode 99991937

This commit is contained in:
ibuler
2017-12-12 14:38:51 +08:00
parent 722863428d
commit cb57002682
28 changed files with 91 additions and 91 deletions

View File

@@ -106,7 +106,7 @@
}
}},
{targets: 7, createdCell: function (td, cellData, rowData) {
var detail_btn = '<a class="btn btn-xs btn-primary m-l-xs btn-run" data-uid="99991937">{% trans "Detail" %}</a>'.replace('99991937', cellData);
var detail_btn = '<a class="btn btn-xs btn-primary m-l-xs btn-run" data-uid="{{ DEFAULT_PK }}">{% trans "Detail" %}</a>'.replace('{{ DEFAULT_PK }}', cellData);
if (cellData) {
$(td).html(detail_btn);
}

View File

@@ -115,7 +115,7 @@
}
}},
{targets: 7, createdCell: function (td, cellData) {
var run_btn = '<a class="btn btn-xs btn-primary m-l-xs btn-run" data-uid="99991937">{% trans "Detail" %}</a>'.replace('99991937', cellData);
var run_btn = '<a class="btn btn-xs btn-primary m-l-xs btn-run" data-uid="{{ DEFAULT_PK }}">{% trans "Detail" %}</a>'.replace('{{ DEFAULT_PK }}', cellData);
if (cellData) {
$(td).html(run_btn);
}

View File

@@ -96,7 +96,7 @@
var $this = $(this);
var name = $(this).closest("tr").find(":nth-child(2)").children('a').html();
var uid = $this.data('uid');
var the_url = '{% url "api-ops:task-detail" pk=99991937 %}'.replace('99991937', uid);
var the_url = '{% url "api-ops:task-detail" pk=DEFAULT_PK %}'.replace('{{ DEFAULT_PK }}', uid);
objectDelete($this, name, the_url);
})
</script>