style: format js files

This commit is contained in:
Ankush Menat
2024-03-11 10:58:48 +05:30
parent c46be27e9e
commit 4c629d31c6
605 changed files with 27454 additions and 18952 deletions

View File

@@ -1,17 +1,16 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
frappe.ui.form.on("Rename Tool", {
onload: function(frm) {
onload: function (frm) {
return frappe.call({
method: "erpnext.utilities.doctype.rename_tool.rename_tool.get_doctypes",
callback: function(r) {
callback: function (r) {
frm.set_df_property("select_doctype", "options", r.message);
}
},
});
},
refresh: function(frm) {
refresh: function (frm) {
frm.disable_save();
frm.get_field("file_to_rename").df.options = {
@@ -22,14 +21,14 @@ frappe.ui.form.on("Rename Tool", {
if (!frm.doc.file_to_rename) {
frm.get_field("rename_log").$wrapper.html("");
}
frm.page.set_primary_action(__("Rename"), function() {
frm.page.set_primary_action(__("Rename"), function () {
frm.get_field("rename_log").$wrapper.html("<p>Renaming...</p>");
frappe.call({
method: "erpnext.utilities.doctype.rename_tool.rename_tool.upload",
args: {
select_doctype: frm.doc.select_doctype
select_doctype: frm.doc.select_doctype,
},
callback: function(r) {
callback: function (r) {
let html = r.message.join("<br>");
if (r.exc) {
@@ -40,8 +39,8 @@ frappe.ui.form.on("Rename Tool", {
}
frm.get_field("rename_log").$wrapper.html(html);
}
},
});
});
}
})
},
});

View File

@@ -1,8 +1,6 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('SMS Log', {
refresh: function(frm) {
}
frappe.ui.form.on("SMS Log", {
refresh: function (frm) {},
});

View File

@@ -1,7 +1,7 @@
// Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Video', {
frappe.ui.form.on("Video", {
refresh: function (frm) {
frm.events.toggle_youtube_statistics_section(frm);
frm.add_custom_button(__("Watch Video"), () => frappe.help.show_video(frm.doc.url, frm.doc.title));
@@ -9,9 +9,9 @@ frappe.ui.form.on('Video', {
toggle_youtube_statistics_section: (frm) => {
if (frm.doc.provider === "YouTube") {
frappe.db.get_single_value("Video Settings", "enable_youtube_tracking").then( val => {
frappe.db.get_single_value("Video Settings", "enable_youtube_tracking").then((val) => {
frm.toggle_display("youtube_tracking_section", val);
});
}
}
},
});

View File

@@ -1,7 +1,7 @@
frappe.listview_settings["Video"] = {
onload: (listview) => {
listview.page.add_menu_item(__("Video Settings"), function() {
frappe.set_route("Form","Video Settings", "Video Settings");
listview.page.add_menu_item(__("Video Settings"), function () {
frappe.set_route("Form", "Video Settings", "Video Settings");
});
}
}
},
};

View File

@@ -1,8 +1,7 @@
// Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Video Settings', {
frappe.ui.form.on("Video Settings", {
// refresh: function(frm) {
// }
});

View File

@@ -3,7 +3,7 @@
/* eslint-disable */
frappe.query_reports["YouTube Interactions"] = {
"filters": [
filters: [
{
fieldname: "from_date",
label: __("From Date"),
@@ -11,10 +11,10 @@ frappe.query_reports["YouTube Interactions"] = {
default: frappe.datetime.add_months(frappe.datetime.now_date(), -12),
},
{
fieldname:"to_date",
fieldname: "to_date",
label: __("To Date"),
fieldtype: "Date",
default: frappe.datetime.now_date(),
}
]
},
],
};

View File

@@ -1,3 +1,3 @@
frappe.ready(function() {
frappe.ready(function () {
// bind events here
})
});