[pLog-svn] r1231 - in plog/trunk: . templates/wizard

oscar at devel.plogworld.net oscar at devel.plogworld.net
Sun Feb 27 17:19:21 GMT 2005


Author: oscar
Date: 2005-02-27 17:19:21 +0000 (Sun, 27 Feb 2005)
New Revision: 1231

Modified:
   plog/trunk/templates/wizard/update2.template
   plog/trunk/templates/wizard/update4.template
   plog/trunk/wizard.php
Log:
now when converting the articles and only when it needs to be done in several steps, the form will submit itself by using javascript and it will also disable the "next" and "previous" buttons since they do not make sense.

Modified: plog/trunk/templates/wizard/update2.template
===================================================================
--- plog/trunk/templates/wizard/update2.template	2005-02-27 16:47:53 UTC (rev 1230)
+++ plog/trunk/templates/wizard/update2.template	2005-02-27 17:19:21 UTC (rev 1231)
@@ -1,5 +1,5 @@
 {include file="wizard/header.template" step=2 title="2 Database Changes"}
-<form name="update2" method="post">
+<form name="update2" id="update2" method="post">
 <fieldset class="inputField">
 <legend>Database Changes</legend>
 {if $viewIsError}
@@ -13,8 +13,9 @@
     <p class="wizardInfoText">
     {if $multipleSteps}
        Processing {$numPosts} posts per step, out of {$totalPosts}.<br/>
-       Current step is {$curStep} out of {$numSteps}.<br/><br/>
-       Please wait... This process may take a while.
+       Current step is <b>{$curStep}</b> out of <b>{$numSteps}</b>.<br/><br/>
+       Please wait... This process may take a while. <b>This page will reload itself until all the steps
+	   have been completed.</b>
     {else}
        All the necessary changes have been made to the database:<br/><br/>
        {$message}
@@ -24,10 +25,11 @@
 {/if}
 </fieldset>
 <div class="buttons">
-   <input type="button" name="Prev" value="&laquo; Previous" onClick="javascript:history.go(-1);" />
+   {if !$multipleSteps}	
+	<input type="button" name="Prev" value="&laquo; Previous" onClick="javascript:history.go(-1);" />
+   {/if}
    <input type="hidden" name="nextStep" value="Update3"/>
    {if $multipleSteps}
-        <input type="submit" name="Continue" value="Continue..." />
         <input type="hidden" name="curStep" value="{$curStep}" />
         <input type="hidden" name="numPosts" value="{$numPosts}" />
    {else}
@@ -35,4 +37,10 @@
    {/if} 
 </div>
 </form>
+{if $multipleSteps}
+ <!-- let's make the document submit itself -->
+ <script type="javascript">
+  document.update2.submit();
+ </script>
+{/if}
 {include file="wizard/footer.template"}
\ No newline at end of file

Modified: plog/trunk/templates/wizard/update4.template
===================================================================
--- plog/trunk/templates/wizard/update4.template	2005-02-27 16:47:53 UTC (rev 1230)
+++ plog/trunk/templates/wizard/update4.template	2005-02-27 17:19:21 UTC (rev 1231)
@@ -22,7 +22,7 @@
    not planning to allow internet users to create new blogs in this server, then you should also
    remove <b>summary.php</b>.<br/><br/>
    Enjoy,<br/>
-  <a href="{$version->getProjectPage()}">The pLog team</a>.
+  <a href="http://www.plogworld.net">The pLog team</a>.
   </p>
  </fieldset> 
  <div class="buttons">

Modified: plog/trunk/wizard.php
===================================================================
--- plog/trunk/wizard.php	2005-02-27 16:47:53 UTC (rev 1230)
+++ plog/trunk/wizard.php	2005-02-27 17:19:21 UTC (rev 1231)
@@ -1452,7 +1452,7 @@
 			$this->_curStep = $this->_request->getValue( "curStep" );
 			$this->_numPosts = $this->_request->getValue( "numPosts" );
 			
-			print("cur step = ".$this->_curStep." - num posts = ".$this->_numPosts."<br/>");
+			//print("cur step = ".$this->_curStep." - num posts = ".$this->_numPosts."<br/>");
 		}
 	
 		function getStatusId( $statusStr )
@@ -1486,7 +1486,7 @@
 				// how many steps do we need?
 				$numSteps = ceil( $numRecords / WIZARD_MAX_RECORDS_PER_STEP );
 				$this->_numSteps = $numSteps;
-				print("using different steps! numSteps = $numSteps<br/>");
+				//print("using different steps! numSteps = $numSteps<br/>");
 			}
 						
 			// run the query and loop through the results
@@ -1496,7 +1496,7 @@
 				$query .= " LIMIT ".$this->_curStep*WIZARD_MAX_RECORDS_PER_STEP.", ".WIZARD_MAX_RECORDS_PER_STEP;
 			}
 			
-			print("query = $query<br/>");
+			//print("query = $query<br/>");
 			
 			$result = $db->Execute( $query );
 			




More information about the pLog-svn mailing list