Jquery 如何将事件formAddNewRow添加到可编辑数据表以创建fineUploader对象?
我正在尝试将文件上传器添加到一个jquery数据表中http://code.google.com/p/jquery-datatables-editable/ 我尝试在表单中添加一个div,但是fineUploader保留了上次操作的状态Jquery 如何将事件formAddNewRow添加到可编辑数据表以创建fineUploader对象?,jquery,datatables,valums-file-uploader,Jquery,Datatables,Valums File Uploader,我正在尝试将文件上传器添加到一个jquery数据表中http://code.google.com/p/jquery-datatables-editable/ 我尝试在表单中添加一个div,但是fineUploader保留了上次操作的状态 $(document).ready(function() { $('#fine-uploader').fineUploader({ request: { endpoint: ...
$(document).ready(function() {
$('#fine-uploader').fineUploader({
request: {
endpoint: ...
<form id="formAddNewMedia" action="#" title="Agregar un elemento">
<div id="fine-uploader"></div>
<label for=....
我认为可以将其添加到jquery.dataTables.editable.js中
//Setup form to open in dialog
oAddNewRowForm = $("#" + properties.sAddNewRowFormId);
if (oAddNewRowForm.length != 0) {
if (properties.oAddNewRowFormOptions != null) {
properties.oAddNewRowFormOptions.autoOpen = false;
} else {
properties.oAddNewRowFormOptions = { autoOpen: false };
}
oAddNewRowForm.dialog(properties.oAddNewRowFormOptions);
//Add button click handler on the "Add new row" button
oAddNewRowButton = $("#" + properties.sAddNewRowButtonId);
if (oAddNewRowButton.length != 0) {
oAddNewRowButton.click(function () {
oAddNewRowForm.dialog('open');
});
} else {
if ($(properties.sAddDeleteToolbarSelector).length == 0) {
throw "Cannot find a button with an id '" + properties.sAddNewRowButtonId + "', od placeholder with an id '" + properties.sAddDeleteToolbarSelector + "' that should be used for adding new row although form for adding new record is specified";
} else {
oAddNewRowButton = null; //It will be auto-generated later
}
}
使用oAddNewRowForm打开对话框的位置。对话框“打开”
有没有人有节省睡眠的想法
//Setup form to open in dialog
oAddNewRowForm = $("#" + properties.sAddNewRowFormId);
if (oAddNewRowForm.length != 0) {
if (properties.oAddNewRowFormOptions != null) {
properties.oAddNewRowFormOptions.autoOpen = false;
} else {
properties.oAddNewRowFormOptions = { autoOpen: false };
}
oAddNewRowForm.dialog(properties.oAddNewRowFormOptions);
//Add button click handler on the "Add new row" button
oAddNewRowButton = $("#" + properties.sAddNewRowButtonId);
if (oAddNewRowButton.length != 0) {
oAddNewRowButton.click(function () {
oAddNewRowForm.dialog('open');
});
} else {
if ($(properties.sAddDeleteToolbarSelector).length == 0) {
throw "Cannot find a button with an id '" + properties.sAddNewRowButtonId + "', od placeholder with an id '" + properties.sAddDeleteToolbarSelector + "' that should be used for adding new row although form for adding new record is specified";
} else {
oAddNewRowButton = null; //It will be auto-generated later
}
}