mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
5e3f5fc8f0
|
@ -841,19 +841,19 @@ function onAddClipboard(ev) { /* {{{ */
|
|||
}( window.SeedDMSUpload = window.SeedDMSUpload || {}, jQuery )); /* }}} */
|
||||
|
||||
$(document).ready(function() { /* {{{ */
|
||||
$(document).on('dragenter', "#dragandrophandler", function (e) {
|
||||
$(document).on('dragenter', "#draganddrophandler", function (e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
$(this).css('border', '2px dashed #0B85A1');
|
||||
});
|
||||
$(document).on('dragleave', "#dragandrophandler", function (e) {
|
||||
$(document).on('dragleave', "#draganddrophandler", function (e) {
|
||||
$(this).css('border', '0px solid white');
|
||||
});
|
||||
$(document).on('dragover', "#dragandrophandler", function (e) {
|
||||
$(document).on('dragover', "#draganddrophandler", function (e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
});
|
||||
$(document).on('drop', "#dragandrophandler", function (e) {
|
||||
$(document).on('drop', "#draganddrophandler", function (e) {
|
||||
$(this).css('border', '0px dotted #0B85A1');
|
||||
e.preventDefault();
|
||||
var files = e.originalEvent.dataTransfer.files;
|
||||
|
@ -1071,6 +1071,11 @@ $(document).ready(function() { /* {{{ */
|
|||
// document.location = url;
|
||||
}
|
||||
}
|
||||
} else if(target_type == 'attachment') {
|
||||
console.log('attachment');
|
||||
var files = e.originalEvent.dataTransfer.files;
|
||||
if(files.length > 0) {
|
||||
}
|
||||
}
|
||||
});
|
||||
$(document).on('dragstart', '.table-row-folder', function (e) {
|
||||
|
|
|
@ -1179,14 +1179,14 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
return;
|
||||
} /* }}} */
|
||||
|
||||
function formSubmit($value, $name='') { /* {{{ */
|
||||
function formSubmit($value, $name='', $target='') { /* {{{ */
|
||||
echo "<div class=\"controls\">\n";
|
||||
if(is_string($value)) {
|
||||
echo "<button type=\"submit\" class=\"btn btn-primary\"".($name ? ' name="'.$name.'" id="'.$name.'"' : '').">".$value."</button>\n";
|
||||
echo "<button type=\"submit\" class=\"btn btn-primary\"".($name ? ' name="'.$name.'" id="'.$name.'"' : '').($target ? ' formtarget="'.$target.'"' : '').">".$value."</button>\n";
|
||||
} else {
|
||||
if(is_array($value)) {
|
||||
foreach($value as $i=>$v)
|
||||
echo "<button type=\"submit\" class=\"btn btn-primary\"".(!empty($name[$i]) ? ' name="'.$name[$i].'" id="'.$name[$i].'"' : '').">".$v."</button>\n";
|
||||
echo "<button type=\"submit\" class=\"btn btn-primary\"".(!empty($name[$i]) ? ' name="'.$name[$i].'" id="'.$name[$i].'"' : '').(!empty($target[$i]) ? ' formtarget="'.$name[$i].'"' : '').">".$v."</button>\n";
|
||||
}
|
||||
}
|
||||
echo "</div>\n";
|
||||
|
|
|
@ -1763,11 +1763,14 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
else $this->infoMsg(getMLText("no_attached_files"));
|
||||
|
||||
if($accessobject->check_controller_access('AddFile')) {
|
||||
$this->contentContainerStart();
|
||||
if ($document->getAccessMode($user) >= M_READWRITE){
|
||||
if(0){
|
||||
?>
|
||||
<div id="_draganddrophandler" class="droptarget well alert" data-droptarget="attachment_<?= $document->getID(); ?>" data-target="<?= $document->getID(); ?>" data-uploadformtoken="<?= createFormKey(''); ?>"><?php printMLText('drop_files_here'); ?><a href="../out/out.AddFile.php?documentid=<?= $documentid ?>"> <?= getMLText("add") ?></a></div>
|
||||
<?php
|
||||
}
|
||||
print $this->html_link('AddFile', array('documentid'=>$documentid), array('class'=>'btn btn-primary'), getMLText("add"), false, true)."\n";
|
||||
}
|
||||
$this->contentContainerEnd();
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -459,7 +459,7 @@ $('body').on('click', '.order-btn', function(ev) {
|
|||
$this->contentHeading(getMLText("dropupload"), true);
|
||||
if ($folder->getAccessMode($user) >= M_READWRITE) {
|
||||
?>
|
||||
<div id="dragandrophandler" class="well alert" data-droptarget="folder_<?php echo $folder->getID(); ?>" data-target="<?php echo $folder->getID(); ?>" data-uploadformtoken="<?php echo createFormKey(''); ?>"><?php printMLText('drop_files_here'); ?></div>
|
||||
<div id="draganddrophandler" class="well alert" data-droptarget="folder_<?php echo $folder->getID(); ?>" data-target="<?php echo $folder->getID(); ?>" data-uploadformtoken="<?php echo createFormKey(''); ?>"><?php printMLText('drop_files_here'); ?></div>
|
||||
<?php
|
||||
} else {
|
||||
$this->errorMsg(getMLText('access_denied'));
|
||||
|
|
Loading…
Reference in New Issue
Block a user