2 Subscribe: function(a) {
3 var f = a.parent().find('#form_ostatus_connect');
11 url: a[0].href+'&ajax=1',
12 beforeSend: function(formData) {
13 a.addClass('processing');
15 error: function (xhr, textStatus, errorThrown) {
16 alert(errorThrown || textStatus);
18 success: function(data, textStatus, xhr) {
19 if (typeof($('form', data)[0]) != 'undefined') {
20 a.after(document._importNode($('form', data)[0], true));
22 var form = a.parent().find('#form_ostatus_connect');
25 .addClass('dialogbox')
26 .append('<button class="close">×</button>');
30 .addClass('submit_dialogbox')
31 .removeClass('submit')
32 .bind('click', function() {
33 form.addClass('processing');
36 form.find('button.close').click(function(){
42 form.find('#acct').focus();
45 a.removeClass('processing');
52 SN.Init.Subscribe = function() {
53 $('.entity_subscribe a').live('click', function() { SN.U.DialogBox.Subscribe($(this)); return false; });
56 $(document).ready(function() {
57 if ($('.entity_subscribe .entity_remote_subscribe').length > 0) {