Rushabh Mehta il y a 11 ans
Parent
révision
bcc98188da
10 fichiers modifiés avec 22 ajouts et 13 suppressions
  1. +1
    -1
      frappe/core/doctype/profile/profile.py
  2. +1
    -0
      frappe/model/db_query.py
  3. +7
    -2
      frappe/public/js/frappe/form/grid.js
  4. +5
    -3
      frappe/public/js/frappe/ui/appframe.js
  5. +1
    -0
      frappe/sessions.py
  6. +1
    -1
      frappe/templates/includes/login.css
  7. +2
    -1
      frappe/website/context.py
  8. +3
    -3
      frappe/website/doctype/website_settings/website_settings.py
  9. +0
    -1
      frappe/website/render.py
  10. +1
    -1
      frappe/website/sitemap.py

+ 1
- 1
frappe/core/doctype/profile/profile.py Voir le fichier

@@ -372,7 +372,7 @@ def profile_query(doctype, txt, searchfield, start, page_len, filters):
then 0 else 1 end,
name asc
limit %(start)s, %(page_len)s""" % {'key': searchfield, 'txt': "%%%s%%" % txt,
'mcond':get_match_cond(doctype, searchfield), 'start': start, 'page_len': page_len})
'mcond':get_match_cond(doctype), 'start': start, 'page_len': page_len})

def get_total_users():
"""Returns total no. of system users"""


+ 1
- 0
frappe/model/db_query.py Voir le fichier

@@ -15,6 +15,7 @@ class DatabaseQuery(object):
self.doctype = doctype
self.tables = []
self.meta = []
self.conditions = []
self.fields = ["name"]
def execute(self, query=None, filters=None, fields=None, docstatus=None,


+ 7
- 2
frappe/public/js/frappe/form/grid.js Voir le fichier

@@ -398,6 +398,7 @@ frappe.ui.form.GridRow = Class.extend({
.toggle(this.grid.is_editable());
},
render_form: function() {
var me = this;
this.make_form();
this.form_area.empty();
@@ -408,11 +409,15 @@ frappe.ui.form.GridRow = Class.extend({
frm: this.frm,
});
this.layout.make();
this.layout.refresh(this.doc)
this.layout.refresh(this.doc);
this.fields = this.layout.fields;
this.fields_dict = this.layout.fields_dict;

// copy get_query to fields
$.each(this.grid.fieldinfo || {}, function(fieldname, fi) {
$.extend(me.fields_dict[fieldname], fi);
})
// var me = this,
// make_row = function(label) {


+ 5
- 3
frappe/public/js/frappe/ui/appframe.js Voir le fichier

@@ -125,7 +125,7 @@ frappe.ui.AppFrame = Class.extend({
if(module_info) {
views.push({
icon: module_info.icon,
route: module_info.link,
route: "Module/" + meta.module,
type: "module"
})
}
@@ -135,11 +135,13 @@ frappe.ui.AppFrame = Class.extend({
route: "",
type: "form",
set_route: function() {
console.log(me.doctype);
if(frappe.views.formview[me.doctype]) {
frappe.set_route("Form", me.doctype, frappe.views.formview[me.doctype].frm.docname);
} else {
new_doc(doctype);
new_doc(me.doctype);
}
return false;
}
});

@@ -182,7 +184,7 @@ frappe.ui.AppFrame = Class.extend({
set_views: function(views, active_view) {
var me = this;
$.each(views, function(i, e) {
var btn = me.add_icon_btn("3", e.icon, frappe._(toTitle(e.type)), function() {
var btn = me.add_icon_btn("3", e.icon, frappe._(toTitle(e.type)), e.set_route || function() {
window.location.hash = "#" + $(this).attr("data-route");
}).attr("data-route", e.route);


+ 1
- 0
frappe/sessions.py Voir le fichier

@@ -75,6 +75,7 @@ def get():
bootinfo = frappe.cache().get_value('bootinfo:' + frappe.session.user)
if bootinfo:
bootinfo['from_cache'] = 1
bootinfo["profile"]["recent"] = json.dumps(frappe.cache().get_value("recent:" + frappe.session.user))
bootinfo["notification_info"].update(get_notifications())
if not bootinfo:


+ 1
- 1
frappe/templates/includes/login.css Voir le fichier

@@ -3,7 +3,7 @@
}

#wrap {
background-color: #eee;
background-color: #f2f2f2;
}
.page-content {
right: 0%;


+ 2
- 1
frappe/website/context.py Voir le fichier

@@ -54,9 +54,10 @@ def build_context(sitemap_options):
if context.controller:
module = frappe.get_module(context.controller)

if module and hasattr(module, "get_context"):
context.update(module.get_context(context) or {})
if context.get("base_template_path") != context.get("template_path") and not context.get("rendered"):
context.data = render_blocks(context)


+ 3
- 3
frappe/website/doctype/website_settings/website_settings.py Voir le fichier

@@ -79,7 +79,7 @@ def get_website_settings():
{"label": "Logout", "url": "?cmd=web_logout", "icon": "icon-signout"}
]
})
settings = frappe.doc("Website Settings", "Website Settings")
for k in ["banner_html", "brand_html", "copyright", "twitter_share_via",
"favicon", "facebook_share", "google_plus_one", "twitter_share", "linked_in_share",
@@ -99,10 +99,10 @@ def get_website_settings():
context.url = quote(str(get_request_site_address(full_address=True)), safe="/:")
context.encoded_title = quote(encode(context.title or ""), str(""))
for update_website_context in hooks.update_website_context or []:
frappe.get_attr(update_website_context)(context)
context.web_include_js = hooks.web_include_js or []
context.web_include_css = hooks.web_include_css or []


+ 0
- 1
frappe/website/render.py Voir le fichier

@@ -53,7 +53,6 @@ def build(path):
build_method = (build_json if is_ajax() else build_page)
try:
return build_method(path)

except frappe.DoesNotExistError:
hooks = frappe.get_hooks()
if hooks.website_catch_all:


+ 1
- 1
frappe/website/sitemap.py Voir le fichier

@@ -26,7 +26,7 @@ def build_sitemap_options(path):
sitemap_config = frappe.doc("Website Template",
sitemap_options.get("website_template")).fields
# get sitemap config fields too
for fieldname in ("base_template_path", "template_path", "controller",
"no_cache", "no_sitemap", "page_name_field", "condition_field"):


Chargement…
Annuler
Enregistrer