Sha256: 87bc5812b22124d6f84c505e338295d2a0d5578f4067ad17bb5086954bd28fa8

Contents?: true

Size: 1.56 KB

Versions: 6

Compression:

Stored size: 1.56 KB

Contents

{I"
class:EFI"BundledAsset;FI"logical_path;FI"%umlaut/expand_contract_toggle.js;TI"
pathname;FI"`/Users/jrochkind/code/umlaut-rails4/app/assets/javascripts/umlaut/expand_contract_toggle.js;TI"content_type;FI"application/javascript;FI"
mtime;Fl+l»SI"length;FiiI"digest;F"%52cd7d0c0b6fb5a3d92779ef9d6e235cI"source;FI"i/* expand_contract_toggle.js: Support for show more/hide more in lists of umlaut content.
  
  Expand/collapse elements are already controlled via Bootstrap toggle,
  this just adds some additional behavior in hooks to change our labels
  and disclosure icons appropriately, and prevent following non-js href links. 
*/

jQuery(document).ready(function($) {
  $(document).on("click", ".collapse-toggle", function(event) {
    event.preventDefault();    
    return false;
  });
  $(document).on("show", ".collapse", function(event) {
      // Update the icon
      $(this).parent().find('.collapse-toggle i').removeClass("umlaut_icons-list-closed").addClass("umlaut_icons-list-open");
      // Update the action label
      $(this).parent().find(".expand_contract_action_label").text("Hide ");

  });
  $(document).on("hide", ".collapse", function(event) {
      // Update the icon
      $(this).parent().find('.collapse-toggle i').removeClass("umlaut_icons-list-open").addClass("umlaut_icons-list-closed");
      // Update the action label
      $(this).parent().find(".expand_contract_action_label").text("Show ");

  });
});

;TI"required_assets_digest;F"%9f3dc1df27a6c736ad13867d94084857I"
_version;F"%6584930913c75ff69ba506e1cfbae2c9

Version data entries

6 entries across 3 versions & 1 rubygems

Version Path
umlaut-4.0.0.beta3 ./test/dummy/tmp/cache/assets/development/sprockets/1365f0b692ced0628311ee4566e1b707
umlaut-4.0.0.beta3 ./test/dummy/tmp/cache/assets/development/sprockets/7752e1fdfeb11e34353bb24822e8eddc
umlaut-4.0.0.beta2 ./test/dummy/tmp/cache/assets/development/sprockets/1365f0b692ced0628311ee4566e1b707
umlaut-4.0.0.beta2 ./test/dummy/tmp/cache/assets/development/sprockets/7752e1fdfeb11e34353bb24822e8eddc
umlaut-4.0.0.beta1 ./test/dummy/tmp/cache/assets/development/sprockets/1365f0b692ced0628311ee4566e1b707
umlaut-4.0.0.beta1 ./test/dummy/tmp/cache/assets/development/sprockets/7752e1fdfeb11e34353bb24822e8eddc