1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 12:20:44 +02:00

Modal styling and size fixes.

This commit is contained in:
Cameron
2013-03-17 05:39:08 -07:00
parent e232331c4f
commit bba822d5ce
9 changed files with 69 additions and 50 deletions

View File

@@ -206,6 +206,11 @@ if (isset($eplug_css) && $eplug_css)
$e_js->otherCSS($kcss);
}
}
if(e107::getPref('admincss') == "admin_dark.css")
{
$e_js->coreCSS('bootstrap/css/darkstrap.css');
}
//NEW - Iframe mod
if (!defsettrue('e_IFRAME') && isset($pref['admincss']) && $pref['admincss'])
@@ -214,11 +219,7 @@ if (!defsettrue('e_IFRAME') && isset($pref['admincss']) && $pref['admincss'])
//echo "<link rel='stylesheet' href='".$css_file."' type='text/css' />\n";
$e_js->themeCSS($css_file);
if(e107::getPref('admincss') == "admin_dark.css")
{
$e_js->coreCSS('bootstrap/css/darkstrap.css');
}
}

View File

@@ -600,7 +600,11 @@ class admin_shortcodes
{
$countDisp = '';
}
$inboxUrl = e_PLUGIN.'pm/admin_config.php?'.'searchquery=&amp;iframe=1&amp;filter_options=bool__pm_to__'.USERID;
$outboxUrl = e_PLUGIN.'pm/admin_config.php?'.'searchquery=&amp;iframe=1&amp;filter_options=bool__pm_from__'.USERID;
$composeUrl = e_PLUGIN.'pm/admin_config.php?'.'mode=main&amp;iframe=1&amp;action=create';
$text = '<ul class="nav nav-pills">
<li class="dropdown">
<a class="dropdown-toggle" title="Messages" role="button" data-toggle="dropdown" href="#" >
@@ -608,9 +612,9 @@ class admin_shortcodes
</a>
<ul class="dropdown-menu" role="menu" >
<li class="nav-header">Private Messages</li>
<li><a class="e-dialog" href="'.e_PLUGIN.'pm/admin_config.php?searchquery=&amp;iframe=1&amp;filter_options=bool__pm_to__'.USERID.'" >Inbox</a></li>
<li><a class="e-dialog" href="'.e_PLUGIN.'pm/admin_config.php?searchquery=&amp;iframe=1&amp;filter_options=bool__pm_from__'.USERID.'">Outbox</a></li>
<li><a class="e-dialog" href="'.e_PLUGIN.'pm/admin_config.php?mode=main&amp;action=create&amp;iframe=1">Compose</a></li>
<li><a class="e-modal" data-cache="false" data-modal-caption="Inbox" data-target="#uiModal" href="'.$inboxUrl.'" >Inbox</a></li>
<li><a class="e-modal" data-cache="false" data-modal-caption="Outbox" data-target="#uiModal" href="'.$outboxUrl.'">Outbox</a></li>
<li><a class="e-modal" data-cache="false" data-modal-caption="Compose" data-target="#uiModal" href="'.$composeUrl.'">Compose</a></li>
</ul>
</li>
</ul>

View File

@@ -2408,7 +2408,7 @@ class e_parser
* Return an Array of all specific tags found in an HTML document and their attributes.
* @param $html - raw html code
* @param $taglist - comma separated list of tags to search or '*' for all.
* @param $header - if the $html includes the <html> <head> or <body> tags - it should be set to true.
* @param $header - if the $html includes the html head or body tags - it should be set to true.
*/
public function getTags($html, $taglist='*', $header = false)
{

View File

@@ -66,13 +66,13 @@ class private_msg_ui extends e_admin_ui
protected $pluginName = 'pm';
protected $table = 'private_msg';
protected $pid = 'pm_id';
protected $perPage = 10;
protected $listQry = '';
protected $perPage = 5;
protected $listQry = 'SELECT p.*, u.user_name FROM #private_msg AS p LEFT JOIN #user AS u ON u.user_id = p.pm_from ';
protected $listOrder = "pm_sent DESC";
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' => 'number', 'noedit'=>true, 'data' => 'int', 'filter'=>true, 'width' => '10%', '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_subject' => array ( 'title' => LAN_TITLE, 'type' => 'text', 'data' => 'str', 'width' => '15%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
@@ -99,12 +99,28 @@ class private_msg_ui extends e_admin_ui
define('e_IFRAME', true);
}
// Prevent snooping of other people's messages. ;-) //XXX Not working Yet. FIXME!
if(varset($_GET['filter_options']))
{
list($tmp,$field,$id) = explode("__",$_GET['filter_options']);
if($field == 'pm_to') // Inbox
{
// $this->listQry = "'SELECT p.*, u.user_name FROM #private_msg AS p LEFT JOIN #user AS u ON u.user_id = p.pm_from ';";
$this->fields['pm_to']['nolist'] = true;
$this->fields['options']['readParms'] = 'editClass='.e_UC_NOBDY;
}
if($field == 'pm_from') // Outbox
{
// $this->fields['pm_from']['nolist'] = true;
$this->fields['options']['readParms'] = 'editClass='.e_UC_NOBDY;
}
// echo "FIELD = ".$field;
// $this->getDispatcher()->setRequest('filter_options')
@@ -115,7 +131,10 @@ class private_msg_ui extends e_admin_ui
if($field == 'pm_from' && $id != USERID)
{
echo "<h3>HI THERE</h3>";
$_GET['filter_options'] = 'batch__pm_from__'.USERID;
}
}

View File

@@ -15,13 +15,13 @@ e107::css('inline',"
.selectEmote { display:inline-block; cursor:pointer;margin:3px }
body { text-align:center }
.area { border-left: 1px solid rgb(221, 221, 221); border-bottom: 1px solid rgb(221, 221, 221);
background-color: rgb(246, 246, 246); margin-top:-1px; padding:20px;
.area {
margin-top:-1px; padding:20px;
}
span.badge { cursor: pointer }
span.label { cursor: pointer }
ul.glyphicons { list-style:none; margin-left:0px; font-size:120%}
ul.glyphicons li { float:left; border-bottom:1px solid silver; cursor:pointer; width:190px; padding:5px; }
ul.glyphicons li { float:left; cursor:pointer; width:190px; padding:5px; }
a, li { outline: 0; }
");
@@ -169,7 +169,7 @@ class e_bootstrap
</tr>
<tr>
<td>Button Url</td>
<td><p>".$frm->text('buttonUrl','',255)."</p></td>
<td><p>".$frm->text('buttonUrl','',255,'size=xxlarge')."</p></td>
</tr>
@@ -362,10 +362,13 @@ class e_bootstrap
$text .= "<div class='area'>";
$text .= "<div class='inline-form'>Color: ".$frm->selectbox('glyph-color',$sel)." Custom: ".$frm->text('glyph-custom','').$frm->button('glyph-save','Go')."</div>";
$text .= "<ul class='glyphicons clearfix'>";
$text .= "<ul class='glyphicons well clearfix'>";
$inverse = (e107::getPref('admincss') == "admin_dark.css") ? " icon-white" : "";
foreach($icons as $ic)
{
$text .= '<li><i class="'.$ic.'"></i> '.$ic.'</li>';
$text .= '<li><i class="'.$ic.$inverse.'"></i> '.$ic.'</li>';
$text .= "\n";
}

View File

@@ -67,7 +67,8 @@ if($_POST['mode'] == 'tobbcode')
$content = str_replace($srch, $repl, $content);
// resize the thumbnail to match wysiwyg width/height.
$psrch = '/<img src="{e_BASE}thumb.php\?src=([\S]*)w=([\d]*)&amp;h=([\d]*)"(.*)width="([\d]*)" height="([\d]*)"/i';
$psrch = '/<img[^>]*src="{e_BASE}thumb.php\?src=([\S]*)w=([\d]*)&amp;h=([\d]*)"(.*)width="([\d]*)" height="([\d]*)"/i';
$prepl = '<img src="{e_BASE}thumb.php?src=$1w=$5&amp;h=$6"$4width="$5" height="$6" ';
$content = preg_replace($psrch, $prepl, $content);

View File

@@ -5,8 +5,6 @@ body, td, pre{
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 11px;
line-height: 20px;
color: #333333;
background-color: #ffffff;
}
body.mceForceColors {

View File

@@ -83,9 +83,9 @@ a.brand:hover img {
}
.modal { min-width:800px; left:38%; z-index:10001}
.modal { min-width:800px; width:70%; left:15%; right:15%; z-index:10001; margin-left:auto; margin-right:auto;}
.modal-header { border-radius: 6px 6px 6px 6px; padding-left:20px; }
.modal-body { max-height:500px; padding:10px }
.modal-body { max-height:80%; padding:10px }
#media-select-container { min-height:378px }
.modal.fade.in { top: 5%; }

View File

@@ -60,8 +60,24 @@ $(document).ready(function()
// alert(caption);
}
);
/* Bootstrap Modal window within an iFrame */
$('.e-modal').on('click', function(e)
{
e.preventDefault();
var url = $(this).attr('href');
var caption = $(this).attr('data-modal-caption');
var height = ($(window).height() * 0.7) - 50;
$('.modal-body').html('<div class="well"><iframe width="100%" height="'+height+'px" frameborder="0" scrolling="auto" style="display:block;background-color:transparent" allowtransparency="true" src="' + url + '"></iframe></div>');
$('.modal-caption').text(caption);
$('.modal').modal('show');
});
/*
/*
$('a[data-toggle="modal"]').on('click', function()
{
@@ -154,29 +170,6 @@ $(document).ready(function()
$(".adminlist tr:first").addClass("first");
$(".adminlist tr:last").addClass("last");
// Modal Box - uses inline hidden content // NEEDS work - see customize link for admin-infopanel.
$(".e-modal-iframe").click(function (e) {
var id = $(this).attr("href");
e.preventDefault();
var page = $(this).attr("href")
var pagetitle = $(this).attr("title")
var $dialog = $("<div></div>")
.html("<iframe style=\"border: 0px; \" src=\"" + page + "\" width=\"100%\" height=\"100%\"></iframe>")
.dialog({
autoOpen: false,
modal: true,
width:800,
height: 700,
minWidth: 800,
minHeight: 700,
maxHeight: 700,
title: pagetitle
});
$dialog.dialog("open");
});
// Admin Prefs Navigation