author | Chloe Laisne <chloe.laisne@gmail.com> |
Fri, 22 Jul 2016 16:11:44 +0200 | |
changeset 247 | 7a5d729992b8 |
parent 242 | 523ca6e73353 |
child 251 | ac320de33ec7 |
permissions | -rw-r--r-- |
217
989b9c36b849
Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
1 |
import Ember from 'ember'; |
989b9c36b849
Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
2 |
|
989b9c36b849
Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
3 |
export default Ember.Component.extend({ |
989b9c36b849
Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
4 |
|
218
38e1a1446319
Player toolbar actions and display logic
Chloe Laisne <chloe.laisne@gmail.com>
parents:
217
diff
changeset
|
5 |
player: Ember.inject.service(), |
38e1a1446319
Player toolbar actions and display logic
Chloe Laisne <chloe.laisne@gmail.com>
parents:
217
diff
changeset
|
6 |
|
38e1a1446319
Player toolbar actions and display logic
Chloe Laisne <chloe.laisne@gmail.com>
parents:
217
diff
changeset
|
7 |
classNames: ['toolbar-component'], |
38e1a1446319
Player toolbar actions and display logic
Chloe Laisne <chloe.laisne@gmail.com>
parents:
217
diff
changeset
|
8 |
|
38e1a1446319
Player toolbar actions and display logic
Chloe Laisne <chloe.laisne@gmail.com>
parents:
217
diff
changeset
|
9 |
actions: { |
38e1a1446319
Player toolbar actions and display logic
Chloe Laisne <chloe.laisne@gmail.com>
parents:
217
diff
changeset
|
10 |
|
38e1a1446319
Player toolbar actions and display logic
Chloe Laisne <chloe.laisne@gmail.com>
parents:
217
diff
changeset
|
11 |
display: function(element) { |
242 | 12 |
if(element === 'video') { |
13 |
this.get('player').set('reduce', !this.get('player').get('reduce')); |
|
14 |
} else if(this.get('player').get('window') !== element) { |
|
218
38e1a1446319
Player toolbar actions and display logic
Chloe Laisne <chloe.laisne@gmail.com>
parents:
217
diff
changeset
|
15 |
this.get('player').set('window', element); |
38e1a1446319
Player toolbar actions and display logic
Chloe Laisne <chloe.laisne@gmail.com>
parents:
217
diff
changeset
|
16 |
} else { |
38e1a1446319
Player toolbar actions and display logic
Chloe Laisne <chloe.laisne@gmail.com>
parents:
217
diff
changeset
|
17 |
this.get('player').set('window', ''); |
38e1a1446319
Player toolbar actions and display logic
Chloe Laisne <chloe.laisne@gmail.com>
parents:
217
diff
changeset
|
18 |
} |
38e1a1446319
Player toolbar actions and display logic
Chloe Laisne <chloe.laisne@gmail.com>
parents:
217
diff
changeset
|
19 |
} |
38e1a1446319
Player toolbar actions and display logic
Chloe Laisne <chloe.laisne@gmail.com>
parents:
217
diff
changeset
|
20 |
|
38e1a1446319
Player toolbar actions and display logic
Chloe Laisne <chloe.laisne@gmail.com>
parents:
217
diff
changeset
|
21 |
} |
217
989b9c36b849
Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
22 |
|
989b9c36b849
Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff
changeset
|
23 |
}); |