Sha256: 453c2cdc2ab88d9bc06c54213e46070bb360925023a168f604e1481823459c44

Contents?: true

Size: 1.87 KB

Versions: 13

Compression:

Stored size: 1.87 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
  $('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

13 entries across 13 versions & 1 rubygems

Version Path
keppler-2.1.11 installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml
keppler-2.1.10 installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml
keppler-2.1.9 installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml
keppler-2.1.8 installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml
keppler-2.1.7 installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml
keppler-2.1.6 installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml
keppler-2.1.5 installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml
keppler-2.1.4 installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml
keppler-2.1.3 installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml
keppler-2.1.2 installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml
keppler-2.1.1 installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml
keppler-2.1.pre.p1 installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml
keppler-2.1 installer/core/rockets/keppler_frontend/app/views/keppler_frontend/admin/views/_editor_themes.html.haml