Sha256: df4d36cb9fb142c04ab3fc400d33bd60230749691bd61ab69a9b1a071cf3cc85

Contents?: true

Size: 787 Bytes

Versions: 18

Compression:

Stored size: 787 Bytes

Contents

#= require ../shared/form_view

Locomotive.Views.CurrentSite ||= {}

class Locomotive.Views.CurrentSite.EditView extends Locomotive.Views.Shared.FormView

  el: '.main'

  initialize: ->
    @attach_events_on_private_access_attribute()
    @display_locale_picker_only_for_seo()

  attach_events_on_private_access_attribute: ->
    @$('#site_private_access').on 'switchChange.bootstrapSwitch', (event, state) ->
      $inputs = $('.locomotive_site_password')
      $inputs.toggleClass('hide')

  display_locale_picker_only_for_seo: ->
    $picker = @$('.locale-picker-btn-group').css(visibility: 'hidden')

    @$('a[data-toggle="tab"]').on 'shown.bs.tab', (event) ->
      if $(event.target).attr('href') == '#seo' then $picker.css(visibility: '') else $picker.css(visibility: 'hidden')

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
locomotivecms-3.4.1 app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee
locomotivecms-4.0.0.alpha2 app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee
locomotivecms-4.0.0.alpha1 app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee
locomotivecms-3.4.0 app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee
locomotivecms-3.3.0 app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee
locomotivecms-3.3.0.rc3 app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee
locomotivecms-3.3.0.rc2 app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee
locomotivecms-3.1.2 app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee
locomotivecms-3.2.1 app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee
locomotivecms-3.3.0.rc1 app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee
locomotivecms-3.2.0 app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee
locomotivecms-3.2.0.rc2 app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee
locomotivecms-3.2.0.rc1 app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee
locomotivecms-3.1.1 app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee
locomotivecms-3.1.0 app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee
locomotivecms-3.1.0.rc3 app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee
locomotivecms-3.1.0.rc2 app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee
locomotivecms-3.1.0.rc1 app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee