Sha256: b015e779d57d15da7adfd210a72ef1802859cc14e7cc3e92be4859bdb8fd4ff3

Contents?: true

Size: 1.03 KB

Versions: 14

Compression:

Stored size: 1.03 KB

Contents

//= require selectize
//= require thecore_ui_commons/thecore
//= require rails_admin/custom/thecore
//= require rails_admin/custom/thecore-custom-1
//= require rails_admin/custom/thecore-custom-2
//= require rails_admin/custom/thecore-custom-3
//= require rails_admin/custom/thecore-custom-4
//= require rails_admin/custom/thecore-custom-5

function hideBreadCrumbAndToolbar() {
    // If the page loaded has a tag like <span class="hide-breadcrumb hide-toolbar"></span>
    // then hide the elements

    // var actionName = "#{action_name}"
    // var isRoot = "#{RailsAdmin::Config::Actions.find(action_name.to_sym).root?}"

    // console.log(actionName, isRoot)

    if($(".hide-breadcrumb").length) $(".breadcrumb").hide()
    else $(".breadcrumb").show()

    if($(".hide-toolbar").length) $(".breadcrumb + .nav.nav-tabs").hide()
    else $(".breadcrumb + .nav.nav-tabs").show()
}

// Re evaluate at each iteraction
$(document).off('ready pjax:success', hideBreadCrumbAndToolbar);
$(document).on('ready pjax:success', hideBreadCrumbAndToolbar);

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
thecore_ui_rails_admin-2.6.0 app/assets/javascripts/rails_admin/custom/ui.js
thecore_ui_rails_admin-2.5.10 app/assets/javascripts/rails_admin/custom/ui.js
thecore_ui_rails_admin-2.5.9 app/assets/javascripts/rails_admin/custom/ui.js
thecore_ui_rails_admin-2.5.8 app/assets/javascripts/rails_admin/custom/ui.js
thecore_ui_rails_admin-2.5.7 app/assets/javascripts/rails_admin/custom/ui.js
thecore_ui_rails_admin-2.5.6 app/assets/javascripts/rails_admin/custom/ui.js
thecore_ui_rails_admin-2.5.5 app/assets/javascripts/rails_admin/custom/ui.js
thecore_ui_rails_admin-2.5.4 app/assets/javascripts/rails_admin/custom/ui.js
thecore_ui_rails_admin-2.5.3 app/assets/javascripts/rails_admin/custom/ui.js
thecore_ui_rails_admin-2.5.2 app/assets/javascripts/rails_admin/custom/ui.js
thecore_ui_rails_admin-2.5.1 app/assets/javascripts/rails_admin/custom/ui.js
thecore_ui_rails_admin-2.5.0 app/assets/javascripts/rails_admin/custom/ui.js
thecore_ui_rails_admin-2.4.9 app/assets/javascripts/rails_admin/custom/ui.js
thecore_ui_rails_admin-2.4.8 app/assets/javascripts/rails_admin/custom/ui.js