1

I'm having trouble displaying the Uservoice widget on my page. I copied the javascript code from the Uservoice admin, converted it to HAML then pasted on to my app:

layouts/_uservoice.html.haml

    :javascript
      (function(){
        var uv=document.createElement('script');
        uv.type='text/javascript';uv.async=true;
        uv.src='//widget.uservoice.com/Qho4ZF2W4O43bJ8Opc65g.js';
        var s=document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(uv,s)
        })()

    :javascript
      UserVoice = window.UserVoice || [];
      UserVoice.push(['showTab', 'classic_widget', {
        mode: 'full',
        primary_color: '#cc6d00',
        link_color: '#007dbf',
        default_mode: 'support',
        forum_id: 216289,
        tab_label: 'Feedback & Support',
        tab_color: '#cc6d00',
        tab_position: 'middle-right',
        tab_inverted: false
     }]);

and my home view:

    <doctype html>
    %html
      %head
        = render 'shared/meta'
        = favicon_link_tag 'tgnd_favicon.png'
      %body

        = render 'shared/fb'
        #main{:role => "main"}
           = render 'shared/header'
           = render 'shared/sub_header'

          .content_wrap.container
           .content.box_normal
              = render 'layouts/messages'
              = yield
           / ! end of .container
       .push
        = render 'layouts/uservoice'
        = render 'shared/footer'
        = render 'shared/dialogs'
Oleg De Leon
  • 33
  • 1
  • 4

0 Answers0