1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-09 07:25:23 +02:00

Merge branch 'master' into github-extension

This commit is contained in:
Elliott Stoneham 2016-06-24 22:26:15 +01:00
commit 8208bdd222
10 changed files with 27 additions and 20 deletions

View file

@ -67,6 +67,7 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
willDestroyElement() { willDestroyElement() {
this.eventBus.unsubscribe('documentPageAdded'); this.eventBus.unsubscribe('documentPageAdded');
this.destroyTooltips();
}, },
onDocumentPageAdded(pageId) { onDocumentPageAdded(pageId) {

View file

@ -22,6 +22,10 @@ export default Ember.Component.extend(TooltipMixin, {
} }
}, },
willDestroyElement() {
this.destroyTooltips();
},
actions: { actions: {
editPage(id) { editPage(id) {
this.attrs.onEditPage(id); this.attrs.onEditPage(id);

View file

@ -54,6 +54,9 @@ export default Ember.Component.extend({
tetherOptions: { tetherOptions: {
offset: self.offset, offset: self.offset,
targetOffset: self.targetOffset targetOffset: self.targetOffset
// optimizations: {
// moveElement: false
// }
}, },
remove: true remove: true
}); });

View file

@ -197,7 +197,6 @@ export default Ember.Controller.extend(NotifierMixin, {
}, },
onDocumentDelete() { onDocumentDelete() {
console.log("deleting " + this.get('model.id'));
let self = this; let self = this;
this.get('documentService').deleteDocument(this.get('model.id')).then(function() { this.get('documentService').deleteDocument(this.get('model.id')).then(function() {

View file

@ -7,11 +7,9 @@
<i class="material-icons">mode_edit</i> <i class="material-icons">mode_edit</i>
</div> </div>
{{/link-to}} {{/link-to}}
{{#unless page.firstPage}} <div class="round-button-mono page-delete-button" data-tooltip="Delete" data-tooltip-position="top center" {{action 'deletePage' page.id}}>
<div class="round-button-mono page-delete-button" data-tooltip="Delete" data-tooltip-position="top center" {{action 'deletePage' page.id}}> <i class="material-icons">delete</i>
<i class="material-icons">delete</i> </div>
</div>
{{/unless}}
{{/if}} {{/if}}
</div> </div>
</div> </div>

View file

@ -14,7 +14,7 @@
{{button2}} {{button2}}
</div> </div>
{{/if}} {{/if}}
<div class="flat-button {{color}}" {{action 'onAction'}}> <div class="flat-button {{color}} dropdown-dialog-action-button" {{action 'onAction'}}>
{{button}} {{button}}
</div> </div>
</div> </div>

View file

@ -28,9 +28,9 @@
{{/dropdown-dialog}} {{/dropdown-dialog}}
{{else}} {{else}}
{{#if folderService.canEditCurrentFolder}} {{#if folderService.canEditCurrentFolder}}
<div class="regular-button button-green" id="start-document-button" data-tooltip="Add or import document" data-tooltip-position="top center"> <div class="regular-button button-green" id="start-document-button" data-tooltip="Add new content" data-tooltip-position="top center">
<i class="material-icons">add</i> <i class="material-icons">add</i>
<div class="name">Document</div> <div class="name">Content</div>
</div> </div>
{{/if}} {{/if}}
{{#if isFolderOwner}} {{#if isFolderOwner}}
@ -75,9 +75,9 @@
<div class="box"> <div class="box">
<div class="regular-button button-green"> <div class="regular-button button-green">
<i class="material-icons">add</i> <i class="material-icons">add</i>
<div class="name">document</div> <div class="name">content</div>
</div> </div>
<div class="message">Start a new document or <br/>import .doc .docx, .txt .md files</div> <div class="message">Start with a content template or <br/>import .doc .docx, .txt .md files</div>
</div> </div>
</div> </div>
{{/if}} {{/if}}

View file

@ -1,6 +1,6 @@
{{#dropdown-dialog target="start-document-button" position="bottom right" button="Add" color="flat-green" onAction=(action 'startDocument') button2=canEditTemplate color2="flat-blue" onAction2=(action 'editTemplate') onOpenCallback=(action 'onOpenCallback')}} {{#dropdown-dialog target="start-document-button" position="bottom right" button="Add" color="flat-green" onAction=(action 'startDocument') button2=canEditTemplate color2="flat-blue" onAction2=(action 'editTemplate') onOpenCallback=(action 'onOpenCallback')}}
<div class="upload-container"> <div class="upload-container">
<div id="upload-documents" class="regular-button button-green">Import Files</div> <div id="upload-documents" class="regular-button button-green">Import Word / Markdown</div>
</div> </div>
<p class="heading">Or use a template:</p> <p class="heading">Or use a template:</p>

View file

@ -40,7 +40,6 @@ function getAppUrl(domain) {
} }
function isAjaxAccessError(reason) { function isAjaxAccessError(reason) {
console.log(reason);
if (typeof reason === "undefined") { if (typeof reason === "undefined") {
return false; return false;
} }

View file

@ -12,11 +12,14 @@
<meta name="author" content="Documize" /> <meta name="author" content="Documize" />
<style> <style>
#ember-testing-container { #ember-testing-container, #ember-testing-container * {
/* Set position static to short-circuit Hubspot Tether's positioning */ /* Set position static to short-circuit Hubspot Tether's positioning */
/* https://github.com/HubSpot/tether/pull/98/ */ /* https://github.com/HubSpot/tether/pull/98/ */
position: static !important; position: static !important;
} }
.tether-container * {
z-index: 9999;
}
</style> </style>
{{content-for "head"}} {{content-for "head"}}