[pLog-svn] r5994 - in plog/trunk: js/ui/pages templates/admin
mark at devel.lifetype.net
mark at devel.lifetype.net
Mon Oct 22 06:59:18 EDT 2007
Author: mark
Date: 2007-10-22 06:59:18 -0400 (Mon, 22 Oct 2007)
New Revision: 5994
Modified:
plog/trunk/js/ui/pages/posts.js
plog/trunk/templates/admin/editpost.template
plog/trunk/templates/admin/newpost.template
Log:
Fixed the newPost/editPost ajax error. We can not use the xxx.value to get the postText when we enable wysiwyg editor.
We should use TinyMCE's own method.
Modified: plog/trunk/js/ui/pages/posts.js
===================================================================
--- plog/trunk/js/ui/pages/posts.js 2007-10-22 09:31:39 UTC (rev 5993)
+++ plog/trunk/js/ui/pages/posts.js 2007-10-22 10:59:18 UTC (rev 5994)
@@ -65,6 +65,8 @@
document.postEdit.op.value = mode;
document.postEdit.target = "";
document.postEdit.action = "admin.php";
+ if( Lifetype.UI.Pages.Posts.WYSIWYGEditorEnabled )
+ form.postText.value = tinyMCE.getContent('postText');
Lifetype.Forms.AjaxFormProcessor(form.id,'?output=json');
Modified: plog/trunk/templates/admin/editpost.template
===================================================================
--- plog/trunk/templates/admin/editpost.template 2007-10-22 09:31:39 UTC (rev 5993)
+++ plog/trunk/templates/admin/editpost.template 2007-10-22 10:59:18 UTC (rev 5994)
@@ -21,6 +21,7 @@
<script type="text/javascript">
// this needs to be pre-initialized
Lifetype.UI.Pages.Posts.preview = false;
+ Lifetype.UI.Pages.Posts.WYSIWYGEditorEnabled = {if $htmlarea==0 || !$htmlarea}false{else}true{/if};
</script>
<form name="postEdit" id="postEdit" action="admin.php" method="post" onSubmit="this.target='admin';return Lifetype.UI.Pages.Posts.selectOperation(this,'updatePost');">
<fieldset class="inputField">
Modified: plog/trunk/templates/admin/newpost.template
===================================================================
--- plog/trunk/templates/admin/newpost.template 2007-10-22 09:31:39 UTC (rev 5993)
+++ plog/trunk/templates/admin/newpost.template 2007-10-22 10:59:18 UTC (rev 5994)
@@ -21,7 +21,8 @@
{/if}
<script type="text/javascript">
// this needs to be pre-initialized
- Lifetype.UI.Pages.Posts.preview = false;
+ Lifetype.UI.Pages.Posts.preview = false;
+ Lifetype.UI.Pages.Posts.WYSIWYGEditorEnabled = {if $htmlarea==0 || !$htmlarea}false{else}true{/if};
</script>
<form name="postEdit" id="postEdit" action="admin.php" method="post" onSubmit="this.target='admin';return Lifetype.UI.Pages.Posts.selectOperation(this, 'addPost');">
More information about the pLog-svn
mailing list