-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'addMetadataToDeckPage' of https://github.com/slidewiki/…
…slidewiki-platform into addMetadataToDeckPage
- Loading branch information
Showing
50 changed files
with
2,053 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', {}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 registerChange(context, payload) { | ||
context.dispatch('REGISTER_CHANGE', { hasChanges: payload.hasChanges }); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import {navigateAction} from 'fluxible-router'; | ||
import serviceUnavailable from '../error/serviceUnavailable'; | ||
const log = require('../log/clog'); | ||
const common = require('../../common.js'); | ||
|
||
export default function translateSlideRevision(context, payload, done) { | ||
context.dispatch('START_TRANSLATION', 'success'); | ||
log.info(context); | ||
|
||
context.service.create('slide.translate', payload, null, {timeout: 30 * 1000}, (err, res) => { | ||
if (err) { | ||
log.error(context, {filepath: __filename, err: err}); | ||
done(); | ||
} else { | ||
context.dispatch('UPDATE_SLIDE_CONTENT_AFTER_TRANSLATION', res); | ||
|
||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
annotation { | ||
background: #0e75de; | ||
color: #fff; | ||
padding: 1px 1px; | ||
border-radius: 3px; | ||
cursor:pointer; | ||
margin:0 -1px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
CKEDITOR.dialog.add( 'annotationDialog', function( editor ) { | ||
return { | ||
title: 'Annotation Properties', | ||
minWidth: 400, | ||
minHeight: 200, | ||
contents: [ | ||
{ | ||
id: 'tab-basic', | ||
label: 'Settings', | ||
elements: [ | ||
{ | ||
type: 'text', | ||
id: 'timestamp', | ||
label: 'Type', | ||
validate: CKEDITOR.dialog.validate.notEmpty( "Abbreviation field cannot be empty." ) | ||
}, | ||
{ | ||
type: 'text', | ||
id: 'title', | ||
label: 'Explanation', | ||
validate: CKEDITOR.dialog.validate.notEmpty( "Explanation field cannot be empty." ) | ||
} | ||
] | ||
}, | ||
{ | ||
id: 'tab-adv', | ||
label: 'Advanced Settings', | ||
elements: [ | ||
{ | ||
type: 'text', | ||
id: 'id', | ||
label: 'Id' | ||
} | ||
] | ||
} | ||
], | ||
onShow: function(e) { | ||
console.log(editor.plugins.semanticannotations); | ||
console.log(e); | ||
//this.getContentElement('tab-basic', 'timestamp').setValue(editor.plugins.semanticannotations.getAnnotationData(editor)); | ||
//console.log(editor.plugins.semanticannotations.getAnnotationData(editor)); | ||
}, | ||
onOk: function() { | ||
var dialog = this; | ||
|
||
var abbr = editor.document.createElement( 'abbr' ); | ||
abbr.setAttribute( 'title', dialog.getValueOf( 'tab-basic', 'title' ) ); | ||
abbr.setText( dialog.getValueOf( 'tab-basic', 'abbr' ) ); | ||
|
||
var id = dialog.getValueOf( 'tab-adv', 'id' ); | ||
if ( id ) | ||
abbr.setAttribute( 'id', id ); | ||
|
||
editor.insertElement( abbr ); | ||
} | ||
}; | ||
}); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.