From 6cbddec42793c2694f2222202e20606c99b952e3 Mon Sep 17 00:00:00 2001 From: riccardo Date: Fri, 11 Feb 2011 18:47:31 +0100 Subject: [PATCH] dded styles --- telemeta/htdocs/images/cancel.png | Bin 0 -> 362 bytes telemeta/htdocs/timeside/src/markermap.js | 129 ++++++++++++++++++++-- telemeta/web/base.py | 10 +- 3 files changed, 124 insertions(+), 15 deletions(-) create mode 100644 telemeta/htdocs/images/cancel.png diff --git a/telemeta/htdocs/images/cancel.png b/telemeta/htdocs/images/cancel.png new file mode 100644 index 0000000000000000000000000000000000000000..5f6dcc87d7b0dab235b2f81f4639c13eeb953e28 GIT binary patch literal 362 zcmV-w0hRuVP)41sCu<^TcbQd%6WH^KYEFCb>M6lGmBoldIndex){ newIndex--; } @@ -131,14 +131,14 @@ TimeSide(function($N, $J) { //The .detach() method is the same as .remove(), except that .detach() keeps //all jQuery data associated with the removed elements. //This method is useful when removed elements are to be reinserted into the DOM at a later time. - marker.div.detach(); + marker.div['div'].detach(); if(newIndex==l-1){ - this.divContainer.append(marker.div); + this.divContainer.append(marker.div['div']); }else{ - $( this.divContainer.children()[newIndex] ).before(marker.div); + $( this.divContainer.children()[newIndex] ).before(marker.div['div']); } - $($( marker.div.children()[1] )).focus(); - + //$($( marker.div.children()[1] )).focus(); + marker.div['textarea'].focus(); var i1= Math.min(oldIndex,newIndex); var i2= Math.max(oldIndex,newIndex); //var mrks = this.markers; @@ -162,7 +162,8 @@ TimeSide(function($N, $J) { index: i }); //update label element - $($( this.markers[i].div.children()[0] ).children()[0]).html(i+1); + this.markers[i].div['labelIndex'].html(i+1) + // $($( this.markers[i].div.children()[0] ).children()[0]).html(i+1); } }, @@ -185,6 +186,115 @@ TimeSide(function($N, $J) { createDiv: function(marker,insertionIndex){ + var div = this.divContainer; + var m = this.markers; + var l = m.length; + var ret = {}; + if(div){ + //var textWithFocus; + //div.style.display = "block"; + //var doc = document; + + + var text, timeSpan, closeAnchor, ok, header; + + + //creating marker, see marker.js + //would be better not to copy this code but to + //reference it. + var label = $J('') + .css({ + color:'#fff', + backgroundColor:'#009', + width: '2em', + textAlign: 'center' + //,fontFamily: 'monospace' + }) + .html(insertionIndex+1); + ret['labelIndex']=label; + + timeSpan = $J('') + .css({ + marginLeft:'1ex' + }); + ret['labelOffset']=timeSpan; + + closeAnchor = $J('') + .attr("type","submit") + .attr("value","x") + .css({ + //fontFamily: 'monospace', + fontWeight:'bold', + border:'1px dotted #333333', + float:'right', + color:'white' + }); + ret['submitCancel']=closeAnchor; + + header = $J('
') + .append(label) + .append(timeSpan) + .append(closeAnchor); + + text = $J('