Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'gregor/SJRK-297' into stories-floe-dev
Browse files Browse the repository at this point in the history
* gregor/SJRK-297:
  SJRK-297: removed extraneous `else` in handlebars markup
  SJRK-297: Fix the race condition resulted from having multiple distributeOptions blocks on the same option value.
  SJRK-297: `sojustrepairit` theme Edit link now based on authoring flag
  SJRK-297: removing edit page links since story gathering is complete
  • Loading branch information
cindyli committed Nov 18, 2019
2 parents ceba010 + 66ab083 commit 81cdcdb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
18 changes: 10 additions & 8 deletions src/ui/storyTellingServerUI.js
Expand Up @@ -40,13 +40,14 @@ sjrk.storyTelling.loadStoryFromParameter = function (clientConfig, options) {
$.get("/stories/" + storyId, function (data) {
var retrievedStory = JSON.parse(data);

options = options || {};
options = options || {
pageSetup: {
authoringEnabled: clientConfig.authoringEnabled
}
};
options.distributeOptions = [{
"target": "{that story}.options.model",
"record": retrievedStory
},{
"target": "{that}.options.pageSetup.authoringEnabled",
"record": clientConfig.authoringEnabled
}];

// TODO: Move this string to another file and localize it
Expand Down Expand Up @@ -86,13 +87,14 @@ sjrk.storyTelling.loadBrowse = function (clientConfig, options) {
$.get("/stories", function (data) {
var browseResponse = JSON.parse(data);

options = options || {};
options = options || {
pageSetup: {
authoringEnabled: clientConfig.authoringEnabled
}
};
options.distributeOptions = [{
"target": "{that storyBrowser}.options.model",
"record": browseResponse
},{
"target": "{that}.options.pageSetup.authoringEnabled",
"record": clientConfig.authoringEnabled
}];

var storyBrowseComponent = sjrk.storyTelling[clientConfig.theme].page.storyBrowse(options);
Expand Down
5 changes: 4 additions & 1 deletion themes/sojustrepairit/css/sojustrepairit.css
Expand Up @@ -84,10 +84,13 @@ h3:empty {
align-items: center;
position: relative;
flex-wrap: wrap;
top: 1.75rem;
justify-content: flex-end;
}

.sjrk-st-top-menu.authoring-enabled {
top: 1.75rem;
}

.sjrk-st-top-menu nav {
display: inline-block;
}
Expand Down
@@ -1,11 +1,13 @@
<div class="sjrk-st-page-header">
<a href="https://sojustrepairit.org" class="sjrk-st-page-header-main-title" aria-label="{{localizedMessages.mastheadTitle}}"></a>
</div>
<div class="sjrk-st-top-menu">
<div class="sjrk-st-top-menu{{#if dynamicValues.authoringEnabled}} authoring-enabled{{/if}}">
<nav>
<ul>
<li><a href="storyBrowse.html">{{localizedMessages.link_browse_text}}</a></li>
</ul>
</nav>
<a class="sjrk-st-edit-link" href="{{localizedMessages.editor_url}}">{{localizedMessages.link_edit_text}}</a>
{{#if dynamicValues.authoringEnabled}}
<a class="sjrk-st-edit-link" href="{{localizedMessages.editor_url}}">{{localizedMessages.link_edit_text}}</a>
{{/if}}
</div>

0 comments on commit 81cdcdb

Please sign in to comment.