Skip to content

Commit

Permalink
Automatic size of textboxes, depending on windows height.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebnilsson committed Aug 29, 2012
1 parent 3a241ec commit c131851
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,6 @@ packages/

#SquishIt
*-min.js
*-min.css
*-min.css
*-min.*.js
*-min.*.css
6 changes: 6 additions & 0 deletions src/Squishify.Website/Content/Site.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions src/Squishify.Website/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -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 || [];
Expand Down

0 comments on commit c131851

Please sign in to comment.