1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Admin-ui: Grid carousel slides are now auto-normalized.

This commit is contained in:
Cameron
2017-04-05 13:31:29 -07:00
parent cc1b154e7b
commit 16957243bc
5 changed files with 76 additions and 9 deletions

View File

@@ -723,7 +723,7 @@ class admin_shortcodes
{ {
if(e_DEBUG !== false) if(e_DEBUG !== false)
{ {
return "<div class='navbar-right navbar-text admin-icon-debug' title='DEBUG MODE ACTIVE'>".e107::getParser()->toGlyph('fa-bug', array('class'=>'text-warning'))."&nbsp;&nbsp;</div>"; return "<div class='navbar-right nav-admin navbar-text admin-icon-debug' title='DEBUG MODE ACTIVE'>".e107::getParser()->toGlyph('fa-bug', array('class'=>'text-warning'))."&nbsp;&nbsp;</div>";
} }
} }
@@ -754,7 +754,7 @@ class admin_shortcodes
$outboxUrl = e_PLUGIN.'pm/admin_config.php?mode=outbox&amp;action=list&amp;iframe=1'; $outboxUrl = e_PLUGIN.'pm/admin_config.php?mode=outbox&amp;action=list&amp;iframe=1';
$composeUrl = e_PLUGIN.'pm/admin_config.php?mode=outbox&amp;action=create&amp;iframe=1'; $composeUrl = e_PLUGIN.'pm/admin_config.php?mode=outbox&amp;action=create&amp;iframe=1';
$text = '<ul class="nav navbar-nav navbar-right"> $text = '<ul class="nav nav-admin navbar-nav navbar-right">
<li class="dropdown"> <li class="dropdown">
<a class="dropdown-toggle" title="'.LAN_PM.'" role="button" data-toggle="dropdown" href="#" > <a class="dropdown-toggle" title="'.LAN_PM.'" role="button" data-toggle="dropdown" href="#" >
'.$tp->toGlyph('fa-envelope').$countDisp.'<b class="caret"></b> '.$tp->toGlyph('fa-envelope').$countDisp.'<b class="caret"></b>

View File

@@ -74,8 +74,11 @@ a.core-mainpanel-link-icon:hover { text-decoration: none; filter: none; }
.e-overlay .thumbnail { margin:0; } .e-overlay .thumbnail { margin:0; }
.admin-ui-grid img.fallback { opacity: 0.3; } .admin-ui-grid img.fallback { opacity: 0.3; }
/*
#admin-ui-carousel .carousel-inner { min-height: 65vh; } #admin-ui-carousel .carousel-inner { min-height: 65vh; }
*/

View File

@@ -733,6 +733,75 @@ $(document).ready(function()
$('.carousel').on('slid.bs.carousel', function () {
var currentIndex = $(this).find('.active').index();
var text = (currentIndex + 1);
$('#admin-ui-carousel-index').text(text);
});
$(window).load(function() {
$('.carousel').each(function(){
$(this).carouselHeights();
});
});
// Normalize Bootstrap Carousel Heights
$.fn.carouselHeights = function() {
var items = $(this).find('.item'), // grab all slides
heights = [], // create empty array to store height values
tallest, // create variable to make note of the tallest slide
call;
var normalizeHeights = function() {
items.each(function() { // add heights to array
heights.push($(this).outerHeight());
});
tallest = Math.max.apply(null, heights); // cache largest value
items.css('height', tallest);
};
normalizeHeights();
$(window).on('resize orientationchange', function() {
// reset vars
tallest = 0;
heights.length = 0;
items.css('height', ''); // reset height
if(call){
clearTimeout(call);
};
call = setTimeout(normalizeHeights, 100); // run it again
});
};
$("a.menuManagerSelect").click(function(e){ $("a.menuManagerSelect").click(function(e){

View File

@@ -720,11 +720,6 @@ $(document).ready(function()
// $(".e-spinner").spinner(); //FIXME breaks tooltips // $(".e-spinner").spinner(); //FIXME breaks tooltips
$('.carousel').on('slid.bs.carousel', function () {
var currentIndex = $(this).find('.active').index();
var text = (currentIndex + 1);
$('#admin-ui-carousel-index').text(text);
});
//check all //check all
$("#check-all").click(function(event){ $("#check-all").click(function(event){