update edit page
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 10 Feb 2010 14:39:59 +0000 (14:39 +0000)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 10 Feb 2010 14:39:59 +0000 (14:39 +0000)
admin/Contact/edit_autoresponse.phtml

index dc7d283..b58ea46 100755 (executable)
@@ -32,16 +32,38 @@ echo '<script type="text/javascript" src="'.URL_BASE.'admin/htmlarea/dialog.js">
 echo '<link type="text/css" rel=stylesheet href="'.URL_BASE.'admin/htmlarea/htmlarea.css">';
 ?>
 
-<script src=<?echo URL_BASE."admin/verify.js"?>></script>
-<form enctype="multipart/form-data" action="update_autoresponse.phtml" method="POST"
+<script type="text/javascript" src="<?php echo GLM_APP_BASE_URL;?>ckeditor/current/ckeditor.js"></script>
+<script type="text/javascript" src=<?echo URL_BASE."admin/verify.js"?>></script>
+<script type="text/javascript">
+<!--// closed source
+var Newsletter =
+{
+    init: function()
+    {
+        if ($('#response').length) {
+            //  Only try to replace the textarea if the
+            //  CKEditor is compatible w/ the browser.
+            if (CKEDITOR.env.isCompatible) {
+                CKEDITOR.replace('response',
+                    {
+                        toolbar : 'Default',
+                        width : 570,
+                        height : 400,
+                        filebrowserImageBrowseUrl : '../../Toolkit/CKImages/browser.php?folder=1',
+                        filebrowserImageUploadUrl : '../../Toolkit/CKImages/connector.php?command=Upload',
+                                               filebrowserImageWindowWidth : '760',
+                                               filebrowserImageWindowHeight : '500'
+                    });
+            }
+        }
+    }
+};
 
-onSubmit="
-this.response.optional = false;
-this.response.r = 'Description';
-this.subject.optional = false;
-this.subject.r = 'Subject';
-return(verify(this))
-">
+$(document).ready(Newsletter.init);
+
+//-->
+</script>
+<form enctype="multipart/form-data" action="update_autoresponse.phtml" method="POST">
 <?     
 echo '<table id="admin-edit-table">';
 for($i = 0; $i < db_numrows($res); $i++) {     
@@ -89,32 +111,6 @@ for($i = 0; $i < db_numrows($res); $i++) {
        }
 }
 
-echo "<script language=\"Javascript\">
-var config = new HTMLArea.Config();
-//config.imgURL = '".URL_BASE."admin/tt/htmlarea/images/';
-//config.popupURL = '".URL_BASE."admin/tt/htmlarea/popups/';
-config.width = '570px';
-config.height = '200px';
-config.width = '570px';
-config.height = '200px';
-config.statusBar = false;
-config.toolbar = [
-[ 'fontname', 'space',
-                 'fontsize', 'space',
-                 'formatblock', 'space',
-                 'bold', 'italic', 'underline', 'separator',
-                 'copy', 'cut', 'paste', 'space', 'undo', 'redo' ],
-
-               [ 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'separator',
-                 'orderedlist', 'unorderedlist', 'outdent', 'indent', 'separator',
-                 'forecolor', 'separator',
-                 'inserthorizontalrule', 'createlink', 'htmlmode'
-                   ]
-];
-HTMLArea.replace('response', config);
-</script>";
-
-
      if ($row["coupon"] != "")
       {
         echo "<TR>"