summaryrefslogtreecommitdiff
blob: 8fa0506767b6c38ec81dc2b702fca0001af53803 (plain)
1
2
3
4
/* Do not modify this file directly. It is compiled from other files. */
/* jshint onevar: false, smarttabs: true */
/* global postboxes, addLoadEvent */
!function(e){var s,o,c,t;c=function(){s.height(o.height()-s.offset().top-250)},t=function(){s=e("#safecss"),o=e(window),postboxes.add_postbox_toggles("editcss"),c(),e("#safecssform").on("click","#preview",function(e){e.preventDefault(),document.forms.safecssform.target="csspreview",document.forms.safecssform.action.value="preview",document.forms.safecssform.submit(),document.forms.safecssform.target="",document.forms.safecssform.action.value="save"})},window.onresize=c,addLoadEvent(t)}(jQuery),jQuery(function(e){e(".edit-preprocessor").bind("click",function(s){s.preventDefault(),e("#preprocessor-select").slideDown(),e(this).hide()}),e(".cancel-preprocessor").bind("click",function(s){s.preventDefault(),e("#preprocessor-select").slideUp(function(){e(".edit-preprocessor").show(),e("#preprocessor_choices").val(e("#custom_css_preprocessor").val())})}),e(".save-preprocessor").bind("click",function(s){s.preventDefault(),e("#preprocessor-select").slideUp(),e("#preprocessor-display").text(e("#preprocessor_choices option:selected").text()),e("#custom_css_preprocessor").val(e("#preprocessor_choices").val()).change(),e(".edit-preprocessor").show()}),e(".edit-css-mode").bind("click",function(s){s.preventDefault(),e("#css-mode-select").slideDown(),e(this).hide()}),e(".cancel-css-mode").bind("click",function(s){s.preventDefault(),e("#css-mode-select").slideUp(function(){e(".edit-css-mode").show(),e("input[name=add_to_existing_display][value="+e("#add_to_existing").val()+"]").attr("checked",!0)})}),e(".save-css-mode").bind("click",function(s){s.preventDefault(),e("#css-mode-select").slideUp(),e("#css-mode-display").text("true"===e("input[name=add_to_existing_display]:checked").val()?"Add-on":"Replacement"),e("#add_to_existing").val(e("input[name=add_to_existing_display]:checked").val()),e(".edit-css-mode").show()})});