Skip to content

Commit

Permalink
Minor fixes (recommitted due to merge issues):
Browse files Browse the repository at this point in the history
- highlight text: panel height
- rss feed: layout bug
- documentation & highlight text: add tooltips
  • Loading branch information
FayCross committed Nov 30, 2022
1 parent dac89b4 commit aa930ba
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 31 deletions.
11 changes: 5 additions & 6 deletions modules/xerte/parent_templates/Nottingham/models_html5/rss.html
Expand Up @@ -59,10 +59,7 @@
$panel = $("#pageContents .panel");
$resultsHolder = $pageContents.find("#resultsHolder");
$("#loadingSpinner p").html(x_getLangInfo(x_languageData.find("fetchResults")[0], "label", "Fetching results..."));

$("#loadingSpinner").show();

// google.load("feeds", "1");

rssURL = x_currentPageXML.getAttribute("url");

Expand Down Expand Up @@ -112,16 +109,18 @@
var description = (typeof item.xertedescription != "undefined" ? item.xertedescription : item.description);
var templatename = (typeof item.xertetemplatename != "undefined" ? item.xertetemplatename : "");
var author = (typeof item.xerteauthor != "undefined" ? item.xerteauthor : (typeof item.author != "undefined" ? item.author : ""));
resultsString += '<div><a target="_blank" href="' + item.link + '">'+ item.title + '</a><br><br>';
resultsString += '<div class="s"><a target="_blank" href="' + item.link + '">'+ item.title + '</a><br><br>';


if (x_currentPageXML.getAttribute("appearance") != 'title' && typeof item.description != "undefined") {
// snippet is a bit long so shorten it
if (description != "undefined" && description.length > 400) {
var cutOff = 400 + description.substr(400).indexOf(' ');
resultsString += '<p class="rssDescription">' + description.substring(0, cutOff) + '...</p>';
var $html = $('<div>').html(description.substring(0, cutOff));
resultsString += '<p class="rssDescription">' + $html.prop('outerHTML') + '...</p>';
} else {
resultsString += '<p class="rssDescription">' + description + '</p>';
var $html = $('<div>').html(description);
resultsString += '<p class="rssDescription">' + $html.prop('outerHTML') + '</p>';
}
}

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

// this resizing is for if the panel is a tabbed navigator
$thisPanelPaneHolder.height($thisPanel.height() - $thisPanelTabHolder.outerHeight());
$thisPanelPaneHolder.find('.navChild').height($thisPanelPaneHolder.height() - parseInt($thisPanelPaneHolder.find('.navChild').css('padding-top')) * 2 - 2);
$thisPanelPaneHolder.find('.navChild').height($thisPanelPaneHolder.height() - ($thisPanelPaneHolder.find('.navChild').outerHeight(true) - $thisPanelPaneHolder.find('.navChild').height()));
}

// resize the contenteditable divs within panels
Expand Down
21 changes: 12 additions & 9 deletions modules/xerte/parent_templates/Nottingham/wizards/en-GB/data.xwd
Expand Up @@ -2911,11 +2911,11 @@
<filename label="Filename (without extension)" type="TextInput" defaultValue="documentation" optional="true"/>
<fileOrientation label="File Orientation" data="portrait,landscape" type="ComboBox" options="Portrait,Landscape" width="120" defaultValue="portrait" optional="true" tooltip="Orientation of downloaded file"/>

<fontSize type="group" label="Font Size" optional="true">
<h1 label="h1" type="TextInput" defaultValue="20" width="100" optional="true"/>
<h2 label="h2" type="TextInput" defaultValue="18" width="100" optional="true"/>
<h3 label="h3" type="TextInput" defaultValue="16" width="100" optional="true"/>
<p label="p" type="TextInput" defaultValue="15" width="100" optional="true"/>
<fontSize type="group" label="Font Size" optional="true" tooltip="Customise the font sizes used in the downloaded document">
<h1 label="h1" type="TextInput" defaultValue="20" width="100" optional="true"/>
<h2 label="h2" type="TextInput" defaultValue="18" width="100" optional="true"/>
<h3 label="h3" type="TextInput" defaultValue="16" width="100" optional="true"/>
<p label="p" type="TextInput" defaultValue="15" width="100" optional="true"/>
</fontSize>

<instructions label="Download Instructions" type="TextArea" height="120" language="true"/>
Expand Down Expand Up @@ -9034,10 +9034,13 @@
<download label="Allow Download" type="CheckBox" defaultValue="true" conditionTrigger="true" optional="true"/>
<filename label="Filename (without extension)" type="TextInput" defaultValue="textHighlight" condition="download=='true'" optional="true"/>
<fileOrientation label="File Orientation" data="portrait,landscape" type="ComboBox" options="Portrait,Landscape" width="120" defaultValue="portrait" condition="download=='true'" optional="true"/>
<h1 label="h1" type="TextInput" defaultValue="20" width="100" optional="true"/>
<h2 label="h2" type="TextInput" defaultValue="18" width="100" optional="true"/>
<h3 label="h3" type="TextInput" defaultValue="16" width="100" optional="true"/>
<p label="p" type="TextInput" defaultValue="15" width="100" optional="true"/>

<fontSize type="group" label="Font Size" optional="true" tooltip="Customise the font sizes used in the downloaded document">
<h1 label="h1" type="TextInput" defaultValue="20" width="100" optional="true"/>
<h2 label="h2" type="TextInput" defaultValue="18" width="100" optional="true"/>
<h3 label="h3" type="TextInput" defaultValue="16" width="100" optional="true"/>
<p label="p" type="TextInput" defaultValue="15" width="100" optional="true"/>
</fontSize>
</downloadGroup>

<allowTyping label="Allow Typing" type="CheckBox" optional="true" condition="mode=='Notes'" defaultValue="true" tooltip="Allow typing directly in notes area (on by default)"/>
Expand Down
10 changes: 5 additions & 5 deletions src/Nottingham/wizards/en-GB/documentation.xwd
Expand Up @@ -18,11 +18,11 @@
<filename label="Filename (without extension)" type="TextInput" defaultValue="documentation" optional="true"/>
<fileOrientation label="File Orientation" data="portrait,landscape" type="ComboBox" options="Portrait,Landscape" width="120" defaultValue="portrait" optional="true" tooltip="Orientation of downloaded file"/>

<fontSize type="group" label="Font Size" optional="true">
<h1 label="h1" type="TextInput" defaultValue="20" width="100" optional="true"/>
<h2 label="h2" type="TextInput" defaultValue="18" width="100" optional="true"/>
<h3 label="h3" type="TextInput" defaultValue="16" width="100" optional="true"/>
<p label="p" type="TextInput" defaultValue="15" width="100" optional="true"/>
<fontSize type="group" label="Font Size" optional="true" tooltip="Customise the font sizes used in the downloaded document">
<h1 label="h1" type="TextInput" defaultValue="20" width="100" optional="true"/>
<h2 label="h2" type="TextInput" defaultValue="18" width="100" optional="true"/>
<h3 label="h3" type="TextInput" defaultValue="16" width="100" optional="true"/>
<p label="p" type="TextInput" defaultValue="15" width="100" optional="true"/>
</fontSize>

<instructions label="Download Instructions" type="TextArea" height="120" language="true" />
Expand Down
21 changes: 12 additions & 9 deletions src/Nottingham/wizards/en-GB/template.xwd
Expand Up @@ -2911,11 +2911,11 @@
<filename label="Filename (without extension)" type="TextInput" defaultValue="documentation" optional="true"/>
<fileOrientation label="File Orientation" data="portrait,landscape" type="ComboBox" options="Portrait,Landscape" width="120" defaultValue="portrait" optional="true" tooltip="Orientation of downloaded file"/>

<fontSize type="group" label="Font Size" optional="true">
<h1 label="h1" type="TextInput" defaultValue="20" width="100" optional="true"/>
<h2 label="h2" type="TextInput" defaultValue="18" width="100" optional="true"/>
<h3 label="h3" type="TextInput" defaultValue="16" width="100" optional="true"/>
<p label="p" type="TextInput" defaultValue="15" width="100" optional="true"/>
<fontSize type="group" label="Font Size" optional="true" tooltip="Customise the font sizes used in the downloaded document">
<h1 label="h1" type="TextInput" defaultValue="20" width="100" optional="true"/>
<h2 label="h2" type="TextInput" defaultValue="18" width="100" optional="true"/>
<h3 label="h3" type="TextInput" defaultValue="16" width="100" optional="true"/>
<p label="p" type="TextInput" defaultValue="15" width="100" optional="true"/>
</fontSize>

<instructions label="Download Instructions" type="TextArea" height="120" language="true"/>
Expand Down Expand Up @@ -9034,10 +9034,13 @@
<download label="Allow Download" type="CheckBox" defaultValue="true" conditionTrigger="true" optional="true"/>
<filename label="Filename (without extension)" type="TextInput" defaultValue="textHighlight" condition="download=='true'" optional="true"/>
<fileOrientation label="File Orientation" data="portrait,landscape" type="ComboBox" options="Portrait,Landscape" width="120" defaultValue="portrait" condition="download=='true'" optional="true"/>
<h1 label="h1" type="TextInput" defaultValue="20" width="100" optional="true"/>
<h2 label="h2" type="TextInput" defaultValue="18" width="100" optional="true"/>
<h3 label="h3" type="TextInput" defaultValue="16" width="100" optional="true"/>
<p label="p" type="TextInput" defaultValue="15" width="100" optional="true"/>

<fontSize type="group" label="Font Size" optional="true" tooltip="Customise the font sizes used in the downloaded document">
<h1 label="h1" type="TextInput" defaultValue="20" width="100" optional="true"/>
<h2 label="h2" type="TextInput" defaultValue="18" width="100" optional="true"/>
<h3 label="h3" type="TextInput" defaultValue="16" width="100" optional="true"/>
<p label="p" type="TextInput" defaultValue="15" width="100" optional="true"/>
</fontSize>
</downloadGroup>

<allowTyping label="Allow Typing" type="CheckBox" optional="true" condition="mode=='Notes'" defaultValue="true" tooltip="Allow typing directly in notes area (on by default)"/>
Expand Down

0 comments on commit aa930ba

Please sign in to comment.