From f1602f52a8ef483d74afdfb82cc95cf0ffd29d7f Mon Sep 17 00:00:00 2001 From: kadevgraaf Date: Wed, 14 Jun 2017 17:40:50 +0100 Subject: [PATCH 001/117] Merged fix for 503 error after editing (Add extra checks for destroying CKeditor) --- .../SlideEditPanel/SlideContentEditor.js | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/components/Deck/ContentPanel/SlideModes/SlideEditPanel/SlideContentEditor.js b/components/Deck/ContentPanel/SlideModes/SlideEditPanel/SlideContentEditor.js index 775561c77..0e22897f3 100644 --- a/components/Deck/ContentPanel/SlideModes/SlideEditPanel/SlideContentEditor.js +++ b/components/Deck/ContentPanel/SlideModes/SlideEditPanel/SlideContentEditor.js @@ -172,7 +172,10 @@ class SlideContentEditor extends React.Component { { if (this.CKeditorMode === 'advanced toolbar'){ console.log('current CKeditor toolbar mode is basic - set to advanced'); - CKEDITOR.instances.inlineContent.destroy(); + if (CKEDITOR.instances.inlineContent != null) { + //console.log('destroy CKEDITOR instance'); + CKEDITOR.instances.inlineContent.destroy(); + } CKEDITOR.inline('inlineContent', { customConfig: '/assets/ckeditor_config.js', filebrowserUploadUrl: Microservices.import.uri + '/importImage/' + this.props.UserProfileStore.userid, @@ -182,7 +185,10 @@ class SlideContentEditor extends React.Component { } else { console.log('current CKeditor toolbar mode is advanced - set to basic'); - CKEDITOR.instances.inlineContent.destroy(); + if (CKEDITOR.instances.inlineContent != null) { + //console.log('destroy CKEDITOR instance'); + CKEDITOR.instances.inlineContent.destroy(); + } CKEDITOR.inline('inlineContent', { customConfig: '/assets/ckeditor_config_basic.js', filebrowserUploadUrl: Microservices.import.uri + '/importImage/' + this.props.UserProfileStore.userid, @@ -192,14 +198,20 @@ class SlideContentEditor extends React.Component { } else { if (this.CKeditorMode === 'advanced toolbar'){ console.log('current CKeditor toolbar mode is basic - refreshed'); - CKEDITOR.instances.inlineContent.destroy(); + if (CKEDITOR.instances.inlineContent != null) { + //console.log('destroy CKEDITOR instance'); + CKEDITOR.instances.inlineContent.destroy(); + } CKEDITOR.inline('inlineContent', { customConfig: '/assets/ckeditor_config_basic.js', filebrowserUploadUrl: Microservices.import.uri + '/importImage/' + this.props.UserProfileStore.userid, uploadUrl: Microservices.import.uri + '/importImagePaste/' + this.props.UserProfileStore.userid}); //leave all buttons } else { console.log('current CKeditor toolbar mode is advanced - refreshed'); - CKEDITOR.instances.inlineContent.destroy(); + if (CKEDITOR.instances.inlineContent != null) { + //console.log('destroy CKEDITOR instance'); + CKEDITOR.instances.inlineContent.destroy(); + } CKEDITOR.inline('inlineContent', { customConfig: '/assets/ckeditor_config.js', filebrowserUploadUrl: Microservices.import.uri + '/importImage/' + this.props.UserProfileStore.userid, @@ -1164,8 +1176,14 @@ class SlideContentEditor extends React.Component { componentWillUnmount() { // Remove the warning window. window.onbeforeunload = () => {}; - CKEDITOR.instances.inlineContent.destroy(); - CKEDITOR.instances.inlineSpeakerNotes.destroy(); + if (CKEDITOR.instances.inlineContent != null) { + //console.log('destroy CKEDITOR instance'); + CKEDITOR.instances.inlineContent.destroy(); + } + if (CKEDITOR.instances.inlineSpeakerNotes != null) { + //console.log('destroy CKEDITOR instance'); + CKEDITOR.instances.inlineSpeakerNotes.destroy(); + } } render() { //TODO: offer option to switch between inline-editor (alloy) and permanent/full editor (CKeditor) From 8ff0b1ae77fb7c59a776358bbbec2ab29d0d6218 Mon Sep 17 00:00:00 2001 From: Serafeim Chatzopoulos Date: Thu, 15 Jun 2017 13:59:58 +0100 Subject: [PATCH 002/117] deck family page created, it shows decks with a specific tag --- actions/deckfamily/loadDeckFamily.js | 27 ++++++ actions/deckfamily/loadMoreDeckFamily.js | 27 ++++++ app.js | 6 +- components/Deck/DeckFamily/DeckFamily.js | 87 ++++++++++++++++++ configs/routes.js | 12 ++- services/searchresults.js | 1 + stores/DeckFamilyStore.js | 108 +++++++++++++++++++++++ 7 files changed, 265 insertions(+), 3 deletions(-) create mode 100644 actions/deckfamily/loadDeckFamily.js create mode 100644 actions/deckfamily/loadMoreDeckFamily.js create mode 100644 components/Deck/DeckFamily/DeckFamily.js create mode 100644 stores/DeckFamilyStore.js diff --git a/actions/deckfamily/loadDeckFamily.js b/actions/deckfamily/loadDeckFamily.js new file mode 100644 index 000000000..c002f965e --- /dev/null +++ b/actions/deckfamily/loadDeckFamily.js @@ -0,0 +1,27 @@ +import {shortTitle} from '../../configs/general'; +const log = require('../log/clog'); +import serviceUnavailable from '../error/serviceUnavailable'; + +export default function loadDeckFamily(context, payload, done) { + log.info(context); + + // form appropriate search query params + payload.params.queryparams = `keywords=*:*&kind=deck&tag=${payload.params.tag}&sort=lastUpdate`; + + // fetch results from search-service + context.service.read('searchresults.list', payload, {timeout: 20 * 1000}, (err, res) => { + if (err) { + log.error(context, {filepath: __filename, err: err}); + context.executeAction(serviceUnavailable, payload, done); + } else { + context.dispatch('LOAD_DECKFAMILY_DECKS', { + tag: decodeURIComponent(payload.params.tag), + numFound: res.numFound, + decks: res.docs, + start: res.start + }); + } + + done(); + }); +} diff --git a/actions/deckfamily/loadMoreDeckFamily.js b/actions/deckfamily/loadMoreDeckFamily.js new file mode 100644 index 000000000..47b0c927a --- /dev/null +++ b/actions/deckfamily/loadMoreDeckFamily.js @@ -0,0 +1,27 @@ +import {shortTitle} from '../../configs/general'; +const log = require('../log/clog'); +import serviceUnavailable from '../error/serviceUnavailable'; + +export default function loadMoreDeckFamily(context, payload, done) { + log.info(context); + + // form appropriate search query params + payload.params.queryparams = `keywords=*:*&kind=deck&tag=${encodeURIComponent(payload.params.tag)}&sort=lastUpdate`; + + // fetch results from search-service + context.service.read('searchresults.list', payload, {timeout: 20 * 1000}, (err, res) => { + if (err) { + log.error(context, {filepath: __filename, err: err}); + context.executeAction(serviceUnavailable, payload, done); + } else { + context.dispatch('LOAD_MORE_DECKFAMILY_DECKS', { + tag: decodeURIComponent(payload.params.tag), + numFound: res.numFound, + decks: res.docs, + start: res.start + }); + } + + done(); + }); +} diff --git a/app.js b/app.js index a7b6c0c2e..3f96ea108 100644 --- a/app.js +++ b/app.js @@ -43,6 +43,7 @@ import ServiceErrorStore from './stores/ServiceErrorStore'; import PermissionsStore from './stores/PermissionsStore'; import ContentLikeStore from './stores/ContentLikeStore'; import SocialShareStore from './stores/SocialShareStore'; +import DeckFamilyStore from './stores/DeckFamilyStore'; // create new fluxible instance & register all stores const app = new Fluxible({ @@ -85,10 +86,11 @@ const app = new Fluxible({ ContentActionsFooterStore, IntlStore, AttachSubdeckModalStore, - ServiceErrorStore, + ServiceErrorStore, PermissionsStore, ContentLikeStore, - SocialShareStore + SocialShareStore, + DeckFamilyStore ] }); diff --git a/components/Deck/DeckFamily/DeckFamily.js b/components/Deck/DeckFamily/DeckFamily.js new file mode 100644 index 000000000..4dfc1fe53 --- /dev/null +++ b/components/Deck/DeckFamily/DeckFamily.js @@ -0,0 +1,87 @@ +import React from 'react'; +import {NavLink} from 'fluxible-router'; +import {connectToStores} from 'fluxible-addons-react'; +import classNames from 'classnames'; +import DeckFamilyStore from '../../../stores/DeckFamilyStore'; +import PopularDecks from '../../User/UserProfile/PopularDecks'; +import loadMoreDeckFamily from '../../../actions/deckfamily/loadMoreDeckFamily'; + +class DeckFamily extends React.Component { + constructor(props){ + super(props); + this.sortBy = '2'; + } + componentDidMount() { + $(this.refs.sortDropdown).dropdown({onChange: this.dropdownSelect.bind(this)}); + } + + componentDidUpdate() {} + + dropdownSelect(value) { + this.sortBy = value; + this.forceUpdate(); + } + loadMore(){ + context.executeAction(loadMoreDeckFamily, { + params: { + tag: this.props.DeckFamilyStore.tag + }, + start: this.props.DeckFamilyStore.start + }); + } + render() { + + // define load more results div + let loadMoreDiv = ''; + + if(this.props.DeckFamilyStore.loadMore){ + let loadMoreContent = ; + if(this.props.DeckFamilyStore.loadMoreLoading){ + loadMoreContent =
Loading
; + } + loadMoreDiv =
+ {loadMoreContent} +
; + } + + return ( +
+
+
+ {(this.props.DeckFamilyStore.loading) ?
Loading
: ''} +
+

Deck Family ({this.props.DeckFamilyStore.tag})

+ +
+ +
Last updated
+
+
Last updated
+
Creation date
+
Title
+
+
+ +
+
+ +
+ {loadMoreDiv} +
+
+
+
+ ); + } +} + +DeckFamily.contextTypes = { + executeAction: React.PropTypes.func.isRequired +}; +DeckFamily = connectToStores(DeckFamily, [DeckFamilyStore], (context, props) => { + return { + DeckFamilyStore: context.getStore(DeckFamilyStore).getState() + }; +}); + +export default DeckFamily; diff --git a/configs/routes.js b/configs/routes.js index f7047bc98..b420d2aa6 100644 --- a/configs/routes.js +++ b/configs/routes.js @@ -29,7 +29,7 @@ import { chooseAction } from '../actions/user/userprofile/chooseAction'; import loadFeatured from '../actions/loadFeatured'; import loadRecent from '../actions/loadRecent'; import loadLegacy from '../actions/loadLegacy'; - +import loadDeckFamily from '../actions/deckfamily/loadDeckFamily'; import {navigateAction} from 'fluxible-router'; @@ -435,6 +435,16 @@ export default { done(); } }, + deckfamily: { + path: '/deckfamily/:tag', + method: 'get', + page: 'deckfamily', + title: 'SlideWiki -- Deck Family', + handler: require('../components/Deck/DeckFamily/DeckFamily'), + action: (context, payload, done) => { + context.executeAction(loadDeckFamily, payload, done); + } + }, /* This should be the last route in routes.js */ notfound: { path: '*', diff --git a/services/searchresults.js b/services/searchresults.js index d04b2684e..882fb23d3 100644 --- a/services/searchresults.js +++ b/services/searchresults.js @@ -61,6 +61,7 @@ function parseDeck(deck){ deck.kind = 'Deck'; deck.title = (deck.title && deck.title.length > 70) ? deck.title.substring(0,70)+'...' : deck.title; deck.description = (deck.description && deck.description.length > 85) ? deck.description.substring(0,85)+'...' : deck.description; + deck.updated = deck.lastUpdate; // this is used to sort deck family's decks deck.lastUpdate = customDate.format(deck.lastUpdate, 'Do MMMM YYYY'); deck.user = { id: deck.creator, diff --git a/stores/DeckFamilyStore.js b/stores/DeckFamilyStore.js new file mode 100644 index 000000000..6b2f21f3b --- /dev/null +++ b/stores/DeckFamilyStore.js @@ -0,0 +1,108 @@ +import {BaseStore} from 'fluxible/addons'; + +class DeckFamilyStore extends BaseStore { + + constructor(dispatcher) { + super(dispatcher); + + this.tag = ''; + this.decks = []; + this.numFound = 0; + + this.error = false; + this.loading = false; + + this.loadMoreLoading = false; + this.loadMore = false; + this.start = 0; + } + showLoading(payload){ + this.loading = true; + this.emitChange(); + } + showLoadMoreLoading(payload){ + this.loadMoreLoading = true; + this.emitChange(); + } + updateFamilyDecks(payload){ + this.tag = payload.tag; + this.decks = payload.decks.map( (deck) => { + return { + deckID: deck.db_id, + title: deck.title, + firstSlide: deck.firstSlide, + updated: deck.updated, + description: deck.description, + creationDate: deck.timestamp, + }; + }); + + this.numFound = payload.numFound; + this.error = payload.error; + this.loadMore = (this.numFound > this.decks.length); + this.start = payload.start; + + // hide loading + this.loading = false; + this.loadMoreLoading = false; + + this.emitChange(); + } + loadMoreFamilyDecks(payload){ + this.tag = payload.tag; + this.decks = this.decks.concat(payload.decks); // append more results + this.numFound += payload.decks.length; + + this.error = payload.error; + this.loadMore = (payload.numFound > this.decks.length); + this.start = payload.start; + + // hide loading + this.loading = false; + this.loadMoreLoading = false; + + this.emitChange(); + } + displayError(){ + this.loading = false; + this.loadMoreLoading = false; + this.error = true; + this.emitChange(); + } + getState() { + return { + tag: this.tag, + decks: this.decks, + numFound: this.numFound, + loading: this.loading, + error: this.error, + loadMore: this.loadMore, + loadMoreLoading: this.loadMoreLoading, + start: this.start + }; + } + dehydrate() { + return this.getState(); + } + rehydrate(state) { + this.tag = state.tag; + this.decks = state.decks; + this.numFound = state.numFound; + this.loading = state.loading; + this.error = state.error; + this.loadMore = state.loadMore; + this.loadMoreLoading = state.loadMoreLoading; + this.start = state.start; + } +} + +DeckFamilyStore.storeName = 'DeckFamilyStore'; +DeckFamilyStore.handlers = { + 'LOAD_DECKFAMILY_DECKS': 'updateFamilyDecks', + 'LOAD_RESULTS_FAILURE': 'displayError', + 'DECKFAMILY_SHOW_LOADING': 'showLoading', + 'LOAD_MORE_DECKFAMILY_DECKS': 'loadMoreFamilyDecks', + 'DECKFAMILY_SHOW_LOAD_MORE_LOADING': 'showLoadMoreLoading' +}; + +export default DeckFamilyStore; From f5daac0e83ef4e39946e512517291a58b40754d2 Mon Sep 17 00:00:00 2001 From: Serafeim Chatzopoulos Date: Thu, 15 Jun 2017 14:29:39 +0100 Subject: [PATCH 003/117] deck family ui minor changes --- components/Deck/DeckFamily/DeckFamily.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/Deck/DeckFamily/DeckFamily.js b/components/Deck/DeckFamily/DeckFamily.js index 4dfc1fe53..431d28167 100644 --- a/components/Deck/DeckFamily/DeckFamily.js +++ b/components/Deck/DeckFamily/DeckFamily.js @@ -46,11 +46,13 @@ class DeckFamily extends React.Component { return (
-
+
+
+
{(this.props.DeckFamilyStore.loading) ?
Loading
: ''}
-

Deck Family ({this.props.DeckFamilyStore.tag})

+

Decks for tag: {this.props.DeckFamilyStore.tag}

@@ -69,7 +71,6 @@ class DeckFamily extends React.Component { {loadMoreDiv}
-
); } From a81dde2994cd874fdb257e2512293b345a254bca Mon Sep 17 00:00:00 2001 From: svalero Date: Thu, 22 Jun 2017 12:39:11 +0200 Subject: [PATCH 004/117] SWIK-1447-MoveAcrossGrid user can move acros the grid of slides using arrow keys --- .../AttachSubdeck/AttachSlides.js | 60 ++++++++++++++++++- custom_modules/custom-semantic-ui | 2 +- custom_modules/reveal.js | 2 +- 3 files changed, 61 insertions(+), 3 deletions(-) diff --git a/components/Deck/ContentPanel/AttachSubdeck/AttachSlides.js b/components/Deck/ContentPanel/AttachSubdeck/AttachSlides.js index cb1a9c2c1..13a063ae4 100644 --- a/components/Deck/ContentPanel/AttachSubdeck/AttachSlides.js +++ b/components/Deck/ContentPanel/AttachSubdeck/AttachSlides.js @@ -7,7 +7,15 @@ import { Segment, Loader,Label, Image,Dimmer,Grid, Button,TextArea} from 'seman import {Microservices} from '../../../../configs/microservices'; import updateSelectedSlides from '../../../../actions/attachSubdeck/updateSelectedSlides'; +const KEY_CODE = { + LEFT: 37, + UP: 38, + RIGHT: 39, + DOWN: 40 +}; + class AttachSlides extends React.Component{ + constructor(props){ super(props); this.numColumns = props.numColumns?props.numColumns:4; //if numColumns is not provided, 4 is used as default @@ -48,6 +56,8 @@ class AttachSlides extends React.Component{ } + + checkNoEmpty(element){ return (element.toString().length>0); } @@ -96,6 +106,53 @@ class AttachSlides extends React.Component{ } } + + getNextPos(pos,numSlides,numColumns,numRows,eventKeyCode){ + /******************************************* + Returns next position in a grid, taking into account + the arrow key pressed and the number of rows and columns + of the grid + ********************************************/ + let currentRow = Math.floor(pos/numColumns); + + let lastPos = numSlides-1; + let nextPos = parseInt(pos); //In case of overflow, we stayed in the same position. Force working with integers + switch (eventKeyCode) { + case KEY_CODE.RIGHT: + if(pos !== lastPos) //No overflow by right direction + nextPos ++; + break; + case KEY_CODE.LEFT: + if(pos !== 0) + nextPos --; + break; + case KEY_CODE.UP: + if(currentRow !== 0) + nextPos = nextPos - parseInt(numColumns); + break; + case KEY_CODE.DOWN: + if(currentRow !== (numRows-1)) + nextPos = nextPos + parseInt(numColumns); + break; + + } + return nextPos; + + } + handleKeyDown(pos,event){ + + if(event.keyCode === KEY_CODE.RIGHT || + event.keyCode === KEY_CODE.LEFT || + event.keyCode === KEY_CODE.UP || + event.keyCode === KEY_CODE.DOWN ){ + //the user wants to navigate through the grid + let numRows = Math.ceil(this.state.deckSlides.length/this.numColumns); + let nextPos = this.getNextPos(pos,this.state.deckSlides.length,this.numColumns,numRows,event.keyCode); //get next cell + //get the id of the cell + $('#slide'+nextPos).focus(); //move to the cell + } + + } loadSlidesGrid(){ let activeItemStyle = { backgroundColor:'#f8ffff', @@ -121,6 +178,7 @@ class AttachSlides extends React.Component{ id={'slide'+slidesShowed} onClick={this.handleOnclick.bind(this,slideId)} onKeyPress={this.handleKeyPress.bind(this,slideId)} + onKeyDown={this.handleKeyDown.bind(this,slidesShowed)} style={this.state.selectedSlides.includes(slideId)?activeItemStyle:{}} role="gridcell" aria-selected ={this.state.selectedSlides.includes(slideId)} @@ -186,7 +244,7 @@ class AttachSlides extends React.Component{ diff --git a/custom_modules/custom-semantic-ui b/custom_modules/custom-semantic-ui index 709e321d1..31b4800f9 160000 --- a/custom_modules/custom-semantic-ui +++ b/custom_modules/custom-semantic-ui @@ -1 +1 @@ -Subproject commit 709e321d1eb9abcc07baa329ce92d17b5439bc25 +Subproject commit 31b4800f90d768a7f361332882f941c6666ffd14 diff --git a/custom_modules/reveal.js b/custom_modules/reveal.js index a1f8f7c2c..adff6127f 160000 --- a/custom_modules/reveal.js +++ b/custom_modules/reveal.js @@ -1 +1 @@ -Subproject commit a1f8f7c2c15c640b36107a6e4185955e9c584bee +Subproject commit adff6127ff24bff53d32f45f8d652deea76b0a00 From 70a852e25c269ce8fbe8fafd00ffdf87fb7b5b14 Mon Sep 17 00:00:00 2001 From: svalero Date: Fri, 23 Jun 2017 13:13:06 +0200 Subject: [PATCH 005/117] SWIK-1426 Added the new react component for download --- .../ContentActions/DownloadButton.js | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 components/Deck/ContentPanel/ContentActions/DownloadButton.js diff --git a/components/Deck/ContentPanel/ContentActions/DownloadButton.js b/components/Deck/ContentPanel/ContentActions/DownloadButton.js new file mode 100644 index 000000000..953a79ffb --- /dev/null +++ b/components/Deck/ContentPanel/ContentActions/DownloadButton.js @@ -0,0 +1,24 @@ +import React from 'react'; +import { Button, Icon,Dropdown} from 'semantic-ui-react'; + +class DownloadButton extends React.Component{ + constructor(props) { + super(props); + } + + render(){ + let downloadOptions =[ + {value:'title' , text:'Title'}, + {value:'description' , text:'Description'}, + {value:'content' , text:'Content'}, + {value:'speakernotes' , text:'Speakernotes'} + + ]; + return( + + + + ); + } +} +export default DownloadButton; From 39af3d9a458e758cccac6c58f167af37b25769c7 Mon Sep 17 00:00:00 2001 From: svalero Date: Tue, 27 Jun 2017 10:06:58 +0200 Subject: [PATCH 006/117] SWIK-1426 Download button component connected to the Store --- .../ContentActions/ContentActionsFooter.js | 2 + .../ContentActions/DownloadButton.js | 53 ++++++++++++++++--- custom_modules/custom-semantic-ui | 2 +- custom_modules/reveal.js | 2 +- 4 files changed, 49 insertions(+), 10 deletions(-) diff --git a/components/Deck/ContentPanel/ContentActions/ContentActionsFooter.js b/components/Deck/ContentPanel/ContentActions/ContentActionsFooter.js index c268547fa..c458cfcbb 100644 --- a/components/Deck/ContentPanel/ContentActions/ContentActionsFooter.js +++ b/components/Deck/ContentPanel/ContentActions/ContentActionsFooter.js @@ -15,6 +15,7 @@ import addActivity from '../../../../actions/activityfeed/addActivity'; import dislikeActivity from '../../../../actions/activityfeed/dislikeActivity.js'; import UserProfileStore from '../../../../stores/UserProfileStore'; import ContentLikeStore from '../../../../stores/ContentLikeStore'; +import DownloadButton from './DownloadButton'; class ContentActionsFooter extends React.Component { constructor(props) { @@ -168,6 +169,7 @@ class ContentActionsFooter extends React.Component { +
diff --git a/components/Deck/ContentModulesPanel/ContentDiscussionPanel/AddReply.js b/components/Deck/ContentModulesPanel/ContentDiscussionPanel/AddReply.js index 2c6c1eae7..f2fbb5611 100644 --- a/components/Deck/ContentModulesPanel/ContentDiscussionPanel/AddReply.js +++ b/components/Deck/ContentModulesPanel/ContentDiscussionPanel/AddReply.js @@ -39,11 +39,11 @@ class AddReply extends React.Component { return (
- - + +
- +
} content='Attach Slides' on='hover'/>; + return ( - - - - - - - } + + + + + + } content='Attach Deck' on='hover'/>; + return ( - - - - - - - } + Immutable.Set.of(node).union(node.get('children') ? node.get('children').flatMap(findAllDescendants) : Immutable.List()); @@ -124,6 +125,7 @@ class TreeNode extends React.Component { sid: this.props.item.get('id'), spath: this.props.item.get('path') }; + let canEdit = !this.props.permissions.readOnly && this.props.permissions.edit && this.props.ContentStore.mode !== 'edit'; let nodeURL = TreeUtil.makeNodeURL(nodeSelector, this.props.page, this.props.mode); let childNodesDIV = ''; let actionSigClass; @@ -147,72 +149,63 @@ class TreeNode extends React.Component { 'hide-element': !this.props.item.get('onAction'), 'ui right aligned': true }); - const buttonItemClass = classNames({ - 'ui basic icon button': true, - 'disabled': this.props.permissions.readOnly || !this.props.permissions.edit || this.props.ContentStore.mode === 'edit' - }); - const duplicateItemClass = classNames({ - 'ui basic icon button': true, - 'disabled': this.props.item.get('type') === 'deck'|| this.props.permissions.readOnly || !this.props.permissions.edit || this.props.ContentStore.mode=== 'edit' - }); let buttonStyle = { classNames : classNames({ 'ui':true, - 'disabled': this.props.permissions.readOnly || !this.props.permissions.edit || this.props.ContentStore.mode === 'edit' + 'disabled': !canEdit }), iconSize : 'small', attached : '', - noTabIndex : this.props.permissions.readOnly || !this.props.permissions.edit || this.props.ContentStore.mode === 'edit' + noTabIndex : !canEdit }; let actionBtns = (
-
- + + + + + + + } + content='Add Slide' + on='hover' /> - + + + + + + } content='Add deck' on='hover'/> - - - {/* - - */} -
+ + + } content='Duplicate' on='hover'/> + + + } content='Delete' on='hover'/> +
); //change the node title style if it is selected From eee04e4a9a85a1ed883b69de33fb351101165461 Mon Sep 17 00:00:00 2001 From: dpaun Date: Thu, 10 Aug 2017 16:17:48 +0200 Subject: [PATCH 116/117] SWIK-235-236 Right-aligning labels --- .../Deck/ContentPanel/DeckModes/DeckViewPanel/DeckViewPanel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Deck/ContentPanel/DeckModes/DeckViewPanel/DeckViewPanel.js b/components/Deck/ContentPanel/DeckModes/DeckViewPanel/DeckViewPanel.js index fbb118437..4db0456b8 100644 --- a/components/Deck/ContentPanel/DeckModes/DeckViewPanel/DeckViewPanel.js +++ b/components/Deck/ContentPanel/DeckModes/DeckViewPanel/DeckViewPanel.js @@ -105,7 +105,7 @@ class DeckViewPanel extends React.Component {
-
+
From 03b5eb7a10b4052c981bf8d253e44a66ab3bbcb9 Mon Sep 17 00:00:00 2001 From: Ali Date: Mon, 14 Aug 2017 15:26:14 +0200 Subject: [PATCH 117/117] [skip ci] updated semantic-ui to its latest --- custom_modules/custom-semantic-ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_modules/custom-semantic-ui b/custom_modules/custom-semantic-ui index 1b510ab3c..9edc786e5 160000 --- a/custom_modules/custom-semantic-ui +++ b/custom_modules/custom-semantic-ui @@ -1 +1 @@ -Subproject commit 1b510ab3c42bc651a1d58fb6119c0d1d0c939d9b +Subproject commit 9edc786e503a69c9740617d5b6b6bd33b236ed0b