Index: main/trunk/greenstone3/web/interfaces/oran/js/gui_div.js
===================================================================
--- main/trunk/greenstone3/web/interfaces/oran/js/gui_div.js	(revision 24792)
+++ main/trunk/greenstone3/web/interfaces/oran/js/gui_div.js	(revision 24869)
@@ -84,5 +84,5 @@
     var prev_service = getSubstring(myurl, "&p.s", "&");
 
-    var post_url = "http://localhost:8989/greenstone3/format?a=f&sa=saveDocument&c=" + collection_name + "&d=" + document_id + "&dt=" + document_type + "&p.a=" + prev_action + "&p.s=" + prev_service;
+    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;
 
     // XML will be automatically wrapped in <display><format> tags when saved to collection config
@@ -96,4 +96,5 @@
 /* FUNCTIONS FOR FORMAT EDITING */                                                                    
 
+// Ensures that a change to a text field is remembered
 function onTextChange(item, text)
 {
@@ -102,4 +103,5 @@
 }
 
+// Ensures that a change to a select field is remembered
 function onSelectChange(item)
 {
@@ -170,5 +172,5 @@
         classifier_name = getSubstring(myurl, "&cl", "&");
 
-    var post_url = "http://localhost:8989/greenstone3/format?a=f&sa=update&c=" + collection_name +"&s=" + service_name;
+    var post_url = "http://localhost:8383/greenstone3/dev?a=f&sa=update&c=" + collection_name +"&s=" + service_name;
 
     if(classifier_name != null)
@@ -201,5 +203,5 @@
         classifier_name = getSubstring(myurl, "&cl", "&");
 
-    var post_url = "http://localhost:8989/greenstone3/format?a=f&sa=save&c=" + collection_name +"&s=" + service_name;
+    var post_url = "http://localhost:8383/greenstone3/dev?a=f&sa=save&c=" + collection_name +"&s=" + service_name;
 
     if(classifier_name != null)
@@ -222,5 +224,5 @@
     var prev_service = getSubstring(myurl, "&p.s", "&");
 
-    var post_url = "http://localhost:8989/greenstone3/format?a=d&c=" + collection_name + "&d=" + document_id + "&dt=" + document_type + "&p.a=" + prev_action + "&p.s=" + prev_service + "&o=skinandlib";
+    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";
 
     $.post(post_url, {data: classname}, function(data) {
@@ -365,5 +367,5 @@
     console.log("Document ready function\n");
 	
-    var CURRENT_SELECT_VALUE = "";
+    CURRENT_SELECT_VALUE = ""; //global - gets set by ui.draggable
 
     /* DOCUMENT SPECIFIC FUNCTIONS */
@@ -425,4 +427,25 @@
 		}
 	});
+
+	$.ui.draggable.prototype._createHelper = function(event) {
+
+                var o = this.options;
+                var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone().removeAttr('id') : this.element);
+
+		var select = $(this.element).find('select');
+		var value = select.attr('value');
+		console.log("Found "+value+" in helper");
+		CURRENT_SELECT_VALUE = value;
+		helper.find('select').attr('value', value);
+
+                if(!helper.parents('body').length)
+                        helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo));
+
+                if(helper[0] != this.element[0] && !(/(fixed|absolute)/).test(helper.css("position")))
+                        helper.css("position", "absolute");
+
+                return helper;
+
+        };
 	
 	$.ui.sortable.prototype._removeCurrentsFromItems = function() {
@@ -974,14 +997,19 @@
     {
     // If select exists, then find CURRENT_SELECT_VALUE
-        var index = me.search(CURRENT_SELECT_VALUE);
-        if(index == -1)
-            console.log("Did not find " + CURRENT_SELECT_VALUE);
-        else
-            console.log("Found " + CURRENT_SELECT_VALUE + " at index " + index);    
-            index = index + CURRENT_SELECT_VALUE.length + 1;
-            console.log("Attempt inserting select at new index "+index);
-            a = me.substring(0,index);
-            b = me.substring(index);
-            me = a.concat("selected",b);
+	if(me.search(CURRENT_SELECT_VALUE) != -1)
+	{
+	    var index = me.search(CURRENT_SELECT_VALUE);
+            if(index == -1)
+                console.log("Did not find " + CURRENT_SELECT_VALUE);
+            else
+	    {
+                console.log("Found " + CURRENT_SELECT_VALUE + " at index " + index);    
+                index = index + CURRENT_SELECT_VALUE.length + 1;
+                console.log("Attempt inserting select at new index "+index);
+                a = me.substring(0,index);
+                b = me.substring(index);
+                me = a.concat("selected",b);
+            }
+	}
     }
 
