Sha256: e44357b4bcf3601e678dec077a23e4177a83a566070f50f4103222b97fb45f1d

Contents?: true

Size: 1.97 KB

Versions: 7

Compression:

Stored size: 1.97 KB

Contents

%aside.control-sidebar.control-sidebar-light#theme-editor
  %a.aside-close#close-theme-editor
    .label.bg-gray
      X
  %ul.nav.nav-tabs
    %li.active
      %a{'aria-expanded': 'false', "data-toggle" => "tab", :href => "#editor_theme_tab_2"}
        %i.fa.fa-tint
  .tab-content.container-files.bg-gray
    #editor_theme_tab_2.tab-pane.active
      - @files_views.each_with_index do |file, i|
        .box.box-solid
          .box-header.with-border{title: "#{file[:name]}"}
            .row
              .col-lg-12
                %h4.box-title
                  %i.fa.fa-tint
                  = truncate(file[:name].split('.').first, length: 30, omission: '...')
          .box-body.no-padding
            .back-file-xs
              .center
                - if file[:cover].nil?
                  %i.fa.fa-tint#font-icon-size
                - else
                  = image_tag file[:cover]
          .box-body
            %span.box-title
              = file[:size]
              = link_to admin_frontend_view_select_theme_path(@view, file[:name]), class: 'btn btn-default pull-right', method: :post, data: { confirm: t("keppler_frontend.select_view_confirm") } do
                %i.fa.fa-check
.control-sidebar-bg

:javascript
  $(document).on('turbolinks:load', function() {
    $('a[data-toggle="tab"]').on('shown.bs.tab', function (ev) {
      var tab = ev.target.innerText;
      var id = `#{@view.id}`;

      if (tab === '') {
        tab = `#{@view.name}.html.erb`
      }

      $(document).bind('keydown', function(e) {
        if(e.ctrlKey && (e.which == 83)) {
          e.preventDefault();
          save()
        }
      });

      function save() {
        if ( tab === `#{@view.name}.html.erb` ) {
          codeHTML.save(id);
        } else if (tab === `#{@view.name}.scss` ) {
          codeCSS.save(id);
        } else if (tab === `#{@view.name}.js` ) {
          codeJs.save(id);
        } else if (tab === 'Action') {
          codeAction.save(id);
        }
      }
    })
  }

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
keppler-2.1.18 installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml
keppler-2.1.17 installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml
keppler-2.1.16 installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml
keppler-2.1.15 installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml
keppler-2.1.14 installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml
keppler-2.1.13 installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml
keppler-2.1.12 installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml