Changeset 36960
- Timestamp:
- 2022-11-29T23:24:08+13:00 (12 months ago)
- Location:
- gs3-installations/mars/trunk/sites/mars/collect/amc-essentia
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-installations/mars/trunk/sites/mars/collect/amc-essentia/etc/collectionConfig.xml
r36959 r36960 689 689 <div id="recommendationArea"> 690 690 691 <form action="{$library_name}" method="get" name="QueryForm">691 <form id="av-query-form" action="{$library_name}" method="get" name="QueryForm"> 692 692 <input name="a" type="hidden" value="q"/> 693 693 <input name="sa" type="hidden"> … … 759 759 <div> 760 760 <div id="av-chart-div" style="height: 265px; width: 250px; float: right; display: none;"> 761 <img id="av-chart-img" width="250" src="{$library_name}/sites/{$site_name}/collect/{$collName}/images/av-diagram-bw.svg" /> 761 <img id="av-chart-img" width="250" 762 style="cursor: crosshair; background-colorXX: #fefefe;" 763 src="{$library_name}/sites/{$site_name}/collect/{$collName}/images/av-diagram-bw.svg" /> 762 764 <div> 763 765 <i>Or click inside the Arousal-Valence visualisation above to initiate a new AV-based recommendation.</i> -
gs3-installations/mars/trunk/sites/mars/collect/amc-essentia/js/av_document.js
r36959 r36960 84 84 var arousal_val = parseFloat($('#arousal-val').text()); 85 85 var valence_val = parseFloat($('#valence-val').text()); 86 86 87 $('#makeRecommendationFrom-AV').html(`(@${current_time_1dp} secs: arousal=${arousal_val}, valence=${valence_val})`); 88 89 return submitAVRecommendation(form, arousal_val,valence_val, current_time); 90 } 91 92 function submitAVRecommendation(form, arousal_val,valence_val, current_time) 93 { 87 94 form.elements["s1.arousal"].value = arousal_val; 88 95 form.elements["s1.valence"].value = valence_val; 89 90 $('#makeRecommendationFrom-AV').html(`(@${current_time_1dp} secs: arousal=${arousal_val}, valence=${valence_val})`); 91 96 92 97 var args = { 93 98 "a": "q", … … 129 134 $('#resultsAreaDiv').html("<div>Recommendations:</div>"+html_result); 130 135 $('#av-chart-div').show(); 131 132 const updated_url = new URL(window.location);133 updated_url.searchParams.set('p.frameOffset', current_time);134 //window.history.pushState({}, '', url + "?p.frameOffset=" +current_time);135 //window.history.pushState({}, '', updated_url);136 window.history.replaceState({}, '', updated_url);137 138 136 137 if (current_time) { 138 const updated_url = new URL(window.location); 139 updated_url.searchParams.set('p.frameOffset', current_time); 140 //window.history.pushState({}, '', url + "?p.frameOffset=" + current_time); 141 //window.history.pushState({}, '', updated_url); 142 window.history.replaceState({}, '', updated_url); 143 } 139 144 }); 140 145 … … 273 278 274 279 console.log(`av x,y: (${capped_av_x},${capped_av_y})`); 280 281 var form = $('#av-query-form')[0]; 282 283 submitAVRecommendation(form, capped_av_x, capped_av_y, null); 275 284 276 285 }
Note:
See TracChangeset
for help on using the changeset viewer.