Homepage | Products | OX Knowledge Base | Support | Try Now | Contact | Company
OX Logo
Results 1 to 6 of 6
  1. #1
    Join Date
    May 2014
    Posts
    4

    Default Getting app to show in top bar on login

    Hello,

    I am writing an app for OX App Suite which I have managed to get to show in the top bar menu on login by adding it to the array allFavorites in io.ox/core/api/apps.js as such (Note the TODO comment as well):

    Code:
    // TODO: Make favorites dynamic
    var allFavorites = ['io.ox/portal', 'io.ox/mail', 'io.ox/contacts',
                        'io.ox/calendar', 'io.ox/tasks', 'io.ox/files', 'com.example/myapp'];
    I'm assuming this isn't the way this is supposed to be done in a finished product. Is there any better way as it stands to get my app into that menu as a placeholder launcher on login? Am I approaching this the wrong way?

  2. #2
    Join Date
    Feb 2007
    Posts
    253

    Default

    Your assumption is correct, editing core files is never the solution.

    Until that TODO is fixed, you can try the following:

    Code:
    new Stage('io.ox/core/stages', {
        id: 'com.example.yourapp', // something unique
        index: 800,
        run: function () {
            ox.ui.apps.add(
                new ox.ui.AppPlaceholder({
                    id: 'com.example/yourapp', // will be passed to ox.launch() on click
                    title: gt('Your App')
                })
            );
        }
    });

  3. #3
    Join Date
    May 2014
    Posts
    4

    Default

    That worked - thank you very much! I'll use it as a temporary solution, then.

  4. #4
    Join Date
    May 2014
    Posts
    4

    Default

    This stopped working the last time I did a Git pull. The dependency "io.ox/core/extPatterns/stage" seems to cause an error which bounces me back to the login page. The console reads "Could not load theme: default". I'm doing this in a plugin at the "core" namespace - I'm thinking this might be the problem, that maybe it's no longer possible to load this dependency at that point, but I'm not sure what would be a better point to add in the menu item.

    I seem to be able to add in my menu item by adding the AppPlaceHolder in an extension point (io.ox/core/topbar/favorites), but this also feels like a somewhat hacky way to do it. Any thoughts?

  5. #5
    Join Date
    Feb 2007
    Posts
    253

    Default

    Are you sure it's that dependency which causes the problem? The file hasn't changed for a while.
    "Could not load theme: default" sounds like some files are missing.
    Did you pull the master branch? Since the recent release of 7.6.0, you will have to migrate your plugin: http://oxpedia.org/wiki/index.php?ti...e_app_using_yo

  6. #6
    Join Date
    May 2014
    Posts
    4

    Default

    Sorry I haven't updated this. The issue was with the grunt config - as noted on this page: https://github.com/Open-Xchange-Fron...d-grunt-config

    I had misunderstood the role of the coreDir setting, which needs to point to the build directory of a distributed version of the UI, ie. one where base apps and themes are present.

    Thanks for your reply.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •