Add Yardi logo
[mindcoding-template-patches.git] / js / scripts.js
CommitLineData
4de434ba
MG
1function set_style(name){
2 $('#stylesheet').attr("href", "/css/" + name + ".var");
b78f93c9 3 localStorage.setItem("theme", name);
a84cee55
MG
4
5 if(name == "slate" || name == "cyborg") {
6 $('#yardi').attr("src", "/img/yardi-white.png");
7 }
4de434ba
MG
8}
9
e9902b1b
S
10$( document ).ready(function() {
11 var txt = $('#comments');
12 hiddenDiv = $(document.createElement('div')),
13 content = null;
14
15 txt.addClass('txtstuff');
16 hiddenDiv.addClass('hiddendiv common');
17
18 $('body').append(hiddenDiv);
19
20 $(".form-control").on('keyup', function () {
4de434ba 21 content = $(this).val();
e9902b1b 22
4de434ba
MG
23 content = content.replace(/\n/g, '<br>');
24 hiddenDiv.html(content + '<br class="lbr">');
e9902b1b 25
4de434ba 26 $(this).css('height', hiddenDiv.height()+23);
e9902b1b
S
27 });
28
4de434ba
MG
29 $('#theme_slate' ).on('click', function () { set_style("slate"); });
30 $('#theme_cerulean').on('click', function () { set_style("cerulean"); });
31 $('#theme_cyborg' ).on('click', function () { set_style("cyborg"); });
88da92e7 32 $('#theme_cosmo' ).on('click', function () { set_style("cosmo"); });
4de434ba 33});
b78f93c9
MG
34
35if(localStorage.getItem("theme"))
36 set_style(localStorage.getItem("theme"));
This page took 0.010953 seconds and 4 git commands to generate.