Skip to content

Instantly share code, notes, and snippets.

@CameronCarroll
Created October 13, 2011 18:01
Show Gist options
  • Save CameronCarroll/1284954 to your computer and use it in GitHub Desktop.
Save CameronCarroll/1284954 to your computer and use it in GitHub Desktop.
Started GET "/assets/admin/all.js" for 127.0.0.1 at 2011-10-10 21:12:53 -0700
Compiled admin/all.js (27ms) (pid 9577)
Compiled admin/spree_core.js (82ms) (pid 9577)
Compiled jquery.js (5ms) (pid 9577)
Compiled jquery_ujs.js (1ms) (pid 9577)
Compiled jquery-ui.js (4ms) (pid 9577)
Compiled jquery.cookie.js (0ms) (pid 9577)
Compiled jquery.tokeninput.js (0ms) (pid 9577)
Compiled jquery.delayedobserver.js (0ms) (pid 9577)
Compiled jquery.jstree/jquery.jstree.js (3ms) (pid 9577)
Compiled jquery.alerts/jquery.alerts.js (0ms) (pid 9577)
Compiled jquery.autocomplete.min.js (0ms) (pid 9577)
Compiled admin/address_states.js (0ms) (pid 9577)
Compiled admin/admin.js (8ms) (pid 9577)
Compiled admin/calculator.js (0ms) (pid 9577)
Compiled admin/checkouts/edit.js (0ms) (pid 9577)
Compiled admin/gateway.js (0ms) (pid 9577)
Compiled admin/images/index.js (0ms) (pid 9577)
Compiled admin/images/new.js (0ms) (pid 9577)
Compiled admin/nested-attribute.js (0ms) (pid 9577)
Compiled admin/orders/edit.js (0ms) (pid 9577)
Compiled admin/orders/edit_form.js (0ms) (pid 9577)
Compiled admin/payments/new.js (0ms) (pid 9577)
Compiled admin/products.js (0ms) (pid 9577)
Compiled admin/taxonomy.js (1ms) (pid 9577)
Compiled admin/underscore-min.js (0ms) (pid 9577)
Compiled admin/zone.js (0ms) (pid 9577)
Compiled admin/spree_auth.js (4ms) (pid 9577)
Compiled admin/spree_api.js (6ms) (pid 9577)
Compiled admin/spree_dash.js (51ms) (pid 9577)
Compiled admin/dashboard.js (0ms) (pid 9577)
Compiled jqPlot/jquery.jqplot.min.js (1ms) (pid 9577)
Compiled jqPlot/plugins/jqplot.dateAxisRenderer.min.js (1ms) (pid 9577)
Compiled jqPlot/plugins/jqplot.highlighter.min.js (0ms) (pid 9577)
Compiled jqPlot/plugins/jqplot.canvasAxisTickRenderer.min.js (0ms) (pid 9577)
Compiled jqPlot/plugins/jqplot.canvasTextRenderer.min.js (0ms) (pid 9577)
Compiled jqPlot/plugins/jqplot.canvasAxisLabelRenderer.min.js (0ms) (pid 9577)
Compiled jqPlot/plugins/jqplot.pieRenderer.min.js (0ms) (pid 9577)
Compiled admin/spree_promo.js (8ms) (pid 9577)
Compiled admin/promotions.js (0ms) (pid 9577)
Served asset /admin/all.js - 304 Not Modified (811ms)
Started GET "/assets/admin/zone.js" for 127.0.0.1 at 2011-10-10 21:19:22 -0700
Compiled admin/zone.js (0ms) (pid 9649)
Served asset /admin/zone.js - 304 Not Modified (92ms)
/admin/all.js relevant section for zone.js after cleaning, no precompile.
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
$(function() {
if ($('#country_based').is(':checked')) {
show_country();
} else if ($('#state_based').is(':checked')) {
show_state();
} else {
show_zone();
}
$('#country_based').click(function() { show_country();} );
$('#state_based').click(function() { show_state();} );
$('#zone_based').click(function() { show_zone();} );
})
var show_country = function() {
...
...
...
%%%%%%%%%%
/admin/zone.js after a cleaning, no precompile.
%%%%%%%%%%
$(function() {
if ($('#country_based').is(':checked')) {
show_country();
} else if ($('#state_based').is(':checked')) {
show_state();
} else if ($('#zipcode_based').is(':checked')) {
show_zipcode();
} else {
show_zone();
}
$('#country_based').click(function() { show_country();} );
$('#state_based').click(function() { show_state();} );
$('#zone_based').click(function() { show_zone();} );
$('#zipcode_based').click(function() { show_zipcode();} );
})
var show_country = function() {
$('#state_members :input').each(function() { $(this).prop("disabled", true); })
$('#state_members').hide();
$('#zipcode_members :input').each(function() { $(this).prop("disabled", true); })
$('#zipcode_members').hide();
$('#zone_members :input').each(function() { $(this).prop("disabled", true); })
$('#zone_members').hide();
$('#country_members :input').each(function() { $(this).prop("disabled", false); })
$('#country_members').show();
};
var show_state = function() {
...
...
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment