Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-02-01 05:43:40 +0300
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-02-01 05:43:40 +0300
commit1be04929f410c5f583d17f6c2c558c7db77e39c3 (patch)
tree3aae809d7c5fe320d79d040a5c43f1792f6af6ac /libs
parentb5aa83d706c6826942bdc334daea6a38daeadc8f (diff)
- fixed bug period range generation
- started splitting the Home controller in the plugins controllers - now no need to create a controller.php you can put all the classes in one plugin file - developped the plugin administration screen - added activate/desactivate plugins/ saved in config file / added config file write - redone menu generation. now plugins can create menu entries level1 or level2 - fixed wronte row id in sitemanager when adding a site
Diffstat (limited to 'libs')
-rw-r--r--libs/jquery/superfish.js100
1 files changed, 100 insertions, 0 deletions
diff --git a/libs/jquery/superfish.js b/libs/jquery/superfish.js
new file mode 100644
index 0000000000..1cd41b8f11
--- /dev/null
+++ b/libs/jquery/superfish.js
@@ -0,0 +1,100 @@
+/*
+ * Superfish v1.4.1 - jQuery menu widget
+ * Copyright (c) 2007 Joel Birch
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
+ */
+
+(function($){
+ $.superfish = {};
+ $.superfish.o = [];
+ $.superfish.op = {};
+ $.superfish.defaults = {
+ hoverClass : 'sfHover',
+ pathClass : 'overideThisToUse',
+ delay : 800,
+ animation : {opacity:'show'},
+ speed : 'normal',
+ oldJquery : false, /* set to true if using jQuery version below 1.2 */
+ disableHI : false, /* set to true to disable hoverIntent usage */
+ // callback functions:
+ onInit : function(){},
+ onBeforeShow: function(){},
+ onShow : function(){}, /* note this name changed ('onshow' to 'onShow') from version 1.4 onward */
+ onHide : function(){}
+ };
+ $.fn.superfish = function(op){
+ var bcClass = 'sfbreadcrumb',
+ over = function(){
+ var $$ = $(this), menu = getMenu($$);
+ getOpts(menu,true);
+ clearTimeout(menu.sfTimer);
+ $$.showSuperfishUl().siblings().hideSuperfishUl();
+ },
+ out = function(){
+ var $$ = $(this), menu = getMenu($$);
+ var o = getOpts(menu,true);
+ clearTimeout(menu.sfTimer);
+ if ( !$$.is('.'+bcClass) ) {
+ menu.sfTimer=setTimeout(function(){
+ $$.hideSuperfishUl();
+ if (o.$path.length){over.call(o.$path);}
+ },o.delay);
+ }
+ },
+ getMenu = function($el){ return $el.parents('ul.superfish:first')[0]; },
+ getOpts = function(el,menuFound){ el = menuFound ? el : getMenu(el); return $.superfish.op = $.superfish.o[el.serial]; },
+ hasUl = function(){ return $.superfish.op.oldJquery ? 'li[ul]' : 'li:has(ul)'; };
+
+ return this.each(function() {
+ var s = this.serial = $.superfish.o.length;
+ var o = $.extend({},$.superfish.defaults,op);
+ o.$path = $('li.'+o.pathClass,this).each(function(){
+ $(this).addClass(o.hoverClass+' '+bcClass)
+ .filter(hasUl()).removeClass(o.pathClass);
+ });
+ $.superfish.o[s] = $.superfish.op = o;
+
+ $(hasUl(),this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out)
+ .not('.'+bcClass)
+ .hideSuperfishUl();
+
+ var $a = $('a',this);
+ $a.each(function(i){
+ var $li = $a.eq(i).parents('li');
+ $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
+ });
+
+ o.onInit.call(this);
+
+ }).addClass('superfish');
+ };
+
+ $.fn.extend({
+ hideSuperfishUl : function(){
+ var o = $.superfish.op,
+ $ul = $('li.'+o.hoverClass,this).add(this).removeClass(o.hoverClass)
+ .find('>ul').hide().css('visibility','hidden');
+ o.onHide.call($ul);
+ return this;
+ },
+ showSuperfishUl : function(){
+ var o = $.superfish.op,
+ $ul = this.addClass(o.hoverClass)
+ .find('>ul:hidden').css('visibility','visible');
+ o.onBeforeShow.call($ul);
+ $ul.animate(o.animation,o.speed,function(){ o.onShow.call(this); });
+ return this;
+ }
+ });
+
+ $(window).unload(function(){
+ $('ul.superfish').each(function(){
+ $('li',this).unbind('mouseover','mouseout','mouseenter','mouseleave');
+ });
+ });
+})(jQuery); \ No newline at end of file