mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
332a7b2f3d
|
@ -231,6 +231,7 @@
|
|||
- check extension dependency on shell commands
|
||||
- log reason for notification
|
||||
- add list of notification services
|
||||
- clicking on the file selection button no longer submits the form in firefox
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 5.1.25
|
||||
|
|
|
@ -673,11 +673,20 @@ function onAddClipboard(ev) { /* {{{ */
|
|||
maxFileSize = size;
|
||||
}
|
||||
|
||||
SeedDMSUpload.getMaxFileSize = function() {
|
||||
return maxFileSize;
|
||||
}
|
||||
|
||||
SeedDMSUpload.setMaxFileSizeMsg = function(msg) {
|
||||
maxFileSizeMsg = msg;
|
||||
}
|
||||
|
||||
function sendFileToServer(formData,status,callback) {
|
||||
SeedDMSUpload.getMaxFileSizeMsg = function() {
|
||||
return maxFileSizeMsg;
|
||||
}
|
||||
|
||||
// function sendFileToServer(formData,status,callback) {
|
||||
SeedDMSUpload.sendFileToServer = function(formData,status,callback) {
|
||||
var uploadURL = ajaxurl; //Upload URL
|
||||
var extraData ={}; //Extra Data.
|
||||
var jqXHR=$.ajax({
|
||||
|
@ -736,7 +745,8 @@ function onAddClipboard(ev) { /* {{{ */
|
|||
status.setAbort(jqXHR);
|
||||
}
|
||||
|
||||
function createStatusbar(obj) {
|
||||
//function createStatusbar(obj) {
|
||||
SeedDMSUpload.createStatusbar = function(obj) {
|
||||
rowCount++;
|
||||
var row="odd";
|
||||
this.obj = obj;
|
||||
|
@ -832,9 +842,9 @@ function onAddClipboard(ev) { /* {{{ */
|
|||
// fd.append('path', files[i].webkitRelativePath);
|
||||
|
||||
statusbar.parent().show();
|
||||
var status = new createStatusbar(statusbar);
|
||||
var status = new SeedDMSUpload.createStatusbar(statusbar);
|
||||
status.setFileNameSize(files[i].name,files[i].size);
|
||||
sendFileToServer(fd,status,function(){
|
||||
SeedDMSUpload.sendFileToServer(fd,status,function(){
|
||||
if(target_id == seeddms_folder)
|
||||
$("div.ajax[data-action='folderList']").trigger('update', {folderid: seeddms_folder});
|
||||
});
|
||||
|
@ -860,9 +870,9 @@ function onAddClipboard(ev) { /* {{{ */
|
|||
fd.append('userfile', files[i]);
|
||||
fd.append('command', 'uploaddocument');
|
||||
|
||||
var status = new createStatusbar(statusbar);
|
||||
var status = new SeedDMSUpload.createStatusbar(statusbar);
|
||||
status.setFileNameSize(files[i].name,files[i].size);
|
||||
sendFileToServer(fd,status);
|
||||
SeedDMSUpload.sendFileToServer(fd,status);
|
||||
} else {
|
||||
noty({
|
||||
text: maxFileSizeMsg + '<br /><em>' + files[i].name + ' (' + files[i].size + ' Bytes)</em>',
|
||||
|
@ -885,9 +895,9 @@ function onAddClipboard(ev) { /* {{{ */
|
|||
fd.append('userfile', files[i]);
|
||||
fd.append('command', 'addfile');
|
||||
|
||||
var status = new createStatusbar(statusbar);
|
||||
var status = new SeedDMSUpload.createStatusbar(statusbar);
|
||||
status.setFileNameSize(files[i].name,files[i].size);
|
||||
sendFileToServer(fd,status, function(){
|
||||
SeedDMSUpload.sendFileToServer(fd,status, function(){
|
||||
$("div.ajax[data-action='documentFiles']").trigger('update', {documentid: target_id});
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -1504,9 +1504,9 @@ $(document).ready(function() {
|
|||
<div class="input-group">
|
||||
<input type="text" class="form-control fileupload-group" id="kkll'.$id.'" readonly>
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-secondary btn-file">
|
||||
<a class="btn btn-secondary btn-file">
|
||||
'.getMLText("browse").'… <input id="'.$id.'" type="file" name="'.$varname.'"'.($multiple ? " multiple" : "").($accept ? ' accept="'.$accept.'"' : "").' data-target-highlight="kkll'.$id.'">
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -704,11 +704,20 @@ function onAddClipboard(ev) { /* {{{ */
|
|||
maxFileSize = size;
|
||||
}
|
||||
|
||||
SeedDMSUpload.getMaxFileSize = function() {
|
||||
return maxFileSize;
|
||||
}
|
||||
|
||||
SeedDMSUpload.setMaxFileSizeMsg = function(msg) {
|
||||
maxFileSizeMsg = msg;
|
||||
}
|
||||
|
||||
function sendFileToServer(formData,status,callback) {
|
||||
SeedDMSUpload.getMaxFileSizeMsg = function() {
|
||||
return maxFileSizeMsg;
|
||||
}
|
||||
|
||||
// function sendFileToServer(formData,status,callback) {
|
||||
SeedDMSUpload.sendFileToServer = function(formData,status,callback) {
|
||||
var uploadURL = ajaxurl; //Upload URL
|
||||
var extraData ={}; //Extra Data.
|
||||
var jqXHR=$.ajax({
|
||||
|
@ -767,7 +776,8 @@ function onAddClipboard(ev) { /* {{{ */
|
|||
status.setAbort(jqXHR);
|
||||
}
|
||||
|
||||
function createStatusbar(obj) {
|
||||
//function createStatusbar(obj) {
|
||||
SeedDMSUpload.createStatusbar = function(obj) {
|
||||
rowCount++;
|
||||
var row="odd";
|
||||
this.obj = obj;
|
||||
|
@ -863,9 +873,9 @@ function onAddClipboard(ev) { /* {{{ */
|
|||
// fd.append('path', files[i].webkitRelativePath);
|
||||
|
||||
statusbar.parent().show();
|
||||
var status = new createStatusbar(statusbar);
|
||||
var status = new SeedDMSUpload.createStatusbar(statusbar);
|
||||
status.setFileNameSize(files[i].name,files[i].size);
|
||||
sendFileToServer(fd,status,function(){
|
||||
SeedDMSUpload.sendFileToServer(fd,status,function(){
|
||||
if(target_id == seeddms_folder)
|
||||
$("div.ajax[data-action='folderList']").trigger('update', {folderid: seeddms_folder});
|
||||
});
|
||||
|
@ -891,9 +901,9 @@ function onAddClipboard(ev) { /* {{{ */
|
|||
fd.append('userfile', files[i]);
|
||||
fd.append('command', 'uploaddocument');
|
||||
|
||||
var status = new createStatusbar(statusbar);
|
||||
var status = new SeedDMSUpload.createStatusbar(statusbar);
|
||||
status.setFileNameSize(files[i].name,files[i].size);
|
||||
sendFileToServer(fd,status);
|
||||
SeedDMSUpload.sendFileToServer(fd,status);
|
||||
} else {
|
||||
noty({
|
||||
text: maxFileSizeMsg + '<br /><em>' + files[i].name + ' (' + files[i].size + ' Bytes)</em>',
|
||||
|
@ -916,9 +926,9 @@ function onAddClipboard(ev) { /* {{{ */
|
|||
fd.append('userfile', files[i]);
|
||||
fd.append('command', 'addfile');
|
||||
|
||||
var status = new createStatusbar(statusbar);
|
||||
var status = new SeedDMSUpload.createStatusbar(statusbar);
|
||||
status.setFileNameSize(files[i].name,files[i].size);
|
||||
sendFileToServer(fd,status, function(){
|
||||
SeedDMSUpload.sendFileToServer(fd,status, function(){
|
||||
$("div.ajax[data-action='documentFiles']").trigger('update', {documentid: target_id});
|
||||
});
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user