commit
c382e0d205
|
@ -38,15 +38,17 @@ class LessCompiler
|
|||
|
||||
/**
|
||||
* Create a new instance
|
||||
*
|
||||
* @param string $basePath Provide web base path optional
|
||||
*/
|
||||
public function __construct()
|
||||
public function __construct($basePath = null)
|
||||
{
|
||||
require_once 'lessphp/lessc.inc.php';
|
||||
$this->lessc = new lessc();
|
||||
|
||||
$this->lessc->setVariables(
|
||||
array(
|
||||
'baseurl' => '\'' . Zend_Controller_Front::getInstance()->getBaseUrl(). '\''
|
||||
'baseurl' => '\'' . $basePath. '\''
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ use Icinga\Web\LessCompiler;
|
|||
class StyleSheet
|
||||
{
|
||||
protected static $lessFiles = array(
|
||||
'../application/fonts/fontello-ifont/css/ifont-embedded.css',
|
||||
'fonts/fontello-ifont/css/ifont-embedded.less',
|
||||
'css/vendor/tipsy.css',
|
||||
'css/icinga/defaults.less',
|
||||
'css/icinga/layout-colors.less',
|
||||
|
@ -96,7 +96,8 @@ class StyleSheet
|
|||
$cache->send($cacheFile);
|
||||
return;
|
||||
}
|
||||
$less = new LessCompiler();
|
||||
|
||||
$less = new LessCompiler(dirname($_SERVER['PHP_SELF']));
|
||||
foreach ($lessFiles as $file) {
|
||||
$less->addFile($file);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
@font-face {
|
||||
font-family: 'ifont';
|
||||
src: url('../font/ifont.eot?75097146');
|
||||
src: url('../font/ifont.eot?75097146#iefix') format('embedded-opentype'),
|
||||
url('../font/ifont.svg?75097146#ifont') format('svg');
|
||||
src: url('@{baseurl}/fonts/fontello-ifont/font/ifont.eot?75097146');
|
||||
src: url('@{baseurl}/fonts/fontello-ifont/font/ifont.eot?75097146#iefix') format('embedded-opentype'),
|
||||
url('@{baseurl}/fonts/fontello-ifont/ifont.svg?75097146#ifont') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
|
@ -0,0 +1,6 @@
|
|||
# fontello-ifont has been moved
|
||||
|
||||
The font directory has been moved to the public structure because of Internet Explorer version 8 compatibility. The
|
||||
common way for browsers is to include the binary embeded font type in the javascript. IE8 falls back and include one of
|
||||
the provided font sources. Therefore it is important to have the font files available public and exported by the
|
||||
HTTP server.
|
|
@ -130,23 +130,26 @@
|
|||
}
|
||||
|
||||
setTimeout(function () {
|
||||
if (! $li.is('li:hover')) {
|
||||
return;
|
||||
}
|
||||
if ($li.hasClass('active')) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (!$li.is('li:hover')) {
|
||||
return;
|
||||
}
|
||||
if ($li.hasClass('active')) {
|
||||
return;
|
||||
}
|
||||
} catch(e) { /* Bypass because if IE8 */ }
|
||||
|
||||
$li.siblings().each(function () {
|
||||
var $sibling = $(this);
|
||||
if ($sibling.is('li:hover')) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if ($sibling.is('li:hover')) {
|
||||
return;
|
||||
}
|
||||
} catch(e) { /* Bypass because if IE8 */ };
|
||||
if ($sibling.hasClass('hover')) {
|
||||
$sibling.removeClass('hover');
|
||||
}
|
||||
});
|
||||
|
||||
self.hoverElement($li);
|
||||
}, delay);
|
||||
};
|
||||
|
@ -161,9 +164,11 @@
|
|||
}
|
||||
|
||||
setTimeout(function () {
|
||||
if ($li.is('li:hover') || $sidebar.is('sidebar:hover') ) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if ($li.is('li:hover') || $sidebar.is('sidebar:hover')) {
|
||||
return;
|
||||
}
|
||||
} catch(e) { /* Bypass because if IE8 */ };
|
||||
$li.removeClass('hover');
|
||||
$('#layout').removeClass('hoveredmenu');
|
||||
}, 500);
|
||||
|
@ -183,9 +188,11 @@
|
|||
self = event.data.self;
|
||||
setTimeout(function () {
|
||||
// TODO: make this behave well together with keyboard navigation
|
||||
if (! $li.is('li:hover') /*&& ! $li.find('a:focus')*/) {
|
||||
$li.removeClass('hover');
|
||||
}
|
||||
try {
|
||||
if (!$li.is('li:hover') /*&& ! $li.find('a:focus')*/) {
|
||||
$li.removeClass('hover');
|
||||
}
|
||||
} catch(e) { /* Bypass because if IE8 */ }
|
||||
}, 300);
|
||||
};
|
||||
Icinga.Behaviors.Navigation = Navigation;
|
||||
|
|
Loading…
Reference in New Issue