From 559011404a94e72f0c14457c7791ec8f0c3b66dd Mon Sep 17 00:00:00 2001 From: Shreya Date: Thu, 22 Mar 2018 11:40:38 +0530 Subject: [PATCH] removed timesheet.html, appended it as a helper function --- .../projects/doctype/timesheet/timesheet.html | 11 ---------- erpnext/public/js/projects/timer.js | 21 ++++++++++++++++--- 2 files changed, 18 insertions(+), 14 deletions(-) delete mode 100644 erpnext/projects/doctype/timesheet/timesheet.html diff --git a/erpnext/projects/doctype/timesheet/timesheet.html b/erpnext/projects/doctype/timesheet/timesheet.html deleted file mode 100644 index 5aab517c55..0000000000 --- a/erpnext/projects/doctype/timesheet/timesheet.html +++ /dev/null @@ -1,11 +0,0 @@ -
- 00 - : - 00 - : - 00 -
-
- - -
diff --git a/erpnext/public/js/projects/timer.js b/erpnext/public/js/projects/timer.js index c97c7d1391..1751fc170f 100644 --- a/erpnext/public/js/projects/timer.js +++ b/erpnext/public/js/projects/timer.js @@ -21,12 +21,27 @@ erpnext.timesheet.timer = function(frm, row, timestamp=0) { 'expected_hours': row.expected_hours }); } - dialog.get_field("timer_html").$wrapper.append(frappe.render_template("timesheet")); - control_timer(frm, dialog, row, timestamp); + dialog.get_field("timer_html").$wrapper.append(get_timer_html()); + function get_timer_html() { + return ` +
+ 00 + : + 00 + : + 00 +
+
+ + +
+ `; + }; + erpnext.timesheet.control_timer(frm, dialog, row, timestamp); dialog.show(); }; -var control_timer = function(frm, dialog, row, timestamp=0) { +erpnext.timesheet.control_timer = function(frm, dialog, row, timestamp=0) { var $btn_start = $(".playpause .btn-start"); var $btn_complete = $(".playpause .btn-complete"); var interval = null;