Index: trunk/extensions/SocialProfile/UserStatus/UserStatus_AjaxFunctions.php |
— | — | @@ -23,7 +23,9 @@ |
24 | 24 | $output='<table>'; |
25 | 25 | /*Under construction*/ |
26 | 26 | 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>'; |
28 | 30 | } |
29 | 31 | $output.='</table>'; |
30 | 32 | return $output; |
Index: trunk/extensions/SocialProfile/UserStatus/UserStatus.js |
— | — | @@ -8,8 +8,8 @@ |
9 | 9 | function toEditMode( status, id ) { |
10 | 10 | var editbar = '<input id="user-status-input" type="text" value="' + status + '">'; |
11 | 11 | editbar += ' <a href="javascript:saveStatus(' + id + ');">Save</a>'; |
| 12 | + editbar += ' <a href="javascript:useHistory(' + id + ');">History</a>'; |
12 | 13 | editbar += ' <a href="javascript:toShowMode(\'' + status + '\',' + id + ');">Cancel</a>'; |
13 | | - editbar += ' <a href="javascript:useHistory(' + id + ');">History</a>'; |
14 | 14 | document.getElementById( 'user-status-block' ).innerHTML = editbar; |
15 | 15 | } |
16 | 16 | |
— | — | @@ -43,4 +43,9 @@ |
44 | 44 | var hBlock = document.getElementById('status-history-block'); |
45 | 45 | hBlock.parentNode.removeChild(hBlock); |
46 | 46 | historyOpened = false; |
| 47 | +} |
| 48 | + |
| 49 | +function fromHistoryToStatus(str) |
| 50 | +{ |
| 51 | + document.getElementById('user-status-input').value = str; |
47 | 52 | } |
\ No newline at end of file |