source: extensions/modus/js/modus.async.js @ 25794

Last change on this file since 25794 was 25794, checked in by rvelices, 10 years ago
File size: 1.3 KB
Line 
1$("#albumActionsSwitcher").click( function() {
2        var box = $(".categoryActions");
3        if (box.is(":visible")) {
4                box.css("display", ""); // remove inline css in case browser resizes larger
5        }
6        else {
7                $("#menubar,.switchBox").css("display", "");
8                box.css("left", Math.min( $(this).position().left, $(window).width() - box.outerWidth(true) - 5))
9                        .css("top", $(this).position().top + $(this).outerHeight(true))
10                        .css("display", "block");
11        }
12});
13
14if ( !("ontouchstart" in document) )
15        $(".categoryActions").on("mouseleave", function() {
16                if ($("#albumActionsSwitcher").is(":visible"))
17                        $(this).css("display", ""); // remove inline css in case browser resizes larger
18        });
19
20
21$("#imageActionsSwitch").click( function() {
22        var box = $(".actionButtons");
23        if (box.is(":visible")) {
24                box.css("display", ""); // remove inline css in case browser resizes larger
25        }
26        else {
27                $("#menubar,.switchBox").css("display", "");
28                box.css("left", Math.min( $(this).position().left, $(window).width() - box.outerWidth(true) - 5))
29                        .css("top", $(this).position().top + $(this).outerHeight(true))
30                        .css("display", "block");
31        }
32});
33
34if ( !("ontouchstart" in document) )
35        $(".actionButtons").on("mouseleave", function() {
36                if ($("#imageActionsSwitch").is(":visible"))
37                        $(this).css("display", ""); // remove inline css in case browser resizes larger
38        });
Note: See TracBrowser for help on using the repository browser.