Sha256: 62d1e7e2b34f20efd98f23de955972671c6d3f4e3760b8c6effc7098023167ef

Contents?: true

Size: 979 Bytes

Versions: 8

Compression:

Stored size: 979 Bytes

Contents

/*global Application */
// ### Allows a view to retrieve a new view via a `<select>`.
(function($) {

    $.extend($.fn, {
        filterable: function() {
            return this.each(function() {
                var $app_wrapper = $('#app_wrapper');

                $(this)
                    .off('click')
                    .on('click', function() {
                        $app_wrapper.mask({ 'freeze': true });
                    })
                    .off('change')
                    .on('change', function(e) {
                        $app_wrapper.mask({ 'unmask': true });
                        Application.showView( $.deserialize(e.target.value.substring(1)) );
                    })
                    .off('blur')
                    .on('blur', function() {
                        $app_wrapper.mask({ 'unmask': true });
                    });
                    $.preload(['@2x/filterlist_press@2x.png']);
            });
        }
    });

})(Zepto);

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sports_db-0.2.11 app/assets/javascripts/plugins/zepto.filterable.js
sports_db-0.2.10 app/assets/javascripts/plugins/zepto.filterable.js
sports_db-0.2.9 app/assets/javascripts/plugins/zepto.filterable.js
sports_db-0.2.8 app/assets/javascripts/plugins/zepto.filterable.js
sports_db-0.2.7 app/assets/javascripts/plugins/zepto.filterable.js
sports_db-0.2.6 app/assets/javascripts/plugins/zepto.filterable.js
sports_db-0.2.5 app/assets/javascripts/plugins/zepto.filterable.js
sports_db-0.2.4 app/assets/javascripts/plugins/zepto.filterable.js