Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Revert "Bug 921828 - (app-menu) [Window Management] Refactor ListMenu…
Browse files Browse the repository at this point in the history
… and move it to AppWindow + implement System Wide Menu if needed"

This reverts commit daa85b7.

Reverted due to linter errors.
  • Loading branch information
KevinGrandon committed Jan 23, 2014
1 parent 5f7002e commit 1d2eaab
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 262 deletions.
4 changes: 3 additions & 1 deletion apps/system/index.html
Expand Up @@ -121,6 +121,9 @@
<link rel="stylesheet" type="text/css" href="style/action_menu/action_menu_extended.css">
<script defer src="js/action_menu.js"></script>

<!-- Context Menu -->
<script defer src="js/context_menu.js"></script>

<!-- Statusbar -->
<link rel="stylesheet" type="text/css" href="style/statusbar/statusbar.css">
<script defer src="js/statusbar.js"></script>
Expand Down Expand Up @@ -289,7 +292,6 @@
<!-- homescreen from being displayed must come before this script. -->
<link rel="stylesheet" type="text/css" href="style/window.css">
<script defer src="js/base_ui.js"></script>
<script defer src="js/browser_context_menu.js"></script>
<script defer src="js/app_modal_dialog.js"></script>
<script defer src="js/app_chrome.js"></script>
<script defer src="js/app_transition_controller.js"></script>
Expand Down
3 changes: 1 addition & 2 deletions apps/system/js/activity_window.js
Expand Up @@ -180,8 +180,7 @@
ActivityWindow.SUB_COMPONENTS = {
'transitionController': window.AppTransitionController,
'modalDialog': window.AppModalDialog,
'authDialog': window.AppAuthenticationDialog,
'contextmenu': window.BrowserContextMenu
'authDialog': window.AppAuthenticationDialog
};

ActivityWindow.REGISTERED_EVENTS =
Expand Down
3 changes: 1 addition & 2 deletions apps/system/js/app_window.js
Expand Up @@ -456,8 +456,7 @@
AppWindow.SUB_COMPONENTS = {
'transitionController': window.AppTransitionController,
'modalDialog': window.AppModalDialog,
'authDialog': window.AppAuthenticationDialog,
'contextmenu': window.BrowserContextMenu
'authDialog': window.AppAuthenticationDialog
};

AppWindow.prototype.openAnimation = 'enlarge';
Expand Down
166 changes: 0 additions & 166 deletions apps/system/js/browser_context_menu.js

This file was deleted.

25 changes: 25 additions & 0 deletions apps/system/js/context_menu.js
@@ -0,0 +1,25 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */

'use strict';

var ContextMenu = {
init: function cm_init() {
window.addEventListener('mozbrowsercontextmenu', this, true);
},

handleEvent: function cm_handleEvent(evt) {
var detail = evt.detail;
if (!detail.contextmenu || detail.contextmenu.items.length == 0)
return;

var onsuccess = function(action) {
detail.contextMenuItemSelected(action);
};

ActionMenu.open(detail.contextmenu.items, '', onsuccess);
evt.preventDefault();
}
};

ContextMenu.init();
14 changes: 0 additions & 14 deletions apps/system/style/window.css
Expand Up @@ -244,10 +244,6 @@
visibility: visible;
}

.appWindow > .contextmenu {
z-index: 2;
}

.appWindow > .modal-dialog {
z-index: 3;
}
Expand Down Expand Up @@ -286,12 +282,7 @@
display: none;
}

.appWindow > .contextmenu {
display: none;
}

.appWindow > .modal-dialog.visible,
.appWindow > .contextmenu.visible,
.appWindow > .authentication-dialog.visible,
.authentication-dialog > .authentication-dialog-http.visible {
display: block;
Expand Down Expand Up @@ -322,11 +313,6 @@
display: block;
}

.appWindow > form[role="dialog"][data-type="action"],
.appWindow > form[role="dialog"][data-type="object"] {
top: 2rem;
}

.appWindow > .screenshot-overlay {
z-index: -1;
visibility: hidden;
Expand Down
77 changes: 0 additions & 77 deletions apps/system/test/unit/browser_context_menu_test.js

This file was deleted.

0 comments on commit 1d2eaab

Please sign in to comment.