Sha256: f0345e12ee30193cf51421d8c7fb1f029f34e40c80c9fb1046989fc5fa846fe3

Contents?: true

Size: 1.22 KB

Versions: 32

Compression:

Stored size: 1.22 KB

Contents

$(document).ready(function(){

  $(".select_properties_from_prototype").live("click", function(){
    $("#busy_indicator").show();
    var clicked_link = $(this);
    jQuery.ajax({ dataType: 'script', url: clicked_link.attr("href"), type: 'get',
        success: function(data){
          clicked_link.parent("td").parent("tr").hide(); 
          $("#busy_indicator").hide();
        }
    });
    return false;
  });


  jQuery('table.sortable').ready(function(){ 
    jQuery('table.sortable tbody').sortable(
      {
        handle: '.handle',
        update: function(event, ui) {
          $("#progress").show();
          positions = {};
          type = '';
          jQuery.each(jQuery('table.sortable tbody tr'), function(position, obj){
            reg = /(\w+_?)+_(\d+)/;
            parts = reg.exec(jQuery(obj).attr('id'));
            if (parts) { 
              positions['positions['+parts[2]+']'] = position;
              type = parts[1];
            }
          });
          jQuery.ajax({
            type: 'POST',
            dataType: 'script',
            url: type+'s/update_positions',
            data: positions,
            success: function(data){ $("#progress").hide(); }
          });
        }
      });
  });

});

Version data entries

32 entries across 20 versions & 7 rubygems

Version Path
apispree_core-0.0.0 public/javascripts/admin/unobtrusive_handlers.js
My-Commerce_core-1.1.0 public/javascripts/admin/unobtrusive_handlers.js
My-Commerce_core-1.0.0 public/javascripts/admin/unobtrusive_handlers.js
MyCommerceapi-1.0.0 dash/spec/test_app/public/javascripts/admin/unobtrusive_handlers.js
MyCommerceapi-1.0.0 core/spec/test_app/public/javascripts/admin/unobtrusive_handlers.js
MyCommerceapi-1.0.0 core/public/javascripts/admin/unobtrusive_handlers.js
MyCommerceapi-1.0.0 api/spec/test_app/public/javascripts/admin/unobtrusive_handlers.js
MyCommerceapi-1.0.0 auth/spec/test_app/public/javascripts/admin/unobtrusive_handlers.js
MyCommerceapi-1.0.0 sandbox/public/javascripts/admin/unobtrusive_handlers.js
MyCommerceapi-1.0.0 promo/spec/test_app/public/javascripts/admin/unobtrusive_handlers.js
MyCommerce-0.0.3 auth/spec/test_app/public/javascripts/admin/unobtrusive_handlers.js
MyCommerce-0.0.3 api/spec/test_app/public/javascripts/admin/unobtrusive_handlers.js
MyCommerce-0.0.3 core/public/javascripts/admin/unobtrusive_handlers.js
MyCommerce-0.0.3 core/spec/test_app/public/javascripts/admin/unobtrusive_handlers.js
MyCommerce-0.0.3 dash/spec/test_app/public/javascripts/admin/unobtrusive_handlers.js
MyCommerce-0.0.3 promo/spec/test_app/public/javascripts/admin/unobtrusive_handlers.js
MyCommerce-0.0.3 sandbox/public/javascripts/admin/unobtrusive_handlers.js
rfcommerce_sandbox-0.0.3 public/javascripts/admin/unobtrusive_handlers.js
rfcommerce_core-0.0.3 public/javascripts/admin/unobtrusive_handlers.js
spree_core-0.60.6 public/javascripts/admin/unobtrusive_handlers.js