diff --git a/application/admin/view/forecast/index.html b/application/admin/view/forecast/index.html index 6344570..1ecf81f 100644 --- a/application/admin/view/forecast/index.html +++ b/application/admin/view/forecast/index.html @@ -37,7 +37,15 @@ -
关闭
+
+
+ 删除此记录 +
+
+ 编辑温湿度 + 关闭 +
+
diff --git a/public/assets/js/backend/forecast.js b/public/assets/js/backend/forecast.js index 99ee85f..7cde5ac 100644 --- a/public/assets/js/backend/forecast.js +++ b/public/assets/js/backend/forecast.js @@ -81,6 +81,20 @@ define(['jquery', 'bootstrap', 'backend', 'backend/forecast/components'], functi }); }).catch(function () {}); }, + deleteFromDetail: function () { + if (this.selected) { + this.deleteRecord(this.selected); + } + }, + editFromDetail: function () { + var self = this; + if (this.selected) { + var rec = this.selected; + this.closeDetail(function () { + self.editRecord(rec); + }); + } + }, write: function (action, data, callback) { if (this.saving) return; var self = this;