mirror of
https://github.com/e107inc/e107.git
synced 2025-08-23 06:33:22 +02:00
More Media-Manager (work in progress)
This commit is contained in:
@@ -145,20 +145,22 @@ class e_form
|
||||
}
|
||||
|
||||
// FIXME - Dialog JS no more working, investigate
|
||||
public function mediaUrl($category = '', $label = '', $tagid='', $tabs=TRUE)
|
||||
public function mediaUrl($category = '', $label = '', $tagid='', $bbcode='')
|
||||
{
|
||||
if($category) $category = '&for='.$category;
|
||||
$cat = ($category) ? '&for='.$category : "";
|
||||
if(!$label) $label = ' Upload an image or file';
|
||||
if($tagid) $category .= '&tagid='.$tagid;
|
||||
|
||||
if($tagid) $cat .= '&tagid='.$tagid;
|
||||
if($bbcode) $cat .= '&bbcode=1';
|
||||
// $tabs // TODO - option to choose which tabs to display.
|
||||
|
||||
//TODO Parse selection data back to parent form.
|
||||
|
||||
$url = e_ADMIN_ABS."image.php?mode=main&action=dialog".$category;
|
||||
$url = e_ADMIN_ABS."image.php?mode=main&action=dialog".$cat;
|
||||
|
||||
$ret = "<a title='Click to Change' rel='external' class='e-dialog' href='".$url."'>".$label."</a>";
|
||||
|
||||
// $footer = "<div style=\'padding:5px;text-align:center\' <a href=\'#\' >Save</a></div>";
|
||||
$footer = '';
|
||||
if(!e107::getRegistry('core/form/mediaurl'))
|
||||
{
|
||||
e107::getJs()->requireCoreLib('core/admin.js')
|
||||
@@ -172,10 +174,10 @@ class e_form
|
||||
ev.stop();
|
||||
new e107Widgets.URLDialog(element.href + "&iframe=1", {
|
||||
id: element["id"] || "e-dialog",
|
||||
width: 900,
|
||||
height: 600
|
||||
width: 830,
|
||||
height: 650
|
||||
|
||||
}).center().activate().show();
|
||||
}).center().setHeader("Media Manager : '.$category.'").setFooter('.$footer.').activate().show();
|
||||
});
|
||||
');
|
||||
e107::setRegistry('core/form/mediaurl', true);
|
||||
|
Reference in New Issue
Block a user