Skip to content

Commit

Permalink
Merge branch 'master' into chores/inline-ember-cli-lazyloader
Browse files Browse the repository at this point in the history
  • Loading branch information
Bestra committed Oct 12, 2016
2 parents 51a96cc + 3b3264e commit caa3ed2
Show file tree
Hide file tree
Showing 41 changed files with 820 additions and 354 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,32 @@ guidelines from here: https://github.com/olivierlacan/keep-a-changelog
### Deprecated
### Removed
### Fixed
- Reporting Guidelines: PRISMA uploads for systematic review and meta-analyses work again
- Uploaded files by dropping them into the browser now longer triggers all visible file uploaders
- PLOS Biology name is no longer hard coded in letter templates
- Fixed issue where roles couldn't be assigned in the admin page in some journals
### Security

## [1.27.0] - {2016-10-6}
### Added
### Changed
### Deprecated
### Removed
### Fixed
- Feedback with attachments will now send successfully
## Security

## [1.26.0] - {2016-09-22}
### Added
- Users can cancel figure and adhoc uploads
- Uploads that fail processing will show an error
### Changed
### Deprecated
### Removed
### Fixed
- At-mentions in discussions are no longer shown as escaped html notification emails
- Users can once again add group authors
- Users can cancel manuscript withdraw again
### Security

## [1.25.1] - {2016-09-16}
Expand Down
2 changes: 1 addition & 1 deletion app/serializers/journal_serializer.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class JournalSerializer < ActiveModel::Serializer
attributes :id, :name, :logo_url, :paper_types, :manuscript_css
attributes :id, :name, :logo_url, :paper_types, :manuscript_css, :staff_email
end
14 changes: 14 additions & 0 deletions client/app/helpers/find-question.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Ember from 'ember';

export function findQuestion(params, hash) {
let [owner, ident] = params;

let question = owner.get('nestedQuestions').findBy('ident', ident);
if (hash.answer) {
return question.answerForOwner(owner);
} else {
return question;
}
}

export default Ember.Helper.helper(findQuestion);
1 change: 1 addition & 0 deletions client/app/models/journal.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ export default DS.Model.extend({
logoUrl: DS.attr('string'),
manuscriptCss: DS.attr('string'),
name: DS.attr('string'),
staffEmail: DS.attr('string'),
paperTypes: DS.attr()
});
2 changes: 2 additions & 0 deletions client/app/models/object-proxy-with-validation-errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ const ObjectProxy = Object.extend(ValidationErrorsMixin, {
validations: null,
questionValidations: null,

isNew: Ember.computed.reads('object.isNew'),

init() {
this._super(...arguments);

Expand Down
26 changes: 12 additions & 14 deletions client/app/pods/components/binary-radio-button/template.hbs
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
<label>
{{radio-button-action selection=selection
name=name
id=idYes
value=yesValue
checked=yesChecked
action="selectYes"
disabled=disabled}}
{{radio-button selection=selection
name=name
id=idYes
value=yesValue
action=(action "selectYes")
disabled=disabled}}
{{yesLabel}}
</label>

<label>
{{radio-button-action selection=selection
name=name
id=idNo
value=noValue
checked=noChecked
action="selectNo"
disabled=disabled}}
{{radio-button selection=selection
name=name
id=idNo
value=noValue
action=(action "selectNo")
disabled=disabled}}
{{noLabel}}
</label>
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ export default NestedQuestionComponent.extend({

store: Ember.inject.service(),

attachments: Ember.computed('model.answer.attachment', function() {
return this.get('model.answer.attachments');
}),
attachments: Ember.computed.alias('model.answer.attachments'),

// Do not propagate to parent component as this component is in charge
// of saving itself (otherwise the parent component may issue another
Expand Down
34 changes: 0 additions & 34 deletions client/app/pods/components/nested-question-uploader/component.js

This file was deleted.

31 changes: 0 additions & 31 deletions client/app/pods/components/nested-question-uploader/template.hbs

This file was deleted.

24 changes: 0 additions & 24 deletions client/app/pods/components/radio-button-action/component.js

This file was deleted.

18 changes: 13 additions & 5 deletions client/app/pods/components/radio-button/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,25 @@ export default Ember.Component.extend({
attributeBindings: ['name', 'type', 'value', 'checked:checked', 'disabled'],

value: null,
selection: null,

_propertiesCheck: Ember.on('init', function() {
Ember.assert('You must pass a value property to the RadioButtonComponent', this.get('value'));
Ember.assert('You must pass a selection property to the RadioButtonComponent', this.attrs.hasOwnProperty('selection'));
}),
init() {
this._super(...arguments);
Ember.assert(
'You must pass a value property to the RadioButtonComponent',
this.get('value') !== null && this.get('value') !== undefined
);
Ember.assert(
'You must pass a selection property to the RadioButtonComponent',
this.attrs.hasOwnProperty('selection')
);
},

checked: Ember.computed('selection', 'value', function() {
return Ember.isEqual(this.get('selection'), this.get('value'));
}),

change() {
this.attrs.action(this.get('value'));
this.get('action')(this.get('value'));
}
});

0 comments on commit caa3ed2

Please sign in to comment.