Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into SWIK-1645-replace-search-selection-dropdowns

# Conflicts:
#	assets/css/custom.css
#	components/AddDeck/AddDeck.js
#	components/Home/ContactUs.js
  • Loading branch information
rusnewman committed Jan 29, 2019
2 parents 981aaf6 + 150b101 commit 3df856d
Show file tree
Hide file tree
Showing 117 changed files with 8,254 additions and 1,990 deletions.
8 changes: 8 additions & 0 deletions actions/import/storeTags.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { shortTitle } from '../../configs/general';
const log = require('../log/clog');

export default function storeTags(context, payload, done) {
log.info(context);
context.dispatch('STORE_TAGS', payload);
done();
}
31 changes: 21 additions & 10 deletions actions/loadDeck.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ import log from './log/clog';
export default function loadDeck(context, payload, done) {
log.info(context); // do not remove such log messages. If you don't want to see them, change log level in config
context.dispatch('UPDATE_MODE', {mode: 'loading'});

// resets the deck view store
// TODO (what other store to reset ???)
context.dispatch('LOAD_DECK_PAGE_START');

if (!(AllowedPattern.DECK_ID.test(payload.params.id))) {
context.executeAction(deckIdTypeError, payload, done);
return;
Expand Down Expand Up @@ -102,16 +107,6 @@ export default function loadDeck(context, payload, done) {

payload.params.jwt = context.getStore(UserProfileStore).getState().jwt;

let permissionsPromise;
//if user is not logged in, only allow view mode and reset permissions, else load this user's permissions on the selected root deck
if (!payload.params.jwt){
if (!payload.query.interestedUser) //NOTE should not be changed in the special case: Link from email for deck owner to add new editor
payloadCustom.params.mode = 'view';
permissionsPromise = context.executeAction(resetPermissions, payloadCustom);
} else {
permissionsPromise = context.executeAction(loadPermissions, payloadCustom);
}

context.dispatch('UPDATE_DECK_PAGE_CONTENT', payloadCustom);
pageTitle = pageTitle + ' | ' + payloadCustom.params.stype + ' | ' + payloadCustom.params.sid + ' | ' + payloadCustom.params.mode;
if((currentState.selector.id === payloadCustom.params.id) && (currentState.selector.spath === payloadCustom.params.spath)){
Expand All @@ -131,6 +126,12 @@ export default function loadDeck(context, payload, done) {

// load translation stuff
context.executeAction(loadNodeTranslations, payload.params, (err, results) => {
if (err) {
// log the error and return!!!
log.error(context, {filepath: __filename, message: err.message});
return done(err);
}

//load all required actions in parallel
async.parallel([
(callback) => {
Expand All @@ -141,6 +142,16 @@ export default function loadDeck(context, payload, done) {
}, callback);
},
(callback) => {
let permissionsPromise;
//if user is not logged in, only allow view mode and reset permissions, else load this user's permissions on the selected root deck
if (!payload.params.jwt){
if (!payload.query.interestedUser) //NOTE should not be changed in the special case: Link from email for deck owner to add new editor
payloadCustom.params.mode = 'view';
permissionsPromise = context.executeAction(resetPermissions, payloadCustom);
} else {
permissionsPromise = context.executeAction(loadPermissions, payloadCustom);
}

permissionsPromise.then(() => {
let permissions = context.getStore(PermissionsStore).getState().permissions;
//special handling for special case: Link from email for deck owner to add new editor
Expand Down
9 changes: 6 additions & 3 deletions actions/loadDeckView.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@ export default function loadDeckView(context, payload, done) {

context.service.read('deck.content', payload, {timeout: 20 * 1000}, (err, res) => {
if (err) {
console.log(err);
log.error(context, {filepath: __filename});
log.error(context, {filepath: __filename, message: err.message });
context.executeAction(serviceUnavailable, payload, done);
return;
} else {
// console.log('loadDeckView params', payload.params, '\n', payload);
res.isRootDeck = payload.params.spath === '';
context.dispatch('LOAD_DECK_CONTENT_SUCCESS', res);
context.dispatch('LOAD_DECK_METADATA_SUCCESS', {thumbnailID: res.slidesData.children[0].id});
context.dispatch('LOAD_DECK_METADATA_SUCCESS', {
thumbnailID: res.slidesData.children[0].id,
thumbnailTheme: res.slidesData.theme,
description: res.deckData.description
});
}
let pageTitle = shortTitle + ' | ' + res.slidesData.title;
let cleanTitle = pageTitle.replace(/<\/?[^>]+(>|$)/g, '').replace(/&#39;/g, '\'').replace(/&#34;/g, '\"');
Expand Down
2 changes: 1 addition & 1 deletion actions/loadLegacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function loadLegacy(context, payload, done) {
context.executeAction(serviceUnavailable, payload, done);
//context.dispatch('LOAD_FEATURED_FAILURE', err);
} else {
done({'statusCode':'301','redirectURL': '/deck/' + res.new_id});
done({'statusCode': 301,'redirectURL': '/deck/' + res.new_id});
}
});
}
7 changes: 7 additions & 0 deletions actions/slide/annotateClick.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {shortTitle} from '../../configs/general';
import serviceUnavailable from '../error/serviceUnavailable';
const log = require('../log/clog');

export default function annotateClick(context, payload, done) {
context.dispatch('ANNOTATE_CLICK', {});
}
5 changes: 3 additions & 2 deletions actions/slide/changeSlideTransition.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import {shortTitle} from '../../configs/general';
import serviceUnavailable from '../error/serviceUnavailable';
const log = require('../log/clog');

export default function changeSlideSize(context, payload, done) {
export default function changeSlideTransition(context, payload, done) {
//catched by slideEditStore
context.dispatch('CHANGE_SLIDE_TRANSITION', {
slideTransition: payload.slideTransition
slideTransition: payload.slideTransition //,
// transitionType: payload.transitionType //
});
}
4 changes: 4 additions & 0 deletions actions/slide/loadSlideView.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export default function loadSlideView(context, payload, done) {
} else {
context.dispatch('LOAD_SLIDE_CONTENT_SUCCESS', res);
context.dispatch('LOAD_SLIDE_EDIT_SUCCESS', res);
context.dispatch('LOAD_DECK_METADATA_SUCCESS', {
thumbnailID: res.selector.sid,
thumbnailTheme: context.getStore(DeckTreeStore).theme
});
}
let deckTitle = context.getStore(DeckTreeStore).getState().deckTree.get('title');
let pageTitle = shortTitle + ' | ' + deckTitle + ' | ' + res.slide.title;
Expand Down
26 changes: 26 additions & 0 deletions actions/slide/saveSlideWithDeckTransition.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const log = require('../log/clog');
import saveSlide from './saveSlide';

export default function saveSlideWithDeckTransition(context, payload, done) {
let args = {
id: payload.currentSlidePayload.deckID
};
context.service.read('deck.slides', args, {timeout: 20 * 1000}, (err, res) => {
res.slides.map((slide) => {
if(slide.id === payload.currentSlidePayload.id) {
context.executeAction(saveSlide, payload.currentSlidePayload);
} else {
let otherPayload = {
id: slide.id,

transition: payload.currentSlidePayload.transition
};
// Extract necessary information from each slide, add transition and update it in deck-service.

}
});
});



}
4 changes: 2 additions & 2 deletions actions/translation/loadNodeTranslations.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export default function loadNodeTranslations(context, payload, done) {

context.service.read('decktree.nodetranslation', payload, {timeout: 20 * 1000}, (err, res) => {
if (err) {
log.error(context, {filepath: __filename});
context.executeAction(serviceUnavailable, payload, done);
log.error(context, {filepath: __filename, message: err.message});
done(err);
} else {
context.dispatch('LOAD_TRANSLATIONS_SUCCESS', res);
done();
Expand Down
7 changes: 5 additions & 2 deletions assets/ckeditor_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ CKEDITOR.editorConfig = function( config ) {
config.enterMode = CKEDITOR.ENTER_DIV;
config.resize_enabled = false;
config.disableObjectResizing = true;

CKEDITOR.plugins.addExternal( 'semanticannotations', '/assets/semanticannotations/' );

config.toolbar = [

Expand Down Expand Up @@ -67,7 +69,8 @@ CKEDITOR.editorConfig = function( config ) {
//{ name: 'document', items: [ 'Sourcedialog'] },
//{ name: 'document', items: [ 'CodeSnippet'] },
{ name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'] },
{ name: 'tools', items: ['Undo', 'Redo'] }
{ name: 'tools', items: ['Undo', 'Redo'] },
{ name: 'tools', items: ['createManualAnnotation', 'deleteAnnotation'] },

/*{ name: 'styles', items: [ 'FontSize' ] },
{ name: 'basicstyles', items: ['CopyFormatting'] },
Expand Down Expand Up @@ -223,7 +226,7 @@ CKEDITOR.editorConfig = function( config ) {
//config.filebrowserUploadUrl = 'http://importservice.experimental.slidewiki.org/importImage/2';
//config.codeSnippet_theme = 'github';
//config.codeSnippet_theme = 'pojoaque';
config.extraPlugins = 'uploadimage,uploadwidget,codesnippet,youtube,mathjax,symbol,copyformatting';
config.extraPlugins = 'uploadimage,uploadwidget,codesnippet,youtube,mathjax,symbol,copyformatting,semanticannotations';
//config.codeSnippet_theme = 'pojoaque';
//CKEDITOR.config.codeSnippet_theme = 'monokai_sublime';
//config.extraPlugins = 'uploadimage';
Expand Down
49 changes: 49 additions & 0 deletions assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,55 @@ div#embedModal .fields>label {
padding: 5px 15px 10px 15px;
}

/*! @gov.au/core v3.0.3 *//*! @gov.au/skip-link v2.0.10 */
@media print{
.au-skip-link__link{
background:#fff !important
}
}

.au-skip-link{
font-size:20px;
font-size:1.25rem;
line-height:1;
font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;
color:#313131
}
.au-skip-link__link{
position:absolute;
width:1px;
height:1px;
padding:0;
margin:-1px;
overflow:hidden;
clip:rect(0, 0, 0, 0);
border:0}
.au-skip-link__link:active,.au-skip-link__link:focus{
outline:3px solid #313131;
outline-offset:2px;
top:16px;
top:1rem;
left:16px;
left:1rem;
padding:24px;
padding:1.5rem;
clip:auto;
height:auto;
margin:0;
overflow:visible;
position:absolute;
width:auto;
color:#1E78BB;
background-color:#fff;
text-decoration:underline;
-webkit-text-decoration-skip:ink;
text-decoration-skip:ink;
z-index:600
}
.au-body .au-skip-link__link:hover,.au-skip-link__link:hover{
text-decoration:none;
color:#fff
}
/* Questions Display */
.questionsList{
list-style-type: lower-alpha;
Expand Down
6 changes: 5 additions & 1 deletion assets/css/home-custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,10 @@ textarea:focus{
}

/* react-accessible-accordion styles */
.hidden {
.display-none {
display: none;
}

.accordion__title:hover {
cursor: pointer;
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,11 @@ a.cke_combo_button
.cke_combo_off a.cke_combo_button:active
{
background: #e5e5e5;
border: 1px solid #bcbcbc;
/*border: 1px solid #bcbcbc;*/
/* Move combo so borders cover separators. Adjust padding to borders. */
padding: 0 0 0 1px;
padding: 1px 1px 1px 2px;
box-shadow: 0 0 0 2px #0C273E;
z-index: 1;
margin-left: -1px;
}

Expand Down
16 changes: 12 additions & 4 deletions assets/custom-ckeditor-skin/moono-lisa-custom-source/toolbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ a.cke_button_on
border: 1px #bcbcbc solid;
padding: 6px 9px;
}
a.cke_button_on:focus {
box-shadow: 0 0 0 2px #0C273E;
z-index: 1;
}


/* Button states. */
Expand All @@ -159,9 +163,11 @@ a.cke_button_off:focus,
a.cke_button_off:active
{
background: #e5e5e5;
border: 1px #bcbcbc solid;
/*border: 2px #1E78BB solid;*/
/* Compensate the border change */
padding: 6px 9px;
/*padding: 6px 9px;*/
box-shadow: 0 0 0 2px #0C273E;
z-index: 1;
}

.cke_hc a.cke_button_on,
Expand All @@ -187,8 +193,10 @@ a.cke_button_disabled:active
}

a.cke_button_disabled:focus {
border: 1px #bcbcbc solid;
padding: 3px 5px;
/*border: 1px #bcbcbc solid;
padding: 6px 9px;*/
box-shadow: 0 0 0 2px #0C273E;
z-index: 1;
}

.cke_hc a.cke_button_disabled:hover,
Expand Down
40 changes: 21 additions & 19 deletions assets/custom-semantic-ui/dist/components/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -2881,9 +2881,9 @@
.ui.inverted.teal.buttons .button,
.ui.inverted.teal.button {
background-color: transparent;
-webkit-box-shadow: 0px 0px 0px 2px #8AC2B8 inset !important;
box-shadow: 0px 0px 0px 2px #8AC2B8 inset !important;
color: #8AC2B8;
-webkit-box-shadow: 0px 0px 0px 2px #008572 inset !important;
box-shadow: 0px 0px 0px 2px #008572 inset !important;
color: #008572;
}
.ui.inverted.teal.buttons .button:hover,
.ui.inverted.teal.button:hover,
Expand All @@ -2899,19 +2899,21 @@
}
.ui.inverted.teal.buttons .button:hover,
.ui.inverted.teal.button:hover {
background-color: #76bcb0;
background-color: #006c5c;
color: #fff;
}
.ui.inverted.teal.buttons .button:focus,
.ui.inverted.teal.button:focus {
background-color: #68bbac;
background-color: #005c4f;
color: #fff;
}
.ui.inverted.teal.buttons .active.button,
.ui.inverted.teal.active.button {
background-color: #74beb1;
background-color: #006c5c;
}
.ui.inverted.teal.buttons .button:active,
.ui.inverted.teal.button:active {
background-color: #68b1a4;
background-color: #005246;
}

/* Inverted Basic */
Expand All @@ -2926,30 +2928,30 @@
.ui.inverted.teal.basic.buttons .button:hover,
.ui.inverted.teal.buttons .basic.button:hover,
.ui.inverted.teal.basic.button:hover {
-webkit-box-shadow: 0px 0px 0px 2px #76bcb0 inset !important;
box-shadow: 0px 0px 0px 2px #76bcb0 inset !important;
color: #8AC2B8 !important;
-webkit-box-shadow: 0px 0px 0px 2px #006c5c inset !important;
box-shadow: 0px 0px 0px 2px #006c5c inset !important;
color: #008572 !important;
}
.ui.inverted.teal.basic.buttons .button:focus,
.ui.inverted.teal.basic.buttons .button:focus,
.ui.inverted.teal.basic.button:focus {
-webkit-box-shadow: 0px 0px 0px 2px #68bbac inset !important;
box-shadow: 0px 0px 0px 2px #68bbac inset !important;
color: #8AC2B8 !important;
-webkit-box-shadow: 0px 0px 0px 2px #005c4f inset !important;
box-shadow: 0px 0px 0px 2px #005c4f inset !important;
color: #008572 !important;
}
.ui.inverted.teal.basic.buttons .active.button,
.ui.inverted.teal.buttons .basic.active.button,
.ui.inverted.teal.basic.active.button {
-webkit-box-shadow: 0px 0px 0px 2px #74beb1 inset !important;
box-shadow: 0px 0px 0px 2px #74beb1 inset !important;
color: #8AC2B8 !important;
-webkit-box-shadow: 0px 0px 0px 2px #006c5c inset !important;
box-shadow: 0px 0px 0px 2px #006c5c inset !important;
color: #008572 !important;
}
.ui.inverted.teal.basic.buttons .button:active,
.ui.inverted.teal.buttons .basic.button:active,
.ui.inverted.teal.basic.button:active {
-webkit-box-shadow: 0px 0px 0px 2px #68b1a4 inset !important;
box-shadow: 0px 0px 0px 2px #68b1a4 inset !important;
color: #8AC2B8 !important;
-webkit-box-shadow: 0px 0px 0px 2px #005246 inset !important;
box-shadow: 0px 0px 0px 2px #005246 inset !important;
color: #008572 !important;
}

/*--- Olive ---*/
Expand Down
Loading

0 comments on commit 3df856d

Please sign in to comment.