mirror of
https://github.com/e107inc/e107.git
synced 2025-08-11 17:14:42 +02:00
MediaPicker Allow drag-n-drop to replace existing image.
This commit is contained in:
@@ -1440,18 +1440,15 @@ class e_form
|
|||||||
$parms['title'] = LAN_ADD;
|
$parms['title'] = LAN_ADD;
|
||||||
$editIcon = $this->mediaUrl($cat, $tp->toGlyph('fa-plus', array('fw'=>1)), $name_id,$parms);
|
$editIcon = $this->mediaUrl($cat, $tp->toGlyph('fa-plus', array('fw'=>1)), $name_id,$parms);
|
||||||
$previewIcon = '';
|
$previewIcon = '';
|
||||||
$previewClass = 'mediaselector-preview dropzone';
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$editIcon = $this->mediaUrl($cat, $tp->toGlyph('fa-edit', array('fw'=>1)), $name_id,$parms);
|
$editIcon = $this->mediaUrl($cat, $tp->toGlyph('fa-edit', array('fw'=>1)), $name_id,$parms);
|
||||||
// $previewIcon = "<a title='".LAN_PREVIEW."' class='btn btn-sm btn-default btn-secondary e-modal' data-modal-caption='".LAN_PREVIEW."' href='".$previewURL."'>".$tp->toGlyph('fa-search', array('fw'=>1))."</a>";
|
// $previewIcon = "<a title='".LAN_PREVIEW."' class='btn btn-sm btn-default btn-secondary e-modal' data-modal-caption='".LAN_PREVIEW."' href='".$previewURL."'>".$tp->toGlyph('fa-search', array('fw'=>1))."</a>";
|
||||||
$previewClass = 'mediaselector-preview';
|
|
||||||
$previewIcon = '';
|
$previewIcon = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret .= "<div id='{$name_id}_prev' class='".$previewClass."'>";
|
$ret .= "<div id='{$name_id}_prev' class='mediaselector-preview dropzone'>";
|
||||||
|
|
||||||
$ret .= $preview; // image, video. audio tag etc.
|
$ret .= $preview; // image, video. audio tag etc.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user