fix Get Satisfaction (bug 690363)
This commit is contained in:
Родитель
1375318e1b
Коммит
ca291a4370
|
@ -164,7 +164,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if addon.has_satisfaction %}
|
{% if addon.has_satisfaction %}
|
||||||
{# get satisfaction only supports en-US so no L10n here #}
|
{# get satisfaction only supports en-US so no L10n here #}
|
||||||
<li><a href="#" id="feedback_btn" class="support-gs"
|
<li><a href="#" id="feedback-btn" class="support-gs"
|
||||||
data-company="{{ addon.get_satisfaction_company }}"
|
data-company="{{ addon.get_satisfaction_company }}"
|
||||||
data-product="{{ addon.get_satisfaction_product }}">Get Satisfaction</a>
|
data-product="{{ addon.get_satisfaction_product }}">Get Satisfaction</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -134,4 +134,28 @@ $(function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#abuse-modal').modal('#report-abuse', {delegate: '#page'});
|
$('#abuse-modal').modal('#report-abuse', {delegate: '#page'});
|
||||||
|
|
||||||
|
// I Get Satisfaction.
|
||||||
|
var btn = $('#feedback-btn');
|
||||||
|
if (btn.length) {
|
||||||
|
var widget_options = {
|
||||||
|
'company': btn.attr('data-company'),
|
||||||
|
'placement': 'hidden',
|
||||||
|
'style': 'question',
|
||||||
|
'container': 'get-satisfaction'
|
||||||
|
};
|
||||||
|
if (btn.attr('data-product')) {
|
||||||
|
widget_options.product = btn.attr('data-product');
|
||||||
|
}
|
||||||
|
var feedback_widget = new GSFN.feedback_widget(widget_options);
|
||||||
|
|
||||||
|
// The feedback widget expects to be right before the end of <body>.
|
||||||
|
// Otherwise its 100% width overlay isn't across the whole page.
|
||||||
|
$('#fdbk_overlay').prependTo('body');
|
||||||
|
|
||||||
|
btn.click(_pd(function() {
|
||||||
|
feedback_widget.show();
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
/* general initialization */
|
/* general initialization */
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
//performance warnings
|
|
||||||
|
|
||||||
if ($("#addon[data-id], #persona[data-id]").length) {
|
// Personas are not impalacized yet!
|
||||||
|
if ($("#persona[data-id]").length) {
|
||||||
$(".addon .icon").click(function() {
|
$(".addon .icon").click(function() {
|
||||||
window.location.hash = "id=" + $("#addon, #persona").attr("data-id");
|
window.location.hash = "id=" + $("#persona").attr("data-id");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,29 +43,3 @@ $(document).ready(function() {
|
||||||
no_restart.show();
|
no_restart.show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/* get satisfaction initialization */
|
|
||||||
$(document).ready(function () {
|
|
||||||
var btn = $('#feedback_btn');
|
|
||||||
if (!btn.length) return; // no button, no satisfaction ;)
|
|
||||||
|
|
||||||
var widget_options = {};
|
|
||||||
widget_options.display = "overlay";
|
|
||||||
widget_options.company = btn.attr('data-company');
|
|
||||||
widget_options.placement = "hidden";
|
|
||||||
widget_options.color = "#222";
|
|
||||||
widget_options.style = "question";
|
|
||||||
widget_options.container = 'get_satisfaction_container';
|
|
||||||
if (btn.attr('data-product'))
|
|
||||||
widget_options.product = btn.attr('data-product');
|
|
||||||
var feedback_widget = new GSFN.feedback_widget(widget_options);
|
|
||||||
|
|
||||||
// The feedback widget expects to be right before the end of <body>.
|
|
||||||
// Otherwise it's 100% width overlay isn't across the whole page.
|
|
||||||
$('#fdbk_overlay').prependTo('body');
|
|
||||||
|
|
||||||
btn.click(function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
feedback_widget.show();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
|
@ -210,10 +210,11 @@
|
||||||
</div> {# section #}
|
</div> {# section #}
|
||||||
</div> {# footer #}
|
</div> {# footer #}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
<div id="get-satisfaction"></div>
|
||||||
{# Webtrends Stats Tracking #}
|
{# Webtrends Stats Tracking #}
|
||||||
<script defer src="{{ media('js/webtrends/webtrends-v0.1.js') }}"></script>
|
<script defer src="{{ media('js/webtrends/webtrends-v0.1.js') }}"></script>
|
||||||
<noscript class="hidden">
|
<noscript>
|
||||||
<img id="DCSIMG" width="1" height="1"
|
<img class="hidden" id="DCSIMG" width="1" height="1"
|
||||||
src="https://statse.webtrendslive.com/dcso6de4r0000082npfcmh4rf_4b1e/njs.gif?dcsuri=/nojavascript&WT.js=No&WT.tv=8.6.2" />
|
src="https://statse.webtrendslive.com/dcso6de4r0000082npfcmh4rf_4b1e/njs.gif?dcsuri=/nojavascript&WT.js=No&WT.tv=8.6.2" />
|
||||||
</noscript>
|
</noscript>
|
||||||
{# End Webtrends #}
|
{# End Webtrends #}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче