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

Disable custom buttons save/saveAs/close/download when there is no session #893

Merged
merged 1 commit into from May 20, 2015

Conversation

Projects
None yet
3 participants
@kossebau
Member

kossebau commented May 20, 2015

Makes at least sense for all use cases I know currently.

Future versions of Wodo UI (as planned with closure lib) should give more control of those buttons to the developers, of course. But for now this is a small but useful fix with the current simple support for those custom buttons.

@kogmbh-ci

This comment has been minimized.

Show comment
Hide comment
@kogmbh-ci

kogmbh-ci May 20, 2015

Build succeeded.
Refer to this link for build results: http://ci.kogmbh.com/jenkins/job/WebODF-PullReq/2361/

kogmbh-ci commented May 20, 2015

Build succeeded.
Refer to this link for build results: http://ci.kogmbh.com/jenkins/job/WebODF-PullReq/2361/

formatMenuButton.setAttribute('disabled', !editorSession);
}
[saveButton, saveAsButton, downloadButton, closeButton, formatMenuButton].forEach(function (button) {

This comment has been minimized.

@peitschie

peitschie May 20, 2015

Contributor

The open button should perhaps be fixed as well? Currently, if I supply a link to a non-existent document, then click open it throws an assertion 😁

@peitschie

peitschie May 20, 2015

Contributor

The open button should perhaps be fixed as well? Currently, if I supply a link to a non-existent document, then click open it throws an assertion 😁

This comment has been minimized.

@kossebau

kossebau May 20, 2015

Member

There is at least one usecase where the editor is started without any session, and the open button (+ passed callback) is used to select a file that should be loaded into the editor. So it needs to be active also without a session.
So you possible found a bug in the callback handler passed for the Open button. Which code is that? localeditor.html?

@kossebau

kossebau May 20, 2015

Member

There is at least one usecase where the editor is started without any session, and the open button (+ passed callback) is used to select a file that should be loaded into the editor. So it needs to be active also without a session.
So you possible found a bug in the callback handler passed for the Open button. Which code is that? localeditor.html?

This comment has been minimized.

@peitschie

peitschie May 20, 2015

Contributor

Yep. Local editor.

@peitschie

peitschie May 20, 2015

Contributor

Yep. Local editor.

This comment has been minimized.

@kossebau

kossebau May 20, 2015

Member

I see. But that is an independent error, no? No proper handling of failed loading of documents yet :/

@kossebau

kossebau May 20, 2015

Member

I see. But that is an independent error, no? No proper handling of failed loading of documents yet :/

This comment has been minimized.

@peitschie

peitschie May 20, 2015

Contributor

Good question I haven't bothered to investigate. Just noticed whilst poking this PR 😉

@peitschie

peitschie May 20, 2015

Contributor

Good question I haven't bothered to investigate. Just noticed whilst poking this PR 😉

This comment has been minimized.

@kossebau

kossebau May 20, 2015

Member

Filed as #894 :)

@kossebau

kossebau May 20, 2015

Member

Filed as #894 :)

@peitschie

This comment has been minimized.

Show comment
Hide comment
@peitschie

peitschie May 20, 2015

Contributor

Buttons appear to disable and enable fine for me. :shipit: !

Contributor

peitschie commented May 20, 2015

Buttons appear to disable and enable fine for me. :shipit: !

@kossebau

This comment has been minimized.

Show comment
Hide comment
@kossebau

kossebau May 20, 2015

Member

Thanks for review, @peitschie !

Member

kossebau commented May 20, 2015

Thanks for review, @peitschie !

kossebau added a commit that referenced this pull request May 20, 2015

Merge pull request #893 from kossebau/disableCustomButtonsWithoutSession
Disable custom buttons save/saveAs/close/download when there is no session

@kossebau kossebau merged commit 5d7858f into kogmbh:master May 20, 2015

1 check passed

default Merged build finished.
Details

@kossebau kossebau deleted the kossebau:disableCustomButtonsWithoutSession branch May 20, 2015

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