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

Better password save #329

Merged
merged 6 commits into from
Nov 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ matrix:
- language: node_js
node_js:
- "8"

cache:
directories:
- .npm

install:
- npm install -g npm@latest
- npm install --save-dev eslint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ qx.Class.define("qxapp.auth.core.BaseAuthPage", {
// outside a form, so lets accomodate him
this.addListenerOnce("appear", e => {
let el = this.getContentElement();
let form = this._form = new qx.html.Element("form", null, {
let form = this._formElement = new qx.html.Element("form", null, {
name: "fakeLoginform",
autocomplete: "on"
});
Expand Down Expand Up @@ -58,7 +58,7 @@ qx.Class.define("qxapp.auth.core.BaseAuthPage", {
* when all is said and done we should remove the form so that the password manager
* knows to save the content of the form. so we save it here.
*/
_form: null,
_formElement: null,
/**
* This method gets called upon construction and
* must be overriden in a subclass
Expand Down
8 changes: 4 additions & 4 deletions services/web/client/source/class/qxapp/auth/ui/LoginPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ qx.Class.define("qxapp.auth.ui.LoginPage", {
*/

members: {
__form: null,

// overrides base
__form: null,
_buildPage: function() {
this.__form = new qx.ui.form.Form();

Expand Down Expand Up @@ -137,9 +136,10 @@ qx.Class.define("qxapp.auth.ui.LoginPage", {

let successFun = function(log) {
this.fireDataEvent("done", log.message);
// we don't need the form any more, so remove it
// we don't need the form any more, so remove it and mock-navigate-away
// and thus tell the password manager to save the content
this._form.dispose();
this._formElement.dispose();
window.history.replaceState(null, window.document.title, window.location.pathname);
};

let failFun = function(msg) {
Expand Down