var __ajaxHelperService = null; var __currentBlogId = null; var __currentSubfolder = null; var __webPageClientIds = null; var __enjooSite_ajaxUserContexts = $(window); var __enjooSite_ajaxUserContext_Key = "ENJOOSITE_AJAXUSERCONTEXT_KEY{0}"; $(function(A) { initCommonVars(); bindButtonsEvent(); __ajaxHelperService = new CategoryServices() }); function initCommonVars() { __currentBlogId = enjooSiteBlogInfo.getCurrentBlogId(); __currentSubfolder = enjooSiteBlogInfo.getSubfolder(); __webPageClientIds = __enjooSite_webPageClientIds } function bindButtonsEvent(A) { $("#contentActions a.delete").bind("click", deleteCategoryConfirm) } function deleteCategoryConfirm(C) { var B = $(String.format("#{0}", __webPageClientIds.dgrItems)); var A = $("input:checked[commandArgument]", B); if (A.size() <= 0) { new popupAlert(Strings.Dialog_Alert, Strings.Message_EmptyChecked, PopupMessageType.Alert, true, null, null).show() } else { new popupAlert(Strings.Dialog_Alert, Strings.Message_DeleteConfirm, PopupMessageType.Alert, true, deleteCategory, { deleteItem: A.eq(0) }).show() } return false } function MetaTag() { this.id = null; this.name = null; this.content = null; this.httpEquiv = null } function deleteCategory(D, A) { var C = A.deleteItem; var E = C.attr("commandArgument"); var G = []; for (var B = 0; B < 5; B++) { G.push({ id: B, name: B, content: B, httpEquiv: B }) } var F = __ajaxHelperService.deleteCategory(E, deleteCategory_success, callback_error, { deleteItem: C }) } function deleteCategory_success(result, userContext) { var result = eval("(" + result + ")"); new popupAlert(result.title, result.message, result.type, true, null, null).show(); $(userContext.deleteItem).parents("tr").remove() } function callback_error(A, B) { new popupAlert(Strings.Dialog_Error, A.message, PopupMessageType.Error, true, null, null).show() } function enjooSite_Widget(A) { this["commandArgument"] = A; this["open"] = function(E, F, B) { var D = { modal: true, overlay: { backgroundColor: "#000", opacity: 0.05 }, dialogClass: "enjoosite_dialog", title: E, height: 125, resizable: false }; jQuery.extend(D, B); $("#enjooSite_PopupWindow").dialog(D).show(); $("#enjooSite_PopupWindow .enjoosite_dialog_closebar a").click(function(G) { $("#enjooSite_PopupWindow").hide(); return false }); $("div.enjoosite_dialog,#enjooSite_PopupWindow").css({ height: "auto" }); $(String.format("#{0}", F)).show().appendTo($("#enjooSite_PopupWindow .enjoosite_dialog_content").empty()); var C = $("#enjooSite_PopupWindow").parents("div.enjoosite_dialog"); $(C).css("top", (parseInt($(C).css("top")) - (parseInt($("#enjooSite_PopupWindow .enjoosite_dialog_content").height())) / 2)) }; this["close"] = function(B) { $("#enjooSite_PopupWindow").dialog("close") } } function newUserContextKey() { return String.format(__enjooSite_ajaxUserContext_Key, parseInt(Math.random() * 100000000000000000)) } function rebuildUserContext(A) { var B = A.customData.userContextKey; var C = __enjooSite_ajaxUserContexts.data(B); __enjooSite_ajaxUserContexts.removeData(B); return C } if (typeof (Sys) !== "undefined") { Sys.Application.notifyScriptLoaded() };