mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
Move 3rd party api urls to AppConstants
This commit is contained in:
parent
09812a1881
commit
00d93d912b
@ -56,11 +56,11 @@ let Image = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
InjectInHeadUtils.inject('https://code.jquery.com/jquery-2.1.4.min.js')
|
InjectInHeadUtils.inject(AppConstants.jquery.sdkUrl)
|
||||||
.then(() =>
|
.then(() =>
|
||||||
Q.all([
|
Q.all([
|
||||||
InjectInHeadUtils.inject(AppConstants.baseUrl + 'static/thirdparty/shmui/shmui.css'),
|
InjectInHeadUtils.inject(AppConstants.shmui.cssUrl),
|
||||||
InjectInHeadUtils.inject(AppConstants.baseUrl + 'static/thirdparty/shmui/jquery.shmui.js')
|
InjectInHeadUtils.inject(AppConstants.shmui.sdkUrl)
|
||||||
]).then(() => { window.jQuery('.shmui-ascribe').shmui(); }));
|
]).then(() => { window.jQuery('.shmui-ascribe').shmui(); }));
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ let Audio = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
InjectInHeadUtils.inject(AppConstants.baseUrl + 'static/thirdparty/audiojs/audiojs/audio.min.js').then(this.ready);
|
InjectInHeadUtils.inject(AppConstants.audiojs.sdkUrl).then(this.ready);
|
||||||
},
|
},
|
||||||
|
|
||||||
ready() {
|
ready() {
|
||||||
@ -132,8 +132,8 @@ let Video = React.createClass({
|
|||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
Q.all([
|
Q.all([
|
||||||
InjectInHeadUtils.inject('//vjs.zencdn.net/4.12/video-js.css'),
|
InjectInHeadUtils.inject(AppConstants.videojs.cssUrl),
|
||||||
InjectInHeadUtils.inject('//vjs.zencdn.net/4.12/video.js')])
|
InjectInHeadUtils.inject(AppConstants.videojs.sdkUrl)])
|
||||||
.then(() => this.setState({libraryLoaded: true}))
|
.then(() => this.setState({libraryLoaded: true}))
|
||||||
.fail(() => this.setState({libraryLoaded: false}));
|
.fail(() => this.setState({libraryLoaded: false}));
|
||||||
},
|
},
|
||||||
|
@ -43,7 +43,7 @@ let FacebookShareButton = React.createClass({
|
|||||||
className="fb-share-button btn btn-ascribe-social"
|
className="fb-share-button btn btn-ascribe-social"
|
||||||
data-href={this.props.url}
|
data-href={this.props.url}
|
||||||
data-layout={this.props.type}>
|
data-layout={this.props.type}>
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,15 +1,19 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
let constants = {
|
//const baseUrl = 'http://localhost:8000/api/';
|
||||||
//'baseUrl': 'http://localhost:8000/api/',
|
|
||||||
|
|
||||||
//FIXME: referring to a global variable in `window` is not
|
//FIXME: referring to a global variable in `window` is not
|
||||||
// super pro. What if we render stuff on the server?
|
// super pro. What if we render stuff on the server?
|
||||||
// - super-bro - Senor Developer, 14th July 2015
|
// - super-bro - Senor Developer, 14th July 2015
|
||||||
//'baseUrl': window.BASE_URL,
|
//const baseUrl = window.BASE_URL;
|
||||||
'apiEndpoint': window.API_ENDPOINT,
|
const apiEndpoint = window.API_ENDPOINT;
|
||||||
'serverUrl': window.SERVER_URL,
|
const serverUrl = window.SERVER_URL;
|
||||||
'baseUrl': window.BASE_URL,
|
const baseUrl = window.BASE_URL;
|
||||||
|
|
||||||
|
const constants = {
|
||||||
|
apiEndpoint,
|
||||||
|
serverUrl,
|
||||||
|
baseUrl,
|
||||||
'aclList': ['acl_coa', 'acl_consign', 'acl_delete', 'acl_download', 'acl_edit', 'acl_create_editions', 'acl_view_editions',
|
'aclList': ['acl_coa', 'acl_consign', 'acl_delete', 'acl_download', 'acl_edit', 'acl_create_editions', 'acl_view_editions',
|
||||||
'acl_loan', 'acl_share', 'acl_transfer', 'acl_unconsign', 'acl_unshare', 'acl_view',
|
'acl_loan', 'acl_share', 'acl_transfer', 'acl_unconsign', 'acl_unshare', 'acl_view',
|
||||||
'acl_withdraw_transfer', 'acl_wallet_submit'],
|
'acl_withdraw_transfer', 'acl_wallet_submit'],
|
||||||
@ -70,8 +74,30 @@ let constants = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'copyrightAssociations': ['ARS', 'DACS', 'Bildkunst', 'Pictoright', 'SODRAC', 'Copyright Agency/Viscopy', 'SAVA',
|
||||||
|
'Bildrecht GmbH', 'SABAM', 'AUTVIS', 'CREAIMAGEN', 'SONECA', 'Copydan', 'EAU', 'Kuvasto', 'GCA', 'HUNGART',
|
||||||
|
'IVARO', 'SIAE', 'JASPAR-SPDA', 'AKKA/LAA', 'LATGA-A', 'SOMAAP', 'ARTEGESTION', 'CARIER', 'BONO', 'APSAV',
|
||||||
|
'SPA', 'GESTOR', 'VISaRTA', 'RAO', 'LITA', 'DALRO', 'VeGaP', 'BUS', 'ProLitteris', 'AGADU', 'AUTORARTE', 'BUBEDRA', 'BBDA', 'BCDA', 'BURIDA', 'ADAVIS', 'BSDA'],
|
||||||
|
'searchThreshold': 500,
|
||||||
|
|
||||||
// in case of whitelabel customization, we store stuff here
|
// in case of whitelabel customization, we store stuff here
|
||||||
'whitelabel': {},
|
'whitelabel': {},
|
||||||
|
|
||||||
|
// 3rd party integrations
|
||||||
|
'jquery': {
|
||||||
|
'sdkUrl': 'https://code.jquery.com/jquery-2.1.4.min.js'
|
||||||
|
},
|
||||||
|
'shmui': {
|
||||||
|
'sdkUrl': baseUrl + 'static/thirdparty/shmui/jquery.shmui.js',
|
||||||
|
'cssUrl': baseUrl + 'static/thirdparty/shmui/shmui.css'
|
||||||
|
},
|
||||||
|
'audiojs': {
|
||||||
|
'sdkUrl': baseUrl + 'static/thirdparty/audiojs/audiojs/audio.min.js'
|
||||||
|
},
|
||||||
|
'videojs': {
|
||||||
|
'sdkUrl': '//vjs.zencdn.net/4.12/video.js',
|
||||||
|
'cssUrl': '//vjs.zencdn.net/4.12/video-js.css'
|
||||||
|
},
|
||||||
'raven': {
|
'raven': {
|
||||||
'url': 'https://0955da3388c64ab29bd32c2a429f9ef4@app.getsentry.com/48351'
|
'url': 'https://0955da3388c64ab29bd32c2a429f9ef4@app.getsentry.com/48351'
|
||||||
},
|
},
|
||||||
@ -81,12 +107,7 @@ let constants = {
|
|||||||
},
|
},
|
||||||
'twitter': {
|
'twitter': {
|
||||||
'sdkUrl': 'https://platform.twitter.com/widgets.js'
|
'sdkUrl': 'https://platform.twitter.com/widgets.js'
|
||||||
},
|
}
|
||||||
'copyrightAssociations': ['ARS', 'DACS', 'Bildkunst', 'Pictoright', 'SODRAC', 'Copyright Agency/Viscopy', 'SAVA',
|
|
||||||
'Bildrecht GmbH', 'SABAM', 'AUTVIS', 'CREAIMAGEN', 'SONECA', 'Copydan', 'EAU', 'Kuvasto', 'GCA', 'HUNGART',
|
|
||||||
'IVARO', 'SIAE', 'JASPAR-SPDA', 'AKKA/LAA', 'LATGA-A', 'SOMAAP', 'ARTEGESTION', 'CARIER', 'BONO', 'APSAV',
|
|
||||||
'SPA', 'GESTOR', 'VISaRTA', 'RAO', 'LITA', 'DALRO', 'VeGaP', 'BUS', 'ProLitteris', 'AGADU', 'AUTORARTE', 'BUBEDRA', 'BBDA', 'BCDA', 'BURIDA', 'ADAVIS', 'BSDA'],
|
|
||||||
'searchThreshold': 500
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default constants;
|
export default constants;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user