From 2438de4c9bcfd74dad11f1f8e924291cf16c9058 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 15 Mar 2012 16:43:46 +0530 Subject: [PATCH] fixed tags in list2 --- css/all-app.css | 129 ++++++++++-------- css/all-web.css | 22 ++- .../doctype/journal_voucher/listview.js | 4 +- .../selling/doctype/sales_order/listview.js | 5 +- js/all-app.js | 3 +- js/all-web.js | 44 +++--- version.num | 2 +- 7 files changed, 124 insertions(+), 85 deletions(-) diff --git a/css/all-app.css b/css/all-app.css index 496f93af80..daaa33c13f 100644 --- a/css/all-app.css +++ b/css/all-app.css @@ -122,6 +122,18 @@ header .container { margin: auto; } +@media (max-width: 1200px) { + div#body_div, header .container, footer { + width: 900px; + } +} + +@media (min-width: 1200px) { + div#body_div, header .container, footer { + width: 1200px; + } +} + div.no_script { display: none; } @@ -236,12 +248,14 @@ div.std-footer-item { .avatar-small { display: inline-block; - min-width: 29px; + width: 24px; + height: 20px; + vertical-align: middle; + overflow: hidden; + margin: 0px 3px; } .avatar-small img { - height: 24px; - margin-bottom: -7px; - max-width: 24px; + width: 24px; } /* @@ -673,17 +687,7 @@ div.sidebar-comment-info { /* * lib/css/legacy/listing.css */ -/* listing 2.0 */ -div.listing-more { - margin: 7px 0px 17px 0px; - text-align: center; - display: none; -} - -div.listing-toolbar { - margin: 7px 0px; -} /* SRS */ @@ -727,47 +731,6 @@ div.srs_filter_area td { vertical-align: middle; } - -/* stats */ - -div.stat-grid { - border: 2px solid #bbb; - background-color: white; - margin-bottom: 19px; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - overflow: hidden; -} - -div.stat-label { - position: relative; - padding: 3px; - text-align: center; -} -div.stat-label, div.stat-label a { - z-index: 5; -} - -div.stat-item { - position: relative; - border-bottom: 1px solid #ddd; -} -div.stat-item:last-child { - border-bottom: 0px solid #ddd; -} - -div.stat-bar { - position: absolute; - left: 0px; - background-color: #def; - height: 100%; - z-index: 0; -} - - - - /* * lib/css/legacy/report.css */ @@ -1631,13 +1594,21 @@ div.psidebar div.section-item, div.psidebar .section-link { margin-top: 8px; } +/* list-row */ div.list-row { border-bottom: 1px solid #eee; - padding: 3px 0px; + padding: 5px 0px; } div.list-row:hover { background-color: #eef } +div.list-row .label { + margin-left: 3px; +} +div.list-row .main { + margin-left: 4px; + color: #444; +} div.paging-button { text-align: center; @@ -1674,6 +1645,8 @@ div.list_filter input, div.list_filter select { margin-right: 7px; } +/* bar */ + span.bar-outer { display: inline-block; margin: 0px 7px; @@ -1694,6 +1667,50 @@ span.bar-complete { } +/* stats */ + +div.stat-wrapper { + margin-bottom: 19px; +} + +div.stat-grid { + border: 2px solid #bbb; + background-color: white; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + overflow: hidden; +} + +div.stat-label { + position: relative; + padding: 3px; + text-align: center; +} +div.stat-label, div.stat-label a { + z-index: 5; +} + +div.stat-item { + position: relative; + border-bottom: 1px solid #ddd; +} +div.stat-item:last-child { + border-bottom: 0px solid #ddd; +} + +div.stat-bar { + position: absolute; + left: 0px; + background-color: #def; + height: 100%; + z-index: 0; +} + + + + + /* * lib/css/bootstrap/headings.css */ diff --git a/css/all-web.css b/css/all-web.css index 5843385975..1f31763187 100644 --- a/css/all-web.css +++ b/css/all-web.css @@ -122,6 +122,18 @@ header .container { margin: auto; } +@media (max-width: 1200px) { + div#body_div, header .container, footer { + width: 900px; + } +} + +@media (min-width: 1200px) { + div#body_div, header .container, footer { + width: 1200px; + } +} + div.no_script { display: none; } @@ -236,12 +248,14 @@ div.std-footer-item { .avatar-small { display: inline-block; - min-width: 29px; + width: 24px; + height: 20px; + vertical-align: middle; + overflow: hidden; + margin: 0px 3px; } .avatar-small img { - height: 24px; - margin-bottom: -7px; - max-width: 24px; + width: 24px; } /* diff --git a/erpnext/accounts/doctype/journal_voucher/listview.js b/erpnext/accounts/doctype/journal_voucher/listview.js index 03c87f806e..d8f295bd44 100644 --- a/erpnext/accounts/doctype/journal_voucher/listview.js +++ b/erpnext/accounts/doctype/journal_voucher/listview.js @@ -1,6 +1,6 @@ wn.doclistviews['Journal Voucher'] = wn.pages.ListView.extend({ - init: function(doctype) { - this._super(doctype); + init: function(d) { + this._super(d); this.fields = this.fields.concat([ '`tabJournal Voucher`.voucher_type' ]); diff --git a/erpnext/selling/doctype/sales_order/listview.js b/erpnext/selling/doctype/sales_order/listview.js index e5d574f2fc..bcdddc0297 100644 --- a/erpnext/selling/doctype/sales_order/listview.js +++ b/erpnext/selling/doctype/sales_order/listview.js @@ -1,7 +1,7 @@ // render wn.doclistviews['Sales Order'] = wn.pages.ListView.extend({ - init: function(doctype) { - this._super(doctype) + init: function(d) { + this._super(d) this.fields = this.fields.concat([ "`tabSales Order`.customer_name", "ifnull(`tabSales Order`.per_delivered,0) as per_delivered", @@ -9,6 +9,7 @@ wn.doclistviews['Sales Order'] = wn.pages.ListView.extend({ "`tabSales Order`.currency", "ifnull(`tabSales Order`.grand_total_export,0) as grand_total_export" ]); + this.stats = this.stats.concat(['status']); }, render: function(row, data, listobj) { diff --git a/js/all-app.js b/js/all-app.js index f475153b81..387a26fdff 100644 --- a/js/all-app.js +++ b/js/all-app.js @@ -255,7 +255,8 @@ if(r.server_messages)msgprint(r.server_messages) if(r.exc){errprint(r.exc);console.log(r.exc);};if(r.docs)LocalDB.sync(r.docs);} wn.request.call=function(opts){wn.request.prepare(opts);$.ajax({url:opts.url||wn.request.url,data:opts.args,type:opts.type||'POST',dataType:opts.dataType||'json',success:function(r,xhr){wn.request.cleanup(opts,r);opts.success(r,xhr.responseText);},error:function(xhr,textStatus){wn.request.cleanup(opts,{});msgprint('Unable to complete request: '+textStatus) if(opts.error)opts.error(xhr)}})} -wn.call=function(opts){var args=opts.args||{};if(opts.module&&opts.page){args.cmd=opts.module+'.page.'+opts.page+'.'+opts.page+'.'+opts.method}else if(opts.method){args.cmd=opts.method;} +wn.call=function(opts){var args=$.extend({},opts.args) +if(opts.module&&opts.page){args.cmd=opts.module+'.page.'+opts.page+'.'+opts.page+'.'+opts.method}else if(opts.method){args.cmd=opts.method;} for(key in args){if(args[key]&&typeof args[key]!='string'){args[key]=JSON.stringify(args[key]);}} wn.request.call({args:args,success:opts.callback,error:opts.error,btn:opts.btn,freeze:opts.freeze,show_spinner:!opts.no_spinner});} /* diff --git a/js/all-web.js b/js/all-web.js index 28ee14b194..9ec779f3db 100644 --- a/js/all-web.js +++ b/js/all-web.js @@ -169,7 +169,8 @@ if(r.server_messages)msgprint(r.server_messages) if(r.exc){errprint(r.exc);console.log(r.exc);};if(r.docs)LocalDB.sync(r.docs);} wn.request.call=function(opts){wn.request.prepare(opts);$.ajax({url:opts.url||wn.request.url,data:opts.args,type:opts.type||'POST',dataType:opts.dataType||'json',success:function(r,xhr){wn.request.cleanup(opts,r);opts.success(r,xhr.responseText);},error:function(xhr,textStatus){wn.request.cleanup(opts,{});msgprint('Unable to complete request: '+textStatus) if(opts.error)opts.error(xhr)}})} -wn.call=function(opts){var args=opts.args||{};if(opts.module&&opts.page){args.cmd=opts.module+'.page.'+opts.page+'.'+opts.page+'.'+opts.method}else if(opts.method){args.cmd=opts.method;} +wn.call=function(opts){var args=$.extend({},opts.args) +if(opts.module&&opts.page){args.cmd=opts.module+'.page.'+opts.page+'.'+opts.page+'.'+opts.method}else if(opts.method){args.cmd=opts.method;} for(key in args){if(args[key]&&typeof args[key]!='string'){args[key]=JSON.stringify(args[key]);}} wn.request.call({args:args,success:opts.callback,error:opts.error,btn:opts.btn,freeze:opts.freeze,show_spinner:!opts.no_spinner});} /* @@ -685,7 +686,18 @@ if(!this.opts.no_result_message){this.opts.no_result_message='Nothing to show'}} this.prepare_opts();$.extend(this,this.opts);$(this.parent).html(repl('\
\

%(title)s

\ -
\ + \ +
\ +
\ +
\ + \ +
\ +
\ +
\ +
\ + \ +
\
\ \ Refresh\ @@ -698,16 +710,6 @@ this.prepare_opts();$.extend(this,this.opts);$(this.parent).html(repl('\ class="img-load" style="float: left;"/>\
\ \ -
\ -
\ -
\ -
\ - \ -
\ -
\ -
\ - \
\ %(no_result_message)s\
\ @@ -737,11 +739,12 @@ if(this.get_args){$.extend(args,this.get_args());} return args;},render_results:function(r){if(this.start==0)this.clear();this.$w.find('.btn-more').toggle(false);if(r.message)r.values=r.message;if(r.values&&r.values.length){this.data=this.data.concat(r.values);this.render_list(r.values);}else{if(this.start==0){this.$w.find('.result').toggle(false);this.$w.find('.no-result').toggle(true);}} if(this.onrun)this.onrun();if(this.callback)this.callback(r);},render_list:function(values){var m=Math.min(values.length,this.page_length);for(var i=0;i=this.page_length) -this.$w.find('.btn-more').toggle(true);},add_row:function(){return this.$w.find('.result-list').append('
').find('.list-row:last').get(0);},refresh:function(){this.run();},add_limits:function(){this.query+=' LIMIT '+this.start+','+(this.page_length+1);}});wn.ui.FilterList=Class.extend({init:function(opts){$.extend(this,opts);this.filters=[];this.$w=this.$parent;this.set_events();},set_events:function(){var me=this;this.listobj.$w.find('.btn-filter').bind('click',function(){me.$w.find('.show_filters').slideToggle();if(!me.filters.length) +this.$w.find('.btn-more').toggle(true);},add_row:function(){return this.$w.find('.result-list').append('
').find('.list-row:last').get(0);},refresh:function(){this.run();},add_limits:function(){this.query+=' LIMIT '+this.start+','+(this.page_length+1);}});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.listobj.$w.find('.btn-filter').bind('click',function(){me.$w.find('.show_filters').slideToggle();if(!me.filters.length) me.add_filter();});this.$w.find('.add-filter-btn').bind('click',function(){me.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').slideDown();}},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);}) -this.filters=fl;}});wn.ui.Filter=Class.extend({init:function(opts){$.extend(this,opts);this.doctype=this.flist.doctype;this.fields_by_name={};this.make();this.make_options();this.set_events();},make:function(){this.flist.$w.find('.filter_area').append('
\ +this.filters=fl;},get_filter:function(fieldname){for(var i in this.filters){if(this.filters[i].field.df.fieldname==fieldname) +return this.filters[i];}}});wn.ui.Filter=Class.extend({init:function(opts){$.extend(this,opts);this.doctype=this.flist.doctype;this.fields_by_name={};this.make();this.make_options();this.set_events();},make:function(){this.flist.$w.find('.filter_area').append('
\ \