|
|
@@ -4200,8 +4200,11 @@ jQuery(document).ready(function(){
|
|
|
}
|
|
|
|
|
|
public function convertFileListToJson($files, $folderWeb, $localPath, $mainFolder) {
|
|
|
- sort($files);
|
|
|
$jsonFiles = array();
|
|
|
+ if (!is_array($files) || empty($files)) {
|
|
|
+ return $jsonFiles;
|
|
|
+ }
|
|
|
+ sort($files);
|
|
|
foreach ($files as $vFilePath) {
|
|
|
$file = new stdClass();
|
|
|
$file->name = str_replace("{$localPath}/{$mainFolder}/", '', $vFilePath);
|
|
|
@@ -4724,18 +4727,15 @@ jQuery(document).ready(function(){
|
|
|
// validate
|
|
|
if (argsMap['M_DIST_UPLOAD_SOURCE'] == 'local') {
|
|
|
if (!argsMap['M_DIST_FILES_NAME']) {
|
|
|
- if (priv.options.debug) console.log('TODO: nie wybrano lokalnego pliku!');
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
else if (argsMap['M_DIST_UPLOAD_SOURCE'] == 'scan') {
|
|
|
if (!argsMap['SCANS_COLUMN_ADD']) {
|
|
|
- if (priv.options.debug) console.log('TODO: nie wybrano pliku ze skanów!');
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- if (priv.options.debug) console.log('TODO: nie wybrano źródła pliku!');
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
@@ -4808,7 +4808,6 @@ jQuery(document).ready(function(){
|
|
|
_connTblsWrap.find('.conn-tbl-load').each(function(){
|
|
|
jQuery(this).click(function(e){
|
|
|
var tblID = jQuery(e.target).data('zasobid');
|
|
|
- if (priv.options.debug) console.log('clicked: ', tblID);
|
|
|
if (tblID) {
|
|
|
connTblListUpdateAjax<?php echo $this->_htmlID; ?>(tblID);
|
|
|
}// TODO: else show error
|