mirror of
https://github.com/documize/community.git
synced 2025-07-20 21:59:42 +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() {
|
||||
let editors = this.get('activity.editors');
|
||||
let viewers = this.get('activity.viewers');
|
||||
let toc = this.get('pages');
|
||||
let pages = this.get('pages');
|
||||
let sorted = [];
|
||||
|
||||
if (is.null(editors)) {
|
||||
|
@ -39,39 +39,28 @@ export default Ember.Component.extend({
|
|||
Ember.set(item, "changed", item.action === "update-page");
|
||||
Ember.set(item, "deleted", item.action === "remove-page");
|
||||
|
||||
let page = _.findWhere(toc, {
|
||||
id: item.pageId
|
||||
});
|
||||
|
||||
let page = pages.findBy('id', item.pageId);
|
||||
let title = "";
|
||||
|
||||
if (is.not.undefined(page)) {
|
||||
title = page.get('title');
|
||||
|
||||
if (item.added) {
|
||||
Ember.set(item, 'changeLabel', "added " + title);
|
||||
}
|
||||
|
||||
if (item.changed) {
|
||||
Ember.set(item, 'changeLabel', "changed " + title);
|
||||
}
|
||||
if (item.deleted || is.undefined(page)) {
|
||||
title = "removed section";
|
||||
} else {
|
||||
Ember.set(item, "deleted", true);
|
||||
|
||||
if (item.added) {
|
||||
Ember.set(item, 'changeLabel', "added section (since removed)");
|
||||
title = "added " + page.get('title');
|
||||
}
|
||||
|
||||
if (item.changed) {
|
||||
Ember.set(item, 'changeLabel', "changed section (since removed)");
|
||||
}
|
||||
|
||||
if (item.deleted) {
|
||||
Ember.set(item, 'changeLabel', "removed section");
|
||||
title = "changed " + page.get('title');
|
||||
}
|
||||
}
|
||||
|
||||
Ember.set(item, 'changeLabel', title);
|
||||
|
||||
let exists = sorted.findBy('item.pageId', item.pageId);
|
||||
|
||||
if (is.undefined(exists)) {
|
||||
sorted.pushObject({ date: item.created, item: item });
|
||||
}
|
||||
});
|
||||
|
||||
this.set('sortedItems', _.sortBy(sorted, 'date').reverse());
|
||||
|
|
|
@ -10,16 +10,16 @@ export default Ember.Controller.extend(NotifierMixin, {
|
|||
},
|
||||
|
||||
onAddSection(section) {
|
||||
this.audit.record("added-section");
|
||||
this.audit.record("added-section-" + section.get('contentType'));
|
||||
|
||||
let page = {
|
||||
documentId: this.get('model.document.id'),
|
||||
title: `${section.get('title')} Section`,
|
||||
title: `${section.get('title')}`,
|
||||
level: 1,
|
||||
sequence: 2048,
|
||||
body: "",
|
||||
contentType: section.get('contentType')
|
||||
contentType: section.get('contentType'),
|
||||
pageType: section.get('pageType')
|
||||
};
|
||||
|
||||
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.transitionToRoute('document.edit',
|
||||
this.transitionToRoute('document.section',
|
||||
this.get('model.folder.id'),
|
||||
this.get('model.folder.slug'),
|
||||
this.get('model.document.id'),
|
||||
|
|
|
@ -29,6 +29,11 @@
|
|||
|
||||
> a {
|
||||
color: $color-gray;
|
||||
@include ease-in();
|
||||
|
||||
&:hover {
|
||||
color: $color-link;
|
||||
}
|
||||
}
|
||||
|
||||
> .active {
|
||||
|
@ -44,13 +49,14 @@
|
|||
.add-tab {
|
||||
display: inline-block;
|
||||
vertical-align: text-top;
|
||||
@include ease-in();
|
||||
|
||||
> i {
|
||||
font-size: 1.5rem;
|
||||
color: $color-gray;
|
||||
|
||||
&:hover {
|
||||
color: $color-green;
|
||||
color: $color-link;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -72,6 +78,7 @@
|
|||
padding: 0;
|
||||
color: $color-gray;
|
||||
cursor: pointer;
|
||||
@include ease-in();
|
||||
|
||||
&:hover {
|
||||
color: $color-link;
|
||||
|
|
|
@ -10,8 +10,9 @@
|
|||
font-size: 1.3rem;
|
||||
list-style: none;
|
||||
cursor: pointer;
|
||||
@extend .no-select;
|
||||
color: $color-off-black;
|
||||
@extend .no-select;
|
||||
@include ease-in();
|
||||
|
||||
&:hover {
|
||||
color: $color-link;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<div class="document-section">
|
||||
|
||||
{{#if viewMode}}
|
||||
<div class="wysiwyg">
|
||||
<div>
|
||||
<h1 class="pull-left">{{model.page.title}}</h1>
|
||||
<div class="toolbar pull-right">
|
||||
<div class="buttons">
|
||||
<div class="round-button-mono" {{action 'onEdit'}}>
|
||||
|
@ -12,14 +14,13 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix" />
|
||||
{{#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>There is no undo!</p>
|
||||
{{/dropdown-dialog}}
|
||||
|
||||
<div class="wysiwyg">
|
||||
<h1>{{model.page.title}}</h1>
|
||||
{{section/base-renderer page=model.page}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
@ -27,5 +28,4 @@
|
|||
{{#if editMode}}
|
||||
{{document/document-editor document=model.document folder=model.folder page=model.page meta=model.meta onCancel=(action 'onCancel') onAction=(action 'onAction')}}
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,15 +1,8 @@
|
|||
{{#section/base-editor document=document folder=folder page=page isDirty=(action 'isDirty') onCancel=(action 'onCancel')
|
||||
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">
|
||||
<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"}}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{{/section/base-editor}}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div class="input-control">
|
||||
<label>Title</label>
|
||||
<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 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')}}
|
||||
|
||||
<div class="pull-left" style="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="pull-left width-45">
|
||||
<div class="input-control">
|
||||
<label>Gemini URL</label>
|
||||
<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}}
|
||||
</div>
|
||||
<div class="regular-button button-blue" {{ action 'auth' }}>Authenticate</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pull-left margin-left-40" style="width: 45%;">
|
||||
<div class="pull-left margin-left-40 width-45">
|
||||
{{#if authenticated}}
|
||||
<div class="input-form">
|
||||
<form>
|
||||
<div class="heading">
|
||||
<div class="title">Workspace</div>
|
||||
<div class="input-control">
|
||||
<label>Workspace</label>
|
||||
<div class="tip">Select Gemini workspace for source of items to be displayed</div>
|
||||
</div>
|
||||
<ul class="section-gemini-workspaces">
|
||||
{{#each workspaces as |card|}}
|
||||
<li class="section-gemini-workspace" data-tooltip="{{card.Title}}" data-tooltip-position="bottom center" id="gemini-workspace-{{card.Id}}">
|
||||
|
@ -45,9 +34,8 @@
|
|||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
<div class="clearfix" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="clearfix" />
|
||||
{{/if}}
|
||||
</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')}}
|
||||
|
||||
<div class="section-github-editor">
|
||||
|
||||
{{#if authenticated}}
|
||||
|
||||
<div class="pull-left width-45">
|
||||
<div class="input-control">
|
||||
<label>Select repository</label>
|
||||
|
@ -47,28 +44,19 @@
|
|||
<span class="github-list-title">{{list.repo}} {{#if list.private}}(private){{/if}}</span>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class="clearfix" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{else}}
|
||||
|
||||
<div class="pull-left width-50">
|
||||
<div class="input-form">
|
||||
<form>
|
||||
<div class="heading">
|
||||
<div class="title">Authentication</div>
|
||||
<div class="pull-left width-45">
|
||||
<div class="input-control">
|
||||
<label>Authentication</label>
|
||||
<div class="tip">Click to authenticate with Github</div>
|
||||
</div>
|
||||
<div class="regular-button button-blue" {{ action 'auth' }}>Authenticate</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
|
||||
{{/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')}}
|
||||
|
||||
<div class="pull-left width-45">
|
||||
<div class="input-form">
|
||||
<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">
|
||||
<label>API Key</label>
|
||||
<label>Papertrail API Key</label>
|
||||
<div class="tip">API Token (from your profile)</div>
|
||||
{{focus-input id="papertrail-apitoken" type="password" value=config.APIToken }}
|
||||
</div>
|
||||
|
@ -25,24 +16,18 @@
|
|||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#if authenticated}}
|
||||
<div class="pull-left width-10"> </div>
|
||||
<div class="pull-left width-45">
|
||||
<div class="input-form">
|
||||
<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">
|
||||
<label>Search Query</label>
|
||||
<div class="tip">e.g. bob OR ("some phrase" AND sally)</div>
|
||||
<label>Search query</label>
|
||||
<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}}
|
||||
</div>
|
||||
<div class="input-control">
|
||||
<label>Maximum Results</label>
|
||||
<label>Maximum results</label>
|
||||
<div class="tip">How many log entries do you want?</div>
|
||||
{{input id="papertrail-max" type="number" class="mousetrap" value=config.max}}
|
||||
</div>
|
||||
|
@ -53,7 +38,6 @@
|
|||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class="clearfix" />
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
<div class="pull-left width-10"> </div>
|
||||
-->
|
||||
<div class="pull-left width-45">
|
||||
<div class="input-form">
|
||||
<div class="input-control">
|
||||
<label>Individual Board</label>
|
||||
<div class="tip">Select board</div>
|
||||
|
@ -71,28 +70,21 @@
|
|||
<span class="trello-list-title">{{list.name}}</span>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class="clearfix" />
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{else}}
|
||||
|
||||
<div class="pull-left width-50">
|
||||
<div class="input-form">
|
||||
<form>
|
||||
<div class="heading">
|
||||
<div class="title">Authentication</div>
|
||||
<div class="input-control">
|
||||
<label>Authentication</label>
|
||||
<div class="tip">Click to authenticate with Trello</div>
|
||||
</div>
|
||||
<div class="regular-button button-blue" {{ action 'auth' }}>Authenticate</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{/section/base-editor}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue