Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit linter auto-fixes across JS and JSX files #4694

Merged
merged 1 commit into from
May 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class EmailPanel extends Component {
labelType="inline"
tooltipMessage={Localization.get("plEmailAddress.Help")}
label={Localization.get("plEmailAddress")}
/>
/>
<SingleLineInputWithError
error={state.error.email && state.triedToSubmit}
inputStyle={{ marginBottom: "15px" }}
Expand All @@ -119,24 +119,24 @@ class EmailPanel extends Component {
labelType="inline"
tooltipMessage={Localization.get("plSubject.Help")}
label={Localization.get("plSubject")}
/>
/>
<SingleLineInputWithError
error={false}
inputStyle={{ marginBottom: "15px" }}
value={state.emailRequest.Subject}
onChange={this.onEmailValueChange.bind(this, "Subject")}
/>
/>
</InputGroup>
<InputGroup>
<Label
labelType="inline"
tooltipMessage={Localization.get("SendMessage.Help")}
label={Localization.get("SendMessage")}
/>
/>
<MultiLineInput
value={state.emailRequest.Message}
onChange={this.onEmailValueChange.bind(this, "Message")}
/>
/>
</InputGroup>
<div className="action-buttons">
<Button type="secondary" onClick={this.onCloseEmailPanel.bind(this)}>{Localization.get("btnCancel")}</Button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import PropTypes from 'prop-types';
import PropTypes from "prop-types";
import React, { Component } from "react";
import { connect } from "react-redux";
import {
log as LogActions
} from "../../actions";
import LogItemRow from "./LogItemRow";
import EmailPanel from "./EmailPanel";
import { Checkbox, Dropdown, Pager, TextOverflowWrapper } from "@dnnsoftware/dnn-react-common"
import { Checkbox, Dropdown, Pager, TextOverflowWrapper } from "@dnnsoftware/dnn-react-common";
import "./style.less";
import util from "../../utils";
import Localization from "localization";
Expand Down Expand Up @@ -272,7 +272,7 @@ class AdminLogPanelBody extends Component {
pageSizeOptionText={"{0} results per page"}
summaryText={"Showing {0}-{1} of {2} results"}
culture={util.utilities.getCulture() }
/>
/>
</div>
);
}
Expand Down Expand Up @@ -319,7 +319,7 @@ class AdminLogPanelBody extends Component {
options={portalOptions}
withBorder={false}
onSelect={this.onSelectPortal.bind(this) }
/>
/>
</div>
}
{state.logTypeList.length > 0 &&
Expand All @@ -330,7 +330,7 @@ class AdminLogPanelBody extends Component {
options={logTypeOptions}
withBorder={false}
onSelect={this.onSelectLogType.bind(this) }
/>
/>
</div>
}
{(canEdit || util.settings.isAdmin) &&
Expand All @@ -340,7 +340,7 @@ class AdminLogPanelBody extends Component {
text={Localization.get("btnEmail") }
maxWidth={100}
enabled={canEdit || util.settings.isAdmin}
/>
/>
</div>
<div className="collapsible-content">
<EmailPanel
Expand All @@ -356,14 +356,14 @@ class AdminLogPanelBody extends Component {
<TextOverflowWrapper
text={Localization.get("btnDelete") }
maxWidth={115}
/>
/>
</div>
}
{isHost && <div className="toolbar-button toolbar-button-actions" onClick={this.onClearLog.bind(this) } style={{ borderLeft: "none", width: "15%" }}>
<TextOverflowWrapper
text={Localization.get("btnClear") }
maxWidth={90}
/>
/>
</div>
}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import PropTypes from 'prop-types';
import PropTypes from "prop-types";
import React, { Component } from "react";
import { connect } from "react-redux";
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import PropTypes from 'prop-types';
import PropTypes from "prop-types";
import React from "react";
import styles from "./style.less";
import { ArrowBack } from "@dnnsoftware/dnn-react-common";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const pageSeoActions = {
utils.notifyError(response.ErrorMessage);

// DNN-30998: Adding SuggestedUrl returned by the server in case of validation errors
if(response.SuggestedUrlPath)
if (response.SuggestedUrlPath)
{
dispatch({
type: ActionTypes.SEO_CHANGE_URL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import DisplayInMenu from "./DisplayInMenu";
import EnableScheduling from "./EnableScheduling";

class AddPages extends Component {
constructor(props){
constructor(props) {
super(props);
this._isFinishLoad = false;

Expand Down
78 changes: 39 additions & 39 deletions Dnn.AdminExperience/ClientSide/Pages.Web/src/components/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class App extends Component {
}

componentDidUpdate(prevProps) {
if (this.props.error && this.props.error && this.props.error !== prevProps.error){
if (this.props.error && this.props.error && this.props.error !== prevProps.error) {
const errorMessage = (this.props.error && this.props.error.message) || Localization.get("AnErrorOccurred");
utils.notifyError(errorMessage);
}
Expand Down Expand Up @@ -259,19 +259,19 @@ class App extends Component {
}
break;
case Array.isArray(item.childListItems) === true: {
const lastIndex = item.childListItems.length - 1;
if (item.childListItems[lastIndex].name === page.name) {
item.childListItems.pop();
}
item.childListItems.push(page);
item.childCount = item.childListItems.length;
if (page.canAddContentToPage)
this.onLoadPage(page.id);
else {
this.onNoPermissionSelection(page.id);
}
break;
const lastIndex = item.childListItems.length - 1;
if (item.childListItems[lastIndex].name === page.name) {
item.childListItems.pop();
}
item.childListItems.push(page);
item.childCount = item.childListItems.length;
if (page.canAddContentToPage)
this.onLoadPage(page.id);
else {
this.onNoPermissionSelection(page.id);
}
break;
}
}
item.isOpen = true;
updateStore(list);
Expand Down Expand Up @@ -426,7 +426,7 @@ class App extends Component {
let runUpdateStore = null;
let pageList = null;

if(parentId !== null && parentId !== -1) {
if (parentId !== null && parentId !== -1) {
this._traverse((item, list, updateStore) => {
if (item.id === parentId) {
item.isOpen = true;
Expand Down Expand Up @@ -531,18 +531,18 @@ class App extends Component {
this.props.getNewPage(parentPage).then(()=>{
if (parentPage && parentPage.id) {
this.props.getChildPageList(parentPage.id)
.then(pageChildItems => {
this._traverse((item, list, update) => {
const updateChildItems = () => {
const newPageChildItems = pageChildItems.concat(this.props.selectedPage);
item.childListItems = newPageChildItems;
item.isOpen = true;
item.hasChildren = true;
update(list);
};
(item.id === parentPage.id) ? updateChildItems() : null;
.then(pageChildItems => {
this._traverse((item, list, update) => {
const updateChildItems = () => {
const newPageChildItems = pageChildItems.concat(this.props.selectedPage);
item.childListItems = newPageChildItems;
item.isOpen = true;
item.hasChildren = true;
update(list);
};
(item.id === parentPage.id) ? updateChildItems() : null;
});
});
});
} else {
this._traverse((item, list, updateStore) => {
pageList = list;
Expand Down Expand Up @@ -782,19 +782,19 @@ class App extends Component {
this.props.selectPageSettingTab(index);
}

onSaveMultiplePages(){
onSaveMultiplePages() {
return this.props.onSaveMultiplePages(()=>{
this.props.getPageList();
});
}

onValidateMultiplePages(){
onValidateMultiplePages() {
return this.props.onValidateMultiplePages(()=>{
// stay on same page
});
}

onCancelAddMultiplePages(){
onCancelAddMultiplePages() {
const { props } = this;

if (props.dirtyBulkPage) {
Expand All @@ -815,13 +815,13 @@ class App extends Component {
getAddPages() {
const { props } = this;
return (
<AddPages
bulkPage={props.bulkPage}
onCancel={this.onCancelAddMultiplePages.bind(this)}
onValidate={this.onValidateMultiplePages.bind(this)}
onSave={this.onSaveMultiplePages.bind(this)}
onChangeField={props.onChangeAddMultiplePagesField}
components={props.multiplePagesComponents} />);
<AddPages
bulkPage={props.bulkPage}
onCancel={this.onCancelAddMultiplePages.bind(this)}
onValidate={this.onValidateMultiplePages.bind(this)}
onSave={this.onSaveMultiplePages.bind(this)}
onChangeField={props.onChangeAddMultiplePagesField}
components={props.multiplePagesComponents} />);
}

onCancelSaveCustomDetail(onCancelSave) {
Expand Down Expand Up @@ -867,8 +867,8 @@ class App extends Component {
getSaveAsTemplatePage() {

return (
<SaveAsTemplate
onCancel={this.onCancelSavePageAsTemplate.bind(this)} />);
<SaveAsTemplate
onCancel={this.onCancelSavePageAsTemplate.bind(this)} />);
}


Expand Down Expand Up @@ -1210,7 +1210,7 @@ class App extends Component {
},()=>this.onSearch(this.state.searchTerm));
}

clearAdvancedSearchDateInterval(){
clearAdvancedSearchDateInterval() {
let date = new Date();
this.setState({
startDate:date,
Expand Down Expand Up @@ -1554,7 +1554,7 @@ class App extends Component {
const { inSearch } = this.state;
const isListPagesAllowed = securityService.canSeePagesList();

/* eslint-disable react/no-danger */
/* eslint-disable react/no-danger */
return (

<div ref={node => this.node = node} className="pages-app personaBar-mainContainer">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ class Appearance extends Component {
const { page, onRetrieveThemes, onRetrieveThemeFiles } = this.props;

onRetrieveThemes().then(data => {
if(!data || data.success === false) {
return;
}
const { defaultPortalThemeName, defaultPortalThemeLevel } = this.props;
const selectedThemeName = page.themeName || defaultPortalThemeName;
const selectedThemeLevel = page.themeLevel || defaultPortalThemeLevel;
if (selectedThemeName) {
onRetrieveThemeFiles(selectedThemeName, selectedThemeLevel);
}
});
if (!data || data.success === false) {
return;
}
const { defaultPortalThemeName, defaultPortalThemeLevel } = this.props;
const selectedThemeName = page.themeName || defaultPortalThemeName;
const selectedThemeLevel = page.themeLevel || defaultPortalThemeLevel;
if (selectedThemeName) {
onRetrieveThemeFiles(selectedThemeName, selectedThemeLevel);
}
});
}

componentDidUpdate(prevProps) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,39 +42,39 @@ class DropdownDayPicker extends Component {
</GridCell>
<GridCell columnSize={10}>
<div id="calendar-icon"
className="calendar-icon"
dangerouslySetInnerHTML={{__html:CalendarIcon}}
onClick={()=>toggleDropdownCalendar() }/>
className="calendar-icon"
dangerouslySetInnerHTML={{__html:CalendarIcon}}
onClick={()=>toggleDropdownCalendar() }/>
</GridCell>
<div
id="calendar-dropdown"
className={dropdownIsActive ? "calendar-dropdown expand-down" : `calendar-dropdown ${dropdownIsActive !== null ? 'expand-up' : ''} ` } >
<GridCell columnSize={100} style={{padding:"20px"}}>
<GridCell columnSize={50} className="calendar">
<DayPicker
id="try-this"
month={startDate}
selectedDays={startDate}
onDayClick={(data) => onDayClick(data, false) }/>
</GridCell>
<GridCell columnSize={50} className="calendar">
<DayPicker
month={endDate}
selectedDays={endDate}
fromMonth={startDate}
onDayClick={(data) => onDayClick(data, true) }/>
</GridCell>
<GridCell columnSize={100}>
<div className="calendar-dropdown-action-buttons">
<Button type="secondary" style={{marginRight:"5px"}} onClick={()=>clearChanges()}>{Localization.get("Clear")}</Button>
<Button type="primary" onClick={()=>applyChanges()}>{Localization.get("Apply")}</Button>
</div>
</GridCell>
<div
id="calendar-dropdown"
className={dropdownIsActive ? "calendar-dropdown expand-down" : `calendar-dropdown ${dropdownIsActive !== null ? 'expand-up' : ''} ` } >
<GridCell columnSize={100} style={{padding:"20px"}}>
<GridCell columnSize={50} className="calendar">
<DayPicker
id="try-this"
month={startDate}
selectedDays={startDate}
onDayClick={(data) => onDayClick(data, false) }/>
</GridCell>
</div>
</GridCell>
</div>
);
<GridCell columnSize={50} className="calendar">
<DayPicker
month={endDate}
selectedDays={endDate}
fromMonth={startDate}
onDayClick={(data) => onDayClick(data, true) }/>
</GridCell>
<GridCell columnSize={100}>
<div className="calendar-dropdown-action-buttons">
<Button type="secondary" style={{marginRight:"5px"}} onClick={()=>clearChanges()}>{Localization.get("Clear")}</Button>
<Button type="primary" onClick={()=>applyChanges()}>{Localization.get("Apply")}</Button>
</div>
</GridCell>
</GridCell>
</div>
</GridCell>
</div>
);
}

}
Expand Down
Loading