changeset 3951:c1bddba80ebd

solve javascript alert error
author Byeongweon [tasyblue@gmail.com]
date Mon, 09 Jun 2008 02:10:32 +0900
parents f34a0146cac6
children 8e04faa4aaa5
files MoinMoin/PageGraphicalEditor.py wiki/htdocs/applets/moinFCKplugins/moinbehaviour/fckplugin.js wiki/htdocs/applets/moinFCKplugins/moinformat/fckplugin.js wiki/htdocs/applets/moinFCKplugins/selection/fckplugin.js wiki/htdocs/applets/moinfckconfig.js wiki/htdocs/common/js/common.js
diffstat 6 files changed, 19 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/PageGraphicalEditor.py	Thu Jun 05 22:38:41 2008 +0900
+++ b/MoinMoin/PageGraphicalEditor.py	Mon Jun 09 02:10:32 2008 +0900
@@ -326,7 +326,7 @@
 <script type="text/javascript" src="%(fckbasepath)s/fckeditor.js"></script>
 <script type="text/javascript">
 <!--
-    var oFCKeditor = new FCKeditor( 'savetext', '100%%', %(editor_size)s) ;
+    var oFCKeditor = new FCKeditor( 'savetext', '100%%', %(editor_size)s, 'MoinDefault' ) ;
     oFCKeditor.BasePath= '%(fckbasepath)s/' ;
     oFCKeditor.Config['WikiBasePath'] = '%(wikiurl)s' ;
     oFCKeditor.Config['WikiPage'] = '%(wikipage)s' ;
--- a/wiki/htdocs/applets/moinFCKplugins/moinbehaviour/fckplugin.js	Thu Jun 05 22:38:41 2008 +0900
+++ b/wiki/htdocs/applets/moinFCKplugins/moinbehaviour/fckplugin.js	Mon Jun 09 02:10:32 2008 +0900
@@ -59,6 +59,8 @@
  * ##########################################################################
  */
 
+/*
+// TODO FCK.EditorDocument is seems like deprecated, find alternative method for replace
 if (FCK.EditorDocument.attachEvent) // IE
 {
   FCK.EditorDocument.attachEvent('onkeydown', Doc_OnKeyDown_IE);
@@ -66,3 +68,4 @@
 
 }
 
+*/
\ No newline at end of file
--- a/wiki/htdocs/applets/moinFCKplugins/moinformat/fckplugin.js	Thu Jun 05 22:38:41 2008 +0900
+++ b/wiki/htdocs/applets/moinFCKplugins/moinformat/fckplugin.js	Mon Jun 09 02:10:32 2008 +0900
@@ -19,11 +19,12 @@
 
 var MoinToolbarFontFormatCombo = function()
 {
- this.Command =  FCKCommands.GetCommand('FontFormat');
+ this.CommandName = 'FontFormat';
+ this.Command =  FCKCommands.GetCommand(this.CommandName);
 }
 
 // Inherit from MoinToolbarSpecialCombo.
-MoinToolbarFontFormatCombo.prototype = new FCKToolbarSpecialCombo;
+MoinToolbarFontFormatCombo.prototype = new FCKToolbarSpecialCombo();
 
 MoinToolbarFontFormatCombo.prototype.GetLabel = function()
 {
--- a/wiki/htdocs/applets/moinFCKplugins/selection/fckplugin.js	Thu Jun 05 22:38:41 2008 +0900
+++ b/wiki/htdocs/applets/moinFCKplugins/selection/fckplugin.js	Mon Jun 09 02:10:32 2008 +0900
@@ -11,14 +11,13 @@
 }
 
 // --------------------------------
-
-if (FCK.EditorWindow.getSelection) // Gecko
+if (FCKSelection.GetSelection) // Gecko
 { 
   // assume exactly one selection
   
   FCKSelection.GetStartNode = function()
     {
-      var oSelection = FCK.EditorWindow.getSelection();
+      var oSelection = FCKSelection.GetSelection();
       var oContainer = oSelection.getRangeAt(0).startContainer;
       var iOffset = oSelection.getRangeAt(0).startOffset;
       if (oContainer.childNodes.length>iOffset) 
@@ -30,12 +29,12 @@
   // only valid if GetStartNode() returns text node
   FCKSelection.GetStartOffset = function()
     {
-      var oSelection = FCK.EditorWindow.getSelection();
+      var oSelection = FCKSelection.GetSelection();
       return oSelection.getRangeAt(0).startOffset;    
     }
   FCKSelection.GetEndNode = function()
     {
-      var oSelection = FCK.EditorWindow.getSelection();
+      var oSelection = FCKSelection.GetSelection();
       var oContainer = oSelection.getRangeAt(0).endContainer;
       var iOffset = oSelection.getRangeAt(0).startEndset;
       if (oContainer.childNodes.length>iOffset) 
@@ -47,17 +46,17 @@
   // only valid if GetEndNode() returns text node
   FCKSelection.GetEndOffset = function()
     {
-      var oSelection = FCK.EditorWindow.getSelection();
+      var oSelection = FCKSelection.GetSelection();
       return oSelection.getRangeAt(0).endOffset;    
     }
   FCKSelection.IsCollapsed = function()
     {
-      var oSelection = FCK.EditorWindow.getSelection();
+      var oSelection = FCKSelection.GetSelection();
       return oSelection.getRangeAt(0).collapsed;    
     }
   FCKSelection.GetText = function()
     {
-      return FCK.EditorWindow.getSelection().toString();
+      return FCKSelection.GetSelection().toString();
     }
 }
 /* ##########################################################################
--- a/wiki/htdocs/applets/moinfckconfig.js	Thu Jun 05 22:38:41 2008 +0900
+++ b/wiki/htdocs/applets/moinfckconfig.js	Mon Jun 09 02:10:32 2008 +0900
@@ -2,7 +2,7 @@
  * FCKeditor - Configuration for usage within MoinMoin wiki engine
  */
 
-FCKConfig.Debug = true ;
+FCKConfig.Debug = false ;
 
 FCKConfig.StylesXmlPath	= '../../moinfckstyles.xml' ;
 
--- a/wiki/htdocs/common/js/common.js	Thu Jun 05 22:38:41 2008 +0900
+++ b/wiki/htdocs/common/js/common.js	Mon Jun 09 02:10:32 2008 +0900
@@ -301,8 +301,10 @@
         for (var eidx = 0; eidx < form.elements.length; eidx++) {
             elem = form.elements[eidx];
             name = elem.name;
-            if (name.substr(0,4) == 'dbw.' && name.substr(-7) == '.submit')
-                elem.style.display = 'none';
+			if (name) {
+				if (name.substr(0,4) == 'dbw.' && name.substr(-7) == '.submit')
+					elem.style.display = 'none';
+			}
         }
     }
 }