Skip to content

Commit

Permalink
Start of a fix for issue #976
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnSmith-LT committed May 11, 2022
1 parent ab73452 commit 4ce7e7d
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 6 deletions.
Expand Up @@ -320,6 +320,11 @@ and (max-width :500px) {
max-width: 95vw;
}

.x_homePageLink, .x_homePageLink:visited, .x_homePageLink:hover, .x_homePageLink:focus {
color: #ffffff;
text-decoration: none;
}

.skip-link {
background: #000000;
color: #ffffff;
Expand Down
Expand Up @@ -1297,7 +1297,22 @@ function x_continueSetUp1() {
checkExists(type, fallback);

// ignores x_params.allpagestitlesize if added as optional property as the header bar will resize to fit any title
$("#x_headerBlock h1").html(x_params.name);
// add link to LO title?
console.log(x_params.homePageLink);
if (x_params.homePageLink != undefined && x_params.homePageLink === 'true') {
$("#x_headerBlock h1").append(
$("<a>")
.html(x_params.name)
.attr("href", "#")
.addClass("x_homePageLink")
.attr("title", "Goto Home page")
.attr("aria-label", "Goto Home page")
.on("click", x_goHome)
);
}
else {
$("#x_headerBlock h1").html(x_params.name);
}

// strips code out of page title
var div = $("<div>").html(x_params.name);
Expand Down Expand Up @@ -1421,11 +1436,7 @@ function x_continueSetUp1() {
.removeClass("ui-state-hover");
}
);
} else if (x_params.navigation == "Historic" && x_params.homePage != undefined && x_params.homePage != "") {
x_navigateToPage(false, {type:'linkID', ID:x_params.homePage});
} else {
x_changePage(0);
}
} else x_goHome();

$(this)
.blur()
Expand Down Expand Up @@ -1615,6 +1626,14 @@ function x_continueSetUp1() {
}
}

function x_goHome() {
if (x_params.navigation == "Historic" && x_params.homePage != undefined && x_params.homePage != "") {
x_navigateToPage(false, {type:'linkID', ID:x_params.homePage});
} else {
x_changePage(0);
}
}

function x_continueSetUp2() {
// store language data for mediaelement buttons - use fallbacks in mediaElementText array if no lang data
var mediaElementText = [{
Expand Down
Expand Up @@ -15,7 +15,11 @@
<hideFooter optional="true" type="CheckBox" label="Hide Footer" defaultValue="false"/>
<fixDisplay optional="true" type="TextInput" label="Fixed Display Size" defaultValue="800,600" condition="displayMode=='default'||fixDisplay"/>
<maxWidth optional="true" type="NumericStepper" min="800" max="2000" step="10" label="Max Width" defaultValue="1400" tooltip="Use this option to set the maximum width (e.g. 1400px) that the page contents will be displayed on larger displays. Note: some pages like media lesson and hotspot connector will currently still fill the full width of the page."/>

<homePageGroup type="group" label="Home Page" optional="true">
<homePage optional="true" type="pagelist" label="Home Page" defaultValue="" tooltip="Home page used when navigation is set to 'Historic'. By default this is the first page in the project."/>
<homePageLink optional="true" type="CheckBox" label="Link LO title to Home Page" defaultValue="false"/>
</homePageGroup>

<kblanguage type="ComboBox" options="Croatian,French,German,Italian,Polish,Portuguese,Russian,Serbian,Slovene,Spanish" data="Croatian,French,German,Italian,Polish,Portuguese,Russian,Serbian,Slovene,Spanish" width="120" label="Keyboard Language" optional="true"/>
<decimalseparator label="Decimal Separator" type="ComboBox" options="Period,Comma" data="period,comma" width="100" defaultValue="period" optional="true"/>
Expand Down
4 changes: 4 additions & 0 deletions src/Nottingham/wizards/en-GB/basic.xwd
Expand Up @@ -14,7 +14,11 @@
<hideFooter optional="true" type="CheckBox" label="Hide Footer" defaultValue="false" />
<fixDisplay optional="true" type="TextInput" label="Fixed Display Size" defaultValue="800,600" condition="displayMode=='default'||fixDisplay" />
<maxWidth optional="true" type="NumericStepper" min="800" max="2000" step="10" label="Max Width" defaultValue="1400" tooltip="Use this option to set the maximum width (e.g. 1400px) that the page contents will be displayed on larger displays. Note: some pages like media lesson and hotspot connector will currently still fill the full width of the page."/>

<homePageGroup type="group" label="Home Page" optional="true">
<homePage optional="true" type="pagelist" label="Home Page" defaultValue="" tooltip="Home page used when navigation is set to 'Historic'. By default this is the first page in the project."/>
<homePageLink optional="true" type="CheckBox" label="Link LO title to Home Page" defaultValue="false" />
</homePageGroup>

<kblanguage type="ComboBox" options="Croatian,French,German,Italian,Polish,Portuguese,Russian,Serbian,Slovene,Spanish" data="Croatian,French,German,Italian,Polish,Portuguese,Russian,Serbian,Slovene,Spanish" width="120" label="Keyboard Language" optional="true"/>
<decimalseparator label="Decimal Separator" type="ComboBox" options="Period,Comma" data="period,comma" width="100" defaultValue="period" optional="true"/>
Expand Down
4 changes: 4 additions & 0 deletions src/Nottingham/wizards/en-GB/template.xwd
Expand Up @@ -15,7 +15,11 @@
<hideFooter optional="true" type="CheckBox" label="Hide Footer" defaultValue="false"/>
<fixDisplay optional="true" type="TextInput" label="Fixed Display Size" defaultValue="800,600" condition="displayMode=='default'||fixDisplay"/>
<maxWidth optional="true" type="NumericStepper" min="800" max="2000" step="10" label="Max Width" defaultValue="1400" tooltip="Use this option to set the maximum width (e.g. 1400px) that the page contents will be displayed on larger displays. Note: some pages like media lesson and hotspot connector will currently still fill the full width of the page."/>

<homePageGroup type="group" label="Home Page" optional="true">
<homePage optional="true" type="pagelist" label="Home Page" defaultValue="" tooltip="Home page used when navigation is set to 'Historic'. By default this is the first page in the project."/>
<homePageLink optional="true" type="CheckBox" label="Link LO title to Home Page" defaultValue="false"/>
</homePageGroup>

<kblanguage type="ComboBox" options="Croatian,French,German,Italian,Polish,Portuguese,Russian,Serbian,Slovene,Spanish" data="Croatian,French,German,Italian,Polish,Portuguese,Russian,Serbian,Slovene,Spanish" width="120" label="Keyboard Language" optional="true"/>
<decimalseparator label="Decimal Separator" type="ComboBox" options="Period,Comma" data="period,comma" width="100" defaultValue="period" optional="true"/>
Expand Down

0 comments on commit 4ce7e7d

Please sign in to comment.