Skip to content

Commit

Permalink
Merge pull request #1055 from versionpress/984-ajax-error-output
Browse files Browse the repository at this point in the history
Make AJAX work with PHP error / notice output
  • Loading branch information
JanVoracek committed May 26, 2016
2 parents 9a3808e + e727132 commit e4b366d
Show file tree
Hide file tree
Showing 28 changed files with 321 additions and 628 deletions.
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"devDependencies": {
"chai": "3.4.1",
"gulp-tslint": "3.6.0",
"karma": "0.13.15",
"karma": "0.13.22",
"karma-chai": "0.1.0",
"karma-chai-sinon": "0.1.5",
"karma-chrome-launcher": "0.2.1",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/BulkActionPanel/BulkActionPanel.react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default class BulkActionPanel extends React.Component<BulkActionPanelProp
/>
<div className={'BulkActionPanel-note' + (selected.length === 0 ? ' hide' : '')}>
({selected.length} {selected.length === 1 ? 'change' : 'changes'} selected;{' '}
<a className='BulkActionPanel-clear' href="#" onClick={this.onClearSelection.bind(this)}>clear selection</a>
<a className='BulkActionPanel-clear' href='#' onClick={this.onClearSelection.bind(this)}>clear selection</a>
)
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Commits/CommitOverview.react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ export default class CommitOverview extends React.Component<CommitOverviewProps,
<li className='environment'>
<em>Environment: {this.props.commit.environment}</em>
</li>
)
);
}

private expandList(listKey) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Commits/Commits.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface Commit {
name: string;
email: string;
avatar: string;
}
};
}

interface Change {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Commits/CommitsTable.react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default class CommitsTable extends React.Component<CommitsTableProps, {}>
const displaySelectAll = this.props.commits.some((commit: Commit) => commit.canUndo);

if (!displaySelectAll) {
return <td className='column-cb' />
return <td className='column-cb' />;
}

const allSelected = !_.differenceBy(selectableCommits, this.props.selected, ((value: Commit) => value.hash)).length;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Commits/CommitsTableRowSummary.react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export default class CommitsTableRowSummary extends React.Component<CommitsTable
if (!this.props.enableActions) {
return;
}

const target = e.target as HTMLInputElement;
let checked;

Expand Down
61 changes: 0 additions & 61 deletions frontend/src/Commits/__tests__/CommitsTable-test.ts

This file was deleted.

79 changes: 0 additions & 79 deletions frontend/src/Commits/__tests__/CommitsTableRowSummary-test.ts

This file was deleted.

2 changes: 2 additions & 0 deletions frontend/src/Commits/revertDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/// <reference path='../../typings/typings.d.ts' />

/* tslint:disable:variable-name */

import * as React from 'react';
import * as request from 'superagent';
import * as portal from '../common/portal';
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/Filter/Filter.react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface FilterProps extends React.Props<JSX.Element> {
onSubmit: (values: string) => void;
}

export default class Filter extends React.Component<FilterProps,{}> {
export default class Filter extends React.Component<FilterProps, {}> {

private submitted = false;

Expand All @@ -26,7 +26,7 @@ export default class Filter extends React.Component<FilterProps,{}> {
// Prevent form submit multiple times via both onSearch and onSubmit
// (Happens only with empty input value and pressing Enter)
this.submitted = true;
setTimeout(() => { this.submitted = false }, 10);
setTimeout(() => { this.submitted = false; }, 10);

const query = e.target['s'].value;

Expand Down
9 changes: 6 additions & 3 deletions frontend/src/ServicePanel/ServicePanel.react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,22 @@ export default class ServicePanel extends React.Component<ServicePanelProps, {}>
<div className='ServicePanel welcome-panel'>
<div className='ServicePanel-inner'>
<p className='ServicePanel-warning'>
Currently, VersionPress is in an <a href="http://docs.versionpress.net/en/getting-started/about-eap"><strong>Early Access phase</strong></a>.<br />
Currently, VersionPress is in an {' '}
<a href='http://docs.versionpress.net/en/getting-started/about-eap'>
<strong>Early Access phase</strong>
</a>.<br />
As such, it might not fully support certain workflows, 3rd party plugins, hosts etc.
</p>

<h3>Community and support</h3>
<ul>
<li>
Having trouble using VersionPress?
Our <a href="http://docs.versionpress.net">documentation</a> has you covered.
Our <a href='http://docs.versionpress.net'>documentation</a> has you covered.
</li>
<li>
Can’t find what you need?
Please visit our <a href="https://github.com/versionpress/support">support&nbsp;repository</a>.
Please visit our <a href='https://github.com/versionpress/support'>support&nbsp;repository</a>.
</li>
<li>
<a href={systemInfoUrl}>System information</a> page.
Expand Down
53 changes: 0 additions & 53 deletions frontend/src/ServicePanel/__tests__/ServicePanel-test.ts

This file was deleted.

32 changes: 0 additions & 32 deletions frontend/src/ServicePanel/__tests__/ServicePanelButton-test.ts

This file was deleted.

41 changes: 41 additions & 0 deletions frontend/src/common/FlashMessage.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.FlashMessage {
&-details {
display: block;
}

a&-detailsLink {
&-displayed,
&-hidden {
position: relative;

&:after {
display: inline-block;
position: absolute;
top: 50%;
transform: translateY(-50%);
content: '';
width: 0;
height: 0;
vertical-align: middle;
}

&:focus {
box-shadow: none;
}
}
&-displayed:after {
margin-left: 2px;
border-top: 4px dashed;
border-top: 4px solid\9;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
}
&-hidden:after {
margin-left: 4px;
border-left: 4px dashed;
border-left: 4px solid\9;
border-top: 4px solid transparent;
border-bottom: 4px solid transparent;
}
}
}

0 comments on commit e4b366d

Please sign in to comment.