Skip to content

Commit

Permalink
Minor fixes:
Browse files Browse the repository at this point in the history
- Multi-nav page: Button position & collapse accordion optional properties only appear when relevant
- Multi-nav & Tab Nav+ pages: Improved panel sizing
- Documentation page: <i> changed to <em>
  • Loading branch information
FayCross committed Nov 11, 2022
1 parent 0d6d690 commit b6abb10
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 18 deletions.
Expand Up @@ -720,7 +720,7 @@
var $tempTable = $('<div>').append($table.find('table').clone());

$tempTable.find('textarea').each(function() {
$(this).before('<i>' + ($(this).val().length == 0 ? notAnsweredText : $(this).val().replace(/\r?\n/g, '<br>')) + '</i>');
$(this).before('<em>' + ($(this).val().length == 0 ? notAnsweredText : $(this).val().replace(/\r?\n/g, '<br>')) + '</em>');
$(this).remove();
});

Expand Down
Expand Up @@ -72,7 +72,7 @@

} else {
var $panel = $("#navHolder .panel").length > 0 ? $("#navHolder .panel") : $("#pageContents > div.panel");
$("#infoHolder").height($x_pageHolder.height() - (parseInt($x_pageDiv.css("padding-top")) * 2) - $("#btnHolder").outerHeight(true) - (parseInt($panel.css("padding-top")) * 2) - 5);
$("#infoHolder").height($x_pageHolder.height() - (parseInt($x_pageDiv.css("padding-top")) * 2) - $("#btnHolder").outerHeight(true) - (parseInt($panel.css("padding-top")) * 2) - (parseInt($("#infoHolder").css("padding-top"))) - (parseInt($("#infoHolder").css("padding-bottom"))) - 5);
}
}

Expand Down
Expand Up @@ -61,9 +61,10 @@
$paneHolder = $("#pageContents .paneHolder"),
txtH = $('.splitScreen').prev().is('#txtHolder') ? $('#txtHolder').outerHeight(true) : 0;

$infoHolder.height($x_pageHolder.height() - parseInt($x_pageDiv.css("padding-top")) * 2 - txtH - 10);
$infoHolder.tabs("refresh");
$paneHolder.height($infoHolder.height()-$("#pageContents .tabList:visible").height() - parseInt($paneHolder.css("padding-top")) * 2 - 5);
$infoHolder.height($x_pageHolder.height() - ($infoHolder.outerHeight(true) - $infoHolder.height()) - txtH - ($x_pageDiv.outerHeight(true) - $x_pageDiv.height()));
$infoHolder.tabs("refresh");

$paneHolder.height($infoHolder.height() - $("#pageContents .tabList:visible").height() - ($paneHolder.outerHeight(true) - $paneHolder.height()));
}

var $pageContents = $("#pageContents");
Expand Down Expand Up @@ -167,6 +168,7 @@

tabNavExtra.scaleImages();
tabNavExtra.loadCustomHTML();
tabNavExtra.sizeChanged();
}
});
});
Expand Down
12 changes: 6 additions & 6 deletions modules/xerte/parent_templates/Nottingham/wizards/en-GB/data.xwd
Expand Up @@ -6623,18 +6623,18 @@

<name label="Page Title" type="TextInput" wysiwyg="true"/>
<text label="Page Text" type="TextArea" height="250"/>
<type label="Navigator Type" options="Accordion,Buttons,Columns,Slideshow,Tabs" type="ComboBox" data="Acc,Button,Col,Slide,Tab" width="100"/>
<type label="Navigator Type" options="Accordion,Buttons,Columns,Slideshow,Tabs" type="ComboBox" conditionTrigger="true" data="Acc,Button,Col,Slide,Tab" width="100"/>

<nextBtnTip label="Slideshow Button Tip (Next)" type="TextInput" language="true"/>
<prevBtnTip label="Slideshow Button Tip (Previous)" type="TextInput" language="true"/>
<slideCount label="Slide {i} of {n}" type="TextInput" wysiwyg="true" language="true"/>

<panelInfo type="group" label="Panel Layout" optional="true">
<panelWidth label="Panel Width" options="Small,Medium,Large,Full" type="ComboBox" data="Small,Medium,Large,Full" defaultValue="Medium" width="100" optional="true"/>
<panelHeight label="Panel Height" options="Fill Space,Fit Content" type="ComboBox" data="fill,fit" defaultValue="fill" width="100" optional="true"/>
<panelPos label="Panel Position" options="Left,Right" type="ComboBox" data="Left,Right" defaultValue="Right" width="100" optional="true"/>
<buttonPos label="Button Position" options="Top,Bottom" type="ComboBox" data="Top,Bottom" defaultValue="Top" width="100" optional="true"/>
<collapsible label="Collapse Accordion" type="CheckBox" defaultValue="false" optional="true"/>
<panelWidth label="Panel Width" options="Small,Medium,Large,Full" type="ComboBox" data="Small,Medium,Large,Full" defaultValue="Medium" width="100" optional="true" condition="type!='Col'"/>
<panelHeight label="Panel Height" options="Fill Space,Fit Content" type="ComboBox" data="fill,fit" defaultValue="fill" width="100" optional="true" condition="type!='Col'"/>
<panelPos label="Panel Position" options="Left,Right" type="ComboBox" data="Left,Right" defaultValue="Right" width="100" optional="true" condition="type!='Col'"/>
<buttonPos label="Button Position" options="Top,Bottom" type="ComboBox" data="Top,Bottom" defaultValue="Top" width="100" optional="true" condition="type=='Button'||type=='Slide'"/>
<collapsible label="Collapse Accordion" type="CheckBox" defaultValue="false" optional="true" condition="type=='Acc'"/>
</panelInfo>

<newNodes>
Expand Down
2 changes: 1 addition & 1 deletion src/Nottingham/wizards/en-GB/nav.xwd
@@ -1 +1 @@
<wizard menus="Navigators"> <pageWizard remove="true" duplicate="false"> <newNodes> <nav><![CDATA[<nav name="Enter Page Title" text="Enter text for the page here" type="Tab" nextBtnTip="Next" prevBtnTip="Previous" slideCount="Slide {i} of {n}"/>]]></nav> </newNodes> </pageWizard> <!-- NAVIGATOR=================================================== --> <nav menu="Navigators" menuItem="Multi-Navigator" hint="Present related text and graphical content on a series of sub-pages. Layout options include accordion, button, columns, slideshow and tabs." icon="icPages" thumb="thumbs/tabNav.jpg" example="https://xot.xerte.org.uk/play_116?hide=bottom#multi-navigator" remove="true" deepLink="true"> <name label="Page Title" type="TextInput" wysiwyg="true" /> <text label="Page Text" type="TextArea" height="250" /> <type label="Navigator Type" options="Accordion,Buttons,Columns,Slideshow,Tabs" type="ComboBox" data="Acc,Button,Col,Slide,Tab" width="100"/> <nextBtnTip label="Slideshow Button Tip (Next)" type="TextInput" language="true"/> <prevBtnTip label="Slideshow Button Tip (Previous)" type="TextInput" language="true"/> <slideCount label="Slide {i} of {n}" type="TextInput" wysiwyg="true" language="true" /> <panelInfo type="group" label="Panel Layout" optional="true"> <panelWidth label="Panel Width" options="Small,Medium,Large,Full" type="ComboBox" data="Small,Medium,Large,Full" defaultValue="Medium" width="100" optional="true"/> <panelHeight label="Panel Height" options="Fill Space,Fit Content" type="ComboBox" data="fill,fit" defaultValue="fill" width="100" optional="true"/> <panelPos label="Panel Position" options="Left,Right" type="ComboBox" data="Left,Right" defaultValue="Right" width="100" optional="true"/> <buttonPos label="Button Position" options="Top,Bottom" type="ComboBox" data="Top,Bottom" defaultValue="Top" width="100" optional="true"/> <collapsible label="Collapse Accordion" type="CheckBox" defaultValue="false" optional="true"/> </panelInfo> <newNodes> <navPage><![CDATA[<navPage name="Enter Title Here" text="Content for the pane"/>]]></navPage> </newNodes> </nav> <navPage menuItem="Nested Page" icon="icBullet" remove="true"> <name label="Title" type="TextInput" wysiwyg="true" /> <text label="Text" type="TextArea" height="250" /> <mediaInfo type="group" label="Media" optional="true"> <url label="File" type="media" defaultValue="Select Media" optional="true"/> <tip label="Description" type="TextInput" defaultValue="Enter a Description for Accessibility" optional="true"/> <align label="Media Position" options="Top,Bottom" type="ComboBox" data="Top,Bottom" defaultValue="Top" width="100" optional="true"/> <transcript label="Audio Transcript" type="textArea" height="100" defaultValue="" optional="true" tooltip="A transcript button will appear on the audio player when text is added here"/> </mediaInfo> </navPage> </wizard>
<wizard menus="Navigators"> <pageWizard remove="true" duplicate="false"> <newNodes> <nav><![CDATA[<nav name="Enter Page Title" text="Enter text for the page here" type="Tab" nextBtnTip="Next" prevBtnTip="Previous" slideCount="Slide {i} of {n}"/>]]></nav> </newNodes> </pageWizard> <!-- NAVIGATOR=================================================== --> <nav menu="Navigators" menuItem="Multi-Navigator" hint="Present related text and graphical content on a series of sub-pages. Layout options include accordion, button, columns, slideshow and tabs." icon="icPages" thumb="thumbs/tabNav.jpg" example="https://xot.xerte.org.uk/play_116?hide=bottom#multi-navigator" remove="true" deepLink="true"> <name label="Page Title" type="TextInput" wysiwyg="true" /> <text label="Page Text" type="TextArea" height="250" /> <type label="Navigator Type" options="Accordion,Buttons,Columns,Slideshow,Tabs" type="ComboBox" conditionTrigger="true" data="Acc,Button,Col,Slide,Tab" width="100"/> <nextBtnTip label="Slideshow Button Tip (Next)" type="TextInput" language="true"/> <prevBtnTip label="Slideshow Button Tip (Previous)" type="TextInput" language="true"/> <slideCount label="Slide {i} of {n}" type="TextInput" wysiwyg="true" language="true" /> <panelInfo type="group" label="Panel Layout" optional="true"> <panelWidth label="Panel Width" options="Small,Medium,Large,Full" type="ComboBox" data="Small,Medium,Large,Full" defaultValue="Medium" width="100" optional="true" condition="type!='Col'"/> <panelHeight label="Panel Height" options="Fill Space,Fit Content" type="ComboBox" data="fill,fit" defaultValue="fill" width="100" optional="true" condition="type!='Col'"/> <panelPos label="Panel Position" options="Left,Right" type="ComboBox" data="Left,Right" defaultValue="Right" width="100" optional="true" condition="type!='Col'"/> <buttonPos label="Button Position" options="Top,Bottom" type="ComboBox" data="Top,Bottom" defaultValue="Top" width="100" optional="true" condition="type=='Button'||type=='Slide'"/> <collapsible label="Collapse Accordion" type="CheckBox" defaultValue="false" optional="true" condition="type=='Acc'"/> </panelInfo> <newNodes> <navPage><![CDATA[<navPage name="Enter Title Here" text="Content for the pane"/>]]></navPage> </newNodes> </nav> <navPage menuItem="Nested Page" icon="icBullet" remove="true"> <name label="Title" type="TextInput" wysiwyg="true" /> <text label="Text" type="TextArea" height="250" /> <mediaInfo type="group" label="Media" optional="true"> <url label="File" type="media" defaultValue="Select Media" optional="true"/> <tip label="Description" type="TextInput" defaultValue="Enter a Description for Accessibility" optional="true"/> <align label="Media Position" options="Top,Bottom" type="ComboBox" data="Top,Bottom" defaultValue="Top" width="100" optional="true"/> <transcript label="Audio Transcript" type="textArea" height="100" defaultValue="" optional="true" tooltip="A transcript button will appear on the audio player when text is added here"/> </mediaInfo> </navPage> </wizard>
Expand Down
12 changes: 6 additions & 6 deletions src/Nottingham/wizards/en-GB/template.xwd
Expand Up @@ -6623,18 +6623,18 @@

<name label="Page Title" type="TextInput" wysiwyg="true"/>
<text label="Page Text" type="TextArea" height="250"/>
<type label="Navigator Type" options="Accordion,Buttons,Columns,Slideshow,Tabs" type="ComboBox" data="Acc,Button,Col,Slide,Tab" width="100"/>
<type label="Navigator Type" options="Accordion,Buttons,Columns,Slideshow,Tabs" type="ComboBox" conditionTrigger="true" data="Acc,Button,Col,Slide,Tab" width="100"/>

<nextBtnTip label="Slideshow Button Tip (Next)" type="TextInput" language="true"/>
<prevBtnTip label="Slideshow Button Tip (Previous)" type="TextInput" language="true"/>
<slideCount label="Slide {i} of {n}" type="TextInput" wysiwyg="true" language="true"/>

<panelInfo type="group" label="Panel Layout" optional="true">
<panelWidth label="Panel Width" options="Small,Medium,Large,Full" type="ComboBox" data="Small,Medium,Large,Full" defaultValue="Medium" width="100" optional="true"/>
<panelHeight label="Panel Height" options="Fill Space,Fit Content" type="ComboBox" data="fill,fit" defaultValue="fill" width="100" optional="true"/>
<panelPos label="Panel Position" options="Left,Right" type="ComboBox" data="Left,Right" defaultValue="Right" width="100" optional="true"/>
<buttonPos label="Button Position" options="Top,Bottom" type="ComboBox" data="Top,Bottom" defaultValue="Top" width="100" optional="true"/>
<collapsible label="Collapse Accordion" type="CheckBox" defaultValue="false" optional="true"/>
<panelWidth label="Panel Width" options="Small,Medium,Large,Full" type="ComboBox" data="Small,Medium,Large,Full" defaultValue="Medium" width="100" optional="true" condition="type!='Col'"/>
<panelHeight label="Panel Height" options="Fill Space,Fit Content" type="ComboBox" data="fill,fit" defaultValue="fill" width="100" optional="true" condition="type!='Col'"/>
<panelPos label="Panel Position" options="Left,Right" type="ComboBox" data="Left,Right" defaultValue="Right" width="100" optional="true" condition="type!='Col'"/>
<buttonPos label="Button Position" options="Top,Bottom" type="ComboBox" data="Top,Bottom" defaultValue="Top" width="100" optional="true" condition="type=='Button'||type=='Slide'"/>
<collapsible label="Collapse Accordion" type="CheckBox" defaultValue="false" optional="true" condition="type=='Acc'"/>
</panelInfo>

<newNodes>
Expand Down

0 comments on commit b6abb10

Please sign in to comment.