ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

context_menu.js.patch

Append menu to 'wrapper' and take scrollY into account when positioning. - Andrew Smith, 2012-02-14 04:25 am

Download (1.1 kB)

 
public/javascripts/context_menu.js
92 92
      var menu = document.createElement("div");
93 93
      menu.setAttribute("id", "context-menu");
94 94
      menu.setAttribute("style", "display:none;");
95
      document.getElementById("content").appendChild(menu);
95
      document.getElementById("wrapper").appendChild(menu);
96 96
    }
97 97
  },
98 98
  
......
128 128
				 var ws = window_size();
129 129
				 window_width = ws.width;
130 130
				 window_height = ws.height;
131

  
132
				var scrollTop = $(window).scrollY;
131 133
			
132 134
				 /* display the menu above and/or to the left of the click if needed */
133 135
				 if (max_width > window_width) {
......
136 138
				 } else {
137 139
					 $('context-menu').removeClassName('reverse-x');
138 140
				 }
139
				 if (max_height > window_height) {
141
				 if (max_height > (window_height + scrollTop)) {
140 142
				   render_y -= menu_height;
141 143
				   $('context-menu').addClassName('reverse-y');
142 144
				 } else {