B2G/gecko/browser/components/places/content/places.js
/**
   * Handle clicks on the tree.
   * Single Left click, right click or modified click do not result in any
   * special action, since they're related to selection.
   * @param   aEvent
   *          The mouse event.
   */
Handle clicks on the tree.
Single Left click, right click or modified click do not result in any
special action, since they're related to selection.
@param   aEvent
The mouse event.
Handle clicks on the tree . Single Left click right click or modified click do not result in any special action since they ' re related to selection . @param aEvent The mouse event .
function PO_onTreeClick(aEvent) {
    if (aEvent.target.localName != "treechildren")
      return;
    var currentView = aEvent.currentTarget;
    var selectedNode = currentView.selectedNode;
    if (selectedNode) {
      var doubleClickOnFlatList = (aEvent.button == 0 && aEvent.detail == 2 &&
                                   aEvent.target.parentNode.flatList);
      var middleClick = (aEvent.button == 1 && aEvent.detail == 1);
      if (PlacesUtils.nodeIsURI(selectedNode) &&
          (doubleClickOnFlatList || middleClick)) {
        PlacesOrganizer.openSelectedNode(aEvent);
      }
      else if (middleClick &&
               PlacesUtils.nodeIsContainer(selectedNode)) {
        PlacesUIUtils.openContainerNodeInTabs(selectedNode, aEvent, currentView);
      }
    }
  }
function PO_onTreeClick ( aEvent ) { if ( aEvent . target . localName != "treechildren" ) return ; var currentView = aEvent . currentTarget ; var selectedNode = currentView . selectedNode ; if ( selectedNode ) { var doubleClickOnFlatList = ( aEvent . button == 0 && aEvent . detail == 2 && aEvent . target . parentNode . flatList ) ; var middleClick = ( aEvent . button == 1 && aEvent . detail == 1 ) ; if ( PlacesUtils . nodeIsURI ( selectedNode ) && ( doubleClickOnFlatList || middleClick ) ) { PlacesOrganizer . openSelectedNode ( aEvent ) ; } else if ( middleClick && PlacesUtils . nodeIsContainer ( selectedNode ) ) { PlacesUIUtils . openContainerNodeInTabs ( selectedNode , aEvent , currentView ) ; } } }
Handle clicks on the tree.
Handle clicks on the tree .
// Only handle clicks on tree children. // Open associated uri in the browser. // The command execution function will take care of seeing if the // selection is a folder or a different container type, and will // load its contents in tabs.