mirror of
https://github.com/documize/community.git
synced 2025-07-21 14:19:43 +02:00
form styles fixed
This commit is contained in:
parent
8caa53bed7
commit
3965f6e94c
11 changed files with 195 additions and 253 deletions
|
@ -17,7 +17,7 @@ export default Ember.Component.extend({
|
||||||
didReceiveAttrs() {
|
didReceiveAttrs() {
|
||||||
let editors = this.get('activity.editors');
|
let editors = this.get('activity.editors');
|
||||||
let viewers = this.get('activity.viewers');
|
let viewers = this.get('activity.viewers');
|
||||||
let toc = this.get('pages');
|
let pages = this.get('pages');
|
||||||
let sorted = [];
|
let sorted = [];
|
||||||
|
|
||||||
if (is.null(editors)) {
|
if (is.null(editors)) {
|
||||||
|
@ -39,39 +39,28 @@ export default Ember.Component.extend({
|
||||||
Ember.set(item, "changed", item.action === "update-page");
|
Ember.set(item, "changed", item.action === "update-page");
|
||||||
Ember.set(item, "deleted", item.action === "remove-page");
|
Ember.set(item, "deleted", item.action === "remove-page");
|
||||||
|
|
||||||
let page = _.findWhere(toc, {
|
let page = pages.findBy('id', item.pageId);
|
||||||
id: item.pageId
|
|
||||||
});
|
|
||||||
|
|
||||||
let title = "";
|
let title = "";
|
||||||
|
|
||||||
if (is.not.undefined(page)) {
|
if (item.deleted || is.undefined(page)) {
|
||||||
title = page.get('title');
|
title = "removed section";
|
||||||
|
|
||||||
if (item.added) {
|
|
||||||
Ember.set(item, 'changeLabel', "added " + title);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.changed) {
|
|
||||||
Ember.set(item, 'changeLabel', "changed " + title);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
Ember.set(item, "deleted", true);
|
|
||||||
|
|
||||||
if (item.added) {
|
if (item.added) {
|
||||||
Ember.set(item, 'changeLabel', "added section (since removed)");
|
title = "added " + page.get('title');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.changed) {
|
if (item.changed) {
|
||||||
Ember.set(item, 'changeLabel', "changed section (since removed)");
|
title = "changed " + page.get('title');
|
||||||
}
|
|
||||||
|
|
||||||
if (item.deleted) {
|
|
||||||
Ember.set(item, 'changeLabel', "removed section");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Ember.set(item, 'changeLabel', title);
|
||||||
|
|
||||||
|
let exists = sorted.findBy('item.pageId', item.pageId);
|
||||||
|
|
||||||
|
if (is.undefined(exists)) {
|
||||||
sorted.pushObject({ date: item.created, item: item });
|
sorted.pushObject({ date: item.created, item: item });
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.set('sortedItems', _.sortBy(sorted, 'date').reverse());
|
this.set('sortedItems', _.sortBy(sorted, 'date').reverse());
|
||||||
|
|
|
@ -10,16 +10,16 @@ export default Ember.Controller.extend(NotifierMixin, {
|
||||||
},
|
},
|
||||||
|
|
||||||
onAddSection(section) {
|
onAddSection(section) {
|
||||||
this.audit.record("added-section");
|
|
||||||
this.audit.record("added-section-" + section.get('contentType'));
|
this.audit.record("added-section-" + section.get('contentType'));
|
||||||
|
|
||||||
let page = {
|
let page = {
|
||||||
documentId: this.get('model.document.id'),
|
documentId: this.get('model.document.id'),
|
||||||
title: `${section.get('title')} Section`,
|
title: `${section.get('title')}`,
|
||||||
level: 1,
|
level: 1,
|
||||||
sequence: 2048,
|
sequence: 2048,
|
||||||
body: "",
|
body: "",
|
||||||
contentType: section.get('contentType')
|
contentType: section.get('contentType'),
|
||||||
|
pageType: section.get('pageType')
|
||||||
};
|
};
|
||||||
|
|
||||||
let data = this.get('store').normalize('page', page);
|
let data = this.get('store').normalize('page', page);
|
||||||
|
@ -40,7 +40,7 @@ export default Ember.Controller.extend(NotifierMixin, {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.get('documentService').addPage(this.get('model.document.id'), model).then((newPage) => {
|
this.get('documentService').addPage(this.get('model.document.id'), model).then((newPage) => {
|
||||||
this.transitionToRoute('document.edit',
|
this.transitionToRoute('document.section',
|
||||||
this.get('model.folder.id'),
|
this.get('model.folder.id'),
|
||||||
this.get('model.folder.slug'),
|
this.get('model.folder.slug'),
|
||||||
this.get('model.document.id'),
|
this.get('model.document.id'),
|
||||||
|
|
|
@ -29,6 +29,11 @@
|
||||||
|
|
||||||
> a {
|
> a {
|
||||||
color: $color-gray;
|
color: $color-gray;
|
||||||
|
@include ease-in();
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $color-link;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> .active {
|
> .active {
|
||||||
|
@ -44,13 +49,14 @@
|
||||||
.add-tab {
|
.add-tab {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: text-top;
|
vertical-align: text-top;
|
||||||
|
@include ease-in();
|
||||||
|
|
||||||
> i {
|
> i {
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
color: $color-gray;
|
color: $color-gray;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: $color-green;
|
color: $color-link;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,6 +78,7 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
color: $color-gray;
|
color: $color-gray;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@include ease-in();
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: $color-link;
|
color: $color-link;
|
||||||
|
|
|
@ -10,8 +10,9 @@
|
||||||
font-size: 1.3rem;
|
font-size: 1.3rem;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@extend .no-select;
|
|
||||||
color: $color-off-black;
|
color: $color-off-black;
|
||||||
|
@extend .no-select;
|
||||||
|
@include ease-in();
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: $color-link;
|
color: $color-link;
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<div class="document-section">
|
<div class="document-section">
|
||||||
|
|
||||||
{{#if viewMode}}
|
{{#if viewMode}}
|
||||||
|
<div class="wysiwyg">
|
||||||
|
<div>
|
||||||
|
<h1 class="pull-left">{{model.page.title}}</h1>
|
||||||
<div class="toolbar pull-right">
|
<div class="toolbar pull-right">
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<div class="round-button-mono" {{action 'onEdit'}}>
|
<div class="round-button-mono" {{action 'onEdit'}}>
|
||||||
|
@ -12,14 +14,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="clearfix" />
|
<div class="clearfix" />
|
||||||
{{#dropdown-dialog target="delete-section-button" position="bottom right" button="Delete" color="flat-red" onAction=(action 'onDelete')}}
|
{{#dropdown-dialog target="delete-section-button" position="bottom right" button="Delete" color="flat-red" onAction=(action 'onDelete')}}
|
||||||
<p>Are you sure you want to delete this section?</p>
|
<p>Are you sure you want to delete this section?</p>
|
||||||
<p>There is no undo!</p>
|
<p>There is no undo!</p>
|
||||||
{{/dropdown-dialog}}
|
{{/dropdown-dialog}}
|
||||||
|
|
||||||
<div class="wysiwyg">
|
|
||||||
<h1>{{model.page.title}}</h1>
|
|
||||||
{{section/base-renderer page=model.page}}
|
{{section/base-renderer page=model.page}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -27,5 +28,4 @@
|
||||||
{{#if editMode}}
|
{{#if editMode}}
|
||||||
{{document/document-editor document=model.document folder=model.folder page=model.page meta=model.meta onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
{{document/document-editor document=model.document folder=model.folder page=model.page meta=model.meta onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,15 +1,8 @@
|
||||||
{{#section/base-editor document=document folder=folder page=page isDirty=(action 'isDirty') onCancel=(action 'onCancel')
|
{{#section/base-editor document=document folder=folder page=page isDirty=(action 'isDirty') onCancel=(action 'onCancel')
|
||||||
onAction=(action 'onAction')}}
|
onAction=(action 'onAction')}}
|
||||||
<div class="input-form">
|
|
||||||
<form>
|
|
||||||
<div class="heading">
|
|
||||||
<div class="title">Airtable</div>
|
|
||||||
<div class="tip">Paste the Airtable embed code snippet</div>
|
|
||||||
</div>
|
|
||||||
<div class="input-control">
|
<div class="input-control">
|
||||||
<label>Embed Code</label>
|
<label>Airtable embed code</label>
|
||||||
|
<div class="tip">Paste the Airtable embed code snippet</div>
|
||||||
{{textarea value=data rows="3" id="airtable-embed-code" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"}}
|
{{textarea value=data rows="3" id="airtable-embed-code" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"}}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
{{/section/base-editor}}
|
{{/section/base-editor}}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<div class="input-control">
|
<div class="input-control">
|
||||||
<label>Title</label>
|
<label>Title</label>
|
||||||
<div class="tip">{{tip}}</div>
|
<div class="tip">{{tip}}</div>
|
||||||
{{input type='text' id="page-title" value=page.title class="mousetrap"}}
|
{{focus-input type='text' id="page-title" value=page.title class="mousetrap"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="buttons pull-right">
|
<div class="buttons pull-right">
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
{{#section/base-editor document=document folder=folder page=page busy=waiting tip="Gemini enterprise issue and ticketing software (https://www.countersoft.com)" isDirty=(action 'isDirty') onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
{{#section/base-editor document=document folder=folder page=page busy=waiting tip="Gemini enterprise issue and ticketing software (https://www.countersoft.com)" isDirty=(action 'isDirty') onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
||||||
|
|
||||||
<div class="pull-left" style="width: 45%;">
|
<div class="pull-left width-45">
|
||||||
<div class="input-form">
|
|
||||||
<form>
|
|
||||||
<div class="heading">
|
|
||||||
<div class="title">Credentials</div>
|
|
||||||
<div class="tip">URL to the Gemini instance</div>
|
|
||||||
</div>
|
|
||||||
<div class="input-control">
|
<div class="input-control">
|
||||||
<label>Gemini URL</label>
|
<label>Gemini URL</label>
|
||||||
<div class="tip">e.g. http://helpdesk.countersoft.com</div>
|
<div class="tip">e.g. http://helpdesk.countersoft.com</div>
|
||||||
|
@ -23,18 +17,13 @@
|
||||||
{{input id="gemini-apikey" type="password" value=config.APIKey readonly=isReadonly}}
|
{{input id="gemini-apikey" type="password" value=config.APIKey readonly=isReadonly}}
|
||||||
</div>
|
</div>
|
||||||
<div class="regular-button button-blue" {{ action 'auth' }}>Authenticate</div>
|
<div class="regular-button button-blue" {{ action 'auth' }}>Authenticate</div>
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pull-left margin-left-40" style="width: 45%;">
|
<div class="pull-left margin-left-40 width-45">
|
||||||
{{#if authenticated}}
|
{{#if authenticated}}
|
||||||
<div class="input-form">
|
<div class="input-control">
|
||||||
<form>
|
<label>Workspace</label>
|
||||||
<div class="heading">
|
|
||||||
<div class="title">Workspace</div>
|
|
||||||
<div class="tip">Select Gemini workspace for source of items to be displayed</div>
|
<div class="tip">Select Gemini workspace for source of items to be displayed</div>
|
||||||
</div>
|
|
||||||
<ul class="section-gemini-workspaces">
|
<ul class="section-gemini-workspaces">
|
||||||
{{#each workspaces as |card|}}
|
{{#each workspaces as |card|}}
|
||||||
<li class="section-gemini-workspace" data-tooltip="{{card.Title}}" data-tooltip-position="bottom center" id="gemini-workspace-{{card.Id}}">
|
<li class="section-gemini-workspace" data-tooltip="{{card.Title}}" data-tooltip-position="bottom center" id="gemini-workspace-{{card.Id}}">
|
||||||
|
@ -45,9 +34,8 @@
|
||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
<div class="clearfix" />
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="clearfix" />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
{{#section/base-editor document=document folder=folder page=page busy=busy tip="GitHub is how people build software. (https://github.com)" isDirty=(action 'isDirty') onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
{{#section/base-editor document=document folder=folder page=page busy=busy tip="GitHub is how people build software. (https://github.com)" isDirty=(action 'isDirty') onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
||||||
|
|
||||||
<div class="section-github-editor">
|
<div class="section-github-editor">
|
||||||
|
|
||||||
{{#if authenticated}}
|
{{#if authenticated}}
|
||||||
|
|
||||||
<div class="pull-left width-45">
|
<div class="pull-left width-45">
|
||||||
<div class="input-control">
|
<div class="input-control">
|
||||||
<label>Select repository</label>
|
<label>Select repository</label>
|
||||||
|
@ -47,28 +44,19 @@
|
||||||
<span class="github-list-title">{{list.repo}} {{#if list.private}}(private){{/if}}</span>
|
<span class="github-list-title">{{list.repo}} {{#if list.private}}(private){{/if}}</span>
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
</div>
|
||||||
<div class="clearfix" />
|
<div class="clearfix" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
{{else}}
|
{{else}}
|
||||||
|
<div class="pull-left width-45">
|
||||||
<div class="pull-left width-50">
|
<div class="input-control">
|
||||||
<div class="input-form">
|
<label>Authentication</label>
|
||||||
<form>
|
|
||||||
<div class="heading">
|
|
||||||
<div class="title">Authentication</div>
|
|
||||||
<div class="tip">Click to authenticate with Github</div>
|
<div class="tip">Click to authenticate with Github</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="regular-button button-blue" {{ action 'auth' }}>Authenticate</div>
|
<div class="regular-button button-blue" {{ action 'auth' }}>Authenticate</div>
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{/section/base-editor}}
|
{{/section/base-editor}}
|
||||||
|
|
|
@ -1,18 +1,9 @@
|
||||||
{{#section/base-editor document=document folder=folder page=page busy=waiting tip="Papertrail cloud logging service (https://papertrailapp.com)" isDirty=(action 'isDirty') onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
{{#section/base-editor document=document folder=folder page=page busy=waiting tip="Papertrail cloud logging service (https://papertrailapp.com)" isDirty=(action 'isDirty') onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
||||||
|
|
||||||
<div class="pull-left width-45">
|
<div class="pull-left width-45">
|
||||||
<div class="input-form">
|
|
||||||
<form {{ action 'auth' on="submit" }} >
|
<form {{ action 'auth' on="submit" }} >
|
||||||
<div class="heading">
|
|
||||||
<div class="title">Papertrail Authentication
|
|
||||||
{{#if authenticated}}
|
|
||||||
Complete
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
<div class="tip">Provide your Papertrail API token</div>
|
|
||||||
</div>
|
|
||||||
<div class="input-control">
|
<div class="input-control">
|
||||||
<label>API Key</label>
|
<label>Papertrail API Key</label>
|
||||||
<div class="tip">API Token (from your profile)</div>
|
<div class="tip">API Token (from your profile)</div>
|
||||||
{{focus-input id="papertrail-apitoken" type="password" value=config.APIToken }}
|
{{focus-input id="papertrail-apitoken" type="password" value=config.APIToken }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,24 +16,18 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
{{#if authenticated}}
|
{{#if authenticated}}
|
||||||
<div class="pull-left width-10"> </div>
|
<div class="pull-left width-10"> </div>
|
||||||
<div class="pull-left width-45">
|
<div class="pull-left width-45">
|
||||||
<div class="input-form">
|
|
||||||
<form {{action 'onAction' on="submit"}}>
|
<form {{action 'onAction' on="submit"}}>
|
||||||
<div class="heading">
|
|
||||||
<div class="title">Log Filter</div>
|
|
||||||
<div class="tip">Determine which log entries you want to display</div>
|
|
||||||
</div>
|
|
||||||
<div class="input-control">
|
<div class="input-control">
|
||||||
<label>Search Query</label>
|
<label>Search query</label>
|
||||||
<div class="tip">e.g. bob OR ("some phrase" AND sally)</div>
|
<div class="tip">Determine which log entries you want to display e.g. bob OR ("some phrase" AND sally)</div>
|
||||||
{{input id="papertrail-query" type="text" class="mousetrap" value=config.query}}
|
{{input id="papertrail-query" type="text" class="mousetrap" value=config.query}}
|
||||||
</div>
|
</div>
|
||||||
<div class="input-control">
|
<div class="input-control">
|
||||||
<label>Maximum Results</label>
|
<label>Maximum results</label>
|
||||||
<div class="tip">How many log entries do you want?</div>
|
<div class="tip">How many log entries do you want?</div>
|
||||||
{{input id="papertrail-max" type="number" class="mousetrap" value=config.max}}
|
{{input id="papertrail-max" type="number" class="mousetrap" value=config.max}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -53,7 +38,6 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div class="clearfix" />
|
<div class="clearfix" />
|
||||||
|
|
|
@ -49,7 +49,6 @@
|
||||||
<div class="pull-left width-10"> </div>
|
<div class="pull-left width-10"> </div>
|
||||||
-->
|
-->
|
||||||
<div class="pull-left width-45">
|
<div class="pull-left width-45">
|
||||||
<div class="input-form">
|
|
||||||
<div class="input-control">
|
<div class="input-control">
|
||||||
<label>Individual Board</label>
|
<label>Individual Board</label>
|
||||||
<div class="tip">Select board</div>
|
<div class="tip">Select board</div>
|
||||||
|
@ -71,28 +70,21 @@
|
||||||
<span class="trello-list-title">{{list.name}}</span>
|
<span class="trello-list-title">{{list.name}}</span>
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
</div>
|
||||||
<div class="clearfix" />
|
<div class="clearfix" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
||||||
<div class="pull-left width-50">
|
<div class="pull-left width-50">
|
||||||
<div class="input-form">
|
<div class="input-control">
|
||||||
<form>
|
<label>Authentication</label>
|
||||||
<div class="heading">
|
|
||||||
<div class="title">Authentication</div>
|
|
||||||
<div class="tip">Click to authenticate with Trello</div>
|
<div class="tip">Click to authenticate with Trello</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="regular-button button-blue" {{ action 'auth' }}>Authenticate</div>
|
<div class="regular-button button-blue" {{ action 'auth' }}>Authenticate</div>
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{/section/base-editor}}
|
{{/section/base-editor}}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue