Skip to content

Commit

Permalink
#1080 Add option to auto open 1st item on interactive list page
Browse files Browse the repository at this point in the history
  • Loading branch information
FayCross committed Mar 3, 2022
1 parent 5aa7442 commit 8da5d04
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
Expand Up @@ -217,6 +217,10 @@
})
}

if (x_currentPageXML.getAttribute('openFirst') == "true") {
$(".listItem:first").click();
}

x_pageLoaded();
}

Expand Down
Expand Up @@ -200,7 +200,7 @@
submitBtnText="Submit"
nextBtnText="Next"
restartBtnText="Restart"
/>]]></inventory><jing><![CDATA[<jing name="Enter Page Title" url="Select a Jing SWF File"/>]]></jing><jmol><![CDATA[<jmol name="Enter Page Title" text="Enter text for the page" xyz="Select an XYZ file" size="Medium" initLook="Ball and Stick" colour="Default" controls="true"/>]]></jmol><links><![CDATA[<links name="Enter Page Title" text="Enter Page Text" cols="3" />]]></links><list><![CDATA[<list name="Enter Page Title" text="Enter text for the page here" panelWidth="Large"/>]]></list><map><![CDATA[<map name="Enter Page Title" text="Enter text for the page here" align="left" mapurl="Paste the link here" maptype="roadmap" tooltip="Enter a Description for Accessibility" link="true"/>]]></map><mapstraction><![CDATA[<mapstraction name="Enter Page Title" provider="google" lat="0" lng="0" zoom="4"/>]]></mapstraction><mcq><![CDATA[<mcq name="Enter Page Title" instruction="Enter Instruction" prompt="Enter a Prompt" type="Single Answer" align="Left" panelWidth="Medium"
/>]]></inventory><jing><![CDATA[<jing name="Enter Page Title" url="Select a Jing SWF File"/>]]></jing><jmol><![CDATA[<jmol name="Enter Page Title" text="Enter text for the page" xyz="Select an XYZ file" size="Medium" initLook="Ball and Stick" colour="Default" controls="true"/>]]></jmol><links><![CDATA[<links name="Enter Page Title" text="Enter Page Text" cols="3" />]]></links><list><![CDATA[<list name="Enter Page Title" text="Enter text for the page here" panelWidth="Large" openFirst="true"/>]]></list><map><![CDATA[<map name="Enter Page Title" text="Enter text for the page here" align="left" mapurl="Paste the link here" maptype="roadmap" tooltip="Enter a Description for Accessibility" link="true"/>]]></map><mapstraction><![CDATA[<mapstraction name="Enter Page Title" provider="google" lat="0" lng="0" zoom="4"/>]]></mapstraction><mcq><![CDATA[<mcq name="Enter Page Title" instruction="Enter Instruction" prompt="Enter a Prompt" type="Single Answer" align="Left" panelWidth="Medium"
feedbackLabel="Feedback" singleRight="Your answer is correct!" singleWrong="Your answer is incorrect" multiRight="You have selected all the correct answers"
multiWrong="You have not selected the correct combination of answers"
checkBtnTxt="Check" />]]></mcq><media360><![CDATA[<media360 name="Enter Page Title" text="Enter text for the page here" size="large" position="right"
Expand Down Expand Up @@ -4256,6 +4256,8 @@
<name label="Page Title" type="TextInput" wysiwyg="true"/>
<text label="Page Text" type="TextArea" height="200"/>
<panelWidth label="Panel Width" options="Small,Medium,Large" type="ComboBox" data="Small,Medium,Large" defaultValue="Medium" width="100"/>
<openFirst label="Show First Item" type="Checkbox" defaultValue="false" mandatory="true" tooltip="Show first item when page is first viewed"/>

<hicol label="Text colour" type="ColourPicker" optional="true" defaultValue="0xFFFF00" tooltip="The colour of the text"/>
<hicolback label="Background Button colour" type="ColourPicker" optional="true" defaultValue="0xFFFF00" tooltip="The background colour of the button"/>
<hicolHover label="Hover Button colour" type="ColourPicker" optional="true" defaultValue="0xFFFF00" tooltip="The colour of the button when the mouse is hovering over the button"/>
Expand Down
2 changes: 1 addition & 1 deletion src/Nottingham/wizards/en-GB/list.xwd
@@ -1 +1 @@
<wizard menus="Navigators"> <pageWizard remove="true" duplicate="false"> <newNodes> <list><![CDATA[<list name="Enter Page Title" text="Enter text for the page here" panelWidth="Large"/>]]></list> </newNodes> </pageWizard> <!-- INTERACTIVE LIST================================= --> <list menu="Navigators" menuItem="Interactive List" hint="Present an interactive list where each list item presents further information." icon="icList" thumb="thumbs/interactiveList.jpg" example="https://xot.xerte.org.uk/play_116?hide=bottom#interactivelist" remove="true" deepLink="true"> <name label="Page Title" type="TextInput" wysiwyg="true"/> <text label="Page Text" type="TextArea" height="200"/> <panelWidth label="Panel Width" options="Small,Medium,Large" type="ComboBox" data="Small,Medium,Large" defaultValue="Medium" width="100"/> <hicol label="Text colour" type="ColourPicker" optional="true" defaultValue="0xFFFF00" tooltip="The colour of the text"/> <hicolback label="Background Button colour" type="ColourPicker" optional="true" defaultValue="0xFFFF00" tooltip="The background colour of the button"/> <hicolHover label="Hover Button colour" type="ColourPicker" optional="true" defaultValue="0xFFFF00" tooltip="The colour of the button when the mouse is hovering over the button"/> <newNodes> <listItem><![CDATA[<listItem name="Enter Item Title Here" text="Enter text for the list item here"/>]]></listItem> </newNodes> </list> <listItem menuItem="List Item" icon="icBullet" remove="true"> <name label="Title" type="TextInput" wysiwyg="true" /> <text label="Text" type="TextArea" height="250" /> <align label="Align Text" options="Top,Bottom" type="ComboBox" data="Top,Bottom" defaultValue="Top" width="100" deprecated="This property is deprecated."/> <imgInfo type="group" label="Image" optional="true"> <url label="Image" type="media" optional="true" defaultValue="Select an Image"/> <tip label="Image Description" type="textInput" optional="true" defaultValue="Enter a Description for Accessibility"/> </imgInfo> </listItem> </wizard>
<wizard menus="Navigators"> <pageWizard remove="true" duplicate="false"> <newNodes> <list><![CDATA[<list name="Enter Page Title" text="Enter text for the page here" panelWidth="Large" openFirst="true"/>]]></list> </newNodes> </pageWizard> <!-- INTERACTIVE LIST================================= --> <list menu="Navigators" menuItem="Interactive List" hint="Present an interactive list where each list item presents further information." icon="icList" thumb="thumbs/interactiveList.jpg" example="https://xot.xerte.org.uk/play_116?hide=bottom#interactivelist" remove="true" deepLink="true"> <name label="Page Title" type="TextInput" wysiwyg="true"/> <text label="Page Text" type="TextArea" height="200"/> <panelWidth label="Panel Width" options="Small,Medium,Large" type="ComboBox" data="Small,Medium,Large" defaultValue="Medium" width="100"/> <openFirst label="Show First Item" type="Checkbox" defaultValue="false" mandatory="true" tooltip="Show first item when page is first viewed"/> <hicol label="Text colour" type="ColourPicker" optional="true" defaultValue="0xFFFF00" tooltip="The colour of the text"/> <hicolback label="Background Button colour" type="ColourPicker" optional="true" defaultValue="0xFFFF00" tooltip="The background colour of the button"/> <hicolHover label="Hover Button colour" type="ColourPicker" optional="true" defaultValue="0xFFFF00" tooltip="The colour of the button when the mouse is hovering over the button"/> <newNodes> <listItem><![CDATA[<listItem name="Enter Item Title Here" text="Enter text for the list item here"/>]]></listItem> </newNodes> </list> <listItem menuItem="List Item" icon="icBullet" remove="true"> <name label="Title" type="TextInput" wysiwyg="true" /> <text label="Text" type="TextArea" height="250" /> <align label="Align Text" options="Top,Bottom" type="ComboBox" data="Top,Bottom" defaultValue="Top" width="100" deprecated="This property is deprecated."/> <imgInfo type="group" label="Image" optional="true"> <url label="Image" type="media" optional="true" defaultValue="Select an Image"/> <tip label="Image Description" type="textInput" optional="true" defaultValue="Enter a Description for Accessibility"/> </imgInfo> </listItem> </wizard>
Expand Down
4 changes: 3 additions & 1 deletion src/Nottingham/wizards/en-GB/template.xwd
Expand Up @@ -200,7 +200,7 @@
submitBtnText="Submit"
nextBtnText="Next"
restartBtnText="Restart"
/>]]></inventory><jing><![CDATA[<jing name="Enter Page Title" url="Select a Jing SWF File"/>]]></jing><jmol><![CDATA[<jmol name="Enter Page Title" text="Enter text for the page" xyz="Select an XYZ file" size="Medium" initLook="Ball and Stick" colour="Default" controls="true"/>]]></jmol><links><![CDATA[<links name="Enter Page Title" text="Enter Page Text" cols="3" />]]></links><list><![CDATA[<list name="Enter Page Title" text="Enter text for the page here" panelWidth="Large"/>]]></list><map><![CDATA[<map name="Enter Page Title" text="Enter text for the page here" align="left" mapurl="Paste the link here" maptype="roadmap" tooltip="Enter a Description for Accessibility" link="true"/>]]></map><mapstraction><![CDATA[<mapstraction name="Enter Page Title" provider="google" lat="0" lng="0" zoom="4"/>]]></mapstraction><mcq><![CDATA[<mcq name="Enter Page Title" instruction="Enter Instruction" prompt="Enter a Prompt" type="Single Answer" align="Left" panelWidth="Medium"
/>]]></inventory><jing><![CDATA[<jing name="Enter Page Title" url="Select a Jing SWF File"/>]]></jing><jmol><![CDATA[<jmol name="Enter Page Title" text="Enter text for the page" xyz="Select an XYZ file" size="Medium" initLook="Ball and Stick" colour="Default" controls="true"/>]]></jmol><links><![CDATA[<links name="Enter Page Title" text="Enter Page Text" cols="3" />]]></links><list><![CDATA[<list name="Enter Page Title" text="Enter text for the page here" panelWidth="Large" openFirst="true"/>]]></list><map><![CDATA[<map name="Enter Page Title" text="Enter text for the page here" align="left" mapurl="Paste the link here" maptype="roadmap" tooltip="Enter a Description for Accessibility" link="true"/>]]></map><mapstraction><![CDATA[<mapstraction name="Enter Page Title" provider="google" lat="0" lng="0" zoom="4"/>]]></mapstraction><mcq><![CDATA[<mcq name="Enter Page Title" instruction="Enter Instruction" prompt="Enter a Prompt" type="Single Answer" align="Left" panelWidth="Medium"
feedbackLabel="Feedback" singleRight="Your answer is correct!" singleWrong="Your answer is incorrect" multiRight="You have selected all the correct answers"
multiWrong="You have not selected the correct combination of answers"
checkBtnTxt="Check" />]]></mcq><media360><![CDATA[<media360 name="Enter Page Title" text="Enter text for the page here" size="large" position="right"
Expand Down Expand Up @@ -4256,6 +4256,8 @@
<name label="Page Title" type="TextInput" wysiwyg="true"/>
<text label="Page Text" type="TextArea" height="200"/>
<panelWidth label="Panel Width" options="Small,Medium,Large" type="ComboBox" data="Small,Medium,Large" defaultValue="Medium" width="100"/>
<openFirst label="Show First Item" type="Checkbox" defaultValue="false" mandatory="true" tooltip="Show first item when page is first viewed"/>

<hicol label="Text colour" type="ColourPicker" optional="true" defaultValue="0xFFFF00" tooltip="The colour of the text"/>
<hicolback label="Background Button colour" type="ColourPicker" optional="true" defaultValue="0xFFFF00" tooltip="The background colour of the button"/>
<hicolHover label="Hover Button colour" type="ColourPicker" optional="true" defaultValue="0xFFFF00" tooltip="The colour of the button when the mouse is hovering over the button"/>
Expand Down

0 comments on commit 8da5d04

Please sign in to comment.