Sha256: 18f0f323bf07d873d53a04c0e9d90f6278e31fb6379ab252c058fd527d842978
Contents?: true
Size: 846 Bytes
Versions: 9
Compression:
Stored size: 846 Bytes
Contents
// Place all the behaviors and hooks related to the matching controller here. // All this logic will automatically be available in application.js. Spud = (typeof(Spud) == 'undefined') ? {} : Spud; Spud.Admin = (typeof(Spud.Admin) == 'undefined') ? {} : Spud.Admin; Spud.Admin.Posts = new function(){ var self = this; this.edit = function(){ $('input[type=submit],.close_dialog').button(); initDatePicker(); initWysiwym(); $('#spud_post_new_category_form button').live('click', self.didSubmitCategory); }; this.didSubmitCategory = function(event){ $.ajax({ url: $('#spud_post_new_category_path').val(), type: 'post', dataType: 'json', data: { 'spud_post_category[name]': $('#spud_post_new_category_name').val(), 'spud_post_category[parent_id]': $('#spud_post_new_category_parent_id').val() } }); }; };
Version data entries
9 entries across 9 versions & 1 rubygems