Преглед изворни кода

Fixed merge conflict

version-14
Nabin Hait пре 7 година
родитељ
комит
3a34055700
5 измењених фајлова са 6 додато и 39 уклоњено
  1. +1
    -1
      frappe/__init__.py
  2. +3
    -16
      frappe/public/js/frappe/list/list_renderer.js
  3. +1
    -9
      frappe/public/js/frappe/ui/base_list.js
  4. +0
    -12
      frappe/public/js/frappe/ui/filters/filters.js
  5. +1
    -1
      frappe/website/render.py

+ 1
- 1
frappe/__init__.py Прегледај датотеку

@@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json
from .exceptions import *
from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template

__version__ = '10.0.18'
__version__ = '10.0.19'
__title__ = "Frappe Framework"

local = Local()


+ 3
- 16
frappe/public/js/frappe/list/list_renderer.js Прегледај датотеку

@@ -3,10 +3,9 @@

frappe.provide('frappe.views');

/**
* Renders customized list. Usually based on `in_list_view` property.
* It carries information that is used in frappe.views.ListView
*/
// Renders customized list
// usually based on `in_list_view` property

frappe.views.ListRenderer = Class.extend({
name: 'List',
init: function (opts) {
@@ -39,7 +38,6 @@ frappe.views.ListRenderer = Class.extend({

// default settings
this.order_by = this.order_by || 'modified desc';
this.group_by = this.group_by || '';
this.filters = this.filters || [];
this.or_filters = this.or_filters || [];
this.page_length = this.page_length || 20;
@@ -56,7 +54,6 @@ frappe.views.ListRenderer = Class.extend({
this.init_user_settings();

this.order_by = this.user_settings.order_by || this.settings.order_by;
this.group_by = this.get_group_by();
this.filters = this.user_settings.filters || this.settings.filters;
this.page_length = this.settings.page_length;

@@ -65,16 +62,6 @@ frappe.views.ListRenderer = Class.extend({
this.filters = [[this.doctype, "docstatus", "!=", 2]];
}
},

/**
* Get the name of the column to use in SQL `group by`.
* It defaults to 'creation'
*/
get_group_by: function() {
const default_column = this.settings.group_by || 'creation';
const group_by = $.format('`tab{0}`.`{1}`', [this.doctype, default_column]);
return group_by;
},
init_user_settings: function () {
frappe.provide('frappe.model.user_settings.' + this.doctype + '.' + this.name);
this.user_settings = frappe.get_user_settings(this.doctype)[this.name];


+ 1
- 9
frappe/public/js/frappe/ui/base_list.js Прегледај датотеку

@@ -265,10 +265,6 @@ frappe.ui.BaseList = Class.extend({
this.onreset && this.onreset();
},

/*
* Uses the value of `frappe.route_options` to automatically set
* a filter in a list view.
*/
set_filters_from_route_options: function ({clear_filters=true} = {}) {
var me = this;
if(this.filter_list && clear_filters) {
@@ -372,12 +368,8 @@ frappe.ui.BaseList = Class.extend({
}
}
},

/*
* Prepares arguments that will be used to query the database to
* return the desired records for the list view
*/
get_call_args: function () {
// load query
if (!this.method) {
var query = this.get_query && this.get_query() || this.query;
query = this.add_limits(query);


+ 0
- 12
frappe/public/js/frappe/ui/filters/filters.js Прегледај датотеку

@@ -46,9 +46,6 @@ frappe.ui.FilterList = Class.extend({
}
},

/*
* Removes all filters.
*/
clear_filters: function() {
$.each(this.filters, function(i, f) { f.remove(true); });
if(this.base_list.page.fields_dict) {
@@ -59,15 +56,6 @@ frappe.ui.FilterList = Class.extend({
this.filters = [];
},

/*
* Adds a new filter.
* @param {string} doctype
* @param {string} fieldname
* @param {string} condition
* @param {string} value
* @param {string} hidden
* @returns {Boolean} - Returns true if filter is added
*/
add_filter: function(doctype, fieldname, condition, value, hidden) {
// adds a new filter, returns true if filter has been added



+ 1
- 1
frappe/website/render.py Прегледај датотеку

@@ -80,7 +80,7 @@ def is_static_file(path):
if ('.' not in path):
return False
extn = path.rsplit('.', 1)[-1]
if extn in ('html', 'md', 'js', 'xml', 'css', 'txt'):
if extn in ('html', 'md', 'js', 'xml', 'css', 'txt', 'py'):
return False

for app in frappe.get_installed_apps():


Loading…
Откажи
Сачувај