Browse Source

Fix hang #20

pull/22/head
sim2github 11 years ago
parent
commit
2829e4f751
3 changed files with 13 additions and 3 deletions
  1. +1
    -0
      cms/templates/default.tpl
  2. +2
    -2
      static/css/style.css
  3. +10
    -1
      static/js/main.js

+ 1
- 0
cms/templates/default.tpl View File

@ -105,6 +105,7 @@
<script src="<?php echo JQUERY; ?>"></script> <script src="<?php echo JQUERY; ?>"></script>
<script src="<?php echo BOOTSTRAP; ?>"></script> <script src="<?php echo BOOTSTRAP; ?>"></script>
<script src="<?php echo BOOTSTRAP_HOVER_PLUGIN; ?>"></script>
<script src="<?php echo STATIC_URL; ?>js/main.js"></script> <script src="<?php echo STATIC_URL; ?>js/main.js"></script>
<?php if ($admin): ?> <?php if ($admin): ?>
<script src="<?php echo STATIC_URL; ?>js/admin_frontend.js"></script> <script src="<?php echo STATIC_URL; ?>js/admin_frontend.js"></script>


+ 2
- 2
static/css/style.css View File

@ -80,13 +80,13 @@ h4.author { font-size:14px; margin-bottom:5px; font-style:italic; }
.dropdown-menu .glyphicon { padding-right:5px; } .dropdown-menu .glyphicon { padding-right:5px; }
/* Pills dropdown*/ /* Pills dropdown*/
ul.nav.nav-pills li.dropdown:hover ul.dropdown-menu{
/*ul.nav.nav-pills li.dropdown:hover ul.dropdown-menu{
display: block; display: block;
} }
ul.nav.nav-pills .dropdown-menu { ul.nav.nav-pills .dropdown-menu {
margin-top: 1px; margin-top: 1px;
}
}*/
a.rss { padding-left:23px; background:url(../img/rss.png) no-repeat left; } a.rss { padding-left:23px; background:url(../img/rss.png) no-repeat left; }
a.pdf { padding-left:23px; background-image:url(../img/pdf.png); background-repeat:no-repeat; background-position: top left; } a.pdf { padding-left:23px; background-image:url(../img/pdf.png); background-repeat:no-repeat; background-position: top left; }


+ 10
- 1
static/js/main.js View File

@ -7,7 +7,14 @@ $('ul.nav.nav-pills > li').each(
var _sameSection = $('li[data-section*="'+$(this).data('section')+'"]'); var _sameSection = $('li[data-section*="'+$(this).data('section')+'"]');
if(_sameSection.length > 1 && !_sameSection.hasClass('dropdown')){ if(_sameSection.length > 1 && !_sameSection.hasClass('dropdown')){
_sameSection.first().addClass('dropdown') _sameSection.first().addClass('dropdown')
.find('a:first')
.find('a:first').addClass('dropdown-toggle')
.attr({
'data-hover':'dropdown',
'data-toggle':'dropdown',
'data-hover':'dropdown',
'data-delay':'500',
'data-close-others':'false',
})
.append('<span class="caret"></span>'); .append('<span class="caret"></span>');
_sameSection.first().append(_sameSection.not(':first')); _sameSection.first().append(_sameSection.not(':first'));
@ -17,5 +24,7 @@ $('ul.nav.nav-pills > li').each(
} }
); );
$('[data-hover="dropdown"]').dropdownHover();
}); });

Loading…
Cancel
Save