Skip to content

Commit

Permalink
Merge pull request #131 from lcnetdev/variant-title-order-and-sort-key
Browse files Browse the repository at this point in the history
Variant title order and sort key
  • Loading branch information
thisismattmiller authored Nov 19, 2024
2 parents 1e991d4 + 17b2c06 commit f2dc692
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/components/panels/edit/fields/Literal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ export default {
if (this.diacriticUse.length>0){
for (let macro of this.diacriticUseValues){
if (event.code == macro.code && event.ctrlKey == macro.ctrlKey && event.altKey == macro.altKey && event.shiftKey == macro.shiftKey){
console.log("run this macro", macro)
// console.log("run this macro", macro)
event.preventDefault()
this.runMacroExpressMacro(event)
Expand Down Expand Up @@ -783,7 +783,7 @@ export default {
let data = this.profileStore.returnLccInfo(this.guid, this.structure)
if (data.contributors && data.contributors.length>0){
data.contributors[0].secondLetterLabel = data.contributors[0].label.substring(1)
}
}
return data
}
return false
Expand Down Expand Up @@ -824,7 +824,7 @@ export default {
// this.lccFeatureData = this.profileStore.returnLccInfo(this.guid, this.structure)
// }
// }
dataChangedTimestamp(newVal, oldVal) {
dataChangedTimestamp(newVal, oldVal) {
this.lccFeatureDataCounter++
}
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: 14,
versionPatch: 15,


regionUrls: {
Expand Down
12 changes: 8 additions & 4 deletions src/stores/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3022,15 +3022,12 @@ export const useProfileStore = defineStore('profile', {




if (pt && pt.userValue && pt.userValue['http://id.loc.gov/ontologies/bibframe/classification'] && pt.userValue['http://id.loc.gov/ontologies/bibframe/classification'].length>0){
let uv = pt.userValue['http://id.loc.gov/ontologies/bibframe/classification'][0]


if (uv && uv['@type'] && uv['@type'] == 'http://id.loc.gov/ontologies/bibframe/ClassificationLcc'){

// this is a LCC field then

// we need to gather info from the component and the rest of the work to build links/suggestions


Expand All @@ -3049,7 +3046,7 @@ export const useProfileStore = defineStore('profile', {





if (titleNonSort && titleNonSort.trim().length >0 && title){
if (isNaN(parseInt(titleNonSort)) == false ){
Expand Down Expand Up @@ -3100,6 +3097,13 @@ export const useProfileStore = defineStore('profile', {

if (pt && pt.userValue && pt.propertyURI == 'http://id.loc.gov/ontologies/bibframe/classification' && Object.keys(pt.userValue).length == 1){

if (titleNonSort && titleNonSort.trim().length >0 && title){
if (isNaN(parseInt(titleNonSort)) == false ){
titleNonSort = parseInt(titleNonSort)
title = title.substr(titleNonSort).trim()
}
}

// it is a new record, so there is no info but the LCC classification is by default so populate the other stuff
return {
title: title,
Expand Down

0 comments on commit f2dc692

Please sign in to comment.