r91357 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91356‎ | r91357 | r91358 >
Date:16:43, 2 July 2011
Author:zhenya
Status:ok
Tags:
Comment:
added some functionality for the user status history feature
Modified paths:
  • /trunk/extensions/SocialProfile/UserStatus/UserStatus.js (modified) (history)
  • /trunk/extensions/SocialProfile/UserStatus/UserStatus_AjaxFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SocialProfile/UserStatus/UserStatus_AjaxFunctions.php
@@ -23,7 +23,9 @@
2424 $output='<table>';
2525 /*Under construction*/
2626 foreach ($historyArray as $row ) {
27 - $output .= '<tr><td id="status-history-time">'.$row['ush_timestamp'].' </td><td> '.$row['ush_status'].'</td></tr>';
 27+ $output .= '<tr><td id="status-history-time">'.$row['ush_timestamp'].' </td>';
 28+ $output .= '<td><a href="javascript:fromHistoryToStatus(\''.$row['ush_status'].'\');">'
 29+ .$row['ush_status'].'</a></td></tr>';
2830 }
2931 $output.='</table>';
3032 return $output;
Index: trunk/extensions/SocialProfile/UserStatus/UserStatus.js
@@ -8,8 +8,8 @@
99 function toEditMode( status, id ) {
1010 var editbar = '<input id="user-status-input" type="text" value="' + status + '">';
1111 editbar += ' <a href="javascript:saveStatus(' + id + ');">Save</a>';
 12+ editbar += ' <a href="javascript:useHistory(' + id + ');">History</a>';
1213 editbar += ' <a href="javascript:toShowMode(\'' + status + '\',' + id + ');">Cancel</a>';
13 - editbar += ' <a href="javascript:useHistory(' + id + ');">History</a>';
1414 document.getElementById( 'user-status-block' ).innerHTML = editbar;
1515 }
1616
@@ -43,4 +43,9 @@
4444 var hBlock = document.getElementById('status-history-block');
4545 hBlock.parentNode.removeChild(hBlock);
4646 historyOpened = false;
 47+}
 48+
 49+function fromHistoryToStatus(str)
 50+{
 51+ document.getElementById('user-status-input').value = str;
4752 }
\ No newline at end of file

Status & tagging log