style: prettier
This commit is contained in:
parent
4b67ebc2f1
commit
0825fd55c0
3 changed files with 51 additions and 31 deletions
|
|
@ -17,7 +17,7 @@ class PhonePicker {
|
|||
this.phone_picker_wrapper = $(`
|
||||
<div class="phone-picker">
|
||||
<div class="search-phones">
|
||||
<input type="search" placeholder="${__('Search for countries...')}" class="form-control">
|
||||
<input type="search" placeholder="${__("Search for countries...")}" class="form-control">
|
||||
<span class="search-phone">${frappe.utils.icon("search", "sm")}</span>
|
||||
</div>
|
||||
<div class="phone-section">
|
||||
|
|
|
|||
|
|
@ -6,11 +6,13 @@ frappe.ui.misc.about = function () {
|
|||
$(d.body).html(
|
||||
repl(
|
||||
`<div>
|
||||
<p>${__('Open Source Applications for the Web')}</p>
|
||||
<p>${__("Open Source Applications for the Web")}</p>
|
||||
<p><i class='fa fa-globe fa-fw'></i>
|
||||
${__('Website')}: <a href='https://frappeframework.com' target='_blank'>https://frappeframework.com</a></p>
|
||||
${__("Website")}:
|
||||
<a href='https://frappeframework.com' target='_blank'>https://frappeframework.com</a></p>
|
||||
<p><i class='fa fa-github fa-fw'></i>
|
||||
${__('Source')}: <a href='https://github.com/frappe' target='_blank'>https://github.com/frappe</a></p>
|
||||
${__("Source")}:
|
||||
<a href='https://github.com/frappe' target='_blank'>https://github.com/frappe</a></p>
|
||||
<p><i class='fa fa-linkedin fa-fw'></i>
|
||||
Linkedin: <a href='https://linkedin.com/company/frappe-tech' target='_blank'>https://linkedin.com/company/frappe-tech</a></p>
|
||||
<p><i class='fa fa-facebook fa-fw'></i>
|
||||
|
|
@ -18,10 +20,10 @@ frappe.ui.misc.about = function () {
|
|||
<p><i class='fa fa-twitter fa-fw'></i>
|
||||
Twitter: <a href='https://twitter.com/erpnext' target='_blank'>https://twitter.com/erpnext</a></p>
|
||||
<hr>
|
||||
<h4>${__('Installed Apps')}</h4>
|
||||
<div id='about-app-versions'>${__('Loading versions...')}</div>
|
||||
<h4>${__("Installed Apps")}</h4>
|
||||
<div id='about-app-versions'>${__("Loading versions...")}</div>
|
||||
<hr>
|
||||
<p class='text-muted'>${__('© Frappe Technologies Pvt. Ltd. and contributors')} </p>
|
||||
<p class='text-muted'>${__("© Frappe Technologies Pvt. Ltd. and contributors")} </p>
|
||||
</div>`,
|
||||
frappe.app
|
||||
)
|
||||
|
|
|
|||
|
|
@ -578,7 +578,9 @@ frappe.views.Workspace = class Workspace {
|
|||
},
|
||||
callback: function (res) {
|
||||
if (res.message) {
|
||||
let message = __("Workspace {0} Edited Successfully", [old_item.title.bold()]);
|
||||
let message = __("Workspace {0} Edited Successfully", [
|
||||
old_item.title.bold(),
|
||||
]);
|
||||
frappe.show_alert({ message: message, indicator: "green" });
|
||||
}
|
||||
},
|
||||
|
|
@ -766,29 +768,37 @@ frappe.views.Workspace = class Workspace {
|
|||
}
|
||||
|
||||
delete_page(page) {
|
||||
frappe.confirm(__("Are you sure you want to delete page {0}?", [page.title.bold()]), () => {
|
||||
frappe.call({
|
||||
method: "frappe.desk.doctype.workspace.workspace.delete_page",
|
||||
args: { page: page },
|
||||
callback: function (res) {
|
||||
if (res.message) {
|
||||
let page = res.message;
|
||||
let message = __("Workspace {0} Deleted Successfully", [page.title.bold()]);
|
||||
frappe.show_alert({ message: message, indicator: "green" });
|
||||
}
|
||||
},
|
||||
});
|
||||
frappe.confirm(
|
||||
__("Are you sure you want to delete page {0}?", [page.title.bold()]),
|
||||
() => {
|
||||
frappe.call({
|
||||
method: "frappe.desk.doctype.workspace.workspace.delete_page",
|
||||
args: { page: page },
|
||||
callback: function (res) {
|
||||
if (res.message) {
|
||||
let page = res.message;
|
||||
let message = __("Workspace {0} Deleted Successfully", [
|
||||
page.title.bold(),
|
||||
]);
|
||||
frappe.show_alert({ message: message, indicator: "green" });
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
this.page.clear_primary_action();
|
||||
this.update_cached_values(page);
|
||||
this.page.clear_primary_action();
|
||||
this.update_cached_values(page);
|
||||
|
||||
if (this.current_page.name == page.title && this.current_page.public == page.public) {
|
||||
frappe.set_route("/");
|
||||
if (
|
||||
this.current_page.name == page.title &&
|
||||
this.current_page.public == page.public
|
||||
) {
|
||||
frappe.set_route("/");
|
||||
}
|
||||
|
||||
this.make_sidebar();
|
||||
this.show_sidebar_actions();
|
||||
}
|
||||
|
||||
this.make_sidebar();
|
||||
this.show_sidebar_actions();
|
||||
});
|
||||
);
|
||||
}
|
||||
|
||||
duplicate_page(page) {
|
||||
|
|
@ -851,7 +861,10 @@ frappe.views.Workspace = class Workspace {
|
|||
callback: function (res) {
|
||||
if (res.message) {
|
||||
let new_page = res.message;
|
||||
let message = __("Duplicate of {0} named as {1} is created successfully", [page.title.bold(), new_page.title.bold()]);
|
||||
let message = __(
|
||||
"Duplicate of {0} named as {1} is created successfully",
|
||||
[page.title.bold(), new_page.title.bold()]
|
||||
);
|
||||
frappe.show_alert({ message: message, indicator: "green" });
|
||||
}
|
||||
},
|
||||
|
|
@ -1071,7 +1084,9 @@ frappe.views.Workspace = class Workspace {
|
|||
},
|
||||
callback: function (res) {
|
||||
if (res.message) {
|
||||
let message = __("Workspace {0} Created Successfully", [new_page.title.bold()]);
|
||||
let message = __("Workspace {0} Created Successfully", [
|
||||
new_page.title.bold(),
|
||||
]);
|
||||
frappe.show_alert({
|
||||
message: message,
|
||||
indicator: "green",
|
||||
|
|
@ -1114,7 +1129,10 @@ frappe.views.Workspace = class Workspace {
|
|||
if (child_pages) {
|
||||
child_pages.every((child_page) => {
|
||||
if (to_pages && to_pages.find((p) => p.title == child_page.title)) {
|
||||
message = __("One of the child page with name {0} already exist in {1} Section. Please update the name of the child page first before moving", [child_page.title.bold(), section.bold()]);
|
||||
message = __(
|
||||
"One of the child page with name {0} already exist in {1} Section. Please update the name of the child page first before moving",
|
||||
[child_page.title.bold(), section.bold()]
|
||||
);
|
||||
cur_dialog.hide();
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue