From 80713ad063bdaf24248aeaeb5b8e8287857fcc56 Mon Sep 17 00:00:00 2001 From: riccardo Date: Wed, 30 Mar 2011 19:27:49 +0200 Subject: [PATCH] fixed: 1) playlist remove in home page, 2) item public_id retrieval (by global js var, formerly by url address) 3) json mathod in markers (now they all call global function json), 4)restored red pointer in the player to fit the overall page color (now it's just a little lighter to contrast with the markers) 5)reduced padding in marker divs (still minor alignment problems though) 6) added icon add_to_playlist in the div marker (still to be bound to an event, which needs to change the implementation of loading the playlist from django) --- telemeta/htdocs/css/telemeta.css | 23 +++-- telemeta/htdocs/js/application.js | 4 +- telemeta/htdocs/js/playerUtils.js | 1 + telemeta/htdocs/timeside/skins/lab/style.css | 4 +- telemeta/htdocs/timeside/src/divmarker.js | 33 ++++--- telemeta/htdocs/timeside/src/markermap.js | 94 ++++--------------- telemeta/htdocs/timeside/src/timeside.js | 6 +- telemeta/templates/telemeta_default/home.html | 2 +- .../telemeta_default/mediaitem_detail.html | 4 +- 9 files changed, 68 insertions(+), 103 deletions(-) diff --git a/telemeta/htdocs/css/telemeta.css b/telemeta/htdocs/css/telemeta.css index fd7c0cfb..d0a779b4 100644 --- a/telemeta/htdocs/css/telemeta.css +++ b/telemeta/htdocs/css/telemeta.css @@ -924,7 +924,7 @@ a.image-link { font-style: italic; } .markersdivTopElement{ - /*vertical-align:middle;*/ + /* vertical-align:middle;*/ } .markersdivTitle{ font-weight:bold; @@ -955,13 +955,21 @@ a.image-link { .markersdivEdit span{ position:absolute;top:-0.75ex;left:3ex; } -.markersdivDelete{ +.markersdivDelete, .markersdivAddPlaylist{ border:0px; float:right; background-image: url('/images/del_marker.png'); background-repeat: no-repeat; background-position: top center; - padding:1ex 1ex 1ex 1ex;/*top right bottom left. The padding is only to show the element */ + /*padding:1ex 1ex 1ex 1ex; top right bottom left. The padding is only to show the element */ + width: 15px; + height:15px; +} +.markersdivDelete{ + background-image: url('/images/del_marker.png'); +} +.markersdivAddPlaylist{ + background-image: url('/images/add_playlist_marker.png'); } .markersdivDescription{ margin:0ex 0px 0ex 0px; /*top right bottom left*/ @@ -974,10 +982,13 @@ a.image-link { background-color: #087714; color: #fff; font-weight: bold; - padding: 0.3em 0.8em 0.3em 0.8em; - padding:5px 10px 5px 26px; + /*padding: 0.3em 0.8em 0.3em 0.8em; + padding:5px 10px 5px 26px;*/ + display:block; + width: 4ex; + padding: 1ex .5ex 1ex 3.5ex; background-repeat: no-repeat; - background-position: 1ex .5ex; + background-position: 1ex 1ex; -moz-border-radius: 1ex 1ex 1ex 1ex; -webkit-border-radius: 1ex 1ex 1ex 1ex; border-radius: 1ex 1ex 1ex 1ex; diff --git a/telemeta/htdocs/js/application.js b/telemeta/htdocs/js/application.js index 12442a4d..b2f62ed2 100644 --- a/telemeta/htdocs/js/application.js +++ b/telemeta/htdocs/js/application.js @@ -108,14 +108,14 @@ $(document).ready(function() { // //method: the json method, eg "telemeta.update_marker". See base.py // -//onSuccesFcn(data, textStatus, jqXHR) OPTIONAL +//onSuccesFcn(data, textStatus, jqXHR) OPTIONAL --IF MISSING, NOTHING HAPPENS -- // A function to be called if the request succeeds. // The function gets passed three arguments: // The data returned from the server, formatted according to the dataType parameter; // a string describing the status; // and the jqXHR (in jQuery 1.4.x, XMLHttpRequest) object // -//onErrorFcn(jqXHR, textStatus, errorThrown) OPTIONAL. --If missing, default dialog error is shown-- +//onErrorFcn(jqXHR, textStatus, errorThrown) OPTIONAL. --IF MISSING, THE DEFAULT ERROR DIALOG IS SHOWN-- // A function to be called if the request fails. // The function receives three arguments: // The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, diff --git a/telemeta/htdocs/js/playerUtils.js b/telemeta/htdocs/js/playerUtils.js index a6f30038..ce50fc01 100644 --- a/telemeta/htdocs/js/playerUtils.js +++ b/telemeta/htdocs/js/playerUtils.js @@ -99,6 +99,7 @@ function load_player(duration) { soundManager.onready(function() { // SM2 is ready to go! //alert('okkkk'); + map.debug('loaded sound manager'); soundEngineReady = true; load_sound(); // soundManager.createSound(), etc. }); diff --git a/telemeta/htdocs/timeside/skins/lab/style.css b/telemeta/htdocs/timeside/skins/lab/style.css index 03365001..8afcb591 100755 --- a/telemeta/htdocs/timeside/skins/lab/style.css +++ b/telemeta/htdocs/timeside/skins/lab/style.css @@ -25,11 +25,11 @@ background: #e7e7e7; } .ts-pointer{ - border: 1px solid #B0C4DE !important; + border: 1px solid #a10006 !important; -moz-border-radius: .5ex !important; -webkit-border-radius: .5ex !important; border-radius: .5ex !important; - color: #006666 !important; + color: #6A0307 !important; } .ts-skin-lab .ts-player .ts-ruler .ts-section .ts-label { diff --git a/telemeta/htdocs/timeside/src/divmarker.js b/telemeta/htdocs/timeside/src/divmarker.js index 23ef2c26..64e2b053 100644 --- a/telemeta/htdocs/timeside/src/divmarker.js +++ b/telemeta/htdocs/timeside/src/divmarker.js @@ -19,6 +19,7 @@ TimeSide(function($N, $J) { e_header:null, e_editButton:null, e_titleText:null, + e_addplaylistButton:null, me:null, markerMap:null, @@ -51,22 +52,28 @@ TimeSide(function($N, $J) { //offset label this.e_offsetLabel = $J('') .addClass('markersdivTopElement') - .addClass('markersdivOffset') + .addClass('markersdivOffset'); //title text this.e_titleText = $J('') .attr('type','text') .addClass('markersdivTitle') + .addClass('markersdivTopElement'); + + //add playlist button + this.e_addplaylistButton = $J('') + .addClass('markersdivAddPlaylist') .addClass('markersdivTopElement') + .attr('title','add to playlist') + .attr("href","#"); - //close button this.e_deleteButton = $J('') .addClass('markersdivDelete') .addClass('markersdivTopElement') .attr('title','delete marker') - .attr("href","#") + .attr("href","#"); //edit button this.e_editButton = $J('') @@ -75,16 +82,16 @@ TimeSide(function($N, $J) { .addClass('markersdivTopElement') .attr('title','edit marker description') .attr("href","#") - .html('EDIT') + .html('EDIT'); - //add all elements to header: - this.e_header = $J('
').css('margin','1ex 0ex 0.5ex 0ex') + this.e_header = $J('
') //.css('margin','0.1ex 0ex 0.5ex 0ex') .append(this.e_indexLabel) .append(this.e_offsetLabel) .append(this.e_titleText) .append(this.e_deleteButton) - .append(this.e_editButton); + .append(this.e_editButton) + .append(this.e_addplaylistButton); //description text this.e_descriptionText = $J('