OSDN Git Service

アイテム追加/編集基本画面のパース時のエラー対応
authorshizuki <shizuki@kinezumi.net>
Tue, 1 May 2012 10:44:03 +0000 (19:44 +0900)
committershizuki <shizuki@kinezumi.net>
Tue, 1 May 2012 10:44:03 +0000 (19:44 +0900)
旧PAGEFACTORY由来のparse_*メソッドをAdminActionsに移行、及び<%jsinput%>と<%jsbuttonbar%>部分をスキンに直接記述
これに伴いボタン用画像もスキンディレクトリに移動

17 files changed:
nucleus/libs/ADMIN.php
nucleus/libs/AdminActions.php
skins/admin/defaultadmin/images/button-aligncenter.gif [moved from nucleus/images/button-aligncenter.gif with 100% similarity]
skins/admin/defaultadmin/images/button-alignleft.gif [moved from nucleus/images/button-alignleft.gif with 100% similarity]
skins/admin/defaultadmin/images/button-alignright.gif [moved from nucleus/images/button-alignright.gif with 100% similarity]
skins/admin/defaultadmin/images/button-bold.gif [moved from nucleus/images/button-bold.gif with 100% similarity]
skins/admin/defaultadmin/images/button-copy.gif [moved from nucleus/images/button-copy.gif with 100% similarity]
skins/admin/defaultadmin/images/button-cut.gif [moved from nucleus/images/button-cut.gif with 100% similarity]
skins/admin/defaultadmin/images/button-italic.gif [moved from nucleus/images/button-italic.gif with 100% similarity]
skins/admin/defaultadmin/images/button-left.gif [moved from nucleus/images/button-left.gif with 100% similarity]
skins/admin/defaultadmin/images/button-link.gif [moved from nucleus/images/button-link.gif with 100% similarity]
skins/admin/defaultadmin/images/button-media.gif [moved from nucleus/images/button-media.gif with 100% similarity]
skins/admin/defaultadmin/images/button-paste.gif [moved from nucleus/images/button-paste.gif with 100% similarity]
skins/admin/defaultadmin/images/button-preview.gif [moved from nucleus/images/button-preview.gif with 100% similarity]
skins/admin/defaultadmin/images/button-right.gif [moved from nucleus/images/button-right.gif with 100% similarity]
skins/admin/defaultadmin/images/globe.gif [moved from nucleus/images/globe.gif with 100% similarity]
skins/admin/defaultadmin/skinbackup.xml

index e249ebf..0e35fcf 100644 (file)
@@ -657,7 +657,7 @@ class Admin
         *\r
         * NOTE: callback from AdminAction\r
         */\r
-       static private function selectBlogCategory($name, $selected = 0, $tabindex = 0, $showNewCat = 0, $iForcedBlogInclude = -1)\r
+       static public function selectBlogCategory($name, $selected = 0, $tabindex = 0, $showNewCat = 0, $iForcedBlogInclude = -1)\r
        {\r
                Admin::selectBlog($name, 'category', $selected, $tabindex, $showNewCat, $iForcedBlogInclude);\r
                return;\r
@@ -863,8 +863,15 @@ class Admin
                // only allow if user is allowed to alter item\r
                $member->canAlterItem($itemid) or self::disallow();\r
                \r
-               $item =& $manager->getItem($itemid, 1, 1);\r
-               $blog =& $manager->getBlog(getBlogIDFromItemID($itemid));\r
+               $itemid = intRequestVar('itemid');\r
+               $blogid = getBlogIDFromItemID($itemid);\r
+               $item   =& $manager->getItem($itemid, 1, 1);\r
+               $manager->notify(\r
+                               'PrepareItemForEdit',\r
+                               array(\r
+                                               'item' => &$item\r
+                               )\r
+               );\r
                \r
                self::pagehead();\r
                self::$skin->parse('itemedit');\r
@@ -5969,6 +5976,14 @@ class Admin
        }\r
        \r
        /**\r
+        * Admin::getAdminpassvar()\r
+        */\r
+       static function getAdminpassvar()\r
+       {\r
+               return self::$passvar;\r
+       }\r
+       \r
+       /**\r
         * Admin::getAdminAction()\r
         */\r
        static function getAdminAction()\r
index d736d9e..01ed6ba 100644 (file)
@@ -481,8 +481,6 @@ class AdminActions extends BaseActions
                                $extra_actions = array(
                                        'adminbloglink',
                                        'blogid',
-                                       'jsinput',
-                                       'jsbuttonbar',
                                        'contents',
                                        'categories',
                                        'currenttime',
@@ -532,8 +530,6 @@ class AdminActions extends BaseActions
                                $extra_actions = array(
                                        'init',
                                        'contents',
-                                       'jsinput',
-                                       'jsbuttonbar',
                                        'checkedonval',
                                        'categories',
                                        'currenttime',
@@ -1654,6 +1650,19 @@ class AdminActions extends BaseActions
        }
        
        /**
+        * AdminActions::parse_blogid()
+        * Parse skinvar blogid
+        * 
+        * @param       void
+        * @return      void
+        */
+       function parse_blogid()
+       {
+               echo intRequestVar('blogid');
+               return;
+       }
+       
+       /**
         * AdminActions::parse_blognotifysetting()
         * Parse skinvar blognotifysetting
         * 
@@ -1742,9 +1751,9 @@ class AdminActions extends BaseActions
                                }
                                
                                // 2. for each category in that blog
-                               $catQueriy  = "SELECT cname, catid FROM %s WHERE cblog=%d ORDER BY cname ASC;";
+                               $catQuery = "SELECT cname, catid FROM %s WHERE cblog=%d ORDER BY cname ASC;";
                                $catQuery = sprintf($catQuery, sql_table('category'), (integer) $oBlog->bnumber);
-                               $categories = sql_query(sprintf($catQueriy));
+                               $categories = sql_query($catQuery);
                                while ( $oCat = sql_fetch_object($categories) )
                                {
                                        if ( $oCat->catid == $selected )
@@ -1934,6 +1943,42 @@ class AdminActions extends BaseActions
                echo Entity::hsc('javascript:' . getBookmarklet($blogid));
                return;
        }
+
+       /**
+        * AdminActions::parse_categories()
+        * Parse skinvar categories
+        * 
+        * create category dropdown box
+        * 
+        * @param       string  $type   name of setting for category
+        * @return      void
+        */
+       function parse_categories($startidx = 0)
+       {
+               global $manager;
+               $item   = false;
+               $itemid = intRequestVar('itemid');
+               $item   =& $manager->getItem($itemid, 1, 1);
+               $blog   =& $manager->getBlog(getBlogIDFromItemID($itemid));
+               if ($item && $blog->convertBreaks() && requestVar('action') == 'itemedit') {
+                       $item['body'] = removeBreaks($item['body']);
+                       $item['more'] = removeBreaks($item['more']);
+               }
+               $contents = array();
+               if ( requestVar('action') == 'itemedit' )
+               {
+                       $contents = $item;
+               }
+               if ( isset($contents['catid']) && $contents['catid'] )
+               {
+                       $catid = $contents['catid'];             // on edit item
+               }
+               else
+               {
+                       $catid = $blog->getDefaultCategory();     // on add item
+               }
+               Admin::selectBlogCategory('catid', $catid, $startidx, 1, $blog->getID());
+       }
        
        /**
         * AdminActions::parse_category()
@@ -1985,6 +2030,39 @@ class AdminActions extends BaseActions
         * AdminActions::parse_codename()
         * Parse templatevar codename
         * 
+        * @param       $value
+        * @param       $name
+        * 
+        */
+       function parse_checkedonval($value, $name) {
+               global $manager;
+               $item   = false;
+               $itemid = intRequestVar('itemid');
+               $item   =& $manager->getItem($itemid, 1, 1);
+               $blog   =& $manager->getBlog(getBlogIDFromItemID($itemid));
+               if ($item && $blog->convertBreaks() && requestVar('action') == 'itemedit') {
+                       $item['body'] = removeBreaks($item['body']);
+                       $item['more'] = removeBreaks($item['more']);
+               }
+               $contents = array();
+               if ( requestVar('action') == 'itemedit' )
+               {
+                       $contents = $item;
+               }
+               if ( !isset($contents[$name]) )
+               {
+                       $contents[$name] = '';
+               }
+               if ($contents[$name] == $value)
+               {
+                       echo 'checked="checked"';
+               }
+       }
+       
+       /**
+        * AdminActions::parse_codename()
+        * Parse templatevar codename
+        * 
         * @param       void
         * @return      void
         * 
@@ -2144,6 +2222,71 @@ class AdminActions extends BaseActions
        }
        
        /**
+        * AdminActions::parse_contents()
+        * Parse skinvar contents
+        * 
+        * @param       string  $which          part for item
+        * @return      void
+        */
+       function parse_contents($which)
+       {
+               global $manager;
+               $item     = false;
+               $contents = array();
+               if ( requestVar('action') == 'itemedit' )
+               {
+                       $itemid = intRequestVar('itemid');
+                       $item   =& $manager->getItem($itemid, 1, 1);
+                       $blog   =& $manager->getBlog(getBlogIDFromItemID($itemid));
+                       if ( $item && $blog->convertBreaks() )
+                       {
+                               $item['body'] = removeBreaks($item['body']);
+                               $item['more'] = removeBreaks($item['more']);
+                       }
+                       $contents = $item;
+               }
+               elseif ( requestVar('action') == 'createitem' )
+               {
+                       $blog =& $manager->getBlog(intRequestVar($blogid));
+                       $manager->notify(
+                               'PreAddItemForm',
+                               array(
+                                       'contents' => &$contents,
+                                       'blog'     => &$blog
+                               )
+                       );
+               }
+               if ( !isset($contents[$which]) )
+               {
+                       $contents[$which] = '';
+               }
+               echo Entity::hsc($contents[$which],ENT_QUOTES);
+       }
+       
+       /**
+        * AdminActions::parse_currenttime()
+        * Parse skinvar currenttime
+        * 
+        * @param       string  $what
+        */
+       // for future items
+       function parse_currenttime($what)
+       {
+               global $manager;
+               if ( requestVar('action') == 'itemedit' )
+               {
+                       $itemid = intRequestVar('itemid');
+                       $blog   =& $manager->getBlog(getBlogIDFromItemID($itemid));
+               } 
+               elseif ( requestVar('action') == 'createitem' )
+               {
+                       $blog   =& $manager->getBlog(intRequestVar('blogid'));
+               }
+               $nu     = getdate($blog->getCorrectTime());
+               echo $nu[$what];
+       }
+       
+       /**
         * AdminActions::parse_customhelplink()
         * Parse skinvar customhelplink
         * 
@@ -3410,6 +3553,39 @@ class AdminActions extends BaseActions
         * AdminActions::parse_inputyesno()
         * Parse skinvar inputyesno
         * 
+        * some init stuff for all forms
+        * 
+        * @param       void
+        */
+       function parse_init()
+       {
+               global $manager;
+               $item   = false;
+               if ( requestVar('action') == 'itemedit' )
+               {
+                       $itemid = intRequestVar('itemid');
+                       $item   =& $manager->getItem($itemid, 1, 1);
+                       $blog   =& $manager->getBlog(getBlogIDFromItemID($itemid));
+                       if ( $item && $blog->convertBreaks() )
+                       {
+                               $item['body'] = removeBreaks($item['body']);
+                               $item['more'] = removeBreaks($item['more']);
+                       }
+                       $contents = $item;
+                       $authorid = $contents['authorid'];
+               }
+               elseif ( requestVar('action') == 'createitem' )
+               {
+                       $blog     =& $manager->getBlog(intRequestVar($blogid));
+                       $authorid = '';
+               }
+               $blog->insertJavaScriptInfo($authorid);
+       }
+       
+       /**
+        * AdminActions::parse_inputyesno()
+        * Parse skinvar inputyesno
+        * 
         * @param       string  $name                   
         * @param       string  $checkedval             
         * @param       string  $tabindex               
@@ -3629,6 +3805,59 @@ class AdminActions extends BaseActions
        }
        
        /**
+        * AdminActions::parse_itemoptions()
+        * Parse skinvar itemoptions
+        * Adds the itemOptions of a plugin to a page
+        * @author TeRanEX
+        */
+       function parse_itemoptions()
+       {
+               $this->parse_pluginoptions($type = 'item');
+//             global $itemid;
+//             Admin::insertPluginOptions('item', $itemid);
+       }
+       
+       /**
+        * AdminActions::parse_itemoptions()
+        * 
+        * date change on edit item
+        * 
+        * Parse skinvar itemoptions
+        * Adds the itemOptions of a plugin to a page
+        * @author TeRanEX
+        */
+       function parse_itemtime($what)
+       {
+               global $manager;
+               $item   = false;
+               $itemid = intRequestVar('itemid');
+               $item   =& $manager->getItem($itemid, 1, 1);
+               $blog   =& $manager->getBlog(getBlogIDFromItemID($itemid));
+               if ( $item && $blog->convertBreaks() && requestVar('action') == 'itemedit' )
+               {
+                       $item['body'] = removeBreaks($item['body']);
+                       $item['more'] = removeBreaks($item['more']);
+               }
+               $contents = array();
+               if ( requestVar('action') == 'itemedit' )
+               {
+                       $contents = $item;
+               } 
+               elseif ( requestVar('action') == 'createitem' )
+               {
+                       $manager->notify(
+                               'PreAddItemForm',
+                               array(
+                                       'contents' => &$contents,
+                                       'blog'     => &$this->blog
+                               )
+                       );
+               }
+               $itemtime = getdate($contents['timestamp']);
+               echo $itemtime[$what];
+       }
+       
+       /**
         * AdminActions::parse_jstoolbaroptions()
         * Parse skinvar jstoolbaroptions
         * 
@@ -3943,10 +4172,11 @@ class AdminActions extends BaseActions
         */
        public function parse_passrequestvars()
        {
+               $passvar   = Admin::getAdminpassvar();
                $oldaction = postVar('oldaction');
                if ( ($oldaction != 'logout')
                  && ($oldaction != 'login')
-                 && Admin::passvar
+                 && $passvar
                  && !postVar('customaction') )
                {
                        passRequestVars();
@@ -4067,6 +4297,9 @@ class AdminActions extends BaseActions
                        case 'category':
                                $id = intRequestVar('catid');
                                break;
+                       case 'item':
+                               global $itemid;
+                               $id = $itemid;
                }
                Admin::insertPluginOptions($type, $id);
                return;
index 9a2582e..c3e0966 100644 (file)
@@ -910,8 +910,7 @@ selector();
        </tr><%endif%>\r
        <tr>\r
                <td><%text(_ADD_TITLE)%></td>\r
-               <td><input \r
-                       <%jsinput(title)%>\r
+               <td><input id="inputtitle" onkeyup="storeCaret(this); updPreview(title); doMonitor();" onclick="storeCaret(this);" onselect="storeCaret(this);"\r
                        tabindex="10"\r
                        size="60" \r
                        maxlength="160" \r
@@ -922,9 +921,67 @@ selector();
                        <%text(_ADD_BODY)%> <%helplink(additem)%>\r
                </td>\r
                <td>\r
-                       <%jsbuttonbar(media+preview)%>\r
-                       <textarea\r
-                               <%jsinput(body)%>\r
+               <div class="jsbuttonbar">\r
+<!--[if IE]>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="cutThis()">\r
+                               <img src="<%skinfile(/images/button-cut.gif)%>" title="<%text(_ADD_CUT_TT)%>(Ctrl + X)" alt="<%text(_ADD_CUT_TT)%>(Ctrl + X)" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="copyThis()">\r
+                               <img src="<%skinfile(/images/button-copy.gif)%>" title="<%text(_ADD_COPY_TT)%>(Ctrl + C)" alt="<%text(_ADD_COPY_TT)%>(Ctrl + C)" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="pasteThis()">\r
+                               <img src="<%skinfile(/images/button-paste.gif)%>" title="<%text(_ADD_PASTE_TT)%>(Ctrl + V)" alt="<%text(_ADD_PASTE_TT)%>(Ctrl + V)" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbuttonspacer">&nbsp;</span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="boldThis()">\r
+                               <img src="<%skinfile(/images/button-bold.gif)%>" title="<%text(_ADD_BOLD_TT)%>(Ctrl + Shift + B)" alt="<%text(_ADD_BOLD_TT)%>(Ctrl + Shift + B)" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="italicThis()">\r
+                               <img src="<%skinfile(/images/button-italic.gif)%>" title="<%text(_ADD_ITALIC_TT)%>(Ctrl + Shift + I)" alt="<%text(_ADD_ITALIC_TT)%>(Ctrl + Shift + I)" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="ahrefThis()">\r
+                               <img src="<%skinfile(/images/button-link.gif)%>" title="<%text(_ADD_HREF_TT)%>(Ctrl + Shift + A)" alt="<%text(_ADD_HREF_TT)%>(Ctrl + Shift + A)" width="16" height="16" />\r
+                       </span>\r
+<![endif]-->\r
+<!--[if ! IE]>-->\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="boldThis()">\r
+                               <img src="<%skinfile(/images/button-bold.gif)%>" title="<%text(_ADD_BOLD_TT)%>" alt="<%text(_ADD_BOLD_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="italicThis()">\r
+                               <img src="<%skinfile(/images/button-italic.gif)%>" title="<%text(_ADD_ITALIC_TT)%>" alt="<%text(_ADD_ITALIC_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="ahrefThis()">\r
+                               <img src="<%skinfile(/images/button-link.gif)%>" title="<%text(_ADD_HREF_TT)%>" alt="<%text(_ADD_HREF_TT)%>" width="16" height="16" />\r
+                       </span>\r
+<!--<![endif]-->\r
+                       <span class="jsbuttonspacer">&nbsp;</span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="alignleftThis()">\r
+                               <img src="<%skinfile(/images/button-alignleft.gif)%>" title="<%text(_ADD_ALIGNLEFT_TT)%>" alt="<%text(_ADD_ALIGNLEFT_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="alignrightThis()">\r
+                               <img src="<%skinfile(/images/button-alignright.gif)%>" title="<%text(_ADD_ALIGNRIGHT_TT)%>" alt="<%text(_ADD_ALIGNRIGHT_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="aligncenterThis()">\r
+                               <img src="<%skinfile(/images/button-aligncenter.gif)%>" title="<%text(_ADD_ALIGNCENTER_TT)%>" alt="<%text(_ADD_ALIGNCENTER_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbuttonspacer">&nbsp;</span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="leftThis()">\r
+                               <img src="<%skinfile(/images/button-left.gif)%>" title="<%text(_ADD_LEFT_TT)%>" alt="<%text(_ADD_LEFT_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="rightThis()">\r
+                               <img src="<%skinfile(/images/button-right.gif)%>" title="<%text(_ADD_RIGHT_TT)%>" alt="<%text(_ADD_RIGHT_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbuttonspacer">&nbsp;</span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="addMedia()">\r
+                               <img src="<%skinfile(/images/button-media.gif)%>" title="<%text(_ADD_MEDIA_TT)%>" alt="<%text(_ADD_MEDIA_TT)%>" width="16" height="16" />\r
+                       </span>\r
+<!--[if IE]>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="showedit()">\r
+                               <img src="<%skinfile(/images/button-preview.gif)%>" title="<%text(_ADD_PREVIEW_TT)%>" alt="<%text(_ADD_PREVIEW_TT)%>" width="16" height="16" />\r
+                       </span>\r
+<![endif]-->\r
+               </div>\r
+                       <textarea id="inputbody" onkeyup="storeCaret(this); updPreview(body); doMonitor();" onclick="storeCaret(this);" onselect="storeCaret(this);"\r
                                tabindex="20"\r
                                cols="60"\r
                                rows="20"><%contents(body)%></textarea>\r
@@ -991,9 +1048,67 @@ selector();
                        <br /><%helplink(extended)%>\r
                </td>\r
                <td>\r
-                       <%jsbuttonbar(media+preview)%>          \r
-                       <textarea \r
-                               <%jsinput(more)%>                       \r
+               <div class="jsbuttonbar">\r
+<!--[if IE]>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="cutThis()">\r
+                               <img src="<%skinfile(/images/button-cut.gif)%>" title="<%text(_ADD_CUT_TT)%>(Ctrl + X)" alt="<%text(_ADD_CUT_TT)%>(Ctrl + X)" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="copyThis()">\r
+                               <img src="<%skinfile(/images/button-copy.gif)%>" title="<%text(_ADD_COPY_TT)%>(Ctrl + C)" alt="<%text(_ADD_COPY_TT)%>(Ctrl + C)" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="pasteThis()">\r
+                               <img src="<%skinfile(/images/button-paste.gif)%>" title="<%text(_ADD_PASTE_TT)%>(Ctrl + V)" alt="<%text(_ADD_PASTE_TT)%>(Ctrl + V)" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbuttonspacer">&nbsp;</span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="boldThis()">\r
+                               <img src="<%skinfile(/images/button-bold.gif)%>" title="<%text(_ADD_BOLD_TT)%>(Ctrl + Shift + B)" alt="<%text(_ADD_BOLD_TT)%>(Ctrl + Shift + B)" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="italicThis()">\r
+                               <img src="<%skinfile(/images/button-italic.gif)%>" title="<%text(_ADD_ITALIC_TT)%>(Ctrl + Shift + I)" alt="<%text(_ADD_ITALIC_TT)%>(Ctrl + Shift + I)" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="ahrefThis()">\r
+                               <img src="<%skinfile(/images/button-link.gif)%>" title="<%text(_ADD_HREF_TT)%>(Ctrl + Shift + A)" alt="<%text(_ADD_HREF_TT)%>(Ctrl + Shift + A)" width="16" height="16" />\r
+                       </span>\r
+<![endif]-->\r
+<!--[if ! IE]>-->\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="boldThis()">\r
+                               <img src="<%skinfile(/images/button-bold.gif)%>" title="<%text(_ADD_BOLD_TT)%>" alt="<%text(_ADD_BOLD_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="italicThis()">\r
+                               <img src="<%skinfile(/images/button-italic.gif)%>" title="<%text(_ADD_ITALIC_TT)%>" alt="<%text(_ADD_ITALIC_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="ahrefThis()">\r
+                               <img src="<%skinfile(/images/button-link.gif)%>" title="<%text(_ADD_HREF_TT)%>" alt="<%text(_ADD_HREF_TT)%>" width="16" height="16" />\r
+                       </span>\r
+<!--<![endif]-->\r
+                       <span class="jsbuttonspacer">&nbsp;</span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="alignleftThis()">\r
+                               <img src="<%skinfile(/images/button-alignleft.gif)%>" title="<%text(_ADD_ALIGNLEFT_TT)%>" alt="<%text(_ADD_ALIGNLEFT_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="alignrightThis()">\r
+                               <img src="<%skinfile(/images/button-alignright.gif)%>" title="<%text(_ADD_ALIGNRIGHT_TT)%>" alt="<%text(_ADD_ALIGNRIGHT_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="aligncenterThis()">\r
+                               <img src="<%skinfile(/images/button-aligncenter.gif)%>" title="<%text(_ADD_ALIGNCENTER_TT)%>" alt="<%text(_ADD_ALIGNCENTER_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbuttonspacer">&nbsp;</span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="leftThis()">\r
+                               <img src="<%skinfile(/images/button-left.gif)%>" title="<%text(_ADD_LEFT_TT)%>" alt="<%text(_ADD_LEFT_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="rightThis()">\r
+                               <img src="<%skinfile(/images/button-right.gif)%>" title="<%text(_ADD_RIGHT_TT)%>" alt="<%text(_ADD_RIGHT_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbuttonspacer">&nbsp;</span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="addMedia()">\r
+                               <img src="<%skinfile(/images/button-media.gif)%>" title="<%text(_ADD_MEDIA_TT)%>" alt="<%text(_ADD_MEDIA_TT)%>" width="16" height="16" />\r
+                       </span>\r
+<!--[if IE]>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="showedit()">\r
+                               <img src="<%skinfile(/images/button-preview.gif)%>" title="<%text(_ADD_PREVIEW_TT)%>" alt="<%text(_ADD_PREVIEW_TT)%>" width="16" height="16" />\r
+                       </span>\r
+<![endif]-->\r
+               </div>\r
+                       <textarea id="inputmore" onkeyup="storeCaret(this); updPreview(more); doMonitor();" onclick="storeCaret(this);" onselect="storeCaret(this);"\r
                                tabindex="70"\r
                                cols="60"\r
                                rows="20"\r
@@ -1208,8 +1323,7 @@ selector();
        <td><%contents(author)%></td>\r
 </tr><tr>\r
        <td><%text(_ADD_TITLE)%></td>\r
-       <td><input \r
-                       <%jsinput(title)%>\r
+       <td><input id="inputtitle" onkeyup="storeCaret(this); updPreview(title); doMonitor();" onclick="storeCaret(this);" onselect="storeCaret(this);"\r
                        tabindex="10" \r
                        size="60" \r
                        maxlength="160" \r
@@ -1220,9 +1334,67 @@ selector();
                <%text(_ADD_BODY)%>\r
        </td>\r
        <td>\r
-               <%jsbuttonbar(media+preview)%>  \r
-               <textarea \r
-                       <%jsinput(body)%>\r
+               <div class="jsbuttonbar">\r
+<!--[if IE]>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="cutThis()">\r
+                               <img src="<%skinfile(/images/button-cut.gif)%>" title="<%text(_ADD_CUT_TT)%>(Ctrl + X)" alt="<%text(_ADD_CUT_TT)%>(Ctrl + X)" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="copyThis()">\r
+                               <img src="<%skinfile(/images/button-copy.gif)%>" title="<%text(_ADD_COPY_TT)%>(Ctrl + C)" alt="<%text(_ADD_COPY_TT)%>(Ctrl + C)" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="pasteThis()">\r
+                               <img src="<%skinfile(/images/button-paste.gif)%>" title="<%text(_ADD_PASTE_TT)%>(Ctrl + V)" alt="<%text(_ADD_PASTE_TT)%>(Ctrl + V)" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbuttonspacer">&nbsp;</span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="boldThis()">\r
+                               <img src="<%skinfile(/images/button-bold.gif)%>" title="<%text(_ADD_BOLD_TT)%>(Ctrl + Shift + B)" alt="<%text(_ADD_BOLD_TT)%>(Ctrl + Shift + B)" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="italicThis()">\r
+                               <img src="<%skinfile(/images/button-italic.gif)%>" title="<%text(_ADD_ITALIC_TT)%>(Ctrl + Shift + I)" alt="<%text(_ADD_ITALIC_TT)%>(Ctrl + Shift + I)" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="ahrefThis()">\r
+                               <img src="<%skinfile(/images/button-link.gif)%>" title="<%text(_ADD_HREF_TT)%>(Ctrl + Shift + A)" alt="<%text(_ADD_HREF_TT)%>(Ctrl + Shift + A)" width="16" height="16" />\r
+                       </span>\r
+<![endif]-->\r
+<!--[if ! IE]>-->\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="boldThis()">\r
+                               <img src="<%skinfile(/images/button-bold.gif)%>" title="<%text(_ADD_BOLD_TT)%>" alt="<%text(_ADD_BOLD_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="italicThis()">\r
+                               <img src="<%skinfile(/images/button-italic.gif)%>" title="<%text(_ADD_ITALIC_TT)%>" alt="<%text(_ADD_ITALIC_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="ahrefThis()">\r
+                               <img src="<%skinfile(/images/button-link.gif)%>" title="<%text(_ADD_HREF_TT)%>" alt="<%text(_ADD_HREF_TT)%>" width="16" height="16" />\r
+                       </span>\r
+<!--<![endif]-->\r
+                       <span class="jsbuttonspacer">&nbsp;</span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="alignleftThis()">\r
+                               <img src="<%skinfile(/images/button-alignleft.gif)%>" title="<%text(_ADD_ALIGNLEFT_TT)%>" alt="<%text(_ADD_ALIGNLEFT_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="alignrightThis()">\r
+                               <img src="<%skinfile(/images/button-alignright.gif)%>" title="<%text(_ADD_ALIGNRIGHT_TT)%>" alt="<%text(_ADD_ALIGNRIGHT_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="aligncenterThis()">\r
+                               <img src="<%skinfile(/images/button-aligncenter.gif)%>" title="<%text(_ADD_ALIGNCENTER_TT)%>" alt="<%text(_ADD_ALIGNCENTER_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbuttonspacer">&nbsp;</span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="leftThis()">\r
+                               <img src="<%skinfile(/images/button-left.gif)%>" title="<%text(_ADD_LEFT_TT)%>" alt="<%text(_ADD_LEFT_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="rightThis()">\r
+                               <img src="<%skinfile(/images/button-right.gif)%>" title="<%text(_ADD_RIGHT_TT)%>" alt="<%text(_ADD_RIGHT_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbuttonspacer">&nbsp;</span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="addMedia()">\r
+                               <img src="<%skinfile(/images/button-media.gif)%>" title="<%text(_ADD_MEDIA_TT)%>" alt="<%text(_ADD_MEDIA_TT)%>" width="16" height="16" />\r
+                       </span>\r
+<!--[if IE]>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="showedit()">\r
+                               <img src="<%skinfile(/images/button-preview.gif)%>" title="<%text(_ADD_PREVIEW_TT)%>" alt="<%text(_ADD_PREVIEW_TT)%>" width="16" height="16" />\r
+                       </span>\r
+<![endif]-->\r
+               </div>\r
+               <textarea id="inputbody" onkeyup="storeCaret(this); updPreview(body); doMonitor();" onclick="storeCaret(this);" onselect="storeCaret(this);"\r
                        tabindex="20"\r
                        cols="60"\r
                        rows="20"><%contents(body)%></textarea>\r
@@ -1317,9 +1489,67 @@ selector();
                <br /><%helplink(extended)%>\r
        </td>\r
        <td>\r
-               <%jsbuttonbar(media+preview)%>\r
-               <textarea \r
-                       <%jsinput(more)%>\r
+               <div class="jsbuttonbar">\r
+<!--[if IE]>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="cutThis()">\r
+                               <img src="<%skinfile(/images/button-cut.gif)%>" title="<%text(_ADD_CUT_TT)%>(Ctrl + X)" alt="<%text(_ADD_CUT_TT)%>(Ctrl + X)" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="copyThis()">\r
+                               <img src="<%skinfile(/images/button-copy.gif)%>" title="<%text(_ADD_COPY_TT)%>(Ctrl + C)" alt="<%text(_ADD_COPY_TT)%>(Ctrl + C)" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="pasteThis()">\r
+                               <img src="<%skinfile(/images/button-paste.gif)%>" title="<%text(_ADD_PASTE_TT)%>(Ctrl + V)" alt="<%text(_ADD_PASTE_TT)%>(Ctrl + V)" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbuttonspacer">&nbsp;</span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="boldThis()">\r
+                               <img src="<%skinfile(/images/button-bold.gif)%>" title="<%text(_ADD_BOLD_TT)%>(Ctrl + Shift + B)" alt="<%text(_ADD_BOLD_TT)%>(Ctrl + Shift + B)" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="italicThis()">\r
+                               <img src="<%skinfile(/images/button-italic.gif)%>" title="<%text(_ADD_ITALIC_TT)%>(Ctrl + Shift + I)" alt="<%text(_ADD_ITALIC_TT)%>(Ctrl + Shift + I)" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="ahrefThis()">\r
+                               <img src="<%skinfile(/images/button-link.gif)%>" title="<%text(_ADD_HREF_TT)%>(Ctrl + Shift + A)" alt="<%text(_ADD_HREF_TT)%>(Ctrl + Shift + A)" width="16" height="16" />\r
+                       </span>\r
+<![endif]-->\r
+<!--[if ! IE]>-->\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="boldThis()">\r
+                               <img src="<%skinfile(/images/button-bold.gif)%>" title="<%text(_ADD_BOLD_TT)%>" alt="<%text(_ADD_BOLD_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="italicThis()">\r
+                               <img src="<%skinfile(/images/button-italic.gif)%>" title="<%text(_ADD_ITALIC_TT)%>" alt="<%text(_ADD_ITALIC_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="ahrefThis()">\r
+                               <img src="<%skinfile(/images/button-link.gif)%>" title="<%text(_ADD_HREF_TT)%>" alt="<%text(_ADD_HREF_TT)%>" width="16" height="16" />\r
+                       </span>\r
+<!--<![endif]-->\r
+                       <span class="jsbuttonspacer">&nbsp;</span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="alignleftThis()">\r
+                               <img src="<%skinfile(/images/button-alignleft.gif)%>" title="<%text(_ADD_ALIGNLEFT_TT)%>" alt="<%text(_ADD_ALIGNLEFT_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="alignrightThis()">\r
+                               <img src="<%skinfile(/images/button-alignright.gif)%>" title="<%text(_ADD_ALIGNRIGHT_TT)%>" alt="<%text(_ADD_ALIGNRIGHT_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="aligncenterThis()">\r
+                               <img src="<%skinfile(/images/button-aligncenter.gif)%>" title="<%text(_ADD_ALIGNCENTER_TT)%>" alt="<%text(_ADD_ALIGNCENTER_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbuttonspacer">&nbsp;</span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="leftThis()">\r
+                               <img src="<%skinfile(/images/button-left.gif)%>" title="<%text(_ADD_LEFT_TT)%>" alt="<%text(_ADD_LEFT_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="rightThis()">\r
+                               <img src="<%skinfile(/images/button-right.gif)%>" title="<%text(_ADD_RIGHT_TT)%>" alt="<%text(_ADD_RIGHT_TT)%>" width="16" height="16" />\r
+                       </span>\r
+                       <span class="jsbuttonspacer">&nbsp;</span>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="addMedia()">\r
+                               <img src="<%skinfile(/images/button-media.gif)%>" title="<%text(_ADD_MEDIA_TT)%>" alt="<%text(_ADD_MEDIA_TT)%>" width="16" height="16" />\r
+                       </span>\r
+<!--[if IE]>\r
+                       <span class="jsbutton" onmouseover="BtnHighlight(this);" onmouseout="BtnNormal(this);" onclick="showedit()">\r
+                               <img src="<%skinfile(/images/button-preview.gif)%>" title="<%text(_ADD_PREVIEW_TT)%>" alt="<%text(_ADD_PREVIEW_TT)%>" width="16" height="16" />\r
+                       </span>\r
+<![endif]-->\r
+               </div>\r
+               <textarea id="inputmore" onkeyup="storeCaret(this); updPreview(more); doMonitor();" onclick="storeCaret(this);" onselect="storeCaret(this);"\r
                        tabindex="90" \r
                        cols="60" \r
                        rows="20"><%contents(more)%></textarea>\r