Sha256: 5d9985bb9389f3f4ca3145a218c109dafba1044ef5b7e2c6190fa423425c1c35

Contents?: true

Size: 537 Bytes

Versions: 4

Compression:

Stored size: 537 Bytes

Contents

var fieldId = "<%= @resource.to_param %>";
var fieldPresentation = '<%= @resource.presentation %>';

var nothingFoundHtml = '<div class="content"> \
                    <p>Nothing found</p>\
                  </div>'

$('*[data-field-id="' + fieldId + '"]').remove();

if(fieldPresentation == 'collection') {
  if(!$('#index-fields .row').length) {
    $('#index-fields').append(nothingFoundHtml);
  }
} else if (fieldPresentation == 'form') {
  if(!$('#form-fields .row').length) {
    $('#form-fields').append(nothingFoundHtml);
  }
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
simple-admin-0.2.0.pre.alpha app/views/simple_admin/admin/system/entity_fields/destroy.js.erb
simple-admin-0.1.2.pre.alpha app/views/simple_admin/admin/system/entity_fields/destroy.js.erb
simple-admin-0.1.1.pre.alpha app/views/simple_admin/admin/system/entity_fields/destroy.js.erb
simple-admin-0.1.0.pre.alpha app/views/simple_admin/admin/system/entity_fields/destroy.js.erb