Skip to content
Browse files

Automatic size of textboxes, depending on windows height.

  • Loading branch information...
1 parent 3a241ec commit c13185111c8dcba43f2123b231614eddb7628abf @sebnilsson committed Aug 29, 2012
Showing with 12 additions and 4 deletions.
  1. +3 −1 .gitignore
  2. +6 −0 src/Squishify.Website/Content/Site.js
  3. +3 −3 src/Squishify.Website/Views/Shared/_Layout.cshtml
View
4 .gitignore
@@ -54,4 +54,6 @@ packages/
#SquishIt
*-min.js
-*-min.css
+*-min.css
+*-min.*.js
+*-min.*.css
View
6 src/Squishify.Website/Content/Site.js
@@ -7,6 +7,12 @@ $(function () {
$('textarea').corner('5px');
$('.type-list-item').corner('8px');
+ var winHeight = $(window).height() - 450;
+ if (winHeight < 150) {
+ winHeight = 150;
+ }
+ $('textarea').height(winHeight);
+
$('#source-text').select();
var sendRequest = function (button, url) {
View
6 src/Squishify.Website/Views/Shared/_Layout.cshtml
@@ -10,12 +10,12 @@
@(Html.BundleJavaScript()
.Add("~/Scripts/Html5Shiv.js")
- .MvcRender("top-min.js"))
+ .MvcRender("top-min.#.js"))
@(Html.BundleCss()
.Add("~/Content/Reset.css")
.Add("~/Content/Site.css")
- .MvcRender("main-min.css"))
+ .MvcRender("main-min.#.css"))
</head>
<body>
<div id="wrapper">
@@ -66,7 +66,7 @@
.Add("~/Scripts/jquery.corner.js")
.Add("~/Scripts/json2.js")
.Add("~/Content/site.js")
- .MvcRender("bottom-min.js"))
+ .MvcRender("bottom-min.#.js"))
<script type="text/javascript">
var _gaq = _gaq || [];

0 comments on commit c131851

Please sign in to comment.
Something went wrong with that request. Please try again.