mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 14:17:49 +02:00
More modal tweaks
This commit is contained in:
@@ -334,14 +334,15 @@ class e_form
|
||||
|
||||
$title = "Media Manager : ".$category;
|
||||
|
||||
$ret = "<a title=\"{$title}\" rel='external' class='e-dialog' href='".$url."'>".$label."</a>"; // using colorbox.
|
||||
// $ret = "<a title=\"{$title}\" data-toggle='modal' data-cache='false' data-target='#uiModal' href='".$url."'>".$label."</a>"; // using bootstrap.
|
||||
// $ret = "<a title=\"{$title}\" rel='external' class='e-dialog' href='".$url."'>".$label."</a>"; // using colorbox.
|
||||
$ret = "<a title=\"{$title}\" class='e-modal' data-modal-caption='Media Manager' ' data-cache='false' data-target='#uiModal' href='".$url."'>".$label."</a>"; // using bootstrap.
|
||||
|
||||
|
||||
// $footer = "<div style=\'padding:5px;text-align:center\' <a href=\'#\' >Save</a></div>";
|
||||
$footer = '';
|
||||
if(!e107::getRegistry('core/form/mediaurl'))
|
||||
{
|
||||
/*
|
||||
e107::js('core','core/admin.js','prototype');
|
||||
e107::js('core','core/dialog.js','prototype');
|
||||
e107::js('core','core/draggable.js','prototype');
|
||||
@@ -360,7 +361,7 @@ class e_form
|
||||
});
|
||||
|
||||
','prototype');
|
||||
|
||||
*/
|
||||
e107::setRegistry('core/form/mediaurl', true);
|
||||
}
|
||||
return $ret;
|
||||
@@ -2474,9 +2475,9 @@ class e_form
|
||||
$thparms['aw'] = intval($parms['thumb_aw']);
|
||||
}
|
||||
$thsrc = $tp->thumbUrl(vartrue($parms['pre']).$value, $thparms, varset($parms['thumb_urlraw']));
|
||||
$alt = $src;
|
||||
$alt = basename($src);
|
||||
$ttl = '<img src="'.$thsrc.'" alt="'.$alt.'" class="thumbnail e-thumb" />';
|
||||
$value = '<a href="'.$src.'" class="e-dialog e-image-preview" title="'.$alt.'" rel="external">'.$ttl.'</a>';
|
||||
$value = '<a href="'.$src.'" data-modal-caption="'.$alt.'" data-target="#uiModal" class="e-modal e-image-preview" title="'.$alt.'" rel="external">'.$ttl.'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -144,7 +144,7 @@ class e_menuManager {
|
||||
|
||||
$cnt = $sql->select("menus", "*", "menu_location > 0 AND menu_layout = '$curLayout' ORDER BY menu_name "); // calculate height to remove vertical scroll-bar.
|
||||
|
||||
$text = "<object type='text/html' id='menu_iframe' data='".$url."' width='100%' style='overflow:auto;width: 100%; height: ".(($cnt*90)+600)."px; border: 0px' ></object>";
|
||||
$text = "<object class='well' type='text/html' id='menu_iframe' data='".$url."' width='100%' style='overflow:auto;width: 100%; height: ".(($cnt*90)+600)."px; border: 0px' ></object>";
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
@@ -72,9 +72,9 @@ class private_msg_ui extends e_admin_ui
|
||||
|
||||
protected $fields = array ( 'checkboxes' => array ( 'title' => '', 'type' => null, 'data' => null, 'width' => '5%', 'thclass' => 'center', 'forced' => '1', 'class' => 'center', 'toggle' => 'e-multiselect', ),
|
||||
'pm_id' => array ( 'title' => LAN_ID, 'data' => 'int', 'width' => '5%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'pm_from' => array ( 'title' => 'From', 'type' => 'user', 'noedit'=>true, 'data' => 'int', 'filter'=>true, 'width' => '10%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'pm_to' => array ( 'title' => 'To', 'type' => 'user', 'data' => 'int', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
||||
'pm_sent' => array ( 'title' => LAN_DATE, 'type' => 'datestamp', 'data' => 'int', 'width' => '10%', 'help' => '', 'readParms' => '', 'writeParms' => 'auto=1&readonly=1', 'class' => 'center', 'thclass' => 'center', ),
|
||||
'pm_from' => array ( 'title' => 'From', 'type' => 'user', 'noedit'=>true, 'data' => 'int', 'filter'=>true, 'width' => '5%%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'pm_to' => array ( 'title' => 'To', 'type' => 'user', 'data' => 'int', 'width' => '5%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
||||
'pm_sent' => array ( 'title' => LAN_DATE, 'type' => 'datestamp', 'data' => 'int', 'width' => '15%', 'help' => '', 'readParms' => '', 'writeParms' => 'auto=1&readonly=1', 'class' => 'center', 'thclass' => 'center', ),
|
||||
'pm_subject' => array ( 'title' => LAN_TITLE, 'type' => 'text', 'data' => 'str', 'width' => '15%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'pm_text' => array ( 'title' => 'Message', 'type' => 'bbarea', 'data' => 'str', 'width' => 'auto', 'help' => '', 'readParms' => 'expand=1&truncate=50', 'writeParms' => 'size=medium', 'class' => 'left', 'thclass' => 'left', ),
|
||||
'pm_read' => array ( 'title' => 'Read', 'type' => 'boolean', 'noedit'=>1, 'data' => 'int', 'batch'=>true, 'filter'=>true, 'width' => '5%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'center', 'thclass' => 'center', ),
|
||||
|
@@ -50,11 +50,17 @@ $(document).ready(function()
|
||||
$('#uiModal .modal-body').html(' ');
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$('a[data-toggle="modal"]').on('click', function()
|
||||
{
|
||||
var link = $(this).attr('href');
|
||||
var caption = $(this).attr('data-modal-caption');
|
||||
var height = ($(window).height() * 0.9) - 50;
|
||||
|
||||
$('#uiModal .modal-caption').text(caption);
|
||||
$('.modal').height(height);
|
||||
// $('#uiModal .modal-label').text('Loading...');
|
||||
// $('#uiModal .modal-body').html(link);
|
||||
// alert(caption);
|
||||
|
@@ -405,7 +405,9 @@ $(document).ready(function()
|
||||
|
||||
|
||||
$(".e-dialog-close").live("click", function(){
|
||||
parent.$.colorbox.close()
|
||||
parent.$('.modal').modal('hide');
|
||||
|
||||
// parent.$.colorbox.close()
|
||||
});
|
||||
|
||||
|
||||
@@ -432,14 +434,8 @@ $(document).ready(function()
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
$(".e-dialog-close").click(function () {
|
||||
parent.$.colorbox.close()
|
||||
});
|
||||
|
||||
|
||||
// Modal Box - uses inline hidden content
|
||||
/*
|
||||
$(".e-modal").click(function () {
|
||||
var id = $(this).attr("href");
|
||||
$(id).dialog({
|
||||
@@ -449,7 +445,7 @@ $(document).ready(function()
|
||||
modal: true
|
||||
});
|
||||
});
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user