首页 > 代码库 > jquery ui 改写cloes事件

jquery ui 改写cloes事件

htmlAjax:{//模板ajax请求参数设置项
            url:"template/task/task_create.html",
            dataType:"html"
        },
  isNotHTML:true,
  showBeforeFormatHTML: function(tempalte){
   return tempalte;
  },
  
showAfter:function(data,tempalte){
    var $createTaskArea=$(‘<div id="createTaskArea"></div>‘);
    $createTaskArea.append(tempalte)
  
   this.creatNewTaskDialog($createTaskArea);
   this.initUserId();
   this.initPullDownList(); 
   this.bindEventsForTask();
},

/*弹出新建任务窗口*/
creatNewTaskDialog: function(tpl){
   var self = this;
      $(tpl).dialog({
     dialogClass: "task-dialog task-new-dialog", 
     modal: true,
     height: 600,
     width:630,
     title:"新建任务",
     buttons: [
     {
       text: "保存",
       click: function(e) {
       e.stopPropagation();
       var that = $(this);
       self.successCreateTask(that);
       return false;
         }
     },
     {
       text: "取消",
       click: function(e) {
       e.stopPropagation();
       $( this ).dialog("close");
         }
     }
       ],
    "close" : function() {
     $(this).off().remove();
    }
   }); 
}

 

jquery ui 改写cloes事件