Add Intel copyright header.
[profile/ivi/cowhide.git] / examples / calf / javascripts / app / views / haspicture.js
1 /*
2  * Copyright (c) 2012, Intel Corporation.
3  *
4  * This program is licensed under the terms and conditions of the
5  * Apache License, version 2.0.  The full text of the Apache License is at
6  * http://www.apache.org/licenses/LICENSE-2.0
7  *
8  */
9
10 (function(app, Ember) {
11     'use strict';
12
13     var HasPictureMixin = Ember.Mixin.extend({
14         mouseEnter: function(e) {
15             var npc = app.get('router').get('nowPlayingController');
16             var picture = this.get('content').get('picture');
17
18             if (picture)
19                 npc.setPicture(picture);
20         },
21
22         mouseLeave: function(e) {
23             var npc = app.get('router').get('nowPlayingController');
24             npc.unsetPicture();
25         }
26     });
27
28     app.HasPictureMixin = HasPictureMixin;
29 })(window.Calf, window.Ember);