Skip to content

Commit

Permalink
Merge pull request #153 from lcnetdev/dont-hide-label
Browse files Browse the repository at this point in the history
Keep label when an entity is created
  • Loading branch information
f-osorio authored Dec 6, 2024
2 parents 6bfecf9 + d4d2179 commit 6c25bca
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
15 changes: 9 additions & 6 deletions src/components/panels/edit/fields/LookupSimple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<!-- <span v-if="!avl.isLiteral" title="Controlled Term" class="selected-value-icon" style=""><span class="material-icons check-mark">check_circle_outline</span></span></span> -->

<span v-else style=""><LabelDereference :URI="avl.URI"/><span v-if="!avl.isLiteral" title="Controlled Term" class="selected-value-icon"></span></span>

<a href="#" class="inline-remove-x" @click="removeValue(idx)" style="">x</a>
</template>

Expand Down Expand Up @@ -61,7 +61,8 @@


<template v-if="preferenceStore.returnValue('--b-edit-main-splitpane-edit-shortcode-display-mode') == false">
<div v-if="preferenceStore.returnValue('--b-edit-main-splitpane-edit-show-field-labels') && simpleLookupValues.length==0" class="lookup-fake-input-label">{{structure.propertyLabel}}</div>
<!-- <div v-if="preferenceStore.returnValue('--b-edit-main-splitpane-edit-show-field-labels') && simpleLookupValues.length==0" class="lookup-fake-input-label">{{structure.propertyLabel}}</div> -->
<div v-if="preferenceStore.returnValue('--b-edit-main-splitpane-edit-show-field-labels')" class="lookup-fake-input-label">{{structure.propertyLabel}}</div>
</template>


Expand All @@ -73,9 +74,9 @@
<div class="bfcode-display-mode-holder-value">

<div class="lookup-fake-input-entities" style="display:inline-block;">
<div v-for="(avl,idx) in simpleLookupValues" class="selected-value-container">
<div v-for="(avl,idx) in simpleLookupValues" class="selected-value-container">
<span v-if="!avl.needsDereference" style="padding-right: 0.3em; font-weight: bold">{{avl.label}}<span class="uncontrolled" v-if="avl.isLiteral">(uncontrolled)</span><span v-if="!avl.isLiteral" title="Controlled Term" class="selected-value-icon" style=""></span></span>

<span v-else style="padding-right: 0.3em; font-weight: bold"><LabelDereference :URI="avl.URI"/><span v-if="!avl.isLiteral" title="Controlled Term" class="selected-value-icon"></span></span>

<span @click="removeValue(idx)" style="border-left: solid 1px black; padding: 0 0.5em; font-size: 1em; cursor: pointer;">x</span>
Expand Down Expand Up @@ -356,7 +357,7 @@ export default {
simpleLookupValues(){
// profileStore.setActiveField()
let values = this.profileStore.returnSimpleLookupValueFromProfile(this.guid,this.propertyPath)
let values = this.profileStore.returnSimpleLookupValueFromProfile(this.guid, this.propertyPath)
if (this.readOnly && values.length==0){
this.showField=false
}
Expand Down Expand Up @@ -471,6 +472,7 @@ export default {
this.showActionButton=false
}
this.uri = this.structure.valueConstraint.useValuesFrom[0]
utilsNetwork.loadSimpleLookup(this.uri)
Expand Down Expand Up @@ -1146,6 +1148,7 @@ export default {
.lookup-fake-input-entities{
flex-shrink: 1;
padding: 0.2em;
margin-top: 5px;
}
.lookup-fake-input-label{
Expand All @@ -1155,7 +1158,7 @@ export default {
top: -4px;
left: 2px;
color: gray;
margin-top: 1px;
}
.lookup-fake-input-text{
Expand Down
2 changes: 1 addition & 1 deletion src/stores/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const useConfigStore = defineStore('config', {

versionMajor: 0,
versionMinor: 16,
versionPatch: 27,
versionPatch: 28,

regionUrls: {

Expand Down
7 changes: 4 additions & 3 deletions src/stores/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1794,6 +1794,7 @@ export const useProfileStore = defineStore('profile', {

let pt = utilsProfile.returnPt(this.activeProfile,componentGuid)
let valueLocation = utilsProfile.returnValueFromPropertyPath(pt,propertyPath)

// let deepestLevelURI = propertyPath[propertyPath.length-1].propertyURI

if (!valueLocation){
Expand Down Expand Up @@ -4471,8 +4472,8 @@ export const useProfileStore = defineStore('profile', {
let eid = 'e' + decimalTranslator.new()
eid = eid.substring(0,8)

// pass a fake activeprofile with id == Hub to trigger hub protocols
let pubResuts
// pass a fake activeprofile with id == Hub to trigger hub protocols
let pubResuts
try{
pubResuts = await utilsNetwork.publish(xml, eid, {id: 'Hub'})
console.log(pubResuts)
Expand All @@ -4483,7 +4484,7 @@ export const useProfileStore = defineStore('profile', {
}

// pubResuts = {'location': 'http://id.loc.gov/resources/hubs/1111-111-111-111'}

return pubResuts


Expand Down

0 comments on commit 6c25bca

Please sign in to comment.