Sha256: af8dc766d62804547f0f588472d22830602fe71dd3c003718eb75d50d01f4a73

Contents?: true

Size: 559 Bytes

Versions: 5

Compression:

Stored size: 559 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');

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

Alchemy.reloadPreview();

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alchemy_cms-4.1.2 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-4.1.1 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-4.1.0 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-4.1.0.rc1 app/views/alchemy/admin/elements/publish.js.erb
alchemy_cms-4.1.0.beta app/views/alchemy/admin/elements/publish.js.erb