Sha256: 0302638f9d2d9a9553fd70c7e397880dac6cce7451ced00bce3e5279eb49857b

Contents?: true

Size: 1.7 KB

Versions: 11

Compression:

Stored size: 1.7 KB

Contents

<% if Tml.config.enabled? %>
  <style type="text/css">
    .tml_fltr {<%=tml_style_attribute_tag('float', 'right')%> !important;}
    .tml_fltl {<%=tml_style_attribute_tag('float', 'left')%> !important;}
    .tml_txtr {<%=tml_style_attribute_tag('text-align', 'right')%> !important;}
    .tml_txtl {<%=tml_style_attribute_tag('text-align', 'left')%> !important;}
    <%= tml_application.css %>
  </style>

  <% if tml_session.tools_enabled? %>
    <script>
      (function() {
        if (window.tml_already_initialized) return;
        window.tml_already_initialized = true;

        var script = window.document.createElement('script');
        script.setAttribute('id', 'tml-tools');
        script.setAttribute('type', 'application/javascript');
        script.setAttribute('src', '<%= tml_application.tools['javascript'] %>');
        script.setAttribute('charset', 'UTF-8');
        script.onload = function() {
          Tml.Utils.insertCSS(window.document, "<%= tml_application.tools['stylesheet'] %>", false);
          Tml.app_key = '<%= tml_application.key %>';
          Tml.host = '<%= tml_application.tools['host'] %>';
          Tml.locale = '<%= tml_current_language.locale %>';
          Tml.sources = [];
          <%
            if tml_application.feature_enabled?(:shortcuts)
               tml_application.shortcuts.each do |key, script|
          %>
          shortcut.add('<%=key.html_safe%>', function() {<%= script.html_safe %>});
          <%
               end
            end
          %>
          if (typeof(tml_on_ready) === 'function') {
            tml_on_ready();
          }
        };
        window.document.getElementsByTagName('head')[0].appendChild(script);
      })();
    </script>
  <% end %>
<% end %>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
tml-rails-4.3.12 app/views/tml_rails/tags/_scripts.html.erb
tml-rails-4.3.11 app/views/tml_rails/tags/_scripts.html.erb
tml-rails-4.3.10 app/views/tml_rails/tags/_scripts.html.erb
tml-rails-4.3.9 app/views/tml_rails/tags/_scripts.html.erb
tml-rails-4.3.8 app/views/tml_rails/tags/_scripts.html.erb
tml-rails-4.3.7 app/views/tml_rails/tags/_scripts.html.erb
tml-rails-4.3.6 app/views/tml_rails/tags/_scripts.html.erb
tml-rails-4.3.5 app/views/tml_rails/tags/_scripts.html.erb
tml-rails-4.3.4 app/views/tml_rails/tags/_scripts.html.erb
tml-rails-4.3.2 app/views/tml_rails/tags/_scripts.html.erb
tml-rails-4.3.1 app/views/tml_rails/tags/_scripts.html.erb