X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=js%2F90-themes.js;h=6afd44448943594cea0a80416b42ea0495e8d420;hb=bdaa8919598cbbd8753fd6795b34b594b1b30805;hp=5ec968a4552821ba55119ec759b007f5057d0826;hpb=2d5a49fc7d61e2a7353ece540c3f12f2f08a0ba0;p=plack-app-gruntmaster.git diff --git a/js/90-themes.js b/js/90-themes.js index 5ec968a..6afd444 100644 --- a/js/90-themes.js +++ b/js/90-themes.js @@ -1,19 +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('