New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending event after mountConfig object is set #27740

Merged
merged 1 commit into from May 2, 2017

Conversation

Projects
None yet
4 participants
@davicente
Member

davicente commented Apr 25, 2017

Description

Sending an event when mountConfig object is set, in order to use it in js files without failing

Related Issue

https://github.com/owncloud/platform/issues/94

Motivation and Context

When .js is executed moungConfig object is not always set, so it has to wait until that. A way to do that it's waiting for an event sent by core when object has been set.

How Has This Been Tested?

The event has been received in a .js file in the settings part.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • [x ] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
@CLAassistant

This comment has been minimized.

Show comment
Hide comment
@CLAassistant

CLAassistant Apr 25, 2017

CLA assistant check
All committers have signed the CLA.

CLAassistant commented Apr 25, 2017

CLA assistant check
All committers have signed the CLA.

@PVince81 PVince81 added this to the 10.0.1 milestone Apr 26, 2017

Show outdated Hide outdated apps/files_external/js/settings.js
@@ -1377,6 +1377,7 @@ $(document).ready(function() {
// global instance
OCA.External.Settings.mountConfig = mountConfigListView;
$("#body-settings").trigger("mountConfigLoaded");

This comment has been minimized.

@PVince81

PVince81 Apr 26, 2017

Member

It is unlikely that the storages from loadStorages are already properly loaded at this stage because the ajax call might not have completed yet. This even needs to be sent after the ajax callback completed successfully and populated the DOM / update UI elements.

@PVince81

PVince81 Apr 26, 2017

Member

It is unlikely that the storages from loadStorages are already properly loaded at this stage because the ajax call might not have completed yet. This even needs to be sent after the ajax callback completed successfully and populated the DOM / update UI elements.

@DeepDiver1975

DeepDiver1975 requested changes May 2, 2017 edited

TODO:

  • rebase to master
  • squash commits
  • fix cla
@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81

PVince81 May 2, 2017

Member

👍 please merge if CI passes

Member

PVince81 commented May 2, 2017

👍 please merge if CI passes

@DeepDiver1975 DeepDiver1975 merged commit 798df9c into master May 2, 2017

4 checks passed

Scrutinizer No new issues
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details

@DeepDiver1975 DeepDiver1975 deleted the sending_event_when_mountConfig_set branch May 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment