[pLog-svn] r7163 - plog/branches/lifetype-1.2/js/editor plog/branches/lifetype-1.2/templates/admin plugins/branches/lifetype-1.2/contact/templates plugins/branches/lifetype-1.2/submissions/templates
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Thu Dec 15 11:28:28 EST 2011
Author: jondaley
Date: 2011-12-15 11:28:28 -0500 (Thu, 15 Dec 2011)
New Revision: 7163
Modified:
plog/branches/lifetype-1.2/js/editor/lifetypeeditor.js
plog/branches/lifetype-1.2/templates/admin/editpost.template
plog/branches/lifetype-1.2/templates/admin/newpost.template
plugins/branches/lifetype-1.2/contact/templates/form.template
plugins/branches/lifetype-1.2/submissions/templates/submitform.template
Log:
javascript doesn't allow subchildren to be defined if the parent object is't defined. Presumably javascript used to allow that. See bug #1673. Also removed the text links for the visual editor, there are already icons that have that behavior, so they are redundant
Modified: plog/branches/lifetype-1.2/js/editor/lifetypeeditor.js
===================================================================
--- plog/branches/lifetype-1.2/js/editor/lifetypeeditor.js 2011-10-29 22:46:18 UTC (rev 7162)
+++ plog/branches/lifetype-1.2/js/editor/lifetypeeditor.js 2011-12-15 16:28:28 UTC (rev 7163)
@@ -22,10 +22,10 @@
* <h1>Lifetype Javascript Sample</h1>
* <form name="textEditor" id="textEditor">
* text1:<br/>
- * <script type="text/javascript">ed1 = new Lifetype.UI.Editor('text1', 'ed1');</script>
+ * <script type="text/javascript">ed1 = new LifetypeUIEditor('text1', 'ed1');</script>
* <textarea id="text1" name="text1" rows="8" cols="60"></textarea>
* <br/>text2:<br/>
- * <script type="text/javascript">ed2 = new Lifetype.UI.Editor('text2', 'ed2');</script>
+ * <script type="text/javascript">ed2 = new LifetypeUIEditor('text2', 'ed2');</script>
* <textarea id="text2" name="text1" rows="8" cols="60"></textarea>
* </form>
* </body>
@@ -42,7 +42,7 @@
* main class
*
*/
-Lifetype.UI.Editor = function(txtId, objName)
+LifetypeUIEditor = function(txtId, objName)
{
// class attributes
@@ -68,23 +68,23 @@
options['18'] = '18 pt';
options['24'] = '24 pt';
options['36'] = '36 pt';
- this.toolBar['list_font_size'] = new Lifetype.UI.Editor.List.FontSize( 'list_font_size', options );
- this.toolBar['1_but_b'] = new Lifetype.UI.Editor.Button( '1_but_b', 'bold', '<strong>', '</strong>', 'ed_format_bold.gif', 1 );
- this.toolBar['2_but_i'] = new Lifetype.UI.Editor.Button( '2_but_i', 'italics', '<em>', '</em>', 'ed_format_italic.gif', 1 );
- this.toolBar['3_but_u'] = new Lifetype.UI.Editor.Button( '3_but_u', 'underline', '<span style="text-decoration:underline">', '</span>', 'ed_format_underline.gif', 1 );
- this.toolBar['4_but_strikethrough'] = new Lifetype.UI.Editor.Button( '4_but_strikethrough', 'strikethrough', '<span style="text-decoration: line-through;">', '</span>', 'ed_format_strike.gif', 1 );
- this.toolBar['but_sep1'] = new Lifetype.UI.Editor.Button.Separator();
- this.toolBar['but_align_left'] = new Lifetype.UI.Editor.Button( 'but_align_left', 'align left', '<div style="text-align: left;">', '</div>', 'ed_align_left.gif' );
- this.toolBar['but_align_center'] = new Lifetype.UI.Editor.Button( 'but_align_center', 'align center', '<div style="text-align: center;">', '</div>', 'ed_align_center.gif' );
- this.toolBar['but_align_right'] = new Lifetype.UI.Editor.Button( 'but_align_right', 'align right', '<div style="text-align: right;">', '</div>', 'ed_align_right.gif' );
- this.toolBar['but_align_justify'] = new Lifetype.UI.Editor.Button( 'but_align_justify', 'align justify', '<div style="text-align: justify;">', '</div>', 'ed_align_justify.gif' );
- this.toolBar['but_sep2'] = new Lifetype.UI.Editor.Button.Separator();
- this.toolBar['but_ordered_list'] = new Lifetype.UI.Editor.Button( 'but_ordered_list', 'ordered list', '<ol><li></li></ol>', '', 'ed_list_num.gif', -1 );
- this.toolBar['but_unordered_list'] = new Lifetype.UI.Editor.Button( 'but_unordered_list', 'unordered list', '<ul><li></li></ul>', '', 'ed_list_bullet.gif', -1 );
- this.toolBar['5_but_a'] = new Lifetype.UI.Editor.Button.Link( '5_but_a', 'anchor', 'ed_link.gif' );
- this.toolBar['6_but_img']= new Lifetype.UI.Editor.Button.Image( '6_but_img', 'image', 'ed_image.gif' );
- this.toolBar['7_but_res']= new Lifetype.UI.Editor.Button.Resource ('7_but_res', 'resource', 'ed_resource.gif' );
- this.toolBar['8_but_more']= new Lifetype.UI.Editor.Button.More ('8_but_more', 'more', 'ed_more.gif' );
+ this.toolBar['list_font_size'] = new LifetypeUIEditor.List.FontSize( 'list_font_size', options );
+ this.toolBar['1_but_b'] = new LifetypeUIEditor.Button( '1_but_b', 'bold', '<strong>', '</strong>', 'ed_format_bold.gif', 1 );
+ this.toolBar['2_but_i'] = new LifetypeUIEditor.Button( '2_but_i', 'italics', '<em>', '</em>', 'ed_format_italic.gif', 1 );
+ this.toolBar['3_but_u'] = new LifetypeUIEditor.Button( '3_but_u', 'underline', '<span style="text-decoration:underline">', '</span>', 'ed_format_underline.gif', 1 );
+ this.toolBar['4_but_strikethrough'] = new LifetypeUIEditor.Button( '4_but_strikethrough', 'strikethrough', '<span style="text-decoration: line-through;">', '</span>', 'ed_format_strike.gif', 1 );
+ this.toolBar['but_sep1'] = new LifetypeUIEditor.Button.Separator();
+ this.toolBar['but_align_left'] = new LifetypeUIEditor.Button( 'but_align_left', 'align left', '<div style="text-align: left;">', '</div>', 'ed_align_left.gif' );
+ this.toolBar['but_align_center'] = new LifetypeUIEditor.Button( 'but_align_center', 'align center', '<div style="text-align: center;">', '</div>', 'ed_align_center.gif' );
+ this.toolBar['but_align_right'] = new LifetypeUIEditor.Button( 'but_align_right', 'align right', '<div style="text-align: right;">', '</div>', 'ed_align_right.gif' );
+ this.toolBar['but_align_justify'] = new LifetypeUIEditor.Button( 'but_align_justify', 'align justify', '<div style="text-align: justify;">', '</div>', 'ed_align_justify.gif' );
+ this.toolBar['but_sep2'] = new LifetypeUIEditor.Button.Separator();
+ this.toolBar['but_ordered_list'] = new LifetypeUIEditor.Button( 'but_ordered_list', 'ordered list', '<ol><li></li></ol>', '', 'ed_list_num.gif', -1 );
+ this.toolBar['but_unordered_list'] = new LifetypeUIEditor.Button( 'but_unordered_list', 'unordered list', '<ul><li></li></ul>', '', 'ed_list_bullet.gif', -1 );
+ this.toolBar['5_but_a'] = new LifetypeUIEditor.Button.Link( '5_but_a', 'anchor', 'ed_link.gif' );
+ this.toolBar['6_but_img']= new LifetypeUIEditor.Button.Image( '6_but_img', 'image', 'ed_image.gif' );
+ this.toolBar['7_but_res']= new LifetypeUIEditor.Button.Resource ('7_but_res', 'resource', 'ed_resource.gif' );
+ this.toolBar['8_but_more']= new LifetypeUIEditor.Button.More ('8_but_more', 'more', 'ed_more.gif' );
}
/**
@@ -311,7 +311,7 @@
* @param icon
* @param open
*/
-Lifetype.UI.Editor.Button = function(id, display, tagStart, tagEnd, icon, open)
+LifetypeUIEditor.Button = function(id, display, tagStart, tagEnd, icon, open)
{
this.id = id; // used to name the toolbar button
this.display = display; // label on button
@@ -453,11 +453,11 @@
* visual separators for the toolbar are also implemented as buttons, but they do
* do nothing and only show a vertical bar anyway with some margin on both sides...
*/
-Lifetype.UI.Editor.Button.Separator = function()
+LifetypeUIEditor.Button.Separator = function()
{
- this.prototype = new Lifetype.UI.Editor.Button('separator', '', '', '', '', -1 );
- this.prototype.constructor = Lifetype.UI.Editor.Button;
- this.superclass = Lifetype.UI.Editor.Button;
+ this.prototype = new LifetypeUIEditor.Button('separator', '', '', '', '', -1 );
+ this.prototype.constructor = LifetypeUIEditor.Button;
+ this.superclass = LifetypeUIEditor.Button;
this.superclass('separator', '', '', '', '', -1 );
@@ -479,14 +479,14 @@
* @param display
* @param icon
*/
-Lifetype.UI.Editor.Button.Link = function(id, display, icon)
+LifetypeUIEditor.Button.Link = function(id, display, icon)
{
//
// strange javascript thingies used for object inheritance...
//
- this.prototype = new Lifetype.UI.Editor.Button(id, display, '', '', icon, -1 );
- this.prototype.constructor = Lifetype.UI.Editor.Button;
- this.superclass = Lifetype.UI.Editor.Button;
+ this.prototype = new LifetypeUIEditor.Button(id, display, '', '', icon, -1 );
+ this.prototype.constructor = LifetypeUIEditor.Button;
+ this.superclass = LifetypeUIEditor.Button;
this.superclass(id, display, '', '', icon, -1 );
@@ -553,14 +553,14 @@
* @param display
* @param icon
*/
-Lifetype.UI.Editor.Button.BR = function(id, display, icon)
+LifetypeUIEditor.Button.BR = function(id, display, icon)
{
//
// strange javascript thingies used for object inheritance...
//
- this.prototype = new Lifetype.UI.Editor.Button(id, display, '', '', icon, -1 );
- this.prototype.constructor = Lifetype.UI.Editor.Button;
- this.superclass = Lifetype.UI.Editor.Button;
+ this.prototype = new LifetypeUIEditor.Button(id, display, '', '', icon, -1 );
+ this.prototype.constructor = LifetypeUIEditor.Button;
+ this.superclass = LifetypeUIEditor.Button;
this.superclass(id, display, '<br />', '', icon, -1 );
@@ -588,14 +588,14 @@
* @param display
* @param icon
*/
-Lifetype.UI.Editor.Button.More = function(id, display, icon)
+LifetypeUIEditor.Button.More = function(id, display, icon)
{
//
// strange javascript thingies used for object inheritance...
//
- this.prototype = new Lifetype.UI.Editor.Button(id, display, '', '', icon, -1 );
- this.prototype.constructor = Lifetype.UI.Editor.Button;
- this.superclass = Lifetype.UI.Editor.Button;
+ this.prototype = new LifetypeUIEditor.Button(id, display, '', '', icon, -1 );
+ this.prototype.constructor = LifetypeUIEditor.Button;
+ this.superclass = LifetypeUIEditor.Button;
this.superclass(id, display, '', '', icon, -1 );
@@ -645,14 +645,14 @@
* @param display
* @param icon
*/
-Lifetype.UI.Editor.Button.Image = function(id, display, icon)
+LifetypeUIEditor.Button.Image = function(id, display, icon)
{
//
// strange javascript thingies used for object inheritance...
//
- this.prototype = new Lifetype.UI.Editor.Button(id, display, '', '', icon, -1 );
- this.prototype.constructor = Lifetype.UI.Editor.Button;
- this.superclass = Lifetype.UI.Editor.Button;
+ this.prototype = new LifetypeUIEditor.Button(id, display, '', '', icon, -1 );
+ this.prototype.constructor = LifetypeUIEditor.Button;
+ this.superclass = LifetypeUIEditor.Button;
this.superclass(id, display, '', '', icon, -1 );
@@ -694,14 +694,14 @@
* @param display
* @param icon
*/
-Lifetype.UI.Editor.Button.Resource = function(id, display, icon)
+LifetypeUIEditor.Button.Resource = function(id, display, icon)
{
//
// strange javascript thingies used for object inheritance...
//
- this.prototype = new Lifetype.UI.Editor.Button(id, display, '', '', icon, -1 );
- this.prototype.constructor = Lifetype.UI.Editor.Button;
- this.superclass = Lifetype.UI.Editor.Button;
+ this.prototype = new LifetypeUIEditor.Button(id, display, '', '', icon, -1 );
+ this.prototype.constructor = LifetypeUIEditor.Button;
+ this.superclass = LifetypeUIEditor.Button;
this.superclass(id, display, '', '', icon, -1 );
@@ -721,14 +721,14 @@
/**
* implements drop-down lists
*/
-Lifetype.UI.Editor.List = function( id, options )
+LifetypeUIEditor.List = function( id, options )
{
//
// strange javascript thingies used for object inheritance...
//
- this.prototype = new Lifetype.UI.Editor.Button(id, '', '', '', '', -1 );
- this.prototype.constructor = Lifetype.UI.Editor.Button;
- this.superclass = Lifetype.UI.Editor.Button;
+ this.prototype = new LifetypeUIEditor.Button(id, '', '', '', '', -1 );
+ this.prototype.constructor = LifetypeUIEditor.Button;
+ this.superclass = LifetypeUIEditor.Button;
this.options = options;
@@ -780,14 +780,14 @@
/**
* button that shows a list with different font sizes
*/
-Lifetype.UI.Editor.List.FontSize = function( id, options )
+LifetypeUIEditor.List.FontSize = function( id, options )
{
//
// strange javascript thingies used for object inheritance...
//
- this.prototype = new Lifetype.UI.Editor.List(id, options );
- this.prototype.constructor = Lifetype.UI.Editor.List;
- this.superclass = Lifetype.UI.Editor.List;
+ this.prototype = new LifetypeUIEditor.List(id, options );
+ this.prototype.constructor = LifetypeUIEditor.List;
+ this.superclass = LifetypeUIEditor.List;
this.superclass(id, options );
@@ -819,4 +819,4 @@
surroundInfo['end'] = '</span>';
return( surroundInfo );
}
-}
\ No newline at end of file
+}
Modified: plog/branches/lifetype-1.2/templates/admin/editpost.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/editpost.template 2011-10-29 22:46:18 UTC (rev 7162)
+++ plog/branches/lifetype-1.2/templates/admin/editpost.template 2011-12-15 16:28:28 UTC (rev 7163)
@@ -53,7 +53,7 @@
<label for="postText">{$locale->tr("text")}</label>
<span class="required">*</span>
<div class="formHelp">{$locale->tr("text_help")}</div>
- {if !$htmlarea}<script type="text/javascript">var ed1 = new Lifetype.UI.Editor('postText','ed1');</script>{/if}
+ {if !$htmlarea}<script type="text/javascript">var ed1 = new LifetypeUIEditor('postText','ed1');</script>{/if}
<textarea {if $htmlarea==1}rows="20"{else}rows="15"{/if} id="postText" name="postText" style="width:100%">{$postText}</textarea>
<a href="{if $htmlarea}javascript:tinyMCE.execInstanceCommand('mce_editor_0','mceinsertresource',true);{else}javascript:ed1.execute('postText','7_but_res',''){/if}">{$locale->tr("insert_media")}</a> |
<a href="{if $htmlarea}javascript:tinyMCE.execInstanceCommand('mce_editor_0','mcemoremore');{else}javascript:ed1.execute('postText','8_but_more',''){/if}">{$locale->tr("insert_more")}</a>
Modified: plog/branches/lifetype-1.2/templates/admin/newpost.template
===================================================================
--- plog/branches/lifetype-1.2/templates/admin/newpost.template 2011-10-29 22:46:18 UTC (rev 7162)
+++ plog/branches/lifetype-1.2/templates/admin/newpost.template 2011-12-15 16:28:28 UTC (rev 7163)
@@ -66,10 +66,12 @@
<label for="postText">{$locale->tr("text")}</label>
<span class="required">*</span>
<div class="formHelp">{$locale->tr("text_help")}</div>
- {if !$htmlarea}<script type="text/javascript">var ed1 = new Lifetype.UI.Editor('postText','ed1');</script>{/if}
+ {if !$htmlarea}<script type="text/javascript">var ed1 = new LifetypeUIEditor('postText','ed1');</script>{/if}
<textarea {if $htmlarea==1}rows="20"{else}rows="15"{/if} id="postText" name="postText" style="width:100%">{$postText}</textarea>
- <a href="{if $htmlarea}javascript:tinyMCE.execInstanceCommand('mce_editor_0','mceinsertresource',true);{else}javascript:ed1.execute('postText','7_but_res',''){/if}">{$locale->tr("insert_media")}</a> |
- <a href="{if $htmlarea}javascript:tinyMCE.execInstanceCommand('mce_editor_0','mcemoremore');{else}javascript:ed1.execute('postText','8_but_more',''){/if}">{$locale->tr("insert_more")}</a>
+ {if !$htmlarea}
+ <a href="javascript:ed1.execute('postText','7_but_res','')">{$locale->tr("insert_media")}</a> |
+ <a href="javascript:ed1.execute('postText','8_but_more','')">{$locale->tr("insert_more")}</a>
+ {/if}
{include file="$admintemplatepath/validate.template" field=postText message=$locale->tr("error_missing_post_text")}
</div>
Modified: plugins/branches/lifetype-1.2/contact/templates/form.template
===================================================================
--- plugins/branches/lifetype-1.2/contact/templates/form.template 2011-10-29 22:46:18 UTC (rev 7162)
+++ plugins/branches/lifetype-1.2/contact/templates/form.template 2011-12-15 16:28:28 UTC (rev 7163)
@@ -10,7 +10,7 @@
<input type="text" name="commentTopic" /><br/>
<label for="commentText">{$locale->tr("comment_text")}: </label>
- <script type="text/javascript">var ed1 = new Lifetype.UI.Editor("commentText","ed1");</script>
+ <script type="text/javascript">var ed1 = new LifetypeUIEditor("commentText","ed1");</script>
<textarea rows="15" id="commentText" name="commentText" style="width:100%"></textarea><br/>
<input type="hidden" name="op" value="pluginContactSendEmail" />
Modified: plugins/branches/lifetype-1.2/submissions/templates/submitform.template
===================================================================
--- plugins/branches/lifetype-1.2/submissions/templates/submitform.template 2011-10-29 22:46:18 UTC (rev 7162)
+++ plugins/branches/lifetype-1.2/submissions/templates/submitform.template 2011-12-15 16:28:28 UTC (rev 7163)
@@ -36,7 +36,7 @@
<div>
<div style="width:68%;float:left;padding-right:2%">
{$locale->tr("story_contents")}<br/>
- {if !$submissions->isHtmlareaEnabled()}<script type="text/javascript">var ed1 = new Lifetype.UI.Editor('submissionText','ed1');</script>{/if}
+ {if !$submissions->isHtmlareaEnabled()}<script type="text/javascript">var ed1 = new LifetypeUIEditor('submissionText','ed1');</script>{/if}
<textarea rows="15" id="submissionText" name="submissionText" style="width:100%">{$submissionText}</textarea><br/>
{if $errors.submissionText}<span style="background:red;color:white;font-weight:bold"> ! </span> {$message.submissionText}</p><br/>{/if}
<br/>
More information about the pLog-svn
mailing list