Skip to content

Commit

Permalink
Adding support for BB10 context menus. This includes both displaying the
Browse files Browse the repository at this point in the history
context menus on "long press" events as well as supporting the BB10
context menu APIs.
  • Loading branch information
Jeffrey Heifetz committed Sep 19, 2012
1 parent cf1daca commit 0974925
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
20 changes: 10 additions & 10 deletions ext/assets/ripple.css
Expand Up @@ -448,13 +448,13 @@ section.left { left: 0; }
background: rgba(0,0,0,1.0);
}

.overlay-menu-box::-webkit-scrollbar {
.overlay-menu-box::-webkit-scrollbar {
width: 0.50em;
-webkit-border-radius: 1em;
border-radius: 1em;
}
.overlay-menu-box::-webkit-scrollbar-thumb {
}

.overlay-menu-box::-webkit-scrollbar-thumb {
background: #0f55ad;
-webkit-border-radius: 1em;
border-radius: 1em;
Expand Down Expand Up @@ -870,29 +870,29 @@ section.left { left: 0; }

/* ------------------------------>
EULA Window */

.eula-window {
z-index: 9000;
width: 100%;
height: 100%;
height: 100%;
position: absolute;
top: 0;
text-align:center;
vertical-align: middle;
vertical-align: middle;
display: none;
}

.eula-dialog {
z-index: 9001;
z-index: 9001;
position: absolute;
top: 200px;
padding: 20px 0 20px 130px;
opacity: 1;
width: 450px;
height: auto;
text-align: center;
text-align: center;
vertical-align: middle;
margin: 0 auto;
margin: 0 auto;
display: none;
}

Expand Down
10 changes: 5 additions & 5 deletions lib/ripple/platform/webworks.bb10/1.0.0/context-menu.js
Expand Up @@ -127,8 +127,8 @@ function safeEval(jsonString) {
}

function addItem(success, fail, args) {
var contexts = JSON.parse(decodeURIComponent(args["contexts"])),
action = JSON.parse(decodeURIComponent(args["action"])),
var contexts = JSON.parse(decodeURIComponent(args.contexts)),
action = JSON.parse(decodeURIComponent(args.action)),
context;

// Check actionId is valid or if item already has been added
Expand Down Expand Up @@ -165,8 +165,8 @@ function removeItemFromAllContexts(actionId) {
}

function removeItem(success, fail, args) {
var contexts = JSON.parse(decodeURIComponent(args["contexts"])),
actionId = safeEval(decodeURIComponent(args["actionId"])),
var contexts = JSON.parse(decodeURIComponent(args.contexts)),
actionId = safeEval(decodeURIComponent(args.actionId)),
context;

for (context in contexts) {
Expand Down Expand Up @@ -248,7 +248,7 @@ _self = {
contexts: JSON.stringify(contexts),
actionId: JSON.stringify(actionId)
});
},
}
};

Object.defineProperty(_self, 'enabled', {
Expand Down
1 change: 1 addition & 0 deletions lib/ripple/utils.js
Expand Up @@ -508,6 +508,7 @@ self = module.exports = {
}
};
},

defineReadOnlyField: function (obj, field, value) {
Object.defineProperty(obj, field, {"value": value, "writable": false});
}
Expand Down

0 comments on commit 0974925

Please sign in to comment.