@@ -60,11 +60,12 @@ function watch() { | |||||
io.emit('reload_css', filename); | io.emit('reload_css', filename); | ||||
} | } | ||||
}); | }); | ||||
watch_js(function (filename) { | |||||
watch_js(//function (filename) { | |||||
// if(socket_connection) { | // if(socket_connection) { | ||||
// io.emit('reload_js', filename); | // io.emit('reload_js', filename); | ||||
// } | // } | ||||
}); | |||||
//} | |||||
); | |||||
watch_build_json(); | watch_build_json(); | ||||
}); | }); | ||||
@@ -8,7 +8,7 @@ frappe.ui.form.on('Calendar View', { | |||||
refresh: function(frm) { | refresh: function(frm) { | ||||
if (!frm.is_new()) { | if (!frm.is_new()) { | ||||
frm.add_custom_button(__('Show Calendar'), | frm.add_custom_button(__('Show Calendar'), | ||||
() => frappe.set_route('List', frm.doc.reference_doctype, 'Calendar', frm.doc.name)) | |||||
() => frappe.set_route('List', frm.doc.reference_doctype, 'Calendar', frm.doc.name)); | |||||
} | } | ||||
}, | }, | ||||
reference_doctype: function(frm) { | reference_doctype: function(frm) { | ||||
@@ -24,7 +24,7 @@ frappe.ui.form.on('Calendar View', { | |||||
const date_options = meta.fields.filter( | const date_options = meta.fields.filter( | ||||
df => ['Date', 'Datetime'].includes(df.fieldtype) | df => ['Date', 'Datetime'].includes(df.fieldtype) | ||||
).map(df => df.fieldname) | |||||
).map(df => df.fieldname); | |||||
frm.set_df_property('subject_field', 'options', subject_options); | frm.set_df_property('subject_field', 'options', subject_options); | ||||
frm.set_df_property('start_date_field', 'options', date_options); | frm.set_df_property('start_date_field', 'options', date_options); | ||||
@@ -3,7 +3,6 @@ | |||||
# For license information, please see license.txt | # For license information, please see license.txt | ||||
from __future__ import unicode_literals | from __future__ import unicode_literals | ||||
import frappe | |||||
from frappe.model.document import Document | from frappe.model.document import Document | ||||
class CalendarView(Document): | class CalendarView(Document): | ||||
@@ -359,7 +359,6 @@ frappe.views.ListRenderer = Class.extend({ | |||||
}, | }, | ||||
render_count: function(current_count) { | render_count: function(current_count) { | ||||
console.log(this) | |||||
const $header_right = this.list_view.list_header.find('.list-item__content--activity'); | const $header_right = this.list_view.list_header.find('.list-item__content--activity'); | ||||
frappe.call({ | frappe.call({ | ||||
@@ -279,8 +279,7 @@ frappe.views.ListSidebar = Class.extend({ | |||||
filters: { | filters: { | ||||
reference_doctype: doctype | reference_doctype: doctype | ||||
} | } | ||||
}) | |||||
.then(result => { | |||||
}).then(result => { | |||||
if (!result) return; | if (!result) return; | ||||
const calendar_views = result; | const calendar_views = result; | ||||
const $link_calendar = this.sidebar.find('.list-link[data-view="Calendar"]'); | const $link_calendar = this.sidebar.find('.list-link[data-view="Calendar"]'); | ||||
@@ -74,11 +74,11 @@ frappe.views.CalendarView = frappe.views.ListRenderer.extend({ | |||||
return new Promise(resolve => { | return new Promise(resolve => { | ||||
if (calendar_view === 'Default') { | if (calendar_view === 'Default') { | ||||
Object.assign(options, frappe.views.calendar[this.doctype]) | |||||
Object.assign(options, frappe.views.calendar[this.doctype]); | |||||
resolve(options); | resolve(options); | ||||
} else { | } else { | ||||
frappe.model.with_doc('Calendar View', calendar_view, (name, r) => { | |||||
frappe.model.with_doc('Calendar View', calendar_view, () => { | |||||
const doc = frappe.get_doc('Calendar View', calendar_view); | const doc = frappe.get_doc('Calendar View', calendar_view); | ||||
Object.assign(options, { | Object.assign(options, { | ||||
field_map: { | field_map: { | ||||