Tweak search links.

master
Artem Sapegin 2013-12-24 00:34:20 +04:00
parent 528bfc2ade
commit 94293c802b
2 changed files with 17 additions and 5 deletions

View File

@ -423,13 +423,19 @@ Button.prototype = {
number = parseInt(number, 10);
if (!number && !this.options.showZeroes) return;
var searchUrl = this.options.searchUrl ? makeUrl(this.options.searchUrl, {url: this.options.pageUrl}) : null;
var counterElem = $((this.options.searchUrl ? '<a>' : '<span>'), {
var counterParams = {
'class': this.getElementClassNames('counter'),
'text': number,
'href': searchUrl
});
};
var counterElem;
if (this.options.searchUrl) {
counterParams.class += ' ' + classPrefix + 'counter_link';
counterParams.href = makeUrl(this.options.searchUrl, {url: this.options.pageUrl});
counterElem = $('<a>', counterParams);
}
else {
counterElem = $('<span>', counterParams);
}
this.widget.append(counterElem);
this.widget.trigger('counter.' + prefix, [this.service, number]);

View File

@ -53,6 +53,12 @@ light_gray = #999;
padding:0 .5em;
font-weight:normal;
color:#000;
&_link {
cursor:pointer;
}
&_link:hover {
text-decoration:underline;
}
}
&__close {