Sha256: e3e39c84a29b7d8538d316f8fc62be172b07d97ba679f5e68dcb36dc59c7a0c1

Contents?: true

Size: 766 Bytes

Versions: 8

Compression:

Stored size: 766 Bytes

Contents

$(document).ready(function() {
  var updateContentsOrder = function() {
    var lists = $('ul#contents-list.sortable');
    var ids = jQuery.map(lists, function(list) {
        return(jQuery.map($(list).sortable('toArray'), function(el) {
          return el.match(/content-(\w+)/)[1];
        }).join(','));
    }).join(',');
    $('#order').val(ids || '');
  }

  $('ul#contents-list.sortable').sortable({
    handle: 'em',
    items: 'li.content',
    stop: function(event, ui) { updateContentsOrder(); }
  });

  try {
    $('textarea.html').tinymce(TinyMceDefaultSettings);
  } catch (e) { /* tinymce not loaded */ }

  $.datepicker.setDefaults($.datepicker.regional[I18nLocale]);
  $('input[type=text].date').datepicker($.datepicker.regional[I18nLocale]);
});

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
locomotive_cms-1.0.0.beta.2 public/javascripts/admin/contents.js
locomotive_cms-1.0.0.beta public/javascripts/admin/contents.js
locomotive_cms-0.0.4.beta12 public/javascripts/admin/contents.js
locomotive_cms-0.0.4.beta11 public/javascripts/admin/contents.js
locomotive_cms-0.0.4.beta10 public/javascripts/admin/contents.js
locomotive_cms-0.0.4.beta9 public/javascripts/admin/contents.js
locomotive_cms-0.0.4.beta8 public/javascripts/admin/contents.js
locomotive_cms-0.0.4.beta7 public/javascripts/admin/contents.js