mirror of
https://github.com/GSA/notifications-admin.git
synced 2025-12-16 01:53:56 -05:00
Deleting instead of commenting out
This commit is contained in:
@@ -9,10 +9,6 @@ if (window.GOVUK.hasConsentFor('analytics', consentData)) {
|
|||||||
|
|
||||||
$(() => $("time.timeago").timeago());
|
$(() => $("time.timeago").timeago());
|
||||||
|
|
||||||
// Removing sticky footer functionality
|
|
||||||
// $(() => GOVUK.stickAtTopWhenScrolling.init());
|
|
||||||
// $(() => GOVUK.stickAtBottomWhenScrolling.init());
|
|
||||||
|
|
||||||
var showHideContent = new GOVUK.ShowHideContent();
|
var showHideContent = new GOVUK.ShowHideContent();
|
||||||
showHideContent.init();
|
showHideContent.init();
|
||||||
|
|
||||||
|
|||||||
@@ -285,9 +285,6 @@
|
|||||||
if (['move-to-existing-folder', 'add-new-template'].indexOf(this.currentState) !== -1) {
|
if (['move-to-existing-folder', 'add-new-template'].indexOf(this.currentState) !== -1) {
|
||||||
mode = 'dialog';
|
mode = 'dialog';
|
||||||
}
|
}
|
||||||
// GOVUK.stickAtBottomWhenScrolling.setMode(mode);
|
|
||||||
// make sticky JS recalculate its cache of the element's position
|
|
||||||
// GOVUK.stickAtBottomWhenScrolling.recalculate();
|
|
||||||
|
|
||||||
if (currentStateObj && ('setFocus' in currentStateObj)) {
|
if (currentStateObj && ('setFocus' in currentStateObj)) {
|
||||||
scrollTop = $(window).scrollTop();
|
scrollTop = $(window).scrollTop();
|
||||||
|
|||||||
@@ -108,8 +108,6 @@ const javascripts = () => {
|
|||||||
paths.src + 'javascripts/govuk/cookie-functions.js',
|
paths.src + 'javascripts/govuk/cookie-functions.js',
|
||||||
paths.src + 'javascripts/consent.js',
|
paths.src + 'javascripts/consent.js',
|
||||||
paths.src + 'javascripts/cookieMessage.js',
|
paths.src + 'javascripts/cookieMessage.js',
|
||||||
// Removing sticky footer functionality
|
|
||||||
// paths.src + 'javascripts/stick-to-window-when-scrolling.js',
|
|
||||||
paths.src + 'javascripts/copyToClipboard.js',
|
paths.src + 'javascripts/copyToClipboard.js',
|
||||||
paths.src + 'javascripts/autofocus.js',
|
paths.src + 'javascripts/autofocus.js',
|
||||||
paths.src + 'javascripts/enhancedTextbox.js',
|
paths.src + 'javascripts/enhancedTextbox.js',
|
||||||
|
|||||||
@@ -299,21 +299,6 @@ describe('TemplateFolderForm', () => {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Removing sticky functionality
|
|
||||||
// test("should make the current controls sticky", () => {
|
|
||||||
|
|
||||||
// // the class the sticky JS hooks into should be present
|
|
||||||
// expect(formControls.querySelector('#nothing_selected .js-stick-at-bottom-when-scrolling')).not.toBeNull();
|
|
||||||
|
|
||||||
// // .recalculate should have been called so the sticky JS picks up the controls
|
|
||||||
// expect(GOVUK.stickAtBottomWhenScrolling.recalculate.mock.calls.length).toEqual(1);
|
|
||||||
|
|
||||||
// // mode should have been set to 'default' as the controls only have one part
|
|
||||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls.length).toEqual(1);
|
|
||||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls[0][0]).toEqual('default');
|
|
||||||
|
|
||||||
// });
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Click 'New template' for single channel service", () => {
|
describe("Click 'New template' for single channel service", () => {
|
||||||
@@ -422,21 +407,6 @@ describe('TemplateFolderForm', () => {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Removing sticky functionality
|
|
||||||
// test("should make the current controls sticky", () => {
|
|
||||||
|
|
||||||
// // the classes the sticky JS hooks into should be present for both parts
|
|
||||||
// expect(formControls.querySelectorAll('#add_new_template_form .js-stick-at-bottom-when-scrolling').length).toEqual(2);
|
|
||||||
|
|
||||||
// // .recalculate should have been called so the sticky JS picks up the controls
|
|
||||||
// expect(GOVUK.stickAtBottomWhenScrolling.recalculate.mock.calls.length).toEqual(1);
|
|
||||||
|
|
||||||
// // the mode should be set to 'dialog' so both parts can be sticky
|
|
||||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls.length).toEqual(1);
|
|
||||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls[0][0]).toEqual('dialog');
|
|
||||||
|
|
||||||
// });
|
|
||||||
|
|
||||||
describe("When the 'Cancel' link is clicked after choosing to add a new template", () => {
|
describe("When the 'Cancel' link is clicked after choosing to add a new template", () => {
|
||||||
|
|
||||||
let addNewTemplateButton;
|
let addNewTemplateButton;
|
||||||
@@ -543,11 +513,6 @@ describe('TemplateFolderForm', () => {
|
|||||||
// .recalculate should have been called so the sticky JS picks up the controls
|
// .recalculate should have been called so the sticky JS picks up the controls
|
||||||
expect(GOVUK.stickAtBottomWhenScrolling.recalculate.mock.calls.length).toEqual(0);
|
expect(GOVUK.stickAtBottomWhenScrolling.recalculate.mock.calls.length).toEqual(0);
|
||||||
|
|
||||||
// Removing sticky functionality
|
|
||||||
// mode should have been set to 'default' as the controls only have one part
|
|
||||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls.length).toEqual(1);
|
|
||||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls[0] [0]).toEqual('default');
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("When the 'Cancel' link is clicked after choosing to add a new folder", () => {
|
describe("When the 'Cancel' link is clicked after choosing to add a new folder", () => {
|
||||||
@@ -610,21 +575,6 @@ describe('TemplateFolderForm', () => {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Removing sticky functionality
|
|
||||||
// test("should make the current controls sticky", () => {
|
|
||||||
|
|
||||||
// // the class the sticky JS hooks into should be present
|
|
||||||
// expect(formControls.querySelector('#items_selected .js-stick-at-bottom-when-scrolling')).not.toBeNull();
|
|
||||||
|
|
||||||
// // .recalculate should have been called so the sticky JS picks up the controls
|
|
||||||
// expect(GOVUK.stickAtBottomWhenScrolling.recalculate.mock.calls.length).toEqual(1);
|
|
||||||
|
|
||||||
// // mode should have been set to 'default' as the controls only have one part
|
|
||||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls.length).toEqual(1);
|
|
||||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls[0][0]).toEqual('default');
|
|
||||||
|
|
||||||
// });
|
|
||||||
|
|
||||||
describe("'Clear selection' link", () => {
|
describe("'Clear selection' link", () => {
|
||||||
|
|
||||||
let clearLink;
|
let clearLink;
|
||||||
@@ -759,21 +709,6 @@ describe('TemplateFolderForm', () => {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Removing sticky functionality
|
|
||||||
// test("should make the current controls sticky", () => {
|
|
||||||
|
|
||||||
// // the classes the sticky JS hooks into should be present for both parts
|
|
||||||
// expect(formControls.querySelectorAll('#move_to_folder_radios .js-stick-at-bottom-when-scrolling').length).toEqual(2);
|
|
||||||
|
|
||||||
// // .recalculate should have been called so the sticky JS picks up the controls
|
|
||||||
// expect(GOVUK.stickAtBottomWhenScrolling.recalculate.mock.calls.length).toEqual(1);
|
|
||||||
|
|
||||||
// // the mode should be set to 'dialog' so both parts can be sticky
|
|
||||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls.length).toEqual(1);
|
|
||||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls[0][0]).toEqual('dialog');
|
|
||||||
|
|
||||||
// });
|
|
||||||
|
|
||||||
describe("When the 'Cancel' link is clicked after choosing to move a template or folder", () => {
|
describe("When the 'Cancel' link is clicked after choosing to move a template or folder", () => {
|
||||||
|
|
||||||
let moveToFolderButton;
|
let moveToFolderButton;
|
||||||
@@ -862,21 +797,6 @@ describe('TemplateFolderForm', () => {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Removing sticky functionality
|
|
||||||
// test("should make the current controls sticky", () => {
|
|
||||||
|
|
||||||
// // the class the sticky JS hooks into should be present
|
|
||||||
// expect(formControls.querySelector('#move_to_new_folder_form .js-stick-at-bottom-when-scrolling')).not.toBeNull();
|
|
||||||
|
|
||||||
// // .recalculate should have been called so the sticky JS picks up the controls
|
|
||||||
// expect(GOVUK.stickAtBottomWhenScrolling.recalculate.mock.calls.length).toEqual(1);
|
|
||||||
|
|
||||||
// // mode should have been set to 'default' as the controls only have one part
|
|
||||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls.length).toEqual(1);
|
|
||||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls[0][0]).toEqual('default');
|
|
||||||
|
|
||||||
// });
|
|
||||||
|
|
||||||
describe("When the 'Cancel' link is clicked after choosing to add a template or folder to a new folder", () => {
|
describe("When the 'Cancel' link is clicked after choosing to add a template or folder to a new folder", () => {
|
||||||
|
|
||||||
let moveToNewFolderButton;
|
let moveToNewFolderButton;
|
||||||
|
|||||||
Reference in New Issue
Block a user