X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;ds=inline;f=js%2F90-themes.js;h=0b043b8e393adc21146c4a698286f441ea499f98;hb=7cbc093ea2bc5b60c8882ea2358af8cb200e58fc;hp=56138d36f94d7000c8cba5e6599d6e1f8c7e80d1;hpb=7d3edc4b152539c4b5b14e10bf406e281e94a81c;p=plack-app-gruntmaster.git diff --git a/js/90-themes.js b/js/90-themes.js index 56138d3..0b043b8 100644 --- a/js/90-themes.js +++ b/js/90-themes.js @@ -1,7 +1,8 @@ (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); $(document).ready(function() { if(name == 'slate' || name == 'cyborg') @@ -11,16 +12,25 @@ }); } + var selector; + + function add_themelink(theme, text) { + var link = $('' + text + ''); + link.appendTo(selector.find('ul')).wrap('