-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
9 changed files
with
55 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
(function () { | ||
const searchForm = document.querySelector<HTMLFormElement>('.ibexa-search-form'); | ||
const searchInput = document.querySelector<HTMLInputElement>('.ibexa-search-form__search-input'); | ||
const headerSearchInput = document.querySelector<HTMLInputElement>('.ibexa-global-search__input'); | ||
const languageSelector = document.querySelector<HTMLSelectElement>('.ibexa-filters__item--language-selector .ibexa-filters__select'); | ||
const headerSearchSubmitBtn = document.querySelector<HTMLButtonElement>( | ||
'.ibexa-main-header .ibexa-input-text-wrapper__action-btn--search', | ||
); | ||
|
||
if (!headerSearchInput || !searchInput || !searchForm) { | ||
return; | ||
} | ||
|
||
const submitForm = () => { | ||
searchInput.value = headerSearchInput.value; | ||
searchForm.submit(); | ||
}; | ||
const handleHeaderSearchBtnClick = (event: MouseEvent) => { | ||
event.preventDefault(); | ||
|
||
submitForm(); | ||
}; | ||
|
||
headerSearchInput.value = searchInput.value; | ||
|
||
headerSearchSubmitBtn?.addEventListener('click', handleHeaderSearchBtnClick, false); | ||
languageSelector?.addEventListener('change', submitForm, false); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/bundle/ui-dev/src/modules/common/thumbnail/thumbnail.types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ThumbnailData } from '../types/common'; | ||
|
||
export default interface ThumbnailProps extends ThumbnailData { | ||
iconExtraClasses?: string; | ||
contentTypeIconPath?: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export interface ThumbnailData { | ||
thumbnailData: { | ||
mimeType: string; | ||
resource: string; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"extends": "@ibexa/ts-config", | ||
"include": ["src/bundle/**/*"] | ||
} |