mirror of
https://github.com/documize/community.git
synced 2025-08-10 07:55:25 +02:00
Merge branch 'master' into smart-section-github
This commit is contained in:
commit
6f9199bfe0
6 changed files with 32 additions and 12 deletions
|
@ -1,11 +1,11 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||||
//
|
//
|
||||||
// This software (Documize Community Edition) is licensed under
|
// This software (Documize Community Edition) is licensed under
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
||||||
//
|
//
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
// You can operate outside the AGPL restrictions by purchasing
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
// Documize Enterprise Edition and obtaining a commercial license
|
||||||
// by contacting <sales@documize.com>.
|
// by contacting <sales@documize.com>.
|
||||||
//
|
//
|
||||||
// https://documize.com
|
// https://documize.com
|
||||||
|
|
||||||
|
@ -30,6 +30,8 @@ export default Ember.Component.extend({
|
||||||
onAction2: null,
|
onAction2: null,
|
||||||
offset: "5px 0",
|
offset: "5px 0",
|
||||||
targetOffset: "10px 0",
|
targetOffset: "10px 0",
|
||||||
|
constrainToWindow: true,
|
||||||
|
constrainToScrollParent: true,
|
||||||
|
|
||||||
hasSecondButton: Ember.computed('button2', 'color2', function() {
|
hasSecondButton: Ember.computed('button2', 'color2', function() {
|
||||||
return is.not.empty(this.get('button2')) && is.not.empty(this.get('color2'));
|
return is.not.empty(this.get('button2')) && is.not.empty(this.get('color2'));
|
||||||
|
@ -106,4 +108,4 @@ export default Ember.Component.extend({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||||
//
|
//
|
||||||
// This software (Documize Community Edition) is licensed under
|
// This software (Documize Community Edition) is licensed under
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
||||||
//
|
//
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
// You can operate outside the AGPL restrictions by purchasing
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
// Documize Enterprise Edition and obtaining a commercial license
|
||||||
// by contacting <sales@documize.com>.
|
// by contacting <sales@documize.com>.
|
||||||
//
|
//
|
||||||
// https://documize.com
|
// https://documize.com
|
||||||
|
|
||||||
|
@ -13,17 +13,24 @@ import Ember from 'ember';
|
||||||
import NotifierMixin from '../../mixins/notifier';
|
import NotifierMixin from '../../mixins/notifier';
|
||||||
|
|
||||||
export default Ember.Component.extend(NotifierMixin, {
|
export default Ember.Component.extend(NotifierMixin, {
|
||||||
|
|
||||||
tagName: 'span',
|
tagName: 'span',
|
||||||
selectedTemplate: {
|
selectedTemplate: {
|
||||||
id: "0"
|
id: "0"
|
||||||
},
|
},
|
||||||
canEditTemplate: "",
|
canEditTemplate: "",
|
||||||
|
drop: null,
|
||||||
|
|
||||||
didReceiveAttrs() {
|
didReceiveAttrs() {
|
||||||
this.send('setTemplate', this.get('savedTemplates')[0]);
|
this.send('setTemplate', this.get('savedTemplates')[0]);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
willDestroyElement() {
|
||||||
|
if (is.not.null(this.get('drop'))) {
|
||||||
|
this.get('drop').destroy();
|
||||||
|
this.set('drop', null);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
setTemplate(chosen) {
|
setTemplate(chosen) {
|
||||||
if (is.undefined(chosen)) {
|
if (is.undefined(chosen)) {
|
||||||
|
@ -58,10 +65,16 @@ export default Ember.Component.extend(NotifierMixin, {
|
||||||
},
|
},
|
||||||
|
|
||||||
onOpenCallback() {
|
onOpenCallback() {
|
||||||
let self = this;
|
if (is.not.null(this.get('drop'))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let self = this;
|
||||||
let folderId = this.get('folder.id');
|
let folderId = this.get('folder.id');
|
||||||
let importUrl = this.session.appMeta.getUrl('import/folder/' + folderId);
|
let importUrl = this.session.appMeta.getUrl('import/folder/' + folderId);
|
||||||
|
|
||||||
|
Dropzone.options.uploadDocuments = false;
|
||||||
|
|
||||||
let dzone = new Dropzone("#upload-documents", {
|
let dzone = new Dropzone("#upload-documents", {
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': 'Bearer ' + self.session.getSessionItem('token')
|
'Authorization': 'Bearer ' + self.session.getSessionItem('token')
|
||||||
|
@ -86,7 +99,8 @@ export default Ember.Component.extend(NotifierMixin, {
|
||||||
console.log("Conversion failed for ", x.name, " obj ", x); // TODO proper error handling
|
console.log("Conversion failed for ", x.name, " obj ", x); // TODO proper error handling
|
||||||
});
|
});
|
||||||
|
|
||||||
this.on("queuecomplete", function() {});
|
this.on("queuecomplete", function() {
|
||||||
|
});
|
||||||
|
|
||||||
this.on("addedfile", function(file) {
|
this.on("addedfile", function(file) {
|
||||||
self.attrs.onDocumentImporting(file.name);
|
self.attrs.onDocumentImporting(file.name);
|
||||||
|
@ -98,6 +112,8 @@ export default Ember.Component.extend(NotifierMixin, {
|
||||||
dzone.on("complete", function(file) {
|
dzone.on("complete", function(file) {
|
||||||
dzone.removeFile(file);
|
dzone.removeFile(file);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.set('drop', dzone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
.page-container {
|
.page-container {
|
||||||
padding-top: 60px;
|
padding-top: 60px;
|
||||||
|
min-height: 500px; //ensure dropdowns render in viewport
|
||||||
}
|
}
|
||||||
|
|
||||||
.copyright {
|
.copyright {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="heading">Or use a template:</p>
|
<p class="heading">Or use a template:</p>
|
||||||
|
|
||||||
<ul class="start-document-options" style="min-width:185px;">
|
<ul class="start-document-options" style="min-width:185px;">
|
||||||
{{#each savedTemplates key="id" as |template|}}
|
{{#each savedTemplates key="id" as |template|}}
|
||||||
<li class="option {{if template.selected "selected"}}" {{action 'setTemplate' template}}>
|
<li class="option {{if template.selected "selected"}}" {{action 'setTemplate' template}}>
|
||||||
|
|
|
@ -30,7 +30,7 @@ const (
|
||||||
// AppVersion does what it says
|
// AppVersion does what it says
|
||||||
// Versioning scheme major.minor where "minor" is optional
|
// Versioning scheme major.minor where "minor" is optional
|
||||||
// e.g. 1, 2, 3, 4.1, 4.2, 5, 6, 7, 7.1, 8, 9, 10, ..... 127, 127.1, 128
|
// e.g. 1, 2, 3, 4.1, 4.2, 5, 6, 7, 7.1, 8, 9, 10, ..... 127, 127.1, 128
|
||||||
AppVersion = "12.1"
|
AppVersion = "12.3"
|
||||||
)
|
)
|
||||||
|
|
||||||
var port, certFile, keyFile, forcePort2SSL string
|
var port, certFile, keyFile, forcePort2SSL string
|
||||||
|
|
|
@ -26,8 +26,8 @@ func (*table) Meta() TypeMeta {
|
||||||
section := TypeMeta{}
|
section := TypeMeta{}
|
||||||
|
|
||||||
section.ID = "81a2ea93-2dfc-434d-841e-54b832492c92"
|
section.ID = "81a2ea93-2dfc-434d-841e-54b832492c92"
|
||||||
section.Title = "Table"
|
section.Title = "Tabular"
|
||||||
section.Description = "Table with rows, columns and formatting"
|
section.Description = "Rows, columns and formatting for tabular data"
|
||||||
section.ContentType = "table"
|
section.ContentType = "table"
|
||||||
section.Order = 9996
|
section.Order = 9996
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue