”2016-04-07”

This commit is contained in:
Martin Donnelly 2016-04-07 16:45:00 +01:00
parent e06e53e5bd
commit a58fa07f88
18 changed files with 68 additions and 89 deletions

View File

@ -39,8 +39,9 @@
"beforeOpeningCurlyBrace": true "beforeOpeningCurlyBrace": true
}, },
"requireTrailingComma": false, "requireTrailingComma": false,
"requireEarlyReturn": true, "requireEarlyReturn": false,
"validateIndentation": 2, "validateIndentation": 2,
"validateLineBreaks": "LF", "validateLineBreaks": "LF",
"validateQuoteMarks": "'" "validateQuoteMarks": "'",
} }

View File

@ -1,10 +1,14 @@
{ {
"predef": [ "predef": {
"server", "document": true,
"document", "window": true,
"window", "SprintStatusENV": true,
"-Promise" "Ember": true, // Added
], "$": true, // ADDED
"Modernizr": true, // ADDED
"-Promise": true, // ADDED
"server": true // ADDED
},
"browser": true, "browser": true,
"boss": true, "boss": true,
"curly": true, "curly": true,

View File

@ -1,12 +1,3 @@
/*
import Base from 'ember-simple-auth/authorizers/base';
export default Base.extend({
authorize(/!*data, block*!/) {
}
});
*/
import OAuth2Bearer from 'ember-simple-auth/authorizers/oauth2-bearer'; import OAuth2Bearer from 'ember-simple-auth/authorizers/oauth2-bearer';

View File

@ -1,5 +1,3 @@
'use strict';
import Ember from 'ember'; import Ember from 'ember';
const {service} = Ember.inject; const {service} = Ember.inject;
export default Ember.Controller.extend({ export default Ember.Controller.extend({
@ -10,6 +8,7 @@ export default Ember.Controller.extend({
editCompany: function() { editCompany: function() {
this.set('isEditing', true); this.set('isEditing', true);
}, saveCompany: function() { }, saveCompany: function() {
'use strict';
this.set('isEditing', false); this.set('isEditing', false);
var model = this.get('model'); var model = this.get('model');
@ -19,6 +18,7 @@ export default Ember.Controller.extend({
}); });
}, cancelEdit: function() { }, cancelEdit: function() {
'use strict';
var model = this.get('model'); var model = this.get('model');
model.rollbackAttributes(); model.rollbackAttributes();
this.set('isEditing', false); this.set('isEditing', false);

View File

@ -1,4 +1,3 @@
'use strict';
import Ember from 'ember'; import Ember from 'ember';
const { service } = Ember.inject; const { service } = Ember.inject;
export default Ember.Controller.extend({ export default Ember.Controller.extend({
@ -6,7 +5,7 @@ export default Ember.Controller.extend({
sessionAccount: service('session-account'), sessionAccount: service('session-account'),
actions: { actions: {
saveCompany: function() { saveCompany: function() {
'use strict';
var model = this.get('model'); var model = this.get('model');
var account = this.get('sessionAccount.account'); var account = this.get('sessionAccount.account');

View File

@ -1,4 +1,3 @@
'use strict';
import Ember from 'ember'; import Ember from 'ember';
const { service } = Ember.inject; const { service } = Ember.inject;
export default Ember.Controller.extend({ export default Ember.Controller.extend({
@ -9,7 +8,7 @@ export default Ember.Controller.extend({
editProfile: function() { editProfile: function() {
this.set('isEditing', true); this.set('isEditing', true);
}, saveProfile: function() { }, saveProfile: function() {
'use strict';
var model = this.get('model'); var model = this.get('model');
this.set('sessionAccount.account.forename', model.get('forename')); this.set('sessionAccount.account.forename', model.get('forename'));

View File

@ -1,9 +1,5 @@
import Ember from 'ember'; import Ember from 'ember';
/*export function eq(params/!*, hash*!/) {
return params;
}*/
const eq = (params) => params[0] === params[1]; const eq = (params) => params[0] === params[1];
export default Ember.Helper.helper(eq); export default Ember.Helper.helper(eq);

View File

@ -1,7 +1,5 @@
import DS from 'ember-data'; import DS from 'ember-data';
//const { attr } = DS;
export default DS.Model.extend({ export default DS.Model.extend({
uid: DS.attr('string'), uid: DS.attr('string'),
login: DS.attr('string'), login: DS.attr('string'),

View File

@ -1,5 +1,5 @@
import DS from 'ember-data'; import DS from 'ember-data';
export default DS.Model.extend({ export default DS.Model.extend({
}); });

View File

@ -1,6 +1,7 @@
'use strict'; 'use strict';
import DS from 'ember-data'; import DS from 'ember-data';
import Ember from 'ember';
export default DS.Model.extend({ export default DS.Model.extend({
page: DS.belongsTo('page'), page: DS.belongsTo('page'),

View File

@ -1,4 +1,5 @@
import DS from 'ember-data'; import DS from 'ember-data';
import Ember from 'ember';
export default DS.Model.extend({ export default DS.Model.extend({
cid: DS.attr('string'), cid: DS.attr('string'),

View File

@ -6,7 +6,7 @@ const Router = Ember.Router.extend({
}); });
Router.map(function() { Router.map(function() {
this.route('index', {path:'/'}); this.route('index', {path: '/'});
this.route('login'); this.route('login');
this.route('auth-error'); this.route('auth-error');
this.route('about'); this.route('about');

View File

@ -1,37 +1,38 @@
import DS from 'ember-data'; import DS from 'ember-data';
import Ember from 'ember';
export default DS.JSONAPISerializer.extend({ export default DS.JSONAPISerializer.extend({
serializeBelongsTo: function(record, json, relationship) { serializeBelongsTo: function(record, json, relationship) {
var key = relationship.key, var key = relationship.key;
belongsTo = Ember.get(record, key); var belongsTo = Ember.get(record, key);
key = this.keyForRelationship ? this.keyForRelationship(key, "belongsTo") : key; key = this.keyForRelationship ? this.keyForRelationship(key, 'belongsTo') : key;
if (relationship.options.embedded === 'always') { if (relationship.options.embedded === 'always') {
json[key] = belongsTo.serialize(); json[key] = belongsTo.serialize();
} } else {
else { return this._super(record, json, relationship);
return this._super(record, json, relationship);
}
},
serializeHasMany: function(record, json, relationship) {
var key = relationship.key,
hasMany = Ember.get(record, key),
relationshipType = DS.RelationshipChange.determineRelationshipType(record.constructor, relationship);
if (relationship.options.embedded === 'always') {
if (hasMany && relationshipType === 'manyToNone' || relationshipType === 'manyToMany' ||
relationshipType === 'manyToOne') {
json[key] = [];
hasMany.forEach(function(item, index){
json[key].push(item.serialize());
});
}
}
else {
return this._super(record, json, relationship);
}
} }
},
serializeHasMany: function(record, json, relationship) {
var key = relationship.key;
var hasMany = Ember.get(record, key);
var relationshipType = DS.RelationshipChange.determineRelationshipType(
record.constructor,
relationship);
if (relationship.options.embedded === 'always') {
if (hasMany && relationshipType === 'manyToNone' || relationshipType === 'manyToMany' ||
relationshipType === 'manyToOne') {
json[key] = [];
hasMany.forEach(function(item) {
json[key].push(item.serialize());
});
}
} else {
return this._super(record, json, relationship);
}
}
}); });

View File

@ -47,9 +47,9 @@ body {
width: 375px; width: 375px;
height: 667px; height: 667px;
border:1px solid grey; border:1px solid grey;
-webkit-box-shadow: 0px 4px 5px 0px rgba(0,0,0,0.43); -webkit-box-shadow: 0 4px 5px 0 rgba(0,0,0,0.43);
-moz-box-shadow: 0px 4px 5px 0px rgba(0,0,0,0.43); -moz-box-shadow: 0 4px 5px 0 rgba(0,0,0,0.43);
box-shadow: 0px 4px 5px 0px rgba(0,0,0,0.43); box-shadow: 0 4px 5px 0 rgba(0,0,0,0.43);
border-radius: 0.25rem; border-radius: 0.25rem;
} }

View File

@ -8,7 +8,7 @@ img.avatar {
} }
.only-bottom-margin { .only-bottom-margin {
margin-top: 0px; margin-top: 0;
} }
.activity-mini { .activity-mini {

View File

@ -117,9 +117,8 @@ h1.page-header {
padding: 0; padding: 0;
} }
.side-menu #search .panel-body .navbar-form { .side-menu #search .panel-body .navbar-form {
padding: 0; padding: 0 50px 0 0;
padding-right: 50px; width: 100%;
width: 100%;
margin: 0; margin: 0;
position: relative; position: relative;
border-top: 1px solid #e7e7e7; border-top: 1px solid #e7e7e7;
@ -162,7 +161,7 @@ h1.page-header {
position: relative; position: relative;
height: 0; height: 0;
min-height: 0; min-height: 0;
background-color:none !important; background-color: none !important;
border-color: none !important; border-color: none !important;
} }
.side-menu .brand-name-wrapper .navbar-brand { .side-menu .brand-name-wrapper .navbar-brand {

View File

@ -5,10 +5,11 @@
{{outlet}} {{outlet}}
<footer class="pull-left footer"> <footer class="pull-left footer">
<p class="col-md-12"> <hr class="divider">
<hr class="divider"> <p class="col-md-12">
Copyright &COPY; 2016 <a Copyright &COPY; 2016 <a
href="http://www.obrand.info">Obrand Communications</a> </p> href="http://www.obrand.info">Obrand Communications</a>
</p>
</footer> </footer>
</div> </div>

View File

@ -1,3 +1,6 @@
<div class="container">
<div class="col-sm-4 col-sm-offset-4">
<form class="form-signin" {{action 'authenticate' on='submit'}}> <form class="form-signin" {{action 'authenticate' on='submit'}}>
<div> <div>
<h2 class="form-signin-heading">Please login</h2> <h2 class="form-signin-heading">Please login</h2>
@ -21,20 +24,5 @@
{{/if}} {{/if}}
</form> </form>
<!-- </div>
</div>
<h2 class="form-signin-heading">Please login</h2>
<label for="inputEmail" class="sr-only">Email address</label>
<input type="email" id="inputEmail" class="form-control" placeholder="Email address" required autofocus>
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" id="inputPassword" class="form-control" placeholder="Password" required>
<div class="checkbox">
<label>
<input type="checkbox" value="remember-me"> Remember me
</label>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit"></button>
-->