Kaynağa Gözat

[fix] [ux] email & listview

version-14
Rushabh Mehta 10 yıl önce
ebeveyn
işleme
c8545b3de1
3 değiştirilmiş dosya ile 23 ekleme ve 16 silme
  1. +1
    -1
      frappe/hooks.py
  2. +15
    -8
      frappe/public/js/frappe/ui/listing.js
  3. +7
    -7
      frappe/templates/pages/update-password.html

+ 1
- 1
frappe/hooks.py Dosyayı Görüntüle

@@ -86,7 +86,7 @@ doc_events = {
scheduler_events = {
"all": [
"frappe.email.bulk.flush",
"frappe.tasks.pull_emails"
"frappe.tasks.pull_from_email_account"
],
"daily": [
"frappe.email.bulk.clear_outbox",


+ 15
- 8
frappe/public/js/frappe/ui/listing.js Dosyayı Görüntüle

@@ -70,9 +70,12 @@ frappe.ui.Listing = Class.extend({
<div class="list-filters" style="display: none;">\
<div class="show_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" \
style="margin-bottom: 10px">\
<i class="icon-plus"></i> '+__("Add Filter")+'</button>\
<i class="icon-filter"></i> '+__("Add Filter")+'</button>\
</div>\
<div class="filter_area"></div>\
</div>\
@@ -167,13 +170,17 @@ frappe.ui.Listing = Class.extend({

// new
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


+ 7
- 7
frappe/templates/pages/update-password.html Dosyayı Görüntüle

@@ -14,11 +14,11 @@
<div class="panel-body">
<div class="form-group">
<input id="old_password" type="password"
class="form-control" placeholder='"' + {{_("Old Password")}} + '"'>
class="form-control" placeholder="{{ _("Old Password") }}">
</div>
<div class="form-group">
<input id="new_password" type="password"
class="form-control" placeholder='"' + {{_("New Password")}} + '"'>
class="form-control" placeholder="{{ _("New Password") }}">
</div>
<div class="form-group">
<button type="submit" id="update"
@@ -36,18 +36,18 @@ $(document).ready(function() {
if(get_url_arg("key")) {
$("#old_password").parent().toggle(false);
}
$("#new_password").on("keypress", function(e) {
if(e.which===13) $("#update").click();
})
$("#update").click(function() {
var args = {
key: get_url_arg("key") || "",
old_password: $("#old_password").val(),
new_password: $("#new_password").val()
}
if(!args.old_password && !args.key) {
frappe.msgprint("Old Password Required.");
return;
@@ -56,7 +56,7 @@ $(document).ready(function() {
frappe.msgprint("New Password Required.")
return;
}
frappe.call({
type: "POST",
method: "frappe.core.doctype.user.user.update_password",
@@ -76,4 +76,4 @@ $(document).ready(function() {
});

</script>
{% endblock %}
{% endblock %}

Yükleniyor…
İptal
Kaydet