Skip to content

Commit

Permalink
Fix for #547 textbox width
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnSmith-LT committed Sep 26, 2016
1 parent 177758a commit 6b483fb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Expand Up @@ -227,7 +227,10 @@
case 'textbox':
$element = $('<input>')
.attr('type', 'text')
.attr('value', '');
.attr('value', ''); console.log(xml);
if (xml.getAttribute('width') && xml.getAttribute('width') != '')
$element.width(parseInt(xml.getAttribute('width')));

(function (p, s, i) {
$element.on('change', function () {
documentation.updateData(p, s, i, $(this).val());
Expand Down
Expand Up @@ -695,7 +695,7 @@
<text label="Textbox Text" type="TextArea" height="100"/>

<required label="Required Field" type="Checkbox" defaultValue="true" optional="true"/>
<width label="Width" type="NumericStepper" min="1" max="255" defaultValue="25" optional="true"/>
<width label="Width (pixels)" type="NumericStepper" min="10" max="800" defaultValue="200" optional="true"/>
</textbox><section menuItem="Section">
<name label="Section Title" type="TextInput" mandatory="true" defaultValue="Section"/>
<text label="Section Text" type="TextArea" height="100"/>
Expand Down
4 changes: 2 additions & 2 deletions src/Nottingham/wizards/en-GB/documentation.xwd
Expand Up @@ -73,7 +73,7 @@
<text label="Textbox Text" type="TextArea" height="100"/>

<required label="Required Field" type="Checkbox" defaultValue="true" optional="true"/>
<width label="Width" type="NumericStepper" min="1" max="255" defaultValue="25" optional="true"/>
<width label="Width (pixels)" type="NumericStepper" min="10" max="800" defaultValue="200" optional="true"/>
</textbox>

<section menuItem="Section">
Expand Down Expand Up @@ -125,7 +125,7 @@
<text label="Textbox Text" type="TextArea" height="100"/>

<required label="Required Field" type="Checkbox" defaultValue="true" optional="true"/>
<width label="Width" type="NumericStepper" min="1" max="255" defaultValue="25" optional="true"/>
<width label="Width (pixels)" type="NumericStepper" min="10" max="800" defaultValue="200" optional="true"/>
</textbox>

</wizard>
2 changes: 1 addition & 1 deletion src/Nottingham/wizards/en-GB/template.xwd
Expand Up @@ -695,7 +695,7 @@
<text label="Textbox Text" type="TextArea" height="100"/>

<required label="Required Field" type="Checkbox" defaultValue="true" optional="true"/>
<width label="Width" type="NumericStepper" min="1" max="255" defaultValue="25" optional="true"/>
<width label="Width (pixels)" type="NumericStepper" min="10" max="800" defaultValue="200" optional="true"/>
</textbox><section menuItem="Section">
<name label="Section Title" type="TextInput" mandatory="true" defaultValue="Section"/>
<text label="Section Text" type="TextArea" height="100"/>
Expand Down

0 comments on commit 6b483fb

Please sign in to comment.