var __silverAlbumAjaxServices = null; $(function(A) { initCommonVars(); bindButtonsEvent(); __silverAlbumAjaxServices = new SilverAlbumAdminServices() }); function initCommonVars() { } function bindButtonsEvent(A) { $("#silverAlbumActions>li>a.add_silveralbum").bind("click", openAddSilverAlbumWindows); $("#silverAlbumActions>li>a.delete").bind("click", deleteSilverAlbums); $("#addSilverAlbum_Container>a").bind("click", addSilverAlbum) } function openAddSilverAlbumWindows(A) { new enjooSite_Widget().open("新建动感相册", "addSilverAlbum_Container", { width: 250 }); return false } function addSilverAlbum(D) { var A = $(this); var C = $(":text", A.parent()).val().trim(); var B = $(":checked", A.parent()).val(); if (C == "") { new popupAlert(Strings.Dialog_Alert, Strings.Message_NoneEmptyTitle, PopupMessageType.Alert, true, null, null).show() } else { __silverAlbumAjaxServices.addSilverAlbum(C, B, addSilverAlbum_success, ajax_error, {}) } return false } function addSilverAlbum_success(result, userContext) { result = eval("(" + result + ")"); if (result.type == PopupMessageType.Success) { setTimeout(function(e) { document.location = String.format("AddSilverAlbum.aspx?SilverAlbumId={0}", result.customData.newSilverAlbumId) }, 3000) } new popupAlert(result.title, result.message, result.type, true, null, null).show() } function deleteSilverAlbums(B) { var C = $("#SilverAlbumListing>tbody>tr>td>:checked"); if (C.size() > 0) { var A = new Array(); C.each(function(D) { A.push($(this).attr("commandArgument")) }); __silverAlbumAjaxServices.deleteSilverAlbums(A.join(","), deleteSilverAlbums_success, ajax_error, { deletedSilverAlbums: C }) } else { new popupAlert(Strings.Dialog_Alert, Strings.Message_EmptyChecked, PopupMessageType.Alert, true, null, null).show() } return false } function deleteSilverAlbums_success(result, userContext) { result = eval("(" + result + ")"); if (result.type == PopupMessageType.Success) { userContext.deletedSilverAlbums.each(function(i) { $(this).parent().parent().remove() }) } new popupAlert(result.title, result.message, result.type, true, null, null).show() } function ajax_error(A, B) { } if (typeof (Sys) !== "undefined") { Sys.Application.notifyScriptLoaded() };