Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jsg2021 committed Oct 21, 2020
1 parent a879c37 commit 98ecb2d
Show file tree
Hide file tree
Showing 147 changed files with 4,961 additions and 3,959 deletions.
3 changes: 3 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
src/main/resources/css
src/main/resources/lib
src/main/resources/scss/utils/_icons.scss
3 changes: 1 addition & 2 deletions src/main/js/legacy/app/account/identity/Index.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
background-color: var(--nav-background-color, #313131);
}


:global(.media-toolbar) .identity:global(.x-component.identity) :global(.profile-pic .presence) {
background-color: #313131;
}
}
10 changes: 4 additions & 6 deletions src/main/js/legacy/app/account/identity/Index.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
const Ext = require('@nti/extjs');
const classnames = require('classnames/bind');

const NTIFormat = require('legacy/util/Format');

const Styles = require('./Index.css');
const styles = require('./Index.css');

require('./components/Settings');

const cx = classnames.bind(Styles);

const knockOut = cx('knockout');
const noKnockOut = cx('no-knockout');
const knockOut = styles.knockout;
const noKnockOut = styles['no-knockout'];

module.exports = exports = Ext.define('NextThought.app.account.identity.Index', {
extend: 'Ext.Component',
alias: 'widget.identity',
cls: `identity x-menu ${cx('identity')}`,
cls: `identity x-menu ${styles.identity}`,

renderTpl: Ext.DomHelper.markup([
{cls: 'profile-pic', 'data-qtip': '{user:displayName}', tabindex: '0', 'aria-label': '{user:displayName}', role: 'button' ,cn: [
Expand Down
4 changes: 1 addition & 3 deletions src/main/js/legacy/app/account/registration/Prompt.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const Url = require('url');

const Ext = require('@nti/extjs');

const PromptStateStore = require('legacy/app/prompt/StateStore');
Expand Down Expand Up @@ -30,7 +28,7 @@ let registerPrompt = module.exports = exports = Ext.define('NextThought.app.acco
this.callParent(arguments);

let src = this.Prompt.data.link;
this.postMessageSourceId = Url.resolve(window.location.href, src);
this.postMessageSourceId = new URL(src, window.location.href).toString();


this.Prompt.Header.disableClose();
Expand Down
11 changes: 5 additions & 6 deletions src/main/js/legacy/app/chat/components/gutter/Tab.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
const Ext = require('@nti/extjs');
const classnames = require('classnames/bind');
const cx = require('classnames');

const ChatActions = require('legacy/app/chat/Actions');
const ChatStateStore = require('legacy/app/chat/StateStore');
const NavigationStateStore = require('legacy/app/navigation/StateStore');

const Styles = require('./Tab.css');
const cx = classnames.bind(Styles);
const styles = require('./Tab.css');

const lightCls = cx('light');
const darkCls = cx('dark');
const lightCls = styles.light;
const darkCls = styles.dark;

module.exports = exports = Ext.define('NextThought.app.chat.components.gutter.Tab', {
extend: 'Ext.Component',


renderTpl: Ext.DomHelper.markup([
{cls: cx('chat-notifications-icon', 'icon'), role: 'button', tabindex: '0', 'aria-label': 'Chat Notifications'}
{cls: cx('chat-notifications-icon', styles.icon), role: 'button', tabindex: '0', 'aria-label': 'Chat Notifications'}
]),

setTheme (theme) {
Expand Down
1 change: 0 additions & 1 deletion src/main/js/legacy/app/contentviewer/reader/NoteOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const LineUtils = require('legacy/util/Line');
const {getString} = require('legacy/util/Localization');
const SharingUtils = require('legacy/util/Sharing');

const WBUtils = require('../../whiteboard/Utils');
const UserdataActions = require('../../userdata/Actions');
const DiscussionEditor = require('../components/editor/DiscussionEditor');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
padding-top: 7px;
padding-bottom: 7px;
height: 2.4rem;

.missing-name & {
border: 1px solid var(--primary-red);
box-shadow: inset 4px 0 0 0 var(--primary-red);
}
}

.card-input .card-number,
Expand All @@ -33,13 +38,6 @@
}
}

.name-input {
.missing-name & {
border: 1px solid var(--primary-red);
box-shadow: inset 4px 0 0 0 var(--primary-red);
}
}

.card-input .card-number {
.missing-number & {
border: 1px solid var(--primary-red);
Expand All @@ -61,5 +59,4 @@
}
}
}

}
1 change: 0 additions & 1 deletion src/main/js/legacy/app/course/info/components/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const Ext = require('@nti/extjs');
const {scoped} = require('@nti/lib-locale');

const CoursesStateStore = require('legacy/app/library/courses/StateStore');
const {getString} = require('legacy/util/Localization');

const DEFAULT_TEXT = {
instructor: {
Expand Down
1 change: 1 addition & 0 deletions src/main/js/legacy/app/course/overview/Index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const Slidedeck = require('legacy/model/Slidedeck');
const Video = require('legacy/model/Video');
const LTIExternalToolAsset = require('legacy/model/LTIExternalToolAsset');
const WebinarAsset = require('legacy/model/WebinarAsset');

const {ROUTE_BUILDERS} = require('./components/Constants');

require('legacy/mixins/FillScreen');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ module.exports = exports = Ext.define('NextThought.app.course.overview.component
addPreview: function () {},
addParentSelection: function (record, parentRecord, rootRecord, onChange) {},

addHeaderCmp() {},
addHeaderCmp () {},

addFormCmp: function () {
var values = this.getDefaultValues();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const Ext = require('@nti/extjs');
const classnames = require('classnames/bind');

const OutlinenodeChildCreation = require('../outline/outlinenode/ChildCreation');

Expand All @@ -21,12 +20,10 @@ const styles = require('./Prompt.css');

require('../outline/Prompt');

const cx = classnames.bind(styles);

module.exports = exports = Ext.define('NextThought.app.course.overview.components.editing.content.Prompt', {
extend: 'NextThought.app.course.overview.components.editing.outline.Prompt',
alias: 'widget.overview-editing-content-editor',
cls: cx('overview-editing-content-editor-prompt'),
cls: styles['overview-editing-content-editor-prompt'],

statics: {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
float: left;
clear: none;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const Ext = require('@nti/extjs');
const classnames = require('classnames/bind');

const WindowsActions = require('legacy/app/windows/Actions');
const DndOrderingContainer = require('legacy/mixins/dnd/OrderingContainer');
Expand All @@ -18,8 +17,7 @@ const VideoListItem = require('../video/ListItem');
const VideorollListItem = require('../videoroll/ListItem');
const WebinarListItem = require('../webinar/ListItem');

const Styles = require('./ListItem.css');
const cx = classnames.bind(Styles);
const styles = require('./ListItem.css');

require('legacy/common/components/BoundCollection');
require('legacy/mixins/dnd/OrderingItem');
Expand All @@ -40,7 +38,7 @@ module.exports = exports = Ext.define('NextThought.app.course.overview.component
},

transitionStates: true,
cls: `overview-section overview-section-editing ${cx('overview-group')}`,
cls: `overview-section overview-section-editing ${styles['overview-group']}`,
bodyCls: 'overview-group-body',

initComponent: function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
const Ext = require('@nti/extjs');
const classnames = require('classnames/bind');

const styles = require('./Quote.css');
const cx = classnames.bind(styles);
const QUOTE_COMPLETED = 'inapp-quote-done';

module.exports = exports = Ext.define(
Expand Down Expand Up @@ -47,7 +45,7 @@ module.exports = exports = Ext.define(

this.itemEditorCmp = this.add({
xtype: 'box',
cls: cx('quote-iframe'),
cls: styles['quote-iframe'],
autoEl: {
tag: 'iframe',
src: `${this.hubspotPageUrl}?firstname=${firstName}${email ? `&email=${email}` : ''}&client_site_name=${clientSite}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const {encodeForURI} = require('@nti/lib-ntiids');

const SurveyRef = require('legacy/model/SurveyRef');
const NavigationActions = require('legacy/app/navigation/Actions');
const Type = 'application/vnd.nextthought.nasurvey';
// const Type = 'application/vnd.nextthought.nasurvey';

require('../questionset/types/Assignment');
require('./SurveySelection');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.flyout.publish-controls {
z-index: 10;
z-index: 10;
}

.outline-node-listitem {
.publish-trigger {
margin: 10px;
}
}
.outline-node-listitem {
.publish-trigger {
margin: 10px;
}
}
5 changes: 2 additions & 3 deletions src/main/js/legacy/app/course/scorm-content/Index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const queryString = require('querystring');
const url = require('url');

const Ext = require('@nti/extjs');
const { Scorm } = require('@nti/web-course');
Expand Down Expand Up @@ -75,9 +74,9 @@ module.exports = exports = Ext.define('NextThought.app.course.scorm-content.Inde
}

const {history, location} = global;
const updatedRoute = url.parse(location.href);
const updatedRoute = new URL(location.href);
updatedRoute.search = Object.keys(queryParams).length === 0 ? '' : queryString.stringify(queryParams);
history.replaceState(history.state, '', updatedRoute.format());
history.replaceState(history.state, '', updatedRoute.toString());


if (this.scormContent) {
Expand Down
Loading

0 comments on commit 98ecb2d

Please sign in to comment.