3 Jappix - An open social platform
4 These are the Ad-Hoc JS scripts for Jappix
6 -------------------------------------------------
10 Last revision: 11/07/11
14 // Opens the adhoc popup
15 function openAdHoc() {
18 '<div class="top">' + _e("Commands") + '</div>' +
20 '<div class="content">' +
21 '<div class="adhoc-head"></div>' +
23 '<div class="results adhoc-results"></div>' +
26 '<div class="bottom">' +
27 '<div class="wait wait-medium"></div>' +
29 '<a href="#" class="finish">' + _e("Close") + '</a>' +
33 createPopup('adhoc', html);
35 // Associate the events
41 // Quits the adhoc popup
42 function closeAdHoc() {
44 destroyPopup('adhoc');
49 // Retrieves an entity adhoc command
50 function retrieveAdHoc(xid) {
55 $('#adhoc .adhoc-head').html('<b>' + getBuddyName(xid).htmlEnc() + '</b> (' + xid.htmlEnc() + ')');
57 // Get the highest entity resource
58 var highest = getHighestResource(xid);
63 // Start a new adhoc command
64 dataForm(xid, 'command', '', '', 'adhoc');
69 // Starts an adhoc command on the user server
70 function serverAdHoc(server) {
75 $('#adhoc .adhoc-head').html('<b>' + server.htmlEnc() + '</b>');
77 // Start a new adhoc command
78 dataForm(server, 'command', '', '', 'adhoc');
82 function launchAdHoc() {
84 $('#adhoc .bottom .finish').click(closeAdHoc);