fix codacy

This commit is contained in:
Faris Ansari 2017-10-24 18:40:17 +05:30
parent b2a6a86e15
commit 0176e202fa
6 changed files with 8 additions and 10 deletions

View file

@ -60,11 +60,12 @@ function watch() {
io.emit('reload_css', filename);
}
});
watch_js(function (filename) {
watch_js(//function (filename) {
// if(socket_connection) {
// io.emit('reload_js', filename);
// }
});
//}
);
watch_build_json();
});

View file

@ -8,7 +8,7 @@ frappe.ui.form.on('Calendar View', {
refresh: function(frm) {
if (!frm.is_new()) {
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) {
@ -24,7 +24,7 @@ frappe.ui.form.on('Calendar View', {
const date_options = meta.fields.filter(
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('start_date_field', 'options', date_options);

View file

@ -3,7 +3,6 @@
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class CalendarView(Document):

View file

@ -359,7 +359,6 @@ frappe.views.ListRenderer = Class.extend({
},
render_count: function(current_count) {
console.log(this)
const $header_right = this.list_view.list_header.find('.list-item__content--activity');
frappe.call({

View file

@ -279,8 +279,7 @@ frappe.views.ListSidebar = Class.extend({
filters: {
reference_doctype: doctype
}
})
.then(result => {
}).then(result => {
if (!result) return;
const calendar_views = result;
const $link_calendar = this.sidebar.find('.list-link[data-view="Calendar"]');

View file

@ -74,11 +74,11 @@ frappe.views.CalendarView = frappe.views.ListRenderer.extend({
return new Promise(resolve => {
if (calendar_view === 'Default') {
Object.assign(options, frappe.views.calendar[this.doctype])
Object.assign(options, frappe.views.calendar[this.doctype]);
resolve(options);
} 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);
Object.assign(options, {
field_map: {