Sha256: 666457105859bc057753757eff92a3e5500f63a0e27c009c346dffc186303e0a
Contents?: true
Size: 1.47 KB
Versions: 7
Compression:
Stored size: 1.47 KB
Contents
var PlatformHelper = new Class({ version: 0.1, options: { }, Implements: [Options, Events], initialize: function(_object, _options) { if ( ! _object) { return; } this.setOptions(_options); var scope = _object; var _this = this; scope.getElements('.pagination a, thead a').addEvent('click', function(e){ e.preventDefault(); _this.fireEvent('paginationStart', [this]) }); scope.getElements('.search').addEvent('submit', function(e){ _this.fireEvent('search'); e.preventDefault(); var hidden_search = this.getElement('.hidden_search'); if (hidden_search) { hidden_search.destroy(); } var request = new Request.HTML({ method: 'get', url: e.target.get('action'), onFailure: function(){ _this.fireEvent('searchFailure'); }, onSuccess: function(a, b, html){ scope.innerHTML = html; _this.fireEvent('searchSuccess', [request]) } }).send({data: e.target}); }); scope.getElements('.quick_edit').addEvent('click', function(e){ e.preventDefault(); _this.fireEvent('quickEditStart', [this]); }); scope.getElements('.action a').addEvent('click', function(e){ this.addClass('clicked'); setTimeout(function(){ this.removeClass('clicked'); }.bind(this), 1500); }); scope.getElements('.js_delete').addEvent('mouseenter', function(){ this.getParent('tr').addClass('background_delete'); }).addEvent('mouseleave', function(){ this.getParent('tr').removeClass('background_delete'); }); } });
Version data entries
7 entries across 7 versions & 1 rubygems