http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90535
Revision: 90535 Author: zhenya Date: 2011-06-21 16:40:38 +0000 (Tue, 21 Jun 2011) Log Message: ----------- Added Paths: ----------- trunk/extensions/SocialProfile/UserStatus/UserStatus.js Added: trunk/extensions/SocialProfile/UserStatus/UserStatus.js =================================================================== --- trunk/extensions/SocialProfile/UserStatus/UserStatus.js (rev 0) +++ trunk/extensions/SocialProfile/UserStatus/UserStatus.js 2011-06-21 16:40:38 UTC (rev 90535) @@ -0,0 +1,22 @@ +function toShowMode(status,id) { + document.getElementById('user-status-block').innerHTML = status; + document.getElementById('user-status-block').innerHTML+= ' <a href="javascript:toEditMode(\''+status+'\','+id+');">Edit</a>'; +} + +function toEditMode(status,id) { + var editbar = '<input id="user-status-input" type="text" value="'+status+'">'; + editbar += ' <a href="javascript:save('+id+');">Save</a>'; + editbar += ' <a href="javascript:toShowMode(\''+status+'\','+id+');">Cancel</a>'; + editbar += ' <a href="javascript:showHistory;">History</a>'; + document.getElementById('user-status-block').innerHTML = editbar; +} + +function save(id) { + var div = document.getElementById('user-status-block'); + var ustext = document.getElementById('user-status-input').value; + sajax_do_call( 'wfSaveStatus', [id,ustext], div ); +} + +function showHistory(){ + //A history script +} \ No newline at end of file Property changes on: trunk/extensions/SocialProfile/UserStatus/UserStatus.js ___________________________________________________________________ Added: svn:eol-style + native _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs