Skip to content
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

@kossebau
Copy link
Contributor

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
Copy link

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 😁

This comment has been minimized.

@kossebau

kossebau May 20, 2015 Author Contributor

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.

This comment has been minimized.

@kossebau

kossebau May 20, 2015 Author Contributor

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 😉

This comment has been minimized.

@kossebau

kossebau May 20, 2015 Author Contributor

Filed as #894 :)

@peitschie
Copy link
Contributor

peitschie commented May 20, 2015

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

@kossebau
Copy link
Contributor Author

kossebau commented May 20, 2015

Thanks for review, @peitschie !

kossebau added a commit that referenced this pull request May 20, 2015
Disable custom buttons save/saveAs/close/download when there is no session
@kossebau kossebau merged commit 5d7858f into webodf:master May 20, 2015
1 check passed
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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.