[pLog-svn] r6198 - in plog/trunk: js/ui/pages templates/admin

mark at devel.lifetype.net mark at devel.lifetype.net
Fri Feb 29 11:07:42 EST 2008


Author: mark
Date: 2008-02-29 11:07:42 -0500 (Fri, 29 Feb 2008)
New Revision: 6198

Modified:
   plog/trunk/js/ui/pages/resourcealbums.js
   plog/trunk/templates/admin/newresource.template
   plog/trunk/templates/admin/resources.template
Log:
Add uploader css and call ajax page loader after all file uploaded.

Modified: plog/trunk/js/ui/pages/resourcealbums.js
===================================================================
--- plog/trunk/js/ui/pages/resourcealbums.js	2008-02-29 16:05:51 UTC (rev 6197)
+++ plog/trunk/js/ui/pages/resourcealbums.js	2008-02-29 16:07:42 UTC (rev 6198)
@@ -35,4 +35,7 @@
 	Lifetype.Forms.Events.performRequestSuccessEvent.subscribe( Lifetype.UI.AjaxPager.reload );
 	Lifetype.Forms.Events.formProcessorSuccessEvent.subscribe( Lifetype.UI.AjaxPager.reload );
     Lifetype.UI.AjaxPager.Events.dataLoaded.subscribe(  Lifetype.UI.Pages.Resources.loadImages );
+
+	// and also when successfully uploading files
+	Lifetype.UI.Upload.Events.allFilesUploaded.subscribe( Lifetype.UI.AjaxPager.reload );
 });
\ No newline at end of file

Modified: plog/trunk/templates/admin/newresource.template
===================================================================
--- plog/trunk/templates/admin/newresource.template	2008-02-29 16:05:51 UTC (rev 6197)
+++ plog/trunk/templates/admin/newresource.template	2008-02-29 16:07:42 UTC (rev 6198)
@@ -1,6 +1,6 @@
 <script type="text/javascript" src="js/ui/forms.js"></script>
 <script type="text/javascript" src="js/ui/plogui.js"></script>
- <form id="addResource" action="admin.php" method="post" enctype="multipart/form-data">
+ <form id="newResource" name="newResource" action="admin.php" method="post" enctype="multipart/form-data">
   <fieldset class="inputField">
    <legend>{$locale->tr("newResource")}</legend>
    {include file="$admintemplatepath/formvalidate.template"}
@@ -8,7 +8,7 @@
     <label for="resourceFile_1">{$locale->tr("file")}</label>
 	<span class="required">*</span>
 	<div class="formHelp">{$locale->tr("resource_file_help")}</div>
-	
+	{** used whenever flash or javascript are not available **}
 	<div id="degradedUI">
 	    <a href="javascript:addElementToForm('fileFields','file','resourceFile','')">{$locale->tr("add_field")}</a>
 		
@@ -18,6 +18,7 @@
 		<a href="javascript:addElementToForm('fileFields','file','resourceFile','')">{$locale->tr("add_field")}</a>
     	{include file="$admintemplatepath/validate.template" field=albumName message=$locale->tr("error_no_resource_uploaded")}	
 	</div>
+	{** container for the flash-based uploader **}	
 	<div id="flashUI" style="display: none;">
 	  <script type="text/javascript">
 		Lifetype.UI.Upload.init( {literal}{{/literal} 

Modified: plog/trunk/templates/admin/resources.template
===================================================================
--- plog/trunk/templates/admin/resources.template	2008-02-29 16:05:51 UTC (rev 6197)
+++ plog/trunk/templates/admin/resources.template	2008-02-29 16:07:42 UTC (rev 6198)
@@ -1,5 +1,6 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=resources title=$locale->tr("resources")}
+<link rel="stylesheet" href="js/ui/assets/upload/upload.css" type="text/css" />
 {js src="js/yui/imageloader/imageloader-beta-min.js"}
 {js src="js/ui/pages/global.js"}
 {js src="js/ui/pages/resources.js"}



More information about the pLog-svn mailing list