// Copyright (c) 2008 Synology Inc. All rights reserved.
MODULE_RECENT_COMMENT=function(_1,_2){MODULE_RECENT_COMMENT.superclass.constructor.call(this,_1,_2);var _3=SYNOBLOG_COLUMN_CENTRAL.instance();_3.on("comment_update",this.updateModuleContent,this);_3.on("article_update",this.updateModuleContent,this);};Ext.extend(MODULE_RECENT_COMMENT,SYNOBLOG_MODULE,{updateModuleContent:function(){var _4=Ext.get(this.div_id+"_content");if(_4!=null){var _5=_4.getUpdateManager();_5.update("modules/recent_comment.php","action=get_module_content");}},customizeConfigDialog:function(){this.configDialog.addButton(blog_str_common_save,this.save,this);this.configDialog.addButton(blog_str_common_close,this.hide,this);var _6=this.configDialog.getLayout();_6.beginUpdate();var _7="<div style=\"margin:20px;width:340px;\" id=\"recent_comment_form\"></div>";var cp=_6.add("center",new Ext.ContentPanel(Ext.id(),{autoCreate:true,title:blog_str_recent_comment_title,background:true}));cp.setContent(_7);_6.endUpdate();this.configDialog.getLayout().getRegion("center").showPanel(0);this.configDialog.on("show",function(_9){this.form.load({url:"modules/recent_comment.php",params:"action=get_comment_num"});},this);this.getForm();},getConfigDialogData:function(_a){if(_a.type=="submit"){this.configDialog.hide();}},getForm:function(){var ds=new Ext.data.SimpleStore({fields:["num"],data:[[1],[2],[3],[5],[7],[10],[15],[20]]});this.form.column({labelWidth:200,width:320},new Ext.form.ComboBox({fieldLabel:blog_str_recent_comment_num,name:"num",store:ds,displayField:"num",typeAhead:true,mode:"local",triggerAction:"all",selectOnFocus:true,width:100,editable:false}));this.form.render("recent_comment_form");},save:function(){this.form.submit({url:"modules/recent_comment.php",waitMsg:blog_str_man_blog_header_pic_plz_wait,params:{action:"save_comment_num"}});}});SYNOBLOG.instance().registerModule("recent_comment",{hasConfigDialog:1,width:400,height:200},MODULE_RECENT_COMMENT);