[pLog-svn] r2772 - in plog/trunk: imgs/admin js/ui templates/admin

mark at devel.lifetype.net mark at devel.lifetype.net
Thu Jan 12 12:44:03 GMT 2006


Author: mark
Date: 2006-01-12 12:44:02 +0000 (Thu, 12 Jan 2006)
New Revision: 2772

Added:
   plog/trunk/imgs/admin/icon_optionclose-16.png
   plog/trunk/imgs/admin/icon_optionhide-16.png
   plog/trunk/imgs/admin/icon_optionopen-16.png
Modified:
   plog/trunk/js/ui/plogui.js
   plog/trunk/templates/admin/editpost.template
   plog/trunk/templates/admin/newpost.template
Log:
Change the hide/showoption in icon-style. And now it located in right side instead of left side.

Added: plog/trunk/imgs/admin/icon_optionclose-16.png
===================================================================
(Binary files differ)


Property changes on: plog/trunk/imgs/admin/icon_optionclose-16.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: plog/trunk/imgs/admin/icon_optionhide-16.png
===================================================================
(Binary files differ)


Property changes on: plog/trunk/imgs/admin/icon_optionhide-16.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: plog/trunk/imgs/admin/icon_optionopen-16.png
===================================================================
(Binary files differ)


Property changes on: plog/trunk/imgs/admin/icon_optionopen-16.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: plog/trunk/js/ui/plogui.js
===================================================================
--- plog/trunk/js/ui/plogui.js	2006-01-11 23:15:35 UTC (rev 2771)
+++ plog/trunk/js/ui/plogui.js	2006-01-12 12:44:02 UTC (rev 2772)
@@ -106,15 +106,17 @@
 /**
  * this function is the one called when clicking the "add category" button
  */
-function hideOptionPanel()
+function switchOptionPanel()
 {
-	Element.hide($('optionPanel'));
-	startWidth = $('mainPanel').offsetWidth;
-	new Rico.Effect.Size( $('mainPanel'), 660, null, 500, 10, {complete:function() {}} );
-}
-
-function showOptionPanel()
-{
-	startWidth = $('mainPanel').offsetWidth;
-	new Rico.Effect.Size( $('mainPanel'), 489, null, 500, 10, {complete:function() { Element.show($('optionPanel')); }} );
+	if ( $('optionPanel').style.display == 'none' )
+	{
+		startWidth = $('mainPanel').offsetWidth;
+		new Rico.Effect.Size( $('mainPanel'), 489, null, 500, 10, {complete:function() { Element.show($('optionPanel')); $('optionIcon').src = 'imgs/admin/icon_optionclose-16.png'; }} );
+	}
+	else
+	{
+		Element.hide($('optionPanel'));
+		startWidth = $('mainPanel').offsetWidth;
+		new Rico.Effect.Size( $('mainPanel'), 660, null, 500, 10, {complete:function() { $('optionIcon').src = 'imgs/admin/icon_optionopen-16.png'; }} );
+	}
 }
\ No newline at end of file

Modified: plog/trunk/templates/admin/editpost.template
===================================================================
--- plog/trunk/templates/admin/editpost.template	2006-01-11 23:15:35 UTC (rev 2771)
+++ plog/trunk/templates/admin/editpost.template	2006-01-12 12:44:02 UTC (rev 2772)
@@ -21,7 +21,11 @@
   <form name="newPost" id="editPost" action="admin.php" method="post">
    <fieldset class="inputField">
    <legend>{$locale->tr("editPost")}</legend>
-   <a href="#" onclick="hideOptionPanel()">Hide</a>&nbsp;|&nbsp;<a href="#" onclick="showOptionPanel()">Show</a>
+
+   <div style="text-align: right;">
+     <a href="#" onclick="switchOptionPanel()"><img name="optionIcon" id="optionIcon" src="imgs/admin/icon_optionclose-16.png" style="border:0px;width: 16px; height: 16px; padding: 0;" /></a>
+   </div>
+   
    <div name="mainPanel" id="mainPanel" style="float:left; width: 73%; border-right: 1px solid #DEDEDE;">  
      {include file="$admintemplatepath/formvalidate.template" message=$locale->tr("error_updating_post")}    
 	 
@@ -109,7 +113,7 @@
            {/foreach}
          </select>
          <input type="text" name="newArticleCategory" id="newArticleCategory" style="width:100px; margin-top:3px;" size="16" value="" />
-         <input type="button" name="addArticleCategory" style="width:35px; margin-top:3px;" value="{$locale->tr("add")}" onclick="javascript:addArticleCategoryAjax()" />
+         <input type="button" name="addArticleCategory" id="addArticleCategory" style="width:35px; margin-top:3px;" value="{$locale->tr("add")}" onclick="javascript:addArticleCategoryAjax()" />
         {include file="$admintemplatepath/validate.template" field=postCategories message=$locale->tr("error_no_categories")}	   
 	   </div>
 	   

Modified: plog/trunk/templates/admin/newpost.template
===================================================================
--- plog/trunk/templates/admin/newpost.template	2006-01-11 23:15:35 UTC (rev 2771)
+++ plog/trunk/templates/admin/newpost.template	2006-01-12 12:44:02 UTC (rev 2772)
@@ -42,7 +42,11 @@
   <form name="newPost" id="newPost" action="admin.php" method="post">
    <fieldset class="inputField">
    <legend>{$locale->tr("newPost")}</legend>
-   <a href="#" onclick="hideOptionPanel()">Hide</a>&nbsp;|&nbsp;<a href="#" onclick="showOptionPanel()">Show</a>
+
+   <div style="text-align: right;">
+     <a href="#" onclick="switchOptionPanel()"><img name="optionIcon" id="optionIcon" src="imgs/admin/icon_optionclose-16.png" style="border:0px;width: 16px; height: 16px; padding: 0;" /></a>
+   </div>
+
    <div name="mainPanel" id="mainPanel" style="float:left; width: 73%; border-right: 1px solid #DEDEDE;">
 	   {include file="$admintemplatepath/formvalidate.template" message=$locale->tr("error_adding_post")}  
 	   <div class="field">
@@ -89,7 +93,6 @@
    </div>
 
    <div name="optionPanel" id="optionPanel" style="float:left; width: 23%; margin-left: 8px;">
-   
 	   <div class="field">
 	     <label for="postSlug">{$locale->tr("post_slug")}</label>
 		 <div class="formHelp">{$locale->tr("post_slug_help")}</div>
@@ -130,7 +133,7 @@
            {/foreach}
          </select>
          <input type="text" name="newArticleCategory" id="newArticleCategory" style="width:100px; margin-top:3px;" size="16" value="" />
-         <input type="button" name="addArticleCategory" style="width:35px; margin-top:3px;" value="{$locale->tr("add")}" onclick="javascript:addArticleCategoryAjax()" />
+         <input type="button" name="addArticleCategory" id="addArticleCategory" style="width:35px; margin-top:3px;" value="{$locale->tr("add")}" onclick="javascript:addArticleCategoryAjax()" />
         {include file="$admintemplatepath/validate.template" field=postCategories message=$locale->tr("error_no_category_selected")}	   
 	   </div>
 	   



More information about the pLog-svn mailing list