1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-07 14:35:28 +02:00

Merge branch 'master' into smart-section-github

This commit is contained in:
Elliott Stoneham 2016-05-26 14:32:30 +01:00
commit 6f9199bfe0
6 changed files with 32 additions and 12 deletions

View file

@ -1,11 +1,11 @@
// 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
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
// by contacting <sales@documize.com>.
//
// https://documize.com
@ -30,6 +30,8 @@ export default Ember.Component.extend({
onAction2: null,
offset: "5px 0",
targetOffset: "10px 0",
constrainToWindow: true,
constrainToScrollParent: true,
hasSecondButton: Ember.computed('button2', 'color2', function() {
return is.not.empty(this.get('button2')) && is.not.empty(this.get('color2'));
@ -106,4 +108,4 @@ export default Ember.Component.extend({
}
}
}
});
});

View file

@ -1,11 +1,11 @@
// 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
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
// by contacting <sales@documize.com>.
//
// https://documize.com
@ -13,17 +13,24 @@ import Ember from 'ember';
import NotifierMixin from '../../mixins/notifier';
export default Ember.Component.extend(NotifierMixin, {
tagName: 'span',
selectedTemplate: {
id: "0"
},
canEditTemplate: "",
drop: null,
didReceiveAttrs() {
this.send('setTemplate', this.get('savedTemplates')[0]);
},
willDestroyElement() {
if (is.not.null(this.get('drop'))) {
this.get('drop').destroy();
this.set('drop', null);
}
},
actions: {
setTemplate(chosen) {
if (is.undefined(chosen)) {
@ -58,10 +65,16 @@ export default Ember.Component.extend(NotifierMixin, {
},
onOpenCallback() {
let self = this;
if (is.not.null(this.get('drop'))) {
return;
}
let self = this;
let folderId = this.get('folder.id');
let importUrl = this.session.appMeta.getUrl('import/folder/' + folderId);
Dropzone.options.uploadDocuments = false;
let dzone = new Dropzone("#upload-documents", {
headers: {
'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
});
this.on("queuecomplete", function() {});
this.on("queuecomplete", function() {
});
this.on("addedfile", function(file) {
self.attrs.onDocumentImporting(file.name);
@ -98,6 +112,8 @@ export default Ember.Component.extend(NotifierMixin, {
dzone.on("complete", function(file) {
dzone.removeFile(file);
});
this.set('drop', dzone);
}
}
});
});

View file

@ -1,5 +1,6 @@
.page-container {
padding-top: 60px;
min-height: 500px; //ensure dropdowns render in viewport
}
.copyright {

View file

@ -4,6 +4,7 @@
</div>
<p class="heading">Or use a template:</p>
<ul class="start-document-options" style="min-width:185px;">
{{#each savedTemplates key="id" as |template|}}
<li class="option {{if template.selected "selected"}}" {{action 'setTemplate' template}}>

View file

@ -30,7 +30,7 @@ const (
// AppVersion does what it says
// 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
AppVersion = "12.1"
AppVersion = "12.3"
)
var port, certFile, keyFile, forcePort2SSL string

View file

@ -26,8 +26,8 @@ func (*table) Meta() TypeMeta {
section := TypeMeta{}
section.ID = "81a2ea93-2dfc-434d-841e-54b832492c92"
section.Title = "Table"
section.Description = "Table with rows, columns and formatting"
section.Title = "Tabular"
section.Description = "Rows, columns and formatting for tabular data"
section.ContentType = "table"
section.Order = 9996