Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove theme dependency

  • Loading branch information...
commit 73cba0530b964172b6b4f528440f198c5fd7e57f 1 parent 32fa125
@jpmckinney jpmckinney authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 examples/reuters/widgets/TagcloudWidget.js
View
9 examples/reuters/widgets/TagcloudWidget.js
@@ -3,7 +3,7 @@
AjaxSolr.TagcloudWidget = AjaxSolr.AbstractFacetWidget.extend({
afterRequest: function () {
if (this.manager.response.facet_counts.facet_fields[this.field] === undefined) {
- $(this.target).html(AjaxSolr.theme('no_items_found'));
+ $(this.target).html('no items found in current selection');
return;
}
@@ -23,7 +23,12 @@ AjaxSolr.TagcloudWidget = AjaxSolr.AbstractFacetWidget.extend({
$(this.target).empty();
for (var i = 0, l = objectedItems.length; i < l; i++) {
var facet = objectedItems[i].facet;
- $(this.target).append(AjaxSolr.theme('tag', facet, parseInt(objectedItems[i].count / maxCount * 10), this.clickHandler(facet)));
+ $(this.target).append(
+ $('<a href="#" class="tagcloud_item"></a>')
+ .text(facet)
+ .addClass('tagcloud_size_' + parseInt(objectedItems[i].count / maxCount * 10))
+ .click(this.clickHandler(facet))
+ );
}
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.