* show tooltip for left menu.
This commit is contained in:
@@ -71,8 +71,8 @@ if($extHookFiles) foreach($extHookFiles as $extHookFile) include $extHookFile;
|
||||
?>
|
||||
</head>
|
||||
<?php $singleClass = $this->app->getViewType() == 'xhtml' ? 'allow-self-open' : '';?>
|
||||
<?php if($this->moduleName == 'index' && $this->methodName == 'index' && $this->cookie->hideMenu): ?>
|
||||
<body class='menu-hide <?php echo $singleClass;?>'>
|
||||
<?php if($this->moduleName == 'index' && $this->methodName == 'index'): ?>
|
||||
<body class='menu-<?php echo $this->cookie->hideMenu ? 'hide' : 'show'; ?> <?php echo $singleClass;?>'>
|
||||
<?php else: ?>
|
||||
<body class='<?php echo $singleClass;?>'>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
body {padding-left: 96px;}
|
||||
|
||||
#menu {position: fixed; left: 0; top: 0; bottom: 0; background-color: #3C495C; width: 96px; z-index: 1015;}
|
||||
.menu-show .menu-tip {display: none!important;}
|
||||
#menuNav {position: absolute; top: 5px; bottom: 40px; width: 100%;}
|
||||
#menu .nav > li {float: none; padding: 2px 8px;}
|
||||
#menu .nav > li > a {color: #fff; line-height: 24px; padding: 6px; border-radius: 2px; white-space: nowrap; height: 36px;}
|
||||
|
||||
+11
-11
@@ -29,7 +29,7 @@
|
||||
|
||||
var $link= $('<a data-pos="menu"></a>')
|
||||
.attr('data-app', item.code)
|
||||
// .attr('data-toggle', 'tooltip')
|
||||
.attr('data-toggle', 'tooltip')
|
||||
.attr('class', 'show-in-app')
|
||||
.html(item.title);
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
.append($link)
|
||||
.appendTo($menuMainNav);
|
||||
|
||||
// $link.tooltip({title: item.text, container: 'body', placement: 'right'});
|
||||
$link.tooltip({title: item.text, container: 'body', placement: 'right', tipClass: 'menu-tip'});
|
||||
|
||||
if(!defaultApp) defaultApp = item.code;
|
||||
});
|
||||
@@ -534,7 +534,7 @@
|
||||
$(document).on('click', '.open-in-app,.show-in-app', function(e)
|
||||
{
|
||||
var $link = $(this);
|
||||
if($link.is('[data-modal],[data-toggle],.iframe,.not-in-app')) return;
|
||||
if($link.is('[data-modal],[data-toggle!="tooltip"],.iframe,.not-in-app')) return;
|
||||
var url = $link.hasClass('show-in-app') ? '' : ($link.attr('href') || $link.data('url'));
|
||||
if(url && url.indexOf('onlybody=yes') > 0) return;
|
||||
if(openApp(url, $link.data('app')))
|
||||
@@ -615,7 +615,7 @@
|
||||
{
|
||||
var $body = $('body');
|
||||
if (toggle === undefined) toggle = $body.hasClass('menu-hide');
|
||||
$body.toggleClass('menu-hide', !toggle);
|
||||
$body.toggleClass('menu-hide', !toggle).toggleClass('menu-show', !!toggle);
|
||||
$.cookie('hideMenu', String(!toggle), {expires: config.cookieLife, path: config.webRoot});
|
||||
};
|
||||
|
||||
@@ -629,13 +629,13 @@
|
||||
setTimeout(function(){$menu.removeClass('hidden')}, 200);
|
||||
});
|
||||
|
||||
// $('.menu-toggle').each(function()
|
||||
// {
|
||||
// $(this).attr('data-toggle', 'tooltip').tooltip({container: 'body', title: function(ele)
|
||||
// {
|
||||
// return $(ele).data($('body').hasClass('menu-hide') ? 'unfoldText' : 'collapseText');
|
||||
// }});
|
||||
// });
|
||||
$('.menu-toggle').each(function()
|
||||
{
|
||||
$(this).attr('data-toggle', 'tooltip').tooltip({container: 'body', placement: 'right', tipClass: 'menu-tip', title: function()
|
||||
{
|
||||
return $(this).data($('body').hasClass('menu-hide') ? 'unfoldText' : 'collapseText');
|
||||
}});
|
||||
});
|
||||
});
|
||||
}());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user