mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-13 00:18:15 +00:00
fix newRtMsg() and newFavMsg() undefined sig_userpost error alert
This commit is contained in:
parent
1f535ab230
commit
5ee1b4e5ee
@ -285,11 +285,12 @@ function newRtMsg(postData, msg) {
|
|||||||
sig_userpost = postData.attr('data-content_to_sigrt');
|
sig_userpost = postData.attr('data-content_to_sigrt');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof sig_userpost === 'undefined') {
|
if (!sig_userpost) {
|
||||||
alert(polyglot.t('error',
|
alertPopup({
|
||||||
{error: 'can\'t sig_userpost is not deifned'}
|
//txtTitle: polyglot.t(''), add some title (not 'error', please) or just KISS
|
||||||
));
|
txtMessage: 'Can\'t handle retwisting of a twist —\n'
|
||||||
|
+ polyglot.t('this is undefined', {'this': 'sig_userpost'})
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -321,13 +322,15 @@ function newFavMsg(postData, priv, msg) {
|
|||||||
var userpost = $.evalJSON(postData.attr('data-content_to_rt'));
|
var userpost = $.evalJSON(postData.attr('data-content_to_rt'));
|
||||||
var sig_userpost = postData.attr('data-content_to_sigrt');
|
var sig_userpost = postData.attr('data-content_to_sigrt');
|
||||||
|
|
||||||
if (typeof sig_userpost === 'undefined') {
|
if (!sig_userpost) {
|
||||||
alert(polyglot.t('error',
|
alertPopup({
|
||||||
{error: 'can\'t sig_userpost is not deifned'}
|
//txtTitle: polyglot.t(''), add some title (not 'error', please) or just KISS
|
||||||
));
|
txtMessage: 'Can\'t handle favoriting of a twist —\n'
|
||||||
|
+ polyglot.t('this is undefined', {'this': 'sig_userpost'})
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var rtObj = {sig_userpost: sig_userpost, userpost: userpost};
|
var rtObj = {sig_userpost: sig_userpost, userpost: userpost};
|
||||||
|
|
||||||
if (typeof lastPostId !== 'undefined') {
|
if (typeof lastPostId !== 'undefined') {
|
||||||
|
Loading…
Reference in New Issue
Block a user