From b8489c7cb7fbabb1186197bd546a6800bb55d0bf Mon Sep 17 00:00:00 2001 From: Kawandeep Virdee Date: Sun, 10 Nov 2013 10:34:57 -0500 Subject: added thumbnail, fixed remove button colors --- assets/css/application.css | 4 +++- assets/js/models/sample.js | 15 ++++++++------- assets/js/views/sample.js | 1 + 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/assets/css/application.css b/assets/css/application.css index 9ebfdc2..1c6d241 100644 --- a/assets/css/application.css +++ b/assets/css/application.css @@ -179,11 +179,13 @@ header { .button.red:hover { background-color: red; + border-color:red; color: #fff; } .button.red:active { - background-color: #2ea732; + background-color: #9a1313; + border-color: #9a1313; color: #ddd; text-shadow: 0px 0px 2px rgba(0,0,0,0.9); } diff --git a/assets/js/models/sample.js b/assets/js/models/sample.js index 2c87344..228454b 100644 --- a/assets/js/models/sample.js +++ b/assets/js/models/sample.js @@ -7,7 +7,8 @@ ClipPlay.Models.Sample = Backbone.Model.extend({ 'key': '', 'player': '', 'iframe': '', - 'timeout' : '' + 'timeout' : '', + 'thumbnail' : '' }, initialize: function() { var a = ClipPlay.Config['key_defaults'].shift(); @@ -20,26 +21,26 @@ ClipPlay.Models.Sample = Backbone.Model.extend({ var minutes = Math.floor(seconds / 60); seconds = Math.floor(seconds); var seconds = seconds - minutes * 60; - + if (seconds < 10) { seconds = '0' + seconds; } - + return { minutes: minutes, seconds: seconds }; }, - + start_in_minutes_and_seconds: function() { return this.in_minutes_and_seconds(this.get('start')); }, - + stop_in_minutes_and_seconds: function() { return this.in_minutes_and_seconds(this.get('stop')); }, - - + + play: function() { console.log('playing'); //play then pause diff --git a/assets/js/views/sample.js b/assets/js/views/sample.js index 6805e97..c728e47 100644 --- a/assets/js/views/sample.js +++ b/assets/js/views/sample.js @@ -32,6 +32,7 @@ ClipPlay.Views.Sample = Marionette.ItemView.extend({ var player = new OP.Player(iframe[0]); that.model.set('player', player); that.model.set('iframe', iframe); + that.model.set('thumbnail', data.thumbnail_url); window.BOKASHAKA = that.model; player.getDuration(function(value) { -- cgit v1.2.3