See ChangeLog
Monotone-Parent: eb98680a91c477e61143b911e53baa32fc0a1132 Monotone-Revision: 9aa2e2439f6636863018e6b98de93e587d01e89d Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2011-06-03T16:05:25 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
29abecf0c1
commit
066f81089d
|
@ -1,3 +1,12 @@
|
|||
2011-06-03 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/generic.js (initMenu): the wrong callbacks
|
||||
were associated to menu entries when the menu was splitted in
|
||||
multiple ULs.
|
||||
(popupSubmenu): fixed the position so it stays beside the menu
|
||||
entry when the main menu is splitted in multiple ULs. The submenu
|
||||
will no longer be displayed outside the window viewport.
|
||||
|
||||
2011-06-02 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/generic.js (hideMenu): now fires a custom
|
||||
|
|
|
@ -2147,6 +2147,7 @@ function generateMenuForMailbox(mailbox, prefix, callback) {
|
|||
var newNode;
|
||||
for (var i = 0; i < mailbox.children.length; i++) {
|
||||
if (menu.offsetHeight > windowHeight-offset) {
|
||||
// Split menu to fit screen
|
||||
var menuWidth = (parseInt(menu.offsetWidth) + 15) + "px";
|
||||
menu.style.width = menuWidth;
|
||||
menu = document.createElement("ul");
|
||||
|
|
|
@ -889,10 +889,13 @@ function popupSubmenu(event) {
|
|||
menuTop = 0;
|
||||
}
|
||||
|
||||
var menuLeft = (parentNode.offsetLeft + parentNode.offsetWidth - 3);
|
||||
if (window.width()
|
||||
< (menuLeft + submenuNode.offsetWidth))
|
||||
menuLeft = parentNode.offsetLeft - submenuNode.offsetWidth + 3;
|
||||
var menuLeft = this.offsetLeft + this.offsetWidth;
|
||||
menuLeft = $(this.parentNode.parentNode).positionedOffset()[0]
|
||||
+ $(this.parentNode).positionedOffset()[0]
|
||||
+ $(this).getWidth();
|
||||
if (menuLeft + submenuNode.getWidth() > window.width())
|
||||
// Keep the submenu inside the viewport
|
||||
menuLeft = window.width() - submenuNode.getWidth();
|
||||
|
||||
this.mouseInside = true;
|
||||
this.observe("mouseover", onMouseEnteredSubmenu);
|
||||
|
@ -1346,16 +1349,12 @@ function initMenus() {
|
|||
|
||||
function initMenu(menuDIV, callbacks) {
|
||||
var uls = menuDIV.childNodesWithTag("ul");
|
||||
for (var i = 0; i < uls.length; i++) {
|
||||
for (var i = 0, j = 0; i < uls.length; i++) {
|
||||
var lis = $(uls[i]).childNodesWithTag("li");
|
||||
for (var j = 0; j < lis.length; j++) {
|
||||
var node = $(lis[j]);
|
||||
for (var k = 0; k < lis.length; k++, j++) {
|
||||
var node = $(lis[k]);
|
||||
node.on("mousedown", listRowMouseDownHandler);
|
||||
var callback;
|
||||
if (i > 0)
|
||||
callback = callbacks[i+j+1];
|
||||
else
|
||||
callback = callbacks[i+j];
|
||||
var callback = callback = callbacks[j];
|
||||
if (callback) {
|
||||
if (typeof(callback) == "string") {
|
||||
if (callback == "-")
|
||||
|
|
Loading…
Reference in New Issue