[pLog-svn] r5998 - in plog/trunk: js/ui/pages templates/admin
mark at devel.lifetype.net
mark at devel.lifetype.net
Mon Oct 22 14:41:20 EDT 2007
Author: mark
Date: 2007-10-22 14:41:19 -0400 (Mon, 22 Oct 2007)
New Revision: 5998
Modified:
plog/trunk/js/ui/pages/posts.js
plog/trunk/templates/admin/editpost.template
plog/trunk/templates/admin/jsconfig.template
plog/trunk/templates/admin/newpost.template
Log:
Use Lifetype.Config.getValue() to get htmlarea_enabled settings, instead of assign my own setting in template.
Modified: plog/trunk/js/ui/pages/posts.js
===================================================================
--- plog/trunk/js/ui/pages/posts.js 2007-10-22 17:36:58 UTC (rev 5997)
+++ plog/trunk/js/ui/pages/posts.js 2007-10-22 18:41:19 UTC (rev 5998)
@@ -66,10 +66,10 @@
document.postEdit.target = "";
document.postEdit.action = "admin.php";
- if( Lifetype.UI.Pages.Posts.WYSIWYGEditorEnabled ) {
+ if( Lifetype.Config.getValue( 'htmlarea_enabled' ) ) {
form.postText.value = tinyMCE.getContent('postText');
// We have to use our own reset function, or the TinyMCE's textarea can not be reset
- form.onReset = function () {
+ form.onreset = function () {
tinyMCE.getInstanceById('postText').setHTML('');
}
}
Modified: plog/trunk/templates/admin/editpost.template
===================================================================
--- plog/trunk/templates/admin/editpost.template 2007-10-22 17:36:58 UTC (rev 5997)
+++ plog/trunk/templates/admin/editpost.template 2007-10-22 18:41:19 UTC (rev 5998)
@@ -21,7 +21,6 @@
<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/jsconfig.template
===================================================================
--- plog/trunk/templates/admin/jsconfig.template 2007-10-22 17:36:58 UTC (rev 5997)
+++ plog/trunk/templates/admin/jsconfig.template 2007-10-22 18:41:19 UTC (rev 5998)
@@ -3,4 +3,5 @@
Lifetype.Config.setValue( 'script_name', "{$config->getValue("script_name")}" );
Lifetype.Config.setValue( 'admin_base_url', "{$url->getBaseUrl(false)}/admin.php" );
Lifetype.Config.setValue( 'blog_id', "{$blog->getId()}" );
+{assign var=htmlarea value=$blogsettings->getValue("htmlarea_enabled")}
Lifetype.Config.setValue( 'htmlarea_enabled', {if $htmlarea==0 || !$htmlarea}false{else}true{/if} );
\ No newline at end of file
Modified: plog/trunk/templates/admin/newpost.template
===================================================================
--- plog/trunk/templates/admin/newpost.template 2007-10-22 17:36:58 UTC (rev 5997)
+++ plog/trunk/templates/admin/newpost.template 2007-10-22 18:41:19 UTC (rev 5998)
@@ -22,7 +22,6 @@
<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, 'addPost');">
More information about the pLog-svn
mailing list