// Copyright (c) 2008 Synology Inc. All rights reserved.
MODULE_ARTICLE_COLLECTION=function(_1,_2){MODULE_ARTICLE_COLLECTION.superclass.constructor.call(this,_1,_2);var _3=SYNOBLOG_COLUMN_CENTRAL.instance();_3.on("article_update",this.updateModuleContent,this);};Ext.extend(MODULE_ARTICLE_COLLECTION,SYNOBLOG_MODULE,{updateModuleContent:function(){var _4=Ext.get(this.div_id+"_content");if(_4!=null){_4.dom.innerHTML="<table class='module_content' cellspacing='0' cellpadding='0'>"+"<tr><td class='module_title'>"+blog_str_article_collection_title+"<hr></td></tr>"+"<tr><td><div id='tree-div'></div></td></tr>"+"</table>";this.getTreeContent();}},init_module:function(){this.updateModuleContent();},getTreeContent:function(){Ext.Ajax.request({url:"modules/article_collection.php",params:"action=get_tree_date",method:"POST",scope:this,success:function(_5,_6){var _7=Ext.util.JSON.decode(_5.responseText);var _8=new Ext.tree.TreePanel("tree-div",{lines:true,rootVisible:false,animate:true});var _9=new Ext.tree.TreeNode({text:"article_collection",cls:"folder",leaf:false});_8.setRootNode(_9);var i=0,j=0;while(_7["year"]!=null&&_7["year"][i]!=null){j=0;var _c=_7["year"][i];var _d=new Ext.tree.TreeNode({text:_c});while(_7[_c][j]!=null){var _e=new Ext.tree.TreeNode({text:_7[_c][j]["desc"]+" ("+_7[_c][j]["num"]+")",leaf:true,id:_7[_c][j]["id"]});_e.on("click",function(_f,e){onNavigate("date_"+_f.id);},this);_d.appendChild(_e);j++;}_d.on("click",_d.toggle,_d);_9.appendChild(_d);i++;}_8.render();}});}});SYNOBLOG.instance().registerModule("article_collection",{hasConfigDialog:0,width:0,height:0},MODULE_ARTICLE_COLLECTION);