changeset 3961:60b2a8ca5903

disable safari and remove gui edit button
author Byeongweon [tasyblue@gmail.com]
date Mon, 30 Jun 2008 04:26:21 +0900
parents 4fb99140c7c6
children 71b272c93293
files MoinMoin/action/fckdialog.py MoinMoin/converter/text_html_text_moin_wiki.py wiki/htdocs/applets/moinFCKplugins/selection/fckplugin.js wiki/htdocs/common/js/common.js
diffstat 4 files changed, 20 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/fckdialog.py	Sat Jun 28 02:23:31 2008 +0900
+++ b/MoinMoin/action/fckdialog.py	Mon Jun 30 04:26:21 2008 +0900
@@ -239,7 +239,7 @@
         resultlist = iwpreferred[:-1]
     interwiki = "\n".join(
         ['<option value="%s">%s</option>' % (key, key) for key in resultlist])
-
+    
     # wiki url
     url_prefix_static = request.cfg.url_prefix_static
     scriptname = request.getScriptname()
@@ -247,6 +247,8 @@
         scriptname += "/"
     action = scriptname
     basepage = request.page.page_name.encode(config.charset)
+
+    print locals()
             
     request.write('''
 <!--
--- a/MoinMoin/converter/text_html_text_moin_wiki.py	Sat Jun 28 02:23:31 2008 +0900
+++ b/MoinMoin/converter/text_html_text_moin_wiki.py	Mon Jun 30 04:26:21 2008 +0900
@@ -1294,7 +1294,11 @@
 def parse(request, text):
     text = u'<?xml version="1.0"?>%s%s' % (dtd, text)
     text = text.encode(config.charset)
-    try:
+    try:
+        logname = os.path.join(request.cfg.data_dir, "expaterror.log")
+        f = file(logname, "w")
+        f.write(text)
+        f.close()
         return xml.dom.minidom.parseString(text)
     except xml.parsers.expat.ExpatError, msg:
         # this sometimes crashes when it should not, so save the stuff to analyze it:
--- a/wiki/htdocs/applets/moinFCKplugins/selection/fckplugin.js	Sat Jun 28 02:23:31 2008 +0900
+++ b/wiki/htdocs/applets/moinFCKplugins/selection/fckplugin.js	Mon Jun 30 04:26:21 2008 +0900
@@ -1,5 +1,5 @@
 // debug function.
-// TODO : can bind this kind of function
+// TODO : make common javascript class and extract this one
 function showObj(title, obj)
 { // show an object in a alert box
   var res = '';
@@ -64,7 +64,7 @@
     }
 }
 /* ##########################################################################
- * ###   IE 
+ * ###   IE  : it dosen't work. ie also use FCKSelection.
  * #########################################################################
  */
 else if (FCK.EditorDocument.selection)
@@ -203,7 +203,7 @@
       {
         var oTmpRange = FCK.EditorDocument.selection.createRange();
         var oNode = oRange.parentElement()
-	var following_text = false;
+        var following_text = false;
         if (!oNode.hasChildNodes()) return oNode; // selection in empty tag
         oNode = oNode.lastChild;
         var oLastText = oNode;
@@ -211,7 +211,7 @@
         {
           if (oNode.nodeName!="#text") 
             {
-	      following_text = false;
+              following_text = false;
               oTmpRange.moveToElementText(oNode);
               if (oRange.compareEndPoints('EndToStart', oTmpRange)>0)
                 {
@@ -302,6 +302,10 @@
   }
 }
 
+
+
+// this function make toolbar's button enable/disable using inserted pattern.
+// check coverage is contains its parent and children.
 FCKSelection.CheckForNodeNames = function(pattern)
 {
   var oStart = FCKSelection.GetStartNode();
--- a/wiki/htdocs/common/js/common.js	Sat Jun 28 02:23:31 2008 +0900
+++ b/wiki/htdocs/common/js/common.js	Mon Jun 30 04:26:21 2008 +0900
@@ -98,14 +98,16 @@
 	if ( window.opera && window.opera.version && parseFloat( window.opera.version() ) >= 9.5 )
 		return true ;
 
+	// diable safari until fix p tag finish problem
+
 	// Adobe AIR
 	// Checked before Safari because AIR have the WebKit rich text editor
 	// features from Safari 3.0.4, but the version reported is 420.
-	if ( sAgent.indexOf( ' adobeair/' ) != -1 )
+	if ( false && sAgent.indexOf( ' adobeair/' ) != -1 )
 		return ( sAgent.match( / adobeair\/(\d+)/ )[1] >= 1 ) ;	// Build must be at least v1
 
 	// Safari 3+
-	if ( sAgent.indexOf( ' applewebkit/' ) != -1 )
+	if ( false && sAgent.indexOf( ' applewebkit/' ) != -1 )
 		return ( sAgent.match( / applewebkit\/(\d+)/ )[1] >= 522 ) ;	// Build must be at least 522 (v3)
 
 	return false ;