Changeset 37906 for gs3-installations/thewillow
- Timestamp:
- 2023-08-08T23:30:38+12:00 (10 months ago)
- Location:
- gs3-installations/thewillow/trunk/interfaces/thewillow
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-installations/thewillow/trunk/interfaces/thewillow/js/thewillow-extra.js
r37904 r37906 1 function twFormToggleAllFields() 2 { 3 var $obtype_all = $('#obtype-all'); 4 var $individual_obtype_fields = $('#individual-obtype-fields div'); 5 6 if ($obtype_all.is(':checked')) { 7 $individual_obtype_fields.children().prop('disabled',true); 8 } 9 else { 10 $individual_obtype_fields.children().prop('disabled',false); 11 } 12 13 } 1 14 2 15 function twFormToGSQuery() … … 4 17 var ft_query_term = $('#fulltext-search-terms').val(); 5 18 6 if (ft_query_term.match(/^\s*$/)) { 7 alert("empty"); 19 var num_terms = 0; 20 if (!ft_query_term.match(/^\s*$/)) { 21 num_terms++; 8 22 9 return false; 23 var $ftq_input = $('#QueryForm input.fulltext-query-term'); 24 $ftq_input.val(ft_query_term); 10 25 } 11 26 27 var $ftq_ob_field_input = $('#QueryForm input.objecttype-query-term'); 28 29 // Check for 'all fields' 12 30 13 var $ftq_input = $('#QueryForm input.fulltext-query-term'); 31 if ($('#obtype-all').is(':checked')) { 32 num_terms++; 33 34 var $ob_field_checked = $(".obtype-field"); 14 35 15 $ftq_input.val(ft_query_term); 36 var ftq_ob_field_val = ""; 37 $ob_field_checked.each(function(index,value) { 38 ftq_ob_field_val += " " + $(this).val(); 39 }); 40 41 $ftq_ob_field_input.val(ftq_ob_field_val.trim()); 42 } 43 else { 44 45 var $ob_field_checked = $(".obtype-field:checked"); 16 46 17 18 var $ftq_ob_field_input = $('#QueryForm input.objecttype-query-term'); 19 20 var $ob_field_checked = $(".obtype-field:checked"); 21 22 var ftq_ob_field_val = ""; 23 $ob_field_checked.each(function(index,value) { 24 console.log("*** " + $(this).val()); 25 ftq_ob_field_val += " " + $(this).val(); 26 }); 27 47 var ftq_ob_field_val = ""; 48 $ob_field_checked.each(function(index,value) { 49 num_terms++; 50 ftq_ob_field_val += " " + $(this).val(); 51 }); 52 } 53 54 if (num_terms == 0) { 55 // No actual query input 56 return false; 57 } 58 28 59 $ftq_ob_field_input.val(ftq_ob_field_val.trim()); 29 60 61 // go ahead with search/query 30 62 return true; 31 63 } -
gs3-installations/thewillow/trunk/interfaces/thewillow/style/core-extra.css
r37904 r37906 210 210 /* The following should probably be moved over to default interface css */ 211 211 text-align: left; 212 padding-left: 6px; 213 212 /*padding-left: 6px; */ 213 padding: 0.5rem 0.4rem 0.3rem 0.6rem; 214 215 font-size: 110%; 214 216 } 215 217 -
gs3-installations/thewillow/trunk/interfaces/thewillow/transform/layouts/main.xsl
r37889 r37906 164 164 <div style="clear:both;"><xsl:text> </xsl:text></div> 165 165 </div> 166 166 167 <div style="width: 100%; border-top: solid #E7D821 6px; margin-top: 1.0rem; padding-top: 1.0rem;"> 168 <div>This activity is part of the University of York's Street Lefe project funded by the Higher Education Innovation Fund (HEIF)</div> 169 <div>Copyright @ StreetLife Project 2023</div> 170 </div> 167 171 </div> 168 172 </xsl:template> -
gs3-installations/thewillow/trunk/interfaces/thewillow/transform/pages/query.xsl
r37904 r37906 74 74 float: left; 75 75 width: 33%; 76 padding-bottom: 0.8rem; 76 padding-bottom: 1.0rem; 77 } 78 79 .query-buttons { 80 color: #ffffff; 81 background-color: #000000; 82 font-size: 105%; 83 width: 8rem; 84 height: 2.5rem; 77 85 } 78 86 </style> … … 107 115 <input type="hidden" name="s1.fqv" value="" class="objecttype-query-term"/> 108 116 117 <div id="individual-obtype-fields"> 118 <div class="objecttype-checkbox"> 119 <input type="checkbox" class="obtype-field" id="obtype-articles" name="obtype-articles" value="Article"/> 120 <label for="obtype-articles">Articles</label> 121 </div> 122 <div class="objecttype-checkbox"> 123 <input type="checkbox" class="obtype-field" id="obtype-interviews" name="objtype-interviews" value="Interview"/> 124 <label for="obtype-interviews">Interviews</label> 125 </div> 126 <div class="objecttype-checkbox"> 127 <input type="checkbox" class="obtype-field" id="obtype-listings" name="obtype-listings" value="Listing"/> 128 <label for="obtype-listings">Listings</label> 129 </div> 130 131 <div class="objecttype-checkbox"> 132 <input type="checkbox" class="obtype-field" id="obtype-newspapers" name="obtype-newspapers" value="Newspaper"/> 133 <label for="obtype-newspapers">Newspapers</label> 134 </div> 135 <div class="objecttype-checkbox"> 136 <input type="checkbox" class="obtype-field" id="obtype-photographs" name="objtype-photographs" value="Photograph"/> 137 <label for="obtype-photographs">Photographs</label> 138 </div> 139 <div class="objecttype-checkbox"> 140 <input type="checkbox" class="obtype-field" id="obtype-videos" name="obtype-videos" value="Video"/> 141 <label for="obtype-videos">Videos</label> 142 </div> 143 </div> 144 109 145 <div class="objecttype-checkbox"> 110 <input type="checkbox" class="obtype-field " id="obtype-articles" name="obtype-articles" value="Article"/>111 <label for="obtype-a rticles">Articles</label>146 <input type="checkbox" class="obtype-field-all" onclick="twFormToggleAllFields()" id="obtype-all" name="obtype-all" value="All"/> 147 <label for="obtype-all">All Fields</label> 112 148 </div> 113 <div class="objecttype-checkbox"> 114 <input type="checkbox" class="obtype-field" id="obtype-interviews" name="objtype-interviews" value="Interview"/> 115 <label for="obtype-interviews">Interviews</label> 116 </div> 117 <div class="objecttype-checkbox"> 118 <input type="checkbox" class="obtype-field" id="obtype-listings" name="obtype-listings" value="Listing"/> 119 <label for="obtype-listings">Listings</label> 120 </div> 121 122 <div class="objecttype-checkbox"> 123 <input type="checkbox" class="obtype-field" id="obtype-newspapers" name="obtype-newspapers" value="Newspaper"/> 124 <label for="obtype-newspapers">Newspapers</label> 125 </div> 126 <div class="objecttype-checkbox"> 127 <input type="checkbox" class="obtype-field" id="obtype-photographs" name="objtype-photographs" value="Photograph"/> 128 <label for="obtype-photographs">Photographs</label> 129 </div> 130 <div class="objecttype-checkbox"> 131 <input type="checkbox" class="obtype-field" id="obtype-videos" name="obtype-videos" value="Video"/> 132 <label for="obtype-videos">Videos</label> 133 </div> 134 135 149 136 150 </div> 137 151 </div> … … 170 184 <div style="width: 100%;"> 171 185 <div style="float: right;"> 172 <input type="reset"> 173 <xsl:attribute name="value"> 174 Reset 175 </xsl:attribute> 176 </input> 177 178 <input type="submit"> 179 <xsl:attribute name="value"> 180 Search 181 </xsl:attribute> 182 </input> 186 <input class="query-buttons" type="reset" value="Reset" /> 187 <input class="query-buttons" type="submit" value="Search" /> 183 188 </div> 184 189 </div>
Note:
See TracChangeset
for help on using the changeset viewer.