mirror of
https://github.com/documize/community.git
synced 2025-08-04 21:15:24 +02:00
self-host enhancements for Word/PDF handling
This commit is contained in:
parent
99b9427b8e
commit
bbcba8eb18
23 changed files with 728 additions and 705 deletions
|
@ -20,8 +20,10 @@ const {
|
|||
export default Ember.Component.extend({
|
||||
titleEmpty: computed.empty('model.general.title'),
|
||||
messageEmpty: computed.empty('model.general.message'),
|
||||
conversionEndpointEmpty: computed.empty('model.general.conversionEndpoint'),
|
||||
hasTitleInputError: computed.and('titleEmpty', 'titleError'),
|
||||
hasMessageInputError: computed.and('messageEmpty', 'messageError'),
|
||||
hasConversionEndpointInputError: computed.and('conversionEndpointEmpty', 'conversionEndpointError'),
|
||||
|
||||
actions: {
|
||||
save() {
|
||||
|
@ -35,10 +37,22 @@ export default Ember.Component.extend({
|
|||
return $("#siteMessage").focus();
|
||||
}
|
||||
|
||||
if (isEmpty(this.get('model.general.conversionEndpoint'))) {
|
||||
set(this, 'conversionEndpointError', true);
|
||||
return $("#conversionEndpoint").focus();
|
||||
}
|
||||
|
||||
let e = this.get('model.general.conversionEndpoint');
|
||||
if (is.endWith(e, '/')) {
|
||||
this.set('model.general.conversionEndpoint', e.substring(0, e.length-1));
|
||||
}
|
||||
|
||||
this.model.general.set('allowAnonymousAccess', Ember.$("#allowAnonymousAccess").prop('checked'));
|
||||
|
||||
this.get('save')().then(() => {
|
||||
set(this, 'titleError', false);
|
||||
set(this, 'messageError', false);
|
||||
set(this, 'conversionEndpointError', false);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ export default Model.extend({
|
|||
title: attr('string'),
|
||||
message: attr('string'),
|
||||
email: attr('string'),
|
||||
conversionEndpoint: attr('string'),
|
||||
allowAnonymousAccess: attr('boolean', { defaultValue: false }),
|
||||
created: attr(),
|
||||
revised: attr()
|
||||
|
|
|
@ -25,6 +25,7 @@ export default Ember.Service.extend({
|
|||
kcAuth: service(),
|
||||
apiHost: `${config.apiHost}`,
|
||||
endpoint: `${config.apiHost}/${config.apiNamespace}`,
|
||||
conversionEndpoint: '',
|
||||
orgId: '',
|
||||
title: '',
|
||||
version: '',
|
||||
|
@ -57,7 +58,7 @@ export default Ember.Service.extend({
|
|||
allowAnonymousAccess: true,
|
||||
setupMode: true
|
||||
});
|
||||
|
||||
|
||||
this.get('localStorage').clearAll();
|
||||
|
||||
return resolve(this);
|
||||
|
@ -78,7 +79,7 @@ export default Ember.Service.extend({
|
|||
return this.get('ajax').request('public/meta').then((response) => {
|
||||
this.setProperties(response);
|
||||
|
||||
if (is.not.include(requestedUrl, '/auth/')) {
|
||||
if (is.not.include(requestedUrl, '/auth/')) {
|
||||
this.get('localStorage').storeSessionItem('entryUrl', requestedUrl);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,8 @@ export default Ember.Service.extend({
|
|||
|
||||
this.get('appMeta').setProperties({
|
||||
message: org.get('message'),
|
||||
title: org.get('title')
|
||||
title: org.get('title'),
|
||||
conversionEndpoint: org.get('conversionEndpoint')
|
||||
});
|
||||
|
||||
return this.get('ajax').request(`organizations/${id}`, {
|
||||
|
|
|
@ -17,9 +17,14 @@
|
|||
<label>Anonymous Access</label>
|
||||
<div class="tip">Content within "Everyone" will be made available to anonymous users</div>
|
||||
<div class="checkbox">
|
||||
<input type="checkbox" id="allowAnonymousAccess" checked= {{model.general.allowAnonymousAccess}} />
|
||||
<input type="checkbox" id="allowAnonymousAccess" checked={{model.general.allowAnonymousAccess}} />
|
||||
<label for="allowAnonymousAccess">Allow anyone to access this Documize instance</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-control">
|
||||
<label>Conversion Service URL</label>
|
||||
<div class="tip">Endpoint for handling import/export (e.g. https://api.documize.com, <a href="https://docs.documize.com/s/WNEpptWJ9AABRnha/administration-guides/d/WO0pt_MXigAB6sJ7/general-options">view documentation</a>)</div>
|
||||
{{focus-input id="conversionEndpoint" type="text" value=model.general.conversionEndpoint class=(if hasConversionEndpointInputError 'error')}}
|
||||
</div>
|
||||
<div class="regular-button button-blue" {{ action 'save' }}>save</div>
|
||||
</form>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "documize",
|
||||
"version": "1.47.2",
|
||||
"version": "1.48.0",
|
||||
"description": "The Document IDE",
|
||||
"private": true,
|
||||
"repository": "",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue