Merge branch 'shf_rename' of github.com:webnotes/erpnext into shf_rename
This commit is contained in:
commit
c68635d70a
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -7,7 +7,7 @@ wn.doclistviews['Journal Voucher'] = wn.views.ListView.extend({
|
||||
'`tabJournal Voucher`.total_debit',
|
||||
'`tabJournal Voucher`.company',
|
||||
]);
|
||||
this.stats = this.stats.concat(['voucher_type']);
|
||||
this.stats = this.stats.concat(['voucher_type', 'company']);
|
||||
},
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
|
@ -4,8 +4,9 @@ wn.doclistviews['Supplier'] = wn.views.ListView.extend({
|
||||
this._super(d)
|
||||
this.fields = this.fields.concat([
|
||||
"`tabSupplier`.supplier_type",
|
||||
"`tabSupplier`.supplier_name",
|
||||
]);
|
||||
this.stats = this.stats.concat([]);
|
||||
//this.stats = this.stats.concat(['company']);
|
||||
},
|
||||
|
||||
prepare_data: function(data) {
|
||||
@ -14,7 +15,8 @@ wn.doclistviews['Supplier'] = wn.views.ListView.extend({
|
||||
|
||||
columns: [
|
||||
{width: '5%', content:'avatar'},
|
||||
{width: '50%', content:'name'},
|
||||
{width: '20%', content:'name'},
|
||||
{width: '30%', content:'supplier_name'},
|
||||
{width: '10%', content:'tags'},
|
||||
{width: '23%', content:'supplier_type', css: {'color': '#aaa'}},
|
||||
{width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
|
||||
|
31
erpnext/hr/doctype/appraisal/listview.js
Normal file
31
erpnext/hr/doctype/appraisal/listview.js
Normal file
@ -0,0 +1,31 @@
|
||||
// render
|
||||
wn.doclistviews['Appraisal'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d)
|
||||
this.fields = this.fields.concat([
|
||||
"`tabAppraisal`.employee_name",
|
||||
"`tabAppraisal`.start_date",
|
||||
"`tabAppraisal`.end_date",
|
||||
"`tabAppraisal`.total_score",
|
||||
"`tabAppraisal`.status",
|
||||
]);
|
||||
this.stats = this.stats.concat(['company']);
|
||||
},
|
||||
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
data.start_date = wn.datetime.str_to_user(data.start_date);
|
||||
data.end_date = wn.datetime.str_to_user(data.end_date);
|
||||
data.date_range = data.start_date + " to " + data.end_date;
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '3%', content: 'docstatus'},
|
||||
{width: '15%', content: 'name'},
|
||||
{width: '28%', content: 'employee_name'},
|
||||
{width: '12%', content: 'status+tags'},
|
||||
{width: '12%', content: 'total_score', css: {'text-align': 'right'}},
|
||||
{width: '30%', content:'date_range',
|
||||
css: {'text-align': 'right', 'color': '#777'}},
|
||||
]
|
||||
});
|
28
erpnext/hr/doctype/attendance/listview.js
Normal file
28
erpnext/hr/doctype/attendance/listview.js
Normal file
@ -0,0 +1,28 @@
|
||||
// render
|
||||
wn.doclistviews['Attendance'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d)
|
||||
this.fields = this.fields.concat([
|
||||
"`tabAttendance`.att_date",
|
||||
"`tabAttendance`.employee_name",
|
||||
"`tabAttendance`.`status`",
|
||||
|
||||
]);
|
||||
this.stats = this.stats.concat(['company']);
|
||||
},
|
||||
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
data.att_date = wn.datetime.str_to_user(data.att_date);
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '3%', content:'docstatus'},
|
||||
{width: '12%', content:'name'},
|
||||
{width: '50%', content:'employee_name'},
|
||||
{width: '13%', content:'status'},
|
||||
{width: '10%', content:'tags'},
|
||||
//{width: '23%', content:'supplier_type', css: {'color': '#aaa'}},
|
||||
{width: '12%', content:'att_date', css: {'text-align': 'right', 'color':'#777'}}
|
||||
]
|
||||
});
|
46
erpnext/hr/doctype/employee/listview.js
Normal file
46
erpnext/hr/doctype/employee/listview.js
Normal file
@ -0,0 +1,46 @@
|
||||
// render
|
||||
wn.doclistviews['Employee'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d)
|
||||
this.fields = this.fields.concat([
|
||||
"`tabEmployee`.employee_name",
|
||||
"`tabEmployee`.employee_number",
|
||||
"`tabEmployee`.employment_type",
|
||||
"`tabEmployee`.designation",
|
||||
"`tabEmployee`.department",
|
||||
"`tabEmployee`.branch",
|
||||
"`tabEmployee`.company",
|
||||
"`tabEmployee`.reports_to",
|
||||
"`tabEmployee`.date_of_joining",
|
||||
]);
|
||||
this.stats = this.stats.concat(['company']);
|
||||
},
|
||||
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
|
||||
data.employee_name = data.employee_name
|
||||
+ (data.employee_number ? ' [' + data.employee_number + ']' : '');
|
||||
|
||||
data.date_of_joining = wn.datetime.str_to_user(data.date_of_joining);
|
||||
data.designation = data.designation
|
||||
+ (data.employment_type ? ' [' + data.employment_type + ']' : '');
|
||||
|
||||
var concat_list = [];
|
||||
data.designation && concat_list.push(data.designation);
|
||||
data.department && concat_list.push(data.department);
|
||||
data.company && concat_list.push(data.company);
|
||||
data.branch && concat_list.push(data.branch);
|
||||
data.description = concat_list.join(", ");
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '3%', content: 'docstatus'},
|
||||
{width: '12%', content: 'name'},
|
||||
{width: '25%', content: 'employee_name'},
|
||||
{width: '48%', content: 'description+tags',
|
||||
css: {'color': '#aaa'}},
|
||||
{width: '12%', content:'date_of_joining',
|
||||
css: {'text-align': 'right', 'color': '#777'}},
|
||||
]
|
||||
});
|
41
erpnext/hr/doctype/expense_claim/listview.js
Normal file
41
erpnext/hr/doctype/expense_claim/listview.js
Normal file
@ -0,0 +1,41 @@
|
||||
// render
|
||||
wn.doclistviews['Expense Claim'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d)
|
||||
this.fields = this.fields.concat([
|
||||
"`tabExpense Claim`.employee_name",
|
||||
"`tabExpense Claim`.posting_date",
|
||||
"`tabExpense Claim`.approval_status",
|
||||
"`tabExpense Claim`.total_claimed_amount",
|
||||
"`tabExpense Claim`.total_sanctioned_amount",
|
||||
"`tabExpense Claim`.company",
|
||||
]);
|
||||
this.stats = this.stats.concat(['company']);
|
||||
},
|
||||
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
data.posting_date = wn.datetime.str_to_user(data.posting_date);
|
||||
data.employee_name = data.employee_name + 'claimed '
|
||||
+ wn.boot.company[data.company].default_currency + ' '
|
||||
+ fmt_money(data.total_claimed_amount);
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '5%', content: 'avatar'},
|
||||
{width: '3%', content: 'docstatus'},
|
||||
{width: '12%', content: 'name'},
|
||||
{width: '44%', content: 'employee_name+tags'},
|
||||
{width: '10%', content: 'approval_status'},
|
||||
{
|
||||
width: '12%',
|
||||
content: function(parent, data) {
|
||||
$(parent).html(wn.boot.company[data.company].default_currency
|
||||
+ ' ' + fmt_money(data.total_sanctioned_amount));
|
||||
},
|
||||
css: {'text-align': 'right'},
|
||||
},
|
||||
{width: '12%', content: 'posting_date',
|
||||
css: {'text-align': 'right', 'color': '#777'}},
|
||||
]
|
||||
});
|
36
erpnext/hr/doctype/leave_application/listview.js
Normal file
36
erpnext/hr/doctype/leave_application/listview.js
Normal file
@ -0,0 +1,36 @@
|
||||
// render
|
||||
wn.doclistviews['Leave Application'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d)
|
||||
this.fields = this.fields.concat([
|
||||
"`tabLeave Application`.employee_name",
|
||||
"`tabLeave Application`.total_leave_days",
|
||||
"`tabLeave Application`.from_date",
|
||||
"`tabLeave Application`.to_date",
|
||||
|
||||
]);
|
||||
this.stats = this.stats.concat(['company']);
|
||||
},
|
||||
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
data.from_date = wn.datetime.str_to_user(data.from_date);
|
||||
data.to_date = wn.datetime.str_to_user(data.to_date);
|
||||
data.date_range = (data.from_date === data.to_date)
|
||||
? data.from_date
|
||||
: data.from_date + " to " + data.to_date;
|
||||
data.total_leave_days = data.total_leave_days<=1
|
||||
? data.total_leave_days + " day"
|
||||
: data.total_leave_days + " days"
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '5%', content:'avatar'},
|
||||
{width: '3%', content:'docstatus'},
|
||||
{width: '12%', content:'name'},
|
||||
{width: '40%', content:'employee_name+tags'},
|
||||
{width: '10%', content:'total_leave_days',
|
||||
css: {'color':'#777'}},
|
||||
{width: '30%', content:'date_range'},
|
||||
]
|
||||
});
|
46
erpnext/hr/doctype/salary_slip/listview.js
Normal file
46
erpnext/hr/doctype/salary_slip/listview.js
Normal file
@ -0,0 +1,46 @@
|
||||
// render
|
||||
wn.doclistviews['Salary Slip'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d)
|
||||
this.fields = this.fields.concat([
|
||||
"`tabSalary Slip`.employee_name",
|
||||
"`tabSalary Slip`.designation",
|
||||
"`tabSalary Slip`.branch",
|
||||
"`tabSalary Slip`.rounded_total",
|
||||
"`tabSalary Slip`.company",
|
||||
"`tabSalary Slip`.month",
|
||||
"`tabSalary Slip`.fiscal_year",
|
||||
]);
|
||||
this.stats = this.stats.concat(['company']);
|
||||
},
|
||||
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
var concat_list = [];
|
||||
data.designation && concat_list.push(data.designation);
|
||||
data.branch && concat_list.push(data.branch);
|
||||
data.description = concat_list.join(", ");
|
||||
data.month = month_list[cint(data.month)-1] + " [" + data.fiscal_year + "]";
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '3%', content: 'docstatus'},
|
||||
{width: '14%', content: 'name'},
|
||||
{width: '20%', content: 'employee_name'},
|
||||
{width: '30%', content: 'description+tags', css: {'color': '#aaa'}},
|
||||
{width: '17%', content:'month', css: {'text-align': 'right', 'color':'#aaa'}},
|
||||
{
|
||||
width: '16%',
|
||||
content: function(parent, data) {
|
||||
$(parent).html(
|
||||
(
|
||||
data.company
|
||||
? wn.boot.company[data.company].default_currency
|
||||
: sys_defaults.currency
|
||||
)
|
||||
+ ' ' + fmt_money(data.rounded_total));
|
||||
},
|
||||
css: {'text-align': 'right'},
|
||||
},
|
||||
]
|
||||
});
|
5
erpnext/patches/may_2012/customize_form_cleanup.py
Normal file
5
erpnext/patches/may_2012/customize_form_cleanup.py
Normal file
@ -0,0 +1,5 @@
|
||||
def execute():
|
||||
import webnotes
|
||||
webnotes.conn.sql("delete from `tabCustomize Form Field`")
|
||||
webnotes.conn.sql("""delete from `tabSingles`
|
||||
where doctype='Customize Form'""")
|
@ -362,5 +362,10 @@ patch_list = [
|
||||
'patch_file': 'reload_so_pending_items',
|
||||
'description': 'reload so pending items'
|
||||
},
|
||||
{
|
||||
'patch_module': 'patches.may_2012',
|
||||
'patch_file': 'customize_form_cleanup',
|
||||
'description': 'cleanup customize form records'
|
||||
},
|
||||
|
||||
]
|
47
erpnext/production/doctype/bom/listview.js
Normal file
47
erpnext/production/doctype/bom/listview.js
Normal file
@ -0,0 +1,47 @@
|
||||
// render
|
||||
wn.doclistviews['BOM'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d);
|
||||
this.fields = this.fields.concat([
|
||||
'`tabBOM`.item',
|
||||
'`tabBOM`.uom',
|
||||
'IFNULL(`tabBOM`.quantity, 0) as quantity',
|
||||
'`tabBOM`.is_active',
|
||||
'`tabBOM`.costing_date',
|
||||
'`tabBOM`.total_cost',
|
||||
'`tabBOM`.description',
|
||||
]);
|
||||
this.stats = this.stats.concat(['company']);
|
||||
},
|
||||
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
data.costing_date = wn.datetime.str_to_user(data.costing_date);
|
||||
data.description = (data.is_active === 'Yes' ? '' : '[Inactive] ') + data.description;
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '3%', content: 'docstatus'},
|
||||
{width: '15%', content: 'name'},
|
||||
{width: '15%', content: 'item'},
|
||||
{width: '26%', content: 'description+tags'},
|
||||
{
|
||||
width: '12%',
|
||||
content: function(parent, data) {
|
||||
$(parent).html(data.quantity + ' ' + data.uom)
|
||||
},
|
||||
css: {'text-align':'right'},
|
||||
},
|
||||
{
|
||||
width: '20%',
|
||||
content: function(parent, data) {
|
||||
$(parent).html(sys_defaults.currency + " "
|
||||
+ fmt_money(data.total_cost));
|
||||
},
|
||||
css: {'text-align': 'right'},
|
||||
},
|
||||
{width: '12%', content:'costing_date', css: {
|
||||
'text-align': 'right', 'color':'#777'
|
||||
}},
|
||||
]
|
||||
});
|
39
erpnext/production/doctype/production_order/listview.js
Normal file
39
erpnext/production/doctype/production_order/listview.js
Normal file
@ -0,0 +1,39 @@
|
||||
// render
|
||||
wn.doclistviews['Production Order'] = wn.views.ListView.extend({
|
||||
init: function(d) {
|
||||
this._super(d);
|
||||
this.fields = this.fields.concat([
|
||||
'`tabProduction Order`.production_item',
|
||||
'`tabProduction Order`.fg_warehouse',
|
||||
'`tabProduction Order`.stock_uom',
|
||||
'IFNULL(`tabProduction Order`.qty, 0) as qty',
|
||||
'`tabProduction Order`.posting_date',
|
||||
'`tabProduction Order`.status',
|
||||
]);
|
||||
this.stats = this.stats.concat(['company']);
|
||||
},
|
||||
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
data.posting_date = wn.datetime.str_to_user(data.posting_date);
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '5%', content: 'avatar'},
|
||||
{width: '3%', content: 'docstatus'},
|
||||
{width: '20%', content: 'name'},
|
||||
{width: '16%', content: 'production_item'},
|
||||
{width: '20%', content: 'fg_warehouse'},
|
||||
{width: '12%', content: 'status+tags'},
|
||||
{
|
||||
width: '12%',
|
||||
content: function(parent, data) {
|
||||
$(parent).html(data.qty + ' ' + data.stock_uom)
|
||||
},
|
||||
css: {'text-align':'right'}
|
||||
},
|
||||
{width: '12%', content:'posting_date', css: {
|
||||
'text-align': 'right', 'color':'#777'
|
||||
}},
|
||||
]
|
||||
});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -3,9 +3,9 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2012-03-27 14:36:13',
|
||||
'creation': '2012-05-15 12:14:54',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-03-27 14:36:13',
|
||||
'modified': '2012-05-18 18:21:08',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'Administrator'
|
||||
},
|
||||
@ -23,7 +23,7 @@
|
||||
'section_style': u'Tray',
|
||||
'server_code_error': u' ',
|
||||
'show_in_menu': 0,
|
||||
'version': 33
|
||||
'version': 1
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
@ -108,6 +108,21 @@
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'stock_uom',
|
||||
'fieldtype': u'Data',
|
||||
'label': u'UOM',
|
||||
'oldfieldname': u'stock_uom',
|
||||
'oldfieldtype': u'Data',
|
||||
'permlevel': 1,
|
||||
'print_hide': 0,
|
||||
'reqd': 0,
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'default': u'0.00',
|
||||
@ -223,21 +238,6 @@
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'stock_uom',
|
||||
'fieldtype': u'Data',
|
||||
'label': u'UOM',
|
||||
'oldfieldname': u'stock_uom',
|
||||
'oldfieldtype': u'Data',
|
||||
'permlevel': 1,
|
||||
'print_hide': 0,
|
||||
'reqd': 0,
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -3,9 +3,9 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2012-05-01 17:10:32',
|
||||
'creation': '2012-05-15 12:15:05',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-05-03 10:26:43',
|
||||
'modified': '2012-05-18 18:06:26',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'Administrator'
|
||||
},
|
||||
@ -106,24 +106,11 @@
|
||||
'write': 1
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'amend': 1,
|
||||
'cancel': 1,
|
||||
'create': 1,
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 0,
|
||||
'role': u'Sales Manager',
|
||||
'submit': 1,
|
||||
'write': 1
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
{
|
||||
'doctype': u'DocPerm',
|
||||
'permlevel': 1,
|
||||
'role': u'All',
|
||||
'write': 0
|
||||
'role': u'All'
|
||||
},
|
||||
|
||||
# DocPerm
|
||||
@ -307,6 +294,38 @@
|
||||
'print_hide': 1
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'po_no',
|
||||
'fieldtype': u'Data',
|
||||
'hidden': 1,
|
||||
'label': u'P.O. No',
|
||||
'no_copy': 0,
|
||||
'oldfieldname': u'po_no',
|
||||
'oldfieldtype': u'Data',
|
||||
'permlevel': 1,
|
||||
'print_hide': 1,
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
'depends_on': u'eval:doc.po_no',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'po_date',
|
||||
'fieldtype': u'Data',
|
||||
'hidden': 1,
|
||||
'label': u'P.O. Date',
|
||||
'no_copy': 0,
|
||||
'oldfieldname': u'po_date',
|
||||
'oldfieldtype': u'Data',
|
||||
'permlevel': 1,
|
||||
'print_hide': 1,
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
@ -953,38 +972,6 @@
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'po_no',
|
||||
'fieldtype': u'Data',
|
||||
'hidden': 1,
|
||||
'label': u'P.O. No',
|
||||
'no_copy': 0,
|
||||
'oldfieldname': u'po_no',
|
||||
'oldfieldtype': u'Data',
|
||||
'permlevel': 1,
|
||||
'print_hide': 1,
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'colour': u'White:FFF',
|
||||
'depends_on': u'eval:doc.po_no',
|
||||
'doctype': u'DocField',
|
||||
'fieldname': u'po_date',
|
||||
'fieldtype': u'Data',
|
||||
'hidden': 1,
|
||||
'label': u'P.O. Date',
|
||||
'no_copy': 0,
|
||||
'oldfieldname': u'po_date',
|
||||
'oldfieldtype': u'Data',
|
||||
'permlevel': 1,
|
||||
'print_hide': 1,
|
||||
'width': u'100px'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'default': u'Draft',
|
||||
|
@ -12,12 +12,15 @@ wn.doclistviews['Item'] = wn.views.ListView.extend({
|
||||
prepare_data: function(data) {
|
||||
this._super(data);
|
||||
data.description = repl("%(item_name)s | %(description)s", data);
|
||||
if(data.description && data.description.length > 50) {
|
||||
data.description = '<span title="'+data.description+'">' + data.description.substr(0,50) + '...</span>';
|
||||
}
|
||||
},
|
||||
|
||||
columns: [
|
||||
{width: '5%', content:'avatar'},
|
||||
{width: '20%', content:'name'},
|
||||
{width: '63%', content:'tags+description', css: {'color': '#aaa'}},
|
||||
{width: '63%', content:'tags+description', css: {'color': '#777'}},
|
||||
{width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
|
||||
]
|
||||
});
|
||||
|
@ -270,6 +270,8 @@ this.prepare_opts();$.extend(this,this.opts);$(this.parent).html(repl('\
|
||||
<div class="show_filters well">\
|
||||
<div class="filter_area"></div>\
|
||||
<div>\
|
||||
<button class="btn btn-small btn-info search-btn">\
|
||||
<i class="icon-refresh icon-white"></i> Search</button>\
|
||||
<button class="btn btn-small add-filter-btn">\
|
||||
<i class="icon-plus"></i> Add Filter</button>\
|
||||
</div>\
|
||||
@ -316,7 +318,7 @@ if(this.onrun)this.onrun();if(this.callback)this.callback(r);},render_list:funct
|
||||
/*
|
||||
* lib/js/wn/ui/filters.js
|
||||
*/
|
||||
wn.ui.FilterList=Class.extend({init:function(opts){wn.require('lib/js/legacy/widgets/form/fields.js');$.extend(this,opts);this.filters=[];this.$w=this.$parent;this.set_events();},set_events:function(){var me=this;this.$w.find('.add-filter-btn').bind('click',function(){me.add_filter();});},show_filters:function(){this.$w.find('.show_filters').toggle();if(!this.filters.length)
|
||||
wn.ui.FilterList=Class.extend({init:function(opts){wn.require('lib/js/legacy/widgets/form/fields.js');$.extend(this,opts);this.filters=[];this.$w=this.$parent;this.set_events();},set_events:function(){var me=this;this.$w.find('.add-filter-btn').bind('click',function(){me.add_filter();});this.$w.find('.search-btn').bind('click',function(){me.listobj.run();});},show_filters:function(){this.$w.find('.show_filters').toggle();if(!this.filters.length)
|
||||
this.add_filter();},add_filter:function(fieldname,condition,value){this.filters.push(new wn.ui.Filter({flist:this,fieldname:fieldname,condition:condition,value:value}));if(fieldname){this.$w.find('.show_filters').toggle(true);}},get_filters:function(){var values=[];$.each(this.filters,function(i,f){if(f.field)
|
||||
values.push(f.get_value());})
|
||||
return values;},update_filters:function(){var fl=[];$.each(this.filters,function(i,f){if(f.field)fl.push(f);})
|
||||
|
@ -157,6 +157,8 @@ this.prepare_opts();$.extend(this,this.opts);$(this.parent).html(repl('\
|
||||
<div class="show_filters well">\
|
||||
<div class="filter_area"></div>\
|
||||
<div>\
|
||||
<button class="btn btn-small btn-info search-btn">\
|
||||
<i class="icon-refresh icon-white"></i> Search</button>\
|
||||
<button class="btn btn-small add-filter-btn">\
|
||||
<i class="icon-plus"></i> Add Filter</button>\
|
||||
</div>\
|
||||
@ -203,7 +205,7 @@ if(this.onrun)this.onrun();if(this.callback)this.callback(r);},render_list:funct
|
||||
/*
|
||||
* lib/js/wn/ui/filters.js
|
||||
*/
|
||||
wn.ui.FilterList=Class.extend({init:function(opts){wn.require('lib/js/legacy/widgets/form/fields.js');$.extend(this,opts);this.filters=[];this.$w=this.$parent;this.set_events();},set_events:function(){var me=this;this.$w.find('.add-filter-btn').bind('click',function(){me.add_filter();});},show_filters:function(){this.$w.find('.show_filters').toggle();if(!this.filters.length)
|
||||
wn.ui.FilterList=Class.extend({init:function(opts){wn.require('lib/js/legacy/widgets/form/fields.js');$.extend(this,opts);this.filters=[];this.$w=this.$parent;this.set_events();},set_events:function(){var me=this;this.$w.find('.add-filter-btn').bind('click',function(){me.add_filter();});this.$w.find('.search-btn').bind('click',function(){me.listobj.run();});},show_filters:function(){this.$w.find('.show_filters').toggle();if(!this.filters.length)
|
||||
this.add_filter();},add_filter:function(fieldname,condition,value){this.filters.push(new wn.ui.Filter({flist:this,fieldname:fieldname,condition:condition,value:value}));if(fieldname){this.$w.find('.show_filters').toggle(true);}},get_filters:function(){var values=[];$.each(this.filters,function(i,f){if(f.field)
|
||||
values.push(f.get_value());})
|
||||
return values;},update_filters:function(){var fl=[];$.each(this.filters,function(i,f){if(f.field)fl.push(f);})
|
||||
|
Loading…
x
Reference in New Issue
Block a user