(function(){
    X.pageLogic['modifyname'] = {
        init : function(parms){  
            var me = this;
            this.parms = parms;
            this.callback = parms.callback; //选择后执行的回调
            var data = parms.extData;
            console.log(11111,data);
            $(document).off('click','.modifyname-qd').on('click','.modifyname-qd',function(){
                var txt = $(".modifyname-txt").val();
                X.api("dashboard/edit","post",{dashboard_id:data[0],new_name:txt},function(d){
                    console.log(d);
                    layer.closeAll(0);
                })
            });

            $(document).off('click','.modifyname-qx').on('click','.modifyname-qx',function(){
                layer.closeAll();
            });

            $(document).off('click','.modifyname-cha').on('click','.modifyname-cha',function(){
                layer.closeAll();
            });

        }
    };
})();