--- a/client/js/list-bin.js Thu Mar 14 00:29:09 2013 +0100
+++ b/client/js/list-bin.js Thu Mar 14 11:29:33 2013 +0100
@@ -1,14 +1,16 @@
-Rkns.ListBin = Rkns.Utils.inherit(Rkns._BaseBin);
+Rkns.ResourceList = {};
+
+Rkns.ResourceList.Bin = Rkns.Utils.inherit(Rkns._BaseBin);
-Rkns.ListBin.prototype.resultTemplate = Rkns._.template(
- '<li class="Rk-Bin-Item Rk-ListBin-Item" draggable="true" data-uri="<%-url%>" '
+Rkns.ResourceList.Bin.prototype.resultTemplate = Rkns._.template(
+ '<li class="Rk-Bin-Item Rk-ResourceList-Item" draggable="true" data-uri="<%-url%>" '
+ 'data-title="<%-title%>" data-description="<%-description%>" data-image="<%-image%>">'
- + '<% if (image) { %><img class="Rk-ListBin-Image" src="<%-image%>"><% } %></div><h4 class="Rk-ListBin-Title">'
+ + '<% if (image) { %><img class="Rk-ResourceList-Image" src="<%-image%>"><% } %></div><h4 class="Rk-ResourceList-Title">'
+ '<% if (url) { %><a href="<%-url%>" target="_blank"><% } %><%=htitle%><% if (url) { %></a><% } %></h4>'
- + '<% if (description) { %><p class="Rk-ListBin-Description"><%=hdescription%></p><% } %><% if (image) { %><div style="clear: both;"></div><% } %></li>'
+ + '<% if (description) { %><p class="Rk-ResourceList-Description"><%=hdescription%></p><% } %><% if (image) { %><div style="clear: both;"></div><% } %></li>'
);
-Rkns.ListBin.prototype._init = function(_renkan, _opts) {
+Rkns.ResourceList.Bin.prototype._init = function(_renkan, _opts) {
this.renkan = _renkan;
this.title_$.html(_opts.title);
if (_opts.list) {
@@ -17,7 +19,7 @@
this.refresh();
}
-Rkns.ListBin.prototype.render = function(searchstr) {
+Rkns.ResourceList.Bin.prototype.render = function(searchstr) {
if (searchstr) {
var _rgxp = new RegExp('('+(searchstr).replace(/(\W)/g,'\\$1')+')','gi'),
rxtest = new RegExp(searchstr.replace(/(\W)/g,'\\$1'),'i');
@@ -85,7 +87,7 @@
this.renkan.resizeBins();
}
-Rkns.ListBin.prototype.refresh = function() {
+Rkns.ResourceList.Bin.prototype.refresh = function() {
if (this.data) {
this.render();
}