|
|
@ -1745,7 +1745,14 @@ define([
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}*/
|
|
|
|
}*/
|
|
|
|
options.push({ tag: 'hr' });
|
|
|
|
options.push({ tag: 'hr' });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// We have code to hide 2 separators in a row, but in the case of survey, they may be
|
|
|
|
|
|
|
|
// in the DOM but hidden. We need to know if there are other elements in this
|
|
|
|
|
|
|
|
// section to determine if we have to manually hide a separator.
|
|
|
|
|
|
|
|
var surveyAlone = true;
|
|
|
|
|
|
|
|
|
|
|
|
if (Config.allowSubscriptions) {
|
|
|
|
if (Config.allowSubscriptions) {
|
|
|
|
|
|
|
|
surveyAlone = false;
|
|
|
|
options.push({
|
|
|
|
options.push({
|
|
|
|
tag: 'a',
|
|
|
|
tag: 'a',
|
|
|
|
attributes: {
|
|
|
|
attributes: {
|
|
|
@ -1758,6 +1765,7 @@ define([
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!priv.plan && !Config.removeDonateButton) {
|
|
|
|
if (!priv.plan && !Config.removeDonateButton) {
|
|
|
|
|
|
|
|
surveyAlone = false;
|
|
|
|
options.push({
|
|
|
|
options.push({
|
|
|
|
tag: 'a',
|
|
|
|
tag: 'a',
|
|
|
|
attributes: {
|
|
|
|
attributes: {
|
|
|
@ -1851,7 +1859,10 @@ define([
|
|
|
|
var $userAdmin = UIElements.createDropdown(dropdownConfigUser);
|
|
|
|
var $userAdmin = UIElements.createDropdown(dropdownConfigUser);
|
|
|
|
|
|
|
|
|
|
|
|
var $survey = $userAdmin.find('.cp-toolbar-survey');
|
|
|
|
var $survey = $userAdmin.find('.cp-toolbar-survey');
|
|
|
|
if (!surveyURL) { $survey.hide(); }
|
|
|
|
if (!surveyURL) {
|
|
|
|
|
|
|
|
$survey.hide();
|
|
|
|
|
|
|
|
if (surveyAlone) { $survey.next('hr').hide(); }
|
|
|
|
|
|
|
|
}
|
|
|
|
Common.makeUniversal('broadcast', {
|
|
|
|
Common.makeUniversal('broadcast', {
|
|
|
|
onEvent: function (obj) {
|
|
|
|
onEvent: function (obj) {
|
|
|
|
var cmd = obj.ev;
|
|
|
|
var cmd = obj.ev;
|
|
|
@ -1862,9 +1873,11 @@ define([
|
|
|
|
surveyURL = url;
|
|
|
|
surveyURL = url;
|
|
|
|
if (!url) {
|
|
|
|
if (!url) {
|
|
|
|
$survey.hide();
|
|
|
|
$survey.hide();
|
|
|
|
|
|
|
|
if (surveyAlone) { $survey.next('hr').hide(); }
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$survey.show();
|
|
|
|
$survey.show();
|
|
|
|
|
|
|
|
if (surveyAlone) { $survey.next('hr').show(); }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|