|
@ -96,6 +96,16 @@ class Upload extends InputWidget |
|
|
* 拉拽框大小 |
|
|
* 拉拽框大小 |
|
|
*/ |
|
|
*/ |
|
|
public $dragdropWidth; |
|
|
public $dragdropWidth; |
|
|
|
|
|
/** |
|
|
|
|
|
* @var javascript |
|
|
|
|
|
* 图片上传成功回调方法 |
|
|
|
|
|
*/ |
|
|
|
|
|
public $successScript; |
|
|
|
|
|
/** |
|
|
|
|
|
* @var |
|
|
|
|
|
* 删除图片触发方法 |
|
|
|
|
|
*/ |
|
|
|
|
|
public $deleteScript; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @throws NotFoundHttpException |
|
|
* @throws NotFoundHttpException |
|
@ -164,6 +174,7 @@ class Upload extends InputWidget |
|
|
url: "{$this->afterSave}", |
|
|
url: "{$this->afterSave}", |
|
|
dataType: "json", |
|
|
dataType: "json", |
|
|
data: {data: data, fileName: files}, |
|
|
data: {data: data, fileName: files}, |
|
|
|
|
|
{$this->successScript}, |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
onLoad:function(obj) |
|
|
onLoad:function(obj) |
|
@ -182,6 +193,7 @@ class Upload extends InputWidget |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
deleteCallback: function (data, pd) { |
|
|
deleteCallback: function (data, pd) { |
|
|
|
|
|
{$this->deleteScript} |
|
|
for (var i = 0; i < data.length; i++) { |
|
|
for (var i = 0; i < data.length; i++) { |
|
|
$.post("{$this->deleteUrl}", {op: "delete",name: data[i]}, |
|
|
$.post("{$this->deleteUrl}", {op: "delete",name: data[i]}, |
|
|
function (resp,textStatus, jqXHR) { |
|
|
function (resp,textStatus, jqXHR) { |
|
|