mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 01:19:44 +01:00
Admin-UI: Media-Manager layout enhancements.
This commit is contained in:
parent
23a5be23eb
commit
650041b5aa
@ -172,7 +172,11 @@ if (varset($e107_popup) != 1)
|
||||
}
|
||||
else
|
||||
{
|
||||
echo($rinfo ? "\n<div class='e-footer-info muted center' style='padding-bottom:20px; margin-top:10px'><small>{$rinfo}</small></div>\n" : "");
|
||||
|
||||
if(!deftrue('e_IFRAME'))
|
||||
{
|
||||
echo($rinfo ? "\n<div class='e-footer-info muted center' style='padding-bottom:20px; margin-top:10px'><small>{$rinfo}</small></div>\n" : "");
|
||||
}
|
||||
}
|
||||
|
||||
} // End of regular-page footer (the above NOT done for popups)
|
||||
|
@ -45,11 +45,15 @@ if(isset($_POST['submit_cancel_show']))
|
||||
|
||||
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
|
||||
|
||||
|
||||
if($_GET['action'] == 'dialog')
|
||||
{
|
||||
e107::css('inline', "body { background-color: #373737 } ");
|
||||
}
|
||||
|
||||
if(vartrue($_GET['action']) == 'nav' && e_AJAX_REQUEST) //XXX Doesn't work correctly inside the class for some reason
|
||||
{
|
||||
define("e_IFRAME",true);
|
||||
|
||||
// require_once(e_ADMIN."auth.php");
|
||||
$bbcodeMode = ($_GET['bbcode']=='img') ? 'bbcode=img' : FALSE;
|
||||
|
||||
@ -1087,7 +1091,7 @@ class media_admin_ui extends e_admin_ui
|
||||
$options['bbcode'] = ($this->getQuery('bbcode')=='img') ? 'img' : FALSE;
|
||||
|
||||
|
||||
$text = "<ul class='nav nav-tabs'>\n";
|
||||
$text = "<ul id='admin-ui-media-manager' class='nav nav-tabs'>\n";
|
||||
|
||||
if($this->getQuery('bbcode') != 'video' && $this->getQuery('bbcode') != 'glyph')
|
||||
{
|
||||
|
@ -658,23 +658,24 @@ class e_media
|
||||
$data_src = $this->mediaSelectNav($category,$tagid, $option); // ."&from=0";
|
||||
|
||||
// Inline style to override jquery-ui stuff.
|
||||
$text .= "<div class='btn-group'>
|
||||
$text .= "<div>
|
||||
<div id='admin-ui-media-manager-search' class='input-append form-inline' style='margin-top:10px;font-size:12px'>
|
||||
<input type='text' id='media-search' placeholder='Search...' name='search' value='' class='e-tip' data-target='media-select-container' data-src='".$data_src."' />
|
||||
";
|
||||
// $text .= "<input type='button' value='Go' class='btn btn-primary e-media-nav' data-target='media-select-container' data-src='".$this->mediaSelectNav($category,"tagid=".$tagid."&bbcode=".$bbcode)."&from=0' /> "; // Manual filter, if onkeyup ajax fails for some reason.
|
||||
$text .= "<button type='button' class='btn btn-primary e-media-nav' data-target='media-select-container' data-src='".$data_src."' >Go</button>"; // Manual filter, if onkeyup ajax fails for some reason.
|
||||
$text .= "<button type='button' class='btn btn-primary e-media-nav' data-target='media-select-container' data-src='".$data_src."' >Go</button>"; // Manual filter, if onkeyup ajax fails for some reason.
|
||||
|
||||
$text .= "<button type='button' title='previous page' class='btn btn-default e-nav e-media-nav e-tip' data-target='media-select-container' data-nav-total='".$total."' data-nav-dir='down' data-nav-inc='".$limit."' data-src='".$data_src."' >«</button>"; // see next page of images.
|
||||
$text .= "<button id='admin-ui-media-nav-down' type='button' title='previous page' class='btn btn-default e-nav e-media-nav e-tip' style='outline:0' data-target='media-select-container' data-nav-total='".$total."' data-nav-dir='down' data-nav-inc='".$limit."' data-src='".$data_src."'>«</button>"; // see next page of images.
|
||||
|
||||
$text .= "<button type='button' title='next page' class='btn btn-default e-nav e-media-nav e-tip' style='text-align:center' data-target='media-select-container' data-nav-total='".$total."' data-nav-dir='up' data-nav-inc='".$limit."' data-src='".$data_src."' >»</button>"; // see next page of images.
|
||||
$text .= "<button id='admin-ui-media-nav-up' type='button' title='next page' class='btn btn-default e-nav e-media-nav e-tip' style='outline:0;text-align:center' data-target='media-select-container' data-nav-total='".$total."' data-nav-dir='up' data-nav-inc='".$limit."' data-src='".$data_src."' >»</button>"; // see next page of images.
|
||||
$text .= "</div></div>";
|
||||
|
||||
$text .= "<div id='admin-ui-media-select-count' class='media-select-count' style='text-align:right; display:block'> Displaying ".($frm +1)."-".($dipTotal)." of ".$total." images.</div>\n";
|
||||
|
||||
$text .= "
|
||||
<div id='media-select-container'>";
|
||||
}
|
||||
|
||||
$text .= "<div class='media-select-count' style='text-align:right; display:block'> Displaying ".($frm +1)."-".($dipTotal)." of ".$total." images.</div>\n";
|
||||
$text .= "<div id='admin-ui-media-select-count-hidden' class='media-select-count' data-media-select-current-limit='".$dipTotal."' style='text-align:right; display:none'> Displaying ".($frm +1)."-".($dipTotal)." of ".$total." images.</div>\n";
|
||||
|
||||
|
||||
if($bbcode == null) // e107 Media Manager - new-image mode.
|
||||
|
@ -55,6 +55,10 @@ tr.highlight-even, .table-striped > tbody > tr.highlight-even { background-colo
|
||||
|
||||
#admin-ui-nav-menu a.link-active { color: #fff }
|
||||
|
||||
#admin-ui-media-manager.nav-tabs { background-color: #212121 }
|
||||
.tab-content { background-color: #373737 }
|
||||
iframe { border:3px solid red; }
|
||||
|
||||
/*
|
||||
.bootstrap-select, bootstrap-select button
|
||||
{
|
||||
|
@ -5,7 +5,9 @@ body { }
|
||||
|
||||
body { padding-top: 75px; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
button, button:active { outline: 0; }
|
||||
|
||||
.container { width: 100% }
|
||||
|
||||
|
@ -381,24 +381,40 @@ $(document).ready(function()
|
||||
var loading = $(e).attr('data-loading'); // image to show loading.
|
||||
var search = $('#media-search').val(); // image to show loading.
|
||||
var nav = $(e).attr('data-nav-inc');
|
||||
|
||||
var dir = $(e).attr('data-nav-dir');
|
||||
var curTotal = $('#admin-ui-media-select-count-hidden').attr('data-media-select-current-limit');
|
||||
var total = $(e).attr('data-nav-total');
|
||||
|
||||
|
||||
|
||||
if(nav !== null && navid !==null)
|
||||
{
|
||||
eNav(e,navid);
|
||||
}
|
||||
|
||||
var src = $(e).attr("data-src");
|
||||
|
||||
if(target != null)
|
||||
|
||||
if(dir == 'down' && curTotal == 20)
|
||||
{
|
||||
// $('#admin-ui-media-nav-down').prop("disabled",false);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(dir == 'up' && curTotal == total)
|
||||
{
|
||||
// $('#admin-ui-media-nav-up').prop("disabled",false);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(target !== null)
|
||||
{
|
||||
id = '#' + target;
|
||||
}
|
||||
|
||||
|
||||
if(loading != null)
|
||||
{
|
||||
$(id).html("<img src='"+loading+"' alt='' />");
|
||||
}
|
||||
|
||||
|
||||
var src = $(e).attr("data-src"); // heep here.
|
||||
if(src === null) // old way - href='myscript.php#id-to-target
|
||||
{
|
||||
var tmp = src.split('#');
|
||||
@ -410,17 +426,63 @@ $(document).ready(function()
|
||||
{
|
||||
src = src + '&search='+search;
|
||||
}
|
||||
|
||||
$(id).fadeOut('fast');
|
||||
|
||||
|
||||
if(dir == 'down')
|
||||
{
|
||||
outDir = 'right';
|
||||
inDir = 'left';
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
outDir = 'left';
|
||||
inDir = 'right';
|
||||
}
|
||||
|
||||
$('#e-modal-loading', window.parent.document).show();
|
||||
$('iframe', window.parent.document).attr('scrolling', 'no'); // hide the scrollbar.
|
||||
|
||||
|
||||
|
||||
$.get(src, function( data ) {
|
||||
|
||||
$(id).hide('slide', { direction: outDir }, 1200, function(){
|
||||
|
||||
// alert('done');
|
||||
$(id ).html( data );
|
||||
newVal = $('#admin-ui-media-select-count-hidden').text();
|
||||
$('#admin-ui-media-select-count').text(newVal).fadeIn();
|
||||
|
||||
$(id).show('slide', { direction: inDir },1200,function(){
|
||||
$('#e-modal-loading', window.parent.document).hide();
|
||||
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
$('iframe', window.parent.document).attr('scrolling', 'auto');
|
||||
|
||||
return false;
|
||||
|
||||
|
||||
/*
|
||||
|
||||
//TODO Animate.
|
||||
$(id).load(src,function() {
|
||||
// alert(src);
|
||||
$(id).fadeIn('fast');
|
||||
// $(this).show('slow'); // .slideLeft();
|
||||
// $(id).fadeIn('fast');
|
||||
$(id).show('slow');
|
||||
// $(this).show('slow'); // ;
|
||||
});
|
||||
|
||||
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user