Changeset 24052 for main/trunk
- Timestamp:
- 2011-05-19T13:38:12+12:00 (13 years ago)
- Location:
- main/trunk/greenstone3
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/LibraryServlet.java
r24019 r24052 15 15 import java.util.ArrayList; 16 16 import java.util.HashMap; 17 import java.util.List; 18 import java.util.Map; 17 19 import java.io.File; 20 import java.lang.reflect.Type; 18 21 import java.util.Hashtable; 19 22 import org.apache.log4j.*; 23 24 import com.google.gson.Gson; 25 import com.google.gson.reflect.TypeToken; 20 26 21 27 // Apache Commons … … 560 566 561 567 //Add custom HTTP headers if requested 562 String httpHeaders = StringEscapeUtils.unescapeHtml4(request.getParameter(GSParams.HTTPHEADERFIELDS)); 563 if (httpHeaders!=null && !httpHeaders.equals ("")) { 564 String[] headerParams = StringUtils.split(httpHeaders, "&"); 565 566 for(int j = 0; j < headerParams.length; j++) 568 Gson gson = new Gson(); 569 Type type = new TypeToken<List<Map<String,String>>>() {}.getType(); 570 List<Map<String,String>> httpHeaders = gson.fromJson(request.getParameter(GSParams.HTTPHEADERFIELDS), type); 571 if (httpHeaders != null && httpHeaders.size() > 0) { 572 573 for(int j = 0; j < httpHeaders.size(); j++) 567 574 { 568 int index = StringUtils.indexOf(headerParams[j], "="); 575 Map nameValueMap = (Map)httpHeaders.get(j); 576 String name = (String)nameValueMap.get("name"); 577 String value = (String)nameValueMap.get("value"); 569 578 570 if(index != -1) 579 System.err.println("SETTING HEADER " + name + " = " + value); 580 581 if(name != null && value != null) 571 582 { 572 response.setHeader(StringUtils.substring(headerParams[j], 0, index), StringUtils.substring(headerParams[j], index+1)); 573 } 574 } 575 583 response.setHeader(name, value); 584 } 585 } 576 586 } 577 587 … … 689 699 690 700 } 691 692 701 } -
main/trunk/greenstone3/web/WEB-INF/classes/interface_default.properties
r24009 r24052 66 66 query.to=to 67 67 query.of=of 68 69 #query.the_term=The term 70 #query.common_word=is too common and has been excluded from the search 71 query.common=The following terms are too common and have been excluded from the search: 68 72 69 73 ################## -
main/trunk/greenstone3/web/interfaces/oran/js/berrybasket/berrybasket.js
r24018 r24052 20 20 21 21 var request_type = "GET"; 22 var url = "?a=pr&rt=r&ro=1&s=ItemNum&o=XML&hhf= Cache-Control%3Dno-cache&c=";22 var url = "?a=pr&rt=r&ro=1&s=ItemNum&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&c="; 23 23 24 24 var responseSuccess = function(o){ … … 293 293 function addBerry(el){ 294 294 alert("ADDING"); 295 var addurl = "?a=pr&rt=r&ro=1&s=AddItem&c=&s1.id=2&o=XML&hhf= Cache-Control%3Dno-cache&s1.item=" + el.id;295 var addurl = "?a=pr&rt=r&ro=1&s=AddItem&c=&s1.id=2&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&s1.item=" + el.id; 296 296 297 297 var addSuccess = function(o){ -
main/trunk/greenstone3/web/interfaces/oran/js/berrybasket/ygDDPlayer.js
r24018 r24052 124 124 125 125 var request_type = "GET"; 126 var addurlPath ="?a=pr&rt=r&ro=1&s=AddItem&c=&s1.id=2&o=XML&hhf= Cache-Control%3Dno-cache&s1.item=";127 var delurlPath ="?a=pr&rt=r&ro=1&s=DeleteItem&c=&o=XML&hhf= Cache-Control%3Dno-cache&s1.item=";126 var addurlPath ="?a=pr&rt=r&ro=1&s=AddItem&c=&s1.id=2&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&s1.item="; 127 var delurlPath ="?a=pr&rt=r&ro=1&s=DeleteItem&c=&o=XML&hhf=[{\"name\":\"Cache-Control\", \"value\":\"no-cache\"}]&s1.item="; 128 128 var postdata = null; 129 129 -
main/trunk/greenstone3/web/interfaces/oran/style/berry.css
r24018 r24052 2 2 min-height: 22px; 3 3 padding: 5px; 4 /*margin: 0 0 1em 0;*/5 /* background: #E0F0E0 url("../images/berrybasket.png") scroll no-repeat 0 0; */6 4 background: transparent url("../images/kete2.png") scroll repeat 0 0; 7 5 z-index:10; 8 /*cursor: pointer;*/9 6 font-size: 80%; 10 7 min-height: 2em; -
main/trunk/greenstone3/web/interfaces/oran/style/core.css
r24018 r24052 330 330 float: right; 331 331 margin: 0; 332 background: transparent url('../images/tab-right.gif') no-repeat scroll 100% -50px;333 332 padding: 0 2px 0 0; 334 333 }
Note:
See TracChangeset
for help on using the changeset viewer.