X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=js%2F90-themes.js;h=6afd44448943594cea0a80416b42ea0495e8d420;hb=f3f57928b0b8ff5e342f9417323a1592bc2ca945;hp=eb5987c76041a5d720bc9787302c3120122ccc42;hpb=5fdcdc9177877f4b54260e4429e9998b6d9598b5;p=plack-app-gruntmaster.git diff --git a/js/90-themes.js b/js/90-themes.js index eb5987c..6afd444 100644 --- a/js/90-themes.js +++ b/js/90-themes.js @@ -1,20 +1,30 @@ (function(){ 'use strict'; function set_style(name){ - $('#stylesheet').attr("href", "/css/" + name + ".css"); + $('link[rel~="stylesheet"]').prop('disabled', true); + $('link[title="' + name + '"]').prop('disabled', false); localStorage.setItem("theme", name); } + var selector; + + function add_themelink(theme, text) { + var link = $('' + text + ''); + link.appendTo(selector.find('ul')).wrap('