Ver a proveniência

no nprogress for push-state

version-14
Rushabh Mehta há 11 anos
ascendente
cometimento
ca8f59652a
2 ficheiros alterados com 2 adições e 25 eliminações
  1. +2
    -2
      frappe/website/js/website.js
  2. +0
    -23
      frappe/widgets/query_builder.py

+ 2
- 2
frappe/website/js/website.js Ver ficheiro

@@ -248,13 +248,13 @@ $.extend(frappe, {
window.previous_href = href; window.previous_href = href;
history.pushState(null, null, href); history.pushState(null, null, href);
NProgress.start();
//NProgress.start();
$.ajax({ url: href, cache: false }).done(function(data) { $.ajax({ url: href, cache: false }).done(function(data) {
history.replaceState(data, data.title, href); history.replaceState(data, data.title, href);
$("html, body").animate({ scrollTop: 0 }, "slow"); $("html, body").animate({ scrollTop: 0 }, "slow");
frappe.render_json(data); frappe.render_json(data);
}).always(function() { }).always(function() {
NProgress.done();
//NProgress.done();
}).fail(function(xhr, status, error) { }).fail(function(xhr, status, error) {
if(!xhr.responseText && status==="error") { if(!xhr.responseText && status==="error") {
// ajax failed without response. Try reloading the full page. // ajax failed without response. Try reloading the full page.


+ 0
- 23
frappe/widgets/query_builder.py Ver ficheiro

@@ -76,29 +76,6 @@ def add_match_conditions(q, tl):
return q return q


def exec_report(code, res, colnames=[], colwidths=[], coltypes=[], coloptions=[], filter_values={}, query='', from_export=0):
col_idx, i, out, style, header_html, footer_html, page_template = {}, 0, None, [], '', '', ''
for c in colnames:
col_idx[c] = i
i+=1

# load globals (api)
from frappe import *
from frappe.utils import *
from frappe.model.doc import *

set = frappe.db.set
get_value = frappe.db.get_value
convert_to_lists = frappe.db.convert_to_lists
NEWLINE = '\n'

exec str(code)

if out!=None:
res = out

return res, style, header_html, footer_html, page_template

def guess_type(m): def guess_type(m):
""" """
Returns fieldtype depending on the MySQLdb Description Returns fieldtype depending on the MySQLdb Description


Carregando…
Cancelar
Guardar