# HG changeset patch # User veltr # Date 1364310859 -3600 # Node ID fac7354c55d23bf5160800c2598080cd65d35eb0 # Parent 70c5d6efd68d22258532fdad80e29aea91bb24ae IE9 Compatibility diff -r 70c5d6efd68d -r fac7354c55d2 client/css/renkan.css --- a/client/css/renkan.css Mon Mar 25 19:29:15 2013 +0100 +++ b/client/css/renkan.css Tue Mar 26 16:14:19 2013 +0100 @@ -61,8 +61,6 @@ .Rk-Render { position: absolute; top: 0; right: 0; bottom: 0; background: #ffffff; - background: -moz-linear-gradient(left, #f3f3f3 0, #ffffff 30%, #ffffff 70%, #f3f3f3 100%); - background: -webkit-linear-gradient(left, #f3f3f3 0, #ffffff 30%, #ffffff 70%, #f3f3f3 100%); } .Rk-Render-Full { @@ -80,6 +78,8 @@ background: #333333; background: -moz-linear-gradient(top, #505050 5px, #1e1e1e 30px); background: -webkit-linear-gradient(top, #505050 5px, #1e1e1e 30px); + background: -ms-linear-gradient(top, #505050 5px, #1e1e1e 30px); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#505050', endColorstr='#1e1e1e',GradientType=0 ); } .Rk-PadTitle { @@ -117,6 +117,7 @@ background: #666666; background: -moz-linear-gradient(top, #666666 20%, #333333 80%); background: -webkit-linear-gradient(top, #666666 20%, #333333 80%); + background: -ms-linear-gradient(top, #666666 20%, #333333 80%); content: ""; display: block; height: 35px; float: right; width: 1px; border-left: 1px solid #111111; margin: 0 3px; } @@ -202,8 +203,8 @@ /* Canvas */ .Rk-Canvas { - background: -moz-linear-gradient(top, rgba(180,180,180,.2) 0, rgba(255,255,255,.2) 30%, rgba(255,255,255,.2) 70%, rgba(180,180,180,.2) 100%); - background: -webkit-linear-gradient(top, rgba(180,180,180,.2) 0, rgba(255,255,255,.2) 30%, rgba(255,255,255,.2) 70%, rgba(180,180,180,.2) 100%); + background: -moz-radial-gradient( center, circle, #ffffff 40%, #e0e0e0 90%); + background: -webkit-radial-gradient( center, circle, #ffffff 40%, #e0e0e0 90%); position: absolute; left: 0; top: 35px; right: 0; bottom: 0; z-index: 1; } @@ -220,6 +221,8 @@ background: rgba(20,20,20,.7); background: -moz-linear-gradient(top, rgba(40,40,40,.7) 20%, rgba(0,0,0,.7) 80%); background: -webkit-linear-gradient(top, rgba(40,40,40,.7) 20%, rgba(0,0,0,.7) 80%); + background: -ms-linear-gradient(top, rgba(40,40,40,.7) 20%, rgba(0,0,0,.7) 80%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#202020', endColorstr='#000000',GradientType=0 ); } .Rk-CloseX { @@ -374,6 +377,8 @@ background: #333333; font-size: 14px; color: #F0F0F0; background: -moz-linear-gradient(top, #1e1e1e 5px, #606060 30px); background: -webkit-linear-gradient(top, #1e1e1e 5px, #606060 30px); + background: -ms-linear-gradient(top, #1e1e1e 5px, #606060 30px); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e1e1e', endColorstr='#606060',GradientType=0 ); } /* Bin Search Field */ @@ -449,6 +454,7 @@ background: #333333; background: -moz-linear-gradient(top, #505050 20%, #1e1e1e 80%); background: -webkit-linear-gradient(top, #505050 20%, #1e1e1e 80%); + background: -ms-linear-gradient(top, #505050 20%, #1e1e1e 80%); border-bottom: 1px solid #666666; font-weight: bold; font-size: 14px; padding: 5px; cursor: pointer; color: #f0f0f0; } @@ -464,8 +470,10 @@ .Rk-Bin-Title:hover { color: #ffffe0; + background: #505050; background: -moz-linear-gradient(top, rgb(20,20,20) 20%, rgb(60,60,60) 80%); background: -webkit-linear-gradient(top, rgb(20,20,20) 20%, rgb(60,60,60) 80%); + background: -ms-linear-gradient(top, rgb(20,20,20) 20%, rgb(60,60,60) 80%); } .Rk-Bin-Refresh { @@ -490,6 +498,7 @@ background: #ffffff; background: -moz-linear-gradient(top, #e0e0e0 0, #FFFFFF 2%, #FFFFFF 98%, #e0e0e0 100%); background: -webkit-linear-gradient(top, #e0e0e0 0, #FFFFFF 2%, #FFFFFF 98%, #e0e0e0 100%); + background: -ms-linear-gradient(top, #e0e0e0 0, #FFFFFF 2%, #FFFFFF 98%, #e0e0e0 100%); } .Rk-Bin-Item { @@ -499,12 +508,8 @@ .Rk-Bin-Item:hover { background: -moz-linear-gradient(top, rgba(0,0,0,.1) 20%, rgba(128,128,128,.1) 80%); background: -webkit-linear-gradient(top, rgba(0,0,0,.1) 20%, rgba(128,128,128,.1) 80%); -} - -.Rk-Bin-Item.dragging { - background: -moz-linear-gradient(top, rgba(128,0,0,.1) 20%, rgba(255,128,128,.1) 80%); - background: -webkit-linear-gradient(top, rgba(128,0,0,.1) 20%, rgba(255,128,128,.1) 80%); - color: #660000; + background: -ms-linear-gradient(top, rgba(0,0,0,.1) 20%, rgba(128,128,128,.1) 80%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d0d0d0', endColorstr='#f3f3f3',GradientType=0 ); } .Rk-Bin-Item.selected { diff -r 70c5d6efd68d -r fac7354c55d2 client/js/ldtjson-bin.js --- a/client/js/ldtjson-bin.js Mon Mar 25 19:29:15 2013 +0100 +++ b/client/js/ldtjson-bin.js Tue Mar 26 16:14:19 2013 +0100 @@ -23,7 +23,6 @@ ); Rkns.Ldt.ProjectBin.prototype._init = function(_renkan, _opts) { - console.log("Initializing Project Bin"); this.renkan = _renkan; this.proj_id = _opts.project_id; this.ldt_platform = _opts.ldt_platform || "http://ldt.iri.centrepompidou.fr/"; diff -r 70c5d6efd68d -r fac7354c55d2 client/js/main.js --- a/client/js/main.js Mon Mar 25 19:29:15 2013 +0100 +++ b/client/js/main.js Tue Mar 26 16:14:19 2013 +0100 @@ -220,12 +220,20 @@ } }).mouseout(function() { _this.renderer.unhighlightAll(); + }).on("mousemove", ".Rk-Bin-Item", function(e) { + try { + this.dragDrop(); + } + catch(err) {} }).on("dragstart", ".Rk-Bin-Item", function(e) { - var _t = Rkns.$(this); - e.originalEvent.dataTransfer.setData("text/x-iri-title",$(_t).attr("data-title")); - e.originalEvent.dataTransfer.setData("text/x-iri-description",$(_t).attr("data-description")); - e.originalEvent.dataTransfer.setData("text/x-iri-uri",$(_t).attr("data-uri")); - e.originalEvent.dataTransfer.setData("text/x-iri-image",$(_t).attr("data-image")); + var div = document.createElement('div'); + div.appendChild(this.cloneNode(true)); + try { + e.originalEvent.dataTransfer.setData("text/html",div.innerHTML); + } + catch(err) { + e.originalEvent.dataTransfer.setData("text",div.innerHTML); + } }); Rkns.$(window).resize(function() { _this.resizeBins(); diff -r 70c5d6efd68d -r fac7354c55d2 client/js/paper-renderer.js --- a/client/js/paper-renderer.js Mon Mar 25 19:29:15 2013 +0100 +++ b/client/js/paper-renderer.js Tue Mar 26 16:14:19 2013 +0100 @@ -1319,9 +1319,29 @@ return; } var res = {} - Rkns._(_event.originalEvent.dataTransfer.types).each(function(t) { - return res[t] = _event.originalEvent.dataTransfer.getData(t); - }); + if (_event.originalEvent.dataTransfer.types) { + Rkns._(_event.originalEvent.dataTransfer.types).each(function(t) { + return res[t] = _event.originalEvent.dataTransfer.getData(t); + }); + } else { + var text = _event.originalEvent.dataTransfer.getData("text"); + switch(text[0]) { + case "{": + case "[": + try { + var data = JSON.parse(text); + _(res).extend(data); + } + catch(e) { + res["text/plain"] = text; + } + break; + case "<": + res["text/html"] = text; + break; + } + res["text/uri-list"] = _event.originalEvent.dataTransfer.getData("URL"); + } var newNode = {}; switch(res["text/x-iri-specific-site"]) { case "twitter": @@ -1365,7 +1385,14 @@ if (res["text/x-iri-source-title"] && !newNode.title) { newNode.title = res["text/x-iri-source-title"]; } + if (res["text/html"] || res["text/x-iri-selected-html"]) { + newNode.image = snippet.find("[data-image]").attr("data-image") || newNode.image; + newNode.uri = snippet.find("[data-uri]").attr("data-uri") || newNode.uri; + newNode.title = snippet.find("[data-title]").attr("data-title") || newNode.title; + newNode.description = snippet.find("[data-description]").attr("data-description") || newNode.description; + } } +/* var fields = ["title", "description", "uri", "image"]; for (var i = 0; i < fields.length; i++) { var f = fields[i]; @@ -1373,6 +1400,7 @@ newNode[f] = res["text/x-iri-" + f]; } } +*/ if (newNode.title || newNode.description || newNode.uri) { var _off = _this.canvas_$.offset(), _point = new paper.Point([