From 63a38e310b9beb513888db45c2c75a24259eb33c Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 24 Aug 2011 14:56:24 +0530 Subject: [PATCH 1/7] receive encoding error --- cgi-bin/webnotes/utils/email_lib/receive.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cgi-bin/webnotes/utils/email_lib/receive.py b/cgi-bin/webnotes/utils/email_lib/receive.py index 7207d836f0..73d5e66c8c 100644 --- a/cgi-bin/webnotes/utils/email_lib/receive.py +++ b/cgi-bin/webnotes/utils/email_lib/receive.py @@ -39,8 +39,11 @@ class IncomingMail: """ get utf-8 encoded part content """ - return unicode(part.get_payload(decode=True),str(charset),"ignore").encode('utf8','replace') - + try: + return unicode(part.get_payload(decode=True),str(charset),"ignore").encode('utf8','replace') + except LookupError, e: + return part.get_payload() + def get_attachment(self, part, charset): """ Extracts an attachment From 5d0f6e3749132238854f9e869d8832e7cdf27ac8 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 19 Sep 2011 15:49:45 +0530 Subject: [PATCH 2/7] added folder icon --- images/icons/folder.gif | Bin 0 -> 996 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 images/icons/folder.gif diff --git a/images/icons/folder.gif b/images/icons/folder.gif new file mode 100644 index 0000000000000000000000000000000000000000..45b191d8ae042575e18df1ae2b689135a32d954e GIT binary patch literal 996 zcmeH`TT4>`0DzA+ZHqE9BLyRu(MuOr_~1Ij<_a%Rh$vk^!CPRl%2tdL!)-Q+l$oSv zbXyj+2a~dbj0l|ubK17tYU-JDIyEP{dG2TDTKj88k9vi03fm2e@FnEO3;-5t#Q3=DUwiRfPtx zVbD`*-h@LnEMlV;+fi?m??X;-xDt8J#pn*JfH#F)GVxgJxk4BS1a kG}l)Y$K`fzJu35jlHP0DB-g8&6UtPEokmOXMiBu10r_2l`v3p{ literal 0 HcmV?d00001 From 10470a66b71fc64657873b5a65d5dde88d5b32be Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 21 Sep 2011 18:03:23 +0530 Subject: [PATCH 3/7] commit after every 100 in rebuild_tree --- cgi-bin/webnotes/utils/nestedset.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/cgi-bin/webnotes/utils/nestedset.py b/cgi-bin/webnotes/utils/nestedset.py index 97cf156074..dc212b74a1 100644 --- a/cgi-bin/webnotes/utils/nestedset.py +++ b/cgi-bin/webnotes/utils/nestedset.py @@ -37,19 +37,26 @@ def rebuild_tree(doctype, parent_field): for r in result: right = rebuild_node(doctype, r[0], right, parent_field) -def rebuild_node(doctype, parent, left, parent_field): +def rebuild_node(doctype, parent, left, parent_field, cnt = 0): # the right value of this node is the left value + 1 - right = left+1 + right = left+1 # get all children of this node result = webnotes.conn.sql("SELECT name FROM `tab%s` WHERE `%s`='%s'" % (doctype, parent_field, parent)) for r in result: - right = rebuild_node(doctype, r[0], right, parent_field) + right = rebuild_node(doctype, r[0], right, parent_field, cnt) # we've got the left value, and now that we've processed # the children of this node we also know the right value webnotes.conn.sql('UPDATE `tab%s` SET lft=%s, rgt=%s WHERE name="%s"' % (doctype,left,right,parent)) + # commit after every 100 + cnt += 1 + if cnt % 100 == 0: + cnt = 0 + webnotes.conn.sql("commit") + webnotes.conn.sql("start transaction") + #return the right value of this node + 1 return right+1 From acba58a01cec90f742b1fd5816a0722400d006e6 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 21 Sep 2011 18:34:27 +0530 Subject: [PATCH 4/7] commit after every 100 in rebuild_tree --- cgi-bin/webnotes/utils/nestedset.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cgi-bin/webnotes/utils/nestedset.py b/cgi-bin/webnotes/utils/nestedset.py index cb9f195849..e88f351659 100644 --- a/cgi-bin/webnotes/utils/nestedset.py +++ b/cgi-bin/webnotes/utils/nestedset.py @@ -156,6 +156,8 @@ def rebuild_tree(doctype, parent_field): result = webnotes.conn.sql("SELECT name FROM `tab%s` WHERE `%s`='' or `%s` IS NULL" % (doctype, parent_field, parent_field)) for r in result: right = rebuild_node(doctype, r[0], right, parent_field) + webnotes.conn.sql("commit") + webnotes.conn.sql("start transaction") def rebuild_node(doctype, parent, left, parent_field, cnt = 0): """ From 712b1785c076a6b0ac2f5083b9d1cf8bbc5b2e17 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 21 Sep 2011 18:52:53 +0530 Subject: [PATCH 5/7] commit after every 100 in rebuild_tree --- cgi-bin/webnotes/utils/nestedset.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cgi-bin/webnotes/utils/nestedset.py b/cgi-bin/webnotes/utils/nestedset.py index e88f351659..47d78af053 100644 --- a/cgi-bin/webnotes/utils/nestedset.py +++ b/cgi-bin/webnotes/utils/nestedset.py @@ -159,10 +159,13 @@ def rebuild_tree(doctype, parent_field): webnotes.conn.sql("commit") webnotes.conn.sql("start transaction") -def rebuild_node(doctype, parent, left, parent_field, cnt = 0): +cnt = 0 + +def rebuild_node(doctype, parent, left, parent_field): """ reset lft, rgt and recursive call for all children """ + global cnt from webnotes.utils import now n = now() @@ -172,7 +175,8 @@ def rebuild_node(doctype, parent, left, parent_field, cnt = 0): # get all children of this node result = webnotes.conn.sql("SELECT name FROM `tab%s` WHERE `%s`='%s'" % (doctype, parent_field, parent)) for r in result: - right = rebuild_node(doctype, r[0], right, parent_field, cnt) + + right = rebuild_node(doctype, r[0], right, parent_field) # we've got the left value, and now that we've processed # the children of this node we also know the right value @@ -180,7 +184,7 @@ def rebuild_node(doctype, parent, left, parent_field, cnt = 0): # commit after every 100 cnt += 1 - if cnt % 100 == 0: + if cnt % 500 == 0: cnt = 0 webnotes.conn.sql("commit") webnotes.conn.sql("start transaction") From be6dff397db1e964162b50173494281f3b3b92fe Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 22 Sep 2011 15:58:07 +0530 Subject: [PATCH 6/7] nestedset: root node numbering should follow some order (alphabetically) --- cgi-bin/webnotes/utils/nestedset.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/cgi-bin/webnotes/utils/nestedset.py b/cgi-bin/webnotes/utils/nestedset.py index 47d78af053..ecc1418bc1 100644 --- a/cgi-bin/webnotes/utils/nestedset.py +++ b/cgi-bin/webnotes/utils/nestedset.py @@ -153,19 +153,16 @@ def rebuild_tree(doctype, parent_field): """ # get all roots right = 1 - result = webnotes.conn.sql("SELECT name FROM `tab%s` WHERE `%s`='' or `%s` IS NULL" % (doctype, parent_field, parent_field)) + result = webnotes.conn.sql("SELECT name FROM `tab%s` WHERE `%s`='' or `%s` IS NULL ORDER BY name ASC" % (doctype, parent_field, parent_field)) for r in result: right = rebuild_node(doctype, r[0], right, parent_field) webnotes.conn.sql("commit") webnotes.conn.sql("start transaction") -cnt = 0 - -def rebuild_node(doctype, parent, left, parent_field): +def rebuild_node(doctype, parent, left, parent_field, cnt = 0): """ reset lft, rgt and recursive call for all children """ - global cnt from webnotes.utils import now n = now() @@ -175,8 +172,7 @@ def rebuild_node(doctype, parent, left, parent_field): # get all children of this node result = webnotes.conn.sql("SELECT name FROM `tab%s` WHERE `%s`='%s'" % (doctype, parent_field, parent)) for r in result: - - right = rebuild_node(doctype, r[0], right, parent_field) + right = rebuild_node(doctype, r[0], right, parent_field, cnt) # we've got the left value, and now that we've processed # the children of this node we also know the right value @@ -184,7 +180,7 @@ def rebuild_node(doctype, parent, left, parent_field): # commit after every 100 cnt += 1 - if cnt % 500 == 0: + if cnt % 100 == 0: cnt = 0 webnotes.conn.sql("commit") webnotes.conn.sql("start transaction") From e19663292273e8c402cfb4c8fdc2dfe54c938877 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 11 Oct 2011 10:50:39 +0530 Subject: [PATCH 7/7] fixed bugs --- js/legacy/app.js | 9 ++---- js/legacy/form.compressed.js | 3 +- js/legacy/globals.js | 1 + js/legacy/report.compressed.js | 3 +- js/legacy/webpage/body.js | 3 +- js/legacy/webpage/loaders.js | 15 +++++----- js/legacy/webpage/uploader.js | 6 ---- js/legacy/widgets/form/form.js | 3 +- js/legacy/widgets/listing.js | 10 ++----- js/legacy/widgets/report_builder/datatable.js | 10 ++----- js/legacy/widgets/tabbedpage.js | 3 +- js/legacy/wnf.compressed.js | 28 ++++++++----------- 12 files changed, 39 insertions(+), 55 deletions(-) diff --git a/js/legacy/app.js b/js/legacy/app.js index 10313674bc..0e5e0046e5 100644 --- a/js/legacy/app.js +++ b/js/legacy/app.js @@ -162,12 +162,9 @@ function setup_calendar() { wn.require('lib/js/legacy/widgets/calendar.js'); if(!_c.calendar) { - new_widget('Calendar', function(c) { - _c.calendar = c; - _c.calendar.init(p.cont); - rename_observers.push(_c.calendar); - - }); + _c.calendar = new Calendar(); + _c.calendar.init(p.cont); + rename_observers.push(_c.calendar); } } } diff --git a/js/legacy/form.compressed.js b/js/legacy/form.compressed.js index 2b4d23a384..3a78902891 100644 --- a/js/legacy/form.compressed.js +++ b/js/legacy/form.compressed.js @@ -99,7 +99,8 @@ if(cur_frm.doc.select_print_heading) cur_frm.set_print_heading(cur_frm.doc.select_print_heading) if(user!='Guest'){$di(this.view_btn_wrapper);if(cur_frm.doc.__archived){$dh(this.view_btn_wrapper);}}else{$dh(this.view_btn_wrapper);$dh(this.print_close_btn);} _p.build(this.default_format,print_callback,null,1);} -_f.Frm.prototype.hide=function(){$dh(this.wrapper);this.display=0;hide_autosuggest();} +_f.Frm.prototype.hide=function(){$dh(this.wrapper);this.display=0;if(hide_autosuggest) +hide_autosuggest();} _f.Frm.prototype.show_the_frm=function(){if(this.parent.last_displayed&&this.parent.last_displayed!=this){this.parent.last_displayed.defocus_rest();this.parent.last_displayed.hide();} if(this.wrapper&&this.wrapper.style.display.toLowerCase()=='none'){$ds(this.wrapper);this.display=1;} if(this.meta.in_dialog&&!this.parent.dialog.display){if(!this.meta.istable) diff --git a/js/legacy/globals.js b/js/legacy/globals.js index 7c26c7a89d..ad8e552cdd 100644 --- a/js/legacy/globals.js +++ b/js/legacy/globals.js @@ -30,6 +30,7 @@ var user_fullname=null; var user_email=null; var user_img = {}; var home_page=null; +var hide_autosuggest=null; var page_body=null; var pscript = {}; diff --git a/js/legacy/report.compressed.js b/js/legacy/report.compressed.js index fcbceefde1..06e06484eb 100644 --- a/js/legacy/report.compressed.js +++ b/js/legacy/report.compressed.js @@ -201,8 +201,7 @@ c.style.color=row.style.color;if(row.style.backgroundColor) c.style.backgroundColor=row.style.backgroundColor;if(row.style.fontWeight) c.style.fontWeight=row.style.fontWeight;if(row.style.fontSize) c.style.fontSize=row.style.fontSize;var w=this.get_col_width(ci);if(w)$w(c,w);c.val=val;var me=this;c.div=$a(c,'div','',{width:(cint(w)-7)+'px'});$s(c.div,val,this.coltypes[ci],this.coloptions[ci])} -_r.DataTable.prototype.do_print=function(){this._get_query(true);args={query:this.query,title:this.rep_name?this.rep_name:this.dt,colnames:null,colwidhts:null,coltypes:null,has_index:this.has_index,has_headings:this.has_headings,check_limit:1,is_simple:(this.is_simple?'Yes':''),sc_id:(this.search_criteria?this.search_criteria.name:''),filter_values:docstring(this.filter_vals),finder:this.finder?this.finder:null};new_widget('_p.PrintQuery',function(w){if(!_p.print_query) -_p.print_query=w;_p.print_query.show_dialog(args);},1);} +_r.DataTable.prototype.do_print=function(){this._get_query(true);args={query:this.query,title:this.rep_name?this.rep_name:this.dt,colnames:null,colwidhts:null,coltypes:null,has_index:this.has_index,has_headings:this.has_headings,check_limit:1,is_simple:(this.is_simple?'Yes':''),sc_id:(this.search_criteria?this.search_criteria.name:''),filter_values:docstring(this.filter_vals),finder:this.finder?this.finder:null};wn.require('lib/js/legacy/widgets/print_query.js');_p.print_query=new _p.PrintQuery();_p.print_query.show_dialog(args);} _r.DataTable.prototype.do_export=function(){this._get_query(true);var me=this;export_query(this.query,function(q){export_csv(q,(me.rep_name?me.rep_name:me.dt),(me.search_criteria?me.search_criteria.name:''),me.is_simple,docstring(me.filter_vals));});} _r.DataTable.prototype.do_calc=function(){_r.show_calc(this.tab,this.colnames,this.coltypes,1);} _r.DataTable.prototype.get_col_data=function(colname){var ci=0;if(!this.htab)return[];for(var i=1;iWebsite: http://wnframework.org/

" +"";about_dialog=d;} about_dialog.show();} -function loadreport(dt,rep_name,onload,menuitem,reset_report){wn.require('lib/js/legacy/report.compressed.js');dt=get_label_doctype(dt);var show_report_builder=function(rb_con){if(!_r.rb_con){_r.rb_con=rb_con;} +function loadreport(dt,rep_name,onload,menuitem,reset_report){wn.require('lib/js/legacy/report.compressed.js');dt=get_label_doctype(dt);var show_report_builder=function(){if(!_r.rb_con){_r.rb_con=new _r.ReportContainer();} _r.rb_con.set_dt(dt,function(rb){if(rep_name){var t=rb.current_loaded;rb.load_criteria(rep_name);if(onload) onload(rb);if((rb.dt)&&(!rb.dt.has_data()||rb.current_loaded!=t)) rb.dt.run();}else{if(reset_report){rb.reset_report();}} if(!rb.forbidden){page_body.change_to('Report Builder');nav_obj.open_notify('Report',dt,rep_name);}});} -new_widget('_r.ReportContainer',show_report_builder,1);} +show_report_builder();} var load_doc=loaddoc;function loaddoc(doctype,name,onload,menuitem,from_archive){wn.require('lib/js/legacy/form.compressed.js');doctype=get_label_doctype(doctype);if(frms['DocType']&&frms['DocType'].opendocs[doctype]){msgprint("Cannot open an instance of \""+doctype+"\" when the DocType is open.");return;} if(doctype=='DocType'&&frms[name]){msgprint("Cannot open DocType \""+name+"\" when its instance is open.");return;} -var show_form=function(f){if(!_f.frm_con&&f){_f.frm_con=f;} +var show_form=function(f){if(!_f.frm_con){_f.frm_con=new _f.FrmContainer();} if(!frms[doctype]){_f.add_frm(doctype,show_doc,name,from_archive);}else if(LocalDB.is_doc_loaded(doctype,name)){show_doc();}else{$c('webnotes.widgets.form.getdoc',{'name':name,'doctype':doctype,'user':user,'from_archive':(from_archive?1:0)},show_doc,null,null);}} var show_doc=function(r,rt){if(locals[doctype]&&locals[doctype][name]){page_body.set_status('Done');var frm=frms[doctype];frm.refresh(name);if(!frm.in_dialog) nav_obj.open_notify('Form',doctype,name);if(onload)onload();}else{if(r.exc){msgprint('There were errors while loading '+doctype+' '+name);} loadpage('_home');}} -new_widget('_f.FrmContainer',show_form,1);} +show_form();} function new_doc(doctype,onload,in_dialog,on_save_callback,cdt,cdn,cnic){wn.require('lib/js/legacy/form.compressed.js');doctype=get_label_doctype(doctype);if(!doctype){if(cur_frm)doctype=cur_frm.doctype;else return;} var show_doc=function(){frm=frms[doctype];if(frm.perm[0][CREATE]==1){if(frm.meta.issingle){var dn=doctype;LocalDB.set_default_values(locals[doctype][doctype]);}else var dn=LocalDB.create(doctype);if(onload)onload(dn);if(frm.in_dialog){var fd=_f.frm_dialog;fd.cdt=cdt;fd.cdn=cdn;fd.cnic=cnic;fd.on_save_callback=on_save_callback;}else{nav_obj.open_notify('Form',doctype,dn);} @@ -724,7 +724,7 @@ var show_form=function(){if(!_f.frm_con){_f.frm_con=new _f.FrmContainer();} if(!frms[doctype]) _f.add_frm(doctype,show_doc);else show_doc(frms[doctype]);} -new_widget('_f.FrmContainer',show_form,1);} +show_form();} var newdoc=new_doc;var pscript={};var cur_page;function loadpage(page_name,call_back,no_history){if(page_name=='_home') page_name=home_page;var fn=function(r,rt){page_body.set_status('Done');if(page_body.pages[page_name]){var p=page_body.pages[page_name] page_body.change_to(page_name);}else{var p=render_page(page_name);if(!p)return;} @@ -738,11 +738,7 @@ function loadscript(src,call_back){set_loading();var script=$a('head','script'); script.onreadystatechange=function(){if(this.readyState=='complete'||this.readyState=='loaded'){hide_loading();call_back();}}} var doc_browser_page;function loaddocbrowser(dt,label,fields){wn.require('lib/js/legacy/widgets/form/fields.js');wn.require('lib/js/legacy/webpage/docbrowser.js');dt=get_label_doctype(dt);if(!doc_browser_page) doc_browser_page=new ItemBrowserPage();doc_browser_page.show(dt,label,fields);nav_obj.open_notify('List',dt,'');} -var uploaders={};var upload_frame_count=0;Uploader=function(parent,args,callback){var id='frame'+upload_frame_count;upload_frame_count++;this.callback=callback;var div=$a(parent,'div');div.innerHTML='';var div=$a(parent,'div');div.innerHTML='
';var ul_form=div.childNodes[0];var f_list=[];var inp_fdata=$a_input($a(ul_form,'span'),'file',{name:'filedata'},{marginLeft:'7px'});var inp=$a_input($a(ul_form,'span'),'hidden',{name:'cmd'});inp.value='uploadfile';var inp=$a_input($a(ul_form,'span'),'hidden',{name:'uploader_id'});inp.value=id;var inp=$a_input($a(ul_form,'span'),'submit',null,{marginLeft:'7px'});inp.value='Upload';$y(inp,{width:'80px'});$wid_normal(inp);inp.onmouseover=function(){$wid_active(this);} -inp.onmouseout=function(){$wid_normal(this);} -inp.onmousedown=function(){$wid_pressed(this);} -inp.onmouseup=function(){$wid_active(inp);} -for(var key in args){var inp=$a_input($a(ul_form,'span'),'hidden',{name:key});inp.value=args[key];} +var uploaders={};var upload_frame_count=0;Uploader=function(parent,args,callback){var id='frame'+upload_frame_count;upload_frame_count++;this.callback=callback;var div=$a(parent,'div');div.innerHTML='';var div=$a(parent,'div');div.innerHTML='
';var ul_form=div.childNodes[0];var f_list=[];var inp_fdata=$a_input($a(ul_form,'span'),'file',{name:'filedata'},{marginLeft:'7px'});var inp=$a_input($a(ul_form,'span'),'hidden',{name:'cmd'});inp.value='uploadfile';var inp=$a_input($a(ul_form,'span'),'hidden',{name:'uploader_id'});inp.value=id;var inp=$a_input($a(ul_form,'span'),'submit',null,{marginLeft:'7px'});inp.value='Upload';$y(inp,{width:'80px'});for(var key in args){var inp=$a_input($a(ul_form,'span'),'hidden',{name:key});inp.value=args[key];} uploaders[id]=this;} function upload_callback(id,fid){uploaders[id].callback(fid);} var pages=[];var stylesheets=[];function Page(page_name,content){var me=this;this.name=page_name;this.onshow=function(){set_title(me.doc.page_title?me.doc.page_title:me.name);try{if(pscript['onshow_'+me.name])pscript['onshow_'+me.name]();}catch(e){submit_error(e);} @@ -874,7 +870,7 @@ n=n+1;return n;} this.setup_page_areas=function(){var n=this.no_of_columns();this.body_table=make_table(this.body,1,n,'100%');$y(this.body_table,{tableLayout:'fixed'});var c=0;this.left_sidebar=$td(this.body_table,0,c);$y(this.left_sidebar,{width:cint(this.cp.left_sidebar_width)+'px'});c++;this.center=$a($td(this.body_table,0,c),'div');c++;if(cint(this.cp.right_sidebar_width)){this.right_sidebar=$td(this.body_table,0,c);$y(this.right_sidebar,{width:cint(this.cp.right_sidebar_width)+'px'}) c++;} this.center.header=$a(this.center,'div');this.center.body=$a(this.center,'div');this.center.loading=$a(this.center,'div','',{margin:'200px 0px',fontSize:'14px',color:'#999',textAlign:'center'});this.center.loading.innerHTML='Loading...'} -this.setup_sidebar_menu=function(){if(this.left_sidebar&&this.cp.show_sidebar_menu){new_widget('SidebarMenu',function(m){sidebar_menu=m;m.make_menu('');});}} +this.setup_sidebar_menu=function(){if(this.left_sidebar&&this.cp.show_sidebar_menu){sidebar_menu=new SidebarMenu();sidebar_menu.make_menu('');}} this.setup_header_footer=function(){if(cint(this.cp.header_height)){var hh=this.cp.header_height?(cint(this.cp.header_height)+'px'):'0px';$y(this.header,{height:hh,borderBottom:'1px solid #CCC'});if(this.cp.client_name)this.banner_area.innerHTML=this.cp.client_name;} var fh=this.cp.footer_height?(cint(this.cp.footer_height)+'px'):'0px';$y(this.footer,{height:fh});if(this.cp.footer_html)this.footer.innerHTML=this.cp.footer_html;} this.run_startup_code=function(){if(this.cp.startup_css) @@ -923,7 +919,7 @@ d.innerHTML=html $(d).printElement();} _p.preview=function(html){var w=window.open('');w.document.write(html) w.document.close();} -function setup_calendar(){var p=new Page('_calendar');p.wrapper.style.height='100%';p.wrapper.onshow=function(){wn.require('lib/js/legacy/widgets/calendar.js');if(!_c.calendar){new_widget('Calendar',function(c){_c.calendar=c;_c.calendar.init(p.cont);rename_observers.push(_c.calendar);});}}} +function setup_calendar(){var p=new Page('_calendar');p.wrapper.style.height='100%';p.wrapper.onshow=function(){wn.require('lib/js/legacy/widgets/calendar.js');if(!_c.calendar){_c.calendar=new Calendar();_c.calendar.init(p.cont);rename_observers.push(_c.calendar);}}} startup_list.push(setup_calendar);if(isIE6){var scroll_list=[] window.onscroll=function(){for(var i=0;i