forked from GNUsocial/gnu-social
Update LinkPreview plugin for multiple notice forms.
* main notice form setup now encapsulated into SN.Init.NoticeForm(form) -- this can be monkeypatched by plugins to append their own setup code, as LinkPreview does * LinkPreview now supports debugging with non-minified JS source when $config['site']['minify'] is false * tweaked core & neo styles so 'notice-status' class gets same styles as attach-status, so we can more easily add mroe statusy things. (needs more consolidation with geo-status, etc) * tweaked LinkPreview's preview area to use that style
This commit is contained in:
24
js/util.js
24
js/util.js
@@ -612,10 +612,7 @@ var SN = { // StatusNet
|
||||
list.append(replyItem);
|
||||
|
||||
var form = replyForm = $(formEl);
|
||||
SN.U.NoticeLocationAttach(form);
|
||||
SN.U.FormNoticeXHR(form);
|
||||
SN.U.FormNoticeEnhancements(form);
|
||||
SN.U.NoticeDataAttach(form);
|
||||
SN.Init.NoticeFormSetup(form);
|
||||
|
||||
nextStep();
|
||||
};
|
||||
@@ -1310,14 +1307,25 @@ var SN = { // StatusNet
|
||||
if ($('body.user_in').length > 0) {
|
||||
$('.ajax-notice').each(function() {
|
||||
var form = $(this);
|
||||
SN.U.NoticeLocationAttach(form);
|
||||
SN.U.FormNoticeXHR(form);
|
||||
SN.U.FormNoticeEnhancements(form);
|
||||
SN.U.NoticeDataAttach(form);
|
||||
SN.Init.NoticeFormSetup(form);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Encapsulate notice form setup for a single form.
|
||||
* Plugins can add extra setup by monkeypatching this
|
||||
* function.
|
||||
*
|
||||
* @param {jQuery} form
|
||||
*/
|
||||
NoticeFormSetup: function(form) {
|
||||
SN.U.NoticeLocationAttach(form);
|
||||
SN.U.FormNoticeXHR(form);
|
||||
SN.U.FormNoticeEnhancements(form);
|
||||
SN.U.NoticeDataAttach(form);
|
||||
},
|
||||
|
||||
/**
|
||||
* Run setup code for notice timeline views items:
|
||||
*
|
||||
|
Reference in New Issue
Block a user