www.webOShelp.net

Get the latest on:webOS Developers' RSS FeedwebOS Facebook page webOS Twitter Feed

SubMenu

 

Example usage:

// showFeed - triggered by tapping a feed in the feedList.
// Detects taps on the unReadCount icon; anywhere else,
// the scene for the list view is pushed. If the icon is tapped,
// put up a submenu for the feedlist options
//

FeedListAssistant.prototype.showFeed = function(event) {
  var target = event.originalEvent.target.className;
  if (target !== "unReadCount") {
    this.clearTimers();
    Mojo.Controller.stageController.pushScene("storyList", event.index);
  }
  else {
    this.popupIndex = event.index;
    this.controller.popupSubmenu({
      onChoose: this.popupHandler,
      placeNear: event.target,
      items: [
        {label: 'All Unread', command: 'feed-unread'},
        {label: 'All Read', command: 'feed-read'},
        {label: 'Edit Feed', command: 'feed-edit'}]
    });
  }
}; 
// popupHandler - choose function for feedPopup
//
FeedListAssistant.prototype.popupHandler = function(command) {
  var popupFeed=feedList[this.popupIndex];
  switch(command) {
    case 'feed-unread':
      for (var i=0; i

This is how this menu appears:

alt

 

webOS UI Widget List