Announcement

Collapse
No announcement yet.

Setting Apps as Favorites

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting Apps as Favorites

    I have a significant # of Apps which only exist on sub-menu Apps that I've created; ie: not directly accessible from the portal. I'd like to give the users the ability to tag certain ones as Favorites so they have access to them on their "Favorites" tab rather than going thru the menu system.

    Alternatively, I was going to create a "Build Your Own Menu" app so they can construct their own menus, but that seems a cheap imitation of the favorites concept.....

    Doable?

    Thx

    Dan

  • #2
    Hi Dan,

    In the next 6.1 update we will have new methods
    • Valence.util.App.addFavorite
    • Valence.util.App.removeFavorite
    They both accept the appId and a callback function however the callback function isn't mandatory

    Code:
    // Add Favorite
    //
    var appId = 1196;
    Valence.util.App.addFavorite(appId, function(info) {
        if (!info.success) {
            // error occurred
            //
            Valence.util.Helper.showDialog('Error', info.error);
        } else {
            Valence.util.Helper.showSnackbar({
                text : 'Successful'
            });
        }
    });
    Code:
    // Remove Favorite
    //
    var appId = 1196;
    Valence.util.App.removeFavorite(appId, function(info) {
        if (!info.success) {
            // error occurred
            //
            Valence.util.Helper.showDialog('Error', info.error);
        } else {
            Valence.util.Helper.showSnackbar({
                text : 'Successful'
            });
        }
    });

    Comment


    • #3
      awesome!!!!! Thanx

      Comment

      Working...
      X