Update of /cvsroot/tacos/tacos4/src/java/net/sf/tacos/ajax/components
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32064/src/java/net/sf/tacos/ajax/components

Modified Files:
      Tag: tacos4-alpha-7-pretap4-1
        ProgressBar.html ProgressBar.java tacos.js ProgressBar.jwc 
Log Message:
file upload/progress bar fixes

Index: ProgressBar.html
===================================================================
RCS file: 
/cvsroot/tacos/tacos4/src/java/net/sf/tacos/ajax/components/ProgressBar.html,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -C2 -d -r1.2.2.1 -r1.2.2.2
*** ProgressBar.html    20 Dec 2005 19:08:11 -0000      1.2.2.1
--- ProgressBar.html    22 Dec 2005 17:27:51 -0000      1.2.2.2
***************
*** 14,21 ****
        </span>
        <div jwcid="@Any" class="barForeground" style="ognl:'width:' + 
getNumberFormat().format(((worker.currentProgress / worker.totalProgress) * 
300)) + 'px;'" >
!               <!-- <span class="currentProgressValue" ><span jwcid="@Insert" 
value="ognl:getNumberFormat().format(worker.currentProgress)" /></span> -->
        </div>
        <div jwcid="@Any" class="barBackground" style="ognl:'width:' + 
getNumberFormat().format(300 - ((worker.currentProgress / worker.totalProgress) 
* 300)) + 'px;'" >
!               <!-- <span class="totalProgressValue"><span jwcid="@Insert" 
value="ognl:getNumberFormat().format(worker.totalProgress)" /></span> -->
        </div>
  </div>
--- 14,21 ----
        </span>
        <div jwcid="@Any" class="barForeground" style="ognl:'width:' + 
getNumberFormat().format(((worker.currentProgress / worker.totalProgress) * 
300)) + 'px;'" >
!               
        </div>
        <div jwcid="@Any" class="barBackground" style="ognl:'width:' + 
getNumberFormat().format(300 - ((worker.currentProgress / worker.totalProgress) 
* 300)) + 'px;'" >
! 
        </div>
  </div>

Index: ProgressBar.java
===================================================================
RCS file: 
/cvsroot/tacos/tacos4/src/java/net/sf/tacos/ajax/components/ProgressBar.java,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.2
diff -C2 -d -r1.4.2.1 -r1.4.2.2
*** ProgressBar.java    20 Dec 2005 19:08:11 -0000      1.4.2.1
--- ProgressBar.java    22 Dec 2005 17:27:51 -0000      1.4.2.2
***************
*** 8,11 ****
--- 8,12 ----
  
  import net.sf.tacos.ajax.AjaxDirectServiceParameter;
+ import net.sf.tacos.ajax.AjaxWebRequest;
  
  import org.apache.commons.lang.StringUtils;
***************
*** 39,44 ****
--- 40,49 ----
      /** Injected [EMAIL PROTECTED] PartialService} */
      public abstract IEngineService getAjaxService();
+     /** Injected request */
+     public abstract AjaxWebRequest getAjaxRequest();
      /** Element to wrap body with */
      public abstract String getElement();
+     /** Js object to call when completed */
+     public abstract String getOnCompleteObject();
      
      /**
***************
*** 57,60 ****
--- 62,79 ----
          if (!cycle.isRewinding() && element != null)
              writer.end();
+         
+         if (getAjaxRequest().isValidRequest()
+                 && getWorker() != null
+                 && getWorker().isComplete() 
+                 && getOnCompleteObject() != null) {
+             getAjaxRequest().getResponseBuilder().getScriptWriter()
+             .printRaw("<script type=\"text/javascript\">\n"
+                     + " if (typeof " + getOnCompleteObject() 
+                     + " != \"undefined\") {\n"
+                     + getOnCompleteObject() + ".progressFinished(\"" 
+                     + getUpdateId() + "\");\n"
+                     + "}\n"
+                     + "</script>\n");
+         }
      }
      

Index: tacos.js
===================================================================
RCS file: /cvsroot/tacos/tacos4/src/java/net/sf/tacos/ajax/components/tacos.js,v
retrieving revision 1.103.2.3
retrieving revision 1.103.2.4
diff -C2 -d -r1.103.2.3 -r1.103.2.4
*** tacos.js    21 Dec 2005 21:28:56 -0000      1.103.2.3
--- tacos.js    22 Dec 2005 17:27:51 -0000      1.103.2.4
***************
*** 426,431 ****
          load: function(type, data, evt)
          {
!               /* if (kwArgs["multipart"]) {
!                       dojo.debug("Multipart data submit response received:" + 
evt.responseText);
                        //Call optional updateObject
                            if (kwArgs["updateObject"]
--- 426,431 ----
          load: function(type, data, evt)
          {
!               if (kwArgs["multipart"]) {
!                       dojo.debug("Multipart data submit response received.");
                        //Call optional updateObject
                            if (kwArgs["updateObject"]
***************
*** 434,438 ****
                                tacos.responseComplete(data);
                        return;
!               }*/
              if (tacos.loadDojoResponse(type, data, evt, kwArgs)) {
                if (djConfig["isDebug"]) {
--- 434,438 ----
                                tacos.responseComplete(data);
                        return;
!               }
              if (tacos.loadDojoResponse(type, data, evt, kwArgs)) {
                if (djConfig["isDebug"]) {

Index: ProgressBar.jwc
===================================================================
RCS file: 
/cvsroot/tacos/tacos4/src/java/net/sf/tacos/ajax/components/ProgressBar.jwc,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -C2 -d -r1.3 -r1.3.2.1
*** ProgressBar.jwc     18 Nov 2005 09:26:28 -0000      1.3
--- ProgressBar.jwc     22 Dec 2005 17:27:51 -0000      1.3.2.1
***************
*** 39,43 ****
      
        <inject property="ajaxService" object="service:tacos.AjaxDirect" />
!       
        <asset name="pbStylesheet" path="ProgressBar.css"/>
  </component-specification>
--- 39,43 ----
      
        <inject property="ajaxService" object="service:tacos.AjaxDirect" />
!       <inject property="ajaxRequest" object="service:tacos.AjaxWebRequest" />
        <asset name="pbStylesheet" path="ProgressBar.css"/>
  </component-specification>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Tacos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tacos-devel

Reply via email to