mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-22 16:27:22 +00:00
parent
3b981931f2
commit
cf22a5a82f
@ -130,7 +130,7 @@
|
|||||||
<style lang="scss" global>
|
<style lang="scss" global>
|
||||||
.ProseMirror {
|
.ProseMirror {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
max-height: 5.5rem;
|
max-height: 40vh;
|
||||||
outline: none;
|
outline: none;
|
||||||
line-height: 150%;
|
line-height: 150%;
|
||||||
p:not(:last-child) {
|
p:not(:last-child) {
|
||||||
|
@ -40,7 +40,12 @@
|
|||||||
max-width: 18rem;
|
max-width: 18rem;
|
||||||
width: 18rem;
|
width: 18rem;
|
||||||
}
|
}
|
||||||
.antiPanel-component { flex-grow: 1; }
|
.antiPanel-component:not(.aside) { flex-grow: 1; }
|
||||||
|
.antiPanel-component.aside {
|
||||||
|
min-width: 30rem;
|
||||||
|
width: 30rem;
|
||||||
|
max-width: 30rem;
|
||||||
|
}
|
||||||
|
|
||||||
/* Navigation */
|
/* Navigation */
|
||||||
.antiNav-header {
|
.antiNav-header {
|
||||||
|
@ -28,6 +28,10 @@
|
|||||||
will-change: transform;
|
will-change: transform;
|
||||||
|
|
||||||
&.maxHeight { height: 22rem; }
|
&.maxHeight { height: 22rem; }
|
||||||
|
&.autoHeight {
|
||||||
|
max-height: calc(100vh - 2rem);
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
.header {
|
.header {
|
||||||
border-bottom: 1px solid var(--popup-divider);
|
border-bottom: 1px solid var(--popup-divider);
|
||||||
|
|
||||||
|
@ -205,9 +205,10 @@
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.content {
|
.content {
|
||||||
|
overflow: hidden;
|
||||||
margin: 1rem 1rem 0px;
|
margin: 1rem 1rem 0px;
|
||||||
background-color: var(--theme-border-modal);
|
background-color: var(--theme-border-modal);
|
||||||
border-radius: 0.75rem;
|
border-radius: .75rem;
|
||||||
border: 1px solid var(--theme-zone-border);
|
border: 1px solid var(--theme-zone-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -264,7 +264,6 @@
|
|||||||
// Create skills
|
// Create skills
|
||||||
await elementsPromise
|
await elementsPromise
|
||||||
|
|
||||||
|
|
||||||
const categories = await client.findAll(tags.class.TagCategory, { targetClass: recruit.mixin.Candidate })
|
const categories = await client.findAll(tags.class.TagCategory, { targetClass: recruit.mixin.Candidate })
|
||||||
const categoriesMap = new Map(Array.from(categories.map((it) => [it._id, it])))
|
const categoriesMap = new Map(Array.from(categories.map((it) => [it._id, it])))
|
||||||
|
|
||||||
@ -433,6 +432,7 @@
|
|||||||
targetClass: recruit.mixin.Candidate,
|
targetClass: recruit.mixin.Candidate,
|
||||||
showTitle: false,
|
showTitle: false,
|
||||||
elements,
|
elements,
|
||||||
|
newElements,
|
||||||
countLabel: recruit.string.NumberSkills
|
countLabel: recruit.string.NumberSkills
|
||||||
}}
|
}}
|
||||||
on:open={(evt) => {
|
on:open={(evt) => {
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
export let targetClass: Ref<Class<Doc>>
|
export let targetClass: Ref<Class<Doc>>
|
||||||
export let key: KeyedAttribute
|
export let key: KeyedAttribute
|
||||||
export let elements: Map<Ref<TagElement>, TagElement>
|
export let elements: Map<Ref<TagElement>, TagElement>
|
||||||
|
export let newElements: TagElement[] = []
|
||||||
export let countLabel: IntlString
|
export let countLabel: IntlString
|
||||||
|
|
||||||
export let kind: ButtonKind = 'no-border'
|
export let kind: ButtonKind = 'no-border'
|
||||||
@ -52,6 +53,7 @@
|
|||||||
showPopup(
|
showPopup(
|
||||||
TagsPopup,
|
TagsPopup,
|
||||||
{
|
{
|
||||||
|
newElements,
|
||||||
targetClass,
|
targetClass,
|
||||||
selected: items.map((it) => it.tag),
|
selected: items.map((it) => it.tag),
|
||||||
keyLabel
|
keyLabel
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
import IconView from './icons/View.svelte'
|
import IconView from './icons/View.svelte'
|
||||||
import IconViewHide from './icons/ViewHide.svelte'
|
import IconViewHide from './icons/ViewHide.svelte'
|
||||||
|
|
||||||
|
export let newElements: TagElement[] = []
|
||||||
export let targetClass: Ref<Class<Doc>>
|
export let targetClass: Ref<Class<Doc>>
|
||||||
export let placeholder: IntlString = presentation.string.Search
|
export let placeholder: IntlString = presentation.string.Search
|
||||||
export let selected: Ref<TagElement>[] = []
|
export let selected: Ref<TagElement>[] = []
|
||||||
@ -51,7 +52,7 @@
|
|||||||
tags.class.TagElement,
|
tags.class.TagElement,
|
||||||
{ title: { $like: '%' + search + '%' }, targetClass },
|
{ title: { $like: '%' + search + '%' }, targetClass },
|
||||||
(result) => {
|
(result) => {
|
||||||
objects = result
|
objects = newElements.concat(result)
|
||||||
},
|
},
|
||||||
{ limit: 200 }
|
{ limit: 200 }
|
||||||
)
|
)
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="selectPopup">
|
<div class="selectPopup autoHeight">
|
||||||
<div class="scroll"><div class="box">
|
<div class="scroll"><div class="box">
|
||||||
{#await getItems() then items}
|
{#await getItems() then items}
|
||||||
<div class="menu-item high flex-row-center" on:click={() => { editProfile(items) }}>
|
<div class="menu-item high flex-row-center" on:click={() => { editProfile(items) }}>
|
||||||
|
@ -251,6 +251,43 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let aside: HTMLElement
|
||||||
|
let cover: HTMLElement
|
||||||
|
let isResizing: boolean = false
|
||||||
|
let asideWidth: number
|
||||||
|
let componentWidth: number
|
||||||
|
let dX: number
|
||||||
|
let oldX: number
|
||||||
|
|
||||||
|
const resizing = (event: MouseEvent): void => {
|
||||||
|
if (isResizing && aside) {
|
||||||
|
let X = event.clientX - dX
|
||||||
|
const newWidth = asideWidth + oldX - X
|
||||||
|
if (newWidth > 320 && componentWidth - (oldX - X) > 320) {
|
||||||
|
aside.style.width = aside.style.maxWidth = aside.style.minWidth = newWidth + 'px'
|
||||||
|
oldX = X
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const endResize = (event: MouseEvent): void => {
|
||||||
|
const el: HTMLElement = event.currentTarget as HTMLElement
|
||||||
|
if (el && isResizing) document.removeEventListener('mousemove', resizing)
|
||||||
|
document.removeEventListener('mouseup', endResize)
|
||||||
|
cover.style.display = 'none'
|
||||||
|
isResizing = false
|
||||||
|
}
|
||||||
|
const startResize = (event: MouseEvent): void => {
|
||||||
|
const el: HTMLElement = event.currentTarget as HTMLElement
|
||||||
|
if (el && !isResizing) {
|
||||||
|
oldX = el.getBoundingClientRect().y
|
||||||
|
dX = event.clientX - oldX
|
||||||
|
document.addEventListener('mouseup', endResize)
|
||||||
|
document.addEventListener('mousemove', resizing)
|
||||||
|
cover.style.display = 'block'
|
||||||
|
isResizing = true
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if client}
|
{#if client}
|
||||||
@ -354,7 +391,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<div class="antiPanel-component antiComponent border-left" bind:this={contentPanel}>
|
<div class="antiPanel-component antiComponent border-left" bind:this={contentPanel} bind:clientWidth={componentWidth}>
|
||||||
{#if currentApplication && currentApplication.component}
|
{#if currentApplication && currentApplication.component}
|
||||||
<Component is={currentApplication.component} props={{ currentSpace }} />
|
<Component is={currentApplication.component} props={{ currentSpace }} />
|
||||||
{:else if specialComponent}
|
{:else if specialComponent}
|
||||||
@ -369,11 +406,13 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if asideId && navigatorModel?.aside !== undefined}
|
{#if asideId && navigatorModel?.aside !== undefined}
|
||||||
<div class="antiPanel-component antiComponent border-left">
|
<div class="splitter" class:hovered={isResizing} on:mousedown={startResize} />
|
||||||
|
<div class="antiPanel-component antiComponent aside" bind:clientWidth={asideWidth} bind:this={aside}>
|
||||||
<Component is={navigatorModel.aside} props={{ currentSpace, _id: asideId }} on:close={closeAside} />
|
<Component is={navigatorModel.aside} props={{ currentSpace, _id: asideId }} on:close={closeAside} />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
<div bind:this={cover} class="cover" />
|
||||||
<PanelInstance {contentPanel} >
|
<PanelInstance {contentPanel} >
|
||||||
<svelte:fragment slot='panel-header'>
|
<svelte:fragment slot='panel-header'>
|
||||||
<ActionContext
|
<ActionContext
|
||||||
@ -399,4 +438,44 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cover {
|
||||||
|
position: fixed;
|
||||||
|
display: none;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
.splitter {
|
||||||
|
position: relative;
|
||||||
|
width: 1px;
|
||||||
|
min-width: 1px;
|
||||||
|
max-width: 1px;
|
||||||
|
height: 100%;
|
||||||
|
background-color: var(--divider-color);
|
||||||
|
transition: background-color .15s ease-in-out;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: .5rem;
|
||||||
|
height: 100%;
|
||||||
|
border-left: 2px solid transparent;
|
||||||
|
cursor: col-resize;
|
||||||
|
z-index: 1;
|
||||||
|
transition: border-color .15s ease-in-out;
|
||||||
|
}
|
||||||
|
&:hover, &.hovered {
|
||||||
|
transition-duration: 0;
|
||||||
|
background-color: var(--primary-bg-color);
|
||||||
|
&::before {
|
||||||
|
transition-duration: 0;
|
||||||
|
border-left: 2px solid var(--primary-bg-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user