[pLog-svn] r2525 - in plog/trunk: js/ui templates/admin
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Sun Sep 25 20:29:21 GMT 2005
Author: oscar
Date: 2005-09-25 20:29:21 +0000 (Sun, 25 Sep 2005)
New Revision: 2525
Modified:
plog/trunk/js/ui/common.js
plog/trunk/templates/admin/usersettings.template
Log:
Now the user picture can also be reset to the standard 'no picture' picture (via javascript)
Modified: plog/trunk/js/ui/common.js
===================================================================
--- plog/trunk/js/ui/common.js 2005-09-25 19:47:04 UTC (rev 2524)
+++ plog/trunk/js/ui/common.js 2005-09-25 20:29:21 UTC (rev 2525)
@@ -29,6 +29,16 @@
}
/**
+ * resets the user picture/avatar in the profile page
+ */
+function resetUserPicture()
+{
+ window.document.userSettings.userPictureId.value = 0;
+ // and reload the image path
+ window.document.userSettings.userPicture.src = 'imgs/no-user-picture.jpg';
+}
+
+/**
* empties a drop-down list
*
* @param box The form object representing the drop-down list
Modified: plog/trunk/templates/admin/usersettings.template
===================================================================
--- plog/trunk/templates/admin/usersettings.template 2005-09-25 19:47:04 UTC (rev 2524)
+++ plog/trunk/templates/admin/usersettings.template 2005-09-25 20:29:21 UTC (rev 2525)
@@ -58,6 +58,8 @@
{/if}
<div class="formHelp">{$locale->tr("user_picture_help")}</div>
<a href="javascript:userPictureSelectWindow();">{$locale->tr("choose")}...</a>
+ |
+ <a href="javascript:resetUserPicture();">{$locale->tr("reset")}</a>
<input type="hidden" name="userPictureId" id="userPictureId" value="{$user->getPictureId()}" />
</div>
</div>
More information about the pLog-svn
mailing list