Fix theme switching bug
authorJack Allnutt <jack@allnutt.eu>
Fri, 17 Jan 2014 15:25:08 +0000 (15:25 +0000)
committerJack Allnutt <jack@allnutt.eu>
Fri, 17 Jan 2014 15:25:08 +0000 (15:25 +0000)
client/src/views/application.js

index fce16cfabb4fc87a15881be82755aa08db1e2fc4..1825af78b53a8b2ffbcdda6494a856b3c8a63e97 100644 (file)
@@ -70,13 +70,13 @@ _kiwi.view.Application = Backbone.View.extend({
         theme_name = theme_name.toLowerCase();
 
         // Clear any current theme
-        $('link [data-theme]:not([disabled])').each(function (idx, link) {
+        $('[data-theme]:not([disabled])').each(function (idx, link) {
             var $link = $(link);
             $link.attr('rel', 'alternate ' + $link.attr('rel')).attr('disabled', true)[0].disabled = true;
         });
 
         // Apply the new theme
-        var link = $('link [data-theme][title=' + theme_name + ']');
+        var link = $('[data-theme][title=' + theme_name + ']');
         if (link.length > 0) {
             link.attr('rel', 'stylesheet').attr('disabled', false)[0].disabled = false;
         }