X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;ds=sidebyside;f=js%2F90-themes.js;h=0b043b8e393adc21146c4a698286f441ea499f98;hb=43a857a965517d3fcdeae0300a01c1297f9d211c;hp=9bc36047b545d8d781111259ca4e25bff45be3e2;hpb=bd5ea970657ae9a16ed69748ce9e3feb361c658a;p=plack-app-gruntmaster.git diff --git a/js/90-themes.js b/js/90-themes.js index 9bc3604..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,15 +12,25 @@ }); } + var selector; + + function add_themelink(theme, text) { + var link = $('' + text + ''); + link.appendTo(selector.find('ul')).wrap('