Browse Source

Merge 2a13dfd3f1 into 2f313f137a

pull/22/merge
Alexander V. Sergeyev 11 years ago
parent
commit
ba92786c5e
4 changed files with 30 additions and 3 deletions
  1. +1
    -0
      cms/config/definitions.conf.php
  2. +2
    -1
      cms/templates/default.tpl
  3. +10
    -1
      static/css/style.css
  4. +17
    -1
      static/js/main.js

+ 1
- 0
cms/config/definitions.conf.php View File

@ -7,6 +7,7 @@ define('JQUERY_UI_HANDLER', STATIC_URL.'js/jquery_ui_handler.js');
define('BOOTSTRAP', '//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js');
define('BOOTSTRAP_CSS', '//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css');
define('BOOTSTRAP_HOVER_PLUGIN', 'http://cdnjs.cloudflare.com/ajax/libs/bootstrap-hover-dropdown/2.0.10/bootstrap-hover-dropdown.js');
define('WYSIWYG_EDITOR', '//tinymce.cachefly.net/4.0/tinymce.min.js');
define('WYSIWYG_EDITOR_INIT', BASE_URL . 'static/js/wysiwyg_init.js');


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

@ -29,7 +29,8 @@
<?php if ($menu_1 && isset($menus[$menu_1])): ?>
<ul class="nav nav-pills">
<?php foreach ($menus[$menu_1] as $item): ?>
<li<?php if (!empty($item['section']) && $item['section'] == $section[0]): ?> class="active"<?php endif; ?>>
<li data-section="<?php echo $item['section']?>"
<?php if (!empty($item['section']) && $item['section'] == $section[0]): ?> class="active"<?php endif; ?>>
<a href="<?php echo $item['link']; ?>"
title="<?php echo $item['title']; ?>"<?php if ($item['accesskey'] != ''): ?> accesskey="<?php echo $item['accesskey']; ?>"<?php endif; ?>><?php echo $item['name']; ?></a>
</li><?php endforeach; ?>


+ 10
- 1
static/css/style.css View File

@ -77,7 +77,16 @@ h4.author { font-size:14px; margin-bottom:5px; font-style:italic; }
#menu-toggle-handle .icon-bar { display: block; margin:auto; width:22px; height:2px; background-color:#fff; border-radius:1px; }
#menu-toggle-handle .icon-bar + .icon-bar { margin-top:4px; }
.dropdown-menu .glyphicon { padding-right:5px; }
.dropdown-menu .glyphicon { padding-right:5px; }
/* Pills dropdown*/
ul.nav.nav-pills li.dropdown:hover ul.dropdown-menu{
display: block;
}
ul.nav.nav-pills .dropdown-menu {
margin-top: 1px;
}
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; }


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

@ -1,5 +1,21 @@
$(function() {
$("#menu-toggle-handle").click(function(e) { $('#nav').slideToggle('fast'); });
$('#menu-toggle-handle').click(function(e) { $('#nav').slideToggle('fast'); });
$('ul.nav.nav-pills > li').each(
function(){
var _sameSection = $('li[data-section*="'+$(this).data('section')+'"]');
if(_sameSection.length > 1 && !_sameSection.hasClass('dropdown')){
_sameSection.first().addClass('dropdown')
.find('a:first')
.append('<span class="caret"></span>');
_sameSection.first().append(_sameSection.not(':first'));
_sameSection.not(':first').removeClass('active')
.wrapAll('<ul class="dropdown-menu dropdown-menu-right" role="menu"></ul>');
}
}
);
});

Loading…
Cancel
Save