[gatein-commits] gatein SVN: r5340 - in exo/portal/branches/3.1.x: web/eXoResources/src/main/webapp/javascript/eXo/gadget and 2 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Nov 29 04:38:55 EST 2010


Author: phuong_vu
Date: 2010-11-29 04:38:54 -0500 (Mon, 29 Nov 2010)
New Revision: 5340

Modified:
   exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/Todo/Todo.xml
   exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js
   exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
   exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
Log:
EXOGTN-123 Todo gadgets: type any note into the Todo gadgets, and do refresh the browser, the note cannot be saved....

Modified: exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/Todo/Todo.xml
===================================================================
--- exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/Todo/Todo.xml	2010-11-29 09:27:32 UTC (rev 5339)
+++ exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/Todo/Todo.xml	2010-11-29 09:38:54 UTC (rev 5340)
@@ -175,11 +175,11 @@
             if(inputList[i].value != null && inputList[i].value != "") {
               var tmp = inputList[i].value;
 	            var numTask = tmp.substring(0, tmp.indexOf('.'));
-						  var contentTask = tmp.substring(tmp.indexOf('.'), tmp.length);
+						  var contentTask = tmp.substring(tmp.indexOf('.') + 1, tmp.length);
               if(parseInt(numTask) != parseInt(inputList[i].id)) {
 							  numTask = inputList[i].id;
 					  	}
-						  inputList[i].value = numTask+contentTask;
+						  inputList[i].value = numTask + "." + contentTask;
             }
           }
         }   

Modified: exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js
===================================================================
--- exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js	2010-11-29 09:27:32 UTC (rev 5339)
+++ exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js	2010-11-29 09:38:54 UTC (rev 5340)
@@ -762,16 +762,26 @@
     }
   }
   this.setUserPrefs(prefs);
-  this.refresh();
 };
 
+gadgets.IfrGadget.prototype.setUserPrefs = function(newUserPrefs) {	
+	gadgets.IfrGadget.superClass_.setUserPrefs.call(this, newUserPrefs);		
+	this.refresh();
+};
+
+gadgets.IfrGadget.prototype.setUserPref = function(name, value) {	
+	gadgets.IfrGadget.superClass_.setUserPref.call(this, name, value);	
+	this.refresh();
+};
+
 gadgets.IfrGadget.prototype.handleCancelUserPrefs = function() {
   this.hideUserPrefsDialog();
 };
 
 gadgets.IfrGadget.prototype.refresh = function() {
   var iframeId = this.getIframeId();
-  document.getElementById(iframeId).src = this.getIframeUrl();
+  if (document.getElementById(iframeId)) 
+	  document.getElementById(iframeId).src = this.getIframeUrl();
 };
 
 

Modified: exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
===================================================================
--- exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js	2010-11-29 09:27:32 UTC (rev 5339)
+++ exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js	2010-11-29 09:38:54 UTC (rev 5340)
@@ -515,7 +515,7 @@
 	      }
 	    }
 	  }
-	  if(response.blocksToUpdate == undefined) {
+	  if(response.blocksToUpdate == undefined && temp.innerHTML !== "") {
 	  	if(confirm(eXo.i18n.I18NMessage.getMessage("SessionTimeout"))) instance.ajaxTimeout(request) ;
 	  }
 	  //Handle the portal responses

Modified: exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
===================================================================
--- exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java	2010-11-29 09:27:32 UTC (rev 5339)
+++ exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java	2010-11-29 09:38:54 UTC (rev 5340)
@@ -438,6 +438,7 @@
          //
          try{
             uiGadget.addUserPref(event.getRequestContext().getRequestParameter("userPref"));
+            Util.getPortalRequestContext().setResponseComplete(true);
          } catch(Exception e){
             WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
             UIPortletApplication uiPortlet = uiGadget.getAncestorOfType(UIPortletApplication.class);



More information about the gatein-commits mailing list