Changeset 24869 for main/trunk/greenstone3/web/interfaces
- Timestamp:
- 2011-12-07T15:59:23+13:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/oran/js/gui_div.js
r24442 r24869 84 84 var prev_service = getSubstring(myurl, "&p.s", "&"); 85 85 86 var post_url = "http://localhost:8 989/greenstone3/format?a=f&sa=saveDocument&c=" + collection_name + "&d=" + document_id + "&dt=" + document_type + "&p.a=" + prev_action + "&p.s=" + prev_service;86 var post_url = "http://localhost:8383/greenstone3/dev?a=f&sa=saveDocument&c=" + collection_name + "&d=" + document_id + "&dt=" + document_type + "&p.a=" + prev_action + "&p.s=" + prev_service; 87 87 88 88 // XML will be automatically wrapped in <display><format> tags when saved to collection config … … 96 96 /* FUNCTIONS FOR FORMAT EDITING */ 97 97 98 // Ensures that a change to a text field is remembered 98 99 function onTextChange(item, text) 99 100 { … … 102 103 } 103 104 105 // Ensures that a change to a select field is remembered 104 106 function onSelectChange(item) 105 107 { … … 170 172 classifier_name = getSubstring(myurl, "&cl", "&"); 171 173 172 var post_url = "http://localhost:8 989/greenstone3/format?a=f&sa=update&c=" + collection_name +"&s=" + service_name;174 var post_url = "http://localhost:8383/greenstone3/dev?a=f&sa=update&c=" + collection_name +"&s=" + service_name; 173 175 174 176 if(classifier_name != null) … … 201 203 classifier_name = getSubstring(myurl, "&cl", "&"); 202 204 203 var post_url = "http://localhost:8 989/greenstone3/format?a=f&sa=save&c=" + collection_name +"&s=" + service_name;205 var post_url = "http://localhost:8383/greenstone3/dev?a=f&sa=save&c=" + collection_name +"&s=" + service_name; 204 206 205 207 if(classifier_name != null) … … 222 224 var prev_service = getSubstring(myurl, "&p.s", "&"); 223 225 224 var post_url = "http://localhost:8 989/greenstone3/format?a=d&c=" + collection_name + "&d=" + document_id + "&dt=" + document_type + "&p.a=" + prev_action + "&p.s=" + prev_service + "&o=skinandlib";226 var post_url = "http://localhost:8383/greenstone3/dev?a=d&c=" + collection_name + "&d=" + document_id + "&dt=" + document_type + "&p.a=" + prev_action + "&p.s=" + prev_service + "&o=skinandlib"; 225 227 226 228 $.post(post_url, {data: classname}, function(data) { … … 365 367 console.log("Document ready function\n"); 366 368 367 var CURRENT_SELECT_VALUE = "";369 CURRENT_SELECT_VALUE = ""; //global - gets set by ui.draggable 368 370 369 371 /* DOCUMENT SPECIFIC FUNCTIONS */ … … 425 427 } 426 428 }); 429 430 $.ui.draggable.prototype._createHelper = function(event) { 431 432 var o = this.options; 433 var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone().removeAttr('id') : this.element); 434 435 var select = $(this.element).find('select'); 436 var value = select.attr('value'); 437 console.log("Found "+value+" in helper"); 438 CURRENT_SELECT_VALUE = value; 439 helper.find('select').attr('value', value); 440 441 if(!helper.parents('body').length) 442 helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo)); 443 444 if(helper[0] != this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) 445 helper.css("position", "absolute"); 446 447 return helper; 448 449 }; 427 450 428 451 $.ui.sortable.prototype._removeCurrentsFromItems = function() { … … 974 997 { 975 998 // If select exists, then find CURRENT_SELECT_VALUE 976 var index = me.search(CURRENT_SELECT_VALUE); 977 if(index == -1) 978 console.log("Did not find " + CURRENT_SELECT_VALUE); 979 else 980 console.log("Found " + CURRENT_SELECT_VALUE + " at index " + index); 981 index = index + CURRENT_SELECT_VALUE.length + 1; 982 console.log("Attempt inserting select at new index "+index); 983 a = me.substring(0,index); 984 b = me.substring(index); 985 me = a.concat("selected",b); 999 if(me.search(CURRENT_SELECT_VALUE) != -1) 1000 { 1001 var index = me.search(CURRENT_SELECT_VALUE); 1002 if(index == -1) 1003 console.log("Did not find " + CURRENT_SELECT_VALUE); 1004 else 1005 { 1006 console.log("Found " + CURRENT_SELECT_VALUE + " at index " + index); 1007 index = index + CURRENT_SELECT_VALUE.length + 1; 1008 console.log("Attempt inserting select at new index "+index); 1009 a = me.substring(0,index); 1010 b = me.substring(index); 1011 me = a.concat("selected",b); 1012 } 1013 } 986 1014 } 987 1015
Note:
See TracChangeset
for help on using the changeset viewer.