mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-06 03:46:39 +08:00
Merge pull request #8403 from aignatov-bio/ai-sci-11786-fixes-for-item-cards
Fix status and text field on item card [SCI-11786]
This commit is contained in:
commit
cd10171e21
4 changed files with 8 additions and 1 deletions
|
@ -21,6 +21,7 @@
|
||||||
:isNumber="true"
|
:isNumber="true"
|
||||||
:unEditableRef="`numberRef`"
|
:unEditableRef="`numberRef`"
|
||||||
:expandable="expandable"
|
:expandable="expandable"
|
||||||
|
:canEdit="canEdit"
|
||||||
:collapsed="collapsed"
|
:collapsed="collapsed"
|
||||||
@toggleExpandableState="toggleExpandableState"
|
@toggleExpandableState="toggleExpandableState"
|
||||||
@update="update"
|
@update="update"
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
></SelectDropdown>
|
></SelectDropdown>
|
||||||
<div v-else-if="status && icon"
|
<div v-else-if="status && icon"
|
||||||
class="flex flex-row items-center text-sn-dark-grey font-inter text-sm font-normal leading-5 gap-1.5">
|
class="flex flex-row items-center text-sn-dark-grey font-inter text-sm font-normal leading-5 gap-1.5">
|
||||||
<div v-html="parseEmoji(icon)" class="flex h-6 w-6"></div>
|
<div v-if="!twemojiInit" v-html="parseEmoji(icon)" class="flex h-6 w-6"></div>
|
||||||
{{ status }}
|
{{ status }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
@ -49,6 +49,7 @@ export default {
|
||||||
status: null,
|
status: null,
|
||||||
selected: null,
|
selected: null,
|
||||||
isLoading: true,
|
isLoading: true,
|
||||||
|
twemojiInit: true,
|
||||||
options: []
|
options: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -102,6 +103,7 @@ export default {
|
||||||
twemoji.size = '24x24';
|
twemoji.size = '24x24';
|
||||||
twemoji.base = '/images/twemoji/';
|
twemoji.base = '/images/twemoji/';
|
||||||
twemoji.parse(this.$refs.container);
|
twemoji.parse(this.$refs.container);
|
||||||
|
this.twemojiInit = false;
|
||||||
}, 300);
|
}, 300);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
:smartAnnotation="true"
|
:smartAnnotation="true"
|
||||||
:expandable="expandable"
|
:expandable="expandable"
|
||||||
:collapsed="collapsed"
|
:collapsed="collapsed"
|
||||||
|
:canEdit="canEdit"
|
||||||
@toggleExpandableState="toggleExpandableState"
|
@toggleExpandableState="toggleExpandableState"
|
||||||
@update="update"
|
@update="update"
|
||||||
className="px-3"
|
className="px-3"
|
||||||
|
|
|
@ -42,6 +42,7 @@ export default {
|
||||||
initialValue: String,
|
initialValue: String,
|
||||||
noContentPlaceholder: String,
|
noContentPlaceholder: String,
|
||||||
placeholder: String,
|
placeholder: String,
|
||||||
|
canEdit: { type: Boolean, default: false },
|
||||||
decimals: { type: Number, default: 0 },
|
decimals: { type: Number, default: 0 },
|
||||||
isNumber: { type: Boolean, default: false },
|
isNumber: { type: Boolean, default: false },
|
||||||
unEditableRef: { type: String, required: true },
|
unEditableRef: { type: String, required: true },
|
||||||
|
@ -110,6 +111,8 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
enableEdit(e) {
|
enableEdit(e) {
|
||||||
|
if (!this.canEdit) return;
|
||||||
|
|
||||||
if (e && $(e.target).hasClass('atwho-user-popover')) return;
|
if (e && $(e.target).hasClass('atwho-user-popover')) return;
|
||||||
if (e && $(e.target).hasClass('sa-name')) return;
|
if (e && $(e.target).hasClass('sa-name')) return;
|
||||||
if (e && $(e.target).hasClass('sa-link')) return;
|
if (e && $(e.target).hasClass('sa-link')) return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue