1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 15:49:44 +02:00

upgraded Ember and integrated Bootstrap 4

Upgraded to Ember JS 2.16.x release. This upgrade uses the new JavaScript modules API syntax.

Integrated Bootstrap 4 Beta 2 via package.json and associated popper.js library. Overridden Bootstrap styles using bootstrap.scss -- this file selectively imports the modules we need.
This commit is contained in:
Harvey Kandola 2017-11-16 13:28:05 +00:00
parent 0f04be4ea1
commit b31ab712c1
229 changed files with 1610 additions and 3181 deletions

View file

@ -9,32 +9,31 @@
//
// https://documize.com
import Ember from 'ember';
import { empty, and } from '@ember/object/computed';
const {
computed,
isEmpty
} = Ember;
import { set } from '@ember/object';
import Component from '@ember/component';
import { isEmpty } from '@ember/utils';
export default Ember.Component.extend({
export default Component.extend({
email: "",
sayThanks: false,
emailEmpty: computed.empty('email'),
hasEmptyEmailError: computed.and('emailEmpty', 'emailIsEmpty'),
emailEmpty: empty('email'),
hasEmptyEmailError: and('emailEmpty', 'emailIsEmpty'),
actions: {
forgot() {
let email = this.get('email');
if (isEmpty(email)) {
Ember.set(this, 'emailIsEmpty', true);
set(this, 'emailIsEmpty', true);
return $("#email").focus();
}
this.get('forgot')(email).then(() => {
Ember.set(this, 'sayThanks', true);
Ember.set(this, 'email', '');
Ember.set(this, 'emailIsEmpty', false);
set(this, 'sayThanks', true);
set(this, 'email', '');
set(this, 'emailIsEmpty', false);
});
}
}