aboutsummaryrefslogblamecommitdiffstats
path: root/public/assets/refinery/blog/backend-b4349fa7ad9efe6fad3e180f13824ed2.js
blob: eec2dcfec3cc874dfba23760c7ab0b4e8b0c3e68 (plain) (tree)
1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
$(document).ready(function(){function n(t){return t.split(/,\s*/)}function e(t){return n(t).pop()}$('nav#actions.multilist > ul:not(.search_list) li a[href$="'+window.location.pathname+'"]').parent().addClass("selected"),0==$("nav#actions.multilist > ul:not(.search_list) li.selected").length&&$("nav#actions.multilist > ul:not(.search_list) li a:nth(1)").parent().addClass("selected"),$("nav#actions.multilist > ul:not(.search_list) li > a").each(function(){null==$(this).data("dialog-title")&&$(this).bind("click",function(){$(this).css("background-image","url('/images/refinery/icons/ajax-loader.gif') !important")})}),$("ul.collapsible_menu").each(function(){(first_li=$(this).children("li:first")).after(div=$("<div></div>")),$("<span class='arrow'>&nbsp;</span>").appendTo(first_li),0==$(this).children("li.selected").length&&(div.hide(),first_li.addClass("closed")),$(this).children("li:not(:first)").appendTo(div),first_li.find("> a, > span.arrow").click(function(t){$(this).parent().toggleClass("closed"),$(this).parent().toggleClass("open"),$(this).parent().next("div").animate({opacity:"toggle",height:"toggle"},250,$.proxy(function(){$(this).css("background-image",null)},$(this))),t.preventDefault()})}),$(".success_icon, .failure_icon").bind("click",function(t){$.get($(this).attr("href"),$.proxy(function(t){$(this).css("background-image",null).removeClass("failure_icon").removeClass("success_icon").addClass(t.enabled?"success_icon":"failure_icon")},$(this))),t.preventDefault()}),$(function(){$("#page-tabs").tabs(),$("#copy_body_link").click(function(t){var e=$("#post_custom_teaser")[0],n=null;$.each(WYMeditor.INSTANCES,function(t,i){i._element[0]==e&&(n=i)}),n&&n.html($("#post_body").attr("value")),t.preventDefault()})}),page_options.init(!1,"",""),$("#post_tag_list").bind("keydown",function(t){t.keyCode===$.ui.keyCode.TAB&&$(this).data("autocomplete").menu.active&&t.preventDefault()}).autocomplete({source:function(t,i){$.getJSON("/refinery/blog/posts/tags",{term:e(t.term)},i)},search:function(){if(e(this.value).length<2)return!1},focus:function(){return!1},select:function(t,i){var e=n(this.value);return e.pop(),e.push(i.item.value),e.push(""),this.value=e.join(", "),!1}})});