B2G/gaia/apps/browser/js/browser.js
// responsible to show the specific action menu
responsible to show the specific action menu
responsible to show the specific action menu
function browser_showActionMenu(url, from) {
      if (!url)
        return;
      this.bookmarkMenu.classList.remove('hidden');
      Places.getBookmark(url, (function(bookmark) {
        if (bookmark) {
          if (from && from === 'bookmarksTab') { 
            this.bookmarkMenuAdd.parentNode.classList.add('hidden');
            this.bookmarkMenuRemove.dataset.url = url;
            this.bookmarkMenuRemove.parentNode.classList.remove('hidden');
            this.bookmarkMenuEdit.parentNode.classList.add('hidden');
            this.bookmarkMenuAddHome.parentNode.classList.add('hidden');
          } else { 
            this.bookmarkMenuAdd.parentNode.classList.add('hidden');
            this.bookmarkMenuRemove.dataset.url = url;
            this.bookmarkMenuRemove.parentNode.classList.remove('hidden');
            this.bookmarkMenuEdit.dataset.url = url;
            this.bookmarkMenuEdit.parentNode.classList.remove('hidden');
            this.bookmarkMenuAddHome.parentNode.classList.remove('hidden');
          }
        } else { 
          this.bookmarkMenuAdd.parentNode.classList.remove('hidden');
          this.bookmarkMenuRemove.parentNode.classList.add('hidden');
          this.bookmarkMenuEdit.parentNode.classList.add('hidden');
          this.bookmarkMenuAddHome.parentNode.classList.remove('hidden');
        }
      }).bind(this));
  }
function browser_showActionMenu ( url , from ) { if ( ! url ) return ; this . bookmarkMenu . classList . remove ( 'hidden' ) ; Places . getBookmark ( url , ( function ( bookmark ) { if ( bookmark ) { if ( from && from === 'bookmarksTab' ) { this . bookmarkMenuAdd . parentNode . classList . add ( 'hidden' ) ; this . bookmarkMenuRemove . dataset . url = url ; this . bookmarkMenuRemove . parentNode . classList . remove ( 'hidden' ) ; this . bookmarkMenuEdit . parentNode . classList . add ( 'hidden' ) ; this . bookmarkMenuAddHome . parentNode . classList . add ( 'hidden' ) ; } else { this . bookmarkMenuAdd . parentNode . classList . add ( 'hidden' ) ; this . bookmarkMenuRemove . dataset . url = url ; this . bookmarkMenuRemove . parentNode . classList . remove ( 'hidden' ) ; this . bookmarkMenuEdit . dataset . url = url ; this . bookmarkMenuEdit . parentNode . classList . remove ( 'hidden' ) ; this . bookmarkMenuAddHome . parentNode . classList . remove ( 'hidden' ) ; } } else { this . bookmarkMenuAdd . parentNode . classList . remove ( 'hidden' ) ; this . bookmarkMenuRemove . parentNode . classList . add ( 'hidden' ) ; this . bookmarkMenuEdit . parentNode . classList . add ( 'hidden' ) ; this . bookmarkMenuAddHome . parentNode . classList . remove ( 'hidden' ) ; } } ) . bind ( this ) ) ; }
responsible to show the specific action menu
responsible to show the specific action menu
//show actions in bookmark tab //append url to button's dataset //XXX not implement yet: edit bookmark in bookmarktab #838041 //XXX not implement yet: link to home in bookmarktab #850999 //show actions in browser page //XXX not implement yet: link to home in bookmarktab #850999 //show actions in browser page //XXX not implement yet: link to home in bookmarktab #850999