From fad4ee0e842db2d71d3db03bfee8c324ce8fa39c Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 14 Nov 2012 15:19:31 +0530 Subject: [PATCH] commonfied std fields in client in filter and report --- public/js/legacy/wn/widgets/filters.js | 68 -------------------------- public/js/wn/model.js | 26 ++++++++++ public/js/wn/ui/filters.js | 19 ++----- public/js/wn/views/reportview.js | 8 +-- 4 files changed, 36 insertions(+), 85 deletions(-) delete mode 100644 public/js/legacy/wn/widgets/filters.js diff --git a/public/js/legacy/wn/widgets/filters.js b/public/js/legacy/wn/widgets/filters.js deleted file mode 100644 index ce77ae5ac0..0000000000 --- a/public/js/legacy/wn/widgets/filters.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com) -// -// MIT License (MIT) -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF -// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE -// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -// Fitler object -// pass a list of docfields that need to be set as filters -// creates ranges for dates and number types -// -// ------------- -// Filter By: -// Label [Input] [[ to [Input]]] [x] -// Label [Input] [[ to [Input]]] [x] -// [select:Add a filter] - -wn.widgets.Filters = function(parent, fields) { - this.fields = fields; - this.filters = []; - - this.make = function() { - this.filter_area = $a(parent, 'div', 'filters-wrapper') - this.create_add_fitler_select() - } - - this.create_add_fitler_select = function() { - - this.add_btn = $btn(parent, '+ Add a new Filter', this.add_filter); - } - - this.add_filter = function(df) { - - } - - this.get_values = function() { - var values = {} - for(var i=0;i