Merge ~ya-bo-ng/maas:add-usabilla-link into maas:master

Proposed by Anthony Dillon
Status: Merged
Approved by: Anthony Dillon
Approved revision: 0d03b100f72fccacc4513cb913c84d67b16f7520
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~ya-bo-ng/maas:add-usabilla-link
Merge into: maas:master
Diff against target: 26 lines (+14/-0)
1 file modified
src/maasserver/templates/maasserver/footer.html (+14/-0)
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Steve Rydz (community) Approve
MAAS Lander Approve
Review via email: mp+356411@code.launchpad.net

Commit message

 Add the Usabilla link and script to the footer. I have disabled the GTM inclusion.

Description of the change

 Add the Usabilla link and script to the footer. I have disabled the GTM inclusion.

To post a comment you must log in.
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b add-usabilla-link lp:~ya-bo-ng/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: 0d03b100f72fccacc4513cb913c84d67b16f7520

review: Approve
Revision history for this message
Steve Rydz (steverydz) wrote :

LGTM

review: Approve
Revision history for this message
Anthony Dillon (ya-bo-ng) wrote :
Revision history for this message
Andres Rodriguez (andreserl) wrote :

lgtm!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/maasserver/templates/maasserver/footer.html b/src/maasserver/templates/maasserver/footer.html
2index bbcc205..f54d8b8 100644
3--- a/src/maasserver/templates/maasserver/footer.html
4+++ b/src/maasserver/templates/maasserver/footer.html
5@@ -13,7 +13,21 @@
6 <ul class="p-footer__links">
7 <li class="p-footer__item"><a href="http://docs.ubuntu.com/maas/{{doc_version}}/en/release-notes" class="p-footer__link">View release notes</a></li>
8 <li class="p-footer__item"><a href="https://docs.ubuntu.com/maas/{{doc_version}}/" class="p-footer__link">View documentation</a></li>
9+ <li class="p-footer__item"><a href="#" id="usbl-integrated-button">Give feedback</a></li>
10 </ul>
11+
12+ <script type="text/javascript">/*{literal}<![CDATA[*/window.lightningjs||function(c){function g(b,d){d&&(d+=(/\?/.test(d)?"&":"?")+"lv=1");c[b]||function(){var i=window,h=document,j=b,g=h.location.protocol,l="load",k=0;(function(){function b(){a.P(l);a.w=1;c[j]("_load")}c[j]=function(){function m(){m.id=e;return c[j].apply(m,arguments)}var b,e=++k;b=this&&this!=i?this.id||0:0;(a.s=a.s||[]).push([e,b,arguments]);m.then=function(b,c,h){var d=a.fh[e]=a.fh[e]||[],j=a.eh[e]=a.eh[e]||[],f=a.ph[e]=a.ph[e]||[];b&&d.push(b);c&&j.push(c);h&&f.push(h);return m};return m};var a=c[j]._={};a.fh={};a.eh={};a.ph={};a.l=d?d.replace(/^\/\//,(g=="https:"?g:"http:")+"//"):d;a.p={0:+new Date};a.P=function(b){a.p[b]=new Date-a.p[0]};a.w&&b();i.addEventListener?i.addEventListener(l,b,!1):i.attachEvent("on"+l,b);var q=function(){function b(){return["<head></head><",c,' onload="var d=',n,";d.getElementsByTagName('head')[0].",d,"(d.",g,"('script')).",i,"='",a.l,"'\"></",c,">"].join("")}var c="body",e=h[c];if(!e)return setTimeout(q,100);a.P(1);var d="appendChild",g="createElement",i="src",k=h[g]("div"),l=k[d](h[g]("div")),f=h[g]("iframe"),n="document",p;k.style.display="none";e.insertBefore(k,e.firstChild).id=o+"-"+j;f.frameBorder="0";f.id=o+"-frame-"+j;/MSIE[ ]+6/.test(navigator.userAgent)&&(f[i]="javascript:false");f.allowTransparency="true";l[d](f);try{f.contentWindow[n].open()}catch(s){a.domain=h.domain,p="javascript:var d="+n+".open();d.domain='"+h.domain+"';",f[i]=p+"void(0);"}try{var r=f.contentWindow[n];r.write(b());r.close()}catch(t){f[i]=p+'d.write("'+b().replace(/"/g,String.fromCharCode(92)+'"')+'");d.close();'}a.P(2)};a.l&&setTimeout(q,0)})()}();c[b].lv="1";return c[b]}var o="lightningjs",k=window[o]=g(o);k.require=g;k.modules=c}({}); window.usabilla_live = lightningjs.require("usabilla_live", "//w.usabilla.com/7cdd8c574ee4.js"); /*]]>{/literal}*/</script>
13+
14+ <script>
15+ //Hide Usabilla Default button
16+ window.usabilla_live("hide");
17+
18+ //Find a Link and open de Usabilla Feedback form when the user clicks on the link
19+ document.getElementById("usbl-integrated-button").addEventListener("click", function(e) {
20+ e.preventDefault();
21+ window.usabilla_live("click");
22+ });
23+ </script>
24 <p class="u-remove-max-width">&copy; {% now "Y" %} Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.</p>
25 {% endblock %}
26 </div>

Subscribers

People subscribed via source and target branches