71 lines
30 KiB
JavaScript
71 lines
30 KiB
JavaScript
var loadOrAjaxUpdate=function(){blockMenuSpawn=!1;showAddDetails=getCookieValue("showAddDetails");showToolTip=getCookieValue("showToolTip");showLiveEditControls=getCookieValue("showLiveEditControls");previousKAMControl=null;showAddDetails=null==showAddDetails?!1:"true"==showAddDetails;showLiveEditControls=null==showLiveEditControls?!1:"true"==showLiveEditControls;showToolTip=null==showToolTip?!0:"true"==showToolTip},MIN_DRAFT=10,MAX_DRAFT=19,MIN_PUBLISHED=20,MAX_PUBLISHED=40,MIN_DELETED=0,MAX_DELETED=
|
|
9,DRAFT=10,DRAFT_EXPIRED=11,DRAFT_PENDING=12,PUBLISHED=40,PUBLISHED_EXPIRED=20,PUBLISHED_PENDING=21,SUBMITTED=14,REJECTED=13,VIEW=1,READONLY=2,AUTHOR=3,PUBLISHER=4,OWNER=5,showToolTip=!1,previousKAMControl=null;function liveEditHideMenu(a,b){a.style.display="none";b()}function cancelFE(a){if(confirm("You will discard any unsaved changes. Do you want to proceed?"))return window.parent.closeModalDialog("editItemBehavior"),!1}
|
|
function redrawContent(a){a&&closeModalDialog("editItemBehavior");window.location=window.location.href}function raiseAsyncPostback(a,b,c){c&&closeModalDialog("editItemBehavior");__doPostBack(a,b)}
|
|
function showHideAdditionalDetails(a,b,c){var d=document.getElementById(a);"block"==d.style.display?(d.style.display="none",document.getElementById("a_"+a).innerHTML="\x26#9658;\x26nbsp;Show Additional Details",showAddDetails=!1,document.cookie="showAddDetails\x3dfalse; path\x3d/",window.parent.changeModalDialogHeight(b,"false")):(d.style.display="block",document.getElementById("a_"+a).innerHTML="\x26#9660;\x26nbsp;Hide Additional Details",showAddDetails=!0,document.cookie="showAddDetails\x3dtrue; path\x3d/",
|
|
window.parent.changeModalDialogHeight(c,"true"))}
|
|
function SaveAndSendFE(a,b){document.getElementById("AutoNotifyMe").style.display="block";document.getElementById("itemcontent").style.display="none";var c=new Date;""!=b&&(b=new Date(b));b>c?(document.getElementById("pending").style.visibility="visible",document.getElementById("noPending").style.visibility="hidden"):(document.getElementById("pending").style.visibility="hidden",document.getElementById("noPending").style.visibility="visible");if("0"==document.getElementById("ShowSMS").value)document.getElementById("txtMsgMobileLabel").style.visibility=
|
|
"hidden",document.getElementById("txtMsgMobile").style.visibility="hidden",document.getElementById("txtMsgMobileCounter").style.visibility="hidden";else if(c=document.getElementById(a))document.getElementById("txtMsgMobile").value=c.value;window.parent.changeModalDialogHeight(350,"");return!1}function cancelFE(a){if(confirm("You will discard any unsaved changes. Do you want to proceed?"))return window.parent.closeModalDialog("editItemBehavior"),!1}
|
|
function CancelSaveAndSendFE(a){document.getElementById("AutoNotifyMe").style.display="none";document.getElementById("itemcontent").style.display="block";window.parent.setModalClassForEditItemBehavior("liveEdit","");return!1}function CancelSaveAndSendCalendarFE(a){document.getElementById("AutoNotifyMe").style.display="none";document.getElementById("itemcontent").style.display="block";window.parent.setModalClassForEditItemBehavior("liveEdit calendar","");return!1}
|
|
function publishItemFE(a,b,c,d,g,f,e,k){if(void 0==d.ysnSaveFE){var h=document.createElement("input");h.name="ysnSaveFE";h.defaultValue=1;h.value=1;h.setAttribute("hidden",!0);d.appendChild(h)}else d.ysnSaveFE.value=1;void 0==d.ysnSend?(h=document.createElement("input"),h.name="ysnSend",h.defaultValue=a,h.value=a,h.setAttribute("hidden",!0),d.appendChild(h)):d.ysnSend.value=a;void 0==d.ysnSendAtStart?(h=document.createElement("input"),h.name="ysnSendAtStart",h.defaultValue=b,h.value=b,h.setAttribute("hidden",
|
|
!0),d.appendChild(h)):d.ysnSendAtStart.value=b;void 0==d.ysnSendBeforeDays?(h=document.createElement("input"),h.name="ysnSendBeforeDays",h.defaultValue=c,h.value=c,h.setAttribute("hidden",!0),d.appendChild(h)):d.ysnSendBeforeDays.value=c;switch(g){case "civicalerts":d.curPage&&"CivicAlertForm"==d.curPage.value?k?window.parent.document.getElementsByName("strActionFE")[0].value="CivicAlertItemPublish":(d.ysnPublishDetail.value=1,d.submit()):d.strActionFE.value="CivicAlertItemSave";break;case "blog":case "blogs":d.curPage&&
|
|
"BlogItemForm"==d.curPage.value?k?window.parent.document.getElementsByName("strActionFE")[0].value="BlogItemPublish":d.strActionFE.value="BlogItemPublish":d.strActionFE.value="BlogItemSave";break;case "calendar":return __doPostBack("ctl00$btnPublishFE","OnClick"),!0}"calendar"!=g&&"civicalerts"!=g&&window.parent.raiseAsyncPostback(e,f,1)}
|
|
function createAndSetNewModifiedToggleIfNeeded(a,b){if(b.newModifiedToggle.checked){var c=document.createElement("input");c.setAttribute("type","hidden");c.setAttribute("name","newModifiedToggle");c.setAttribute("value",b.newModifiedToggle.value);a.appendChild(c)}}
|
|
function sendEmailFE(a,b,c,d,g,f){var e,k,h;"frmBlogItemForm"==a||"frmAlertInfo"==a?(e=document.getElementById(a),a=document.getElementById(a)):"calendar"==c?(e=document.aspnetForm,a=document.getElementById(a)):(e=window.parent.document.getElementById(a),a=document.frmSendEmail);void 0==e.txtSMSComments&&(k=document.createElement("input"),k.name="txtSMSComments",k.setAttribute("hidden",!0));void 0==e.txtComments&&(h=document.createElement("input"),h.name="txtComments",h.setAttribute("hidden",!0));
|
|
document.getElementById("txtMsgMobile")&&(void 0!=e.txtComments?e.txtSMSComments.value=document.getElementById("txtMsgMobile").value:(k.value=document.getElementById("txtMsgMobile").value,k.defaultValue=document.getElementById("txtMsgMobile").value,e.appendChild(k)));var l;if(b){for(b=0;b<a.one.length;b++)a.one[b].checked&&(l=a.one[b].value);if("Send"==l)void 0!=e.txtComments?e.txtComments.value=a.txtMsgComments.value:(h.value=a.txtMsgComments.value,h.defaultValue=a.txtMsgComments.value,e.appendChild(h)),
|
|
publishItemFE(!0,!1,!1,e,c,d,g,f);else if("SendAtStart"==l)e.txtComments.value=a.txtMsgComments.value,publishItemFE(!1,!0,!1,e,c,d,g,f);else if("SendBeforeDays"==l)h=a.numDays.value,validNumber(h)?(e.txtComments.value=a.txtMsgComments.value,e.intSendBeforeDays.value=a.numDays.value,publishItemFE(!1,!1,!0,e,c,d,g,f)):""==h?alert("The number of days before the event was not specified."):alert("An invalid value was entered for the number of days. Please enter a valid value.");else return alert("A send time must be selected."),
|
|
!1}else publishItemFE(!1,!1,!1,e,c,d,g,f);return!0}function resolveLiveEditContainer(a){(a=a.parentNode)&&(a.parentNode&&"TD"==a.parentNode.tagName&&a.parentNode.parentNode&&"TR"==a.parentNode.parentNode.tagName)&&(a=a.parentNode.parentNode);return a}function liveEditCommonCategory(a,b,c,d,g){a&&(a.style.zIndex=2);liveEditCommonItem(b,c,d,g,!0)}function findPos(a){var b=curtop=0;if(a.offsetParent){do b+=a.offsetLeft,curtop+=a.offsetTop;while(a=a.offsetParent)}return b}
|
|
function liveEditCommonItem(a,b,c,d,g){d=document.getElementById(d);var f=-1<c.className.indexOf("move"),e=findPos(c.parentNode);g?132>document.body.scrollWidth-e?(c.className=c.className.replace(/liveEditControl/,"liveEditControl flipH"),d.style.left=d.style.width-31+"px"):(c.className=c.className.replace(/liveEditControl flipH/,"liveEditControl"),d.style.left="0px"):327>document.body.scrollWidth-e?(c.className=c.className.replace(/liveEditControl/,"liveEditControl flipH"),d.style.left=d.style.width-
|
|
(f?281:234)+"px"):(c.className=c.className.replace(/liveEditControl flipH/,"liveEditControl"),d.style.left="0px");window.showToolTip&&(window.toolTipElem&&(a.style.display="none"),showToolTip=!1,document.cookie="showToolTip\x3dfalse; path\x3d/");"none"==b.style.display?(c.style.position="relative",c.style.position="absolute",c.style.width="400px",b.style.display="block"):b.style.display="none";c.appendChild(b);c.appendChild(a)}window.pageHandleResponsive=!0;
|
|
$.when(window.Pages.rwdReady).done(function(){var a=$("#NewsFlashContent"),b=$("#divSideBar"),c=$("div.contentMain");cpMedia.register("#NewsFlashContent:media(this-min-width:500px)",{setup:function(){a.addClass("maxWidth500px");window.cpMedia.diag('$(element).addClass("maxWidth500px"); #NewsFlashContent:media(this-min-width:500px)');c.insertBefore(b);window.cpMedia.diag("side bar setup above content")},match:function(a,g){$(g).removeClass("maxWidth500px");window.cpMedia.diag('$(element).removeClass("maxWidth500px"); #NewsFlashContent:media(this-min-width:500px)');
|
|
b.insertBefore(c);window.cpMedia.diag("side bar moved below content")},unmatch:function(a,g){$(g).addClass("maxWidth500px");window.cpMedia.diag('$(element).addClass("maxWidth500px"); #NewsFlashContent:media(this-min-width:500px)');c.insertBefore(b);window.cpMedia.diag("side bar moved above content")}});toggleClassMedia("minWidth320px","#NewsFlashContent:media(this-min-width:320px)")});try{Sys.Application.add_load(loadOrAjaxUpdate)}catch(ex){}
|
|
$(function(){$("#searchTerms").keyup(function(a){a.stopPropagation();a.preventDefault();13==a.which&&CivicAlertSearch();return!1})});
|
|
function CivicAlertItemActions(a,b,c,d,g,f){a=-1;var e=!0,k=document.aspnetForm,h=hasNotifyMeList();null!=k.lngCivicAlertCategoryID&&(k.lngCivicAlertCategoryID.value=g);null!=k.lngCivicAlertItemID&&(k.lngCivicAlertItemID.value=d);switch(b){case "Link":e=!1;showCopyLinkWindowUsingRelatedLink("/CivicAlerts.aspx?AID\x3d"+d);break;case "Delete":confirm("Are you sure you want to delete this item?")?k.strActionFE.value="CivicAlertItemDelete":e=!1;break;case "ArchivePublic":0>a&&(a=1);if(!confirm("Archiving is a PERMANENT action!\nYou will not be able to edit, publish, unpublish, submit, reject, or move the item out of the archive!\nAre you sure you want to archive this News Flash Item?"))return;
|
|
k.ysnArchShowForcesFE.value=a;k.strActionFE.value="CivicAlertItemArchive";break;case "ArchiveHidden":0>a&&(a=0);if(!confirm("Archiving is a PERMANENT action!\nYou will not be able to edit, publish, unpublish, submit, reject, or move the item out of the archive!\nAre you sure you want to archive this News Flash Item?"))return;k.ysnArchShowForcesFE.value=a;k.strActionFE.value="CivicAlertItemArchive";break;case "Submit":k.strActionFE.value="CivicAlertItemSubmit";break;case "Reject":k.strActionFE.value=
|
|
"CivicAlertItemReject";break;case "Publish":h?saveSendFE(k,"","",f,c,d,g):k.strActionFE.value="CivicAlertItemPublish";break;case "Unpublish":k.strActionFE.value="CivicAlertItemUnPublish";break;default:e=!1}e&&(k.ysnSaveFE.value=1,k.ysnArchShowForcesFE.value=a,raiseAsyncPostback(c,g,0))}
|
|
function saveSendFE(a,b,c,d,g,f,e){behaviorID=$find("editItemBehavior");f=document.getElementById("liveEditDialog");behaviorID&&(f.style.height="270px",f.src="frmAlertInfoForm"!=a?"/common/modules/sendEmailFE.aspx?formName\x3d"+a.name+"\x26from\x3dcivicalerts\x26warning\x3d"+b+"\x26moduleName\x3d"+c+"\x26status\x3d"+d+"\x26ItemId\x3d"+e+"\x26updatePanelId\x3d"+g:"/common/modules/sendEmailFE.aspx?formName\x3d"+a.name+"\x26title\x3d"+c+"\x26from\x3dcivicalerts\x26moduleName\x3d"+c+"\x26status\x3d"+
|
|
d+"\x26ItemId\x3d"+e+"\x26updatePanelId\x3d"+g,f.style.display="block",behaviorID.show())}function CivicAlertChangeOrder(a,b,c,d){var g=document.aspnetForm;g.strActionFE.value="CivicAlertItemOrder";g.ysnSaveFE.value=1;g.lngCivicAlertItemID.value=c;g.lngCivicAlertCategoryID.value=d;g.txtOrderDirection.value=a;raiseAsyncPostback(b,d,0)}
|
|
function openEditWindowNewsFlash(a,b,c,d,g){if(behavior=$find("editItemBehavior")){var f=document.getElementById("liveEditDialog");f.style.height="530px";var e=$("#hdnModuleID").val();a="/common/modules/CivicAlerts/CivicAlertLiveEdit.aspx?lngCivicAlertCategoryID\x3d"+a+"\x26lngCivicAlertItemID\x3d"+b+"\x26updatePanelID\x3d"+g+"\x26Order\x3d"+d+"\x26moduleID\x3d"+e;f.src=c?a+"\x26strPage\x3ditemCopy":a+"\x26strPage\x3ditemForm";f.style.display="block";behavior.show()}}
|
|
function CivicAlertSearch(){1<document.frmCivicAlertSearch.length&&document.frmCivicAlertSearch[0].parentElement.removeChild(document.frmCivicAlertSearch[0]);document.frmCivicAlertSearch.searchTerms||$(document.frmCivicAlertSearch).append($('\x3cinput type\x3d"hidden" name\x3d"searchTerms" value\x3d""\x3e'));document.frmCivicAlertSearch.CID||$(document.frmCivicAlertSearch).append($('\x3cinput type\x3d"hidden" name\x3d"CID" value\x3d""\x3e'));document.frmCivicAlertSearch.CID.value=document.aspnetForm.CID.value;
|
|
document.frmCivicAlertSearch.searchTerms.value=document.aspnetForm.searchTerms.value;document.frmCivicAlertSearch.submit()}
|
|
function DetailFormSaveFE(a,b,c,d,g){var f=document.frmAlertInfo;f.__VIEWSTATE.value="";f.action="CivicAlertLiveEdit.aspx";f.frmFrontEndSave.value=1;f.ysnSave.value=1;f.CivicAlertIDFE.value=a;f.updatePanelID.value=c;f.CivicAlertCategoryIDFE.value=b;f.ContainerIDFE.value=a;"True"==d&&(f.lngCivicAlertCategoryIDFE.value=f.lngCivicAlertCategoryID.options[f.lngCivicAlertCategoryID.selectedIndex].value);SaveAlertDetails(g)}
|
|
function SaveAndPublishAlertFE(a,b,c,d,g,f){var e=document.frmAlertInfo;e.action="CivicAlertLiveEdit.aspx";e.frmFrontEndSave.value=1;e.ysnSave.value=1;e.CivicAlertIDFE.value=a;e.updatePanelID.value=c;e.CivicAlertCategoryIDFE.value=b;e.ContainerIDFE.value=a;"True"==d&&(e.lngCivicAlertCategoryIDFE.value=e.lngCivicAlertCategoryID.options[e.lngCivicAlertCategoryID.selectedIndex].value);if(CheckValues(f)){if(hasNotifyMeList())return SaveAndSendAlertFE(g,e.dtiBeginningDate.value,f),!1;document.getElementById("btnCancel").disabled=
|
|
!0;try{document.getElementById("btnSaveAlertDetails").disabled=!0}catch(k){}try{document.getElementById("btnSaveAndPublishAlertDetails").disabled=!0}catch(h){}try{document.getElementById("btnSaveAndSubmitAlertDetails").disabled=!0}catch(l){}e.ysnPublishDetail.value=1;e.submit()}}function SaveAndSendAlertFE(a,b,c){if(CheckValues(c))return SaveAndSendFE(a,b),!1}
|
|
function SaveAndPublishAlertDetailsFE(a,b,c,d,g,f){var e=document.frmAlertInfo;e.action="CivicAlertLiveEdit.aspx";e.frmFrontEndSave.value=1;e.ysnSave.value=1;e.CivicAlertIDFE.value=a;e.updatePanelID.value=c;e.CivicAlertCategoryIDFE.value=b;e.ContainerIDFE.value=a;"True"==d&&(e.lngCivicAlertCategoryIDFE.value=e.lngCivicAlertCategoryID.options[e.lngCivicAlertCategoryID.selectedIndex].value);if(CheckValues(f)){if(hasNotifyMeList())return sendEmailFE(e.name,g,"civicalerts",b,c);document.getElementById("btnCancel").disabled=
|
|
!0;try{document.getElementById("btnSaveAlertDetails").disabled=!0}catch(k){}try{document.getElementById("btnSaveAndPublishAlertDetails").disabled=!0}catch(h){}try{document.getElementById("btnSaveAndSubmitAlertDetails").disabled=!0}catch(l){}e.ysnPublishDetail.value=1;e.submit()}}
|
|
function SaveAndSubmitAlertDetailsFE(a,b,c,d,g){var f=document.frmAlertInfo;f.action="CivicAlertLiveEdit.aspx";f.frmFrontEndSave.value=1;f.ysnSave.value=1;f.CivicAlertIDFE.value=a;f.updatePanelID.value=c;f.CivicAlertCategoryIDFE.value=b;f.ContainerIDFE.value=a;"True"==d&&(f.lngCivicAlertCategoryIDFE.value=f.lngCivicAlertCategoryID.options[f.lngCivicAlertCategoryID.selectedIndex].value);if(CheckValues(g)){document.getElementById("btnCancel").disabled=!0;try{document.getElementById("btnSaveAlertDetails").disabled=
|
|
!0}catch(e){}try{document.getElementById("btnSaveAndSubmitAlertDetails").disabled=!0}catch(k){}f.ysnSubmitDetail.value=1;f.submit()}}function hasNotifyMeList(){var a=document.getElementById("divHasNotifyMeList");return a&&"true"==a.innerHTML}
|
|
function SaveAlertDetails(a){if(CheckValues(a)){a=!0;(0>=document.frmAlertDetail.lngCivicAlertID.value||10==document.frmAlertInfo.lngStatus.value)&&1==document.frmAlertInfo.rAddItemRSS.value?a=!1:0<document.frmAlertDetail.lngCivicAlertID.value&&1==document.frmAlertInfo.rModifyItemRSS.value?a=!1:(0>=document.frmAlertDetail.lngCivicAlertID.value||10==document.frmAlertInfo.lngStatus.value)&&2==document.frmAlertInfo.rAddItemRSS.value?a=confirm("Would you like to include this in the RSS feed? Click OK to include it. Click Cancel to exclude it."):
|
|
0<document.frmAlertDetail.lngCivicAlertID.value&&2==document.frmAlertInfo.rModifyItemRSS.value&&(a=confirm("Would you like to include this in the RSS feed? Click OK to include it. Click Cancel to exclude it."));document.frmAlertDetail.hConfirmRebuilt.value=a;document.getElementById("btnCancel").disabled=!0;document.getElementById("btnSaveAlertDetails").disabled=!0;try{document.getElementById("btnSaveAndPublishAlertDetails").disabled=!0}catch(b){}try{document.getElementById("btnSaveAndSubmitAlertDetails").disabled=
|
|
!0}catch(c){}document.frmAlertInfo.submit()}}
|
|
function CheckValues(a){var b=new dateValidator;b.ysnAllowEqualDates=!0;b.setStartDate(document.frmAlertInfo.dtiBeginningDate.value);b.ysnStartDateRequired=!0;b.setEndDate(document.frmAlertInfo.dtiEndingDate.value);b.ysnEndDateRequired=a;if(!b.dateOrderValidateNew())return b.error?alert(b.error):alert("An unknown error occurred processing date information."),!1;document.frmAlertInfo.txtTitle.value=TrimString(document.frmAlertInfo.txtTitle.value);if(FieldIsEmpty(document.frmAlertInfo.txtTitle.value))return alert("Please enter a title."),!1;
|
|
if(100<SQLSafe(document.frmAlertInfo.txtTitle.value).length)return alert("The title is too long."),!1;a=document.frmAlertInfo.txtTitle.value.split(" ");for(b=0;b<a.length;b++)if(30<a[b].length)return alert("The title contains more than 30 continuous characters."),!1;if(!FieldIsEmpty(document.frmAlertInfo.txtAlternateURL.value))if(isValidURL(document.frmAlertInfo.txtAlternateURL.value)){if(255<document.frmAlertInfo.txtAlternateURL.value.length)return alert("Alternate Link may only be 255 characters long."),
|
|
!1}else return alert("All URLs must begin with /, http:// , https:// , or ftp://"),!1;document.frmAlertInfo.txtBriefDescription.value=TrimString(document.frmAlertInfo.txtBriefDescription.value);return 255<document.frmAlertInfo.txtBriefDescription.value.length?(alert("Brief Description may only be 255 characters long."),!1):!0}function FieldIsEmpty(a){return 0==a.replace(/^\s+/g,"").replace(/\s+$/g,"").length}
|
|
function isValidURL(a){a=TrimString(a);if(FieldIsEmpty(a))return!1;a=a.toLowerCase();return"/"==a.substr(0,1)&&1<a.length||"ftp://"==a.substr(0,6)&&6<a.length||"http://"==a.substr(0,7)&&7<a.length||"https://"==a.substr(0,8)&&8<a.length}function MarkupText(a){return a.replace(/\n\n/g,"\x3cP\x3e").replace(/\n/g,"\x3cBR\x3e")}
|
|
function publishItemFE(a,b,c){var d=document.frmAlertInfo;try{document.getElementById("btnCancel").disabled=!0}catch(g){}try{document.getElementById("btnSaveAlertDetails").disabled=!0}catch(f){}try{document.getElementById("btnSaveAndPublishAlertDetails").disabled=!0}catch(e){}d.ysnSave.value=1;d.ysnSend.value=a;d.ysnSendAtStart.value=b;d.ysnSendBeforeDays.value=c;d==document.frmAlertInfo?d.ysnPublishDetail.value=1:d.strPage.value="CivicAlertItemPublish";d.submit()}
|
|
window.NEWSLE||(NEWSLE=function(){},window.NEWSLE=NEWSLE);function raiseAsyncPostback(a,b,c){c&&closeModalDialog("editItemBehavior");void 0===blockMenuSpawn?$.getScript("/Assets/Scripts/LiveEdit.js",init(a,b)):init(a,b)}function init(a,b){blockMenuSpawn=!0;newsItemHideMenu();newsCategoryHideMenu();__doPostBack(a,b)}
|
|
function newsActionsInit(){NEWSLE.updatePanelID="";NEWSLE.itemID=0;NEWSLE.categoryID=0;NEWSLE.counter=0;NEWSLE.order=0;NEWSLE.status=0;NEWSLE.rights=0;NEWSLE.startDate="";NEWSLE.elemLiveEditBullpen=$get("newsLiveEditBullpen");NEWSLE.elemTooltip=$get("newsLiveEditToolTip");window.showToolTip||(NEWSLE.elemTooltip.style.display="none");NEWSLE.elemCatMenu=$get("newsCategoryLiveEditMoreActions");NEWSLE.elemCatActionNew=$get("newsCategoryNewItem");hookAnchorClick(NEWSLE.elemCatActionNew,function(a,b){newsCategoryHideMenu();
|
|
var c=(NEWSLE.updatePanelID+"").trim();"search"==c||""==c?openEditWindowNewsFlash(NEWSLE.categoryID,0,1,0,"search"):openEditWindowNewsFlash(NEWSLE.categoryID,0,0,0,NEWSLE.updatePanelID)});NEWSLE.elemItemMenu=$get("newsItemLiveEditMoreActions");NEWSLE.elemItemMoveHeading=$get("newsItemMoveHeading");NEWSLE.elemItemActionMoveUpIcon=$get("newsItemMoveUpIcon");NEWSLE.elemItemActionMoveDownIcon=$get("newsItemMoveDownIcon");NEWSLE.elemItemActionModify=$get("newsItemModify");NEWSLE.elemItemActionCommands=
|
|
$get("newsItemCommands");hookAnchorClick(NEWSLE.elemItemActionModify,function(a,b){NEWSLE.elemItemActionModify.inactive||(newsItemHideMenu(),openEditWindowNewsFlash(NEWSLE.categoryID,NEWSLE.itemID,0,-1,NEWSLE.updatePanelID))});NEWSLE.elemItemActionMoveUp=$get("newsItemMoveUp");hookAnchorClick(NEWSLE.elemItemActionMoveUp,function(a,b){NEWSLE.elemItemActionMoveUp.inactive||(newsItemHideMenu(),CivicAlertChangeOrder("up",NEWSLE.updatePanelID,NEWSLE.itemID,NEWSLE.categoryID))});NEWSLE.elemItemActionMoveDown=
|
|
$get("newsItemMoveDown");hookAnchorClick(NEWSLE.elemItemActionMoveDown,function(a,b){NEWSLE.elemItemActionMoveDown.inactive||(newsItemHideMenu(),CivicAlertChangeOrder("down",NEWSLE.updatePanelID,NEWSLE.itemID,NEWSLE.categoryID))});NEWSLE.status="pending";NEWSLE.elemItemActionCopyLink=$get("newsItemCopyLink");hookAnchorClick(NEWSLE.elemItemActionCopyLink,function(a,b){CivicAlertItemActions(a,"Link",NEWSLE.updatePanelID,NEWSLE.itemID,NEWSLE.categoryID,NEWSLE.status)});NEWSLE.elemItemActionUnpublish=
|
|
$get("newsItemUnpublish");hookAnchorClick(NEWSLE.elemItemActionUnpublish,function(a,b){newsItemHideMenu();CivicAlertItemActions(a,"Unpublish",NEWSLE.updatePanelID,NEWSLE.itemID,NEWSLE.categoryID,NEWSLE.status)});NEWSLE.elemItemActionPublish=$get("newsItemPublish");hookAnchorClick(NEWSLE.elemItemActionPublish,function(a,b){var c=!0;1==document.getElementById("rAddItemRSS_"+NEWSLE.categoryID).value?c=!1:2==document.getElementById("rAddItemRSS_"+NEWSLE.categoryID).value&&(c=confirm("Would you like to include this in the RSS feed? Click OK to include it. Click Cancel to exclude it."));
|
|
document.aspnetForm.hConfirmRebuilt.value=c;newsItemHideMenu();var c="LiveEdit_"+NEWSLE.updatePanelID+"_"+NEWSLE.itemID+"_"+NEWSLE.categoryID+"_"+NEWSLE.status,d=$("#alertTitle_"+NEWSLE.itemID).text(),d=d.replace(/^\[[A-Z]*\] /g,"");setUpNotifyMePopUpFrontEnd(NEWSLE.categoryID,d,c)});NEWSLE.elemItemActionSubmit=$get("newsItemSubmit");hookAnchorClick(NEWSLE.elemItemActionSubmit,function(a,b){newsItemHideMenu();CivicAlertItemActions(a,"Submit",NEWSLE.updatePanelID,NEWSLE.itemID,NEWSLE.categoryID,NEWSLE.status)});
|
|
NEWSLE.elemItemActionCopy=$get("newsItemCopy");hookAnchorClick(NEWSLE.elemItemActionCopy,function(a,b){newsItemHideMenu();0<NEWSLE.counter?openEditWindowNewsFlash(NEWSLE.categoryID,NEWSLE.itemID,1,-1,"copy"):openEditWindowNewsFlash(NEWSLE.categoryID,NEWSLE.itemID,1,-1,"search")});NEWSLE.elemItemActionArchive=$get("newsItemArchive");hookAnchorClick(NEWSLE.elemItemActionArchive,function(a,b){newsItemHideMenu();CivicAlertItemActions(a,"ArchiveHidden",NEWSLE.updatePanelID,NEWSLE.itemID,NEWSLE.categoryID,
|
|
NEWSLE.status)});NEWSLE.elemItemActionDelete=$get("newsItemDelete");hookAnchorClick(NEWSLE.elemItemActionDelete,function(a,b){newsItemHideMenu();CivicAlertItemActions(a,"Delete",NEWSLE.updatePanelID,NEWSLE.itemID,NEWSLE.categoryID,NEWSLE.status)});NEWSLE.elemItemActionNewAnchor=$get("newsItemNewItemAnchor");NEWSLE.elemItemActionNew=$get("newsItemNewItem");hookAnchorClick(NEWSLE.elemItemActionNew,function(a,b){NEWSLE.elemItemActionNew.inactive||(newsItemHideMenu(),openEditWindowNewsFlash(NEWSLE.categoryID,
|
|
0,0,NEWSLE.order,NEWSLE.updatePanelID))});NEWSLE.elemItemActionReject=$get("newsItemReject");hookAnchorClick(NEWSLE.elemItemActionReject,function(a,b){newsItemHideMenu();CivicAlertItemActions(a,"Reject",NEWSLE.updatePanelID,NEWSLE.itemID,NEWSLE.categoryID,NEWSLE.status)})}function setUpNotifyMePopUpFrontEnd(a,b,c){var d=$find("editItemBehavior"),g=document.getElementById("liveEditDialog");openNotifyMePopUpFrontEnd(a,document.aspnetForm.name,d,g,b,c);document.body.style.cursor="default"}
|
|
function openNotifyMePopUpFrontEnd(a,b,c,d,g,f){c&&(d.style.height="310px",d.src="/Common/Admin/SendEmailBE.aspx?formName\x3d"+b+"\x26catId\x3d"+a+"\x26title\x3d"+g+"\x26from\x3dcivicalerts\x26moduleName\x3dalert\x26comingFrom\x3d"+f,d.style.display="block",c.show(),window.setModalTitle("News Flash"))}
|
|
function notifyMePopUpCallBack(a,b){var c=b.split("_");switch(c[0]){case "LiveEdit":CivicAlertItemActions(null,"Publish",c[1],c[2],c[3],c[4]);break;default:alert("Not callback provided to handle notifyme")}closeModalDialog("editItemBehavior")}
|
|
function newsCategoryHideMenu(){var a="LiveEditControl_"+NEWSLE.categoryID,b=$get(a),c="true"==getCookieValue("showLiveEditControls");b&&(resolveLiveEditContainer(b).style.zIndex=0,newsHideTooltip(a),c||(b.style.display="none"),NEWSLE.elemCatMenu.style.display="none",NEWSLE.elemCatMenu.parentNode&&(NEWSLE.elemCatMenu.parentNode.removeChild(NEWSLE.elemCatMenu),NEWSLE.elemLiveEditBullpen.appendChild(NEWSLE.elemCatMenu)))}
|
|
function newsItemHideMenu(){var a="LiveEditControl1_"+NEWSLE.itemID,b=$get(a),c="true"==getCookieValue("showLiveEditControls");b&&(resolveLiveEditContainer(b).style.zIndex=0,NEWSLE.elemItemMenu.style.display="none",NEWSLE.elemItemMenu.parentNode&&(NEWSLE.elemItemMenu.parentNode.removeChild(NEWSLE.elemItemMenu),NEWSLE.elemLiveEditBullpen.appendChild(NEWSLE.elemItemMenu)),newsHideTooltip(a),c||(b.style.display="none"))}
|
|
function newsItemMouseOver(a,b,c){blockMenuSpawn||(NEWSLE.itemID=c,a="LiveEditControl1_"+c,b=$get(a),"true"!=getCookieValue("showLiveEditControls")&&(previousKAMControl&&(previousKAMControl.style.display="none"),previousKAMControl=b),resolveLiveEditContainer(b).style.zIndex=2,b.appendChild(NEWSLE.elemItemMenu),newsShowTooltip(a),b.style.display="block")}function newsItemMouseOut(a,b){b=window.event?window.event:b;elemInsideOrEq(a,b.toElement?b.toElement:b.relatedTarget)||newsItemHideMenu()}
|
|
function newsCategoryMouseOver(a,b,c){blockMenuSpawn||(NEWSLE.categoryID=c,a="LiveEditControl_"+c,b=$get(a),"true"!=getCookieValue("showLiveEditControls")&&(previousKAMControl&&(previousKAMControl.style.display="none"),previousKAMControl=b),b.appendChild(NEWSLE.elemCatMenu),resolveLiveEditContainer(b).style.zIndex=2,newsShowTooltip(a),b.style.display="block")}
|
|
function newsCategoryMouseOut(a,b){b=window.event?window.event:b;elemInsideOrEq(a,b.toElement?b.toElement:b.relatedTarget)||newsCategoryHideMenu()}function newsHideTooltip(a){$get(a);NEWSLE.elemTooltip.parentNode&&NEWSLE.elemTooltip.parentNode.removeChild(NEWSLE.elemTooltip);NEWSLE.elemTooltip.style.display="none"}function newsShowTooltip(a){$get(a).appendChild(NEWSLE.elemTooltip);NEWSLE.elemTooltip&&(NEWSLE.elemTooltip.style.display=showToolTip?"block":"none")}
|
|
function newsActionsCategory(a,b,c,d,g){NEWSLE.updatePanelID=c;NEWSLE.itemID=0;NEWSLE.categoryID=a;NEWSLE.counter=0;NEWSLE.status=d;NEWSLE.rights=g;liveEditCommonCategory($get(b),NEWSLE.elemTooltip,NEWSLE.elemCatMenu,$get("LiveEditControl_"+a),"newsCategoryLiveEditMoreActions")}
|
|
function newsActionsItem(a,b,c,d,g,f,e,k){var h=GetQueryStringParameter("CID");if("-1"!=h&&""!=h&&h!=c)alert("This is a Related News Flash. There are no actions available through Live Edit.");else{NEWSLE.updatePanelID=b;NEWSLE.categoryID=c;NEWSLE.itemID=a;NEWSLE.counter=g;NEWSLE.order=d;NEWSLE.status=f;NEWSLE.rights=e;NEWSLE.lastItem=k;e>=PUBLISHER||e==AUTHOR&&f<MIN_PUBLISHED?(NEWSLE.elemItemActionModify.className="big modify",NEWSLE.elemItemActionModify.title="",NEWSLE.elemItemActionModify.inactive=
|
|
!1):(NEWSLE.elemItemActionModify.className="big modify inactive",NEWSLE.elemItemActionModify.title="You do not have rights to modify this item.",NEWSLE.elemItemActionModify.inactive=!0);b=e>AUTHOR?"inline":"none";NEWSLE.elemItemMoveHeading.style.display=b;NEWSLE.elemItemActionMoveUp.style.display=b;NEWSLE.elemItemActionMoveDown.style.display=b;if(e>AUTHOR){if(0>g){NEWSLE.elemItemActionMoveUp.className="moveUp inactive";NEWSLE.elemItemActionMoveUp.inactive=!0;NEWSLE.elemItemActionMoveDown.className=
|
|
"moveDown inactive";NEWSLE.elemItemActionMoveDown.inactive=!0;switch(g){case -2:b="Can only move items from module page.";break;default:b="Can't move items on the search page."}NEWSLE.elemItemActionMoveUpIcon.src="/App_Themes/CP/Images/IconMoveUpInactive.png";NEWSLE.elemItemActionMoveDownIcon.src="/App_Themes/CP/Images/IconMoveDownInactive.png";NEWSLE.elemItemActionMoveUpIcon.title=b;NEWSLE.elemItemActionMoveUpIcon.alt=b}else 1==g?(b="This item is first in the list and can't be moved any higher.",
|
|
NEWSLE.elemItemActionMoveUpIcon.src="/App_Themes/CP/Images/IconMoveUpInactive.png",NEWSLE.elemItemActionMoveUp.className="moveUp inactive",NEWSLE.elemItemActionMoveUp.alt="This item is first in the list and can't be moved any higher.",NEWSLE.elemItemActionMoveUp.inactive=!0):(b="Move Up",NEWSLE.elemItemActionMoveUpIcon.src="/App_Themes/CP/Images/IconMoveUp.png",NEWSLE.elemItemActionMoveUp.className="moveUp",NEWSLE.elemItemActionMoveUp.inactive=!1),NEWSLE.elemItemActionMoveUpIcon.title=b,NEWSLE.elemItemActionMoveUpIcon.alt=
|
|
b,k?(b="This item is last in the list and can't be moved any lower.",NEWSLE.elemItemActionMoveDownIcon.src="/App_Themes/CP/Images/IconMoveDownInactive.png",NEWSLE.elemItemActionMoveDown.className="moveDown inactive",NEWSLE.elemItemActionMoveDown.inactive=!0):(b="Move Down",NEWSLE.elemItemActionMoveDownIcon.src="/App_Themes/CP/Images/IconMoveDown.png",NEWSLE.elemItemActionMoveDown.className="moveDown",NEWSLE.elemItemActionMoveDown.inactive=!1);NEWSLE.elemItemActionMoveDownIcon.title=b;NEWSLE.elemItemActionMoveDownIcon.alt=
|
|
b}NEWSLE.elemItemActionSubmit.style.display="none";NEWSLE.elemItemActionReject.style.display="none";NEWSLE.elemItemActionPublish.style.display="none";NEWSLE.elemItemActionUnpublish.style.display="none";e>AUTHOR?(f>MAX_DRAFT?NEWSLE.elemItemActionUnpublish.style.display="":NEWSLE.elemItemActionPublish.style.display="",f==SUBMITTED&&(NEWSLE.elemItemActionReject.style.display="")):f!=SUBMITTED&&f<=MAX_DRAFT&&(NEWSLE.elemItemActionSubmit.style.display="");NEWSLE.elemItemActionArchive.style.display="none";
|
|
NEWSLE.elemItemActionDelete.style.display="none";e>AUTHOR?f>MAX_DRAFT?NEWSLE.elemItemActionArchive.style.display="":NEWSLE.elemItemActionDelete.style.display="":f<=MAX_DRAFT&&(NEWSLE.elemItemActionDelete.style.display="");0<g?e>=AUTHOR?(NEWSLE.elemItemActionNew.style.display="",NEWSLE.elemItemActionNewAnchor.title="",NEWSLE.elemItemActionNewAnchor.className="addItem",NEWSLE.elemItemActionNew.inactive=!1):NEWSLE.elemItemActionNew.style.display="none":-2<g?(NEWSLE.elemItemActionNew.style.display="",
|
|
NEWSLE.elemItemActionNewAnchor.title="You cannot add item on search screen.",NEWSLE.elemItemActionNewAnchor.className="addItem inactive",NEWSLE.elemItemActionNew.inactive=!0):NEWSLE.elemItemActionNew.style.display="none";g=NEWSLE.elemItemActionCommands.firstChild;for(f=0;null!=g;)1==g.nodeType&&"none"!=g.style.display&&(g.className=0==++f%2?"even":""),g=g.nextSibling;liveEditCommonItem(NEWSLE.elemTooltip,NEWSLE.elemItemMenu,$get("LiveEditControl1_"+a),"newsItemLiveEditMoreActions",!1)}}
|
|
function ChangePage(a,b,c){raiseAsyncPostback(c+b,a,!1)}; |