diff -r f67047a16084 -r fba23fde14ba client/js/list-bin.js
--- a/client/js/list-bin.js Fri May 16 12:37:51 2014 +0200
+++ b/client/js/list-bin.js Fri May 16 14:09:57 2014 +0200
@@ -3,12 +3,12 @@
Rkns.ResourceList.Bin = Rkns.Utils.inherit(Rkns._BaseBin);
Rkns.ResourceList.Bin.prototype.resultTemplate = Rkns._.template(
- '
" data-description="<%-description%>" '
- + '<% if (image) { %>data-image="<%- Rkns.Utils.getFullURL(image) %>"<% } else { %>data-image=""<% } %> >'
- + '<% if (image) { %>
<% } %>'
- + '<% if (description) { %><%=hdescription%>
<% } %><% if (image) { %><% } %>'
+ '" data-description="<%-description%>" ' +
+ '<% if (image) { %>data-image="<%- Rkns.Utils.getFullURL(image) %>"<% } else { %>data-image=""<% } %> >' +
+ '<% if (image) { %>
<% } %>' +
+ '<% if (description) { %><%=hdescription%>
<% } %><% if (image) { %><% } %>'
);
Rkns.ResourceList.Bin.prototype._init = function(_renkan, _opts) {
@@ -30,12 +30,13 @@
_this = this,
count = 0;
Rkns._(this.data).each(function(_item) {
+ var _element;
if (typeof _item === "string") {
if (/^(https?:\/\/|www)/.test(_item)) {
- var _element = { url: _item };
+ _element = { url: _item };
} else {
- var _element = { title: _item.replace(/[:,]?\s?(https?:\/\/|www)[\d\w\/.&?=#%-_]+\s?/,'').trim() },
- _match = _item.match(/(https?:\/\/|www)[\d\w\/.&?=#%-_]+/);
+ _element = { title: _item.replace(/[:,]?\s?(https?:\/\/|www)[\d\w\/.&?=#%-_]+\s?/,'').trim() };
+ var _match = _item.match(/(https?:\/\/|www)[\d\w\/.&?=#%-_]+/);
if (_match) {
_element.url = _match[0];
}
@@ -45,7 +46,7 @@
}
}
} else {
- var _element = _item;
+ _element = _item;
}
var title = _element.title || (_element.url || "").replace(/^https?:\/\/(www\.)?/,'').replace(/^(.{40}).+$/,'$1…'),
url = _element.url || "",
@@ -81,9 +82,9 @@
}
this.renkan.resizeBins();
};
-
+
Rkns.ResourceList.Bin.prototype.refresh = function() {
if (this.data) {
this.render();
}
-};
\ No newline at end of file
+};