diff --git a/actions/activityfeed/loadActivities.js b/actions/activityfeed/loadActivities.js index 11877d60f..c58bf0dc1 100644 --- a/actions/activityfeed/loadActivities.js +++ b/actions/activityfeed/loadActivities.js @@ -30,6 +30,16 @@ export default function loadActivities(context, payload, done) { // context.dispatch('UPDATE_PAGE_TITLE', { // pageTitle: pageTitle // }); - done(); + if (payload.params.stype !== 'deck') + return done(); + context.service.read('presentation.live', {id: payload.params.sid}, {timeout: 20 * 1000}, (err, res) => { + if (err) { + log.error(context, {filepath: __filename}); + context.executeAction(serviceUnavailable, payload, done); + } else { + context.dispatch('LOAD_PRESENTATIONS_SUCCESS', res); + } + done(); + }); }); } diff --git a/actions/decktree/moveTreeNode.js b/actions/decktree/moveTreeNode.js index 5adafb273..297ea8c88 100644 --- a/actions/decktree/moveTreeNode.js +++ b/actions/decktree/moveTreeNode.js @@ -1,4 +1,5 @@ import UserProfileStore from '../../stores/UserProfileStore'; +import addActivity from '../activityfeed/addActivity'; const log = require('../log/clog'); export default function moveTreeNode(context, payload, done) { @@ -42,6 +43,15 @@ export default function moveTreeNode(context, payload, done) { context.dispatch('MOVE_TREE_NODE_FAILURE', err); } else { context.dispatch('MOVE_TREE_NODE_SUCCESS', payload); + + let activity = { + activity_type: 'move', + user_id: String(userid), + content_name: res.title, + content_id: String(res.id), + content_kind: res.type + }; + context.executeAction(addActivity, {activity: activity}); } done(null, res); }); diff --git a/actions/slide/loadSlideView.js b/actions/slide/loadSlideView.js index 758557d17..41ccdb1d6 100644 --- a/actions/slide/loadSlideView.js +++ b/actions/slide/loadSlideView.js @@ -10,6 +10,10 @@ export default function loadSlideView(context, payload, done) { context.executeAction(slideIdTypeError, payload, done); return; } + console.log('send to load'); + context.dispatch('LOAD_SLIDE_CONTENT_LOAD', {loadingIndicator: 'true'}); + //context.dispatch('LOAD_SLIDE_CONTENT_LOAD'); + //console.log('get content'); context.service.read('slide.content', payload, {timeout: 20 * 1000}, (err, res) => { if (err) { diff --git a/assets/css/custom.css b/assets/css/custom.css index 79b3b2f77..e0e02c6f3 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -40,7 +40,7 @@ font-size: 20px; position: absolute; right: 0; - width: 200px; + width: 150px; height: 100vh; } @@ -50,7 +50,7 @@ .top-diff .reveal { position: relative; - width: calc(100% - 200px); + width: calc(100% - 150px); } .top-diff .reveal .slides { @@ -84,6 +84,8 @@ .top-diff .inlineContent { padding: 2%; + display: flex; + flex-direction: column; } @media screen and (max-width: 900px) { @@ -100,30 +102,41 @@ .top-diff .helpers { width: 100vw; position: relative; - height: 180px; - background-color: rgba(255,153,0,0.2); - } - - .top-diff .helpers .inlineContent { - display: flex; - flex-direction: column; - } - - .top-diff .helpers .checkbox { - flex: 1; - } - - .top-diff .helpers .diff-header { - display: none + height: 240px; } } /* HTML DOM Node related */ -.diff-view .added, .modified, .deleted { - padding: 5px; +.diff-view .added, +.diff-view .modified, +.diff-view .deleted { + padding: 5px 5px 5px 5px; margin: 0px -10px; display: inline-block; + position: relative; +} + +.diff-view .added::before, +.diff-view .modified::before, +.diff-view .deleted::before { + color: rgba(0,0,0,0.8); + position: absolute; + font-size: 20px; + right: 5px; + top: -3px; + font-weight: 700; +} + +.diff-view ul, .diff-view ol { + display: flex; + flex-direction: column; +} + +.diff-view ul .added, +.diff-view ul .modified, +.diff-view ul .deleted { + display: inline-table !important; } .diff-view p { @@ -131,29 +144,34 @@ } .diff-view .added { - border: 5px solid #93ca3b; - background-color: rgba(147,202,59,0.2); + border: 2px solid #2196F3; + background-color: rgba(0, 188, 212,0.2); } +.diff-view .added::before { content: "+" } + .diff-view .modified { - border: 5px solid #FFCC00; - background-color: rgba(255,204,0,0.1); + border: 2px solid #FFCC00; + background-color: rgba(255,204,0,0.2); } +.diff-view .modified::before { content: "+/-" } + .diff-view .deleted { - border: 5px solid #ff0030; - background-color: rgba(255,0,48,0.1); + border: 2px solid #ff0030; + background-color: rgba(255,0,48,0.2); } +.diff-view .deleted::before { content: "x" } .diff-view.inverse .added { - border: 5px solid #2ecc71; + border: 2px solid #2ecc71; background-color: rgba(46,204,113,0.2); } .diff-view.inverse .modified { - border: 5px solid #FF9800; - background-color: rgba(255,152,0,0.1); + border: 2px solid #FF9800; + background-color: rgba(255,152,0,0.2); } .diff-view.inverse .deleted { - border: 5px solid #9C27B0; - background-color: rgba(156,39,176,0.1); + border: 2px solid #9C27B0; + background-color: rgba(156,39,176,0.2); } /* Text related */ @@ -171,12 +189,20 @@ line-height: 32px; } -.diff-view.hide-add .added, .diff-view.hide-mod .modified, .diff-view.hide-del .deleted { - border: 5px solid transparent; +.diff-view.hide-add .added, +.diff-view.hide-mod .modified, +.diff-view.hide-del .deleted { + border: 2px solid transparent; background-color: transparent; } +.diff-view.hide-add .added::before, +.diff-view.hide-mod .modified::before, +.diff-view.hide-del .deleted::before { + display: none; +} -.diff-view.hide-text .ins, .diff-view.hide-text .del{ +.diff-view.hide-text .ins, +.diff-view.hide-text .del{ color: #333; background-color: transparent; text-decoration: none; diff --git a/assets/images/templates/1.png b/assets/images/templates/1.png new file mode 100644 index 000000000..85de9548b Binary files /dev/null and b/assets/images/templates/1.png differ diff --git a/assets/images/templates/11.png b/assets/images/templates/11.png new file mode 100644 index 000000000..530ad8f90 Binary files /dev/null and b/assets/images/templates/11.png differ diff --git a/assets/images/templates/11img.png b/assets/images/templates/11img.png new file mode 100644 index 000000000..0b9646a10 Binary files /dev/null and b/assets/images/templates/11img.png differ diff --git a/assets/images/templates/12.png b/assets/images/templates/12.png new file mode 100644 index 000000000..e464d41c0 Binary files /dev/null and b/assets/images/templates/12.png differ diff --git a/assets/images/templates/2.png b/assets/images/templates/2.png new file mode 100644 index 000000000..1f6d06be1 Binary files /dev/null and b/assets/images/templates/2.png differ diff --git a/assets/images/templates/21.png b/assets/images/templates/21.png new file mode 100644 index 000000000..768543a1d Binary files /dev/null and b/assets/images/templates/21.png differ diff --git a/assets/images/templates/22.png b/assets/images/templates/22.png new file mode 100644 index 000000000..c5706908c Binary files /dev/null and b/assets/images/templates/22.png differ diff --git a/assets/images/templates/3.png b/assets/images/templates/3.png new file mode 100644 index 000000000..883e4d8d9 Binary files /dev/null and b/assets/images/templates/3.png differ diff --git a/assets/images/templates/EKDDA.png b/assets/images/templates/EKDDA.png new file mode 100644 index 000000000..58c22af62 Binary files /dev/null and b/assets/images/templates/EKDDA.png differ diff --git a/assets/images/templates/EKDDAeng.png b/assets/images/templates/EKDDAeng.png new file mode 100644 index 000000000..038c7fc17 Binary files /dev/null and b/assets/images/templates/EKDDAeng.png differ diff --git a/assets/images/templates/EKDDAengNofooter.png b/assets/images/templates/EKDDAengNofooter.png new file mode 100644 index 000000000..a61014007 Binary files /dev/null and b/assets/images/templates/EKDDAengNofooter.png differ diff --git a/assets/images/templates/oegtitleslide.png b/assets/images/templates/oegtitleslide.png new file mode 100644 index 000000000..3d136e063 Binary files /dev/null and b/assets/images/templates/oegtitleslide.png differ diff --git a/assets/images/templates/outitleslide.png b/assets/images/templates/outitleslide.png new file mode 100644 index 000000000..c695c3f30 Binary files /dev/null and b/assets/images/templates/outitleslide.png differ diff --git a/assets/images/templates/slidewikislide.png b/assets/images/templates/slidewikislide.png new file mode 100644 index 000000000..2eb74f26a Binary files /dev/null and b/assets/images/templates/slidewikislide.png differ diff --git a/components/AddDeck/AddDeck.js b/components/AddDeck/AddDeck.js index e26fa9e60..06cd61fd7 100644 --- a/components/AddDeck/AddDeck.js +++ b/components/AddDeck/AddDeck.js @@ -167,10 +167,10 @@ class AddDeck extends React.Component { let noOfSlides = String(this.props.ImportStore.noOfSlides); let totalNoOfSlides = String(this.props.ImportStore.totalNoOfSlides); let progressLabel = (totalNoOfSlides === '0' && this.props.ImportStore.uploadProgress < 65) ? 'Uploading file' : - (this.props.ImportStore.uploadProgress === 65) ? 'Converting file' : - (this.props.ImportStore.uploadProgress !== 100) ? 'Importing slide ' + noOfSlides + ' of ' + totalNoOfSlides : - (noOfSlides === totalNoOfSlides) ? 'Slides uploaded!' : - 'Imported ' + noOfSlides + ' of ' + totalNoOfSlides + ' slides';//this should not happen, but user should know in case it does + (this.props.ImportStore.uploadProgress === 65) ? 'Converting file' : + (this.props.ImportStore.uploadProgress !== 100) ? 'Importing slide ' + noOfSlides + ' of ' + totalNoOfSlides : + (noOfSlides === totalNoOfSlides) ? 'Slides uploaded!' : + 'Imported ' + noOfSlides + ' of ' + totalNoOfSlides + ' slides';//this should not happen, but user should know in case it does $('#progresslabel_addDeck_upload').text(parseInt(this.props.ImportStore.uploadProgress) + '% - ' + progressLabel); if (this.props.ImportStore.uploadProgress === 100) { @@ -194,13 +194,13 @@ class AddDeck extends React.Component { confirmButtonClass: 'positive ui button', buttonsStyling: false }) - .then((dismiss) => { - this.handleImportRedirect(); - return true; - }) - .catch(() => { - return true; - }); + .then((dismiss) => { + this.handleImportRedirect(); + return true; + }) + .catch(() => { + return true; + }); } else { swal({ title: 'Error', @@ -210,12 +210,12 @@ class AddDeck extends React.Component { confirmButtonClass: 'negative ui button', buttonsStyling: false }) - .then(() => { - return true; - }) - .catch(() => { - return true; - }); + .then(() => { + return true; + }) + .catch(() => { + return true; + }); } } } @@ -321,7 +321,7 @@ class AddDeck extends React.Component { if (filename.length > 40) filename = filename.substr(0, 40) + ' ...'; - /* let themeOptions = @@ -336,21 +336,21 @@ class AddDeck extends React.Component { ; */ let themeOptions = ; + + + + + + + + + + + + + + + ; // let licenseOptions = - -
- - +
+
+

Add a deck to SlideWiki

+
+
+
+
+
+ + +
+
+ + +
-
-
- - -
-
-
- - {themeOptions} -
+
+ + +
+
+
+ + {themeOptions} +
-
+
-

You can upload existing slides to your new deck. Currently only PowerPoint pptx and OpenOffice odp files are supported.

-
-
-
-
-
- Select file -
- -
-
- {filename ? '"Selected for upload: '+filename+'"' : ''} -
-
-
-
-
-
-
-
-
- - -
-
-
-
- - -
-
- -
-
- Create deck +

You can upload existing slides to your new deck. Currently only PowerPoint pptx and OpenOffice odp files are supported.

+
+
+
+
+
+ Select file +
+ +
+
+ {filename ? '"Selected for upload: '+filename+'"' : ''} +
+
+
+
+
+
+
+
+
+ + +
+
+
+
+ + +
+
+ +
+
+ Create deck +
-
- -
+ +
); } diff --git a/components/Deck/ActivityFeedPanel/ActivityItem.js b/components/Deck/ActivityFeedPanel/ActivityItem.js index 0f19de8e9..7242c40f9 100644 --- a/components/Deck/ActivityFeedPanel/ActivityItem.js +++ b/components/Deck/ActivityFeedPanel/ActivityItem.js @@ -112,6 +112,18 @@ class ActivityItem extends React.Component { ); break; + case 'move': + IconNode = (); + SummaryNode = ( +
+ + {node.author ? node.author.username : 'unknown'} + {'moved '} {nodeRef} +
+ {DateDiv} +
+ ); + break; case 'comment': IconNode = (); SummaryNode = ( diff --git a/components/Deck/ContentModulesPanel/ContentQuestionsPanel/ContentQuestionAnswersList.js b/components/Deck/ContentModulesPanel/ContentQuestionsPanel/ContentQuestionAnswersList.js index ac9ff7b7d..9d576f7c0 100644 --- a/components/Deck/ContentModulesPanel/ContentQuestionsPanel/ContentQuestionAnswersList.js +++ b/components/Deck/ContentModulesPanel/ContentQuestionsPanel/ContentQuestionAnswersList.js @@ -51,40 +51,43 @@ class ContentQuestionAnswersList extends React.Component { let correctAnswers = this.props.items.filter((item) => item.correct).map((node, index) => { return (
- - {node.answer} - -
-

- {node.explanation} -

-
+ + {node.answer} +
); }); + let explanation = ( +
+

+ {this.props.explanation} +

+
+ ); let answers = ( -
+
-
-
- {list} -
-
+
+
+ {list} +
+
- - {/*showEditButton()*/} -
-
- {this.state.showCorrect ? correctAnswers : null} + + {/*showEditButton()*/} +
+
+ {this.state.showCorrect ? correctAnswers : null} + {this.state.showCorrect ? explanation : null} +
-
-
+
); return ( @@ -92,7 +95,7 @@ class ContentQuestionAnswersList extends React.Component {
{answers}
-
+ ); } } diff --git a/components/Deck/ContentModulesPanel/ContentQuestionsPanel/ContentQuestionsItem.js b/components/Deck/ContentModulesPanel/ContentQuestionsPanel/ContentQuestionsItem.js index f6f478a80..4faf55245 100644 --- a/components/Deck/ContentModulesPanel/ContentQuestionsPanel/ContentQuestionsItem.js +++ b/components/Deck/ContentModulesPanel/ContentQuestionsPanel/ContentQuestionsItem.js @@ -16,7 +16,7 @@ class ContentQuestionsItem extends React.Component { render() { const question = this.props.question; const answers = ( - + ); // const editIcon = ( diff --git a/components/Deck/ContentPanel/ContentActions/ContentActionsFooter.js b/components/Deck/ContentPanel/ContentActions/ContentActionsFooter.js index 3d7698bb6..cb5f9e313 100644 --- a/components/Deck/ContentPanel/ContentActions/ContentActionsFooter.js +++ b/components/Deck/ContentPanel/ContentActions/ContentActionsFooter.js @@ -57,6 +57,20 @@ class ContentActionsFooter extends React.Component { window.open(this.getPresentationHref()); } } + handlePresentationRoomClick(e){ + if(process.env.BROWSER){ + e.preventDefault(); + swal({ + title: 'Please enter a room name', + input: 'text', + showCancelButton: true, + confirmButtonText: 'Next', + allowOutsideClick: false + }).then((roomName) => { + window.open('/presentationbroadcast?room=' + roomName + '&presentation=' + this.getPresentationHref().replace('#', '%23')); + }).catch(); + } + } /* getPrintHref(){ return '/PresentationPrint/' + this.props.ContentStore.selector.id + '/?print-pdf'; @@ -161,6 +175,9 @@ class ContentActionsFooter extends React.Component { +