Split 90-custom into 90-autoresize and 90-themes
authorMarius Gavrilescu <marius@ieval.ro>
Wed, 10 Dec 2014 12:04:59 +0000 (14:04 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Wed, 10 Dec 2014 12:04:59 +0000 (14:04 +0200)
MANIFEST
js/90-autoresize.js [new file with mode: 0644]
js/90-custom.js [deleted file]
js/90-themes.js [new file with mode: 0644]

index 93228f41868b985cc30e193ca0c5b877abb7c6bf..b702b0741defcee96f5cc23c17c65111a26b6de4 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -14,8 +14,9 @@ js/00-zepto.js
 js/01-zepto-jquery.js
 js/10-bootstrap-dropdown.js
 js/10-bootstrap-modal.js
-js/90-custom.js
+js/90-autoresize.js
 js/90-form.js
+js/90-themes.js
 js/90-nav.js
 lib/Plack/App/Gruntmaster.pm
 lib/Plack/App/Gruntmaster/HTML.pm
diff --git a/js/90-autoresize.js b/js/90-autoresize.js
new file mode 100644 (file)
index 0000000..e40ef4e
--- /dev/null
@@ -0,0 +1,20 @@
+(function(){
+       'use strict';
+
+       $( document ).ready(function() {
+               var hiddenDiv = $(document.createElement('div'));
+
+               hiddenDiv.addClass('hiddendiv common');
+
+               $('body').append(hiddenDiv);
+
+               $("textarea.autoresize").on('keyup', function () {
+                       var content = $(this).val();
+
+                       content = content.replace(/\n/g, '<br>');
+                       hiddenDiv.html(content + '<br class="lbr">');
+
+                       $(this).css('height', hiddenDiv.height()+23);
+               });
+       });
+})();
diff --git a/js/90-custom.js b/js/90-custom.js
deleted file mode 100644 (file)
index 183f3dd..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-(function(){
-       'use strict';
-       function set_style(name){
-               $('#stylesheet').attr("href", "/css/" + name + ".css");
-               localStorage.setItem("theme", name);
-       }
-
-       $( document ).ready(function() {
-               $('#theme-selector').removeClass('hidden');
-
-               var hiddenDiv = $(document.createElement('div'));
-
-               hiddenDiv.addClass('hiddendiv common');
-
-               $('body').append(hiddenDiv);
-
-               $("textarea.autoresize").on('keyup', function () {
-                       var content = $(this).val();
-
-                       content = content.replace(/\n/g, '<br>');
-                       hiddenDiv.html(content + '<br class="lbr">');
-
-                       $(this).css('height', hiddenDiv.height()+23);
-               });
-
-               $('#theme_slate'   ).on('click', function () { set_style("slate"); });
-               $('#theme_cerulean').on('click', function () { set_style("cerulean"); });
-               $('#theme_cyborg'  ).on('click', function () { set_style("cyborg"); });
-               $('#theme_cosmo'   ).on('click', function () { set_style("cosmo"); });
-       });
-
-       var theme = localStorage.getItem("theme");
-       if(theme) {
-               set_style(theme);
-       }
-})();
diff --git a/js/90-themes.js b/js/90-themes.js
new file mode 100644 (file)
index 0000000..74506c8
--- /dev/null
@@ -0,0 +1,20 @@
+(function(){
+       'use strict';
+       function set_style(name){
+               $('#stylesheet').attr("href", "/css/" + name + ".css");
+               localStorage.setItem("theme", name);
+       }
+
+       $( document ).ready(function() {
+               $('#theme-selector').removeClass('hidden');
+               $('#theme_slate'   ).on('click', function () { set_style("slate"); });
+               $('#theme_cerulean').on('click', function () { set_style("cerulean"); });
+               $('#theme_cyborg'  ).on('click', function () { set_style("cyborg"); });
+               $('#theme_cosmo'   ).on('click', function () { set_style("cosmo"); });
+       });
+
+       var theme = localStorage.getItem("theme");
+       if(theme) {
+               set_style(theme);
+       }
+})();
This page took 0.013558 seconds and 4 git commands to generate.