Fix accounts href in limit popup
This commit is contained in:
parent
59d5723f3e
commit
2d881caaeb
@ -832,11 +832,17 @@ MessengerUI, Messages) {
|
|||||||
return $spin;
|
return $spin;
|
||||||
};
|
};
|
||||||
|
|
||||||
var createLimit = function (toolbar) {
|
var createLimit = function (toolbar, config) {
|
||||||
var $limitIcon = $('<span>', {'class': 'fa fa-exclamation-triangle'});
|
var $limitIcon = $('<span>', {'class': 'fa fa-exclamation-triangle'});
|
||||||
var $limit = toolbar.$userAdmin.find('.'+LIMIT_CLS).attr({
|
var $limit = toolbar.$userAdmin.find('.'+LIMIT_CLS).attr({
|
||||||
'title': Messages.pinLimitReached
|
'title': Messages.pinLimitReached
|
||||||
}).append($limitIcon).hide();
|
}).append($limitIcon).hide();
|
||||||
|
|
||||||
|
var priv = config.metadataMgr.getPrivateData();
|
||||||
|
var origin = priv.origin;
|
||||||
|
var l = document.createElement("a");
|
||||||
|
l.href = origin;
|
||||||
|
|
||||||
var todo = function (e, overLimit) {
|
var todo = function (e, overLimit) {
|
||||||
if (e) { return void console.error("Unable to get the pinned usage", e); }
|
if (e) { return void console.error("Unable to get the pinned usage", e); }
|
||||||
if (overLimit) {
|
if (overLimit) {
|
||||||
@ -845,7 +851,7 @@ MessengerUI, Messages) {
|
|||||||
key = 'pinLimitReachedAlertNoAccounts';
|
key = 'pinLimitReachedAlertNoAccounts';
|
||||||
}
|
}
|
||||||
$limit.show().click(function () {
|
$limit.show().click(function () {
|
||||||
UI.alert(Messages._getKey(key, [encodeURIComponent(window.location.hostname)]), null, true);
|
UI.alert(Messages._getKey(key, [encodeURIComponent(l.hostname)]), null, true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user