Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit03f9bbe

Browse files
authored
Fixes for816891f (#80)
* Update filter-values.js* Update secondary-filter-values.js* Update view-all-items.js
1 parent816891f commit03f9bbe

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

‎src/components/filter-values.js‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ filtervalues = Vue.component('filter-values', {
576576

577577
// Convert the applied filters/time ranges/quantities into SPARQL equivalents
578578
varfilterString="";
579+
varparentFilterString="";
579580
varnoValueString="";
580581
for(leti=0;i<this.appliedFilters.length;i++){
581582
if(this.appliedFilters[i].parentFilterValue){
@@ -1036,9 +1037,9 @@ filtervalues = Vue.component('filter-values', {
10361037
parameters.delete("sf")
10371038
parameters.set("f."+vm.currentFilter.value,"novalue")
10381039
vm.noValueURL=window.location.pathname+"?"+parameters
1039-
// Gets items and their count.
1040-
varsparqlQuery="SELECT ?value ?valueLabel ?count WHERE {\n"+
1041-
"{\n"+
1040+
// Gets items and their count.
1041+
varsparqlQuery="SELECT ?value ?valueLabel ?count\n"+
1042+
"WITH{\n"+
10421043
"SELECT ?value (COUNT(?value) AS ?count) WHERE {\n"+
10431044
this.classSelector+
10441045
"?item wdt:"+vm.currentFilter.value+" ?value.\n"+
@@ -1050,7 +1051,7 @@ filtervalues = Vue.component('filter-values', {
10501051
"}\n";
10511052
sparqlQuery+=
10521053
"GROUP BY ?value\n"+
1053-
"ORDER BY DESC (?count)"+
1054+
"ORDER BY DESC (?count)\n"+
10541055
"LIMIT 1000\n"+
10551056
"} AS %results\n"+
10561057
"WHERE {\n"+

‎src/components/secondary-filter-values.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ secondayFilterValues = Vue.component('secondary-filters', {
393393

394394
// Convert the applied filters/time ranges/quantities into SPARQL equivalents
395395
varfilterString="";
396+
varparentFilterString="";
396397
varnoValueString="";
397398
for(leti=0;i<this.appliedFilters.length;i++){
398399
if(this.appliedFilters[i].parentFilterValue){
@@ -635,7 +636,7 @@ secondayFilterValues = Vue.component('secondary-filters', {
635636
filterString+
636637
"{ # Current filter\n?item wdt:"+vm.currentFilter.value+" ?temp.\n"+
637638
(centralSPARQLService ?'' :"SERVICE <"+centralSPARQLService+"> {\n")+
638-
"?temp (p:"+vm.secondaryFilter.value+"/psv:"+vm.secondaryFilter.value+") ?v.\n"++
639+
"?temp (p:"+vm.secondaryFilter.value+"/psv:"+vm.secondaryFilter.value+") ?v.\n"+
639640
"?v wikibase:quantityAmount ?amount.\n"+
640641
(centralSPARQLService ?'' :"}\n")+
641642
"}\n"+

‎src/components/view-all-items.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ viewallitems = Vue.component('view-all-items', {
376376

377377
// Change applied filters/ranges/quantities to SPARQL equivalents
378378
letfilterString="";
379+
letparentFilterString="";
379380
letnoValueString="";
380381
for(leti=0;i<this.appliedFilters.length;i++){
381382
if(this.appliedFilters[i].parentFilterValue){
@@ -450,7 +451,7 @@ viewallitems = Vue.component('view-all-items', {
450451
maxString+="(MAX(?amountValue"+i+") AS ?qua"+i+") ";
451452
}
452453
else{
453-
filterQuantities+="{#quantity range "+i+"\n?value wdt:"+this.appliedQuantities[i].parentFilterValue+" ?temp"+i+".\n"++
454+
filterQuantities+="{#quantity range "+i+"\n?value wdt:"+this.appliedQuantities[i].parentFilterValue+" ?temp"+i+".\n"+
454455
(centralSPARQLService ?"SERVICE <"+centralSPARQLService+"> {\n" :'')+
455456
"?temp"+i+" (p:"+this.appliedQuantities[i].filterValue+"/psn:"+this.appliedQuantities[i].filterValue+") ?amount"+i+".\n"+
456457
" ?amount"+i+" wikibase:quantityAmount ?amountValue"+i+".\n}"+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp