”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
},
"requireTrailingComma": false,
"requireEarlyReturn": true,
"requireEarlyReturn": false,
"validateIndentation": 2,
"validateLineBreaks": "LF",
"validateQuoteMarks": "'"
"validateQuoteMarks": "'",
}

View File

@ -1,10 +1,14 @@
{
"predef": [
"server",
"document",
"window",
"-Promise"
],
"predef": {
"document": true,
"window": true,
"SprintStatusENV": true,
"Ember": true, // Added
"$": true, // ADDED
"Modernizr": true, // ADDED
"-Promise": true, // ADDED
"server": true // ADDED
},
"browser": true,
"boss": 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';

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,35 +1,36 @@
import DS from 'ember-data';
import Ember from 'ember';
export default DS.JSONAPISerializer.extend({
serializeBelongsTo: function(record, json, relationship) {
var key = relationship.key,
belongsTo = Ember.get(record, key);
key = this.keyForRelationship ? this.keyForRelationship(key, "belongsTo") : key;
var key = relationship.key;
var belongsTo = Ember.get(record, key);
key = this.keyForRelationship ? this.keyForRelationship(key, 'belongsTo') : key;
if (relationship.options.embedded === 'always') {
json[key] = belongsTo.serialize();
}
else {
} else {
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);
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, index){
hasMany.forEach(function(item) {
json[key].push(item.serialize());
});
}
}
else {
} else {
return this._super(record, json, relationship);
}
}

View File

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

View File

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

View File

@ -117,8 +117,7 @@ h1.page-header {
padding: 0;
}
.side-menu #search .panel-body .navbar-form {
padding: 0;
padding-right: 50px;
padding: 0 50px 0 0;
width: 100%;
margin: 0;
position: relative;

View File

@ -5,10 +5,11 @@
{{outlet}}
<footer class="pull-left footer">
<p class="col-md-12">
<hr class="divider">
<p class="col-md-12">
Copyright &COPY; 2016 <a
href="http://www.obrand.info">Obrand Communications</a> </p>
href="http://www.obrand.info">Obrand Communications</a>
</p>
</footer>
</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'}}>
<div>
<h2 class="form-signin-heading">Please login</h2>
@ -21,20 +24,5 @@
{{/if}}
</form>
<!--
<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>
-->
</div>