Permalink
Browse files

remove theme dependency

  • Loading branch information...
1 parent f871625 commit 5db7abe4e8787d9b8f846524c240b83cff95bd28 @jpmckinney jpmckinney committed Apr 13, 2013
Showing with 20 additions and 4 deletions.
  1. +10 −2 examples/reuters/widgets/CurrentSearchWidget.9.js
  2. +10 −2 examples/reuters/widgets/CurrentSearchWidget.js
@@ -38,10 +38,18 @@ AjaxSolr.CurrentSearchWidget = AjaxSolr.AbstractWidget.extend({
}
if (links.length) {
- AjaxSolr.theme('list_items', this.target, links);
+ var $target = $(this.target);
+ $target.empty();
+ for (var i = 0, l = links.length; i < l; i++) {
+ var $li = jQuery('<li></li>');
+ if (this.separator && i > 0) {
+ $li.append(this.separator);
+ }
+ $target.append($li.append(links[i]));
+ }
}
else {
- $(this.target).html('<div>Viewing all documents!</div>');
+ $(this.target).html('<li>Viewing all documents!</li>');
}
},
@@ -31,10 +31,18 @@ AjaxSolr.CurrentSearchWidget = AjaxSolr.AbstractWidget.extend({
}
if (links.length) {
- AjaxSolr.theme('list_items', this.target, links);
+ var $target = $(this.target);
+ $target.empty();
+ for (var i = 0, l = links.length; i < l; i++) {
+ var $li = jQuery('<li></li>');
+ if (this.separator && i > 0) {
+ $li.append(this.separator);
+ }
+ $target.append($li.append(links[i]));
+ }
}
else {
- $(this.target).html('<div>Viewing all documents!</div>');
+ $(this.target).html('<li>Viewing all documents!</li>');
}
},

0 comments on commit 5db7abe

Please sign in to comment.