@@ -86,7 +86,7 @@ doc_events = { | |||||
scheduler_events = { | scheduler_events = { | ||||
"all": [ | "all": [ | ||||
"frappe.email.bulk.flush", | "frappe.email.bulk.flush", | ||||
"frappe.tasks.pull_emails" | |||||
"frappe.tasks.pull_from_email_account" | |||||
], | ], | ||||
"daily": [ | "daily": [ | ||||
"frappe.email.bulk.clear_outbox", | "frappe.email.bulk.clear_outbox", | ||||
@@ -70,9 +70,12 @@ frappe.ui.Listing = Class.extend({ | |||||
<div class="list-filters" style="display: none;">\ | <div class="list-filters" style="display: none;">\ | ||||
<div class="show_filters">\ | <div class="show_filters">\ | ||||
<div class="set-filters">\ | <div class="set-filters">\ | ||||
<button class="btn btn-primary btn-sm btn-new hide" \ | |||||
style="margin-bottom: 10px; margin-right: 5px;">\ | |||||
<i class="icon-plus"></i> '+__("New")+'</button>\ | |||||
<button class="btn btn-default btn-sm new-filter text-muted" \ | <button class="btn btn-default btn-sm new-filter text-muted" \ | ||||
style="margin-bottom: 10px">\ | style="margin-bottom: 10px">\ | ||||
<i class="icon-plus"></i> '+__("Add Filter")+'</button>\ | |||||
<i class="icon-filter"></i> '+__("Add Filter")+'</button>\ | |||||
</div>\ | </div>\ | ||||
<div class="filter_area"></div>\ | <div class="filter_area"></div>\ | ||||
</div>\ | </div>\ | ||||
@@ -167,13 +170,17 @@ frappe.ui.Listing = Class.extend({ | |||||
// new | // new | ||||
if(this.new_doctype) { | if(this.new_doctype) { | ||||
if(this.appframe) { | |||||
this.appframe.set_title_right("<i class='icon-plus'></i> " + __('New'), function() { | |||||
(me.custom_new_doc || me.make_new_doc).apply(me, [me.new_doctype]); }); | |||||
} | |||||
this.add_button(__('New'), function() { | |||||
(me.custom_new_doc || me.make_new_doc).apply(me, [me.new_doctype]); | |||||
}, 'icon-plus'); | |||||
var make_new_doc = function() { (me.custom_new_doc || me.make_new_doc).apply(me, [me.new_doctype]); }; | |||||
// if(this.appframe) { | |||||
// this.appframe.set_title_right("<i class='icon-plus'></i> " + __('New'), function() { | |||||
// make_new_doc(); }); | |||||
// } | |||||
// this.add_button(__('New'), function() { | |||||
// make_new_doc(); | |||||
// }, 'icon-plus'); | |||||
this.$w.find(".btn-new").removeClass("hide").on("click", function() { make_new_doc(); }); | |||||
} | } | ||||
// hide-filter | // hide-filter | ||||
@@ -14,11 +14,11 @@ | |||||
<div class="panel-body"> | <div class="panel-body"> | ||||
<div class="form-group"> | <div class="form-group"> | ||||
<input id="old_password" type="password" | <input id="old_password" type="password" | ||||
class="form-control" placeholder='"' + {{_("Old Password")}} + '"'> | |||||
class="form-control" placeholder="{{ _("Old Password") }}"> | |||||
</div> | </div> | ||||
<div class="form-group"> | <div class="form-group"> | ||||
<input id="new_password" type="password" | <input id="new_password" type="password" | ||||
class="form-control" placeholder='"' + {{_("New Password")}} + '"'> | |||||
class="form-control" placeholder="{{ _("New Password") }}"> | |||||
</div> | </div> | ||||
<div class="form-group"> | <div class="form-group"> | ||||
<button type="submit" id="update" | <button type="submit" id="update" | ||||
@@ -36,18 +36,18 @@ $(document).ready(function() { | |||||
if(get_url_arg("key")) { | if(get_url_arg("key")) { | ||||
$("#old_password").parent().toggle(false); | $("#old_password").parent().toggle(false); | ||||
} | } | ||||
$("#new_password").on("keypress", function(e) { | $("#new_password").on("keypress", function(e) { | ||||
if(e.which===13) $("#update").click(); | if(e.which===13) $("#update").click(); | ||||
}) | }) | ||||
$("#update").click(function() { | $("#update").click(function() { | ||||
var args = { | var args = { | ||||
key: get_url_arg("key") || "", | key: get_url_arg("key") || "", | ||||
old_password: $("#old_password").val(), | old_password: $("#old_password").val(), | ||||
new_password: $("#new_password").val() | new_password: $("#new_password").val() | ||||
} | } | ||||
if(!args.old_password && !args.key) { | if(!args.old_password && !args.key) { | ||||
frappe.msgprint("Old Password Required."); | frappe.msgprint("Old Password Required."); | ||||
return; | return; | ||||
@@ -56,7 +56,7 @@ $(document).ready(function() { | |||||
frappe.msgprint("New Password Required.") | frappe.msgprint("New Password Required.") | ||||
return; | return; | ||||
} | } | ||||
frappe.call({ | frappe.call({ | ||||
type: "POST", | type: "POST", | ||||
method: "frappe.core.doctype.user.user.update_password", | method: "frappe.core.doctype.user.user.update_password", | ||||
@@ -76,4 +76,4 @@ $(document).ready(function() { | |||||
}); | }); | ||||
</script> | </script> | ||||
{% endblock %} | |||||
{% endblock %} |