Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
Fixes the Input Mask plugin example's window height.
Browse files Browse the repository at this point in the history
The window's height now adapts to the different themes' dimensions by
preset height depending on the active theme.

Related issue is #13.
  • Loading branch information
fabriciomurta committed Feb 23, 2017
1 parent ccd8a24 commit dc0c4e3
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion src/Examples/Form/TextField/InputMask/Default.aspx
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
<%@ Page Language="C#" %>
<!DOCTYPE html>

<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
// This page has no postback/ajax interactions so we don't test for it
// the code below just binds a good height/width to the panel depending on the active theme
var curTheme = Ext.Net.ResourceManager.GetInstance(HttpContext.Current);
switch (curTheme.Theme)
{
case Ext.Net.Theme.Triton:
case Ext.Net.Theme.CrispTouch:
case Ext.Net.Theme.NeptuneTouch:
Window1.Height = 475;
break;
case Ext.Net.Theme.Gray:
case Ext.Net.Theme.Default:
Window1.Height = 335;
break;
case Ext.Net.Theme.Crisp:
Window1.Height = 370;
break;
case Ext.Net.Theme.Neptune:
case Ext.Net.Theme.Aria:
Window1.Height = 375;
break;
default:
// If ever any other theme take place, then use the biggest of the values above
Window1.Height = 475;
break;
}
}
</script>

<html>
<head runat="server">
<title>Input Mask - Ext.NET Examples</title>
Expand All @@ -14,9 +48,9 @@
<p>InputMask is a plugin for TextField, used to add an input mask to the field.</p>

<ext:Window
ID="Window1"
runat="server"
Width="550"
Height="370"
Title="Input Mask"
Closable="false"
Layout="Form"
Expand Down

0 comments on commit dc0c4e3

Please sign in to comment.