{I" class:ETI"ProcessedAsset;FI"logical_path;TI"admin/page-edit.js;FI" pathname;TI"p/Users/brittanymartin/.rvm/gems/ruby-2.1.5/gems/trusty-cms-2.0.20/app/assets/javascripts/admin/page-edit.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+ €WI" length;Ti"I" digest;TI"%a56e92a33b743bc78cb59872fe555b35;FI" source;TI""(function(PageEdit, $) { PageEdit.addPart = function (form) { if (PageEdit.validPartName()) { PageEdit.partLoading(); $.post( $(form).attr('action'), $(form).serialize(), function(data) { $('#tab_control .pages').append(data); PageEdit.partAdded(); } ) } }; PageEdit.partAdded = function (tabId) { $('#add_part_busy').hide(); $('#add_part_button').attr('disabled', false); Popup.close(); $('#part_name_field').val(''); TabControl.updateTabsBasedOnPages(); TabControl.selectTab($('div#tab_control .tabs .tab').last().attr('id')); }; PageEdit.partLoading = function () { $('#add_part_button').attr('disabled', true); $('#add_part_busy').show(); }; PageEdit.validPartName = function () { var partNameField = $('#part_name_field'); var name = partNameField.val().toLowerCase(); if (name === '') { alert('Part name cannot be empty.'); return false; } if ($('#tab_' + name).length > 0) { alert('Part name must be unique.'); return false; } return true; } }(window.PageEdit = window.PageEdit || {}, jQuery)); $(function () { $('#new_page_part').submit(function(event) { event.preventDefault(); PageEdit.addPart(this); }); }); ;TI"dependency_digest;TI"%9f818f5eccc8f8694c5053b6a3cdb0a8;FI"required_paths;T[I"p/Users/brittanymartin/.rvm/gems/ruby-2.1.5/gems/trusty-cms-2.0.20/app/assets/javascripts/admin/page-edit.js;FI"dependency_paths;T[{I" path;TI"p/Users/brittanymartin/.rvm/gems/ruby-2.1.5/gems/trusty-cms-2.0.20/app/assets/javascripts/admin/page-edit.js;FI" mtime;TI"2016-04-04T10:54:05-04:00;TI" digest;TI"%a56e92a33b743bc78cb59872fe555b35;FI" _version;TI"%5dbb392182285b4042e11c847d2199ba;F