Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
3 changes: 1 addition & 2 deletions src/content-handlers/iiif/IIIFEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export class IIIFEvents {
static HIDE_HELP_DIALOGUE: string = "hideHelpDialogue";
static HIDE_INFORMATION: string = "hideInformation";
static HIDE_LOGIN_DIALOGUE: string = "hideLoginDialogue";
static HIDE_MOREINFO_DIALOGUE: string = "hideMoreInfoDialogue";
static HIDE_MULTISELECT_DIALOGUE: string = "hideMultiSelectDialogue";
static HIDE_OVERLAY: string = "hideOverlay";
static HIDE_RESTRICTED_DIALOGUE: string = "hideRestrictedDialogue";
Expand Down Expand Up @@ -100,14 +99,14 @@ export class IIIFEvents {
static SHOW_LOGIN_DIALOGUE: string = "showLoginDialogue";
static SHOW_MESSAGE: string = "showMessage";
static MESSAGE_DISPLAYED: string = "messageDisplayed";
static SHOW_MOREINFO_DIALOGUE: string = "showMoreInfoDialogue";
static SHOW_MULTISELECT_DIALOGUE: string = "showMultiSelectDialogue";
static SHOW_OVERLAY: string = "showOverlay";
static SHOW_RESTRICTED_DIALOGUE: string = "showRestrictedDialogue";
static SHOW_SETTINGS_DIALOGUE: string = "showSettingsDialogue";
static SHOW_SHARE_DIALOGUE: string = "showShareDialogue";
static SHOW_TERMS_OF_USE: string = "showTermsOfUse";
static TARGET_CHANGE: string = "targetChange";
static TOGGLE_MOREINFO_RIGHT_PANEL: string = "toggleMoreInfoRightPanel";
static THUMB_MULTISELECTED: string = "thumbMultiSelected";
static THUMB_SELECTED: string = "thumbSelected";
static TOGGLE_EXPAND_LEFT_PANEL: string = "toggleExpandLeftPanel";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { FooterPanel } from "../../modules/uv-shared-module/FooterPanel";
import { FooterPanel as MobileFooterPanel } from "../../modules/uv-ebookmobilefooterpanel-module/MobileFooter";
import { HeaderPanel } from "../../modules/uv-shared-module/HeaderPanel";
import { IEbookExtension } from "./IEbookExtension";
import { MoreInfoDialogue } from "../../modules/uv-dialogues-module/MoreInfoDialogue";
import { MoreInfoRightPanel } from "../../modules/uv-moreinforightpanel-module/MoreInfoRightPanel";
import { SettingsDialogue } from "./SettingsDialogue";
import { ShareDialogue } from "./ShareDialogue";
Expand All @@ -23,7 +22,6 @@ export default class Extension
implements IEbookExtension
{
$downloadDialogue: JQuery;
$moreInfoDialogue: JQuery;
$multiSelectDialogue: JQuery;
$settingsDialogue: JQuery;
$shareDialogue: JQuery;
Expand All @@ -33,7 +31,6 @@ export default class Extension
headerPanel: HeaderPanel<Config["modules"]["headerPanel"]>;
leftPanel: EbookLeftPanel;
mobileFooterPanel: MobileFooterPanel;
moreInfoDialogue: MoreInfoDialogue;
rightPanel: MoreInfoRightPanel;
settingsDialogue: SettingsDialogue;
shareDialogue: ShareDialogue;
Expand Down Expand Up @@ -91,12 +88,6 @@ export default class Extension
this.shell.$footerPanel.hide();
}

this.$moreInfoDialogue = $(
'<div class="overlay moreInfo" aria-hidden="true"></div>'
);
this.shell.$overlays.append(this.$moreInfoDialogue);
this.moreInfoDialogue = new MoreInfoDialogue(this.$moreInfoDialogue);

this.$shareDialogue = $(
'<div class="overlay share" aria-hidden="true"></div>'
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { FooterPanel } from "../../modules/uv-shared-module/FooterPanel";
import { FooterPanel as MobileFooterPanel } from "../../modules/uv-modelviewermobilefooterpanel-module/MobileFooter";
import { HeaderPanel } from "../../modules/uv-shared-module/HeaderPanel";
import { HelpDialogue } from "../../modules/uv-dialogues-module/HelpDialogue";
import { MoreInfoDialogue } from "../../modules/uv-dialogues-module/MoreInfoDialogue";
import { MoreInfoRightPanel } from "../../modules/uv-moreinforightpanel-module/MoreInfoRightPanel";
import { SettingsDialogue } from "./SettingsDialogue";
import { ShareDialogue } from "./ShareDialogue";
Expand All @@ -27,7 +26,6 @@ export default class ModelViewerExtension extends BaseExtension<Config> {
$downloadDialogue: JQuery;
$shareDialogue: JQuery;
$helpDialogue: JQuery;
$moreInfoDialogue: JQuery;
$settingsDialogue: JQuery;
centerPanel: ModelViewerCenterPanel;
downloadDialogue: DownloadDialogue;
Expand All @@ -36,7 +34,6 @@ export default class ModelViewerExtension extends BaseExtension<Config> {
helpDialogue: HelpDialogue;
leftPanel: ContentLeftPanel;
mobileFooterPanel: FooterPanel<Config["modules"]["footerPanel"]>;
moreInfoDialogue: MoreInfoDialogue;
rightPanel: MoreInfoRightPanel;
settingsDialogue: SettingsDialogue;
shareDialogue: ShareDialogue;
Expand Down Expand Up @@ -99,12 +96,6 @@ export default class ModelViewerExtension extends BaseExtension<Config> {
this.shell.$footerPanel.hide();
}

this.$moreInfoDialogue = $(
'<div class="overlay moreInfo" aria-hidden="true"></div>'
);
this.shell.$overlays.append(this.$moreInfoDialogue);
this.moreInfoDialogue = new MoreInfoDialogue(this.$moreInfoDialogue);

this.$downloadDialogue = $(
'<div class="overlay download" aria-hidden="true"></div>'
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { FooterPanel } from "../../modules/uv-searchfooterpanel-module/FooterPan
import { HelpDialogue } from "../../modules/uv-dialogues-module/HelpDialogue";
import { IOpenSeadragonExtensionData } from "./IOpenSeadragonExtensionData";
import { Mode } from "./Mode";
import { MoreInfoDialogue } from "../../modules/uv-dialogues-module/MoreInfoDialogue";
import { MoreInfoRightPanel } from "../../modules/uv-moreinforightpanel-module/MoreInfoRightPanel";
import { MultiSelectDialogue } from "../../modules/uv-multiselectdialogue-module/MultiSelectDialogue";
import { MultiSelectionArgs } from "./MultiSelectionArgs";
Expand Down Expand Up @@ -60,7 +59,6 @@ export default class OpenSeadragonExtension extends BaseExtension<Config> {
$downloadDialogue: JQuery;
$externalContentDialogue: JQuery;
$helpDialogue: JQuery;
$moreInfoDialogue: JQuery;
$multiSelectDialogue: JQuery;
$settingsDialogue: JQuery;
$shareDialogue: JQuery;
Expand All @@ -78,7 +76,6 @@ export default class OpenSeadragonExtension extends BaseExtension<Config> {
leftPanel: ContentLeftPanel;
mobileFooterPanel: MobileFooterPanel;
mode: Mode;
moreInfoDialogue: MoreInfoDialogue;
multiSelectDialogue: MultiSelectDialogue;
previousAnnotationRect: AnnotationRect | null;
rightPanel: MoreInfoRightPanel;
Expand Down Expand Up @@ -551,12 +548,6 @@ export default class OpenSeadragonExtension extends BaseExtension<Config> {
this.shell.$overlays.append(this.$helpDialogue);
this.helpDialogue = new HelpDialogue(this.$helpDialogue);

this.$moreInfoDialogue = $(
'<div class="overlay moreInfo" aria-hidden="true"></div>'
);
this.shell.$overlays.append(this.$moreInfoDialogue);
this.moreInfoDialogue = new MoreInfoDialogue(this.$moreInfoDialogue);

this.$multiSelectDialogue = $(
'<div class="overlay multiSelect" aria-hidden="true"></div>'
);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ export class BaseExpandPanel<T extends ExpandPanel> extends BaseView<T> {

autoToggled ? (this.autoToggled = true) : (this.autoToggled = false);

this.$element.toggleClass("open");

// if collapsing, hide contents immediately.
if (this.isExpanded) {
this.$top.attr("aria-hidden", "true");
Expand All @@ -118,7 +120,19 @@ export class BaseExpandPanel<T extends ExpandPanel> extends BaseView<T> {
this.$closed.show();
}

// to allow for the css transition to finish
// TODO: get this var from config and make sure css uses the same
// although make sure it is +50 to allow for lag
// and re-introduce the animation check
if (isReducedAnimation) {
this.toggled();
} else {
setTimeout(() => {
this.toggled();
}, 300);
}

/* if (isReducedAnimation) {
// This is reduced motion.
this.$element.css("width", this.getTargetWidth());
this.$element.css("left", this.getTargetLeft());
Expand All @@ -135,7 +149,7 @@ export class BaseExpandPanel<T extends ExpandPanel> extends BaseView<T> {
this.toggled();
}
);
}
} */
}

toggled(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export class FooterPanel<

this.$moreInfoButton.onPressed(() => {
this.extensionHost.publish(
IIIFEvents.SHOW_MOREINFO_DIALOGUE,
IIIFEvents.TOGGLE_MOREINFO_RIGHT_PANEL,
this.$moreInfoButton
);
});
Expand Down
10 changes: 10 additions & 0 deletions src/content-handlers/iiif/modules/uv-shared-module/LeftPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,14 @@ export class LeftPanel<
this.$element.width(this.$element.parent().width());
}
}

toggle(autoToggled?: boolean): void {
if (this.isExpanded) {
this.$element.parent().removeClass("leftPanelOpen");
} else {
this.$element.parent().addClass("leftPanelOpen");
}

super.toggle(autoToggled);
}
}
16 changes: 16 additions & 0 deletions src/content-handlers/iiif/modules/uv-shared-module/RightPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@ export class RightPanel<T extends ExpandPanel> extends BaseExpandPanel<T> {
this.expandFull();
}
});

this.extensionHost.subscribe(IIIFEvents.TOGGLE_MOREINFO_RIGHT_PANEL, () => {
this.toggle();
});
}



getTargetWidth(): number {
return this.isExpanded
? this.options.panelCollapsedWidth
Expand Down Expand Up @@ -66,4 +72,14 @@ export class RightPanel<T extends ExpandPanel> extends BaseExpandPanel<T> {
),
});
}

toggle(autoToggled?: boolean): void {
if (this.isExpanded) {
this.$element.parent().removeClass("rightPanelOpen");
} else {
this.$element.parent().addClass("rightPanelOpen");
}

super.toggle(autoToggled);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.hidden();
}

.mainPanel {
/* .mainPanel {

.leftPanel {
.hidden();
Expand All @@ -13,7 +13,7 @@
.rightPanel {
.hidden();
}
}
} */

.footerPanel {
.hidden();
Expand Down
29 changes: 29 additions & 0 deletions src/content-handlers/iiif/modules/uv-shared-module/css/lg.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,33 @@

}
}

.lg-mediaquery({
.headerPanel {
display: block;
visibility: visible;
}

.mainPanel {
.leftPanel {
display: block;
visibility: visible;
}

.rightPanel {
display: block;
visibility: visible;
}
}

.footerPanel {
display: block;
visibility: visible;
}

.mobileFooterPanel {
display: none;
visibility: hidden;
}
})
}
Loading
Loading