this.formDialog = this.qid("item-dialog-edit").dialog({
title: this._options.title,
width: 540,
modal: true,
draggable: false,
resizable: false,
autoOpen: false,
create: this.proxy(function(){
this.buildForm();
}),
open: this.proxy(function(){
if(this._avatarIsVisible === false){
this.enableForm();
this.fillFormData(this._options.data);
}
}),
close: this.proxy(function(){
if(this._avatarIsVisible === false){
this.clearFormData();
}
})
});
open:function(params){
var dialogOptions=null;
if (!params.all) {//itemPoint
this._options.mode = "EDIT";
this._options.data = params.data;
this._options.filed = params.filed;
dialogOptions = {
title: params.title,
buttons: [
{
text: this.i18n.savebtn,
click: this.proxy(function (e) {
var obj=this.formdata(this.form.serializeArray());
if(this.form.valid()){
this._sendModifyAjax({
"tokenid": $.cookie("tokenid"),
"method": "stdcomponent.update",
"dataobject": "checkList",
"dataobjectid": JSON.stringify(parseInt(params.data.id)),
"obj":obj
},e);
}
}
)
},
{
text: this.i18n.cancel,
"class": "aui-button-link",
click: this.proxy(function () {
this.formDialog.dialog("close");
})
}
]
}
}else if(params.all){
this._options.mode = "ALL";
this._options.data = params.data;
this._options.filed = params.filed;
dialogOptions = {
title: params.title,
buttons: [
{
text: this.i18n.savebtn,
click: this.proxy(function (e) {
var obj=this.formalldata(this.form.serializeArray());
if(this.form.valid()){
this._sendModifyAjax({
"tokenid": $.cookie("tokenid"),
"method": "stdcomponent.updateall",
"dataobject":"checkList",
"objs":JSON.stringify(obj)
},e);
}
}
)
},
{
text: this.i18n.cancel,
"class": "aui-button-link",
click: this.proxy(function () {
this.formDialog.dialog("close");
})
}
]
}
}
this.formDialog.dialog("option",dialogOptions).dialog("open");
$(".confirmLastDate").datepicker({ dateFormat: "yy-mm-dd" });
},