Skip to content

Commit

Permalink
Merge branch 'master' of github.com:slidewiki/slidewiki-platform into…
Browse files Browse the repository at this point in the history
… SWIK-2275_users_display_name
  • Loading branch information
TBoonX committed Jul 16, 2018
2 parents 446a3b0 + 1157c84 commit 1f7d822
Show file tree
Hide file tree
Showing 9 changed files with 243 additions and 38 deletions.
177 changes: 176 additions & 1 deletion common.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,17 +174,192 @@ export default {
return a.substring(0,2).toLowerCase() === b.substring(0,2).toLowerCase();
},

//ISO6391 language codes from https://pkgstore.datahub.io/core/language-codes/language-codes_csv/data/b65af208b52970a4683fa8fde9af8e9f/language-codes_csv.csv
translationLanguages: [
'de',
'el',
'en',
'es',
'fr',
'it',
'sr',
'lt',
'nl',
'pt',
'sr',
'ru',
'zh',
'hi',
'ar',
'bn',
'ja',
'pa',
'jv',
'ml',
'aa',
'ab',
'ae',
'af',
'ak',
'am',
'an',
'as',
'av',
'ay',
'az',
'ba',
'be',
'bg',
'bh',
'bi',
'bm',
'bo',
'br',
'bs',
'ca',
'ce',
'ch',
'co',
'cr',
'cs',
'cu',
'cv',
'cy',
'da',
'dv',
'dz',
'ee',
'eo',
'et',
'eu',
'fa',
'ff',
'fi',
'fj',
'fo',
'fy',
'ga',
'gd',
'gl',
'gn',
'gu',
'gv',
'ha',
'he',
'ho',
'hr',
'ht',
'hu',
'hy',
'hz',
'ia',
'id',
'ie',
'ig',
'ii',
'ik',
'io',
'is',
'iu',
'ka',
'kg',
'ki',
'kj',
'kk',
'kl',
'km',
'kn',
'ko',
'kr',
'ks',
'ku',
'kv',
'kw',
'ky',
'la',
'lb',
'lg',
'li',
'ln',
'lo',
'lu',
'lv',
'mg',
'mh',
'mi',
'mk',
'mn',
'mr',
'ms',
'mt',
'my',
'na',
'nb',
'nd',
'ne',
'ng',
'nn',
'no',
'nr',
'nv',
'ny',
'oc',
'oj',
'om',
'or',
'os',
'pi',
'pl',
'ps',
'qu',
'rm',
'rn',
'ro',
'rw',
'sa',
'sc',
'sd',
'se',
'sg',
'si',
'sk',
'sl',
'sm',
'sn',
'so',
'sq',
'ss',
'st',
'su',
'sv',
'sw',
'ta',
'te',
'tg',
'th',
'ti',
'tk',
'tl',
'tn',
'to',
'tr',
'ts',
'tt',
'tw',
'ty',
'ug',
'uk',
'ur',
'uz',
've',
'vi',
'vo',
'wa',
'wo',
'xh',
'yi',
'yo',
'za',
'zu'
],

};
3 changes: 2 additions & 1 deletion components/AddDeck/AddDeck.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,9 @@ class AddDeck extends React.Component {
let thumbnailAlt = 'Slide ' + (i+1) + ': ';
if (slide.title !== undefined)
thumbnailAlt += slide.title ;
let thumbnailSrc = Microservices.file.uri + '/thumbnail/slide/' + slide.id + '/' + (this.props.ImportStore.theme ? this.props.ImportStore.theme : 'default');
html += '<td style="padding: 15px;"><div style="width: 250px;" tabIndex="0">' +
'Slide ' + (i+1) + '<img title="Title: ' + slide.title + '" style=' + imgStyle + ' src=' + Microservices.file.uri + '/thumbnail/slide/' + slide.id + '/default alt="' + thumbnailAlt + '" aria-hidden="true" />' +
'Slide ' + (i+1) + '<img title="Title: ' + slide.title + '" style=' + imgStyle + ' src=' + thumbnailSrc + ' alt="' + thumbnailAlt + '" aria-hidden="true" />' +
'</div></td>'; //THUMBNAIL
}
html += '</tr></table></div>';
Expand Down
5 changes: 5 additions & 0 deletions components/Deck/ContentPanel/ContentActions/DownloadModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ class DownloadModal extends React.Component{


}
componentDidMount(){
$('#inlineSpeakerNotes').each(function () {
$(this).css('z-index', 0);
});
}

render() {
return(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,8 @@ class DeckPropertiesEditor extends React.Component {
'required': true,
'field': true,
'error': this.state.validationErrors.language != null,
'disabled': true
'disabled': true,
'hidden': true
});
/*
let licenseFieldClass = classNames({
Expand Down Expand Up @@ -570,7 +571,8 @@ class DeckPropertiesEditor extends React.Component {

let listOfAuthorized = this.getListOfAuthorized();

let titleAndLanguage = <div className="two fields">
//let titleAndLanguage = <div className="two fields">
let titleAndLanguage = <div className="field">
<div className={titleFieldClass} data-tooltip={this.state.validationErrors.title}>
<label htmlFor="title_input">
Title
Expand All @@ -580,12 +582,12 @@ class DeckPropertiesEditor extends React.Component {
aria-required="true" id="title_input"/>

</div>
<div className={langFieldClass} data-tooltip={this.state.validationErrors.language}>
{/*<div className={langFieldClass} data-tooltip={this.state.validationErrors.language}>
<label htmlFor="language" id="language_label">
Language
</label>
<LanguageDropdown type="spoken" required={true} value={simpleLanguage} arialabel="language" onChange={this.handleChange.bind(this, 'language')} />
</div>
</div>*/}
</div>;
let markdownField = <div className="field">
<div className="ui checkbox">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,14 @@ class SlideContentEditor extends React.Component {
});
});
}
resetZIndexSpeakerNotes()
{
//fix bug with speakernotes overlapping soure dialog/other elements - SWIK-832 and newer: 2355
//old SWIK 832 solution: $('#inlineSpeakerNotes [style*="absolute"]').css({'position': 'relative', 'zIndex': '0'});
$('#inlineSpeakerNotes').each(function () {
$(this).css('z-index', 0);
});
}
getuniqueID(){
let allElements = document.getElementsByTagName('*');
let random = Math.floor((Math.random() * 100000) + 1);
Expand Down Expand Up @@ -992,8 +1000,6 @@ class SlideContentEditor extends React.Component {
}, 500);
});
});
//fix bug with speakernotes overlapping soure dialog/other elements - SWIK-832
$('#inlineSpeakerNotes [style*="absolute"]').css({'position': 'relative', 'zIndex': '0'});

if(!document.domain in ['localhost', '0.0.0.0'])
{
Expand All @@ -1017,6 +1023,7 @@ class SlideContentEditor extends React.Component {
});*/

this.correctDimensionsBoxesImg();
this.resetZIndexSpeakerNotes();
//('img');
}
handleResize = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ class DeckTranslationsModal extends React.Component {
id: 'DeckTranslationsModal.startTranslation',
defaultMessage: 'Create a new translation:',
},
startTranslationSearchOptions: {
id: 'DeckTranslationsModal.startTranslationSearchOptions',
defaultMessage: ' (start typing to find your language in its native name)',
},
cancel: {
id: 'DeckTranslationsModal.cancel',
defaultMessage: 'Cancel',
Expand Down Expand Up @@ -162,7 +166,7 @@ class DeckTranslationsModal extends React.Component {
options={languagesOptions}
onChange={this.handleLanguageSelection.bind(this)}
name='languageSelection'
/>
/> {this.context.intl.formatMessage(messages.startTranslationSearchOptions)}
</div>
<Divider />
<Modal.Actions className="ui center aligned" as="div" style={{'textAlign': 'right'}}>
Expand Down
Loading

0 comments on commit 1f7d822

Please sign in to comment.