Projekt

Allgemein

Profil

GX-Bug #44223 » NoSubmenusFix.patch

/templates/EyeCandy/javascript/SubmenuHandler.js - Till Tepelmann, 15.02.2016 12:19

Unterschiede anzeigen:

src/templates/EyeCandy/javascript/SubmenuHandler.js (revision )
49 49
	{
50 50
		if(fb)console.log('SubmenuHandler init_binds');
51 51

  
52
		if(typeof parentsIds != 'undefined') {
52
		this.ie6_fix();
53
        window.parentsIdsBak = $.extend([], parentsIds);
54
        this.setCurrentsClasses();
55
        
56
		this.v_parent_ids_array = this.push_id(0, this.v_parent_ids_array);
57
		this.find_loaded_submenus();
53
			this.ie6_fix();
54
			window.parentsIdsBak = $.extend([], parentsIds);
55
			this.setCurrentsClasses();
56

  
57
			this.v_parent_ids_array = this.push_id(0, this.v_parent_ids_array);
58
			this.find_loaded_submenus();
58 59

  
59
		$('.wrap_shop').die('click', coo_this.close_all);
60
			$('.wrap_shop').die('click', coo_this.close_all);
60
		$('.wrap_shop').live('click', function(){coo_this.close_all(true)});
61
			$('.wrap_shop').live('click', function () {
62
				coo_this.close_all(true)
63
			});
61 64

  
62
		$('.submenu li img').die('click', coo_this.open_link);
63
		$('.submenu li img').live('click', coo_this.open_link);
65
			$('.submenu li img').die('click', coo_this.open_link);
66
			$('.submenu li img').live('click', coo_this.open_link);
64 67

  
65
		$('.submenu li').die('mouseenter');
68
			$('.submenu li').die('mouseenter');
66
		$('.submenu li').live('mouseenter', function()
67
		{
69
			$('.submenu li').live('mouseenter', function () {
68
			if(fb)console.log('.submenu li mouseenter');
70
				if (fb)console.log('.submenu li mouseenter');
69 71

  
70
			// clear title obscuring the menu
71
			$(this).find('a').attr('title', '');
72
				// clear title obscuring the menu
73
				$(this).find('a').attr('title', '');
72 74

  
73
			v_allow_close_all = false;
75
				v_allow_close_all = false;
74 76

  
75
			clearTimeout(v_timeout_close);
77
				clearTimeout(v_timeout_close);
76 78

  
77
			v_active_element = $(this).attr('id');
79
				v_active_element = $(this).attr('id');
78 80

  
79
			var t_coo_this = this;
81
				var t_coo_this = this;
80 82

  
81
			if(v_inactive_submenus_shown == true)
82
			{
83
				if (v_inactive_submenus_shown == true) {
83
				v_timeout_open = setTimeout(function(){
84
					v_timeout_open = setTimeout(function () {
84
                    coo_this.open_menu(t_coo_this)
85
                }, coo_this.v_delay_open);
86
			}
87
			// ignore open_delay if there are no submenus that could be left accidentally
85
						coo_this.open_menu(t_coo_this)
86
					}, coo_this.v_delay_open);
87
				}
88
				// ignore open_delay if there are no submenus that could be left accidentally
88
			else
89
			{
89
				else {
90
				if(fb)console.log('SubmenuHandler open_delay ignored')
90
					if (fb)console.log('SubmenuHandler open_delay ignored')
91
				coo_this.open_menu(t_coo_this);
92
			}
93
		});
91
					coo_this.open_menu(t_coo_this);
92
				}
93
			});
94 94

  
95
		$('.submenu li').die('mouseleave');
95
			$('.submenu li').die('mouseleave');
96
		$('.submenu li').live('mouseleave', function()
97
		{
96
			$('.submenu li').live('mouseleave', function () {
98
			if(fb)console.log('.submenu li mouseleave');
97
				if (fb)console.log('.submenu li mouseleave');
99 98

  
100
			clearTimeout(v_timeout_open);
101
			v_active_element = '';
102
		});
99
				clearTimeout(v_timeout_open);
100
				v_active_element = '';
101
			});
103 102

  
104
		$('.submenu').die('mouseleave');
103
			$('.submenu').die('mouseleave');
105
		$('.submenu').live('mouseleave', function()
106
		{
104
			$('.submenu').live('mouseleave', function () {
107
			if(fb)console.log('.submenu mouseleave');
105
				if (fb)console.log('.submenu mouseleave');
108 106

  
109
			v_allow_close_all = true;
107
				v_allow_close_all = true;
110 108

  
111
			if(typeof(gm_style_edit_mode_running) == 'undefined')
112
			{
109
				if (typeof(gm_style_edit_mode_running) == 'undefined') {
113
				v_timeout_close = setTimeout(coo_this.close_all, coo_this.v_delay_close);
114
			}
115
        });
110
					v_timeout_close = setTimeout(coo_this.close_all, coo_this.v_delay_close);
111
				}
112
			});
113
		}
116 114
	}
117 115

  
118 116

  
    (1-1/1)