forked from GNUsocial/gnu-social
Merge branch '0.8.x'
* 0.8.x: Removed extra showScript() call at the bottom of the document. 0.8.x Removed old comments Disable debug mode (so there are no messages written to the javascript console) Resetup the ajaxification for replies and favors after inf. scrolling Refactored the favorite button ajaxification to a separate function Bug 1969: rebuild corrupted l10n files which caused all UI strings to be shown as nulls
This commit is contained in:
commit
f7bc741e6d
83
js/util.js
83
js/util.js
@ -81,32 +81,6 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
// XXX: refactor this code
|
// XXX: refactor this code
|
||||||
|
|
||||||
var favoptions = { dataType: 'xml',
|
|
||||||
beforeSubmit: function(data, target, options) {
|
|
||||||
$(target).addClass('processing');
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
success: function(xml) { var new_form = document._importNode($('form', xml).get(0), true);
|
|
||||||
var dis = new_form.id;
|
|
||||||
var fav = dis.replace('disfavor', 'favor');
|
|
||||||
$('form#'+fav).replaceWith(new_form);
|
|
||||||
$('form#'+dis).ajaxForm(disoptions).each(addAjaxHidden);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var disoptions = { dataType: 'xml',
|
|
||||||
beforeSubmit: function(data, target, options) {
|
|
||||||
$(target).addClass('processing');
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
success: function(xml) { var new_form = document._importNode($('form', xml).get(0), true);
|
|
||||||
var fav = new_form.id;
|
|
||||||
var dis = fav.replace('favor', 'disfavor');
|
|
||||||
$('form#'+dis).replaceWith(new_form);
|
|
||||||
$('form#'+fav).ajaxForm(favoptions).each(addAjaxHidden);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var joinoptions = { dataType: 'xml',
|
var joinoptions = { dataType: 'xml',
|
||||||
success: function(xml) { var new_form = document._importNode($('form', xml).get(0), true);
|
success: function(xml) { var new_form = document._importNode($('form', xml).get(0), true);
|
||||||
var leave = new_form.id;
|
var leave = new_form.id;
|
||||||
@ -125,20 +99,8 @@ $(document).ready(function(){
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function addAjaxHidden() {
|
|
||||||
var ajax = document.createElement('input');
|
|
||||||
ajax.setAttribute('type', 'hidden');
|
|
||||||
ajax.setAttribute('name', 'ajax');
|
|
||||||
ajax.setAttribute('value', 1);
|
|
||||||
this.appendChild(ajax);
|
|
||||||
}
|
|
||||||
|
|
||||||
$("form.form_favor").ajaxForm(favoptions);
|
|
||||||
$("form.form_disfavor").ajaxForm(disoptions);
|
|
||||||
$("form.form_group_join").ajaxForm(joinoptions);
|
$("form.form_group_join").ajaxForm(joinoptions);
|
||||||
$("form.form_group_leave").ajaxForm(leaveoptions);
|
$("form.form_group_leave").ajaxForm(leaveoptions);
|
||||||
$("form.form_favor").each(addAjaxHidden);
|
|
||||||
$("form.form_disfavor").each(addAjaxHidden);
|
|
||||||
$("form.form_group_join").each(addAjaxHidden);
|
$("form.form_group_join").each(addAjaxHidden);
|
||||||
$("form.form_group_leave").each(addAjaxHidden);
|
$("form.form_group_leave").each(addAjaxHidden);
|
||||||
|
|
||||||
@ -252,6 +214,7 @@ $(document).ready(function(){
|
|||||||
$('#'+li.id).fadeIn(2500);
|
$('#'+li.id).fadeIn(2500);
|
||||||
NoticeReply();
|
NoticeReply();
|
||||||
NoticeAttachments();
|
NoticeAttachments();
|
||||||
|
NoticeFavors();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$("#notice_data-text").val("");
|
$("#notice_data-text").val("");
|
||||||
@ -270,8 +233,52 @@ $(document).ready(function(){
|
|||||||
NoticeReply();
|
NoticeReply();
|
||||||
NoticeAttachments();
|
NoticeAttachments();
|
||||||
NoticeDataAttach();
|
NoticeDataAttach();
|
||||||
|
NoticeFavors();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function addAjaxHidden() {
|
||||||
|
var ajax = document.createElement('input');
|
||||||
|
ajax.setAttribute('type', 'hidden');
|
||||||
|
ajax.setAttribute('name', 'ajax');
|
||||||
|
ajax.setAttribute('value', 1);
|
||||||
|
this.appendChild(ajax);
|
||||||
|
}
|
||||||
|
|
||||||
|
function NoticeFavors() {
|
||||||
|
|
||||||
|
// XXX: refactor this code
|
||||||
|
var favoptions = { dataType: 'xml',
|
||||||
|
beforeSubmit: function(data, target, options) {
|
||||||
|
$(target).addClass('processing');
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
success: function(xml) { var new_form = document._importNode($('form', xml).get(0), true);
|
||||||
|
var dis = new_form.id;
|
||||||
|
var fav = dis.replace('disfavor', 'favor');
|
||||||
|
$('form#'+fav).replaceWith(new_form);
|
||||||
|
$('form#'+dis).ajaxForm(disoptions).each(addAjaxHidden);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var disoptions = { dataType: 'xml',
|
||||||
|
beforeSubmit: function(data, target, options) {
|
||||||
|
$(target).addClass('processing');
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
success: function(xml) { var new_form = document._importNode($('form', xml).get(0), true);
|
||||||
|
var fav = new_form.id;
|
||||||
|
var dis = fav.replace('favor', 'disfavor');
|
||||||
|
$('form#'+dis).replaceWith(new_form);
|
||||||
|
$('form#'+fav).ajaxForm(favoptions).each(addAjaxHidden);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$("form.form_favor").ajaxForm(favoptions);
|
||||||
|
$("form.form_disfavor").ajaxForm(disoptions);
|
||||||
|
$("form.form_favor").each(addAjaxHidden);
|
||||||
|
$("form.form_disfavor").each(addAjaxHidden);
|
||||||
|
}
|
||||||
|
|
||||||
function NoticeReply() {
|
function NoticeReply() {
|
||||||
if ($('#notice_data-text').length > 0 && $('#content .notice_reply').length > 0) {
|
if ($('#notice_data-text').length > 0 && $('#content .notice_reply').length > 0) {
|
||||||
$('#content .notice').each(function() {
|
$('#content .notice').each(function() {
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -4667,16 +4667,6 @@ msgstr ""
|
|||||||
msgid "%1$s is now listening to "
|
msgid "%1$s is now listening to "
|
||||||
msgstr "%1$s сега ги следи вашите забелешки за %2$s."
|
msgstr "%1$s сега ги следи вашите забелешки за %2$s."
|
||||||
|
|
||||||
#: lib/mail.php:254
|
|
||||||
#, fuzzy, php-format
|
|
||||||
msgid "Location: %s\n"
|
|
||||||
msgstr "Локација"
|
|
||||||
|
|
||||||
#: lib/mail.php:256
|
|
||||||
#, fuzzy, php-format
|
|
||||||
msgid "Homepage: %s\n"
|
|
||||||
msgstr "Домашна страница"
|
|
||||||
|
|
||||||
#: lib/mail.php:258
|
#: lib/mail.php:258
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid ""
|
msgid ""
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -1,8 +1,14 @@
|
|||||||
jQuery(document).ready(function($){
|
jQuery(document).ready(function($){
|
||||||
$('notices_primary').infinitescroll({
|
$('notices_primary').infinitescroll({
|
||||||
debug: true,
|
debug: false,
|
||||||
infiniteScroll : false,
|
infiniteScroll : false,
|
||||||
nextSelector : "li.nav_next a",
|
nextSelector : 'body#public li.nav_next a,'+
|
||||||
|
'body#all li.nav_next a,'+
|
||||||
|
'body#showstream li.nav_next a,'+
|
||||||
|
'body#replies li.nav_next a,'+
|
||||||
|
'body#showfavorites li.nav_next a,'+
|
||||||
|
'body#showgroup li.nav_next a,'+
|
||||||
|
'body#favorited li.nav_next a',
|
||||||
loadingImg : $('address .url')[0].href+'plugins/InfiniteScroll/ajax-loader.gif',
|
loadingImg : $('address .url')[0].href+'plugins/InfiniteScroll/ajax-loader.gif',
|
||||||
text : "<em>Loading the next set of posts...</em>",
|
text : "<em>Loading the next set of posts...</em>",
|
||||||
donetext : "<em>Congratulations, you\'ve reached the end of the Internet.</em>",
|
donetext : "<em>Congratulations, you\'ve reached the end of the Internet.</em>",
|
||||||
@ -11,5 +17,7 @@ jQuery(document).ready(function($){
|
|||||||
itemSelector : "#notices_primary ol.notices li"
|
itemSelector : "#notices_primary ol.notices li"
|
||||||
},function(){
|
},function(){
|
||||||
NoticeAttachments();
|
NoticeAttachments();
|
||||||
|
NoticeReply();
|
||||||
|
NoticeFavors();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
// Update the local timeline from a Meteor server
|
// Update the local timeline from a Meteor server
|
||||||
// XXX: If @a is subscribed to @b, @a should get @b's notices in @a's Personal timeline.
|
|
||||||
// Do Replies timeline.
|
|
||||||
|
|
||||||
var MeteorUpdater = function()
|
var MeteorUpdater = function()
|
||||||
{
|
{
|
||||||
|
@ -230,7 +230,6 @@ class RealtimePlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
$action->showContentBlock();
|
$action->showContentBlock();
|
||||||
$action->showScripts();
|
|
||||||
$action->elementEnd('body');
|
$action->elementEnd('body');
|
||||||
return false; // No default processing
|
return false; // No default processing
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user