mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Media-Manager Modal Window (file mode): Corrected layout/display when filtering results via ajax.
This commit is contained in:
@@ -896,6 +896,8 @@ class media_admin_ui extends e_admin_ui
|
|||||||
|
|
||||||
function init()
|
function init()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
$this->prefs['youtube_apikey']['writeParms']['post'] = " <a target='_blank' href='https://code.google.com/apis/console/'>".LAN_MORE."</a>";
|
$this->prefs['youtube_apikey']['writeParms']['post'] = " <a target='_blank' href='https://code.google.com/apis/console/'>".LAN_MORE."</a>";
|
||||||
|
|
||||||
if(E107_DEBUG_LEVEL > 0)
|
if(E107_DEBUG_LEVEL > 0)
|
||||||
@@ -1025,6 +1027,7 @@ class media_admin_ui extends e_admin_ui
|
|||||||
|
|
||||||
if($this->getQuery('iframe'))
|
if($this->getQuery('iframe'))
|
||||||
{
|
{
|
||||||
|
|
||||||
// e107::js('tinymce4','plugins/compat3x/tiny_mce_popup.js');
|
// e107::js('tinymce4','plugins/compat3x/tiny_mce_popup.js');
|
||||||
$this->getResponse()->setIframeMod(); // disable header/footer menus etc.
|
$this->getResponse()->setIframeMod(); // disable header/footer menus etc.
|
||||||
|
|
||||||
@@ -1051,8 +1054,7 @@ class media_admin_ui extends e_admin_ui
|
|||||||
function navPage() // no functioning correctly - see e_AJAX_REQUEST above.
|
function navPage() // no functioning correctly - see e_AJAX_REQUEST above.
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$bbcodeMode = ($this->getQuery('bbcode') =='img' ) ? 'bbcode=img' : FALSE;
|
||||||
$bbcodeMode = ($this->getQuery('bbcode')=='img') ? 'bbcode=img' : FALSE;
|
|
||||||
|
|
||||||
if($_GET['from'])
|
if($_GET['from'])
|
||||||
{
|
{
|
||||||
@@ -1068,11 +1070,26 @@ class media_admin_ui extends e_admin_ui
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function ListAjaxObserver()
|
||||||
|
{
|
||||||
|
$cat = $this->getQuery('for');
|
||||||
|
$file = (preg_match('/_file(_[\d]{1,2})?$/',$cat)) ? true : false;
|
||||||
|
|
||||||
|
if($file === true) // Make sure dialog mode is used when ajax searches occur.
|
||||||
|
{
|
||||||
|
$this->setQuery('action','dialog');
|
||||||
|
$this->setFileListMode($cat);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->getTreeModel()->setParam('db_query', $this->_modifyListQry(false, false, 0, false, $this->listQry))->load();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function dialogPage() // Popup dialogPage for Image Selection.
|
function dialogPage() // Popup dialogPage for Image Selection.
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
$cat = $this->getQuery('for');
|
$cat = $this->getQuery('for');
|
||||||
$file = (preg_match('/_file(_[\d]{1,2})?$/',$cat)) ? TRUE : FALSE;
|
$file = (preg_match('/_file(_[\d]{1,2})?$/',$cat)) ? TRUE : FALSE;
|
||||||
$mes = e107::getMessage();
|
$mes = e107::getMessage();
|
||||||
@@ -1090,8 +1107,28 @@ class media_admin_ui extends e_admin_ui
|
|||||||
$this->processUploadUrl(true, $cat);
|
$this->processUploadUrl(true, $cat);
|
||||||
|
|
||||||
if($file)
|
if($file)
|
||||||
|
{
|
||||||
|
$this->setFileListMode($cat);
|
||||||
|
|
||||||
|
echo $this->mediaSelectUpload('file');
|
||||||
|
|
||||||
|
$tagid = e107::getParser()->filter($this->getQuery('tagid'));
|
||||||
|
|
||||||
|
echo '<div class="media-select-file-footer"><a class="btn btn-danger e-media-select-file-none e-dialog-close" data-target="'.$tagid.'" data-target-label="'.LAN_CHOOSE_FILE.'" href="#" ><span><i class="fa fa-ban"></i> '.IMALAN_167.'</span></a></div>';
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo $this->mediaSelectUpload();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private function setFileListMode($cat)
|
||||||
{
|
{
|
||||||
$cat = e107::getParser()->toDB($cat);
|
$cat = e107::getParser()->toDB($cat);
|
||||||
|
|
||||||
if(!isset($this->cats[$cat]))
|
if(!isset($this->cats[$cat]))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -1106,6 +1143,8 @@ class media_admin_ui extends e_admin_ui
|
|||||||
$this->fields['media_dimensions']['nolist'] = true;
|
$this->fields['media_dimensions']['nolist'] = true;
|
||||||
$this->fields['media_description']['nolist'] = true;
|
$this->fields['media_description']['nolist'] = true;
|
||||||
$this->fields['media_type']['nolist'] = true;
|
$this->fields['media_type']['nolist'] = true;
|
||||||
|
$this->fields['media_url']['nolist'] = true;
|
||||||
|
$this->fields['media_sef']['nolist'] = true;
|
||||||
|
|
||||||
foreach($this->fields as $k=>$v)
|
foreach($this->fields as $k=>$v)
|
||||||
{
|
{
|
||||||
@@ -1113,24 +1152,7 @@ class media_admin_ui extends e_admin_ui
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo $this->mediaSelectUpload('file');
|
|
||||||
|
|
||||||
$tagid = e107::getParser()->filter($this->getQuery('tagid'));
|
|
||||||
|
|
||||||
echo '<div class="media-select-file-footer"><a class="btn btn-danger e-media-select-file-none e-dialog-close" data-target="'.$tagid.'" data-target-label="'.LAN_CHOOSE_FILE.'" href="#" ><span><i class="fa fa-ban"></i> '.IMALAN_167.'</span></a></div>';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
echo $this->mediaSelectUpload();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function uploadTab()
|
function uploadTab()
|
||||||
|
Reference in New Issue
Block a user