Sha256: a9efc286da5b19165f71edebf0062cd6ba30c7209b4b2d15c4536da2fa8de038

Contents?: true

Size: 1.02 KB

Versions: 46

Compression:

Stored size: 1.02 KB

Contents

var flexible_content_breakpoints = flexible_content_breakpoints || {
  init: function() {
    $('a[data-show-all-breakpoints=true]').click(function(){
      flexible_content_breakpoints.show_all_breakpoints();
    });

    $('[data-default-breakpoint] select').change(function(){
      flexible_content_breakpoints.adjust_widths();
    });
  },

  show_all_breakpoints: function() {
    var label = $('[data-default-breakpoint=true] label');
    label.text(label.text() + ' (medium)');

    $('a[data-show-all-breakpoints=true]').hide();
    $('[data-advanced-breakpoint=true]').show();
  },

  adjust_widths: function() {
    if($('a[data-show-all-breakpoints=true]').is(':hidden')) return;

    var value = parseInt($('[data-default-breakpoint=true] select').val());

    $('[data-breakpoint-xs=true] select').val(12);
    $('[data-breakpoint-sm=true] select').val(12);
    $('[data-breakpoint-lg=true] select').val(value);
    $('[data-breakpoint-xl=true] select').val(value);
  }
};

$(function(){ flexible_content_breakpoints.init(); });

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
udongo-7.9.0 app/assets/javascripts/backend/flexible_content_breakpoints.js
udongo-7.8.1 app/assets/javascripts/backend/flexible_content_breakpoints.js
udongo-7.8.0 app/assets/javascripts/backend/flexible_content_breakpoints.js
udongo-7.7.2 app/assets/javascripts/backend/flexible_content_breakpoints.js
udongo-7.7.1 app/assets/javascripts/backend/flexible_content_breakpoints.js
udongo-7.7.0 app/assets/javascripts/backend/flexible_content_breakpoints.js
udongo-7.6.2 app/assets/javascripts/backend/flexible_content_breakpoints.js
udongo-7.6.1 app/assets/javascripts/backend/flexible_content_breakpoints.js
udongo-7.6.0 app/assets/javascripts/backend/flexible_content_breakpoints.js
udongo-7.5.1 app/assets/javascripts/backend/flexible_content_breakpoints.js
udongo-7.5.0 app/assets/javascripts/backend/flexible_content_breakpoints.js
udongo-7.4.2 app/assets/javascripts/backend/flexible_content_breakpoints.js
udongo-7.4.1 app/assets/javascripts/backend/flexible_content_breakpoints.js
udongo-7.4.0 app/assets/javascripts/backend/flexible_content_breakpoints.js
udongo-7.3.5 app/assets/javascripts/backend/flexible_content_breakpoints.js
udongo-7.3.4 app/assets/javascripts/backend/flexible_content_breakpoints.js
udongo-7.3.3 app/assets/javascripts/backend/flexible_content_breakpoints.js
udongo-7.3.2 app/assets/javascripts/backend/flexible_content_breakpoints.js
udongo-7.3.1 app/assets/javascripts/backend/flexible_content_breakpoints.js
udongo-7.2.1 app/assets/javascripts/backend/flexible_content_breakpoints.js