MaxLength: 140,
PatternUsername: /^[0-9a-zA-Z\-_.]*$/,
HTTP20x30x: [200, 201, 202, 203, 204, 205, 206, 300, 301, 302, 303, 304, 305, 306, 307],
- NoticeFormMaster: null // to be cloned from the one at top
},
/**
}
},
+ /**
+ * Setup function -- DOES NOT trigger actions immediately.
+ *
+ * Sets up event handlers on all visible notice's option <a> elements
+ * so they are called with AJAX enabled.
+ *
+ * (without javascript the link goes to a page that expects you to verify
+ * the action through a form)
+ *
+ * @access private
+ */
+ NoticeOptionsAjax: function () {
+ $(document).on('click', '.notice-options > a', function (e) {
+ e.preventDefault();
+ var noticeEl = $(this).closest('.notice');
+ $.get($(this).attr('href'), {ajax: 1}, function (data, textStatus, xhr) {
+ SN.U.NoticeOptionPopup($('body', data).html());
+ });
+ return false;
+ });
+ },
+
+ NoticeOptionPopup: function (html) {
+ dialog = $(html).dialog();
+ },
+
/**
* Setup function -- DOES NOT trigger actions immediately.
*
});
},
+ NoticeOptionPopup: function (html) {
+ dialog = $(html).dialog({
+ resizable: false,
+ height: 150,
+ modal: true,
+ });
+ },
+
/**
* Setup function -- DOES NOT trigger actions immediately.
*
});
}
});
-
- // Infield labels for notice form inputs.
- $('.input_forms fieldset fieldset label').inFieldLabels({ fadeOpacity:0 });
}
},
*/
Notices: function () {
if ($('body.user_in').length > 0) {
- var masterForm = $('.form_notice:first');
- if (masterForm.length > 0) {
- SN.C.I.NoticeFormMaster = document._importNode(masterForm[0], true);
- }
SN.U.NoticeRepeat();
SN.U.NoticeReply();
SN.U.NoticeInlineReplySetup();
+ SN.U.NoticeOptionsAjax();
}
SN.U.NoticeAttachments();