Skip to content

Commit

Permalink
[+] less management
Browse files Browse the repository at this point in the history
  • Loading branch information
gouz committed Oct 7, 2012
1 parent 6c2afe7 commit 62a0c22
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sofresh.js
Expand Up @@ -160,6 +160,8 @@ require_once dirname(__FILE__).'/php/sofresh.php';
elem = $sf('#sofresh_links label[for="sofresh_link_' + $sf(link.elem).data('sofresh-link') + '"]').parents('li');
elem.addClass('sofresh-highlight');
setTimeout(function(){ elem.removeClass('sofresh-highlight'); }, 1100);
if (link.elem.getAttribute('href').indexOf('.less?'))
if (less) less.refresh(true);
}
}
}
Expand Down Expand Up @@ -354,7 +356,7 @@ require_once dirname(__FILE__).'/php/sofresh.php';

for (var a = 0, l = files.length; a < l; a++) {
var elem = files[a], rel = elem.rel, filename = '', checked = '', li_class = '';
if (typeof rel != 'string' || rel.length == 0 || rel == 'stylesheet') {
if (typeof rel != 'string' || rel.length == 0 || rel == 'stylesheet' || rel == 'stylesheet/less') {
var href = this.getHref(elem);
if (href != null && this.isLocalHref(href)) {
this.links.push({
Expand Down

0 comments on commit 62a0c22

Please sign in to comment.