Sha256: c6d7d2d18d898ef25d07f15bba01b2d826df590fdd0f15cd892c381dc99f47f6

Contents?: true

Size: 786 Bytes

Versions: 89

Compression:

Stored size: 786 Bytes

Contents

var el = $('.element-editor[data-element-id="<%= @element.id %>"]');
var icon = el.find('> .element-header > .element-handle > .icon');
var label = el.find('> .element-toolbar .publish-element-button label');
var eye = el.find('> .element-toolbar .publish-element-button .icon');

<%- if @element.public? -%>
  icon.removeClass('fa-window-close fas');
  icon.addClass('fa-window-maximize far');
  eye.removeClass('fa-eye');
  eye.addClass('fa-eye-slash');
  label.text('<%= Alchemy.t(:hide_element) %>');
<%- else -%>
  icon.removeClass('fa-window-maximize far');
  icon.addClass('fa-window-close fas');
  eye.removeClass('fa-eye-slash');
  eye.addClass('fa-eye');
  label.text('<%= Alchemy.t(:show_element) %>');
<%- end -%>
el.toggleClass('visible hidden');

Alchemy.reloadPreview();

Version data entries

89 entries across 89 versions & 1 rubygems

Version Path
alchemy_cms-5.3.6 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-6.0.7 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-6.0.6 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-6.0.5 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-6.0.4 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-6.0.3 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-6.0.2 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-6.0.1 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-5.3.5 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-6.0.0 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-5.3.4 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-6.0.0.pre.rc7 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-5.3.3 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-5.3.2 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-5.3.1 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-5.3.0 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-6.0.0.pre.rc6 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-5.2.7 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-5.2.6 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-5.1.10 app/views/alchemy/admin/elements/publish.js.erb