OSDN Git Service

if is IE use openWYSIWYG, is is NOT ie use WYMeditor.
[feedblog/feedgenerator.git] / erbtemp / newentry.html.erb
index 1a95101..30bc160 100644 (file)
@@ -3,13 +3,20 @@
         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
         <title><%= APPTITLE %></title>
         <link rel="stylesheet" href="./erbtemp/stylesheet.css" type="text/css">
-        <script type="text/javascript" src="./jquery/jquery.js">
-        </script>
-        <script type="text/javascript" src="./wymeditor/jquery.wymeditor.js">
-        </script>
-        <script type="text/javascript">
-            if (window.ActiveXObject) {
-            } else {
+        <% if params["action"].blank? || params["action"] == "back" %>
+        <!--[if IE]>
+            <script type="text/javascript" src="./openwysiwyg/scripts/wysiwyg.js">
+            </script>
+            <script type="text/javascript">
+            WYSIWYG.attach('contenteditor');
+            </script>
+        <![endif]--><% end %>
+        <![if !IE]>
+            <script type="text/javascript" src="./jquery/jquery.js">
+            </script>
+            <script type="text/javascript" src="./wymeditor/jquery.wymeditor.js">
+            </script>
+            <script type="text/javascript">
                 jQuery(function(){
                     jQuery('#contenteditor').wymeditor({
                         updateSelector: ".wymupdate",
@@ -17,8 +24,9 @@
                         iframeBasePath: "main_"
                     });
                 });
-            }
-            
+            </script>
+        <![endif]>
+        <script type="text/javascript">
             function switchsubmit(form, action){
                 document.getElementsByName("action").item(0).value = action;
                 form.submit();