[pLog-svn] r5779 - in plog/trunk: class/action/admin class/dao imgs/admin js/ui js/ui/pages locale/admin templates/admin templates/admin/chooser
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Fri Aug 3 16:15:43 EDT 2007
Author: oscar
Date: 2007-08-03 16:15:43 -0400 (Fri, 03 Aug 2007)
New Revision: 5779
Added:
plog/trunk/imgs/admin/icon_arrow_down-16.png
plog/trunk/imgs/admin/icon_arrow_up-16.png
plog/trunk/js/ui/effects.js
plog/trunk/templates/admin/blogusers_table.template
Removed:
plog/trunk/js/ui/tableeffects.js
Modified:
plog/trunk/class/action/admin/adminaddbloguseraction.class.php
plog/trunk/class/dao/usercomment.class.php
plog/trunk/js/ui/pages/articlecategories.js
plog/trunk/js/ui/pages/comments.js
plog/trunk/js/ui/pages/customfields.js
plog/trunk/js/ui/pages/linkcategories.js
plog/trunk/js/ui/pages/links.js
plog/trunk/locale/admin/locale_en_UK.php
plog/trunk/templates/admin/addbloguser.template
plog/trunk/templates/admin/blogtemplates.template
plog/trunk/templates/admin/blogusers.template
plog/trunk/templates/admin/chooser/header.template
plog/trunk/templates/admin/chooser/resourcelist.template
plog/trunk/templates/admin/chooser/siteuserschooser.template
plog/trunk/templates/admin/chooser/userpictureselect.template
plog/trunk/templates/admin/createuser.template
plog/trunk/templates/admin/dashboard.template
plog/trunk/templates/admin/editbloguser.template
plog/trunk/templates/admin/editcomments_table.template
plog/trunk/templates/admin/editinboxprivatemessages.template
plog/trunk/templates/admin/editoutboxprivatemessages.template
plog/trunk/templates/admin/editposts.template
plog/trunk/templates/admin/header.template
plog/trunk/templates/admin/newlinkcategory.template
plog/trunk/templates/admin/plugincenter.template
plog/trunk/templates/admin/poststats.template
plog/trunk/templates/admin/simpleheader.template
plog/trunk/templates/admin/sitelocales.template
plog/trunk/templates/admin/sitetemplates.template
plog/trunk/templates/admin/siteusers.template
plog/trunk/templates/admin/statistics.template
Log:
Several changes:
-ajaxified the "add new blog user" screen.
-moved Lifetype.UI.TableEffects to Lifetype.Effects.Table, deleted tableeffects.js and changed all files that depended on it
-added the new Lifetype.Effects namespace (js/ui/effects.js) and included the new 'fold' and 'unfold' effects.
-implemented folding and unfolding of long comments in the "edit comments" page, so that long comments don't clutter the view too much.
Modified: plog/trunk/class/action/admin/adminaddbloguseraction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaddbloguseraction.class.php 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/class/action/admin/adminaddbloguseraction.class.php 2007-08-03 20:15:43 UTC (rev 5779)
@@ -19,7 +19,6 @@
{
var $_sendNotification;
- var $_notificationText;
var $_newUsername;
var $_permissions;
@@ -28,17 +27,8 @@
$this->AdminAction( $actionInfo, $request );
// data validation
- $this->registerFieldValidator( "newBlogUserName", new StringValidator());
-
- $this->_sendNotification = ($this->_request->getValue( "sendNotification" ) != "" );
-
- if( $this->_sendNotification ) {
- $this->registerFieldValidator( "newBlogUserText", new StringValidator());
- }
- else {
- $this->registerField( "newBlogUserText" );
- }
-
+ $this->registerFieldValidator( "newBlogUserName", new StringValidator(), false, $this->_locale->tr("error_invalid_user"));
+ $this->_sendNotification = ($this->_request->getValue( "sendNotification" ) != "" );
$this->registerField( "sendNotification" );
$this->registerField( "perm" );
$view = new AdminNewBlogUserView( $this->_blogInfo );
@@ -55,7 +45,7 @@
if( $userInfo->getEmail() != "" ) {
// build an email message
$message = new EmailMessage();
- $message->setBody( $this->_notificationText );
+ $message->setBody( $this->_locale->pr( "user_added_to_blog_text"), $this->_userInfo->getUsername(), $userInfo->getUsername(), $this->_blogInfo->getBlog(), $this->_blogInfo->getBlogRequestGenerator()->blogLink());
$message->setSubject( $this->_locale->tr("notification_subject") );
$message->addTo( $userInfo->getEmail());
$message->setFrom( $this->_userInfo->getEmail());
@@ -69,7 +59,6 @@
function addBlogUser()
{
- $this->_notificationText = $this->_request->getValue( "newBlogUserText" );
$this->_newUsername = $this->_request->getFilteredValue( "newBlogUserName", new HtmlFilter());
$this->_perms = $this->_request->getValue( "perm" );
@@ -105,7 +94,7 @@
$this->_message = $this->_locale->pr("user_added_to_blog_ok", $userInfo->getUsername());
- return( true );
+ return( $userInfo );
}
function perform()
@@ -135,8 +124,11 @@
{
lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
$this->_view = new AdminAjaxView( $this->_blogInfo );
- if( $this->addBlogUser())
+ $user = $this->addBlogUser();
+ if( $user ) {
$this->_view->setSuccessMessage( $this->_message );
+ $this->_view->setResult( $user );
+ }
else
$this->_view->setErrorMessage( $this->_message );
Modified: plog/trunk/class/dao/usercomment.class.php
===================================================================
--- plog/trunk/class/dao/usercomment.class.php 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/class/dao/usercomment.class.php 2007-08-03 20:15:43 UTC (rev 5779)
@@ -632,5 +632,24 @@
$this->_userInfo = null;
return( parent::__sleep());
}
+
+ /**
+ * Returns the length of the comment in characters
+ *
+ * @param includeTags whether to include HTML tags or not in the count, true by default
+ * @return The number of characters in the comment
+ */
+ function getCharacterLength( $includeTags = true )
+ {
+ if( $includeTags ) {
+ $commentText = $this->getText();
+ }
+ else {
+ lt_include( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
+ $commentText = Textfilter::filterAllHTML( $this->getText());
+ }
+
+ return( utf8_strlen( $commentText ));
+ }
}
-?>
+?>
\ No newline at end of file
Added: plog/trunk/imgs/admin/icon_arrow_down-16.png
===================================================================
(Binary files differ)
Property changes on: plog/trunk/imgs/admin/icon_arrow_down-16.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: plog/trunk/imgs/admin/icon_arrow_up-16.png
===================================================================
(Binary files differ)
Property changes on: plog/trunk/imgs/admin/icon_arrow_up-16.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: plog/trunk/js/ui/effects.js
===================================================================
--- plog/trunk/js/ui/effects.js (rev 0)
+++ plog/trunk/js/ui/effects.js 2007-08-03 20:15:43 UTC (rev 5779)
@@ -0,0 +1,145 @@
+/**
+ * Several interesting effects that can be applied to
+ * DIV and other blocks
+ */
+Lifetype.Effects = function() {}
+
+/**
+ * Events thrown by these classes
+ */
+Lifetype.Effects.Events = function() {}
+
+/**
+ * Events thrown by the fold and unfold methods
+ */
+Lifetype.Effects.Events.foldStart = new YAHOO.util.CustomEvent('foldStart');
+Lifetype.Effects.Events.foldEnd = new YAHOO.util.CustomEvent('foldEnd');
+Lifetype.Effects.Events.unfoldStart = new YAHOO.util.CustomEvent('unfoldStart');
+Lifetype.Effects.Events.unfoldEnd = new YAHOO.util.CustomEvent('unfoldEnd');
+
+/**
+ * Unfolds a block to its full size, given its string id
+ *
+ * @param id The id of the element to unfold
+ */
+Lifetype.Effects.unfold = function( id )
+{
+ var el = Lifetype.Dom.$(id);
+ var properties = { height: {fom: 0, to:el.scrollHeight, by:1 }};
+ var a = new YAHOO.util.Anim( id, properties, 0.3 );
+ a.onStart.subscribe( function(e) { Lifetype.Effects.Events.unfoldStart.fire(e); });
+ a.onComplete.subscribe( function(e) { Lifetype.Effects.Events.unfoldEnd.fire(e); });
+ a.animate();
+ return(false);
+}
+
+/**
+ * Folds a block to a size of 0 pixels, given its string id
+ *
+ * @param id The id of the element to fold
+ */
+Lifetype.Effects.fold = function( id )
+{
+ var el = Lifetype.Dom.$(id)
+ var properties = { height: {fom: el.offsetHeight, to:0, by:1 }};
+ var a = new YAHOO.util.Anim( id, properties, 0.3 );
+ a.onStart.subscribe( function(e) { Lifetype.Effects.Events.foldStart.fire(e); });
+ a.onComplete.subscribe( function(e) { Lifetype.Effects.Events.foldEnd.fire(e); });
+ a.animate();
+ return(false);
+}
+
+/**
+ * Given an element id, perform a fold-unfold sequence
+ *
+ * @param id The id of the element to fold and unfold
+ */
+Lifetype.Effects.toggleFolding = function( id )
+{
+ var el = Lifetype.Dom.$(id)
+ if( el.offsetHeight == 0 ) {
+ // unfold
+ this.unfold( id );
+ }
+ else {
+ // fold
+ this.fold( id );
+ }
+
+ return( false );
+}
+
+/**
+ * TableEffects class
+ *
+ * @param id The id of the table to which we'd like to apply the effects. If no id is provided (i.e. the constructor
+ * is called without parameters), then all tables in the page will be processed
+ */
+Lifetype.Effects.Table = function( id )
+{
+ this.id = id;
+ this.table = document.getElementById( id );
+}
+
+/**
+ * Given a table id, use stripes for its rows
+ *
+ * @param cssClass CSS class to be applied to odd rows. If none is provided, a class called
+ * "odd" will be used.
+ */
+Lifetype.Effects.Table.prototype.stripe = function( cssClass )
+{
+ if( this.table )
+ var tbodies = this.table.getElementsByTagName("tbody");
+ else
+ var tbodies = document.getElementsByTagName("tbody");
+
+ if( !cssClass )
+ cssClass = "odd";
+
+ for (var i=0; i<tbodies.length; i++) {
+ var odd = true;
+ var rows = tbodies[i].getElementsByTagName("tr");
+ for (var j=0; j<rows.length; j++) {
+ if (odd == false) {
+ odd = true;
+ }
+ else {
+ YAHOO.util.Dom.addClass( rows[j], cssClass );
+ odd = false;
+ }
+ }
+ }
+}
+
+/**
+ * Highlights the row where the mouse is
+ *
+ * @param cssClass The name of the CSS cssClass to be applied to highlighted rows. If none is provided,
+ * a class called "highlightClass" will be used
+ */
+Lifetype.Effects.Table.prototype.highlightRows = function( cssClass )
+{
+ if(!document.getElementsByTagName)
+ return false;
+
+ if( !cssClass )
+ cssClass = "highlightClass";
+
+ if( this.table )
+ var tbodies = this.table.getElementsByTagName("tbody");
+ else
+ var tbodies = document.getElementsByTagName("tbody");
+
+ for (var j=0; j<tbodies.length; j++) {
+ var rows = tbodies[j].getElementsByTagName("tr");
+ for (var i=0; i<rows.length; i++) {
+ rows[i].onmouseover = function() {
+ YAHOO.util.Dom.addClass( this, cssClass );
+ }
+ rows[i].onmouseout = function() {
+ YAHOO.util.Dom.removeClass( this, cssClass );
+ }
+ }
+ }
+}
\ No newline at end of file
Modified: plog/trunk/js/ui/pages/articlecategories.js
===================================================================
--- plog/trunk/js/ui/pages/articlecategories.js 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/js/ui/pages/articlecategories.js 2007-08-03 20:15:43 UTC (rev 5779)
@@ -11,7 +11,7 @@
}
YAHOO.util.Event.addListener( window, "load", function() {
- var t = new Lifetype.UI.TableEffects( "list" );
+ var t = new Lifetype.Effects.Table( "list" );
t.stripe();
t.highlightRows();
Modified: plog/trunk/js/ui/pages/comments.js
===================================================================
--- plog/trunk/js/ui/pages/comments.js 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/js/ui/pages/comments.js 2007-08-03 20:15:43 UTC (rev 5779)
@@ -23,8 +23,42 @@
Lifetype.Forms.AjaxFormProcessor( form.id,'?output=json' );
}
+/**
+ * Click handler for the extended version of the comment
+ */
+Lifetype.UI.Pages.Comments.toggleComment = function( anchor, commentId )
+{
+ shortCommentId = 'short_comment_text_' + commentId;
+ longCommentId = 'comment_text_' + commentId;
+
+ var endFoldEvent = function() {
+ // show the short comment
+ var el = Lifetype.Dom.$(shortCommentId);
+ el.style.display = 'block';
+ // and display the arrow down
+ arrowIcon = Lifetype.Dom.getElementsByTagName( 'img', anchor );
+ arrowIcon[0].src = 'imgs/admin/icon_arrow_down-16.png';
+ }
+
+ var startUnfoldEvent = function() {
+ var el = Lifetype.Dom.$(shortCommentId);
+ el.style.display = 'none';
+ // and display the arrow up
+ arrowIcon = Lifetype.Dom.getElementsByTagName( 'img', anchor );
+ arrowIcon[0].src = 'imgs/admin/icon_arrow_up-16.png';
+ }
+
+ // we need to hide and show the shorter text when folding and
+ // unfolding the extended version
+ Lifetype.Effects.Events.foldEnd.subscribe( endFoldEvent );
+ Lifetype.Effects.Events.unfoldStart.subscribe( startUnfoldEvent );
+
+ // main function that will take care of the unfolding
+ return( Lifetype.Effects.toggleFolding( longCommentId ));
+}
+
YAHOO.util.Event.addListener( window, "load", function() {
- var t = new Lifetype.UI.TableEffects( "comments" );
+ var t = new Lifetype.Effects.Table( "comments" );
t.stripe();
t.highlightRows();
Modified: plog/trunk/js/ui/pages/customfields.js
===================================================================
--- plog/trunk/js/ui/pages/customfields.js 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/js/ui/pages/customfields.js 2007-08-03 20:15:43 UTC (rev 5779)
@@ -33,7 +33,7 @@
}
YAHOO.util.Event.addListener( window, "load", function() {
- var t = new Lifetype.UI.TableEffects( "customFields" );
+ var t = new Lifetype.Effects.Table( "customFields" );
t.stripe();
t.highlightRows();
Modified: plog/trunk/js/ui/pages/linkcategories.js
===================================================================
--- plog/trunk/js/ui/pages/linkcategories.js 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/js/ui/pages/linkcategories.js 2007-08-03 20:15:43 UTC (rev 5779)
@@ -11,7 +11,7 @@
}
YAHOO.util.Event.addListener( window, "load", function() {
- var t = new Lifetype.UI.TableEffects( "list" );
+ var t = new Lifetype.Effects.Table( "list" );
t.stripe();
t.highlightRows();
Modified: plog/trunk/js/ui/pages/links.js
===================================================================
--- plog/trunk/js/ui/pages/links.js 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/js/ui/pages/links.js 2007-08-03 20:15:43 UTC (rev 5779)
@@ -22,7 +22,7 @@
}
YAHOO.util.Event.addListener( window, "load", function() {
- var t = new Lifetype.UI.TableEffects( "links" );
+ var t = new Lifetype.Effects.Table( "links" );
t.stripe();
t.highlightRows();
Deleted: plog/trunk/js/ui/tableeffects.js
===================================================================
--- plog/trunk/js/ui/tableeffects.js 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/js/ui/tableeffects.js 2007-08-03 20:15:43 UTC (rev 5779)
@@ -1,74 +0,0 @@
-/**
- * TableEffects class
- *
- * @param id The id of the table to which we'd like to apply the effects. If no id is provided (i.e. the constructor
- * is called without parameters), then all tables in the page will be processed
- */
-Lifetype.UI.TableEffects = function( id )
-{
- this.id = id;
- this.table = document.getElementById( id );
-}
-
-/**
- * Given a table id, use stripes for its rows
- *
- * @param cssClass CSS class to be applied to odd rows. If none is provided, a class called
- * "odd" will be used.
- */
-Lifetype.UI.TableEffects.prototype.stripe = function( cssClass )
-{
- if( this.table )
- var tbodies = this.table.getElementsByTagName("tbody");
- else
- var tbodies = document.getElementsByTagName("tbody");
-
- if( !cssClass )
- cssClass = "odd";
-
- for (var i=0; i<tbodies.length; i++) {
- var odd = true;
- var rows = tbodies[i].getElementsByTagName("tr");
- for (var j=0; j<rows.length; j++) {
- if (odd == false) {
- odd = true;
- }
- else {
- YAHOO.util.Dom.addClass( rows[j], cssClass );
- odd = false;
- }
- }
- }
-}
-
-/**
- * Highlights the row where the mouse is
- *
- * @param cssClass The name of the CSS cssClass to be applied to highlighted rows. If none is provided,
- * a class called "highlightClass" will be used
- */
-Lifetype.UI.TableEffects.prototype.highlightRows = function( cssClass )
-{
- if(!document.getElementsByTagName)
- return false;
-
- if( !cssClass )
- cssClass = "highlightClass";
-
- if( this.table )
- var tbodies = this.table.getElementsByTagName("tbody");
- else
- var tbodies = document.getElementsByTagName("tbody");
-
- for (var j=0; j<tbodies.length; j++) {
- var rows = tbodies[j].getElementsByTagName("tr");
- for (var i=0; i<rows.length; i++) {
- rows[i].onmouseover = function() {
- YAHOO.util.Dom.addClass( this, cssClass );
- }
- rows[i].onmouseout = function() {
- YAHOO.util.Dom.removeClass( this, cssClass );
- }
- }
- }
-}
\ No newline at end of file
Modified: plog/trunk/locale/admin/locale_en_UK.php
===================================================================
--- plog/trunk/locale/admin/locale_en_UK.php 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/locale/admin/locale_en_UK.php 2007-08-03 20:15:43 UTC (rev 5779)
@@ -1251,7 +1251,7 @@
$messages['friends_deleted_ok'] = '%s friends deleted successfully.';
////
-// added in LT 1.3
+// added in LT 2.0
////
$messages['error_incorrect_value'] = 'The value is not correct';
$messages['error_updating_comment2'] = 'There was an error updating the comment';
@@ -1284,4 +1284,8 @@
$messages['location_added_ok'] = 'Location successfully added';
$messages['error_updating_location'] = 'There was an error updating the location';
$messages['location_updated_ok'] = 'Location successfully updated';
+
+$messages['user_added_to_blog_text'] = 'Hi,\n\nUser %1$s has given you access to blog %3$s at %4$s.\n\nRegards, your Lifetype Administrator.';
+
+$messages['expand'] = 'Expand';
?>
\ No newline at end of file
Modified: plog/trunk/templates/admin/addbloguser.template
===================================================================
--- plog/trunk/templates/admin/addbloguser.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/addbloguser.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -1,25 +1,19 @@
-{include file="$admintemplatepath/header.template"}
-{js src="js/ui/pages/addbloguser.js"}
-{include file="$admintemplatepath/navigation.template" showOpt=newBlogUser title=$locale->tr("newBlogUser")}
- <form name="addBlogUser" id="addBlogUser" action="admin.php" method="post">
- <fieldset class="inputField">
-
+ <form name="addBlogUser" id="addBlogUser" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.BlogUsers.addBlogUserSubmitHook(this);return(false);">
+ <fieldset class="inputField">
<legend>{$locale->tr("newBlogUser")}</legend>
- {include file="$admintemplatepath/formvalidate.template"}
-
+ {include file="$admintemplatepath/formvalidateajax.template"}
<div class="field">
<label for="userName">{$locale->tr("username")}</label>
<span class="required">*</span>
<div class="formHelp">{$locale->tr("new_blog_username_help")}</div>
- <input type="text" id="userName" name="newBlogUserName" value="{$newBlogUserName}" style="width:50%" />
+ <input type="text" id="newBlogUserName" name="newBlogUserName" value="{$newBlogUserName}" style="width:50%" />
{check_perms adminperm=view_users}
- {* <a href="#" onclick="window.open('?op=siteUsersChooser','UserChooser','scrollbars=yes,resizable=yes,toolbar=no,height=450,width=600');"> *}
- <a href="?op=siteUsersChooser" rel="gb_page[600, 450]">
+ <a href="#" onclick="window.open('?op=siteUsersChooser','UserChooser','scrollbars=yes,resizable=yes,toolbar=no,height=450,width=600');">
{$locale->tr("select")}
</a>
<input type="hidden" id="userId" name="userId" value="" />
{/check_perms}
- {include file="$admintemplatepath/validate.template" field=newBlogUserName message=$locale->tr("error_invalid_user")}
+ {include file="$admintemplatepath/validateajax.template" field=newBlogUserName}
</div>
<div class="field">
@@ -32,14 +26,15 @@
<div class="field">
<label for="perm">{$locale->tr("permissions")}</label>
- <div class="formHelp">{$locale->tr("blog_user_permissions_help")}</div>
+ <div class="formHelp">{$locale->tr("blog_user_permissions_help")}</div>
{$locale->tr("quick_permission_selection")}
</br>
- <select name="preselection" onChange="Lifetype.UI.Pages.AddBlogUser.togglePermissionSets('addBlogUser', this.value);">
+ <select name="preselection" onChange="Lifetype.UI.Pages.BlogUsers.togglePermissionSets('addBlogUser', this.value);">
<option value=""/>{$locale->tr("select")}</option>
<option value="basic_blog_permission"/>{$locale->tr("basic_blog_permission")}</option>
<option value="full_blog_permission"/>{$locale->tr("full_blog_permission")}</option>
</select><br/>
+ <div id="permissions" style="overflow:auto;height:190px;">
{foreach from=$perms item=permission}
{if !$permission->isAdminOnlyPermission()}
{assign var=permId value=$permission->getId()}
@@ -53,22 +48,12 @@
{/if}
{/if}
{/foreach}
+ </div>
</div>
-
- <div class="field">
- <label for="newBlogUserText">{$locale->tr("notification_text")}</label>
- <span class="required">*</span>
- <div class="formHelp">{$locale->tr("notification_text_help")}</div>
- <textarea rows="10" cols="70" id="newBlogUserText" name="newBlogUserText">{$newBlogUserText}</textarea>
- {include file="$admintemplatepath/validate.template" field=newBlogUserText message=$locale->tr("error_empty_text")}
- </div>
</fieldset>
<div class="buttons">
<input type="reset" value="{$locale->tr("reset")}" name="resetButton" />
<input type="submit" name="Add this user" value="{$locale->tr("add")}"/>
<input type="hidden" name="op" value="addBlogUser"/>
</div>
- </form>
-
-{include file="$admintemplatepath/footernavigation.template"}
-{include file="$admintemplatepath/footer.template"}
+ </form>
\ No newline at end of file
Modified: plog/trunk/templates/admin/blogtemplates.template
===================================================================
--- plog/trunk/templates/admin/blogtemplates.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/blogtemplates.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -3,7 +3,7 @@
<script type="text/javascript">
{literal}
YAHOO.util.Event.addListener( window, "load", function() {
- var t = new Lifetype.UI.TableEffects( "list" );
+ var t = new Lifetype.Effects.Table( "list" );
t.stripe();
t.highlightRows();
});
Modified: plog/trunk/templates/admin/blogusers.template
===================================================================
--- plog/trunk/templates/admin/blogusers.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/blogusers.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -1,71 +1,17 @@
{include file="$admintemplatepath/header.template"}
{include file="$admintemplatepath/navigation.template" showOpt=showBlogUsers title=$locale->tr("showBlogUsers")}
-<script type="text/javascript">
-{literal}
-YAHOO.util.Event.addListener( window, "load", function() {
- var t = new Lifetype.UI.TableEffects( "list" );
- t.stripe();
- t.highlightRows();
- });
-{/literal}
-</script>
- <form id="blogUsers" action="admin.php" method="post">
- <div id="list">
+{js src="js/ui/pages/blogusers.js"}
+<div class="extraFunctions">
+<div class="left">
+ <a id="newBlogUsersButton" href="?op=newBlogUser" rel="overlay">{$locale->tr("newBlogUser")}</a>
+</div>
+<br style="clear:both" />
+</div>
+<form id="blogUsers" action="admin.php" method="post">
+<div id="list">
{include file="$admintemplatepath/successmessage.template"}
{include file="$admintemplatepath/errormessage.template"}
- <table id="list" class="info" summary="{$locale->tr("showBlogUsers")}">
- <thead>
- <tr>
- <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('blogUsers');" /></th>
- <th style="width:20%;">{$locale->tr("username")}</th>
- <th style="width:40%;">{$locale->tr("full_name")}</th>
- <th style="width:30%;">{$locale->tr("email")}</th>
- <th style="width:10%;">{$locale->tr("actions")}</th>
- </tr>
- </thead>
- {if $blogusers}
- <tbody>
- {foreach from=$blogusers item=bloguser}
- <tr>
- <td>
- <input class="checkbox" type="checkbox" name="userIds[{$bloguser->getId()}]" id="checks_1" value="{$bloguser->getId()}" />
- </td>
- <td class="col_highlighted">
- <a id="user_{$bloguser->getId()}" href="?op=editBlogUser&userId={$bloguser->getId()}">{$bloguser->getUsername()}</a>
- {assign var=blogId value=$blog->getId()}
- {assign var=userPerms value=$bloguser->getPermissions($blogId)}
- <script type="text/javascript">
- myTooltip = new YAHOO.widget.Tooltip("myTooltip", {literal}{{/literal}
- context:"user_{$bloguser->getId()}",
- text:"{$locale->tr("permissions")}:<br/>{foreach from=$userPerms item=perm}{$perm->getPermissionName()}<br/>{/foreach}"
- {literal}}{/literal} );
- </script>
- </td>
- <td>
- {$bloguser->getFullName()}
- </td>
- <td>
- <a href="mailto:{$bloguser->getEmail()}">
- {$bloguser->getEmail()}
- </a>
- </td>
- <td>
- <div class="list_action_button">
- {check_perms perm=update_blog_users}
- <a href="?op=editBlogUser&userId={$bloguser->getId()}" title="{$locale->tr("edit")}">
- <img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("edit")}" />
- </a>
- <a href="?op=deleteBlogUserPermissions&userId={$bloguser->getId()}" title="{$locale->tr("revoke_permissions")}">
- <img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("revoke_permissions")}" />
- </a>
- {/check_perms}
- </div>
- </td>
- </tr>
- {/foreach}
- </tbody>
- {/if}
- </table>
+ {include file="$admintemplatepath/blogusers_table.template"}
</div>
<div id="list_action_bar">
{check_perms perm=update_blog_users}
@@ -75,4 +21,4 @@
</div>
</form>
{include file="$admintemplatepath/footernavigation.template"}
-{include file="$admintemplatepath/footer.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file
Added: plog/trunk/templates/admin/blogusers_table.template
===================================================================
--- plog/trunk/templates/admin/blogusers_table.template (rev 0)
+++ plog/trunk/templates/admin/blogusers_table.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -0,0 +1,45 @@
+<table id="blogUsersTable" class="info" summary="{$locale->tr("showBlogUsers")}">
+ <thead>
+ <tr>
+ <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="Lifetype.Forms.toggleAllChecks('blogUsers');" /></th>
+ <th style="width:20%;">{$locale->tr("username")}</th>
+ <th style="width:40%;">{$locale->tr("full_name")}</th>
+ <th style="width:30%;">{$locale->tr("email")}</th>
+ <th style="width:10%;">{$locale->tr("actions")}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {foreach from=$blogusers item=bloguser}
+ <tr>
+ <td>
+ <input class="checkbox" type="checkbox" name="userIds[{$bloguser->getId()}]" id="checks_1" value="{$bloguser->getId()}" />
+ </td>
+ <td class="col_highlighted">
+ <a id="user_{$bloguser->getId()}" href="?op=editBlogUser&userId={$bloguser->getId()}" rel="overlay">{$bloguser->getUsername()}</a>
+ {assign var=blogId value=$blog->getId()}
+ {assign var=userPerms value=$bloguser->getPermissions($blogId)}
+ </td>
+ <td>
+ {$bloguser->getFullName()}
+ </td>
+ <td>
+ <a href="mailto:{$bloguser->getEmail()}">
+ {$bloguser->getEmail()}
+ </a>
+ </td>
+ <td>
+ <div class="list_action_button">
+ {check_perms perm=update_blog_users}
+ <a href="?op=editBlogUser&userId={$bloguser->getId()}" title="{$locale->tr("edit")}">
+ <img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("edit")}" />
+ </a>
+ <a href="?op=deleteBlogUserPermissions&userId={$bloguser->getId()}" title="{$locale->tr("revoke_permissions")}">
+ <img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("revoke_permissions")}" />
+ </a>
+ {/check_perms}
+ </div>
+ </td>
+ </tr>
+ {/foreach}
+ </tbody>
+</table>
\ No newline at end of file
Modified: plog/trunk/templates/admin/chooser/header.template
===================================================================
--- plog/trunk/templates/admin/chooser/header.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/chooser/header.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -15,7 +15,7 @@
<!-- LifeType UI Library -->
<script type="text/javascript" src="js/ui/core.js"></script>
<script type="text/javascript" src="js/ui/ui.js"></script>
- <script type="text/javascript" src="js/ui/tableeffects.js"></script>
+ <script type="text/javascript" src="js/ui/effects.js"></script>
<script type="text/javascript" src="js/ui/common.js"></script>
<script type="text/javascript" src="js/ui/forms.js"></script>
{include file="$admintemplatepath/jsconfig.template"}
Modified: plog/trunk/templates/admin/chooser/resourcelist.template
===================================================================
--- plog/trunk/templates/admin/chooser/resourcelist.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/chooser/resourcelist.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -21,7 +21,7 @@
<script type="text/javascript">
YAHOO.util.Event.addListener( window, "load", function() {
- var t = new Lifetype.UI.TableEffects( "list" );
+ var t = new Lifetype.Effects.Table( "list" );
t.stripe();
t.highlightRows();
});
Modified: plog/trunk/templates/admin/chooser/siteuserschooser.template
===================================================================
--- plog/trunk/templates/admin/chooser/siteuserschooser.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/chooser/siteuserschooser.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -2,7 +2,7 @@
<script type="text/javascript">
{literal}
YAHOO.util.Event.addListener( window, "load", function() {
- var t = new Lifetype.UI.TableEffects( "list" );
+ var t = new Lifetype.Effects.Table( "list" );
t.stripe();
t.highlightRows();
});
Modified: plog/trunk/templates/admin/chooser/userpictureselect.template
===================================================================
--- plog/trunk/templates/admin/chooser/userpictureselect.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/chooser/userpictureselect.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -14,7 +14,7 @@
<script type="text/javascript">
{literal}
YAHOO.util.Event.addListener( window, "load", function() {
- var t = new Lifetype.UI.TableEffects( "list" );
+ var t = new Lifetype.Effects.Table( "list" );
t.stripe();
t.highlightRows();
});
Modified: plog/trunk/templates/admin/createuser.template
===================================================================
--- plog/trunk/templates/admin/createuser.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/createuser.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -1,7 +1,4 @@
-{include file="$blogtemplate/header.template"}
-{include file="$blogtemplate/navigation.template" showOpt=createUser title=$locale->tr("createUser")}
-
- <form name="addUser" action="admin.php" method="post">
+ <form name="addUser" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.Users.addSubmitHook(this);return(false);">
<fieldset class="inputField">
<legend>{$locale->tr("createUser")}</legend>
{include file="$admintemplatepath/formvalidate.template"}
@@ -69,6 +66,4 @@
<input type="submit" name="Add User" value="{$locale->tr("add")}"/>
<input type="hidden" name="op" value="addUser" />
</div>
- </form>
-{include file="$blogtemplate/footernavigation.template"}
-{include file="$blogtemplate/footer.template"}
+ </form>
\ No newline at end of file
Modified: plog/trunk/templates/admin/dashboard.template
===================================================================
--- plog/trunk/templates/admin/dashboard.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/dashboard.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -15,7 +15,7 @@
tables_{$blog->getId()} = [ "dashboard_data_table_{$blog->getId()}", "dashboard_recent_comments_{$blog->getId()}", "dashboard_recent_trackbacks_{$blog->getId()}" ];
YAHOO.util.Event.addListener( window, "load", function() {literal}{{/literal}
for( i = 0; i < tables_{$blog->getId()}.length; i++ ) {literal}{{/literal}
- var t = new Lifetype.UI.TableEffects( tables_{$blog->getId()}[i] );
+ var t = new Lifetype.Effects.Table( tables_{$blog->getId()}[i] );
t.stripe();
t.highlightRows();
{literal}
Modified: plog/trunk/templates/admin/editbloguser.template
===================================================================
--- plog/trunk/templates/admin/editbloguser.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/editbloguser.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -1,6 +1,3 @@
-{include file="$admintemplatepath/header.template"}
-{js src="js/ui/pages/addbloguser.js"}
-{include file="$admintemplatepath/navigation.template" showOpt=showBlogUsers title=$locale->tr("editBlogUser")}
<form name="editBlogUser" id="editBlogUser" action="admin.php" method="post" onSubmit="Lifetype.Forms.AjaxFormProcessor(this.id,'?op=updateBlogUser&output=json');return(false);">
<fieldset class="inputField">
@@ -10,6 +7,7 @@
<div class="field">
<label for="newBlogUserName">{$locale->tr("username")}</label>
<input type="text" disabled="disabled" id="newBlogUsername" name="newBlogUserName" value="{$edituser->getUsername()}" />
+ {include file="$admintemplatepath/validateajax.template" field=newBlogUserName}
</div>
<div class="field">
@@ -18,17 +16,19 @@
<div class="formHelp">{$locale->tr("blog_user_permissions_help")}</div>
{$locale->tr("quick_permission_selection")}
</br>
- <select name="preselection" onChange="Lifetype.UI.Pages.AddBlogUser.togglePermissionSets('editBlogUser', this.value);">
+ <select name="preselection" onChange="Lifetype.UI.Pages.BlogUsers.togglePermissionSets('editBlogUser', this.value);">
<option value=""/>{$locale->tr("select")}</option>
<option value="basic_blog_permission"/>{$locale->tr("basic_blog_permission")}</option>
<option value="full_blog_permission"/>{$locale->tr("full_blog_permission")}</option>
</select><br/>
+ <div id="permissions" style="overflow:auto;height:190px;">
{foreach from=$perms item=perm}
{if !$perm->isAdminOnlyPermission()}
<input type="checkbox" class="checkbox" name="perm[]" value="{$perm->getId()}" {if $edituser->hasPermissionByName($perm->getName(),$blog->getId())}checked="checked"{/if}/>
{$locale->tr($perm->getDescription())}<br/>
{/if}
{/foreach}
+ </div>
</div>
</fieldset>
@@ -38,7 +38,4 @@
<input type="submit" name="Add this user" value="{$locale->tr("update")}"/>
<input type="hidden" name="op" value="updateBlogUser"/>
</div>
- </form>
-
-{include file="$admintemplatepath/footernavigation.template"}
-{include file="$admintemplatepath/footer.template"}
+ </form>
\ No newline at end of file
Modified: plog/trunk/templates/admin/editcomments_table.template
===================================================================
--- plog/trunk/templates/admin/editcomments_table.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/editcomments_table.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -32,7 +32,15 @@
</span>
</td>
<td>
- {$comment->getText()|strip_tags}
+ {if $comment->getCharacterLength(false) > 30 }
+ <span id="short_comment_text_{$comment->getId()}">{$comment->getText()|strip_tags|utf8_truncate:30}</span>
+ <div id="comment_text_{$comment->getId()}" style="height:0px;overflow:hidden;clear:none">{$comment->getText()|strip_tags}</div>
+ <a title="{$locale->tr("expand")}" href="#" onClick="Lifetype.UI.Pages.Comments.toggleComment(this, '{$comment->getId()}');return(false)" style="float:right">
+ <img src="imgs/admin/icon_arrow_down-16.png" style="border:0px" alt=" + " />
+ </a>
+ {else}
+ {$comment->getText()|strip_tags}
+ {/if}
</td>
<td>
<a href="mailto:{$comment->getUserEmail()}">
Modified: plog/trunk/templates/admin/editinboxprivatemessages.template
===================================================================
--- plog/trunk/templates/admin/editinboxprivatemessages.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/editinboxprivatemessages.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -3,7 +3,7 @@
<script type="text/javascript">
{literal}
YAHOO.util.Event.addListener( window, "load", function() {
- var t = new Lifetype.UI.TableEffects( "list" );
+ var t = new Lifetype.Effects.Table( "list" );
t.stripe();
t.highlightRows();
});
Modified: plog/trunk/templates/admin/editoutboxprivatemessages.template
===================================================================
--- plog/trunk/templates/admin/editoutboxprivatemessages.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/editoutboxprivatemessages.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -3,7 +3,7 @@
<script type="text/javascript">
{literal}
YAHOO.util.Event.addListener( window, "load", function() {
- var t = new Lifetype.UI.TableEffects( "list" );
+ var t = new Lifetype.Effects.Table( "list" );
t.stripe();
t.highlightRows();
});
Modified: plog/trunk/templates/admin/editposts.template
===================================================================
--- plog/trunk/templates/admin/editposts.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/editposts.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -9,7 +9,7 @@
{literal}
<script type="text/javascript">
YAHOO.util.Event.addListener( window, "load", function() {
- var t = new Lifetype.UI.TableEffects( "posts" );
+ var t = new Lifetype.Effects.Table( "posts" );
t.stripe();
t.highlightRows();
Modified: plog/trunk/templates/admin/header.template
===================================================================
--- plog/trunk/templates/admin/header.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/header.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -32,7 +32,7 @@
{js src="js/ui/forms.js"}
{js src="js/ui/plogui.js"}
{js src="js/ui/dom.js"}
-{js src="js/ui/tableeffects.js"}
+{js src="js/ui/effects.js"}
{js src="js/ui/contentoverlay.js"}
{js src="js/ui/menu.js"}
{js src="js/cookie/cookie.js"}
Modified: plog/trunk/templates/admin/newlinkcategory.template
===================================================================
--- plog/trunk/templates/admin/newlinkcategory.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/newlinkcategory.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -7,7 +7,7 @@
<span class="required">*</span>
<div class="formHelp">{$locale->tr("link_category_name_help")}</div>
<input type="text" id="linkCategoryName" name="linkCategoryName" value="{$linkCategoryName}"/>
- {include file="$admintemplatepath/validateajax.template" field=linkCategoryName}
+ {include file="$admintemplatepath/validateajax.template" field=linkCategoryName}
</div>
</fieldset>
<div class="buttons">
Modified: plog/trunk/templates/admin/plugincenter.template
===================================================================
--- plog/trunk/templates/admin/plugincenter.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/plugincenter.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -3,7 +3,7 @@
<script type="text/javascript">
{literal}
YAHOO.util.Event.addListener( window, "load", function() {
- var t = new Lifetype.UI.TableEffects( "list" );
+ var t = new Lifetype.Effects.Table( "list" );
t.stripe();
t.highlightRows();
});
Modified: plog/trunk/templates/admin/poststats.template
===================================================================
--- plog/trunk/templates/admin/poststats.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/poststats.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -3,7 +3,7 @@
<script type="text/javascript">
{literal}
YAHOO.util.Event.addListener( window, "load", function() {
- var t = new Lifetype.UI.TableEffects( "list" );
+ var t = new Lifetype.Effects.Table( "list" );
t.stripe();
t.highlightRows();
});
Modified: plog/trunk/templates/admin/simpleheader.template
===================================================================
--- plog/trunk/templates/admin/simpleheader.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/simpleheader.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -22,7 +22,7 @@
{js src="js/ui/forms.js"}
{js src="js/ui/dom.js"}
{js src="js/ui/ui.js"}
-{js src="js/ui/tableeffects.js"}
+{js src="js/ui/effects.js"}
{if $templatename=="default"}{** only to be used in the login page! **}
<style type="text/css">{literal}
html,body
Modified: plog/trunk/templates/admin/sitelocales.template
===================================================================
--- plog/trunk/templates/admin/sitelocales.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/sitelocales.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -3,7 +3,7 @@
<script type="text/javascript">
{literal}
YAHOO.util.Event.addListener( window, "load", function() {
- var t = new Lifetype.UI.TableEffects( "list" );
+ var t = new Lifetype.Effects.Table( "list" );
t.stripe();
t.highlightRows();
});
Modified: plog/trunk/templates/admin/sitetemplates.template
===================================================================
--- plog/trunk/templates/admin/sitetemplates.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/sitetemplates.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -3,7 +3,7 @@
<script type="text/javascript">
{literal}
YAHOO.util.Event.addListener( window, "load", function() {
- var t = new Lifetype.UI.TableEffects( "list" );
+ var t = new Lifetype.Effects.Table( "list" );
t.stripe();
t.highlightRows();
});
Modified: plog/trunk/templates/admin/siteusers.template
===================================================================
--- plog/trunk/templates/admin/siteusers.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/siteusers.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -5,7 +5,7 @@
<script type="text/javascript">
{literal}
YAHOO.util.Event.addListener( window, "load", function() {
- var t = new Lifetype.UI.TableEffects( "list" );
+ var t = new Lifetype.Effects.Table( "list" );
t.stripe();
t.highlightRows();
});
Modified: plog/trunk/templates/admin/statistics.template
===================================================================
--- plog/trunk/templates/admin/statistics.template 2007-08-03 20:11:50 UTC (rev 5778)
+++ plog/trunk/templates/admin/statistics.template 2007-08-03 20:15:43 UTC (rev 5779)
@@ -3,7 +3,7 @@
<script type="text/javascript">
{literal}
YAHOO.util.Event.addListener( window, "load", function() {
- var t = new Lifetype.UI.TableEffects( "list" );
+ var t = new Lifetype.Effects.Table( "list" );
t.stripe();
t.highlightRows();
More information about the pLog-svn
mailing list