# HG changeset patch # User ymh # Date 1480681622 -3600 # Node ID c3a5f4de29b0c6a3f8d61428a010c39fd9e889e8 # Parent a7a333c0b1eb8c5e1a481a5bf2fcb33ef52c0b23 remove transcript components definition... diff -r a7a333c0b1eb -r c3a5f4de29b0 cms/app-client/app/components/transcript-annotation-component.js --- a/cms/app-client/app/components/transcript-annotation-component.js Fri Dec 02 13:25:08 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Component.extend({ - - hasPlayer: Ember.computed.bool('player'), - hideSpeaker: Ember.computed.not('annotation.showSpeaker'), - - begin: Ember.computed.readOnly('annotation.begin'), - end: Ember.computed.readOnly('annotation.end'), - title: Ember.computed.readOnly('annotation.title'), - original: Ember.computed.readOnly('annotation.original'), - speaker: Ember.computed.readOnly('annotation.speaker'), - showSpeaker: Ember.computed.readOnly('annotation.showSpeaker'), - literal: Ember.computed.readOnly('annotation.literal'), - translation: Ember.computed.readOnly('annotation.translation'), - - didInsertElement: function() { - if(this.get('hasPlayer') && this.get('intervals')) { - this.get('intervals').add(this.get('begin'), this.get('end'), this.get('elementId'), this.$()); - } - }, - - -}); diff -r a7a333c0b1eb -r c3a5f4de29b0 cms/app-client/app/components/transcript-section-component.js --- a/cms/app-client/app/components/transcript-section-component.js Fri Dec 02 13:25:08 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Component.extend({ - turns: Ember.computed.readOnly("section.turns"), - title: Ember.computed.readOnly("section.title"), -}); diff -r a7a333c0b1eb -r c3a5f4de29b0 cms/app-client/app/components/transcript-turn-component.js --- a/cms/app-client/app/components/transcript-turn-component.js Fri Dec 02 13:25:08 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -import Ember from 'ember'; - -export default Ember.Component.extend({ - tagName: 'li', - - classNames: ['sentence'], - - begin: Ember.computed.readOnly('turn.begin'), - end: Ember.computed.readOnly('turn.end'), - title: Ember.computed.readOnly('turn.title'), - annotations: Ember.computed.readOnly('turn.annotations'), - - didInsertElement: function() { - if(this.get('intervals')) { - this.get('intervals').add(this.get('begin'), this.get('end'), this.get('elementId'), this.$()); - } - }, - -}); diff -r a7a333c0b1eb -r c3a5f4de29b0 cms/app-client/app/templates/components/transcript-annotation-component.hbs --- a/cms/app-client/app/templates/components/transcript-annotation-component.hbs Fri Dec 02 13:25:08 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -{{#if hasPlayer }} - Play - {{#if title}}{{title}}{{/if}} -{{/if}} -
- {{#if original}} -

- {{#if speaker}}{{speaker}} :{{/if}} - {{original}} -

- {{/if}} - {{#if literal}} -
- {{#each literal as |word|}} -
-

{{word.original}}

-

{{word.translation}}

-
- {{/each}} -
- {{/if}} - {{#if translation}} -

{{translation}}

- {{/if}} -
- diff -r a7a333c0b1eb -r c3a5f4de29b0 cms/app-client/app/templates/components/transcript-section-component.hbs --- a/cms/app-client/app/templates/components/transcript-section-component.hbs Fri Dec 02 13:25:08 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -

{{title}}

-
    - {{#each turns as |turn|}} - {{transcript-turn-component turn=turn player=player intervals=intervals play=(action play)}} - {{/each}} -
- diff -r a7a333c0b1eb -r c3a5f4de29b0 cms/app-client/app/templates/components/transcript-turn-component.hbs --- a/cms/app-client/app/templates/components/transcript-turn-component.hbs Fri Dec 02 13:25:08 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -Play -{{#if title}}{{title}}{{/if}} -{{#each annotations as |annotation|}} -{{transcript-annotation-component annotation=annotation}} -{{/each}} - diff -r a7a333c0b1eb -r c3a5f4de29b0 cms/app-client/tests/integration/components/transcript-annotation-component-test.js --- a/cms/app-client/tests/integration/components/transcript-annotation-component-test.js Fri Dec 02 13:25:08 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -import { moduleForComponent, test } from 'ember-qunit'; -import hbs from 'htmlbars-inline-precompile'; - -moduleForComponent('transcript-annotation-component', 'Integration | Component | transcript annotation component', { - integration: true -}); - -test('it renders', function(assert) { - // Set any properties with this.set('myProperty', 'value'); - // Handle any actions with this.on('myAction', function(val) { ... }); - - this.render(hbs`{{transcript-annotation-component}}`); - - assert.equal(this.$().text().trim(), ''); - - // Template block usage: - this.render(hbs` - {{#transcript-annotation-component}} - template block text - {{/transcript-annotation-component}} - `); - - assert.equal(this.$().text().trim(), 'template block text'); -}); diff -r a7a333c0b1eb -r c3a5f4de29b0 cms/app-client/tests/integration/components/transcript-section-component-test.js --- a/cms/app-client/tests/integration/components/transcript-section-component-test.js Fri Dec 02 13:25:08 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -import { moduleForComponent, test } from 'ember-qunit'; -import hbs from 'htmlbars-inline-precompile'; - -moduleForComponent('transcript-section-component', 'Integration | Component | transcript section component', { - integration: true -}); - -test('it renders', function(assert) { - // Set any properties with this.set('myProperty', 'value'); - // Handle any actions with this.on('myAction', function(val) { ... }); - - this.render(hbs`{{transcript-section-component}}`); - - assert.equal(this.$().text().trim(), ''); - - // Template block usage: - this.render(hbs` - {{#transcript-section-component}} - template block text - {{/transcript-section-component}} - `); - - assert.equal(this.$().text().trim(), 'template block text'); -}); diff -r a7a333c0b1eb -r c3a5f4de29b0 cms/app-client/tests/integration/components/transcript-turn-component-test.js --- a/cms/app-client/tests/integration/components/transcript-turn-component-test.js Fri Dec 02 13:25:08 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -import { moduleForComponent, test } from 'ember-qunit'; -import hbs from 'htmlbars-inline-precompile'; - -moduleForComponent('transcript-turn-component', 'Integration | Component | transcript turn component', { - integration: true -}); - -test('it renders', function(assert) { - // Set any properties with this.set('myProperty', 'value'); - // Handle any actions with this.on('myAction', function(val) { ... }); - - this.render(hbs`{{transcript-turn-component}}`); - - assert.equal(this.$().text().trim(), ''); - - // Template block usage: - this.render(hbs` - {{#transcript-turn-component}} - template block text - {{/transcript-turn-component}} - `); - - assert.equal(this.$().text().trim(), 'template block text'); -});