X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;ds=inline;f=js%2F90-themes.js;h=0b043b8e393adc21146c4a698286f441ea499f98;hb=21dc66dbe148a63d1e056e3b3c03933889392fc2;hp=b7d73221bc1a255a63c1f6570a0e1fd9ecc0d045;hpb=84899acc134472beb68d9ff03a4da0134b88e2e6;p=plack-app-gruntmaster.git diff --git a/js/90-themes.js b/js/90-themes.js index b7d7322..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", "https://static.mindcoding.ro/static/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,11 +12,19 @@ }); } + var selector; + + function add_themelink(theme, text) { + var link = $('' + text + ''); + link.appendTo(selector.find('ul')).wrap('