Sha256: e65b5f14ba551886aa295fdf7572f2d8dd144720276450a19889c26296453b5a
Contents?: true
Size: 1.62 KB
Versions: 3
Compression:
Stored size: 1.62 KB
Contents
.nav-tabs-custom %ul.nav.nav-tabs %li.active %a{'aria-expanded': 'false', "data-toggle" => "tab", :href => "#tab_1"} Action .kf-signal.action_signal %li %a{'aria-expanded': 'false', "data-toggle" => "tab", :href => "#tab_2"} = "#{@view.name}.js.erb" .kf-signal.js_erb_signal %li.pull-right %a{onclick: "controls.saveViewJs(#{@view.id})", title: t('keppler.actions.save')} %i.fa.fa-save %li.pull-right %a#btn-views-editor{title: t('keppler.actions.views')} %i.fa.fa-cog .tab-content #tab_1.tab-pane.active %div.action.code-container %textarea#code-action{:name => "code"} = @view.output_action #tab_2.tab-pane %div.js.code-container %textarea#code-js-erb{:name => "code"} = @view.output_js = render "editor_views" :javascript codeJsErb.codeMirrorJsErb(); codeAction.codeMirrorAction(); var tab = `Action`; var id = `#{@view.id}`; var ready = { js_erb: false, action: false } $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { tab = $(this)[0].innerText if( tab===`#{@view.name}.js.erb` && ready.js_erb === false ) { codeJsErb.codeMirrorJsErb(); ready.js_erb = true; } else if( tab==="Action" && ready.action === false ) { codeAction.codeMirrorAction(); ready.action = true; } }) $(document).bind('keydown',function(e) { if(e.ctrlKey && (e.which == 83)) { e.preventDefault(); if (tab === `#{@view.name}.js.erb`) { codeJsErb.save(id); } else if (tab === 'Action') { codeAction.save(id); } } });
Version data entries
3 entries across 3 versions & 1 rubygems