Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- COMPOSE PAGE TIMED OUT
- HTTP/1.0 302 Moved Temporarily
- Date: Sun, 01 Jul 2012 09:11:51 GMT
- Content-Type: text/html; charset=utf-8
- Expires: Tue, 24 Jan 2000 20:46:50 GMT
- Cache-Control: no-store, no-cache, must-revalidate, max-age=0
- Pragma: no-cache
- Content-Language: en-US
- Location: http://sz0116.wc.mail.comcast.net/zimbra/h/search?view=compose&view=compose&mesg=welcome&initial=true&app=
- Content-Length: 0
- Connection: keep-alive
- COMPOSE PAGE TIMED OUT
- HTTP/1.0 302 Moved Temporarily
- Date: Sun, 01 Jul 2012 09:13:43 GMT
- Content-Type: text/html; charset=utf-8
- Expires: Tue, 24 Jan 2000 20:46:50 GMT
- Cache-Control: no-store, no-cache, must-revalidate, max-age=0
- Pragma: no-cache
- Content-Language: en-US
- Location: http://sz0065.ev.mail.comcast.net/zimbra/h/search?view=compose&view=compose&mesg=welcome&initial=true&app=
- Content-Length: 0
- EMAIL RESPONSE TIMED OUT
- HTTP/1.0 200 OK
- Date: Sun, 01 Jul 2012 09:28:41 GMT
- Content-Type: text/javascript; charset=utf-8
- Content-Length: 210
- Connection: keep-alive
- {"Header":{"context":{"session":{"id":"13303993","_content":"13303993"},"change":{"token":1625900},"_jsns":"urn:zimbra"}},"Body":{"SendMsgResponse":{"m":[{}],"_jsns":"urn:zimbraMail"}},"_jsns":"urn:zimbraSoap"}
- CONTACT FETCH TIMED OUT
- HTTP/1.0 302 Moved Temporarily
- Date: Sun, 01 Jul 2012 09:28:10 GMT
- Server: Apache
- Cache-Control: no-cache, must-revalidate
- Expires: Mon, 26 Jul 1997 05:00:00 GMT
- Location: http://www.comcast.net/errors/unauthorized
- Content-Length: 0
- Content-Type: text/html
- Connection: keep-alive
- COMPOSE PAGE TIMED OUT
- HTTP/1.0 302 Moved Temporarily
- Date: Sun, 01 Jul 2012 09:29:00 GMT
- Content-Type: text/html; charset=utf-8
- Expires: Tue, 24 Jan 2000 20:46:50 GMT
- Cache-Control: no-store, no-cache, must-revalidate, max-age=0
- Pragma: no-cache
- Content-Language: en-US
- Location: http://sz0152.wc.mail.comcast.net/zimbra/h/search?view=compose&view=compose&mesg=welcome&initial=true&app=
- Content-Length: 0
- Connection: keep-alive
- EMAIL RESPONSE TIMED OUT
- HTTP/1.0 200 OK
- Date: Sun, 01 Jul 2012 09:29:10 GMT
- Content-Type: text/html; charset=utf-8
- Expires: Tue, 24 Jan 2000 17:46:50 GMT
- Cache-Control: no-store, no-cache, must-revalidate, max-age=0
- Pragma: no-cache
- Content-Language: en-US
- Content-Encoding: gzip
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <!--
- launchZCS.jsp
- * ***** BEGIN LICENSE BLOCK *****
- * Zimbra Collaboration Suite Web Client
- * Copyright (C) 2007, 2008, 2009, 2010 Zimbra, Inc.
- *
- * The contents of this file are subject to the Zimbra Public License
- * Version 1.3 ("License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.zimbra.com/license.
- *
- * Software distributed under the License is distributed on an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
- * ***** END LICENSE BLOCK *****
- -->
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- <title>XFINITY Connect</title>
- <link href="/zimbra/css/images,common,dwt,msgview,login,zm,spellcheck,wiki,skin.css?v=110527090709&debug=&skin=velodrome2&locale=en_US" rel="stylesheet" type="text/css" />
- <link rel="SHORTCUT ICON" href="/zimbra/img/logo/favicon.ico">
- <script>
- appContextPath = "/zimbra";
- appCurrentSkin = "velodrome2";
- appExtension = ".zgz";
- appDevMode = false;
- function purl(name, temp_string ) {
- name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
- var regexS = "[\\?&]"+name+"=([^&#]*)";
- var regex = new RegExp( regexS );
- var results = regex.exec( temp_string );
- if( results == null )
- return "";
- else
- return results[1];
- }
- function update_prefs_cookie ( old_cookie_name, new_cookie_name ) {
- var results_new = document.cookie.match ( '(^|;) ?' + new_cookie_name + '=([^;]*)(;|$)' );
- if (results_new) {
- var results_old = document.cookie.match ( '(^|;) ?' + old_cookie_name + '=([^;]*)(;|$)' );
- if (results_old) {
- var old_cookie_temp = unescape(results_old[2]);
- old_cookie_temp = old_cookie_temp.replace(old_cookie_temp.match("&adt_user_guid=\"\""),"");
- old_cookie_temp = old_cookie_temp.replace(old_cookie_temp.match("&adt_user_guid="),"");
- old_cookie_temp = old_cookie_temp.replace(old_cookie_temp.match("&adt_zip=\"\""),"");
- old_cookie_temp = old_cookie_temp.replace(old_cookie_temp.match("&adt_zip=%22%22"),"");
- old_cookie_temp = old_cookie_temp.replace(old_cookie_temp.match("&adt_zip="),"");
- }
- else {
- var old_cookie_temp = "";
- }
- var adt_zip = purl("zip", (unescape(results_new[2])));
- var ad_user_guid = purl("tid", (unescape(results_new[2])));
- //Delete old cookie
- document.cookie = old_cookie_name + '=""; path=/; domain=.comcast.net; expires=Thu, 01-Jan-1970 00:00:01 GMT';
- //Re-write new cookie
- if (old_cookie_temp) {
- old_cookie_temp += "&adt_zip=\"" + adt_zip + "\"&adt_user_guid=\"" + ad_user_guid + "\"";
- }
- else {
- old_cookie_temp = "adt_zip=\"" + adt_zip + "\"&adt_user_guid=\"" + ad_user_guid + "\"";
- }
- var d = new Date();
- d.setDate(d.getDate()+1000)
- var cd = d.toGMTString();
- document.cookie = old_cookie_name + '=' + old_cookie_temp+'; path=/; domain=.comcast.net; expires='+cd;
- var zip_array = new Array("zip", adt_zip);
- return zip_array;
- }
- else {
- return null;
- }
- }
- </script>
- <script type="text/javascript">
- // <![CDATA[
- var f_ADTARGET_ZIP = (function() {
- var zip_matches = document.cookie.match(/adt_zip=\"(.*?)\"/);
- if(!zip_matches)
- zip_matches = document.cookie.match(/adt_zip=%22(.*?)%22/);
- if (!zip_matches)
- zip_matches = update_prefs_cookie("prefs", "MYPORTAL");
- var flag_matches = document.cookie.match(/adt_optout_flag=(true|false)/);
- if(flag_matches && flag_matches[1]=="true") {
- return "US:UNKNOWN";
- } else {
- if(zip_matches) {
- return "US:"+zip_matches[1];
- } else return "US:UNKNOWN";
- }
- })();
- document['f_ADTARGET_ZIP'] = f_ADTARGET_ZIP;
- // ]]>
- </script>
- <noscript>
- <meta http-equiv="Refresh" content="0;url=public/noscript.jsp" >
- </noscript>
- </head>
- <body>
- <!--
- ***** BEGIN LICENSE BLOCK *****
- Zimbra Collaboration Suite Web Client
- Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Zimbra, Inc.
- The contents of this file are subject to the Zimbra Public License
- Version 1.3 ("License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.zimbra.com/license.
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
- ***** END LICENSE BLOCK *****
- -->
- <script type="text/javascript" src="/zimbra/res/I18nMsg,AjxMsg,ZMsg,ZmMsg,AjxKeys,ZmKeys,ZdMsg,AjxTemplateMsg.js.zgz?v=110527090709&skin=velodrome2"></script>
- <!-- image overlays and masks -->
- <script>
- if (!window.AjxImgData) AjxImgData = {};
- AjxImgData["ImgCalendarFolderOverlay"]={t:0,l:0,w:16,h:16,f:"@AppContextPath@/img/overlays/ImgCalendarFolderOverlay.png"};
- AjxImgData["ImgContactsFolderOverlay"]={t:0,l:0,w:14,h:16,f:"@AppContextPath@/img/overlays/ImgContactsFolderOverlay.png"};
- AjxImgData["ImgEmailedContactsOverlay"]={t:0,l:0,w:16,h:16,f:"@AppContextPath@/img/overlays/ImgEmailedContactsOverlay.png"};
- AjxImgData["ImgFolderOverlay"]={t:0,l:0,w:16,h:14,f:"@AppContextPath@/img/overlays/ImgFolderOverlay.png"};
- AjxImgData["ImgInboxOverlay"]={t:0,l:0,w:16,h:16,f:"@AppContextPath@/img/overlays/ImgInboxOverlay.png"};
- AjxImgData["ImgMailFolderOverlay"]={t:0,l:0,w:16,h:18,f:"@AppContextPath@/img/overlays/ImgMailFolderOverlay.png"};
- AjxImgData["ImgNotebookOverlay"]={t:0,l:0,w:16,h:15,f:"@AppContextPath@/img/overlays/ImgNotebookOverlay.png"};
- AjxImgData["ImgRSSOverlay"]={t:0,l:0,w:16,h:16,f:"@AppContextPath@/img/overlays/ImgRSSOverlay.png"};
- AjxImgData["ImgSectionOverlay"]={t:0,l:0,w:16,h:16,f:"@AppContextPath@/img/overlays/ImgSectionOverlay.png"};
- AjxImgData["ImgSentFolderOverlay"]={t:0,l:0,w:16,h:18,f:"@AppContextPath@/img/overlays/ImgSentFolderOverlay.png"};
- AjxImgData["ImgSharedCalendarFolderOverlay"]={t:0,l:0,w:16,h:15,f:"@AppContextPath@/img/overlays/ImgSharedCalendarFolderOverlay.png"};
- AjxImgData["ImgSharedContactsFolderOverlay"]={t:0,l:0,w:16,h:17,f:"@AppContextPath@/img/overlays/ImgSharedContactsFolderOverlay.png"};
- AjxImgData["ImgSharedMailFolderOverlay"]={t:0,l:0,w:16,h:17,f:"@AppContextPath@/img/overlays/ImgSharedMailFolderOverlay.png"};
- AjxImgData["ImgSharedNotebookOverlay"]={t:0,l:0,w:16,h:16,f:"@AppContextPath@/img/overlays/ImgSharedNotebookOverlay.png"};
- AjxImgData["ImgSharedSectionOverlay"]={t:0,l:0,w:16,h:16,f:"@AppContextPath@/img/overlays/ImgSharedSectionOverlay.png"};
- AjxImgData["ImgSharedTaskListOverlay"]={t:0,l:0,w:16,h:18,f:"@AppContextPath@/img/overlays/ImgSharedTaskListOverlay.png"};
- AjxImgData["ImgTagOverlay"]={t:0,l:0,w:16,h:16,f:"@AppContextPath@/img/overlays/ImgTagOverlay.png"};
- AjxImgData["ImgTaskListOverlay"]={t:0,l:0,w:16,h:16,f:"@AppContextPath@/img/overlays/ImgTaskListOverlay.png"};
- AjxImgData["ImgMailFolderMask"]={t:0,l:0,w:16,h:18,f:"@AppContextPath@/img/mail.gif"};
- AjxImgData["ImgRSSMask"]={t:-354,l:0,w:16,h:16,f:"@AppContextPath@/img/mail.gif"};
- AjxImgData["ImgSharedTaskListMask"]={t:0,l:0,w:16,h:18,f:"@AppContextPath@/img/tasks.gif"};
- AjxImgData["ImgTaskListMask"]={t:-114,l:0,w:16,h:16,f:"@AppContextPath@/img/tasks.gif"};
- AjxImgData["ImgSentFolderMask"]={t:0,l:0,w:16,h:18,f:"@AppContextPath@/img/startup.gif"};
- AjxImgData["ImgSharedMailFolderMask"]={t:-18,l:0,w:16,h:17,f:"@AppContextPath@/img/startup.gif"};
- AjxImgData["ImgInboxMask"]={t:-611,l:0,w:16,h:16,f:"@AppContextPath@/img/startup.gif"};
- AjxImgData["ImgTagMask"]={t:-1491,l:0,w:16,h:16,f:"@AppContextPath@/img/startup.gif"};
- AjxImgData["ImgFolderMask"]={t:-1731,l:0,w:16,h:14,f:"@AppContextPath@/img/startup.gif"};
- AjxImgData["ImgSharedContactsFolderMask"]={t:0,l:0,w:16,h:17,f:"@AppContextPath@/img/contacts.gif"};
- AjxImgData["ImgContactsFolderMask"]={t:-65,l:0,w:14,h:16,f:"@AppContextPath@/img/contacts.gif"};
- AjxImgData["ImgEmailedContactsMask"]={t:-113,l:0,w:16,h:16,f:"@AppContextPath@/img/contacts.gif"};
- AjxImgData["ImgNotebookMask"]={t:-80,l:0,w:16,h:16,f:"@AppContextPath@/img/notes.gif"};
- AjxImgData["ImgSectionMask"]={t:-128,l:0,w:16,h:16,f:"@AppContextPath@/img/notes.gif"};
- AjxImgData["ImgSharedNotebookMask"]={t:-160,l:0,w:16,h:16,f:"@AppContextPath@/img/notes.gif"};
- AjxImgData["ImgSharedSectionMask"]={t:-208,l:0,w:16,h:16,f:"@AppContextPath@/img/notes.gif"};
- AjxImgData["ImgCalendarFolderMask"]={t:-96,l:0,w:16,h:16,f:"@AppContextPath@/img/calendar.gif"};
- AjxImgData["ImgSharedCalendarFolderMask"]={t:-413,l:0,w:15,h:15,f:"@AppContextPath@/img/calendar.gif"};
- if (!window.AjxImgData) AjxImgData = {};
- document.write("<DIV style='display:none'>");
- for (var id in AjxImgData) {
- var data = AjxImgData[id];
- if (data.f) data.f = data.f.replace(/@AppContextPath@/,appContextPath);
- document.write("<IMG id='",id,"' src='",data.d||data.f,"'>");
- }
- document.write("</DIV>");
- </script>
- <!--
- --
- --
- --
- BEGIN SKIN
- --
- --
- --
- -->
- <!--
- - #define GECKO true
- - #define WINDOWS true
- - #define FIREFOX_1_OR_HIGHER true
- - #define FIREFOX_1_5_OR_HIGHER true
- - #define MOZILLA true
- - #define FIREFOX true
- - #define MOZILLA_1_4_OR_HIGHER true
- - #define NAVIGATOR true
- - #define GECKO_1_8_OR_HIGHER true
- -->
- <!--
- - File: zimbra/skins/velodrome2/skin.html
- -->
- <!-- BEGIN SKIN HTML -->
- <script type="text/javascript" src="http://xfinity.comcast.net/js-api/compressed/xpbar.js?version=3&profile=xc&id=xcnavbar"></script>
- <script type="text/javascript">
- document.title=ZmMsg.zimbraTitle;
- </script>
- <div id='skin_outer'>
- <table cellspacing="0" cellpadding="0" width="100%" border="0" height="100%">
- <tr id='skin_R1' class='ImgSkin_Chrome_R1'>
- <td class='ImgSkin_Chrome_R1' colspan="3"></td>
- </tr>
- <tr>
- <td width="100%">
- <table id='skin_table_outer' class='skin_table fixed_table' cellspacing=0 cellpadding=0 border=0>
- <colgroup>
- <col id='skin_col_L'>
- <col id='skin_col_tree'>
- <col id='skin_col_sash'>
- <col id='skin_col_main'>
- <col id='skin_col_R'>
- </colgroup>
- <tr id='skin_R2'>
- <!-- xr-feat-111 -->
- <td>
- <div class='ImgSkin_Chrome_R2'></div>
- </td>
- <td class='ImgSkin_Chrome_R2' colspan=3>
- <table width=100% cellspacing=0 cellpadding=0>
- <tr>
- <td>
- <!-- <div class='ImgSkin_Chrome_Logo' onclick='skin.gotoApp(ZmApp.PORTAL);return false;' style='cursor:pointer;'></div> -->
- <div id='skin_container_quota' class='skin_container'><!-- quota --></div>
- </td>
- <td id='skin_td_search' valign='middle'>
- <div style='position:relative;' align='right'>
- <!-- search box -->
- <div id='skin_container_search' class='skin_container'></div>
- </div>
- </td>
- </tr>
- </table>
- </td>
- <td>
- <div class='ImgSkin_Chrome_R2'></div>
- </td>
- <!-- End xr-feat-111 -->
- </tr>
- <!-- search builder -->
- <tr id='skin_tr_search_builder_toolbar'>
- <td>
- <div class='ImgSkin_Chrome_SB_Toolbar_L'></div>
- </td>
- <td id='skin_td_search_builder_toolbar' class='ImgSkin_Chrome_SB_Toolbar' colspan=3>
- <div id='skin_container_search_builder_toolbar' class='skin_container'>
- <!-- search builder toolbar -->
- </div>
- </td>
- <td>
- <div class='ImgSkin_Chrome_SB_Toolbar_R'></div>
- </td>
- </tr>
- <tr id='skin_tr_search_builder'>
- <td class='ImgSkin_Chrome_SB_L'>
- <div></div>
- </td>
- <td id='skin_td_search_builder' class='ImgSkin_Chrome_SB' colspan=3>
- <div id='skin_container_search_builder' class='skin_container'>
- <!-- search builder -->
- </div>
- </td>
- <td class='ImgSkin_Chrome_SB_R'>
- <div></div>
- </td>
- </tr>
- <!-- end search builder -->
- <tr id='skin_R3'>
- <td>
- <div class='ImgSkin_Chrome_R3_L'></div>
- </td>
- <td class='ImgSkin_Chrome_R3'>
- <div style='position:relative;width:100%;height:100%;'>
- <div id='Xskin_container_current_app' class='skin_container'>
- <table width='100%' height='100%'>
- <tr>
- <td id='skin_td_quota'>
- <!-- <div id='skin_container_quota' class='skin_container'>></div> -->
- </td>
- </tr>
- </table>
- </div>
- </div>
- </td>
- <td class='ImgSkin_Chrome_R3'> </td>
- <td class='ImgSkin_Chrome_R3' style='padding:0px;'>
- <table width='100%' cellspacing=0 cellpadding=0>
- <tr>
- <td id='skin_td_app_chooser'>
- <div id='skin_container_app_chooser' class='skin_container'></div>
- </td>
- </tr>
- </table>
- </td>
- <td>
- <div class='ImgSkin_Chrome_R3_R'></div>
- </td>
- </tr>
- <tr id='skin_tr_main'>
- <td id='skin_td_tree_outer' colspan=2>
- <table id='skin_tree_table' class='skin_table fullSize' cellspacing=0 cellpadding=0>
- <tr>
- <td height='100%' id='skin_td_tree'>
- <div id='skin_container_tree' class='skin_container'></div>
- </td>
- </tr>
- <tr id='skin_tr_tree_footer'>
- <td id='skin_td_tree_footer'>
- <div id='skin_container_tree_footer' class='skin_container'></div>
- </td>
- </tr>
- <tr>
- <td id='skin_td_tree_bottom_ad' height=150>
- <div id='portlet_text'>Loading...</div>
- </td>
- </tr>
- </table>
- </td>
- <td id='skin_td_tree_app_sash'>
- <div class='DwtHorizontalSash ImgHSash' style='height:100%;'>
- <div class='ImgHSash_thumb' style='position:relative;top:50%;'></div>
- </div>
- </td>
- <td id='skin_td_app_outer' colspan=2>
- <table id='skin_app_table' class='skin_table fullSize' cellspacing=0 cellpadding=0>
- <tr>
- <td id='skin_main_toolbar_container' class='skin_td_app_toolbar ImgSkin_Toolbar'>
- <div id='skin_container_app_top_toolbar' class='skin_container'></div>
- </td>
- </tr>
- <tr>
- <td id='skin_td_app'>
- <div id='skin_container_app_main' class='skin_container'></div>
- </td>
- </tr>
- </table>
- </td>
- <td></td>
- </tr>
- <tr id='skin_tr_main_full' style='display:none'>
- <td id='skin_td_app_full_outer' class='full_height' colspan='5' height='100%'>
- <table id='skin_app_full_table' class='skin_table fullSize' cellspacing=0 cellpadding=0>
- <tr>
- <td id='skin_full_toolbar_container' class='skin_td_app_toolbar ImgSkin_Toolbar'>
- <!--div id='skin_container_app_top_toolbar' class='skin_container'></div-->
- </td>
- </tr>
- <tr>
- <td id='skin_td_app_full'>
- <div id='skin_container_app_main_full' class='skin_container' height='100%'>
- <!--Full screen app-->
-
- </div>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- <td valign="top" id="comcast-adsrvc" style="display:none;overflow:hidden;">
- <div class='skin_container' id="skin_adsrvc" >
- <table cellpadding="0" cellspacing="0" border="0" height="100%" width="171">
- <tr height=100%>
- <td valign="middle" align="center" height=100%>
- <div id='comcast-adshowhide' class='AdSrvcLeftArrow'></div>
- </td>
- <td valign="middle" id="comcast-skyscrapperad" align="center">
- <!-- xr-feat-126 -->
- <div id='skin_container_sidebar_ad' style="height:95%;"></div>
- <div class="adslug">
- <ul >
- <li class="comcast-adinfo" id="comcast-adinfo"><a href="#">Ad Info</a></li>
- <li class="comcast-adfeedback" id="comcast-adfeedback"><a href="#">Ad Feedback</a></li>
- </ul>
- </div>
- <!-- End xr-feat-126 -->
- </td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
- <!-- xr-feat-173 -->
- <tr id='skin_R4'>
- <td id='skin_td_R4' class='ImgSkin_Chrome_R4' colspan="3">
- <div id='skin_footer' class='skin_container'>
- <table width=100% id='skin_table_R4' class='skin_table fullSize' cellspacing=0 cellpadding=0>
- <tr>
- <td style='text-align:left;padding-left:20px;' width=23%><table><tr><td>© 2012 Comcast Cable Communications</td></tr></table></td>
- <td width=14%><table><tr><td><a target='blank' href='http://www.comcast.net/privacy/'>Privacy Statement</a></td></tr></table></td>
- <td width=14%><table><tr><td><a target='blank' href='http://www.comcast.net/terms/'>Terms of Service</a></td></tr></table></td>
- <td width=12%><table><tr><td><a target='blank' href='http://customer.comcast.com/Pages/HelpNFC.aspx?id=Comcast-Help-and-Support-home&CMP=ILCCOMCOMAL164104'>Contact Us</a></td></tr></table></td>
- <td width=15%><table><tr><td><a target='blank' href='http://www.comcast.com/shop/buyflow/default.ashx'>Add Comcast Services</a></td></tr></table></td>
- <td width=15%><table><tr><td><a target='blank' href='http://www.comcastsupport.com/forms/net/sccfeedback.asp'>Tell Us What You Think</a></td></tr></table></td>
- <td width=7% align=right><a target='blank' href='http://www.comcast.net/'><div class='ImgSkin_Customer_Logo_Bottom'></div></a></td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
- <!-- End xr-feat-173 -->
- </table>
- <!-- misc containers that haven't been placed yet -->
- <div id='skin_container_logo' class='skin_container offscreen'></div>
- <div id='skin_container_top_ad' class='skin_container offscreen'></div>
- <div id='skin_container_app_toolbar_sep' class='skin_container offscreen'></div>
- <div id='skin_container_tree_app_sash' class='skin_container offscreen'></div>
- <div id='skin_tr_status' class='offscreen'></div>
- <div id='skin_container_status' class='skin_container offscreen'></div>
- </div>
- <!-- END SKIN HTML -->
- <!-- BEGIN SPLASH SCREEN -->
- <div id='skin_container_splash_screen' class='skin_container_splash_screen' align="center">
- <script language='javascript'>
- function showCompanyUrl() {
- window.open('<fmt:message key="splashScreenCompanyURL/>', '_blank');
- }
- </script>
- <!-- xr-feat-163 -->
- <div id='skin_container_splash_logo' class='skin_container_splash_logo'></div>
- <div class="skin_container_splash_loading"></div>
- <div class="skin_container_splash_footer">
- <div class="skin_container_splash_footer_logo"></div>
- <p>Copyright © Comcast Interactive Media 2012. All rights reserved.</p>
- </div>
- <!-- End xr-feat-163 -->
- </div>
- <!-- END SPLASH SCREEN -->
- <!--
- --
- --
- --
- END SKIN
- --
- --
- --
- -->
- <div style='display:none;'>
- <!-- bootstrap classes -->
- <script type="text/javascript">
- AjxEnv=function(){};
- AjxEnv.DEFAULT_LOCALE=window.navigator.userLanguage||window.navigator.language||window.navigator.systemLanguage;
- AjxEnv._inited=false;
- AjxEnv.geckoDate;
- AjxEnv.mozVersion;
- AjxEnv.webKitVersion;
- AjxEnv.isMac;
- AjxEnv.isWindows;
- AjxEnv.isLinux;
- AjxEnv.isNav;
- AjxEnv.isIE;
- AjxEnv.isNav4;
- AjxEnv.trueNs;
- AjxEnv.isNav6;
- AjxEnv.isNav6up;
- AjxEnv.isNav7;
- AjxEnv.isIE3;
- AjxEnv.isIE4;
- AjxEnv.isIE4up;
- AjxEnv.isIE5;
- AjxEnv.isIE5_5;
- AjxEnv.isIE5up;
- AjxEnv.isIE5_5up;
- AjxEnv.isIE6;
- AjxEnv.isIE6up;
- AjxEnv.isIE7;
- AjxEnv.isIE7up;
- AjxEnv.isIE8;
- AjxEnv.isIE8up;
- AjxEnv.isNormalResolution;
- AjxEnv.ieScaleFactor;
- AjxEnv.isFirefox;
- AjxEnv.isFirefox1up;
- AjxEnv.isFirefox1_5up;
- AjxEnv.isFirefox3up;
- AjxEnv.isFirefox3_6up;
- AjxEnv.isMozilla;
- AjxEnv.isMozilla1_4up;
- AjxEnv.isSafari;
- AjxEnv.isSafari2;
- AjxEnv.isSafari3;
- AjxEnv.isSafari3up;
- AjxEnv.isSafari4;
- AjxEnv.isSafari4up;
- AjxEnv.isSafari5up;
- AjxEnv.isCamino;
- AjxEnv.isChrome;
- AjxEnv.isGeckoBased;
- AjxEnv.isWebKitBased;
- AjxEnv.isOpera;
- AjxEnv.useTransparentPNGs;
- AjxEnv.isDesktop;
- AjxEnv.isDesktop2up;
- AjxEnv.is800x600orLower;
- AjxEnv.is1024x768orLower;
- AjxEnv.reset=function(){
- AjxEnv.geckoDate=0;
- AjxEnv.mozVersion=-1;
- AjxEnv.webKitVersion=-1;
- AjxEnv.isMac=false;
- AjxEnv.isWindows=false;
- AjxEnv.isLinux=false;
- AjxEnv.isNav=false;
- AjxEnv.isIE=false;
- AjxEnv.isNav4=false;
- AjxEnv.trueNs=true;
- AjxEnv.isNav6=false;
- AjxEnv.isNav6up=false;
- AjxEnv.isNav7=false;
- AjxEnv.isIE3=false;
- AjxEnv.isIE4=false;
- AjxEnv.isIE4up=false;
- AjxEnv.isIE5=false;
- AjxEnv.isIE5_5=false;
- AjxEnv.isIE5up=false;
- AjxEnv.isIE5_5up=false;
- AjxEnv.isIE6=false;
- AjxEnv.isIE6up=false;
- AjxEnv.isIE7=false;
- AjxEnv.isIE7up=false;
- AjxEnv.isIE8=false;
- AjxEnv.isIE8up=false;
- AjxEnv.isNormalResolution=false;
- AjxEnv.ieScaleFactor=1;
- AjxEnv.isFirefox=false;
- AjxEnv.isFirefox1up=false;
- AjxEnv.isFirefox1_5up=false;
- AjxEnv.isFirefox3up=false;
- AjxEnv.isFirefox3_6up=false;
- AjxEnv.isMozilla=false;
- AjxEnv.isMozilla1_4up=false;
- AjxEnv.isSafari=false;
- AjxEnv.isSafari2=false;
- AjxEnv.isSafari3=false;
- AjxEnv.isSafari4=false;
- AjxEnv.isSafari3up=false;
- AjxEnv.isSafari4up=false;
- AjxEnv.isSafari5up=false;
- AjxEnv.isCamino=false;
- AjxEnv.isChrome=false;
- AjxEnv.isGeckoBased=false;
- AjxEnv.isWebKitBased=false;
- AjxEnv.isOpera=false;
- AjxEnv.useTransparentPNGs=false;
- AjxEnv.isDesktop=false;
- AjxEnv.isDesktop2up=false;
- AjxEnv.is800x600orLower=screen&&(screen.width<=800&&screen.height<=600);
- AjxEnv.is1024x768orLower=screen&&(screen.width<=1024&&screen.height<=768)
- };
- AjxEnv.parseUA=function(){
- AjxEnv.reset();
- var n=navigator.userAgent.toLowerCase();
- var t=n.split(" ");
- var c=false;
- var o=false;
- var r=false;
- var e=false;
- var a=false;
- if(t!=null){
- var u;
- var l=-1;
- if((l=t[0].search(/^\s*mozilla\//))!=-1){
- e=true;
- AjxEnv.browserVersion=parseFloat(t[0].substring(l+8));
- AjxEnv.isNav=true
- }
- var s;
- for(var h=0;
- h<t.length;
- ++h){
- s=t[h];
- if(s.indexOf("compatible")!=-1){
- a=true;
- AjxEnv.isNav=false
- }else{
- if((s.indexOf("opera"))!=-1){
- AjxEnv.isOpera=true;
- AjxEnv.isNav=false;
- u=parseFloat(t[h+1])
- }else{
- if((s.indexOf("spoofer"))!=-1){
- c=true;
- AjxEnv.isNav=false
- }else{
- if((s.indexOf("webtv"))!=-1){
- o=true;
- AjxEnv.isNav=false
- }else{
- if((s.indexOf("hotjava"))!=-1){
- r=true;
- AjxEnv.isNav=false
- }else{
- if((l=s.indexOf("msie"))!=-1){
- AjxEnv.isIE=true;
- u=parseFloat(t[h+1])
- }else{
- if((l=s.indexOf("gecko/"))!=-1){
- AjxEnv.isGeckoBased=true;
- AjxEnv.geckoDate=parseFloat(s.substr(l+6))
- }else{
- if((l=s.indexOf("applewebkit/"))!=-1){
- AjxEnv.isWebKitBased=true;
- AjxEnv.webKitVersion=parseFloat(s.substr(l+12))
- }else{
- if((l=s.indexOf("rv:"))!=-1){
- AjxEnv.mozVersion=parseFloat(s.substr(l+3));
- u=AjxEnv.mozVersion
- }else{
- if((l=s.indexOf("firefox/"))!=-1){
- AjxEnv.isFirefox=true;
- u=parseFloat(s.substr(l+8))
- }else{
- if((l=s.indexOf("prism"))!=-1){
- AjxEnv.isPrism=true
- }else{
- if((l=s.indexOf("camino/"))!=-1){
- AjxEnv.isCamino=true;
- u=parseFloat(s.substr(l+7))
- }else{
- if((l=s.indexOf("netscape6/"))!=-1){
- AjxEnv.trueNs=true;
- u=parseFloat(s.substr(l+10))
- }else{
- if((l=s.indexOf("netscape/"))!=-1){
- AjxEnv.trueNs=true;
- u=parseFloat(s.substr(l+9))
- }else{
- if((l=s.indexOf("safari/"))!=-1){
- AjxEnv.isSafari=true
- }else{
- if((l=s.indexOf("chrome/"))!=-1){
- AjxEnv.isChrome=true;
- u=parseFloat(s.substr(l+7))
- }else{
- if(l=s.indexOf("version/")!=-1){
- u=parseFloat(s.substr(l+7))
- }else{
- if(s.indexOf("windows")!=-1){
- AjxEnv.isWindows=true
- }else{
- if((s.indexOf("macintosh")!=-1)||(s.indexOf("mac_")!=-1)){
- AjxEnv.isMac=true
- }else{
- if(s.indexOf("linux")!=-1){
- AjxEnv.isLinux=true
- }else{
- if((l=s.indexOf("zdesktop/"))!=-1){
- AjxEnv.isDesktop=true;
- u=parseFloat(s.substr(l+9))
- }}}}}}}}}}}}}}}}}}}}}}
- AjxEnv.browserVersion=u;
- AjxEnv.isNav=(e&&!c&&!a&&!AjxEnv.isOpera&&!o&&!r&&!AjxEnv.isSafari);
- AjxEnv.isIE=(AjxEnv.isIE&&!AjxEnv.isOpera);
- AjxEnv.isNav4=(AjxEnv.isNav&&(u==4)&&(!AjxEnv.isIE));
- AjxEnv.isNav6=(AjxEnv.isNav&&AjxEnv.trueNs&&(u>=6&&u<7));
- AjxEnv.isNav6up=(AjxEnv.isNav&&AjxEnv.trueNs&&(u>=6));
- AjxEnv.isNav7=(AjxEnv.isNav&&AjxEnv.trueNs&&(u>=7&&u<8));
- AjxEnv.isIE3=(AjxEnv.isIE&&u<4);
- AjxEnv.isIE4=(AjxEnv.isIE&&u>=4&&u<5);
- AjxEnv.isIE4up=(AjxEnv.isIE&&u>=4);
- AjxEnv.isIE5=(AjxEnv.isIE&&u>=5&&u<6);
- AjxEnv.isIE5_5=(AjxEnv.isIE&&u==5.5);
- AjxEnv.isIE5up=(AjxEnv.isIE&&u>=5);
- AjxEnv.isIE5_5up=(AjxEnv.isIE&&u>=5.5);
- AjxEnv.isIE6=(AjxEnv.isIE&&u>=6&&u<7);
- AjxEnv.isIE6up=(AjxEnv.isIE&&u>=6);
- AjxEnv.isIE7=(AjxEnv.isIE&&u>=7&&u<8);
- AjxEnv.isIE7up=(AjxEnv.isIE&&u>=7);
- AjxEnv.isIE8=(AjxEnv.isIE&&u>=8&&u<9);
- AjxEnv.isIE8up=(AjxEnv.isIE&&u>=8);
- AjxEnv.isMozilla=((AjxEnv.isNav&&AjxEnv.mozVersion&&AjxEnv.isGeckoBased&&(AjxEnv.geckoDate!=0)));
- AjxEnv.isMozilla1_4up=(AjxEnv.isMozilla&&(AjxEnv.mozVersion>=1.4));
- AjxEnv.isFirefox=((AjxEnv.isMozilla&&AjxEnv.isFirefox));
- AjxEnv.isFirefox1up=(AjxEnv.isFirefox&&u>=1);
- AjxEnv.isFirefox1_5up=(AjxEnv.isFirefox&&u>=1.5);
- AjxEnv.isFirefox2_0up=(AjxEnv.isFirefox&&u>=2);
- AjxEnv.isFirefox3up=(AjxEnv.isFirefox&&u>=3);
- AjxEnv.isFirefox3_5up=(AjxEnv.isFirefox&&u>=3.5);
- AjxEnv.isFirefox3_6up=(AjxEnv.isFirefox&&u>=3.6);
- AjxEnv.isSafari2=(AjxEnv.isSafari&&u>=2&&u<3);
- AjxEnv.isSafari3=(AjxEnv.isSafari&&u>=3&&u<4)||AjxEnv.isChrome;
- AjxEnv.isSafari4=(AjxEnv.isSafari&&u>=4);
- AjxEnv.isSafari3up=(AjxEnv.isSafari&&u>=3)||AjxEnv.isChrome;
- AjxEnv.isSafari4up=(AjxEnv.isSafari&&u>=4)||AjxEnv.isChrome;
- AjxEnv.isSafari5up=(AjxEnv.isSafari&&u>=5)||AjxEnv.isChrome;
- AjxEnv.isDesktop2up=(AjxEnv.isDesktop&&u>=2);
- AjxEnv.isChrome7=(AjxEnv.isChrome&&u>=7);
- AjxEnv.browser="[unknown]";
- if(AjxEnv.isOpera){
- AjxEnv.browser="OPERA"
- }else{
- if(AjxEnv.isSafari3up){
- AjxEnv.browser="SAF3"
- }else{
- if(AjxEnv.isSafari){
- AjxEnv.browser="SAF"
- }else{
- if(AjxEnv.isCamino){
- AjxEnv.browser="CAM"
- }else{
- if(o){
- AjxEnv.browser="WEBTV"
- }else{
- if(r){
- AjxEnv.browser="HOTJAVA"
- }else{
- if(AjxEnv.isFirefox3up){
- AjxEnv.browser="FF3.0"
- }else{
- if(AjxEnv.isFirefox2_0up){
- AjxEnv.browser="FF2.0"
- }else{
- if(AjxEnv.isFirefox1_5up){
- AjxEnv.browser="FF1.5"
- }else{
- if(AjxEnv.isFirefox1up){
- AjxEnv.browser="FF1.0"
- }else{
- if(AjxEnv.isFirefox){
- AjxEnv.browser="FF"
- }else{
- if(AjxEnv.isPrism){
- AjxEnv.browser="PRISM"
- }else{
- if(AjxEnv.isNav7){
- AjxEnv.browser="NAV7"
- }else{
- if(AjxEnv.isNav6){
- AjxEnv.browser="NAV6"
- }else{
- if(AjxEnv.isNav4){
- AjxEnv.browser="NAV4"
- }else{
- if(AjxEnv.isIE8){
- AjxEnv.browser="IE8"
- }else{
- if(AjxEnv.isIE7){
- AjxEnv.browser="IE7"
- }else{
- if(AjxEnv.isIE6){
- AjxEnv.browser="IE6"
- }else{
- if(AjxEnv.isIE5){
- AjxEnv.browser="IE5"
- }else{
- if(AjxEnv.isIE4){
- AjxEnv.browser="IE4"
- }else{
- if(AjxEnv.isIE3){
- AjxEnv.browser="IE"
- }else{
- if(AjxEnv.isDesktop){
- AjxEnv.browser="ZDESKTOP"
- }}}}}}}}}}}}}}}}}}}}}}
- AjxEnv.platform="[unknown]";
- if(AjxEnv.isWindows){
- AjxEnv.platform="Win"
- }else{
- if(AjxEnv.isMac){
- AjxEnv.platform="Mac"
- }else{
- if(AjxEnv.isLinux){
- AjxEnv.platform="Linux"
- }}}}
- if(AjxEnv.isIE){
- AjxEnv.isNormalResolution=true;
- AjxEnv.ieScaleFactor=screen.deviceXDPI/screen.logicalXDPI;
- if(AjxEnv.ieScaleFactor>1){
- AjxEnv.isNormalResolution=false
- }}
- AjxEnv.useTransparentPNGs=!AjxEnv.isIE&&!AjxEnv.isLinux&&!AjxEnv.isSafari;
- AjxEnv._inited=!AjxEnv.isIE;
- if(AjxEnv.isSafari){
- var d=AjxEnv.getWebkitVersion();
- AjxEnv.isSafariNightly=(d&&d.is_nightly);
- AjxEnv.isSafari2=!AjxEnv.isSafari3&&!AjxEnv.isSafariNightly
- }};
- AjxEnv.getWebkitVersion=function(){
- var t;
- var o=new RegExp("\\(.*\\) AppleWebKit/(.*) \\((.*)");
- var s=o.exec(navigator.userAgent);
- if(s){
- var e=s[1];
- var n=e.split(".");
- var a=(e[e.length-1]=="+");
- var i=a?"+":parseInt(n[1]);
- if(isNaN(i)){
- i=""
- }
- t={
- major:parseInt(n[0]),minor:i,is_nightly:a}
- }
- return t||{}
- };
- AjxEnv.parseUA();
- AjxCallback=function(a,t,e){
- if(arguments.length==0){
- return
- }
- if(typeof arguments[0]=="function"){
- this.obj=null;
- this.func=arguments[0];
- this.args=arguments[1]
- }else{
- this.obj=a;
- this.func=t;
- this.args=e
- }};
- AjxCallback.prototype.toString=function(){
- return"AjxCallback"
- };
- AjxCallback.NOP=new AjxCallback(function(){}
- );
- AjxCallback.prototype.run=function(){
- var e=[];
- if(typeof this.args!="undefined"){
- if(this.args!==null&&this.args instanceof Array){
- e=arguments.length>0?e.concat(this.args):this.args
- }else{
- e.push(this.args)
- }}
- for(var t=0;
- t<arguments.length;
- ++t){
- e.push(arguments[t])
- }
- if(this.func){
- return this.func.apply(this.obj||window,e)
- }};
- AjxCallback.prototype.run1=function(t){
- var e=[];
- if(typeof this.args!="undefined"){
- if(this.args!==null&&this.args instanceof Array){
- e=arguments.length>0?e.concat(this.args):this.args
- }else{
- e.push(this.args)
- }}
- if(t&&t.length){
- for(var a=0;
- a<t.length;
- ++a){
- e.push(t[a])
- }}
- if(this.func){
- return this.func.apply(this.obj||window,e)
- }};
- AjxCallback.simpleClosure=function(a,o){
- var e=[];
- for(var t=2;
- t<arguments.length;
- ++t){
- e.push(arguments[t])
- }
- return function(){
- var s=[];
- for(var n=0;
- n<arguments.length;
- ++n){
- s.push(arguments[n])
- }
- return a.apply(o||this,e.concat(s))
- }
- };
- AjxCallback.returnFalse=function(){
- return false
- };
- AjxCallback.isNull=function(e){
- return e==null
- };
- AjxLoader=function(){};
- AjxLoader.__createXHR;
- if(window.XMLHttpRequest){
- AjxLoader.__createXHR=function(){
- return new XMLHttpRequest()
- }
- }else{
- if(window.ActiveXObject){
- (function(){
- var t=["MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];
- for(var a=0;
- a<t.length;
- a++){
- try{
- new ActiveXObject(t[a]);
- AjxLoader.__createXHR=function(){
- return new ActiveXObject(t[a])
- };
- break
- }
- catch(o){}}}
- )()
- }}
- AjxLoader.load=function(a){
- var n=a;
- if(typeof a=="string"){
- n={
- url:a}
- }
- var o=AjxLoader.__createXHR();
- var i=Boolean(n.callback)?function(){
- AjxLoader._response(o,n.callback)
- }
- :null;
- var s=n.method||(n.content!=null?"POST":"GET");
- if(i){
- o.onreadystatechange=i
- }
- var t=n.async!=null?n.async:Boolean(i);
- o.open(s,n.url,t,n.userName,n.password);
- for(var e in n.headers){
- o.setRequestHeader(e,n.headers[e])
- }
- o.send(n.content||"");
- return o
- };
- AjxLoader._response=function(e,t){
- if(e.readyState==4){
- t.run(e)
- }};
- AjxPackage=function(){};
- AjxPackage.METHOD_XHR_SYNC="xhr-sync";
- AjxPackage.METHOD_XHR_ASYNC="xhr-async";
- AjxPackage.METHOD_SCRIPT_TAG="script-tag";
- AjxPackage.DEFAULT_SYNC=AjxPackage.METHOD_XHR_SYNC;
- AjxPackage.DEFAULT_ASYNC=AjxEnv.isIE?AjxPackage.METHOD_XHR_ASYNC:AjxPackage.METHOD_SCRIPT_TAG;
- AjxPackage._packages={};
- AjxPackage._extension=".js";
- AjxPackage.__depth=0;
- AjxPackage.__scripts=[];
- AjxPackage.__data={};
- AjxPackage.setBasePath=function(e){
- AjxPackage._basePath=e
- };
- AjxPackage.setExtension=function(e){
- AjxPackage._extension=e
- };
- AjxPackage.setQueryString=function(e){
- AjxPackage._queryString=e
- };
- AjxPackage.isDefined=function(e){
- return Boolean(AjxPackage._packages[e])
- };
- AjxPackage.define=function(e){
- AjxPackage.__log("DEFINE "+e,"font-weight:bold;font-style:italic");
- e=AjxPackage.__package2path(e);
- if(!AjxPackage._packages[e]){
- AjxPackage._packages[e]=true;
- return true
- }
- return false
- };
- AjxPackage.undefine=function(e){
- AjxPackage.__log("UNDEFINE "+e,"font-weight:bold;font-style:italic");
- e=AjxPackage.__package2path(e);
- if(AjxPackage._packages[e]){
- delete AjxPackage._packages[e]
- }};
- AjxPackage.require=function(a){
- var b=a;
- if(typeof a=="string"){
- b={
- name:a}
- }
- var s=b.name;
- if(s instanceof Array){
- if(!s.internal){
- s=[].concat(s);
- s.internal=true;
- b.name=s
- }
- var x=s.shift();
- if(s.length>0){
- var o=new Function();
- o.prototype=b;
- o.prototype.constructor=o;
- var n=new o();
- n.name=x;
- n.callback=new AjxCallback(null,AjxPackage.__requireNext,b);
- AjxPackage.require(n);
- return
- }
- b.name=x
- }
- var c=b.name;
- var x=AjxPackage.__package2path(c);
- var i=b.callback;
- if(typeof i=="function"){
- i=new AjxCallback(i)
- }
- var f=i?" (callback)":"";
- var y=AjxPackage._packages[x]?" LOADED":"";
- var d=AjxPackage.__scripts.length?" (async, queueing...)":"";
- AjxPackage.__log(['REQUIRE "',c,'"',f,y,d].join(""));
- var g=b.forceReload!=null?b.forceReload:false;
- if(AjxPackage._packages[x]&&!g){
- if(i){
- i.run()
- }
- return
- }
- var w=b.basePath||AjxPackage._basePath||window.contextPath;
- var h=b.extension||AjxPackage._extension;
- var t=b.queryString||AjxPackage._queryString;
- var k=[w,"/",x,h];
- if(t){
- k.push("?",t)
- }
- var m=k.join("");
- var e=b.method||(b.callback?AjxPackage.DEFAULT_ASYNC:AjxPackage.DEFAULT_SYNC);
- var l=e==AjxPackage.METHOD_XHR_SYNC||b.forceSync;
- var r=!l;
- var v={
- name:x,path:m,method:e,async:r,callback:i||AjxCallback.NOP,scripts:r?[]:null};
- if(l||AjxPackage.__scripts.length==0){
- AjxPackage.__doLoad(v)
- }else{
- var p=AjxPackage.__scripts[AjxPackage.__scripts.length-1];
- v.method=p.method;
- v.async=p.async;
- v.scripts=[];
- if(i){
- var u=AjxPackage.__scripts[0];
- u.callback=new AjxCallback(AjxPackage.__chainCallbacks,[u.callback,i]);
- v.callback=AjxCallback.NOP
- }
- p.scripts.push(v)
- }};
- AjxPackage.eval=function(text){
- if(window.execScript){
- window.execScript(text)
- }else{
- if(AjxEnv.isGeckoBased){
- window.eval(text)
- }else{
- var e=document.createElement("SCRIPT");
- var t=document.createTextNode(text);
- e.appendChild(t);
- var heads=document.getElementsByTagName("HEAD");
- if(heads.length==0){
- heads=[document.createElement("HEAD")];
- document.documentElement.appendChild(heads[0])
- }
- heads[0].appendChild(e)
- }}};
- AjxPackage.__package2path=function(e){
- return e.replace(/\./g,"/").replace(/\*$/,"__all__")
- };
- AjxPackage.__requireNext=function(t){
- var e=AjxCallback.simpleClosure(AjxPackage.require,null,t);
- setTimeout(e,AjxEnv.isIE?10:0)
- };
- AjxPackage.__doLoad=function(e){
- if(e.async){
- AjxPackage.__doAsyncLoad(e)
- }else{
- AjxPackage.__doXHR(e)
- }};
- AjxPackage.__doAsyncLoad=function(t,e){
- AjxPackage.__data[name]=t;
- if(e||AjxPackage.__scripts.length==0){
- AjxPackage.__scripts.push(t);
- if(t.method==AjxPackage.METHOD_SCRIPT_TAG){
- AjxPackage.__doScriptTag(t)
- }else{
- AjxPackage.__doXHR(t)
- }}else{
- var a=AjxPackage.__scripts[AjxPackage.__scripts.length-1];
- a.scripts.push(t)
- }};
- AjxPackage.__doScriptTag=function(i){
- var e=document.createElement("SCRIPT");
- e.type="text/javascript";
- e.src=i.path;
- if(AjxEnv.isIE){
- var t=AjxCallback.simpleClosure(AjxPackage.__onAsyncLoadIE,null,e);
- e.attachEvent("onreadystatechange",t)
- }else{
- var t=AjxCallback.simpleClosure(AjxPackage.__onAsyncLoad,null,i.name);
- e.addEventListener("load",t,true)
- }
- var a=document.getElementsByTagName("HEAD");
- if(!a||a.length==0){
- a=[document.createElement("HEAD")];
- document.documentElement.appendChild(a[0])
- }
- a[0].appendChild(e)
- };
- AjxPackage.__doXHR=function(a){
- var i=a.async?new AjxCallback(null,AjxPackage.__onXHR,[a]):null;
- var e={
- url:a.path,userName:a.userName,password:a.password,async:a.async,callback:i};
- var t=AjxLoader.load(e);
- if(!a.async){
- AjxPackage.__onXHR(a,t)
- }};
- AjxPackage.__onXHR=function(t,e){
- if(e.status==200||e.status==0){
- AjxPackage.__requireEval(e.responseText||"")
- }else{
- AjxPackage.__log("error: "+e.status,"background-color:red")
- }
- if(t.async){
- AjxPackage.__onAsyncLoad()
- }else{
- AjxPackage.__onLoad(t)
- }};
- AjxPackage.__onAsyncLoadIE=function(e){
- if(e.readyState=="loaded"){
- AjxPackage.__onAsyncLoad()
- }};
- AjxPackage.__onAsyncLoad=function(){
- var e;
- while(e=AjxPackage.__scripts.pop()){
- if(e.scripts.length){
- AjxPackage.__scripts.push(e);
- e=e.scripts.shift();
- AjxPackage.__scripts.push(e);
- AjxPackage.__doAsyncLoad(e,true);
- return
- }
- AjxPackage.__onLoad(e)
- }};
- AjxPackage.__onLoad=function(t){
- AjxPackage.define(t.name);
- if(t.callback){
- try{
- t.callback.run()
- }
- catch(a){
- AjxPackage.__log("error on callback: "+a,"color:red")
- }}};
- AjxPackage.__requireEval=function(text){
- AjxPackage.__depth++;
- try{
- AjxPackage.eval(text)
- }
- catch(e){
- AjxPackage.__log("error on eval: "+e,"color:red")
- }
- AjxPackage.__depth--
- };
- AjxPackage.__log=function(t,e){};
- AjxPackage.__alertStack=function(r){
- var e=[];
- if(r){
- e.push(r,"\n\n")
- }
- for(var s=AjxPackage.__scripts.length-1;
- s>=0;
- s--){
- var t=AjxPackage.__scripts[s];
- e.push(t.name," (",Boolean(t.callback),")","\n");
- if(t.scripts){
- for(var n=0;
- n<t.scripts.length;
- n++){
- var o=t.scripts[n];
- e.push(" ",o.name," (",Boolean(o.callback),")","\n")
- }}}
- alert(e.join(""))
- };
- AjxPackage.__chainCallbacks=function(t,e){
- if(t){
- t.run()
- }
- if(e){
- e.run()
- }};
- AjxTemplate=function(){};
- AjxTemplate._templates={};
- AjxTemplate._stack=[];
- AjxTemplate.setBasePath=function(e){
- AjxTemplate._basePath=e
- };
- AjxTemplate.setExtension=function(e){
- AjxTemplate._extension=e
- };
- AjxTemplate.register=function(t,a,i,e){
- if(!e&&AjxTemplate._templates[t]&&AjxTemplate._templates[t].authoritative){
- return
- }
- AjxTemplate._templates[t]={
- name:t,func:a,params:i||{}
- ,authoritative:e}
- };
- AjxTemplate.getTemplate=function(e){
- var t=AjxTemplate._templates[e];
- return t&&t.func
- };
- AjxTemplate.getParams=function(e){
- var t=AjxTemplate._templates[e];
- return t&&t.params
- };
- AjxTemplate.expand=function(t,r,s){
- if(!AjxTemplate._templates[t]&&AjxTemplate.compile){
- var i=document.getElementById(t);
- if(i){
- var d=i.nodeName.toUpperCase()=="TEXTAREA";
- AjxTemplate.compile(t,true,true,d?i.value:i.innerHTML)
- }}
- var c=AjxTemplate.__name2Package(t);
- var a=t.replace(/^[^#]*#?/,"");
- if(a){
- t=[c,a].join("#")
- }
- AjxTemplate.require(c);
- var h=Boolean(s);
- s=s||[];
- var o=AjxTemplate.getTemplate(t);
- if(o){
- try{
- AjxTemplate._stack.push(c);
- var n=AjxTemplate.getParams(t);
- o(t,n,r,s)
- }
- catch(l){
- s.push(this.__formatError(t,l))
- }
- finally{
- AjxTemplate._stack.pop()
- }}else{
- s.push(this.__formatError(t,"template not found"))
- }
- return h?s.length:s.join("")
- };
- AjxTemplate.require=function(e){
- AjxPackage.require({
- name:AjxTemplate.__name2Package(e),basePath:AjxTemplate._basePath,extension:AjxTemplate._extension}
- );
- return AjxTemplate.getTemplate(e)!=null
- };
- AjxTemplate.setContent=function(a,e,i){
- if(typeof a=="string"){
- a=document.getElementById(a)
- }
- if(a==null){
- return
- }
- var t=AjxTemplate.expand(e,i);
- a.innerHTML=t
- };
- AjxTemplate.__name2Package=function(t){
- var e=t.replace(/#.*$/,"");
- if(t.match(/^#/)&&AjxTemplate._stack.length>0){
- e=AjxTemplate._stack[AjxTemplate._stack.length-1]
- }
- return e
- };
- AjxTemplate.__formatError=function(e,t){
- return"Error in template '"+e+"': "+t
- };
- AjxTemplate.compile=function(d,u,l,f){
- var e=AjxPackage.__package2path(d);
- var g=f!=null?f:AjxLoader.load(e).reponseText;
- var r=[],s=0,h=true;
- AjxTemplate.__RE_TEMPLATE.lastIndex=0;
- var o=AjxTemplate.__RE_TEMPLATE.exec(g);
- if(o){
- do{
- var p=AjxTemplate.__parseAttrs(o[1]);
- var c=o[2];
- if(p["xml:space"]!="preserve"){
- c=c.replace(AjxTemplate.__RE_GT_LINESEP_LT,"><").trim()
- }
- var n=d;
- var a=p.id;
- if(a&&(a.indexOf("#")!=-1||a.match(/^\//))){
- if(a.indexOf("#")==-1){
- a+="#"
- }
- n=a.replace(/#.*$/,"").replace(/^\//,"").replace(/\//g,".");
- a=a.replace(/^.*#/,"")
- }
- var t=a?n+"#"+a:n;
- var i=AjxTemplate.__convertLines(c);
- AjxTemplate.register(n,i,p,u);
- if(h&&l){
- AjxPackage.define(n)
- }
- if(h){
- h=false;
- AjxTemplate.register(n,i,p,u)
- }}
- while(o=AjxTemplate.__RE_TEMPLATE.exec(g))
- }else{
- if(l){
- AjxPackage.define(d)
- }
- var i=AjxTemplate.__convertLines(g);
- AjxTemplate.register(d,i,{}
- ,u)
- }};
- AjxTemplate.__RE_REPLACE=new RegExp(["\\$\\{(.+?)\\}","<\\$=(.+?)\\$>","<\\$(.+?)\\$>"].join("|"),"mg");
- AjxTemplate.__RE_TEMPLATE=new RegExp("<template(.*?)>(.*?)</template>","mg");
- AjxTemplate.__RE_ATTR=new RegExp("\\s*(\\S+)\\s*=\\s*('[^']*'|\"[^\"]*\")","mg");
- AjxTemplate.__RE_PARAM_PART=new RegExp("([^\\(\\.]+)(\\(.*?\\))?\\.?","g");
- AjxTemplate.__RE_GT_LINESEP_LT=new RegExp([">","\\s*\\n+\\s*","<"].join(""),"mg");
- AjxTemplate.__convertLines=function(a){
- var t=[],r=0;
- t[r++]="\tvar _hasBuffer = Boolean(buffer);";
- t[r++]='\tdata = (typeof data == "string" ? { id: data } : data) || {};';
- t[r++]="\tbuffer = buffer || [];";
- t[r++]="\tvar _i = buffer.length;";
- t[r++]="\n";
- AjxTemplate.__RE_REPLACE.lastIndex=0;
- var e=AjxTemplate.__RE_REPLACE.exec(a);
- if(e){
- var o=0;
- do{
- var i=AjxTemplate.__RE_REPLACE.lastIndex-e[0].length;
- if(o<i){
- AjxTemplate.__printStringLines(t,a.substring(o,i))
- }
- var s=e[1];
- var n=e[2];
- if(s){
- r=AjxTemplate.__printDataLine(t,s)
- }else{
- if(n){
- r=AjxTemplate.__printBufferLine(t,n)
- }else{
- r=AjxTemplate.__printLine(t,"\t",e[3].replace(/\n/g,"\n\t"),"\n")
- }}
- o=AjxTemplate.__RE_REPLACE.lastIndex
- }
- while(e=AjxTemplate.__RE_REPLACE.exec(a));
- if(o<a.length){
- r=AjxTemplate.__printStringLines(t,a.substring(o))
- }}else{
- r=AjxTemplate.__printStringLines(t,a)
- }
- t[r++]="\n";
- t[r++]='\treturn _hasBuffer ? buffer.length : buffer.join("");';
- return new Function("name,params,data,buffer",t.join(""))
- };
- AjxTemplate.__parseAttrs=function(a){
- var t={}
- ,e;
- AjxTemplate.__RE_ATTR.lastIndex=0;
- while(e=AjxTemplate.__RE_ATTR.exec(a)){
- var i=e[2];
- t[e[1]]=i.substring(1,i.length-1)
- }
- return t
- };
- AjxTemplate.__printLine=function(e,a){
- var o=e.length;
- for(var t=1;
- t<arguments.length;
- t++){
- e[o++]=arguments[t]
- }
- return o
- };
- AjxTemplate.__printStringLines=function(a,r){
- var l=a.length;
- for(var n=1;
- n<arguments.length;
- n++){
- var h=arguments[n];
- var t=h.split("\n");
- for(var o=0;
- o<t.length;
- o++){
- var e=t[o];
- l=AjxTemplate.__printStringLine(a,e,n<t.length-1?"\n":"")
- }}
- return l
- };
- AjxTemplate.__printStringLine=function(e,a){
- var o=e.length;
- e[o++]='\tbuffer[_i++] = "';
- for(var t=1;
- t<arguments.length;
- t++){
- o=AjxTemplate.__printEscaped(e,arguments[t])
- }
- e[o++]='";';
- return o
- };
- AjxTemplate.__printDataLine=function(t,a){
- var i=t.length,e;
- t[i++]="\tbuffer[_i++] = data";
- AjxTemplate.__RE_PARAM_PART.lastIndex=0;
- while(e=AjxTemplate.__RE_PARAM_PART.exec(a)){
- t[i++]='["';
- t[i++]=e[1];
- t[i++]='"]';
- if(e[2]!=null){
- t[i++]=e[2]
- }}
- t[i++]=";";
- return i
- };
- AjxTemplate.__printBufferLine=function(e,a){
- var o=e.length;
- e[o++]="\tbuffer[_i++] = ";
- for(var t=1;
- t<arguments.length;
- t++){
- e[o++]=arguments[t]
- }
- e[o++]=";";
- return o
- };
- AjxTemplate.__printEscaped=function(e,t){
- var a=e.length;
- e[a++]=t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace("\n","\\n").replace("\r","\\r").replace("\t","\\t");
- return a
- };
- AjxDispatcher=function(){};
- AjxDispatcher._registry={};
- AjxDispatcher._package={};
- AjxDispatcher._preLoad=[];
- AjxDispatcher._postLoad=[];
- AjxDispatcher._loadFunctionsEnabled=false;
- AjxDispatcher._timedAction=null;
- AjxDispatcher.addPackageLoadFunction=function(e,a){
- var t=AjxDispatcher._getPackageData(e);
- if(!t._loaded&&!AjxPackage.isDefined(e)){
- t.callback.push(a)
- }else{
- AjxTimedAction.scheduleAction(new AjxTimedAction(a,a.run),0)
- }};
- AjxDispatcher.addPreLoadFunction=function(e){
- AjxDispatcher._preLoad.push(e)
- };
- AjxDispatcher.addPostLoadFunction=function(e){
- AjxDispatcher._postLoad.push(e)
- };
- AjxDispatcher.setPackageLoadFunction=AjxDispatcher.addPackageLoadFunction;
- AjxDispatcher.setPreLoadFunction=AjxDispatcher.addPreLoadFunction;
- AjxDispatcher.setPostLoadFunction=AjxDispatcher.addPostLoadFunction;
- AjxDispatcher.enableLoadFunctions=function(e){
- AjxDispatcher._loadFunctionsEnabled=e
- };
- AjxDispatcher.loaded=function(e){
- var t=AjxDispatcher._getPackageData(e);
- return(t&&t._loaded)||AjxPackage.isDefined(e)
- };
- AjxDispatcher.setLoaded=function(t,e){
- var n=AjxDispatcher._getPackageData(t);
- n._loaded=e;
- if(e){
- var o=n.callback||[];
- for(var a=0;
- a<o.length;
- a++){
- o[a].run()
- }}};
- AjxDispatcher.registerMethod=function(a,e,t){
- AjxDispatcher._registry[a]={
- pkg:e,callback:t}
- };
- AjxDispatcher.run=function(o){
- if(!o){
- return
- }
- var e,a,t,l,h;
- if(typeof(o)=="string"){
- e=o;
- t=false;
- h=false
- }else{
- e=o.method;
- a=o.noLoad;
- l=o.callback;
- t=o.async!=null?o.async:Boolean(l);
- h=o.preLoadOk!=null?o.preLoadOk:(l!=null)
- }
- var c=AjxDispatcher._registry[e];
- if(!c){
- AjxPackage.__log("API method '"+e+"' not found");
- return
- }
- AjxPackage.__log("Run method: "+e);
- var r=c.pkg;
- var s=[];
- for(var n=1;
- n<arguments.length;
- ++n){
- s.push(arguments[n])
- }
- if(l){
- s.push(l)
- }
- return AjxDispatcher.require(r,t,c.callback,s,h)
- };
- AjxDispatcher.require=function(n,a,h,s,r){
- if(!n){
- return
- }
- if(typeof(n)=="string"){
- n=[n]
- }
- var l=[];
- for(var o=0;
- o<n.length;
- o++){
- var t=n[o];
- if(!AjxDispatcher._getPackageData(t)._loaded){
- l.push(t)
- }}
- if(l.length==0){
- return AjxDispatcher._postLoadCallback(n,false,h,s)
- }else{
- var e=AjxDispatcher._preLoad;
- if(r&&AjxDispatcher._loadFunctionsEnabled&&e.length){
- AjxPackage.__log("pre-load function");
- AjxDispatcher._timedAction=new AjxCallback(null,AjxDispatcher._continueRequire,[l,a,h,s]);
- for(var o=0;
- o<e.length;
- o++){
- e[o].run()
- }
- window.setTimeout("AjxDispatcher._timedAction.run()",0)
- }else{
- return AjxDispatcher._continueRequire(l,a,h,s)
- }}};
- AjxDispatcher._continueRequire=function(s,e,c,r){
- var l=s.join(", ");
- AjxPackage.__log("------------------------------------- Loading package: "+l);
- if(window.console){
- console.log("------------------------------------- Loading package: "+l)
- }
- if(e&&c){
- var o=new AjxCallback(null,AjxDispatcher._postLoadCallback,[s,true,c,r]);
- AjxPackage.require({
- name:s,callback:o}
- )
- }else{
- var n=new Date();
- for(var a=0;
- a<s.length;
- a++){
- AjxPackage.require(s[a])
- }
- var h=new Date();
- var d=h.getTime()-n.getTime();
- AjxPackage.__log("LOAD TIME for "+l+": "+d);
- return AjxDispatcher._postLoadCallback(s,true,c,r)
- }};
- AjxDispatcher._postLoadCallback=function(r,n,l,h){
- for(var a=0;
- a<r.length;
- a++){
- AjxDispatcher._getPackageData(r[a])._loaded=true
- }
- for(var a=0;
- a<r.length;
- a++){
- var e=AjxDispatcher._getPackageData(r[a]);
- if(n&&e.callback.length&&!e.callbackDone){
- e.callbackDone=true;
- AjxPackage.__log("Running post-load package function for "+r[a]);
- var s=e.callback;
- for(var t=0;
- t<s.length;
- t++){
- s[t].run()
- }
- e.callback.length=0
- }}
- if(n){
- var o=AjxDispatcher._postLoad;
- if(AjxDispatcher._loadFunctionsEnabled&&o.length){
- for(var a=0;
- a<o.length;
- a++){
- o[a].run()
- }}}
- if(l){
- return l.run1(h)
- }};
- AjxDispatcher._getPackageData=function(e){
- if(!AjxDispatcher._package[e]){
- AjxDispatcher._package[e]={
- callback:[]}
- }
- return AjxDispatcher._package[e]
- };
- </script>
- <script type="text/javascript">
- AjxPackage.setBasePath("/zimbra/js");
- AjxPackage.setExtension("_all.js.zgz");
- AjxPackage.setQueryString("v=110527090709");
- AjxTemplate.setBasePath("/zimbra/templates");
- AjxTemplate.setExtension(".template.js");
- </script>
- <script>
- AjxEnv.DEFAULT_LOCALE = "en_US";
- function switchToStandardClient() {
- document.location = appContextPath + "/?client=standard";
- }
- var enforceMinDisplay = true;
- var unsupported = (screen && (screen.width <= 800 && screen.height <= 600) && !false) || (AjxEnv.isSafari && !AjxEnv.isSafari4up);
- if (enforceMinDisplay && unsupported) {
- switchToStandardClient();
- }
- </script>
- <script>
- /**
- * DO NOT EDIT! This file is generated.
- * <p>
- * Any copy of this file checked into source control is merely for
- * convenience and should not be edited in any way.
- * <p>
- * Generated at Sun Sep 30 16:19:40 PDT 2012
- * @private
- */
- AjxTimezoneData = {};
- AjxTimezoneData.TRANSITION_YEAR = 2012;
- AjxTimezoneData.TIMEZONE_RULES = [
- { serverId: "Etc/GMT+12", clientId: "Etc/GMT+12", score: 100, standard: { offset: -720, tzname: "GMT+12" } },
- { serverId: "Pacific/Midway", clientId: "Pacific/Midway", score: 100, standard: { offset: -660, tzname: "SST" } },
- { serverId: "Pacific/Honolulu", clientId: "Pacific/Honolulu", score: 200, standard: { offset: -600, tzname: "HST" } },
- { serverId: "America/Anchorage", clientId: "America/Anchorage", score: 200,
- standard: { offset: -540, mon: 11, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 11, 4 ], tzname: "AKST" },
- daylight: { offset: -480, mon: 3, week: 2, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 11 ], tzname: "AKDT" }
- },
- { serverId: "America/Los_Angeles", clientId: "America/Los_Angeles", score: 200,
- standard: { offset: -480, mon: 11, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 11, 4 ], tzname: "PST" },
- daylight: { offset: -420, mon: 3, week: 2, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 11 ], tzname: "PDT" }
- },
- { serverId: "America/Tijuana", clientId: "America/Tijuana", score: 100,
- standard: { offset: -480, mon: 10, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "PST" },
- daylight: { offset: -420, mon: 4, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 4, 1 ], tzname: "PDT" }
- },
- { serverId: "America/Chihuahua", clientId: "America/Chihuahua", score: 100,
- standard: { offset: -420, mon: 10, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "MST" },
- daylight: { offset: -360, mon: 4, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 4, 1 ], tzname: "MDT" }
- },
- { serverId: "America/Denver", clientId: "America/Denver", score: 200,
- standard: { offset: -420, mon: 11, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 11, 4 ], tzname: "MST" },
- daylight: { offset: -360, mon: 3, week: 2, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 11 ], tzname: "MDT" }
- },
- { serverId: "America/Phoenix", clientId: "America/Phoenix", score: 200, standard: { offset: -420, tzname: "MST" } },
- { serverId: "America/Chicago", clientId: "America/Chicago", score: 200,
- standard: { offset: -360, mon: 11, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 11, 4 ], tzname: "CST" },
- daylight: { offset: -300, mon: 3, week: 2, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 11 ], tzname: "CDT" }
- },
- { serverId: "America/Guatemala", clientId: "America/Guatemala", score: 100, standard: { offset: -360 } },
- { serverId: "America/Mexico_City", clientId: "America/Mexico_City", score: 100,
- standard: { offset: -360, mon: 10, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "CST" },
- daylight: { offset: -300, mon: 4, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 4, 1 ], tzname: "CDT" }
- },
- { serverId: "America/Regina", clientId: "America/Regina", score: 200, standard: { offset: -360, tzname: "CST" } },
- { serverId: "America/Bogota", clientId: "America/Bogota", score: 100, standard: { offset: -300 } },
- { serverId: "America/Indiana/Indianapolis", clientId: "America/Indiana/Indianapolis", score: 100,
- standard: { offset: -300, mon: 11, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 11, 4 ], tzname: "EST" },
- daylight: { offset: -240, mon: 3, week: 2, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 11 ], tzname: "EDT" }
- },
- { serverId: "America/New_York", clientId: "America/New_York", score: 200,
- standard: { offset: -300, mon: 11, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 11, 4 ], tzname: "EST" },
- daylight: { offset: -240, mon: 3, week: 2, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 11 ], tzname: "EDT" }
- },
- { serverId: "America/Caracas", clientId: "America/Caracas", score: 100, standard: { offset: -270, tzname: "VET" } },
- { serverId: "America/Asuncion", clientId: "America/Asuncion", score: 100,
- standard: { offset: -240, mon: 4, week: 2, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 4, 8 ], tzname: "PYT" },
- daylight: { offset: -180, mon: 10, week: 1, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 10, 7 ], tzname: "PYST" }
- },
- { serverId: "America/Cuiaba", clientId: "America/Cuiaba", score: 100,
- standard: { offset: -240, mon: 2, week: 3, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 2, 19 ], tzname: "AMT" },
- daylight: { offset: -180, mon: 10, week: 3, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 10, 21 ], tzname: "AMST" }
- },
- { serverId: "America/Guyana", clientId: "America/Guyana", score: 100, standard: { offset: -240, tzname: "GYT" } },
- { serverId: "America/Halifax", clientId: "America/Halifax", score: 100,
- standard: { offset: -240, mon: 11, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 11, 4 ], tzname: "AST" },
- daylight: { offset: -180, mon: 3, week: 2, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 11 ], tzname: "ADT" }
- },
- { serverId: "America/Santiago", clientId: "America/Santiago", score: 100,
- standard: { offset: -240, mon: 4, week: 1, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 4, 1 ], tzname: "CLT" },
- daylight: { offset: -180, mon: 10, week: 2, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 10, 14 ], tzname: "CLST" }
- },
- { serverId: "America/St_Johns", clientId: "America/St_Johns", score: 100,
- standard: { offset: -210, mon: 11, week: 1, wkday: 1, hour: 0, min: 1, sec: 0, trans: [ 2012, 11, 4 ], tzname: "NST" },
- daylight: { offset: -150, mon: 3, week: 2, wkday: 1, hour: 0, min: 1, sec: 0, trans: [ 2012, 3, 11 ], tzname: "NDT" }
- },
- { serverId: "America/Argentina/Buenos_Aires", clientId: "America/Argentina/Buenos_Aires", score: 100, standard: { offset: -180 } },
- { serverId: "America/Cayenne", clientId: "America/Cayenne", score: 100, standard: { offset: -180, tzname: "GFT" } },
- { serverId: "America/Godthab", clientId: "America/Godthab", score: 100,
- standard: { offset: -180, mon: 10, week: -1, wkday: 1, hour: 1, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "WGT" },
- daylight: { offset: -120, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "WGST" }
- },
- { serverId: "America/Montevideo", clientId: "America/Montevideo", score: 100,
- standard: { offset: -180, mon: 3, week: 2, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 11 ], tzname: "UYT" },
- daylight: { offset: -120, mon: 10, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 10, 7 ], tzname: "UYST" }
- },
- { serverId: "America/Sao_Paulo", clientId: "America/Sao_Paulo", score: 100,
- standard: { offset: -180, mon: 2, week: 3, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 2, 19 ], tzname: "BRT" },
- daylight: { offset: -120, mon: 10, week: 3, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 10, 21 ], tzname: "BRST" }
- },
- { serverId: "Atlantic/South_Georgia", clientId: "Atlantic/South_Georgia", score: 100, standard: { offset: -120, tzname: "GST" } },
- { serverId: "Atlantic/Azores", clientId: "Atlantic/Azores", score: 100,
- standard: { offset: -60, mon: 10, week: -1, wkday: 1, hour: 1, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "AZOT" },
- daylight: { offset: 0, mon: 3, week: -1, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "AZOST" }
- },
- { serverId: "Atlantic/Cape_Verde", clientId: "Atlantic/Cape_Verde", score: 100, standard: { offset: -60, tzname: "CVT" } },
- { serverId: "Africa/Casablanca", clientId: "Africa/Casablanca", score: 100,
- standard: { offset: 0, mon: 8, week: 2, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 8, 12 ], tzname: "WET" },
- daylight: { offset: 60, mon: 5, week: 1, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 5, 6 ], tzname: "WEST" }
- },
- { serverId: "Africa/Monrovia", clientId: "Africa/Monrovia", score: 100, standard: { offset: 0, tzname: "GMT" } },
- { serverId: "Europe/London", clientId: "Europe/London", score: 100,
- standard: { offset: 0, mon: 10, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "GMT/BST" },
- daylight: { offset: 60, mon: 3, week: -1, wkday: 1, hour: 1, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "GMT/BST" }
- },
- { serverId: "UTC", clientId: "UTC", score: 100, standard: { offset: 0, tzname: "UTC" } },
- { serverId: "Africa/Algiers", clientId: "Africa/Algiers", score: 100, standard: { offset: 60, tzname: "CET" } },
- { serverId: "Africa/Windhoek", clientId: "Africa/Windhoek", score: 100,
- standard: { offset: 60, mon: 4, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 4, 1 ], tzname: "WAT" },
- daylight: { offset: 120, mon: 9, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 9, 2 ], tzname: "WAST" }
- },
- { serverId: "Europe/Belgrade", clientId: "Europe/Belgrade", score: 100,
- standard: { offset: 60, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "CET" },
- daylight: { offset: 120, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "CEST" }
- },
- { serverId: "Europe/Berlin", clientId: "Europe/Berlin", score: 200,
- standard: { offset: 60, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "CET" },
- daylight: { offset: 120, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "CEST" }
- },
- { serverId: "Europe/Brussels", clientId: "Europe/Brussels", score: 100,
- standard: { offset: 60, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "CET" },
- daylight: { offset: 120, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "CEST" }
- },
- { serverId: "Europe/Warsaw", clientId: "Europe/Warsaw", score: 100,
- standard: { offset: 60, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "CET" },
- daylight: { offset: 120, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "CEST" }
- },
- { serverId: "Africa/Cairo", clientId: "Africa/Cairo", score: 100,
- standard: { offset: 120, mon: 9, week: -1, wkday: 5, hour: 0, min: 0, sec: 0, trans: [ 2012, 9, 27 ], tzname: "EET" },
- daylight: { offset: 180, mon: 4, week: -1, wkday: 6, hour: 0, min: 0, sec: 0, trans: [ 2012, 4, 27 ], tzname: "EEST" }
- },
- { serverId: "Africa/Harare", clientId: "Africa/Harare", score: 100, standard: { offset: 120, tzname: "CAT" } },
- { serverId: "Asia/Amman", clientId: "Asia/Amman", score: 100,
- standard: { offset: 120, mon: 10, week: -1, wkday: 6, hour: 1, min: 0, sec: 0, trans: [ 2012, 10, 26 ], tzname: "EET" },
- daylight: { offset: 180, mon: 3, week: -1, wkday: 5, hour: 23, min: 59, sec: 59, trans: [ 2012, 3, 29 ], tzname: "EEST" }
- },
- { serverId: "Asia/Beirut", clientId: "Asia/Beirut", score: 100,
- standard: { offset: 120, mon: 10, week: -1, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "EET" },
- daylight: { offset: 180, mon: 3, week: -1, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "EEST" }
- },
- { serverId: "Asia/Jerusalem", clientId: "Asia/Jerusalem", score: 100,
- standard: { offset: 120, mon: 9, week: 2, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 9, 9 ], tzname: "IST" },
- daylight: { offset: 180, mon: 3, week: -1, wkday: 6, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 30 ], tzname: "IDT" }
- },
- { serverId: "Europe/Athens", clientId: "Europe/Athens", score: 200,
- standard: { offset: 120, mon: 10, week: -1, wkday: 1, hour: 4, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "EET" },
- daylight: { offset: 180, mon: 3, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "EEST" }
- },
- { serverId: "Europe/Helsinki", clientId: "Europe/Helsinki", score: 100,
- standard: { offset: 120, mon: 10, week: -1, wkday: 1, hour: 4, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "EET" },
- daylight: { offset: 180, mon: 3, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "EEST" }
- },
- { serverId: "Europe/Minsk", clientId: "Europe/Minsk", score: 100,
- standard: { offset: 120, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "EET" },
- daylight: { offset: 180, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "EEST" }
- },
- { serverId: "Africa/Nairobi", clientId: "Africa/Nairobi", score: 200, standard: { offset: 180, tzname: "EAT" } },
- { serverId: "Asia/Baghdad", clientId: "Asia/Baghdad", score: 100, standard: { offset: 180 } },
- { serverId: "Asia/Kuwait", clientId: "Asia/Kuwait", score: 100, standard: { offset: 180, tzname: "AST" } },
- { serverId: "Europe/Moscow", clientId: "Europe/Moscow", score: 100,
- standard: { offset: 180, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "MSK/MSD" },
- daylight: { offset: 240, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "MSK/MSD" }
- },
- { serverId: "Asia/Tehran", clientId: "Asia/Tehran", score: 100,
- standard: { offset: 210, mon: 9, week: 4, wkday: 4, hour: 0, min: 0, sec: 0, trans: [ 2012, 9, 26 ], tzname: "IRST" },
- daylight: { offset: 270, mon: 3, week: 4, wkday: 2, hour: 0, min: 0, sec: 0, trans: [ 2012, 3, 26 ], tzname: "IRDT" }
- },
- { serverId: "Asia/Baku", clientId: "Asia/Baku", score: 100,
- standard: { offset: 240, mon: 10, week: -1, wkday: 1, hour: 5, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "AZT" },
- daylight: { offset: 300, mon: 3, week: -1, wkday: 1, hour: 4, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "AZST" }
- },
- { serverId: "Asia/Muscat", clientId: "Asia/Muscat", score: 100, standard: { offset: 240, tzname: "GST" } },
- { serverId: "Asia/Tbilisi", clientId: "Asia/Tbilisi", score: 200, standard: { offset: 240, tzname: "GET" } },
- { serverId: "Asia/Yerevan", clientId: "Asia/Yerevan", score: 100,
- standard: { offset: 240, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "AMT" },
- daylight: { offset: 300, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "AMST" }
- },
- { serverId: "Indian/Mauritius", clientId: "Indian/Mauritius", score: 100, standard: { offset: 240 } },
- { serverId: "Asia/Kabul", clientId: "Asia/Kabul", score: 100, standard: { offset: 270, tzname: "AFT" } },
- { serverId: "Asia/Karachi", clientId: "Asia/Karachi", score: 200, standard: { offset: 300 } },
- { serverId: "Asia/Tashkent", clientId: "Asia/Tashkent", score: 100, standard: { offset: 300, tzname: "UZT" } },
- { serverId: "Asia/Yekaterinburg", clientId: "Asia/Yekaterinburg", score: 100,
- standard: { offset: 300, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "YEKT" },
- daylight: { offset: 360, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "YEKST" }
- },
- { serverId: "Asia/Colombo", clientId: "Asia/Colombo", score: 100, standard: { offset: 330, tzname: "IST" } },
- { serverId: "Asia/Kolkata", clientId: "Asia/Kolkata", score: 200, standard: { offset: 330, tzname: "IST" } },
- { serverId: "Asia/Almaty", clientId: "Asia/Almaty", score: 100, standard: { offset: 360, tzname: "ALMT" } },
- { serverId: "Asia/Dhaka", clientId: "Asia/Dhaka", score: 100, standard: { offset: 360 } },
- { serverId: "Asia/Novosibirsk", clientId: "Asia/Novosibirsk", score: 100,
- standard: { offset: 360, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "NOVT" },
- daylight: { offset: 420, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "NOVST" }
- },
- { serverId: "Asia/Rangoon", clientId: "Asia/Rangoon", score: 100, standard: { offset: 390, tzname: "MMT" } },
- { serverId: "Asia/Bangkok", clientId: "Asia/Bangkok", score: 100, standard: { offset: 420, tzname: "ICT" } },
- { serverId: "Asia/Krasnoyarsk", clientId: "Asia/Krasnoyarsk", score: 100,
- standard: { offset: 420, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "KRAT" },
- daylight: { offset: 480, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "KRAST" }
- },
- { serverId: "Asia/Hong_Kong", clientId: "Asia/Hong_Kong", score: 200, standard: { offset: 480 } },
- { serverId: "Asia/Irkutsk", clientId: "Asia/Irkutsk", score: 100,
- standard: { offset: 480, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "IRKT" },
- daylight: { offset: 540, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "IRKST" }
- },
- { serverId: "Asia/Kuala_Lumpur", clientId: "Asia/Kuala_Lumpur", score: 100, standard: { offset: 480, tzname: "MYT" } },
- { serverId: "Asia/Taipei", clientId: "Asia/Taipei", score: 100, standard: { offset: 480 } },
- { serverId: "Asia/Ulaanbaatar", clientId: "Asia/Ulaanbaatar", score: 100, standard: { offset: 480 } },
- { serverId: "Australia/Perth", clientId: "Australia/Perth", score: 100, standard: { offset: 480, tzname: "WST" } },
- { serverId: "Asia/Seoul", clientId: "Asia/Seoul", score: 100, standard: { offset: 540 } },
- { serverId: "Asia/Tokyo", clientId: "Asia/Tokyo", score: 200, standard: { offset: 540 } },
- { serverId: "Asia/Yakutsk", clientId: "Asia/Yakutsk", score: 100,
- standard: { offset: 540, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "YAKT" },
- daylight: { offset: 600, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "YAKST" }
- },
- { serverId: "Australia/Adelaide", clientId: "Australia/Adelaide", score: 100,
- standard: { offset: 570, mon: 4, week: 1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 4, 1 ], tzname: "CST" },
- daylight: { offset: 630, mon: 10, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 10, 7 ], tzname: "CST" }
- },
- { serverId: "Australia/Darwin", clientId: "Australia/Darwin", score: 100, standard: { offset: 570, tzname: "CST" } },
- { serverId: "Asia/Vladivostok", clientId: "Asia/Vladivostok", score: 100,
- standard: { offset: 600, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "VLAT" },
- daylight: { offset: 660, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "VLAST" }
- },
- { serverId: "Australia/Brisbane", clientId: "Australia/Brisbane", score: 200, standard: { offset: 600, tzname: "EST" } },
- { serverId: "Australia/Hobart", clientId: "Australia/Hobart", score: 100,
- standard: { offset: 600, mon: 4, week: 1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 4, 1 ], tzname: "EST" },
- daylight: { offset: 660, mon: 10, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 10, 7 ], tzname: "EST" }
- },
- { serverId: "Australia/Sydney", clientId: "Australia/Sydney", score: 200,
- standard: { offset: 600, mon: 4, week: 1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 4, 1 ], tzname: "EST" },
- daylight: { offset: 660, mon: 10, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 10, 7 ], tzname: "EST" }
- },
- { serverId: "Pacific/Guam", clientId: "Pacific/Guam", score: 100, standard: { offset: 600, tzname: "ChST" } },
- { serverId: "Asia/Magadan", clientId: "Asia/Magadan", score: 100,
- standard: { offset: 660, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "MAGT" },
- daylight: { offset: 720, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "MAGST" }
- },
- { serverId: "Asia/Kamchatka", clientId: "Asia/Kamchatka", score: 100,
- standard: { offset: 720, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "PETT" },
- daylight: { offset: 780, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "PETST" }
- },
- { serverId: "Pacific/Auckland", clientId: "Pacific/Auckland", score: 100,
- standard: { offset: 720, mon: 4, week: 1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 4, 1 ], tzname: "NZST" },
- daylight: { offset: 780, mon: 9, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 9, 30 ], tzname: "NZDT" }
- },
- { serverId: "Pacific/Fiji", clientId: "Pacific/Fiji", score: 100,
- standard: { offset: 720, mon: 3, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "FJT" },
- daylight: { offset: 780, mon: 10, week: 4, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "FJST" }
- },
- { serverId: "Pacific/Tongatapu", clientId: "Pacific/Tongatapu", score: 100, standard: { offset: 780 } }
- ];
- </script>
- <script src="/zimbra/js/Startup1_1_all.js.zgz?v=110527090709"></script>
- <script src="/zimbra/js/Startup1_2_all.js.zgz?v=110527090709"></script>
- <script type="text/javascript">
- function ZmSkin(e){
- this.hints=this.mergeObjects({
- name:"velodrome2",version:"2.0.0",logo:{
- url:"http://www.comcast.net/"}
- ,banner:{
- position:"static",url:"http://www.comcast.net/"}
- ,userInfo:{
- position:"static"}
- ,search:{
- position:"static"}
- ,quota:{
- position:"static"}
- ,appChooser:{
- direction:"LR"}
- ,helpButton:{
- style:"link",container:"quota",url:""}
- ,logoutButton:{
- style:"link",container:"quota"}
- ,toast:{
- location:"N",transitions:[{
- type:"fade-in",step:10,duration:200}
- ,{
- type:"pause",duration:1000}
- ,{
- type:"fade-out",step:-10,duration:500}
- ]}
- ,skin:{
- containers:"skin_outer"}
- ,tree:{
- minWidth:150,maxWidth:300,containers:["skin_td_outer_tree","skin_outer_tree","skin_col_tree_inner","skin_col_tree"]}
- ,searchBuilder:{
- containers:["skin_container_search_builder_outer","skin_td_search_builder"]}
- ,topToolbar:{
- containers:["skin_tr_top_toolbar","!skin_tr_top_toolbar_shim"]}
- ,bottomToolbar:{
- containers:["skin_tr_bottom_toolbar","!skin_tr_bottom_toolbar_shim"]}
- ,treeFooter:{
- containers:["skin_tr_tree_footer_sep","skin_tr_tree_footer"]}
- ,topAd:{
- containers:["skin_tr_top_ad"]}
- ,sidebarAd:{
- containers:["skin_td_sidebar_ad"]}
- ,fullScreen:{
- containers:["skin_tr_toolbar_full","skin_tr_main_full","!skin_tr_toolbar","!skin_tr_main","!skin_tr_status"]}}
- ,e)
- }
- window.BaseSkin=ZmSkin;
- ZmSkin.prototype={
- show:function(a,r){
- var s=this.hints[a]&&this.hints[a].containers;
- if(s){
- if(typeof s=="function"){
- s(this,r);
- skin._reflowApp();
- return
- }
- if(typeof s=="string"){
- s=[s]
- }
- for(var n=0;
- n<s.length;
- n++){
- var o=s[n];
- var t=o.replace(/^!/,"");
- var e=o!=t;
- this._showEl(t,e?!r:r)
- }
- skin._reflowApp()
- }
- if(a=="fullScreen"){
- this._showFullScreen(r)
- }}
- ,hide:function(e){
- this.show(e,false)
- }
- ,gotoApp:function(e,t){
- appCtxt.getAppController().activateApp(e,null,t)
- }
- ,gotoPrefs:function(e){
- if(appCtxt.getCurrentAppName()!=ZmApp.PREFERENCES){
- var t=new AjxCallback(this,this._gotoPrefPage,[e]);
- this.gotoApp(ZmApp.PREFERENCES,t)
- }else{
- this._gotoPrefPage(e)
- }}
- ,mergeObjects:function(e,o){
- if(e==null){
- e={}
- }
- for(var a=1;
- a<arguments.length;
- a++){
- var n=arguments[a];
- for(var t in n){
- var s=e[t];
- if(typeof s=="object"&&!(s instanceof Array)){
- this.mergeObjects(e[t],n[t]);
- continue
- }
- e[t]=n[t]
- }}
- return e
- }
- ,getTreeWidth:function(){
- return Dwt.getSize(this._getEl(this.hints.tree.containers[0])).x
- }
- ,setTreeWidth:function(e){
- this._setContainerSizes("tree",e,null)
- }
- ,showTopAd:function(e){
- skin._showEl("skin_tr_top_ad",e);
- skin._reflowApp()
- }
- ,hideTopAd:function(){
- skin.showTopAd(false)
- }
- ,getTopAdContainer:function(){
- return skin._getEl("skin_container_top_ad")
- }
- ,showSidebarAd:function(e){
- var t="skin_td_sidebar_ad";
- if(e!=null){
- skin._setSize(t,e)
- }
- skin._showEl(t);
- skin._reflowApp()
- }
- ,hideSidebarAd:function(){
- var e="skin_td_sidebar_ad";
- skin._hideEl(e);
- skin._reflowApp()
- }
- ,getSidebarAdContainer:function(){
- return this._getEl("skin_container_sidebar_ad")
- }
- ,_getEl:function(e){
- return(typeof e=="string"?document.getElementById(e):e)
- }
- ,_showEl:function(n,o){
- var t=this._getEl(n);
- if(!t){
- return
- }
- var a;
- if(o==false){
- a="none"
- }else{
- var e=t.tagName;
- if(e=="TD"&&document.all==null){
- a="table-cell"
- }else{
- if(e=="TR"&&document.all==null){
- a="table-row"
- }else{
- a="block"
- }}}
- t.style.display=a
- }
- ,_hideEl:function(e){
- this._showEl(e,false)
- }
- ,_reparentEl:function(o,e){
- var a=this._getEl(e);
- var t=a&&this._getEl(o);
- if(t){
- a.appendChild(t)
- }}
- ,_setSize:function(o,a,e){
- var t=this._getEl(o);
- if(!t){
- return
- }
- if(a!=null){
- t.style.width=a
- }
- if(e!=null){
- t.style.height=e
- }}
- ,_setContainerSizes:function(n,a,e){
- var o=this.hints[n].containers;
- for(var t=0;
- t<o.length;
- t++){
- this._setSize(o[t],a,null)
- }}
- ,_reflowApp:function(){
- if(window._zimbraMail){
- window._zimbraMail.getAppViewMgr().fitAll()
- }}
- ,_showFullScreen:function(o){
- var a="skin_container_app_top_toolbar";
- var t=o==null||o;
- var e=t?"skin_border_app_top_toolbar_full":"skin_td_app_top_toolbar";
- this._reparentEl(a,e);
- if(AjxEnv.isIE){
- var n=document.getElementById("skin_container_app_main_full");
- if(n){
- Dwt.setVisible(n,t)
- }}}
- ,_gotoPrefPage:function(a){
- if(a==null){
- return
- }
- var o=appCtxt.getApp(ZmApp.PREFERENCES);
- var t=o.getPrefController();
- var e=t.getPrefsView();
- e.selectSection(a)
- }};
- window.skin=new ZmSkin();
- function VelodromeSkin(){
- BaseSkin.call(this,{
- appChooser:{
- direction:"LR",fullWidth:true}
- ,helpButton:{
- style:"link",container:"quota",hideIcon:true,url:"http://www.comcast.net/help/faq/index.jsp?cat=Email#SmartZone"}
- ,logoutButton:{
- style:"link",container:"quota",hideIcon:true}
- ,quota:{
- containers:["skin_td_quota"]}
- ,userInfo:{
- position:"static"}
- ,sidebarAd:{
- containers:function(t,e){
- t._showEl("skin_sidebar_ad_outer",e);
- t._reflowApp()
- }}
- ,fullScreen:{
- containers:["skin_tr_main_full","!skin_tr_main","!skin_td_tree_outer","!skin_td_tree_app_sash"]}
- ,searchBuilder:{
- containers:["skin_tr_search_builder_toolbar","skin_tr_search_builder","skin_td_search_builder_toolbar","skin_td_search_builder"]}
- ,treeFooter:{
- containers:["skin_tr_tree_footer","skin_td_tree_footer","skin_container_tree_footer"]}
- ,tree:{
- containers:["skin_td_tree_outer"],resizeContainers:["skin_col_tree","skin_td_tree_outer"],maxWidth:400}}
- )
- }
- VelodromeSkin.showListeners=[];
- VelodromeSkin.prototype=new BaseSkin;
- VelodromeSkin.prototype.constructor=VelodromeSkin;
- VelodromeSkin.prototype.show=function(h,s){
- ZmFolder.HIDE_ID[ZmFolder.ID_AUTO_ADDED]=true;
- BaseSkin.prototype.show.apply(this,arguments);
- if(h=="fullScreen"){
- s=s==null||s;
- var r=s?"skin_full_toolbar_container":"skin_main_toolbar_container";
- var n=document.getElementById(r);
- var o="skin_container_app_top_toolbar";
- var e=document.getElementById(o);
- n.appendChild(e)
- }
- if(!this._hasRunListeners){
- var a=VelodromeSkin.showListeners;
- for(var t=0;
- t<a.length;
- t++){
- if(a[t] instanceof AjxCallback){
- a[t].run()
- }}
- this._hasRunListeners=true
- }};
- VelodromeSkin.prototype.getSidebarAdContainer=function(){
- return document.getElementById("skin_container_sidebar_ad")
- };
- VelodromeSkin.prototype._getPortalToolBarOps=function(){
- return[]
- };
- VelodromeSkin.prototype.setTreeWidth=function(e){
- ZmSkin.prototype.setTreeWidth.call(this,e)
- };
- VelodromeSkin.prototype._setContainerSizes=function(n,a,e){
- var o=this.hints[n].resizeContainers||this.hints[n].containers;
- for(var t=0;
- t<o.length;
- t++){
- this._setSize(o[t],a,null)
- }};
- skin=new VelodromeSkin();
- skin.__handleMailLaunch=function(){
- appCtxt.set(ZmSetting.SEND_ON_BEHALF_OF,true)
- };
- ZmZimbraMail.addAppListener(ZmApp.MAIL,ZmAppEvent.PRE_LAUNCH,new AjxListener(skin,skin.__handleMailLaunch));
- VelodromeSkin.prototype.__handleVoiceLaunch=function(){
- ZmVoiceApp.overviewFallbackApp=ZmApp.MAIL
- };
- ZmZimbraMail.addAppListener(ZmApp.VOICE,ZmAppEvent.PRE_LAUNCH,new AjxListener(skin,skin.__handleVoiceLaunch));
- skin.__handlePortalLaunch=function(){
- this.overrideAPI(ZmPortalController.prototype,"_getToolBarOps",this._getPortalToolBarOps)
- };
- AjxDispatcher.addPackageLoadFunction("Portal",new AjxCallback(skin,skin.__handlePortalLaunch));
- VelodromeSkin.prototype.overrideAPI=function(a,t,o){
- o=o||this[t];
- if(o){
- var e=a[t];
- a[t]=function(){
- o.func=e;
- return o.apply(this,arguments)
- };
- a[t].func=e
- }};
- VelodromeSkin.prototype.setShortcut=function(e){};
- skin.overrideAPI(DwtMenuItem.prototype,"setShortcut");
- skin.overrideAPI(ZmContactsApp.prototype,"_registerPrefs",function(){}
- );
- VelodromeSkin.prototype._noImportExport_handlePrefsPreLaunch=function(){
- var e="IMPORT_FOLDER";
- var t=ZmPref.getPrefSectionWithPref(e);
- ZmPref.unregisterPrefSection(t&&t.id);
- e="CHECKED_ZIMLETS";
- t=ZmPref.getPrefSectionWithPref(e);
- ZmPref.unregisterPrefSection(t&&t.id)
- };
- ZmZimbraMail.addAppListener(ZmApp.PREFERENCES,ZmAppEvent.PRE_LAUNCH,new AjxListener(skin,skin._noImportExport_handlePrefsPreLaunch));
- VelodromeSkin.prototype._collapseImapTrees_handlePreStartup=function(){
- appCtxt.set(ZmSetting.COLLAPSE_IMAP_TREES,true)
- };
- ZmZimbraMail.addListener(ZmAppEvent.PRE_STARTUP,new AjxListener(skin,skin._collapseImapTrees_handlePreStartup));
- VelodromeSkin.prototype._saveToImapSent_handlePreStartup=function(){
- appCtxt.set(ZmSetting.SAVE_TO_IMAP_SENT,true)
- };
- ZmZimbraMail.addListener(ZmAppEvent.PRE_STARTUP,new AjxListener(skin,skin._saveToImapSent_handlePreStartup));
- VelodromeSkin.prototype._MailList_initializeToolBar=function(t){
- arguments.callee.func.call(this,t);
- var e=this._toolbar[t];
- if(e){
- var a;
- a=e.getButton(ZmOperation.CHECK_MAIL);
- if(a){
- if(!appCtxt.isOffline){
- var o=(appCtxt.get(ZmSetting.GET_MAIL_ACTION)==ZmSetting.GETMAIL_ACTION_DEFAULT)?ZmMsg.checkMailPrefDefault_velodrome:ZmMsg.checkMailPrefUpdate_velodrome;
- a.setToolTipContent(o)
- }}
- a=e.getButton(ZmOperation.PRINT);
- if(a){
- a.setText(ZmMsg.print)
- }
- if(!appCtxt.isChildWindow){
- a=e.getButton(ZmOperation.MOVE);
- if(a){
- a.setText(ZmMsg.move)
- }
- a=e.getButton(ZmOperation.DELETE_MENU);
- if(a){
- a.setText(ZmMsg.del)
- }
- a=e.getButton(ZmOperation.DELETE);
- if(a){
- a.setText(ZmMsg.del)
- }
- if(AjxEnv.is800x600orLower){
- a=e.getButton(REPLY);
- if(a){
- a.setText("")
- }
- a=e.getButton(REPLY_ALL);
- if(a){
- a.setText("")
- }}}}};
- VelodromeSkin.prototype._DoublePane_getToolBarOps=VelodromeSkin.prototype._MailList_getToolBarOps=function(){
- if(appCtxt.isChildWindow){
- return[ZmOperation.PRINT,ZmOperation.CLOSE]
- }
- var e=this._getDefaultToolBarOps();
- e.push(ZmOperation.SEP,ZmOperation.VIEW_MENU);
- return e
- };
- VelodromeSkin.prototype._Msg_getToolBarOps=VelodromeSkin.prototype._Conv_getToolBarOps=function(){
- if(appCtxt.isChildWindow){
- return[ZmOperation.PRINT,ZmOperation.CLOSE]
- }
- var e=this._getDefaultToolBarOps();
- e.push(ZmOperation.TAG_MENU,ZmOperation.SEP);
- if(appCtxt.get(ZmSetting.DETACH_MAILVIEW_ENABLED)){
- e.push(ZmOperation.DETACH)
- }
- return e
- };
- VelodromeSkin.prototype._Mail_getDefaultToolBarOps=function(){
- var e=[];
- e.push(ZmOperation.NEW_MENU,ZmOperation.CHECK_MAIL,ZmOperation.SEP,ZmOperation.REPLY,ZmOperation.REPLY_ALL,ZmOperation.FORWARD,ZmOperation.SEP,ZmOperation.EDIT);
- e.push((window.ZmConvController&&this instanceof ZmConvController)?ZmOperation.DELETE_MENU:ZmOperation.DELETE);
- e.push(ZmOperation.MOVE,ZmOperation.SPAM,ZmOperation.PRINT);
- return e
- };
- VelodromeSkin.prototype._Mail_resetOperations=function(n,a){
- arguments.callee.func.call(this,n,a);
- if(n&&n instanceof ZmToolBar){
- var s;
- var e=this._getSearchFolderId();
- if(a==1&&(e!=ZmFolder.ID_DRAFTS)){
- var r=this._listView[this._currentView].getSelection();
- if(r&&r.length){
- s=r[0]
- }}
- var t=(s&&s.isDraft)||(e==ZmFolder.ID_DRAFTS);
- var o=n.getButton&&n.getButton(ZmOperation.VIEW_MENU);
- if(o){
- var h=o.getMenu();
- if(h){
- h.enable(ZmOperation.DETACH,(appCtxt.get(ZmSetting.DETACH_MAILVIEW_ENABLED)&&!t&&a==1))
- }}}};
- VelodromeSkin.prototype._Mail_setupGroupByMenuItems=function(e,a){
- arguments.callee.func.call(this,e,a);
- if(a){
- var t=a.createMenuItem(ZmOperation.DETACH,{
- image:"OpenInNewWindow",text:ZmMsg.detach}
- );
- t.addSelectionListener(this._listeners[ZmOperation.DETACH])
- }};
- VelodromeSkin.prototype._createComcastAppIconButton=function(){
- if(!appCtxt.isChildWindow){
- VelodromeSkin.prototype._Msg_getTabParams=function(t,e){
- return{
- id:t,image:"MessageView",textPrecedence:85,tooltip:ZmMsgController.DEFAULT_TAB_TEXT,tabCallback:e,hasIcon:true}
- };
- VelodromeSkin.prototype._Compose_getTabParams=function(){
- return{
- id:this.tabId,image:"NewMessage",textPrecedence:75,tooltip:ZmComposeController.DEFAULT_TAB_TEXT,hasIcon:true}
- };
- ComcastAppIconButton=function(e){
- if(arguments.length==0){
- return
- }
- ZmAppButton.call(this,e)
- };
- ComcastAppIconButton.prototype=new ZmAppButton;
- ComcastAppIconButton.prototype.constructor=ComcastAppIconButton;
- ComcastAppIconButton.prototype.toString=function(){
- return"ComcastAppIconButton"
- };
- ComcastAppIconButton.prototype.TEMPLATE="share.Widgets#ZmAppChooserIconButton";
- VelodromeSkin.prototype._appChooser_addButton=function(o,a){
- var t={
- parent:this,id:ZmId.getButtonId(ZmId.APP,o),text:a.text,image:a.image,index:a.index};
- var e=(a.hasIcon)?new ComcastAppIconButton(t):new ZmAppButton(t);
- e.setToolTipContent(a.tooltip);
- e.textPrecedence=a.textPrecedence;
- e.imagePrecedence=a.imagePrecedence;
- e.setData(Dwt.KEY_ID,o);
- e.addSelectionListener(this._buttonListener);
- this._buttons[o]=e;
- if(e.textPrecedence||e.imagePrecedence){
- this._createPrecedenceList()
- }
- this.adjustSize();
- return e
- }
- }};
- VelodromeSkin.prototype._mail_handleStartup2Load=function(){
- if(appCtxt&&!appCtxt.isChildWindow){
- this._createComcastAppIconButton();
- var e=window.ZmAppChooser&&ZmAppChooser.prototype;
- if(e){
- this.overrideAPI(ZmAppChooser.prototype,"addButton",this._appChooser_addButton)
- }}};
- AjxDispatcher.addPackageLoadFunction("Startup2",new AjxCallback(skin,skin._mail_handleStartup2Load));
- VelodromeSkin.prototype._mail_handleMailCoreLoad=function(){
- var e=window.ZmDoublePaneController&&ZmDoublePaneController.prototype;
- if(e){
- this.overrideAPI(e,"_getToolBarOps",this._DoublePane_getToolBarOps);
- this.overrideAPI(e,"_getDefaultToolBarOps",this._Mail_getDefaultToolBarOps);
- this.overrideAPI(e,"_resetOperations",this._Mail_resetOperations)
- }
- var e=window.ZmMailListController&&ZmMailListController.prototype;
- if(e){
- this.overrideAPI(e,"_initializeToolBar",this._MailList_initializeToolBar);
- this.overrideAPI(e,"_getToolBarOps",this._MailList_getToolBarOps);
- this.overrideAPI(e,"_getDefaultToolBarOps",this._Mail_getDefaultToolBarOps);
- this.overrideAPI(e,"_resetOperations",this._Mail_resetOperations);
- this.overrideAPI(e,"_setupGroupByMenuItems",this._Mail_setupGroupByMenuItems)
- }
- ZmOperation.NEW_ITEM_KEY[ZmOperation.NEW_MESSAGE]="newMessage";
- ZmOperation.NEW_ITEM_KEY[ZmOperation.NEW_FOLDER]="newFolder"
- };
- VelodromeSkin.prototype._mail_handleMailLoad=function(){
- var e=window.ZmMsgController&&ZmMsgController.prototype;
- if(e){
- this.overrideAPI(e,"_getToolBarOps",this._Msg_getToolBarOps);
- this.overrideAPI(e,"_getDefaultToolBarOps",this._Mail_getDefaultToolBarOps);
- this.overrideAPI(e,"_getTabParams",this._Msg_getTabParams)
- }
- var e=window.ZmConvController&&ZmConvController.prototype;
- if(e){
- this.overrideAPI(e,"_getToolBarOps",this._Conv_getToolBarOps);
- this.overrideAPI(e,"_getDefaultToolBarOps",this._Mail_getDefaultToolBarOps);
- this.overrideAPI(e,"_resetOperations",this._Mail_resetOperations)
- }
- var e=window.ZmComposeController&&ZmComposeController.prototype;
- if(e){
- this.overrideAPI(e,"_getTabParams",this._Compose_getTabParams)
- }};
- AjxDispatcher.addPackageLoadFunction("MailCore",new AjxCallback(skin,skin._mail_handleMailCoreLoad));
- AjxDispatcher.addPackageLoadFunction("Mail",new AjxCallback(skin,skin._mail_handleMailLoad));
- skin.overrideAPI(ZmVoiceApp.prototype,"getVoiceInfo",function(r,o,s,e){
- skin.__handleVoiceLoad();
- if(!this.phones.length||e){
- if(!this._gettingVoiceInfo||e){
- this.phones.length=0;
- var n=AjxSoapDoc.create("GetVoiceInfoExtRequest","urn:zimbraVoice");
- var a=n.set("prd","true");
- var h=new AjxCallback(this,this._handleResponseVoiceInfo);
- var l=new AjxCallback(this,this._handleErrorResponseVoiceInfo);
- var t={
- soapDoc:n,asyncMode:true,noBusyOverlay:s,callback:h,errorCallback:l};
- appCtxt.getAppController().sendRequest(t);
- this._gettingVoiceInfo=true
- }
- if(r){
- this._voiceInfoCallbacks=this._voiceInfoCallbacks||[];
- this._voiceInfoCallbacks.push(r)
- }
- if(o){
- this._voiceInfoErrorCallbacks=this._voiceInfoErrorCallbacks||[];
- this._voiceInfoErrorCallbacks.push(o)
- }}else{
- if(r){
- r.run()
- }}}
- );
- skin.overrideAPI(ZmVoiceApp.prototype,"_handleResponseVoiceInfo2",function(){
- skin.__handleVoiceLoad();
- return arguments.callee.func.apply(this,arguments)
- }
- );
- VelodromeSkin.prototype.__handleVoiceLoad=function(){
- if(!this.__hasOverriddenVoice&&window.ZmPhone){
- this.__hasOverriddenVoice=true;
- skin.overrideAPI(ZmPhone.prototype,"_loadFromDom",function(e){
- this.hasTextMessaging=e.textmsg;
- this.sns=e.sns;
- this.textmsg_users=e.textmsg_users;
- return arguments.callee.func.apply(this,arguments)
- }
- )
- }};
- AjxDispatcher.addPackageLoadFunction("Voice",new AjxCallback(skin,skin.__handleVoiceLoad));
- VelodromeSkin.prototype._getContactListToolBarOps=function(){
- return[ZmOperation.NEW_MENU,ZmOperation.SEP,ZmOperation.EDIT,ZmOperation.SEP,ZmOperation.DELETE,ZmOperation.PRINT,ZmOperation.SEP,ZmOperation.TAG_MENU]
- };
- VelodromeSkin.prototype._getContactListActionMenuOps=function(){
- var e=this._participantOps();
- e.push(ZmOperation.SEP,ZmOperation.TAG_MENU,ZmOperation.DELETE,ZmOperation.PRINT_CONTACT);
- return e
- };
- VelodromeSkin.prototype.addRow=function(e,t){
- arguments.callee.func.apply(this,arguments);
- if(this._rowCount>=this._maxRows){
- return
- }
- if(t==null){
- t=this._rowCount-1
- }
- e=e||(this._rowDef&&AjxUtil.createProxy(this._rowDef));
- if(!e){
- return
- }
- e.id=e.id||this._items[t].id;
- var a={};
- a.id=e.id+"_helptext";
- a.visible="true";
- var n=this._registerControl(a,null,null,null,null,"DwtLabel");
- var o=this._items[e.id];
- o._helpId=a.id;
- this._setControlIds(o.id,t);
- if(this._itemDef.id=="EMAIL"){
- this._setFirstHelpText(ZmMsg.contactEditAddRemoveHelp)
- }};
- VelodromeSkin.prototype.removeRow=function(e){
- arguments.callee.func.apply(this,arguments);
- if(this._itemDef.id=="EMAIL"){
- this._setFirstHelpText(ZmMsg.contactEditAddRemoveHelp)
- }};
- VelodromeSkin.prototype._setFirstHelpText=function(o){
- for(var e=0;
- e<this._rowCount;
- e++){
- var a=this._items[e]._helpId;
- if(a){
- var t=this._items[a].control;
- if(t){
- t.setText((e==0)?o:"")
- }}}};
- VelodromeSkin.prototype._setControlIds=function(o,e){
- arguments.callee.func.apply(this,arguments);
- var n=[this.getHTMLElId(),e].join("_");
- var t=this._items[o];
- var a=this._items[t._helpId];
- this._setControlId(a&&a.control,n+"_helptext")
- };
- VelodromeSkin.prototype._handleContactsLoad=function(){
- var e=window.ZmContactListController&&ZmContactListController.prototype;
- if(e){
- this.overrideAPI(e,"_getToolBarOps",this._getContactListToolBarOps);
- this.overrideAPI(e,"_getActionMenuOps",this._getContactListActionMenuOps)
- }
- var e=window.ZmEditContactViewInputSelectRows&&ZmEditContactViewInputSelectRows.prototype;
- if(e){
- this.overrideAPI(e,"addRow",this.addRow);
- this.overrideAPI(e,"removeRow",this.removeRow);
- this.overrideAPI(e,"_setControlIds",this._setControlIds);
- this.overrideAPI(e,"_setFirstHelpText",this._setFirstHelpText)
- }
- ZmEditContactViewRows.prototype.ROW_TEMPLATE="abook.Contacts#ZmEditContactViewRow"
- };
- VelodromeSkin.prototype._handleContactsCoreLoad=function(){
- ZmOperation.NEW_ITEM_KEY[ZmOperation.NEW_CONTACT]="newContact";
- ZmOperation.NEW_ITEM_KEY[ZmOperation.NEW_GROUP]="newGroup"
- };
- AjxDispatcher.addPackageLoadFunction("Contacts",new AjxCallback(skin,skin._handleContactsLoad));
- AjxDispatcher.addPackageLoadFunction("ContactsCore",new AjxCallback(skin,skin._handleContactsCoreLoad));
- VelodromeSkin.prototype._SignaturesPage_initialize=function(t){
- t.getHtmlElement().innerHTML=AjxTemplate.expand(ZmSignaturesPage.SIGNATURE_TEMPLATE,{
- id:this._htmlElId}
- );
- var h=document.getElementById(this._htmlElId+"_SIG_LIST");
- var l=new ZmSignatureListView(this);
- this._replaceControlElement(h,l);
- l.setMultiSelect(false);
- l.addSelectionListener(new AjxListener(this,this._selectionListener));
- l.setUI(null,true);
- this._sigList=l;
- var a=document.getElementById(this._htmlElId+"_SIG_NAME");
- var n={
- parent:this,type:DwtInputField.STRING,required:true,validationStyle:DwtInputField.CONTINUAL_VALIDATION,validator:AjxCallback.simpleClosure(this._updateName,this)};
- var d=this._sigName=new DwtInputField(n);
- this._replaceControlElement(a,d);
- var c=document.getElementById(this._htmlElId+"_SIG_FORMAT");
- if(c&&appCtxt.get(ZmSetting.HTML_COMPOSE_ENABLED)){
- var u=new DwtSelect(this);
- u.setToolTipContent(ZmMsg.formatTooltip);
- u.addOption(ZmMsg.formatAsText,1,true);
- u.addOption(ZmMsg.formatAsHtml,0,false);
- u.addChangeListener(new AjxListener(this,this._handleFormatSelect));
- this._replaceControlElement(c,u);
- this._sigFormat=u
- }
- var e=document.getElementById(this._htmlElId+"_SIG_BUTTON");
- var s=new DwtButton(this);
- s.setText(ZmMsg.del);
- s.addSelectionListener(new AjxListener(this,this._handleDeleteButton));
- this._replaceControlElement(e,s);
- this._sigBtn=s;
- var o=document.getElementById(this._htmlElId+"_SIG_EDITOR");
- var r=new ZmSignatureEditor(this);
- this._replaceControlElement(o,r);
- this._sigEditor=r
- };
- VelodromeSkin.prototype._SignaturesPage_validate=function(){
- if(this._selSignature){
- this._updateSignature()
- }
- var h=this.getAllSignatures(true);
- var e=appCtxt.get(ZmSetting.SIGNATURE_MAX_LENGTH);
- for(var n=0;
- n<h.length;
- n++){
- var t=h[n];
- var r=(t.name.replace(/\s*/g,"")=="");
- var o=(t.value.replace(/\s*/g,"")=="");
- var l=new RegExp("^"+ZmMsg.signature+"\\s#(\\d+)$","i");
- var a=t.name.match(l);
- if(r&&o){
- this._deleteSignature(t)
- }else{
- if(r||(o&&!a)){
- this._errorMsg=r?ZmMsg.signatureNameMissingRequired:ZmMsg.signatureValueMissingRequired;
- return false
- }}
- var s=t.value;
- if(s.length>e){
- this._errorMsg=AjxMessageFormat.format((t.contentType==ZmMimeTable.TEXT_HTML)?ZmMsg.errorHtmlSignatureTooLong:ZmMsg.errorSignatureTooLong,e);
- return false
- }}
- return true
- };
- VelodromeSkin.prototype._preferences_handlePreferencesLoad=function(){
- var e=window.ZmSignaturesPage&&ZmSignaturesPage.prototype;
- if(e){
- this.overrideAPI(e,"_initialize",this._SignaturesPage_initialize);
- this.overrideAPI(e,"validate",this._SignaturesPage_validate)
- }};
- AjxDispatcher.addPackageLoadFunction("Preferences",new AjxCallback(skin,skin._preferences_handlePreferencesLoad));
- VelodromeSkin.F_homeAddress="homeAddress";
- VelodromeSkin.F_otherAddress="otherAddress";
- VelodromeSkin.F_otherAnniversary="otherAnniversary";
- VelodromeSkin.F_otherAsstName="otherAsstName";
- VelodromeSkin.F_otherCustom="otherCustom";
- VelodromeSkin.F_otherDepartment="otherDepartment";
- VelodromeSkin.F_otherMgrName="otherMgrName";
- VelodromeSkin.F_otherOffice="otherOffice";
- VelodromeSkin.F_otherProfession="otherProfession";
- VelodromeSkin.F_tollFree="tollFree";
- VelodromeSkin.F_workAddress="workAddress";
- VelodromeSkin.F_workEmail="workEmail";
- VelodromeSkin.F_workIMAddress="workIM";
- VelodromeSkin.F_workMobile="workMobile";
- VelodromeSkin.F_imNone="_NONE";
- VelodromeSkin.F_imYahoo="yahoo";
- VelodromeSkin.F_imAOL="aol";
- VelodromeSkin.F_imMSN="msn";
- VelodromeSkin.F_imOther="other";
- VelodromeSkin.prototype._customContactFields_packageLoad=function(){
- window.VelodromeSkinOther=function(){
- ZmEditContactViewOther.apply(this,arguments)
- };
- VelodromeSkinOther.prototype=new ZmEditContactViewOther;
- VelodromeSkinOther.prototype.constructor=VelodromeSkinOther;
- VelodromeSkinOther.prototype.DATE_ATTRS={
- birthday:true,otherAnniversary:true};
- VelodromeSkinOther.prototype._createSelect=function(){
- var t=ZmEditContactViewInputSelect.prototype._createSelect.apply(this,arguments);
- t.addChangeListener(new AjxListener(this,this._resetPicker));
- return t
- };
- ZmEditContactView.updateFieldLists();
- ZmEditContactView.LISTS.EMAIL.onlyvalue=false;
- ZmEditContactView.LISTS.IM.onlyvalue=false;
- ZmEditContactView.LISTS.VELODROME_ADDRESS=ZmEditContactView.LISTS.ADDRESS;
- ZmEditContactView.ATTRS.DEPARTMENT=VelodromeSkin.F_otherDepartment;
- delete ZmEditContactView.LISTS.ADDRESS;
- ZmEditContactView.ALWAYS_SHOW={
- FIRST:true,LAST:true,TITLE:true,COMPANY:true};
- var e=ZmEditContactView.prototype;
- this.overrideAPI(e,"getFormItems");
- this.overrideAPI(e,"getEmailOptions");
- this.overrideAPI(e,"getPhoneOptions");
- this.overrideAPI(e,"getIMOptions");
- this.overrideAPI(e,"getIMOptions2");
- this.overrideAPI(e,"getAddressOptions");
- this.overrideAPI(e,"getURLOptions");
- this.overrideAPI(e,"getOtherOptions");
- this.overrideAPI(e,"getFileAsOptions")
- };
- VelodromeSkin.prototype._customContactFields_basePackageLoad=function(){
- ZmContact.EMAIL_FIELDS=[ZmContact.F_email,VelodromeSkin.F_workEmail];
- ZmContact.PHONE_FIELDS=[ZmContact.F_mobilePhone,ZmContact.F_homePhone,ZmContact.F_otherPhone,ZmContact.F_homeFax,ZmContact.F_pager,ZmContact.F_workPhone,VelodromeSkin.F_workMobile,ZmContact.F_workAltPhone,ZmContact.F_workFax,ZmContact.F_assistantPhone,ZmContact.F_companyPhone,ZmContact.F_otherFax,VelodromeSkin.F_tollFree];
- ZmContact.IM_FIELDS=[ZmContact.F_imAddress,VelodromeSkin.F_workIMAddress];
- ZmContact.ADDRESS_FIELDS=[VelodromeSkin.F_homeAddress,VelodromeSkin.F_workAddress,VelodromeSkin.F_otherAddress];
- ZmContact.OTHER_FIELDS=[ZmContact.F_birthday,VelodromeSkin.F_otherAnniversary,VelodromeSkin.F_otherOffice,VelodromeSkin.F_otherProfession,VelodromeSkin.F_otherMgrName,VelodromeSkin.F_otherAsstName,VelodromeSkin.F_otherCustom];
- ZmContact.updateFieldConstants();
- ZmContact.IS_ADDONE[VelodromeSkin.F_workEmail]=true;
- ZmContact.IS_ADDONE[VelodromeSkin.F_workIMAddress]=true;
- ZmContact.IS_ADDONE[VelodromeSkin.F_otherCustom]=true;
- ZmContact.IGNORE_NORMALIZATION=[ZmContact.F_homePhone]
- };
- VelodromeSkin.prototype.getFormItems=function(){
- var t=arguments.callee.func.apply(this,arguments);
- if(!t._modified){
- t._modified=true;
- var o=this.getFormItemById("IM",t);
- o.type="ZmEditContactViewInputDoubleSelectRows";
- o.rowitem={
- type:"ZmEditContactViewIMDouble",equals:ZmEditContactViewInputSelect.equals,params:{
- hint:ZmMsg.imScreenNameHint,cols:60,options:this.getIMOptions(),options2:this.getIMOptions2()}};
- o.maxrows=4;
- var a=this.getFormItemById("ADDRESS",t);
- a.id="VELODROME_ADDRESS",a.rowitem={
- type:"ZmEditContactViewInputSelect",equals:ZmEditContactViewInputSelect.equals,template:"abook.Contacts#ZmEditContactViewAddressSelect",params:{
- hint:"Address",cols:40,rows:3,options:this.getAddressOptions()}};
- var e=this.getFormItemById("OTHER",t);
- e.rowitem.type="VelodromeSkinOther"
- }
- return t
- };
- VelodromeSkin.prototype.getEmailOptions=function(){
- return[{
- value:ZmContact.F_email,label:"Home",max:3}
- ,{
- value:VelodromeSkin.F_workEmail,label:"Work",max:3}
- ]
- };
- VelodromeSkin.prototype.getPhoneOptions=function(){
- return[{
- value:ZmContact.F_mobilePhone,label:"Mobile",max:1}
- ,{
- value:ZmContact.F_homePhone,label:"Home",max:1}
- ,{
- value:ZmContact.F_otherPhone,label:"Home Alternate",max:1}
- ,{
- value:ZmContact.F_homeFax,label:"Home Fax",max:1}
- ,{
- value:ZmContact.F_pager,label:"Work Pager",max:1}
- ,{
- value:ZmContact.F_workPhone,label:"Work",max:1}
- ,{
- value:VelodromeSkin.F_workMobile,label:"Work Mobile",max:1}
- ,{
- value:ZmContact.F_workAltPhone,label:"Work Alternate",max:1}
- ,{
- value:ZmContact.F_workFax,label:"Work Fax",max:1}
- ,{
- value:ZmContact.F_assistantPhone,label:"Assistant",max:1}
- ,{
- value:ZmContact.F_companyPhone,label:"Company",max:1}
- ,{
- value:ZmContact.F_otherFax,label:"Other Fax",max:1}
- ,{
- value:VelodromeSkin.F_tollFree,label:"Toll Free",max:1}
- ]
- };
- VelodromeSkin.prototype.getIMOptions2=function(){
- return[{
- value:VelodromeSkin.F_imNone,label:ZmMsg.none}
- ,{
- value:VelodromeSkin.F_imYahoo,label:ZmMsg.imGateway_yahoo}
- ,{
- value:VelodromeSkin.F_imAOL,label:ZmMsg.imGateway_aol}
- ,{
- value:VelodromeSkin.F_imMSN,label:ZmMsg.imGateway_msn}
- ,{
- value:VelodromeSkin.F_imOther,label:ZmMsg.other}
- ]
- };
- VelodromeSkin.prototype.getIMOptions=function(){
- return[{
- value:ZmContact.F_imAddress,label:"Home",max:2}
- ,{
- value:VelodromeSkin.F_workIMAddress,label:"Work",max:2}
- ]
- };
- VelodromeSkin.prototype.getAddressOptions=function(){
- return[{
- value:VelodromeSkin.F_homeAddress,label:"Home",max:1}
- ,{
- value:VelodromeSkin.F_workAddress,label:"Work",max:1}
- ,{
- value:VelodromeSkin.F_otherAddress,label:ZmMsg.other,max:1}
- ]
- };
- VelodromeSkin.prototype.getURLOptions=function(){
- return[{
- value:ZmContact.F_homeURL,label:"Home",max:1}
- ,{
- value:ZmContact.F_workURL,label:"Work",max:1}
- ]
- };
- VelodromeSkin.prototype.getOtherOptions=function(){
- return[{
- value:ZmContact.F_birthday,label:"Birthday",max:1}
- ,{
- value:VelodromeSkin.F_otherAnniversary,label:"Anniversary",max:1}
- ,{
- value:VelodromeSkin.F_otherOffice,label:"Office",max:1}
- ,{
- value:VelodromeSkin.F_otherProfession,label:"Profession",max:1}
- ,{
- value:VelodromeSkin.F_otherMgrName,label:"Manager",max:1}
- ,{
- value:VelodromeSkin.F_otherAsstName,label:"Assistant",max:1}
- ,{
- value:VelodromeSkin.F_otherCustom,label:"Custom",max:4}
- ]
- };
- VelodromeSkin.prototype.getFileAsOptions=function(){
- return arguments.callee.func.apply(this,arguments)
- };
- AjxDispatcher.addPackageLoadFunction("Contacts",new AjxCallback(skin,skin._customContactFields_packageLoad));
- AjxDispatcher.addPackageLoadFunction("ContactsCore",new AjxCallback(skin,skin._customContactFields_basePackageLoad));
- JSON=function(){};
- (function(){
- function e(t){
- return t<10?"0"+t:t
- }
- if(typeof Date.prototype.toJSON!=="function"){
- Date.prototype.toJSON=function(t){
- return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"Z":null
- }
- }
- String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(t){
- return this.valueOf()
- }
- }
- )();
- JSON.cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
- JSON.escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
- JSON.meta={
- "\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};
- JSON.rep;
- JSON.quote=function(e){
- JSON.escapable.lastIndex=0;
- return JSON.escapable.test(e)?'"'+e.replace(JSON.escapable,function(t){
- var o=JSON.meta[t];
- return typeof o==="string"?o:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)
- }
- )+'"':'"'+e+'"'
- };
- JSON.str=function(h,n){
- var a,t,l,e,s=JSON.gap,o,r=n[h];
- if(r&&typeof r==="object"&&typeof r.toJSON==="function"){
- r=r.toJSON(h)
- }
- if(typeof JSON.rep==="function"){
- r=JSON.rep.call(n,h,r)
- }
- switch(typeof r){
- case"string":return JSON.quote(r);
- case"number":return isFinite(r)?String(r):"null";
- case"boolean":case"null":return String(r);
- case"object":if(!r){
- return"null"
- }
- JSON.gap+=JSON.indent;
- o=[];
- if(Object.prototype.toString.apply(r)==="[object Array]"){
- e=r.length;
- for(a=0;
- a<e;
- a+=1){
- o[a]=JSON.str(a,r)||"null"
- }
- l=o.length===0?"[]":JSON.gap?"[\n"+JSON.gap+o.join(",\n"+JSON.gap)+"\n"+s+"]":"["+o.join(",")+"]";
- JSON.gap=s;
- return l
- }
- if(JSON.rep&&typeof JSON.rep==="object"){
- e=JSON.rep.length;
- for(a=0;
- a<e;
- a+=1){
- t=JSON.rep[a];
- if(typeof t==="string"){
- l=JSON.str(t,r);
- if(l){
- o.push(JSON.quote(t)+(JSON.gap?": ":":")+l)
- }}}}else{
- for(t in r){
- if(Object.hasOwnProperty.call(r,t)){
- l=JSON.str(t,r);
- if(l){
- o.push(JSON.quote(t)+(JSON.gap?": ":":")+l)
- }}}}
- l=o.length===0?"{}":JSON.gap?"{\n"+JSON.gap+o.join(",\n"+JSON.gap)+"\n"+s+"}":"{"+o.join(",")+"}";
- JSON.gap=s;
- return l
- }};
- JSON.stringify=function(o,t,a){
- var e;
- JSON.gap="";
- JSON.indent="";
- if(typeof a==="number"){
- for(e=0;
- e<a;
- e+=1){
- JSON.indent+=" "
- }}else{
- if(typeof a==="string"){
- JSON.indent=a
- }}
- JSON.rep=t;
- if(t&&typeof t!=="function"&&(typeof t!=="object"||typeof t.length!=="number")){
- throw new Error("JSON.stringify")
- }
- return JSON.str("",{
- "":o}
- )
- };
- JSON.parse=function(text,reviver){
- var j;
- var walk=function walk(holder,key){
- var k,v,value=holder[key];
- if(value&&typeof value==="object"){
- for(k in value){
- if(Object.hasOwnProperty.call(value,k)){
- v=walk(value,k);
- if(v!==undefined){
- value[k]=v
- }else{
- delete value[k]
- }}}}
- return reviver.call(holder,key,value)
- };
- text=String(text);
- JSON.lastIndex=0;
- if(JSON.cx.test(text)){
- text=text.replace(JSON.cx,function(a){
- return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)
- }
- )
- }
- if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){
- j=eval("("+text+")");
- return typeof reviver==="function"?walk({
- "":j}
- ,""):j
- }
- throw new SyntaxError("JSON.parse")
- };
- window.PLAXO_URL_BASE="http://calendar.comcast.net";
- window.CIMA_URL="https://login.comcast.net/api/web-access?c=cal";
- Comcast_plaxosync_map={};
- Comcast_plaxosync_map.z2p={
- anniversary:"anniversary",assistantPhone:"assistantPhone",birthday:"birthday",callbackPhone:"callbackPhone",carPhone:"carPhone",company:"company",companyPhone:"companyPhone",department:"deptName",email:"homeEmail1",email2:"homeEmail2",email3:"homeEmail3",firstName:"firstName",homeCity:"homeCity",homeCountry:"homeCountry",homeFax:"homeFax",homePhone:"homePhone1",homePhone2:"homePhone2",homePostalCode:"homePostalCode",homeState:"homeState",homeStreet:"homeAddress",homeURL:"homeWebPage",image:"workPhotoURL",jobTitle:"jobTitle",lastName:"lastName",middleName:"middleName",mobilePhone:"homeMobile",namePrefix:"nameTitle",nameSuffix:"nameSuffix",nickname:"nickname",otherCity:"otherCity",otherCountry:"otherCountry",otherFax:"otherFax",otherPhone:"otherPhone",otherPostalCode:"otherPostalCode",otherState:"otherState",otherStreet:"otherAddress",pager:"workPager",workCity:"workCity",workCountry:"workCountry",workEmail1:"workEmail1",workEmail2:"workEmail2",workEmail3:"workEmail3",workFax:"workFax",workMobile:"workMobile",workPhone:"workPhone1",workAltPhone:"workPhone2",workPostalCode:"workPostalCode",workState:"workState",workStreet:"workStreet",workURL:"workWebPage",workCardMessage:"workCardMessage",homeCardMessage:"homeCardMessage",fullName:null,itemId:"itemId"};
- Comcast_plaxosync_map.p2z={};
- for(var key in Comcast_plaxosync_map.z2p){
- if(Comcast_plaxosync_map.z2p[key]){
- Comcast_plaxosync_map.p2z[Comcast_plaxosync_map.z2p[key]]=key
- }}
- Comcast_plaxosync_map.p2z.email="email";
- Comcast_plaxosync_map.im_z2p={
- imAddress:"homeIMList",workIM:"workIMList"};
- Comcast_plaxosync_map.imPattern=/(\w+):\/\/(.+)/;
- Comcast_plaxosync_map.map=function(s,o){
- if(AjxUtil.isObject(o)){
- if(AjxUtil.isArray(s)){
- var n=[];
- for(var a=0;
- a<s.length;
- a++){
- n.push(Comcast_plaxosync_map.map(s[a],o))
- }
- return n
- }else{
- if(AjxUtil.isObject(s)){
- var n={};
- for(var t in s){
- if(t!=null){
- var e=o[t]||null;
- if(e!=null){
- n[e]=s[t]
- }}}
- return n
- }else{
- if(AxjUtil.isString(s)){
- return o[s]
- }}}}
- return null
- };
- Comcast_plaxosync_map.map_z2p=function(t){
- if(AjxUtil.isArray(t)){
- var e=[];
- for(var n=0;
- n<t.length;
- n++){
- var o=t[n];
- var s=Comcast_plaxosync_map.map(o,Comcast_plaxosync_map.z2p);
- var r=Comcast_plaxosync_map.mapIM_z2p(o);
- s=AjxUtil.hashUpdate(s,r,true);
- e.push(s)
- }
- return e
- }else{
- if(AjxUtil.isObject(t)){
- var e=Comcast_plaxosync_map.map(t,Comcast_plaxosync_map.z2p);
- var a=Comcast_plaxosync_map.mapIM_z2p(t);
- e=AjxUtil.hashUpdate(e,a,true);
- return e
- }}};
- Comcast_plaxosync_map.map_p2z=function(t){
- if(AjxUtil.isArray(t)){
- var e=[];
- for(var n=0;
- n<t.length;
- n++){
- var r=t[n];
- var o=Comcast_plaxosync_map.map(r,Comcast_plaxosync_map.p2z);
- var a=Comcast_plaxosync_map.mapIM_p2z(r);
- o=AjxUtil.hashUpdate(o,a,true);
- e.push(o)
- }
- return e
- }else{
- if(AjxUtil.isObject(t)){
- var e=Comcast_plaxosync_map.map(t,Comcast_plaxosync_map.p2z);
- var s=Comcast_plaxosync_map.mapIM_p2z(t);
- e=AjxUtil.hashUpdate(e,s,true);
- return e
- }}};
- Comcast_plaxosync_map.mapIM_z2p=function(d){
- if(AjxUtil.isObject(d)){
- var a={};
- for(var e in Comcast_plaxosync_map.im_z2p){
- var r=Comcast_plaxosync_map.im_z2p[e];
- var o=new RegExp(e+"(\\d+)");
- var h=[];
- for(var c in d){
- var n=o.exec(c);
- if(n&&n.length>=2){
- var s=parseInt(n[1])-1;
- var l=d[c];
- if(l!=null){
- var t=Comcast_plaxosync_map.mapIM_z2p_single(l);
- if(t!=null){
- h[s]=t
- }}}}
- if(h.length>0){
- a[r]={
- imAddress:h}
- }}
- return a
- }};
- Comcast_plaxosync_map.mapIM_z2p_single=function(n){
- var t=Comcast_plaxosync_map.imPattern.exec(n);
- if(t&&t.length>=3){
- var e=t[1];
- var a=t[2];
- var o={};
- o.service=t[1];
- o.address=t[2];
- return o
- }
- return null
- };
- Comcast_plaxosync_map.mapIM_p2z=function(a){
- var u={};
- for(var t in Comcast_plaxosync_map.im_z2p){
- var c=Comcast_plaxosync_map.im_z2p[t];
- try{
- var l=a[c];
- var n=l.imAddress;
- var s=1;
- for(var r=0;
- r<n.length;
- r++){
- var d=n[r];
- var o=Comcast_plaxosync_map.mapIM_p2z_single(d);
- u[t+s]=o;
- s++
- }}
- catch(h){}}
- return u
- };
- Comcast_plaxosync_map.mapIM_p2z_single=function(e){
- return e.service.toLowerCase()+"://"+e.address
- };
- Comcast_plaxosync=function(){
- this.requestmgr=new Comcast_plaxosync_requestmgr();
- window.Comcast_plaxosync_instance=this
- };
- Comcast_plaxosync.DISPLAY_IFRAME=true;
- Comcast_plaxosync.prototype.toString=function(){
- return"Comcast_plaxosync"
- };
- Comcast_plaxosync.handleFrameData=function(e,a,t){
- if(AjxUtil.isString(e)){
- if(t){
- Comcast_plaxosync_instance.setIframeUrl(t)
- }
- var o={
- action:ZmOperation.NEW_MESSAGE,toOverride:e,subjOverride:a||""};
- AjxDispatcher.run("GetComposeController").doAction(o)
- }};
- Comcast_plaxosync.prototype.init=function(){
- var e=new AjxListener(this,this.init2);
- ZmZimbraMail.addListener(ZmAppEvent.PRE_STARTUP,e);
- ZmZimbraMail.addListener(ZmAppEvent.POST_STARTUP,e)
- };
- Comcast_plaxosync.prototype.init2=function(){
- if(!this._init2run){
- this._init2run=true;
- if(Comcast_plaxosync.DISPLAY_IFRAME){
- this._createIframeView()
- }
- this.requestmgr.init()
- }};
- Comcast_plaxosync.PLAXO_URL_SHOW_ALL=window.PLAXO_URL_BASE+"/ab/contactList/?skin=none";
- Comcast_plaxosync.PLAXO_URL_SHOW_CONTACT=window.PLAXO_URL_BASE+"/ab/home/contactView/{0}?skin=none";
- Comcast_plaxosync.PLAXO_URL_SHOW_SEARCH=window.PLAXO_URL_BASE+"/ab/contactList?skin=none&src=addressBookSearch#query={0}";
- Comcast_plaxosync.PLAXO_URL_NEW_CONTACT=window.PLAXO_URL_BASE+"/ab/home/contactAdd/?skin=none&name={0}&email={1}&phone={2}";
- Comcast_plaxosync.PLAXO_URL_EDIT_CONTACT=window.PLAXO_URL_BASE+"/xfc/editContact?e={1}&n={0}&skin=none";
- Comcast_plaxosync.PLAXO_URL_NEW_GROUP=window.PLAXO_URL_BASE+"/ab/contactList?skin=none#createGroup=1";
- Comcast_plaxosync.prototype._createIframeView=function(){
- if(Comcast_plaxosync.DISPLAY_IFRAME){
- this.viewName="PlaxoFrame";
- this._iframeView=new ZmUpsellView({
- parent:appCtxt.getShell(),posStyle:Dwt.ABSOLUTE_STYLE,className:"ZmUpsellView"}
- );
- var o=this._iframeView.getHtmlElement();
- var t=[];
- var e=0;
- t[e++]="<iframe id='iframe_";
- t[e++]=this._iframeView.getHTMLElId();
- t[e++]="' ";
- if(this._iframeSrc){
- t[e++]="src='";
- t[e++]="'"
- }
- t[e++]=" width='100%' height='100%' frameborder='0'>";
- o.innerHTML=t.join("");
- var s={};
- s[ZmAppViewMgr.C_APP_CONTENT_FULL]=this._iframeView;
- var n={};
- n[ZmAppViewMgr.CB_POST_SHOW]=new AjxCallback(this,this.displayIframeView);
- appCtxt.getAppViewMgr().createView({
- viewId:this.viewName,appName:"Contacts",elements:s,isTransient:false,callbacks:n}
- );
- var a=this.getIframe();
- a.onload=null
- }};
- Comcast_plaxosync.prototype.displayIframeView=function(e){
- if(Comcast_plaxosync.DISPLAY_IFRAME){
- var t=[ZmMsg.zimbraTitle,"Address Book"].join(": ");
- Dwt.setTitle(t)
- }};
- Comcast_plaxosync.prototype.getIframe=function(){
- if(!this._iframe){
- this._iframe=document.getElementById("iframe_"+this._iframeView.getHTMLElId())
- }
- return this._iframe
- };
- Comcast_plaxosync.prototype.getIframeView=function(){
- return this._iframeView
- };
- Comcast_plaxosync.prototype.setIframeUrl=function(t,n){
- if(Comcast_plaxosync.DISPLAY_IFRAME){
- if(t){
- this._iframeSrc=t
- }
- if(this._iframeView){
- var o=this.getIframe();
- if(o){
- var e=appCtxt.getAppViewMgr();
- if(n&&e.getCurrentViewId()!=this.viewName){
- appCtxt.getAppChooser().setSelected("Contacts");
- if(t){
- var a=AjxCallback.simpleClosure(this.displayIframe,this);
- if(AjxEnv.isIE){
- o.attachEvent("onload",a)
- }else{
- Dwt.setHandler(o,"onload",a)
- }
- this._displayLoading()
- }}else{
- Dwt.clearHandler(o,"onload")
- }
- if(t){
- o.src=t
- }}}}};
- Comcast_plaxosync.prototype.displayIframe=function(){
- var e=appCtxt.getAppViewMgr();
- e.popView(ZmId.VIEW_LOADING,true);
- e.pushView(this.viewName);
- appCtxt.getAppChooser().setSelected("Contacts")
- };
- Comcast_plaxosync.prototype._displayLoading=function(){
- if(!appCtxt.inStartup){
- appCtxt.getAppViewMgr().pushView(ZmId.VIEW_LOADING,true)
- }};
- Comcast_plaxosync.prototype.add=function(a,t,o){
- o=o||this[t];
- if(o){
- var e=a[t];
- a[t]=function(){
- var n=arguments;
- n.push(e.apply(this,arguments));
- return o.apply(this,n)
- };
- a[t].func=e
- }};
- Comcast_plaxosync.parseQuery=function(e){
- locFound=/.*:.*/.test(e);
- match=locFound&&/(.*)\(.*:(.*)\)$/.exec(e);
- return{
- location:(match&&AjxStringUtil.trim(match[2]))||(locFound&&e)||"",searchfor:(match&&AjxStringUtil.trim(match[1]))||(!locFound&&e)||""}
- };
- Comcast_plaxosync.getFirstAttr=function(e,n,o){
- for(var a=0;
- a<n.length;
- a++){
- var t=n[a];
- if(e[t]){
- return e[t]
- }}
- return o
- };
- VelodromeSkin.prototype.sendRequest=function(n){
- var a=n.jsonObj;
- var e;
- if(a){
- var o=window.plaxosync.requestmgr;
- var r=new AjxCallback(this,this._handleDataReturn,n);
- if(a.CreateContactRequest){
- o.createContactRequest(a.CreateContactRequest,r);
- delete a.CreateContactRequest
- }
- if(a.ModifyContactRequest){
- o.modifyContactRequest(a.ModifyContactRequest,r);
- delete a.ModifyContactRequest
- }
- if(a.ContactActionRequest){
- o.contactActionRequest(a.ContactActionRequest,r);
- delete a.ContactActionRequest
- }
- for(var t in a){
- if(a[t]&&(t!="SearchRequest"||!e)){
- return this.sendRequest.func.call(this,n)
- }}}else{
- return this.sendRequest.func.call(this,n)
- }};
- VelodromeSkin.prototype._handleDataReturn=function(a,e){
- var t=a.jsonObj;
- if(t){
- if(t.SearchRequest){
- if(t.SearchRequest.types){
- a.callback=new AjxCallback(this,function(n,o){
- o._data.SearchResponse.cn=e.Body.SearchResponse.cn;
- n.run(o)
- }
- ,a.callback);
- this.sendRequest.func.call(this,a);
- return
- }}
- a.response=e;
- this.sendRequest.func.call(this,a)
- }};
- VelodromeSkin.prototype.load=function(o,e,t){
- this.isCanonical=true;
- var a=new AjxCallback(this,this._handleResponseLoad,[o]);
- window.plaxosync.requestmgr.getContacts(new AjxCallback(this,this._handleResponseLoad,[o]))
- };
- VelodromeSkin.prototype._handleResponseLoad=function(h,o){
- for(var r in o){
- var e=o[r];
- var n={}
- ,s={};
- for(var t in e){
- var a=e[t];
- if(ZmContactList.IS_CONTACT_FIELD[t]){
- n[t]=a
- }else{
- s[t]=a
- }}
- n._attrs=s;
- n.id=r;
- this._addContact(n)
- }
- this._finishLoading();
- if(h){
- h.run()
- }};
- VelodromeSkin.prototype._show=function(e,r){
- if(Comcast_plaxosync.DISPLAY_IFRAME){
- if(e){
- if(e.type==ZmItem.GROUP){
- var n=Comcast_plaxosync.PLAXO_URL_NEW_GROUP
- }else{
- var o=[e.attr.firstName||"",e.attr.middleName||"",e.attr.lastName||""].join(" ").replace(/\s+/g," ");
- o=o.replace(/^\s+|\s+$/g,"");
- o=AjxStringUtil.urlComponentEncode(o);
- var s=["email","workEmail1"];
- var a=Comcast_plaxosync.getFirstAttr(e.attr,s,"");
- a=AjxStringUtil.urlComponentEncode(a);
- var t=Comcast_plaxosync.getFirstAttr(e.attr,ZmContact.PHONE_FIELDS,"");
- t=AjxStringUtil.urlComponentEncode(t);
- var n=(e.id)?AjxMessageFormat.format(Comcast_plaxosync.PLAXO_URL_EDIT_CONTACT,[o,a]):AjxMessageFormat.format(Comcast_plaxosync.PLAXO_URL_NEW_CONTACT,[o,a,t])
- }
- window.plaxosync.setIframeUrl(n,true)
- }}else{
- arguments.callee.func.apply(this,arguments)
- }};
- VelodromeSkin.prototype._Portalshow=function(t,a){
- try{
- if(appCtxt.inStartup&&AjxStringUtil.parseQueryString()&&AjxStringUtil.parseQueryString().app=="sms"){
- return
- }
- window.location="http://xfinityconnect.mail.comcast.net/connect/"
- }
- catch(o){
- console.log(o)
- }};
- VelodromeSkin.prototype._doSearch=function(r,e,h,t){
- var o=r.types||this.getTypes(r);
- if(Comcast_plaxosync.DISPLAY_IFRAME&&((AjxUtil.isArray(o)&&o.length==1&&o[0]==ZmItem.CONTACT)||(o instanceof AjxVector&&o.size()==1&&o.get(0)==ZmItem.CONTACT))){
- var n=r.query;
- var s=n&&Comcast_plaxosync.parseQuery(n);
- var a;
- if(s&&s.searchfor){
- window.plaxosync.setIframeUrl(AjxMessageFormat.format(Comcast_plaxosync.PLAXO_URL_SHOW_SEARCH,[s.searchfor]),true)
- }else{
- if(!window.plaxosync._iframeSrc){
- window.plaxosync.setIframeUrl(Comcast_plaxosync.PLAXO_URL_SHOW_ALL,true)
- }else{
- window.plaxosync.displayIframe()
- }}}
- arguments.callee.func.apply(this,arguments)
- };
- VelodromeSkin.prototype._defaultView=function(){
- if(Comcast_plaxosync.DISPLAY_IFRAME){
- return window.plaxosync.viewName
- }else{
- return(appCtxt.get(ZmSetting.CONTACTS_VIEW)=="cards")?ZmId.VIEW_CONTACT_CARDS:ZmId.VIEW_CONTACT_SIMPLE
- }};
- VelodromeSkin.prototype.switchView=function(e,a,o,t){
- if(Comcast_plaxosync.DISPLAY_IFRAME){
- e=window.plaxosync.viewName;
- o=true;
- if(!this._appViews[e]){
- this._appViews[e]=window.plaxosync.getIframeView()
- }}
- return arguments.callee.func.call(this,e,a,o,t)
- };
- VelodromeSkin.prototype.listShow=function(){
- this.switchView(window.plaxosync.viewName)
- };
- VelodromeSkin.prototype._createNewView=function(e){
- if(e==window.plaxosync.viewName){
- return window.plaxosync.getIframeView()
- }
- return arguments.callee.func.apply(this,arguments)
- };
- VelodromeSkin.prototype._initializeListView=function(e){
- if(e==window.plaxosync.viewName){
- this._listView[e]=this._createNewView(e)
- }else{
- arguments.callee.func.apply(this,arguments)
- }};
- VelodromeSkin.prototype._handleContactsCoreLoad=function(){
- this.overrideAPI(ZmContactList.prototype,"load",this.load);
- this.overrideAPI(ZmContactList.prototype,"_handleResponseLoad",this._handleResponseLoad)
- };
- VelodromeSkin.prototype._handleContactsLoad=function(){
- this.overrideAPI(ZmContactController.prototype,"show",this._show);
- this.overrideAPI(ZmContactListController.prototype,"_defaultView",this._defaultView);
- this.overrideAPI(ZmContactListController.prototype,"show",this.listShow);
- this.overrideAPI(ZmContactListController.prototype,"_createNewView",this._createNewView);
- this.overrideAPI(ZmContactListController.prototype,"_initializeListView",this._initializeListView);
- this.overrideAPI(ZmContactListController.prototype,"switchView",this.switchView);
- this.overrideAPI(ZmContactListController.prototype,"_setViewContents",AjxCallback.returnFalse);
- this.overrideAPI(ZmContactListController.prototype,"_resetOperations",AjxCallback.returnFalse)
- };
- VelodromeSkin.prototype._handlePortalLoad=function(){
- this.overrideAPI(ZmPortalController.prototype,"show",this._Portalshow)
- };
- VelodromeSkin.prototype._handleStartupLoad=function(){
- window.plaxosync=new Comcast_plaxosync();
- this.overrideAPI(ZmRequestMgr.prototype,"sendRequest",this.sendRequest);
- this.overrideAPI(ZmRequestMgr.prototype,"_handleDataReturn",this._handleDataReturn);
- this.overrideAPI(ZmSearchController.prototype,"_doSearch",this._doSearch);
- window.plaxosync.init()
- };
- AjxDispatcher.addPackageLoadFunction("Contacts",new AjxCallback(skin,skin._handleContactsLoad));
- AjxDispatcher.addPackageLoadFunction("Portal",new AjxCallback(skin,skin._handlePortalLoad));
- AjxDispatcher.addPackageLoadFunction("Startup1_2",new AjxCallback(skin,skin._handleStartupLoad));
- Comcast_plaxosync_requestmgr=function(){
- this.session=null;
- this.token=null;
- this.clientId="cal"
- };
- Comcast_plaxosync_requestmgr.prototype.init=function(){
- this._cimaQueue=[]
- };
- Comcast_plaxosync_requestmgr.PLAXO_CONTACT_JSON=window.PLAXO_URL_BASE+"/axis/json/contact";
- Comcast_plaxosync_requestmgr.PLAXO_CONTACT_URL=window.PLAXO_URL_BASE+"/axis/contact";
- Comcast_plaxosync_requestmgr.PLAXO_FOLDER_JSON=window.PLAXO_URL_BASE+"/axis/json/folder";
- Comcast_plaxosync_requestmgr.SEARCH_FIELDS=["firstName","lastName","fullName"];
- Comcast_plaxosync_requestmgr.PROMPT_IF_MISSING=true;
- Comcast_plaxosync_requestmgr.prototype.getCIMAAccess=function(){
- this._cimaQueue=[];
- var t="/service/proxy?target="+AjxStringUtil.urlComponentEncode(window.CIMA_URL);
- var e=AjxCookie.getCookie(document,"s_ticket")||(Comcast_plaxosync_requestmgr.PROMPT_IF_MISSING&&prompt("Please enter a valid comcast s_ticket cookie value",""));
- if(e){
- var a={
- Authorization:"cima-session "+e,"Content-type":"application/x-www-form-urlencoded"};
- var o=new AjxCallback(this,this._handleGetCIMAAccess);
- AjxRpc.invoke("",t,a,o,false,0)
- }else{
- appCtxt.setStatusMsg("Login failed: nonexistent s_ticket",ZmStatusView.LEVEL_CRITICAL);
- this._cimaQueue=null
- }};
- Comcast_plaxosync_requestmgr.findDescendant=function(n){
- if(arguments.length<2){
- return n
- }
- var e=AjxUtil.isArray(arguments[1])?arguments[1]:Array.prototype.slice.call(arguments,1);
- for(var a=0;
- a<e.length;
- a++){
- var t=e[a];
- if(t instanceof RegExp){
- for(var o in n){
- if(t.test(o)){
- n=n[o];
- break
- }}}else{
- n=n[t]
- }
- if(!n){
- return null
- }}
- return n
- };
- Comcast_plaxosync_requestmgr.prototype._handleGetCIMAAccess=function(e){
- if(e.success){
- var n=AjxXmlDoc.createFromDom(e.xml).toJSObject();
- var o=Comcast_plaxosync_requestmgr.findDescendant(n,"cima:ServiceToken",/^[^:]+:GetSessionResponse/,"response","session","__msh_content");
- if(o){
- if(o.match(/^[\d:]+$/)){
- this.session=o
- }else{
- this.token=o
- }}
- this.userid=Comcast_plaxosync_requestmgr.findDescendant(n,"cima:ServiceToken",/^[^:]+:GetSessionResponse/,"response","userId","__msh_content");
- if(!this.token&&!this.session){
- appCtxt.setStatusMsg("Login failed: invalid s_ticket",ZmStatusView.LEVEL_CRITICAL)
- }else{
- if(this._cimaQueue&&this._cimaQueue.length){
- for(var a=0;
- a<this._cimaQueue.length;
- a++){
- this._cimaQueue[a].run()
- }}
- this._cimaQueue=null
- }}else{
- appCtxt.setStatusMsg("Login failed: cannot connect to single-signon service",ZmStatusView.LEVEL_CRITICAL)
- }};
- Comcast_plaxosync_requestmgr.prototype.send=function(o,t,h,n,r){
- var e=new AjxCallback(this,this.receive,[h||null]);
- var a="/service/proxy?target="+AjxStringUtil.urlEncode(o);
- if(AjxUtil.isObject(t)){
- t=JSON.stringify(t)
- }
- var s={
- "Content-Type":"application/json; charset=utf-8"};
- if(AjxEnv.isIE6&&(location.protocol=="https:")){
- s.Connection="Close"
- }
- if(r&&AjxUtil.isObject(r)){
- s=Comcast_plaxosync_requestmgr.hashUpdate(s,r,true)
- }
- AjxRpc.invoke(t,a,s,e,n)
- };
- Comcast_plaxosync_requestmgr.prototype.receive=function(a,e){
- if(e.success&&a){
- var t=Comcast_plaxosync_requestmgr.evalJSON(AjxStringUtil.trim(e.text));
- a.run(t)
- }};
- Comcast_plaxosync_requestmgr.prototype.createContactRequest=function(s,h){
- if(this.isLoggedIn()){
- var n=s.cn.a;
- var r={};
- var a={};
- for(var o=0;
- o<n.length;
- o++){
- var t=n[o];
- a[t.n]=t._content
- }
- if(!a.firstName&&!a.containsKey.lastName&&!a.fullName&&!a.displayName){
- if(a.email){
- a.fullName=a.email
- }}
- var e={
- AddContactRequest:{
- authInfo:this.getAuthInfo(),contact:Comcast_plaxosync_map.map_z2p(a)}};
- this.send(Comcast_plaxosync_requestmgr.PLAXO_CONTACT_JSON,e,new AjxCallback(this,this.createContactResponse,[s,h]),false)
- }else{
- if(this._cimaQueue!==null){
- this._cimaQueue.push(new AjxCallback(this,this.createContactRequest,[s,h]))
- }else{
- this.createContactResponse(s,h,{}
- )
- }}};
- Comcast_plaxosync_requestmgr.prototype.createContactResponse=function(s,m,r){
- var d=r&&r.contact&&Comcast_plaxosync_map.map_p2z(r.contact);
- var u,t,l,n;
- if(d){
- u=this.pruneAttrs(d);
- t=d.itemId;
- l=""+t;
- n=ZmContact.computeFileAs(u)
- }
- var c=appCtxt.getActiveAccount().name;
- var e=s.cn.l;
- var a=new Date().getTime();
- var h=40500;
- var f=appCtxt.getRequestMgr()._highestNotifySeen+1;
- var o={
- Header:{
- context:{
- change:{
- token:h}
- ,notify:[{
- seq:f,created:d?{
- cn:[{
- id:l,l:e,d:a,rev:h,fileAsStr:n,_attrs:u}
- ]}
- :{}
- ,modified:d?{
- folder:[{
- id:e,n:8,s:0,i4ms:h,i4next:t+1}
- ]}
- :{}}
- ],_jsns:"urn:zimbra"}}
- ,Body:{
- CreateContactResponse:{
- cn:d?[{
- id:l,l:e,d:a,rev:h,fileAsStr:n,_attrs:u}
- ]:[],_jsns:"urn:zimbraMail"}}
- ,_jsns:"urn:zimbraSoap"};
- if(m){
- m.run(o)
- }
- return o
- };
- Comcast_plaxosync_requestmgr.prototype.modifyContactRequest=function(n,u){
- if(this.isLoggedIn()){
- var e=n.cn.id;
- var t=n.cn.a;
- var o={};
- var c={};
- for(var s=0;
- s<t.length;
- s++){
- var a=t[s];
- c[a.n]=a._content
- }
- var d;
- for(var s=0;
- s<ZmContact.ADDRESS_FIELDS.length&&!d;
- s++){
- if(o[ZmContact.ADDRESS_FIELDS[s]]){
- d=true
- }}
- if(!Comcast_plaxosync_requestmgr.NAME_FIELDS){
- Comcast_plaxosync_requestmgr.NAME_FIELDS=[ZmContact.F_firstName,ZmContact.F_lastName,ZmContact.F_maidenName,ZmContact.F_middleName,ZmContact.F_namePrefix,ZmContact.F_nameSuffix]
- }
- var r;
- for(var s=0;
- s<Comcast_plaxosync_requestmgr.NAME_FIELDS.length&&!r;
- s++){
- if(c[Comcast_plaxosync_requestmgr.NAME_FIELDS[s]]){
- r=true
- }}
- if(d||r){
- var h=appCtxt.getById(e);
- if(h){
- if(d){
- Comcast_plaxosync_requestmgr.hashUpdate(c,h.attr,true,null,ZmContact.ADDRESS_FIELDS)
- }
- if(r){
- Comcast_plaxosync_requestmgr.hashUpdate(c,h.attr,true,null,Comcast_plaxosync_requestmgr.NAME_FIELDS)
- }}}
- c.itemId=e;
- var l={
- SetContactRequest:{
- authInfo:this.getAuthInfo(),contact:Comcast_plaxosync_map.map_z2p(c)}};
- this.send(Comcast_plaxosync_requestmgr.PLAXO_CONTACT_JSON,l,new AjxCallback(this,this.modifyContactResponse,[n,u]),false)
- }else{
- if(this._cimaQueue!==null){
- this._cimaQueue.push(new AjxCallback(this,this.modifyContactRequest,[n,u]))
- }else{
- this.modifyContactResponse(n,u,{}
- )
- }}};
- Comcast_plaxosync_requestmgr.hashUpdate=function(n,o,t,s,e){
- for(var a in o){
- if((t||!(a in n))&&(!s||AjxUtil.indexOf(s,a)==-1)&&(!e||AjxUtil.indexOf(e,a)!=-1)){
- n[a]=o[a]
- }}
- return n
- };
- Comcast_plaxosync_requestmgr.prototype.modifyContactResponse=function(s,m,r){
- var d=r&&r.contact&&Comcast_plaxosync_map.map_p2z(r.contact);
- var u,n,t,l;
- if(d){
- u=this.pruneAttrs(d);
- n=ZmContact.computeFileAs(u);
- t=d.itemId;
- l=""+t
- }
- var c=appCtxt.getActiveAccount().name;
- var e=s.cn.l;
- var a=new Date().getTime();
- var h=41200;
- var f=appCtxt.getRequestMgr()._highestNotifySeen+1;
- var o={
- Header:{
- context:{
- change:{
- token:h}
- ,notify:[{
- seq:f,modified:d?{
- folder:[{
- id:e,n:12,s:0,i4ms:h,i4next:t+1}
- ],cn:[{
- id:t,f:"",d:a,rev:h,fileAsStr:n,_attrs:u}
- ]}
- :{}}
- ],_jsns:"urn:zimbra"}}
- ,Body:{
- ModifyContactResponse:{
- cn:d?[{
- id:t,l:e,d:a,rev:h,fileAsStr:n,_attrs:u}
- ]:[],_jsns:"urn:zimbraMail"}}
- ,_jsns:"urn:zimbraSoap"};
- if(m){
- m.run(o)
- }
- return o
- };
- Comcast_plaxosync_requestmgr.prototype.contactActionRequest=function(t,n){
- var o=t.action.id;
- var e=t.action.l;
- var a=t.action.op;
- if(a=="delete"||(a=="move"&&e==3)||a=="trash"){
- this.deleteContactRequest(new AjxCallback(this,this.contactActionResponse,[t,n]),o)
- }};
- Comcast_plaxosync_requestmgr.prototype.deleteContactRequest=function(t,e){
- return this.deleteContactsRequest(t,[e])
- };
- Comcast_plaxosync_requestmgr.prototype.deleteContactsRequest=function(a,t){
- if(this.isLoggedIn()){
- var e={
- DeleteContactsRequest:{
- authInfo:this.getAuthInfo(),itemIds:{
- delimited:{
- data:t.join(",")}}}};
- this.send(Comcast_plaxosync_requestmgr.PLAXO_CONTACT_JSON,e,new AjxCallback(this,this.deleteContactsResponse,[a]),false)
- }else{
- if(this._cimaQueue!==null){
- this._cimaQueue.push(new AjxCallback(this,this.deleteContactsRequest,[a,t]))
- }else{
- this.deleteContactsResponse(a,{}
- )
- }}};
- Comcast_plaxosync_requestmgr.prototype.deleteContactsResponse=function(o,t){
- var a=t&&t.affected;
- var e=t.response&&t.response["code"];
- if(o){
- o.run(t)
- }};
- Comcast_plaxosync_requestmgr.prototype.contactActionResponse=function(n,u,r){
- var m=!!(r&&r.affected);
- var d=appCtxt.getActiveAccount().name;
- var e=n.action.id;
- var p=appCtxt.getById(e);
- var t=n.action.l;
- var s=p.folderId;
- var c=n.action.op;
- var l=""+e;
- var a=new Date().getTime();
- var h=41200;
- var f=appCtxt.getRequestMgr()._highestNotifySeen+1;
- var o={
- Header:{
- context:{
- change:{
- token:h}
- ,notify:[{
- seq:f,modified:m?{
- folder:[{
- id:s,n:11,s:0,i4ms:h,i4next:5261}
- ,{
- id:t,n:167,s:491637,i4ms:h,i4next:5280}
- ],cn:[{
- id:l,l:t}
- ]}
- :{}}
- ],_jsns:"urn:zimbra"}}
- ,Body:{
- ContactActionResponse:{
- action:{
- id:l,op:c}
- ,_jsns:"urn:zimbraMail"}}
- ,_jsns:"urn:zimbraSoap"};
- if(u){
- u.run(o)
- }
- return o
- };
- Comcast_plaxosync_requestmgr.prototype.search=function(T,h){
- if(this.isLoggedIn()){
- var o=T.query&&AjxStringUtil.trim(T.query)||"";
- var r=T.fields;
- var a,f,t,m;
- var v=o&&Comcast_plaxosync.parseQuery(o);
- var z=T.limit||0;
- var d=T.offset||0;
- var l=v&&v.searchfor;
- if(l){
- l=l.replace(/[^\w\d]/g,"")
- }
- var e=-1;
- var q={};
- var n={};
- n.authInfo=this.getAuthInfo();
- if(z>0){
- var c={};
- c.limit=z;
- if(d>0){
- c.offset=d
- }
- n.page=c
- }
- var w=(l&&l.length);
- var u=(e>=0);
- if(w||u){
- var b={};
- if(w){
- var s={};
- var k={};
- var x=[];
- for(var j=0;
- j<Comcast_plaxosync_requestmgr.SEARCH_FIELDS.length;
- j++){
- var y={
- field:Comcast_plaxosync_requestmgr.SEARCH_FIELDS[j],op:"StartsWith",value:l};
- x.push(y)
- }
- k.byField=x;
- s.fields=k;
- s.op="Or";
- b.byFields=s
- }
- if(u){
- b.byFolderId=e
- }
- n.filters=b
- }
- if(r){
- var g=[];
- for(var j=0;
- j<r.length;
- j++){
- g.push(r[j].toString())
- }
- n.fields={
- field:g}
- }
- q.GetContactsRequest=n;
- this.send(Comcast_plaxosync_requestmgr.PLAXO_CONTACT_JSON,q,new AjxCallback(this,this._handleSearch,[h,d]),false)
- }else{
- if(this._cimaQueue!==null){
- this._cimaQueue.push(new AjxCallback(this,this.search,[T,h]))
- }else{
- this._handleSearch(h)
- }}};
- Comcast_plaxosync_requestmgr.prototype._handleSearch=function(s,n,o){
- var a=o&&o.contacts&&o.contacts["contact"];
- var t=o&&o.editCounter;
- var e=o&&o.totalCount;
- if(s){
- s.run(a&&Comcast_plaxosync_map.map_p2z(a),t,e,n)
- }};
- Comcast_plaxosync_requestmgr.prototype.searchRequest=function(e,t){
- this.search(e,new AjxCallback(this,this.searchResponse,[t]))
- };
- Comcast_plaxosync_requestmgr.prototype.searchResponse=function(m,a,d,f,n){
- var h=41200;
- a=a||[];
- var r=[];
- var t=new Date().getTime();
- for(var s=0;
- s<a.length;
- s++){
- var c=a[s];
- var u=this.pruneAttrs(c);
- var e={
- id:c.itemId,f:"",d:t,rev:h,fileAsStr:ZmContact.computeFileAs(c),_attrs:u};
- r.push(e)
- }
- r.sort(function(g,p){
- return g.fileAsStr>p.fileAsStr
- }
- );
- var l=appCtxt.getActiveAccount().name;
- var t=new Date().getTime();
- var o={
- Header:{
- context:{
- change:{
- token:h}
- ,_jsns:"urn:zimbra"}}
- ,Body:{
- SearchResponse:{
- sortBy:"com.zimbra.cs.index.LocalizedSortBy@a4f040",offset:n||0,cn:r,more:(a.length+n<f)?true:false,_jsns:"urn:zimbraMail"}}
- ,_jsns:"urn:zimbraSoap"};
- if(m){
- m.run(o)
- }
- return o
- };
- Comcast_plaxosync_requestmgr.prototype.autoCompleteRequest=function(e,a){
- var t={
- query:e.name._content};
- this.search(t,new AjxCallback(this,this.autoCompleteResponse,[e,a]))
- };
- Comcast_plaxosync_requestmgr.prototype.autoCompleteResponse=function(a,n,r){
- var b=41200;
- var o=a.name._content;
- var y=[];
- if(r){
- var s=new Date().getTime();
- for(var f=0;
- f<r.length&&f<1000;
- f++){
- var t=r[f];
- var d=this.pruneAttrs(t);
- var w=this.getFirstMatching(o,[d.displayName,d.fullName,AjxUtil.collapseList([d.firstName,d.middleName,d.lastName]).join(" ")]);
- var l=[d[ZmContact.F_email],d[ZmContact.F_workEmail1],d[ZmContact.F_email2],d[ZmContact.F_workEmail2],d[ZmContact.F_email3],d[ZmContact.F_workEmail3]];
- var g=AjxUtil.uniq(AjxUtil.collapseList(l));
- for(var m=0;
- m<g.length;
- m++){
- var u=g[m];
- var h=new AjxEmailAddress(u,null,w).toString();
- var p=this.getMatchScore(o,w,u);
- var c={
- id:t.itemId,email:h,type:"contact",ranking:p};
- y.push(c)
- }}
- y.sort(function(k,v){
- return k.ranking&&k.ranking<v.ranking
- }
- )
- }
- var e={
- Header:{
- context:{
- change:{
- token:b}
- ,_jsns:"urn:zimbra"}}
- ,Body:{
- AutoCompleteResponse:{
- canBeCached:true,match:y,_jsns:"urn:zimbraMail"}}
- ,_jsns:"urn:zimbraSoap"};
- if(n){
- n.run(e)
- }
- return e
- };
- Comcast_plaxosync_requestmgr.prototype.getContacts=function(e){
- this.search({
- fields:["NameFields","EmailFields","PhoneFields","HomePhotoURL","WorkPhotoURL"]}
- ,new AjxCallback(this,this._handleGetContacts,[e]))
- };
- Comcast_plaxosync_requestmgr.prototype._handleGetContacts=function(o,e){
- if(e){
- var a={};
- for(var t=0;
- t<e.length;
- t++){
- a[e[t].itemId]=this.pruneAttrs(e[t])
- }
- if(o){
- o.run(a)
- }
- return a
- }};
- Comcast_plaxosync_requestmgr.prototype.getFirstMatching=function(n,o,a){
- var t=new RegExp(n,e);
- for(var e=0;
- e<o.length;
- e++){
- if(t.test(o[e])){
- return o[e]
- }}
- if(!AjxUtil.isUndefined(a)){
- return a
- }
- for(var e=0;
- e<o.length;
- e++){
- if(o[e]){
- return o[e]
- }}
- return o[o.length-1]
- };
- Comcast_plaxosync_requestmgr.prototype.getMatchScore=function(o,a,t){
- var n=0;
- if(o){
- o=o.toLowerCase();
- a=a&&a.toLowerCase();
- t=t&&t.toLowerCase();
- if(a){
- var e=a.indexOf(o);
- if(e!=-1){
- n+=(a.length-e)/a.length
- }}
- if(t){
- var e=t.indexOf(o);
- if(e!=-1){
- n+=(t.length-e)/t.length
- }}}
- return 0.5*n
- };
- Comcast_plaxosync_requestmgr.evalJSON=function(a){
- try{
- return JSON.parse(a)
- }
- catch(t){
- return{}
- }};
- Comcast_plaxosync_requestmgr.prototype.pruneAttrs=function(a){
- if(!this.validAttrs){
- if(ZmContact&&ZmContact.DISPLAY_FIELDS&&window.VelodromeSkinOther){
- this.validAttrs=AjxUtil.arrayAsHash(ZmContact.DISPLAY_FIELDS)
- }else{
- return Comcast_plaxosync_requestmgr.hashUpdate({}
- ,a,true,["itemId"])
- }}
- var t={};
- for(var o in a){
- var e=o.replace(/\d+$/,"");
- if(this.validAttrs[e]){
- t[o]=a[o]
- }}
- return t
- };
- Comcast_plaxosync_requestmgr.prototype.urlFormat=function(o){
- var e=[],a=0;
- for(var t in o){
- if(o[t]!==undefined){
- e[a++]=t+"="+o[t]
- }}
- return e.join("&")
- };
- Comcast_plaxosync_requestmgr.prototype.getCommonParams=function(){
- if(!this._commonParams){
- this._commonParams={
- u:appCtxt.getActiveAccount().getEmail()}
- }
- return this._commonParams
- };
- Comcast_plaxosync_requestmgr.prototype.isLoggedIn=function(){
- return !!((this.userid&&this.token)||this.session)
- };
- Comcast_plaxosync_requestmgr.prototype.getSessionType=function(){
- return"ShortSession"
- };
- Comcast_plaxosync_requestmgr.prototype.getClientInfo=function(){
- var e={};
- e.clientId=this.clientId;
- return e
- };
- Comcast_plaxosync_requestmgr.prototype.getAuthInfo=function(){
- var e={};
- e.sessionType="NoSession";
- if(this.clientId){
- e.clientInfo=this.getClientInfo()
- }
- if(this.userid&&this.token){
- e.authByToken=Comcast_plaxosync_requestmgr.getAuthByToken(this.userid,this.token)
- }else{
- if(this.session){
- e.authBySession=Comcast_plaxosync_requestmgr.getAuthBySession(this.session)
- }}
- return e
- };
- Comcast_plaxosync_requestmgr.prototype.loginPlain=function(a,t){
- var e={
- GetSessionRequest:{
- authInfo:{
- sessionType:this.getSessionType(),clientInfo:this.getClientInfo(),authByEmail:Comcast_plaxosync_requestmgr.getAuthByEmail(a,t)}}};
- this.send(Comcast_plaxosync_requestmgr.PLAXO_CONTACT_JSON,e,new AjxCallback(this,this._handleLoginResponse,[a]),false)
- };
- Comcast_plaxosync_requestmgr.prototype._handleLoginResponse=function(o,a){
- if(a){
- var e=a.response;
- if(e){
- var t=e.code;
- if(t==200){
- this.session=e.session;
- this.username=o;
- return
- }else{
- appCtxt.setStatusMsg("Login failed: "+e.message+" (Code "+e.code+")",ZmStatusView.LEVEL_CRITICAL);
- return
- }}}
- appCtxt.setStatusMsg("Login failed: Plaxo server sent invalid response",ZmStatusView.LEVEL_CRITICAL)
- };
- Comcast_plaxosync_requestmgr.getAuthBySession=function(e){
- return{
- session:e}
- };
- Comcast_plaxosync_requestmgr.getAuthByUhid=function(e,t){
- return{
- userId:e,password:t}
- };
- Comcast_plaxosync_requestmgr.getAuthByEmail=function(t,e){
- return{
- email:t,password:e}
- };
- Comcast_plaxosync_requestmgr.getAuthByComcast=function(t,e){
- return{
- comcastUsername:t,password:e}
- };
- Comcast_plaxosync_requestmgr.getAuthByIdentity=function(e,t){
- return{
- identity:e,password:t}
- };
- Comcast_plaxosync_requestmgr.getAuthByToken=function(t,e){
- return{
- userId:t,token:e}
- };
- Comcast_preferences={
- _iframeSrc:"http://prefs.connect.comcast.net/prefs/?skin=none"};
- Comcast_preferences.init=function(){
- var h=this.viewName="PreferenceFrame";
- var r=this._iframeView=new ZmUpsellView({
- parent:appCtxt.getShell(),posStyle:Dwt.ABSOLUTE_STYLE,className:"ZmUpsellView"}
- );
- var o=r.getHtmlElement();
- o.style.top=0;
- var t=[];
- var e=0;
- t[e++]="<iframe id='iframe_";
- t[e++]=r.getHTMLElId();
- t[e++]="' ";
- if(this._iframeSrc){
- t[e++]="src='";
- t[e++]=this._iframeSrc;
- t[e++]="'"
- }
- t[e++]=" width='100%' height='100%' frameborder='0'>";
- o.innerHTML=t.join("");
- var s={};
- s[ZmAppViewMgr.C_APP_CONTENT_FULL]=r;
- var n={};
- n[ZmAppViewMgr.CB_POST_SHOW]=new AjxCallback(this,this.onShow);
- appCtxt.getAppViewMgr().createView({
- viewId:h,elements:s,isTransient:false,callbacks:n}
- );
- var a=this.getIframe();
- a.onload=null
- };
- Comcast_preferences.getIframe=function(){
- if(!this._iframe){
- this._iframe=document.getElementById("iframe_"+this._iframeView.getHTMLElId())
- }
- return this._iframe
- };
- Comcast_preferences.onShow=function(){
- appCtxt.getAppChooser().setSelected("Options");
- var e=[ZmMsg.zimbraTitle,"Preferences"].join(": ");
- Dwt.setTitle(e);
- this._iframeView.setVisible(true)
- };
- Comcast_preferences.displayIframe=function(){
- var e=appCtxt.getAppViewMgr();
- e.pushView(this.viewName)
- };
- AjxDispatcher.addPackageLoadFunction("Startup1_2",new AjxCallback(function(){
- var t=false;
- var e=new AjxListener(function(){
- if(!t){
- t=true;
- Comcast_preferences.init()
- }}
- );
- ZmZimbraMail.addListener(ZmAppEvent.PRE_STARTUP,e);
- ZmZimbraMail.addListener(ZmAppEvent.POST_STARTUP,e);
- skin.overrideAPI(ZmPreferencesApp.prototype,"launch",function(a,o){
- Comcast_preferences.displayIframe();
- AjxDispatcher.require(["PreferencesCore","Preferences"],true,new AjxCallback(function(){
- appCtxt.getSettings().loadPreferenceData(new AjxCallback(function(){
- if(o){
- o.run()
- }
- Comcast_preferences.displayIframe()
- }
- ))
- }
- ),null,true)
- }
- )
- }
- ));
- Comcast_voice={
- _iframeSrc:"http://vmail.connect.comcast.net/voice/?skin=none"};
- Comcast_voice.init=function(){
- var h=this.viewName="VoiceFrame";
- var r=this._iframeView=new ZmUpsellView({
- parent:appCtxt.getShell(),posStyle:Dwt.ABSOLUTE_STYLE,className:"ZmUpsellView"}
- );
- var o=r.getHtmlElement();
- o.style.top=0;
- var t=[];
- var e=0;
- t[e++]="<iframe id='iframe_";
- t[e++]=r.getHTMLElId();
- t[e++]="' ";
- if(this._iframeSrc){
- t[e++]="src='";
- t[e++]=this._iframeSrc;
- t[e++]="'"
- }
- t[e++]=" width='100%' height='100%' frameborder='0'>";
- o.innerHTML=t.join("");
- var s={};
- s[ZmAppViewMgr.C_APP_CONTENT_FULL]=r;
- var n={};
- n[ZmAppViewMgr.CB_POST_SHOW]=new AjxCallback(this,this.onShow);
- appCtxt.getAppViewMgr().createView({
- viewId:h,elements:s,isTransient:false,callbacks:n}
- );
- var a=this.getIframe();
- a.onload=null
- };
- Comcast_voice.getIframe=function(){
- if(!this._iframe){
- this._iframe=document.getElementById("iframe_"+this._iframeView.getHTMLElId())
- }
- return this._iframe
- };
- Comcast_voice.onShow=function(){
- appCtxt.getAppChooser().setSelected("Voice");
- var e=[ZmMsg.zimbraTitle,"Voice"].join(": ");
- Dwt.setTitle(e);
- this._iframeView.setVisible(true)
- };
- Comcast_voice.displayIframe=function(){
- var e=appCtxt.getAppViewMgr();
- e.pushView(this.viewName)
- };
- AjxDispatcher.addPackageLoadFunction("Startup1_2",new AjxCallback(function(){
- var t=false;
- var e=new AjxListener(function(){
- if(!t){
- t=true;
- Comcast_voice.init()
- }}
- );
- ZmZimbraMail.addListener(ZmAppEvent.PRE_STARTUP,e);
- ZmZimbraMail.addListener(ZmAppEvent.POST_STARTUP,e);
- skin.overrideAPI(ZmVoiceApp.prototype,"launch",function(a,o){
- Comcast_voice.displayIframe();
- AjxDispatcher.require(["Voicemail"],true,new AjxCallback(function(){
- appCtxt.getSettings().loadPreferenceData(new AjxCallback(function(){
- if(o){
- o.run()
- }
- Comcast_voice.displayIframe()
- }
- ))
- }
- ),null,true)
- }
- )
- }
- ));
- SkinLoadedZimlet=function(a,t,e){
- if(!arguments.length){
- return
- }
- this.name=a;
- this.msgObj=t;
- this.cfgObj=e;
- this.isSkinLoadedZimlet=true
- };
- SkinLoadedZimlet.prototype.createApp=function(r,t,l,n){
- var s=this.name;
- var o=appCtxt.getAppController();
- var a={
- text:r,image:t,tooltip:l};
- if(n!=null&&n>=0){
- a.index=n
- }
- o.getAppChooser().addButton(s,a);
- var h=this;
- var e=new ZmApp(s,this,DwtShell.getShell(window));
- e.launch=function(c,d){
- h.getController().show();
- ZmApp.prototype.launch.call(this,c);
- if(h.appLaunch){
- h.appLaunch(this.getName(),c)
- }
- if(d){
- d.run()
- }};
- o.addApp(e);
- return s
- };
- SkinLoadedZimlet.prototype.getMessage=function(e){
- var t=this.msgObj[e];
- if(AjxUtil.isUndefined(t)){
- t="???"+this.name+".msg."+e+"???"
- }
- return t
- };
- SkinLoadedZimlet.prototype.getMessageF=function(e){
- return this.msgObj[e]||null
- };
- SkinLoadedZimlet.prototype.getMsgObj=function(){
- return this.msgObj
- };
- SkinLoadedZimlet.prototype.getConfig=function(e){
- return this.cfgObj[e]
- };
- SkinLoadedZimlet.prototype.getResource=function(e){
- return["/zimbra/skins/velodrome2/",this.name,"/",e].join("")
- };
- SkinLoadedZimlet.prototype.displayStatusMessage=function(e){
- appCtxt.setStatusMsg(e)
- };
- if(!window.net_comcast_sms){
- net_comcast_sms={}
- }
- net_comcast_sms.msg={
- xtmTitle:"Text Messaging",xtmTooltip:"Read and send SMS messages",prefSectionTitle:"Text Messaging",prefGeneralSectionTitle:"General",prefPlanSectionTitle:"Plan options",prefShowSubjectLabel:"Subject field:",prefAutoForwardLabel:"Auto-forward:",prefAutoForwardToLabel:"Forward to:",prefPlanLabel:"Current plan:",prefUnsubscribe:"Unsubscribe",actionNew:"New",actionNewTooltip:"Compose a new text message",actionForward:"Forward",actionForwardTooltip:"Forward messages by SMS or Email",actionForwardEnd:"Cancel forwarding",actionForwardEndTooltip:"End forwarding mode",actionEdit:"Edit",actionEditTooltip:"Lock, unlock or delete messages",actionEditEnd:"Done editing",actionEditEndTooltip:"End editing mode",actionCancel:"Cancel",actionCancelTooltip:"Cancel composing",actionSend:"Send",actionSendTooltip:"Send the message",actionRefresh:"Get New Messages",actionRefreshTooltip:"Get New Messages",actionSave:"Save",newMessageCount:"{0} new messages",actionMore:"More",actionLock:"Lock",actionUnlock:"Unlock",actionDelete:"Delete",actionRestore:"Recover deleted message",processing:"Processing...",threadHeader:"{0}",quotaInReached:"You are over your maximum inbox quota",quotaInNear:"You are close to your maximum inbox quota",quotaOutReached:"We have detected excessive use of the messaging service. While you can still receive messages, you will not be able to send messages until midnight (PST).",quotaOutNear:"We have detected a potential excessive use problem. Continued use of the text messaging service at your current rate may cause your messaging service to be suspended until midnight (PST).",quotaDialogTitle:"Quota Warning",quotaError:"We have detected excessive use of the messaging service. While you can still receive messages, you will not be able to send messages until midnight (PST).",msgAnnotation:"{0} from {1}",composeHeader:"New Message",composeCancelButton:"Cancel",composeSendButton:"Send",composeToLabel:"To:",composeSubjectLabel:"Subject:",composeSendingStatus:"Sending message",composeErrorStatus:"Sorry, but there was a problem communicating with the server.<br/>Your message has not been sent. Please try again later.",composeSentStatus:"Message sent",composeExitNotification:"Your new SMS message has not been sent. Unsent SMS messages are not saved.",composeExitNotificationCancel:"Go back to message",composeExitNotificationOk:"Discard message",composeInvalidTN:"Please enter a telephone number between 5 to 14 digits.",composeEmptyError:"Please enter some text before you send a message",deleteThreadButton:"Delete Conversation",deleteThreadMsg:"{0} messages",deleteThreadWarning:"All unlocked messages in the conversation will be deleted. This cannot be undone.",forwardTextButton:"Forward as Text",forwardEmailButton:"Forward as Email",replySendButton:"Send",replySubjectLabel:"Subject:",threadMoreButton:"More",threadNone:"No Conversations",threadPleaseSelect:"No conversation selected.",provText1:"There are multiple available numbers associated with this account. Please choose the one to associate with this user ID.",provText2:"Once you associate a phone number with your user ID, you will be able to change this association online.",provComplete:"Welcome to xfinity Text Messaging! You will receive a new text message when your service is up and ready to use",provFailed:"Sorry, but there was a problem with Text Messaging for your account. Please wait a few minutes and try again. If this problem persists, please contact Customer Care and tell them the following message: [{0}].",provErrorTitle:"Sorry, there was a problem.",provErrorAlready:"An order is already pending on your account. Please try again later. (Error: {0})",provErrorGeneric:"We are unable to process your order. Please try again later or contact <a href='http://www.comcastsupport.com/' target='_blank'>Comcast Customer Care</a>. (Error: {0})",provPollWait:"Your request to add XFINITY Text Messaging has been received, and we are setting up your account. This process can take up to 10 minutes to complete, so we appreciate your patience. Please check back later to confirm that your set up has completed.<br/><br/>If your set up has not completed within 24 hours, please contact <a href='http://www.comcastsupport.com/' target='_blank'>Comcast Customer Care</a>.",provPollFinished:"Your Xfinity Text Messaging has been activated. We have sent a welcome text message to you.",provErrorHeader:"Server error",provErrorProfile:"Unable to retrieve profile; backend may be down.<br/><br/>Server response:<br/>{0}",provErrorVoicemail:"Unable to retrieve voicemail summary; backend may be down.<br/><br/>Server response:<br/>{0}",provErrorException:"There was an error with retrieving the account information<br/><br/>Server response:<br/>{0}",provCancel:"Cancel",provDecline:"Decline",provSignup:"Signup",provAccept:"Accept",provBack:"Back",provNext:"Next",provOK:"OK",loadFailedHead:"Sorry, we were unable to load your text messages.",loadFailedBody:"Please try refreshing your browser in a few minutes.",unsubscribe:"Unsubscribe",unsubscribeHead:"Are you sure you want to unsubscribe?",unsubscribeBody:"This will cancel your Text service and remove all messages from this device.",unsubscribeHeadProc:"Unsubscribing",unsubscribeBodyProc:"Cancelling your subscription...",unsubscribeHeadFinish:"Unsubscribe request sent",unsubscribeBodyFinish:"Thank you for interest in XFINITY Text Messaging. Your request to remove the Text Messaging feature has been received, and we are currently processing your request. This process can take up to 10 minutes to complete, so we appreciate your patience.<br/><br/>If this process has not completed within 24 hours, please contact <a href='http://www.comcastsupport.com/' target='_blank'>Comcast Customer Care</a>.",unsubscribeHeadFail:"Unsubscribe failed",unsubscribeBodyFail:"Sorry, there was a problem cancelling your subscription. Please wait a little bit and try again later."};
- if(!window.net_comcast_sms){
- net_comcast_sms={}
- }
- net_comcast_sms.config={
- deeplinkRef:"sms",broadcloudBase:"https://secure.api.comcast.net/textmsg",pollTime:10*60*1000};
- if(!net_comcast_sms){
- net_comcast_sms={}
- }
- net_comcast_sms.TEMPLATE_BASE="net_comcast_sms";
- AjxPackage.define(net_comcast_sms.TEMPLATE_BASE);
- net_comcast_sms.SmsZimlet=function(){
- SkinLoadedZimlet.call(this,"net_comcast_sms",ZmMsg,net_comcast_sms.config);
- this._loadCallbacks=[];
- this._settingsLoadCallbacks=[];
- this._settings=["SMS_AUTO_FORWARD_EMAIL_ADDR","SMS_AUTO_FORWARD_EMAIL"];
- net_comcast_sms.instance=this
- };
- net_comcast_sms.SmsZimlet.prototype=new SkinLoadedZimlet;
- net_comcast_sms.SmsZimlet.prototype.constructor=net_comcast_sms.SmsZimlet;
- net_comcast_sms.SmsZimlet.prototype.toString=function(){
- return"net_comcast_sms.SmsZimlet"
- };
- net_comcast_sms.SmsZimlet.prototype.getSubscribed=function(e){
- return net_comcast_sms.Provisioning.getSubscribed(e)
- };
- net_comcast_sms.SmsZimlet.prototype.signup=function(a,e,o,t){
- return net_comcast_sms.Provisioning.signup(a,e,o,t)
- };
- net_comcast_sms.SmsZimlet.prototype.unsubscribe=function(t,e){
- return net_comcast_sms.Provisioning.unsubscribe(new AjxCallback(this,function(){
- caboUtil.run(t,new AjxCallback(function(){
- appCtxt.getAppController().activateApp(ZmApp.PORTAL,true)
- }
- ))
- }
- ),e)
- };
- net_comcast_sms.SmsZimlet.prototype.getAvailableTNs=function(e){
- net_comcast_sms.Provisioning.getAvailableTNs(e)
- };
- net_comcast_sms.SmsZimlet.prototype.isEntitled=function(){
- return net_comcast_sms.Provisioning.isEntitled()
- };
- net_comcast_sms.SmsZimlet.prototype.loadVoiceData=function(e){
- net_comcast_sms.Provisioning.load(e)
- };
- net_comcast_sms.SmsZimlet.prototype.init=function(){
- var t=net_comcast_sms.Util.getCOSName();
- if(t=="mail"||t=="mail-noad"||t=="combo-secondary"){}else{
- var e="/zimbra/skins/velodrome2/public/";
- net_comcast_sms.SmsZimlet.PROXY=e+"proxy.jsp?url=";
- net_comcast_sms.SmsZimlet.TERMS=e+"getTerm.jsp";
- net_comcast_sms.SmsZimlet.RECORDCONTRACT=e+"recordContract.jsp";
- net_comcast_sms.SmsZimlet.ORDERADD=e+"orderAdd.jsp";
- net_comcast_sms.SmsZimlet.COSTS_LIMITED=this.getMessageF("prov_costs_limited.")||this.getResource("html/costs_limited.html");
- net_comcast_sms.SmsZimlet.COSTS_UNLIMITED=this.getMessageF("prov_costs_unlimited")||this.getResource("html/costs_unlimited.html");
- net_comcast_sms.SmsZimlet.COSTS_NEITHER=this.getMessageF("prov_costs_neither")||this.getResource("html/costs_neither.html");
- net_comcast_sms.SmsZimlet.MARKETING=this.getMessageF("prov_marketing")||this.getResource("html/marketing.html");
- net_comcast_sms.SmsZimlet.NOT_ENTITLED=this.getMessageF("prov_secondary")||this.getResource("html/secondary.html");
- net_comcast_sms.SmsZimlet.BUSINESS=this.getMessageF("prov_business")||this.getResource("html/business.html");
- net_comcast_sms.SmsZimlet.NO_CPNI=this.getMessageF("prov_noCPNI")||this.getResource("html/noCPNI.html");
- net_comcast_sms.SmsZimlet.PENDING=this.getMessageF("prov_pending")||this.getResource("html/pending.html");
- net_comcast_sms.SmsZimlet.PRIMARY_CCENTRAL=this.getMessageF("prov_primary_cCentral")||this.getResource("html/primary_cCentral.html");
- net_comcast_sms.SmsZimlet.PRIMARY_CCENTRAL_MUSTGO=this.getMessageF("prov_primary_cCentral_mustgo")||this.getResource("html/primary_cCentral_mustgo.html");
- net_comcast_sms.SmsZimlet.SECONDARY=this.getMessageF("prov_secondary")||this.getResource("html/secondary.html");
- net_comcast_sms.SmsZimlet.SECONDARY_CCENTRAL=this.getMessageF("prov_secondary_cCentral")||this.getResource("html/secondary_cCentral.html");
- net_comcast_sms.SmsZimlet.SECONDARY_NOTASSIGNED=this.getMessageF("prov_secondary_notAssigned")||this.getResource("html/secondary_notAssigned.html");
- net_comcast_sms.SmsZimlet.SNS_ENABLED=this.getMessageF("prov_snsEnabled")||this.getResource("html/snsEnabled.jsp");
- net_comcast_sms.SmsZimlet.SYNCING=this.getMessageF("prov_syncing")||this.getResource("html/syncing.html");
- net_comcast_sms.SmsZimlet.NO_ACCESS=this.getMessageF("prov_noAccess")||this.getResource("html/noAccess.html");
- this._controller=new net_comcast_sms.Controller(DwtShell.getShell(window),this);
- this._notificationClient=new net_comcast_sms.NotificationClient();
- this._setupTab();
- var o=this.getConfig("deeplinkRef")||"net_comcast_sms";
- var a=caboUtil.urlParam("app")||"";
- if(a.toLowerCase()==o.toLowerCase()){
- appCtxt.getAppController().activateApp(this.app._name,true)
- }}};
- net_comcast_sms.SmsZimlet.prototype.load=function(t){
- this._loadCallbacks.push(t);
- if(!this._loadBegun){
- this._loadBegun=true;
- var e=net_comcast_sms.Provisioning.getMasterAccount(new AjxCallback(this,this._load2))
- }else{
- if(this._loadComplete){
- this._finishLoad(t)
- }}};
- net_comcast_sms.SmsZimlet.prototype._load2=function(t){
- if(!t){
- this._controller.showError(this.getMsg("loadErrorMasterAccountNotFound"))
- }else{
- this._masterAccount=t;
- var e=t.users[0];
- this._load3(e)
- }};
- net_comcast_sms.SmsZimlet.prototype._load3=function(e){
- this._controller.setUserAccount(e,new AjxCallback(this,this._finishLoad))
- };
- net_comcast_sms.SmsZimlet.prototype._finishLoad=function(){
- var o=!this._loadComplete;
- this._loadComplete=true;
- this.loadSettings();
- var a=[].concat(this._loadCallbacks);
- this._loadCallbacks.length=0;
- var t=this;
- setTimeout(function(){
- caboUtil.run(a)
- }
- ,0);
- if(o){
- this._notificationClient.start();
- var e=this._controller.getUserAccount().getMessageStore();
- this._notificationClient.addListener("notification",new AjxCallback(e,e.handleNotification))
- }};
- net_comcast_sms.SmsZimlet.prototype.getDisplayName=function(){
- return this.getMsg("xtmTitle")
- };
- net_comcast_sms.SmsZimlet.prototype.getMsg=function(t){
- var a=this.getMessage(t);
- if(arguments.length>1){
- var e=Array.prototype.slice.call(arguments,1);
- a=AjxMessageFormat.format(a,e)
- }
- return a
- };
- net_comcast_sms.SmsZimlet.prototype._setupTab=function(){
- var r=appCtxt.getAppChooser();
- var a=AjxUtil.indexOf(r.getChildren(),r.getButton(ZmApp.PREFERENCES));
- var e=this.createApp(this.getMsg("xtmTitle"),"Telephone",this.getMsg("xtmTooltip"),a);
- var s=appCtxt.getAppChooser();
- var t={};
- for(var n=0;
- n<s._children.size();
- n++){
- var o=s._children.get(n);
- t[o.getData("_id_")]=o
- }
- s._buttons=t;
- this.app=appCtxt.getApp(e);
- this.app._controller=this._controller
- };
- net_comcast_sms.SmsZimlet.prototype.getAppController=function(){
- return this.app.getController()
- };
- net_comcast_sms.SmsZimlet.prototype.getOverviewWidth=function(){
- return window.skin.getTreeWidth()
- };
- net_comcast_sms.SmsZimlet.prototype.setOverviewWidth=function(t){
- var e=this.getOverviewWidth();
- appCtxt.getAppViewMgr()._appTreeSashCallback(t-e)
- };
- net_comcast_sms.SmsZimlet.prototype.getNotificationClient=function(){
- return this._notificationClient
- };
- net_comcast_sms.SmsZimlet.prototype.getLocalConfig=function(e){
- AjxRpc.invoke(null,"/zimbra/skins/velodrome2/public/getConfigValues.jsp",null,new AjxCallback(this,this._handleGetLocalConfig,[e]),true)
- };
- net_comcast_sms.SmsZimlet.prototype._handleGetLocalConfig=function(a,e){
- if(e&&e.success){
- var t=e.obj||JSON.gparse(e.text);
- caboUtil.run(a,t)
- }};
- net_comcast_sms.SmsZimlet.prototype._registerSettings=function(){
- appCtxt.getSettings().registerSetting("SMS_AUTO_FORWARD_EMAIL",{
- type:ZmSetting.T_PREF,dataType:ZmSetting.D_BOOLEAN,defaultValue:false}
- );
- appCtxt.getSettings().registerSetting("SMS_AUTO_FORWARD_EMAIL_ADDR",{
- type:ZmSetting.T_PREF,dataType:ZmSetting.D_STRING}
- );
- appCtxt.getSettings().registerSetting("SMS_UNSUBSCRIBE",{
- type:ZmSetting.T_PREF}
- )
- };
- net_comcast_sms.SmsZimlet.prototype._registerPrefs=function(){
- var e=this;
- caboUtil.onload("caboUtil.Preferences",function(){
- if(!e._sectionRegistered){
- e.getSubscribed(new AjxCallback(function(a){
- if(a){
- e.loadSettings();
- ZmPref.registerPref("SMS_AUTO_FORWARD_EMAIL",{
- displayContainer:ZmPref.TYPE_RADIO_GROUP,orientation:ZmPref.ORIENT_VERTICAL,displayOptions:[ZmMsg.on,ZmMsg.off],options:[true,false]}
- );
- ZmPref.registerPref("SMS_AUTO_FORWARD_EMAIL_ADDR",{
- displayContainer:ZmPref.TYPE_INPUT,validationFunction:ZmPref.validateEmail,errorMessage:ZmMsg.invalidEmail,hint:ZmMsg.enterEmailAddress}
- );
- ZmPref.registerPref("SMS_UNSUBSCRIBE",{
- displayContainer:ZmPref.TYPE_CUSTOM}
- );
- var t={
- title:e.getMsg("prefSectionTitle"),icon:"Telephone",templateId:"net_comcast_sms#Preferences",priority:200,manageDirty:true,prefs:[ZmSetting.SMS_AUTO_FORWARD_EMAIL,ZmSetting.SMS_AUTO_FORWARD_EMAIL_ADDR,ZmSetting.SMS_UNSUBSCRIBE],createView:function(r,s,n){
- var o=new net_comcast_sms.PrefController(e,r,n._app,n._prefsView,s,n);
- AjxUtil.hashUpdate(o,n);
- return new net_comcast_sms.PrefsView(r,s,o)
- }};
- ZmPref.registerPrefSection("SMS",t);
- e._sectionRegistered=true
- }}
- ))
- }}
- )
- };
- net_comcast_sms.SmsZimlet.prototype.loadSettings=function(o){
- if(!this._settingsLoadingBegun){
- this._settingsLoadingBegun=true;
- var a=this._settings.length;
- var t=caboUtil.MultiCallback.simple(a,null,new AjxCallback(this,this._handleLoadSettings),true);
- for(var e=0;
- e<a;
- e++){
- this.loadSetting(this._settings[e],t.getCallback(e))
- }}else{
- if(this._settingsLoaded){
- caboUtil.run(o)
- }else{
- this.addSettingsLoadListener(o)
- }}};
- net_comcast_sms.SmsZimlet.prototype.addSettingsLoadListener=function(e){
- this._settingsLoadCallbacks.push(e)
- };
- net_comcast_sms.SmsZimlet.prototype._handleLoadSettings=function(){
- this._settingsLoaded=true;
- caboUtil.run(this._settingsLoadCallbacks);
- this._settingsLoadCallbacks.length=0
- };
- net_comcast_sms.SmsZimlet.prototype.getSettingsLoaded=function(){
- return this._settingsLoaded
- };
- net_comcast_sms.SmsZimlet.prototype.loadSetting=function(a,n){
- var e=appCtxt.getSettings().getSetting(a);
- if(e){
- var t;
- var o=new AjxCallback(this,function(s){
- if(!AjxUtil.isUndefined(s)){
- e.setValue(s.toString())
- }
- caboUtil.run(n)
- }
- );
- switch(a){
- case"SMS_AUTO_FORWARD_EMAIL":this._loadSmsFwdConfigSetting("email.enabled",o);
- break;
- case"SMS_AUTO_FORWARD_EMAIL_ADDR":this._loadSmsFwdConfigSetting("email.addr",o);
- break;
- default:caboUtil.run(o);
- break
- }}};
- net_comcast_sms.SmsZimlet.prototype.saveSettings=function(o){
- var a=caboUtil.MultiCallback.simple(this._settings.length,null,new AjxCallback(this,this._finalizeSettings,[o]),true);
- for(var t=0,e=this._settings.length;
- t<e;
- t++){
- this.saveSetting(this._settings[t],false,a.getCallback(t))
- }};
- net_comcast_sms.SmsZimlet.prototype._finalizeSettings=function(e){
- this._finalizeSmsFwdConfigSetting(e)
- };
- net_comcast_sms.SmsZimlet.prototype.saveSetting=function(a,o,n){
- var e=(a instanceof ZmSetting)?a:appCtxt.getSettings().getSetting(a);
- if(e instanceof ZmSetting){
- var t=e.getValue();
- if(!AjxUtil.isUndefined(t)){
- e.origValue=t;
- switch(a){
- case"SMS_AUTO_FORWARD_EMAIL":this._saveSmsFwdConfigSetting("email.enabled",t,o,n);
- break;
- case"SMS_AUTO_FORWARD_EMAIL_ADDR":this._saveSmsFwdConfigSetting("email.addr",t,o,n);
- break;
- default:caboUtil.run(n);
- break
- }}}};
- net_comcast_sms.SmsZimlet.prototype._saveSmsFwdConfigSetting=function(e,t,a,o){
- this._getLoadedSmsFwdConfig(function(n){
- n.setConfigValue(e,t);
- if(a){
- n.put(o)
- }else{
- caboUtil.run(o)
- }}
- )
- };
- net_comcast_sms.SmsZimlet.prototype._loadSmsFwdConfigSetting=function(e,t){
- this._getLoadedSmsFwdConfig(function(a){
- caboUtil.run(t,a.getConfigValue(e))
- }
- )
- };
- net_comcast_sms.SmsZimlet.prototype._finalizeSmsFwdConfigSetting=function(e){
- this._getLoadedSmsFwdConfig(function(t){
- t.put(e)
- }
- )
- };
- net_comcast_sms.SmsZimlet.prototype._finalizeSmsConfigSetting=function(e){
- caboUtil.run(e)
- };
- net_comcast_sms.SmsZimlet.prototype._getLoadedSmsConfig=function(e){
- this.load(new AjxCallback(this,function(){
- var t=this._controller.getUserAccount();
- t.loadConfig(new AjxCallback(this,function(){
- caboUtil.run(e,t)
- }
- ))
- }
- ))
- };
- net_comcast_sms.SmsZimlet.prototype._getLoadedSmsFwdConfig=function(e){
- this.load(new AjxCallback(this,function(){
- var t=this._controller.getUserAccount();
- t.fwd.get(new AjxCallback(this,function(a){
- caboUtil.run(e,a)
- }
- ))
- }
- ))
- };
- net_comcast_sms.SmsZimlet.prototype.getController=function(){
- return this._controller
- };
- net_comcast_sms.SmsZimlet.prototype.composeToContact=function(e){
- return this._controller.composeToContact(e)
- };
- net_comcast_sms.SmsZimlet.prototype.getHouseholdDialog=function(){
- if(!this._householdDialog){
- this._householdDialog=new net_comcast_sms.HouseholdDialog({
- parent:appCtxt.getShell(),controller:this._controller}
- )
- }
- return this._householdDialog
- };
- AjxTemplate.register("net_comcast_sms#ThreadViewList",function(t,s,n,e){
- var o=Boolean(e);
- n=(typeof n=="string"?{
- id:n}
- :n)||{};
- e=e||[];
- var a=e.length;
- e[a++]="<table border=0 cellspacing=0 cellpadding=0 width='100%' height='100%'><tr><td class='ThreadViewList'><div id='";
- e[a++]=n.id;
- e[a++]="_none' style='height:100%'></div><div id='";
- e[a++]=n.id;
- e[a++]="_thread' style='height:100%'></div></td></tr><tr><td class='ThreadViewFooter'><div id='";
- e[a++]=n.id;
- e[a++]="_reply'></div><div id='";
- e[a++]=n.id;
- e[a++]="_forward'></div><div id='";
- e[a++]=n.id;
- e[a++]="_deleteThread'></div></td></tr></table>";
- return o?e.length:e.join("")
- }
- ,{
- id:"net_comcast_sms#ThreadViewList","class":"ZWidget"}
- ,false);
- AjxTemplate.register("net_comcast_sms",AjxTemplate.getTemplate("net_comcast_sms#ThreadViewList"),AjxTemplate.getParams("net_comcast_sms#ThreadViewList"));
- AjxTemplate.register("net_comcast_sms#ThreadView",function(t,s,n,e){
- var o=Boolean(e);
- n=(typeof n=="string"?{
- id:n}
- :n)||{};
- e=e||[];
- var a=e.length;
- e[a++]="<div id='";
- e[a++]=n.id;
- e[a++]="_header' class='ThreadViewHeader'></div><div id='";
- e[a++]=n.id;
- e[a++]="_more'></div><div id='";
- e[a++]=n.id;
- e[a++]="_thread' class='ThreadViewBody'></div>";
- return o?e.length:e.join("")
- }
- ,{
- id:"net_comcast_sms#ThreadView","class":"ZWidget"}
- ,false);
- AjxTemplate.register("net_comcast_sms#MessageViewIncoming",function(t,s,n,e){
- var o=Boolean(e);
- n=(typeof n=="string"?{
- id:n}
- :n)||{};
- e=e||[];
- var a=e.length;
- e[a++]="<div id='";
- e[a++]=n.id;
- e[a++]="_message' class='IncomingMessage'><table cellpadding='0' cellspacing='0'><tr><td class='MessageLeftPadding' width='33px'><div style='width:33px'><div id='";
- e[a++]=n.id;
- e[a++]="_forward_buttons' class='MessageForwardButtons'><div id='";
- e[a++]=n.id;
- e[a++]="_check_forward' class='MessageForwardButton'></div></div></div></td><td class='MessageTableCell' id='";
- e[a++]=n.id;
- e[a++]="_balloon' width='400px'><table border='0' cellspacing=0 cellpadding=0 class='MessageTable'><tr><td class='MessageImage'><!--<img id='";
- e[a++]=n.id;
- e[a++]="_image'/>--></td><td class='MessageBodyCell'><div class='MessageBody'><div id='";
- e[a++]=n.id;
- e[a++]="_body'></div></div></td></tr><tr><td><div id='";
- e[a++]=n.id;
- e[a++]="_lock' class='MessageLock'></div></td><td><div id='";
- e[a++]=n.id;
- e[a++]="_annotation' class='MessageAnnotation'></div></td></tr></table></td><td class='ButtonTableCell' width='100%'><table><tr><td class='MessageButtons'><div id='";
- e[a++]=n.id;
- e[a++]="_edit_buttons' class='MessageEditButtons' style='float:left'><table><tr><td><div id='";
- e[a++]=n.id;
- e[a++]="_button_lock' class='MessageEditButton'></div></td><td><div id='";
- e[a++]=n.id;
- e[a++]="_button_unlock' class='MessageEditButton'></div></td><td><div id='";
- e[a++]=n.id;
- e[a++]="_button_delete' class='MessageEditButton'></div></td></tr></table></div><div id='";
- e[a++]=n.id;
- e[a++]="_processing_area' class='MessageProcessingArea' style='float:left'><div id='";
- e[a++]=n.id;
- e[a++]="_processing' class='MessageProcessing'></div></div></td></tr></table></td><td class='MessageRightPadding' width='33px'><div style='width:33px'></div></td></tr><tr><td class='MessageLeftPadding'></td><td colspan='3'><div class='tip'> </div></td></tr></table></div><div id='";
- e[a++]=n.id;
- e[a++]="_restore' class='MessageRestore'><div id='";
- e[a++]=n.id;
- e[a++]="_button_restore' class='MessageRestoreButton'></div><div id='";
- e[a++]=n.id;
- e[a++]="_restoring_area' class='MessageProcessingArea'><div id='";
- e[a++]=n.id;
- e[a++]="_restoring' class='MessageProcessing'></div></div></div>";
- return o?e.length:e.join("")
- }
- ,{
- id:"net_comcast_sms#MessageViewIncoming","class":"ZWidget"}
- ,false);
- AjxTemplate.register("net_comcast_sms#MessageViewOutgoing",function(t,s,n,e){
- var o=Boolean(e);
- n=(typeof n=="string"?{
- id:n}
- :n)||{};
- e=e||[];
- var a=e.length;
- e[a++]="<div id='";
- e[a++]=n.id;
- e[a++]="_message' class='OutgoingMessage'><table cellpadding='0' cellspacing='0'><tr><td class='MessageLeftPadding' width='33px'><div style='width:33px'></div></td><td class='ButtonTableCell' width='100%' align=\"right\"><table><tr><td class='MessageButtons'><div id='";
- e[a++]=n.id;
- e[a++]="_edit_buttons' class='MessageEditButtons'><table><tr><td><div id='";
- e[a++]=n.id;
- e[a++]="_button_lock' class='MessageEditButton'></div></td><td><div id='";
- e[a++]=n.id;
- e[a++]="_button_unlock' class='MessageEditButton'></div></td><td><div id='";
- e[a++]=n.id;
- e[a++]="_button_delete' class='MessageEditButton'></div></td></tr></table></div><div id='";
- e[a++]=n.id;
- e[a++]="_forward_buttons' class='MessageForwardButtons' style='float:right'><div id='";
- e[a++]=n.id;
- e[a++]="_check_forward' class='MessageForwardButton'></div></div><div id='";
- e[a++]=n.id;
- e[a++]="_processing_area' class='MessageProcessingArea' style='float:right'><div id='";
- e[a++]=n.id;
- e[a++]="_processing' class='MessageProcessing'></div></div></td></tr></table></td><td class='MessageTableCell' id='";
- e[a++]=n.id;
- e[a++]="_balloon' width='400px'><table border='0' cellspacing=0 cellpadding=0 class='MessageTable'><tr><td class='MessageImage'></td><td class='MessageBodyCell'><div class='MessageBody'><div id='";
- e[a++]=n.id;
- e[a++]="_body'></div></div></td></tr><tr><td><div id='";
- e[a++]=n.id;
- e[a++]="_lock' class='MessageLock'></div></td><td><div id='";
- e[a++]=n.id;
- e[a++]="_annotation' class='MessageAnnotation'></div></td></tr></table></td><td class='MessageRightPadding' width='33px'><div style='width:33px'></div></td></tr><tr><td colspan='3'><div class='tip'> </div></td><td class='MessageRightPadding'></td></tr></table></div><div id='";
- e[a++]=n.id;
- e[a++]="_restore' class='MessageRestore'><div id='";
- e[a++]=n.id;
- e[a++]="_button_restore' class='MessageRestoreButton'></div><div id='";
- e[a++]=n.id;
- e[a++]="_restoring_area' class='MessageProcessingArea'><div id='";
- e[a++]=n.id;
- e[a++]="_restoring' class='MessageProcessing'></div></div></div>";
- return o?e.length:e.join("")
- }
- ,{
- id:"net_comcast_sms#MessageViewOutgoing","class":"ZWidget"}
- ,false);
- AjxTemplate.register("net_comcast_sms#Reply",function(t,s,n,e){
- var o=Boolean(e);
- n=(typeof n=="string"?{
- id:n}
- :n)||{};
- e=e||[];
- var a=e.length;
- e[a++]="<table border=0 cellspacing=0 cellpadding=0 width='100%' height='100%'><tr id='";
- e[a++]=n.id;
- e[a++]="_groupRow'><td class='ReplyGroup' colspan='3'><div id=\"";
- e[a++]=n.id;
- e[a++]="_group\"></div></td></tr><!--<tr id='";
- e[a++]=n.id;
- e[a++]="_subjectRow'><td class='ReplySubject' colspan='3'><table border='0' cellspacing='0' cellpadding='0' width='100%'><tr><td class='ReplySubjectLabel'>\n";
- e[a++]="\t\t\t\t\t\t\t";
- e[a++]=n.msg["replySubjectLabel"];
- e[a++]="\n";
- e[a++]="\t\t\t\t\t\t</td><td class='ReplySubjectField'><div id='";
- e[a++]=n.id;
- e[a++]="_subject'></div></td></tr></table></td></tr>--><tr><td class='ReplyField' colspan='3'><div id='";
- e[a++]=n.id;
- e[a++]="_field'></div></td></tr><tr class='ReplyRow'><td class='ReplyLength'><div id='";
- e[a++]=n.id;
- e[a++]="_length'></div></td><td width='100%'></td><td class='ReplyButtons'><table><tr><td class='ReplyEmoticon'><div id='";
- e[a++]=n.id;
- e[a++]="_emoticon' class='EmoticonReplyButton'></div></td><td><div id='";
- e[a++]=n.id;
- e[a++]="_send'></div></td></tr></table></td></tr></table>";
- return o?e.length:e.join("")
- }
- ,{
- id:"net_comcast_sms#Reply","class":"ZWidget"}
- ,false);
- AjxTemplate.register("net_comcast_sms#DeleteThread",function(t,s,n,e){
- var o=Boolean(e);
- n=(typeof n=="string"?{
- id:n}
- :n)||{};
- e=e||[];
- var a=e.length;
- e[a++]="<table><tr><td><div id='";
- e[a++]=n.id;
- e[a++]="_messageCount'></div></td><td><div id='";
- e[a++]=n.id;
- e[a++]="_deleteButton'></div></td></tr></table>";
- return o?e.length:e.join("")
- }
- ,{
- id:"net_comcast_sms#DeleteThread","class":"ZWidget"}
- ,false);
- AjxTemplate.register("net_comcast_sms#Forward",function(t,s,n,e){
- var o=Boolean(e);
- n=(typeof n=="string"?{
- id:n}
- :n)||{};
- e=e||[];
- var a=e.length;
- e[a++]="<table class='ForwardTable'><tr><td><div id='";
- e[a++]=n.id;
- e[a++]="_sms'></div></td><td><div id='";
- e[a++]=n.id;
- e[a++]="_email'></div></td></tr></table>";
- return o?e.length:e.join("")
- }
- ,{
- id:"net_comcast_sms#Forward","class":"ZWidget"}
- ,false);
- AjxTemplate.register("net_comcast_sms#Compose",function(t,s,n,e){
- var o=Boolean(e);
- n=(typeof n=="string"?{
- id:n}
- :n)||{};
- e=e||[];
- var a=e.length;
- e[a++]="<table border='0' cellspacing='0' cellpadding='0' width='100%'><tr id='";
- e[a++]=n.id;
- e[a++]="_headerRow'><td class='ComposeViewHeader' colspan='2'><div id='";
- e[a++]=n.id;
- e[a++]="_header'></div></td></tr><tr id='";
- e[a++]=n.id;
- e[a++]="_toRow'><td class='ComposeTo' colspan='2'><table border='0' cellspacing='0' cellpadding='0' width='100%'><tr><td class='ComposeToLabel'>";
- e[a++]=n.msg["composeToLabel"];
- e[a++]="</td><td class='ComposeToField'><div id='";
- e[a++]=n.id;
- e[a++]="_to'></div></td></tr></table></td></tr><!--<tr id='";
- e[a++]=n.id;
- e[a++]="_subjectRow'><td class='ComposeSubject' colspan='2'><table border='0' cellspacing='0' cellpadding='0' width='100%'><tr><td class='ComposeSubjectLabel'>";
- e[a++]=n.msg["composeSubjectLabel"];
- e[a++]="</td><td class='ComposeSubjectField'><div id='";
- e[a++]=n.id;
- e[a++]="_subject'></div></td></tr></table></td></tr>--><tr id='";
- e[a++]=n.id;
- e[a++]="_textRow'><td class='ComposeField' colspan='2'><div id='";
- e[a++]=n.id;
- e[a++]="_field'></div></td></tr><tr id='";
- e[a++]=n.id;
- e[a++]="_footerRow'><td class='ComposeLength'><div id='";
- e[a++]=n.id;
- e[a++]="_length'></div></td><td class='ComposeButtons'><table><tr><td><div id='";
- e[a++]=n.id;
- e[a++]="_emoticon'></div></td><td><div id='";
- e[a++]=n.id;
- e[a++]="_send'></div></td></tr></table></td></tr></table>";
- return o?e.length:e.join("")
- }
- ,{
- id:"net_comcast_sms#Compose","class":"ZWidget"}
- ,false);
- AjxTemplate.register("net_comcast_sms#EmoticonChooser",function(t,r,s,e){
- var n=Boolean(e);
- s=(typeof s=="string"?{
- id:s}
- :s)||{};
- e=e||[];
- var o=e.length;
- e[o++]="<table border='0' cellspacing='3' cellpadding='0' height='100%'><tr>";
- for(var a=0;
- a<s.count;
- a++){
- e[o++]='<td><div id="';
- e[o++]=s.id;
- e[o++]="_btn";
- e[o++]=a;
- e[o++]='" class="ZButton"';
- if(AjxEnv.isIE){
- e[o++]=' style="width:20px;height:20px;"'
- }
- e[o++]='><div class="ZButtonBorder"><div id="';
- e[o++]=s.id;
- e[o++]="_emo";
- e[o++]=a;
- e[o++]='"></div></div></div></td>'
- }
- e[o++]="</tr></table>";
- return n?e.length:e.join("")
- }
- ,{
- id:"net_comcast_sms#EmoticonChooser","class":"ZWidget"}
- ,false);
- AjxTemplate.register("net_comcast_sms#UnsentView",function(t,s,n,e){
- var o=Boolean(e);
- n=(typeof n=="string"?{
- id:n}
- :n)||{};
- e=e||[];
- var a=e.length;
- e[a++]="<table border='0' cellspacing='0' cellpadding='0' width='100%'><tr><td><div id='";
- e[a++]=n.id;
- e[a++]="_label'></div></td><td><div id='";
- e[a++]=n.id;
- e[a++]="_count'></div></td></tr></table>";
- return o?e.length:e.join("")
- }
- ,{
- id:"net_comcast_sms#UnsentView","class":"ZWidget"}
- ,false);
- AjxTemplate.register("net_comcast_sms#Preferences",function(t,s,n,e){
- var o=Boolean(e);
- n=(typeof n=="string"?{
- id:n}
- :n)||{};
- e=e||[];
- var a=e.length;
- e[a++]="<div align=right style='margin-right: 20px; margin-bottom: 10px;'><div id='";
- e[a++]=n.id;
- e[a++]="_REVERT_PAGE' tabindex='10' style='margin-right: 25px;'></div></div><table border='0' cellspacing='0' cellpadding='0' width='100%'><tr class='ZOptionsHeaderRow'><td class='ZOptionsHeaderL'><div class='ImgPrefsHeader_L'></div></td><td class='ZOptionsHeader ImgPrefsHeader'>";
- e[a++]=n.msg["prefGeneralSectionTitle"];
- e[a++]="</td><td class='ZOptionsHeaderR'><div class='ImgPrefsHeader_R'></div></td></tr></table><table class='ZOptionsSectionTable' border='0' cellspacing='0' cellpadding='0' width='100%'><tr><td class='ZOptionsSectionMain'><table width=100%><tr><td class='ZOptionsLabelTop'>";
- e[a++]=n.msg["prefAutoForwardLabel"];
- e[a++]="</td><td class='ZOptionsField'><div id='";
- e[a++]=n.id;
- e[a++]="_SMS_AUTO_FORWARD_EMAIL' tabindex='36'></div></td><td class='ZOptionsLabelTop'>";
- e[a++]=n.msg["prefAutoForwardToLabel"];
- e[a++]="</td><td class='ZOptionsField' style='vertical-align:top'><div id='";
- e[a++]=n.id;
- e[a++]="_SMS_AUTO_FORWARD_EMAIL_ADDR' tabindex='37'></div></td></tr><tr><td></td><td class='ZOptionsField'><div id='";
- e[a++]=n.id;
- e[a++]="_SMS_UNSUBSCRIBE' tabindex='39'></div></td></tr></table></td></tr></table>";
- return o?e.length:e.join("")
- }
- ,{
- id:"net_comcast_sms#Preferences"}
- ,false);
- AjxTemplate.register("net_comcast_sms#Provisioning",function(t,s,n,e){
- var o=Boolean(e);
- n=(typeof n=="string"?{
- id:n}
- :n)||{};
- e=e||[];
- var a=e.length;
- e[a++]="<table border='0' cellspacing='0' cellpadding='0' width='100%' height='100%'><tr><td class='ProvisioningHeader' colspan='2'><div id='";
- e[a++]=n.id;
- e[a++]="_header'></div></td></tr><tr><td><table border='0' cellspacing='0' cellpadding='0' width='100%' height='100%' class='ProvisioningBody'><tr><td height='100%' class='Content'><div id=\"";
- e[a++]=n.id;
- e[a++]='_notEntitled"></div><div id="';
- e[a++]=n.id;
- e[a++]='_marketing"></div><div id="';
- e[a++]=n.id;
- e[a++]='_accountChooser"></div><div id="';
- e[a++]=n.id;
- e[a++]='_terms"></div><div id="';
- e[a++]=n.id;
- e[a++]='_costs"></div><div id="';
- e[a++]=n.id;
- e[a++]="_congratulations\"></div></td></tr><tr><td align='center' class='Buttons'><table border='0' cellspacing='0' cellpadding='0'><tr><td><div id=\"";
- e[a++]=n.id;
- e[a++]='_backButton"></div></td><td><div id="';
- e[a++]=n.id;
- e[a++]='_declineButton"></div></td><td><div id="';
- e[a++]=n.id;
- e[a++]='_acceptButton"></div></td><td><div id="';
- e[a++]=n.id;
- e[a++]='_okButton"></div></td><td><div id="';
- e[a++]=n.id;
- e[a++]='_nextButton"></div></td><td><div id="';
- e[a++]=n.id;
- e[a++]='_signupButton"></div></td></tr></table></td></tr></table></td></tr></table>';
- return o?e.length:e.join("")
- }
- ,{
- id:"net_comcast_sms#Provisioning"}
- ,false);
- AjxTemplate.register("net_comcast_sms#Provisioning.AccountChooser",function(t,s,n,e){
- var o=Boolean(e);
- n=(typeof n=="string"?{
- id:n}
- :n)||{};
- e=e||[];
- var a=e.length;
- e[a++]="<table border='0' cellspacing='0' cellpadding='0' width='100%' height='200' class='AccountChooser'><tr height='33%'><td><div id=\"";
- e[a++]=n.id;
- e[a++]="_text1\"></div></td></tr><tr height='34%'><td><div id=\"";
- e[a++]=n.id;
- e[a++]='_list" class="AccountChooserList"></div></td></tr><tr height=\'33%\'><td><div id="';
- e[a++]=n.id;
- e[a++]='_text2"></div></td></tr></table>';
- return o?e.length:e.join("")
- }
- ,{
- id:"net_comcast_sms#Provisioning.AccountChooser"}
- ,false);
- AjxTemplate.register("net_comcast_sms#Provisioning.AccountChooser.RadioButton",function(t,s,n,e){
- var o=Boolean(e);
- n=(typeof n=="string"?{
- id:n}
- :n)||{};
- e=e||[];
- var a=e.length;
- e[a++]="<table cellpadding='2' cellspacing='0' border='0' width='100%'><tr><td><label id='";
- e[a++]=n.id;
- e[a++]="_text_left' for='";
- e[a++]=n.id;
- e[a++]="_input' class='Text' style='text-align:right'></label></td><td><input id='";
- e[a++]=n.id;
- e[a++]="_input' name='";
- e[a++]=n.name;
- e[a++]="' value='";
- e[a++]=n.value;
- e[a++]="' type='radio' ";
- e[a++]=n.checked;
- e[a++]="></td><td width='100%'><label id='";
- e[a++]=n.id;
- e[a++]="_text_right' for='";
- e[a++]=n.id;
- e[a++]="_input' class='Text' style='text-align:left'></label></td><td><div id='";
- e[a++]=n.id;
- e[a++]="_image_right' class='RadioButtonImage ImgCheck'></div></td></tr></table>";
- return o?e.length:e.join("")
- }
- ,{
- id:"net_comcast_sms#Provisioning.AccountChooser.RadioButton"}
- ,false);
- AjxTemplate.register("net_comcast_sms#ErrorView",function(t,s,n,e){
- var o=Boolean(e);
- n=(typeof n=="string"?{
- id:n}
- :n)||{};
- e=e||[];
- var a=e.length;
- e[a++]="<table cellpadding='2' cellspacing='0' border='0'><tr><td><img src=\"";
- e[a++]=n.img;
- e[a++]='"/></td><td><h1 id="';
- e[a++]=n.id;
- e[a++]='_title">';
- e[a++]=n.msg["loadFailedHead"];
- e[a++]='</h1><p id="';
- e[a++]=n.id;
- e[a++]='_msg">';
- e[a++]=n.msg["loadFailedBody"];
- e[a++]="</p></td></tr></table>";
- return o?e.length:e.join("")
- }
- ,{
- id:"net_comcast_sms#ErrorView"}
- ,false);
- JSON=function(){};
- (function(){
- function e(t){
- return t<10?"0"+t:t
- }
- if(typeof Date.prototype.toJSON!=="function"){
- Date.prototype.toJSON=function(t){
- return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"Z":null
- }
- }
- String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(t){
- return this.valueOf()
- }
- }
- )();
- JSON.cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
- JSON.escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
- JSON.meta={
- "\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};
- JSON.rep;
- JSON.quote=function(e){
- JSON.escapable.lastIndex=0;
- return JSON.escapable.test(e)?'"'+e.replace(JSON.escapable,function(t){
- var o=JSON.meta[t];
- return typeof o==="string"?o:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)
- }
- )+'"':'"'+e+'"'
- };
- JSON.str=function(h,n){
- var a,t,l,e,s=JSON.gap,o,r=n[h];
- if(r&&typeof r==="object"&&typeof r.toJSON==="function"){
- r=r.toJSON(h)
- }
- if(typeof JSON.rep==="function"){
- r=JSON.rep.call(n,h,r)
- }
- switch(typeof r){
- case"string":return JSON.quote(r);
- case"number":return isFinite(r)?String(r):"null";
- case"boolean":case"null":return String(r);
- case"object":if(!r){
- return"null"
- }
- JSON.gap+=JSON.indent;
- o=[];
- if(Object.prototype.toString.apply(r)==="[object Array]"){
- e=r.length;
- for(a=0;
- a<e;
- a+=1){
- o[a]=JSON.str(a,r)||"null"
- }
- l=o.length===0?"[]":JSON.gap?"[\n"+JSON.gap+o.join(",\n"+JSON.gap)+"\n"+s+"]":"["+o.join(",")+"]";
- JSON.gap=s;
- return l
- }
- if(JSON.rep&&typeof JSON.rep==="object"){
- e=JSON.rep.length;
- for(a=0;
- a<e;
- a+=1){
- t=JSON.rep[a];
- if(typeof t==="string"){
- l=JSON.str(t,r);
- if(l){
- o.push(JSON.quote(t)+(JSON.gap?": ":":")+l)
- }}}}else{
- for(t in r){
- if(Object.hasOwnProperty.call(r,t)){
- l=JSON.str(t,r);
- if(l){
- o.push(JSON.quote(t)+(JSON.gap?": ":":")+l)
- }}}}
- l=o.length===0?"{}":JSON.gap?"{\n"+JSON.gap+o.join(",\n"+JSON.gap)+"\n"+s+"}":"{"+o.join(",")+"}";
- JSON.gap=s;
- return l
- }};
- JSON.stringify=function(o,t,a){
- var e;
- JSON.gap="";
- JSON.indent="";
- if(typeof a==="number"){
- for(e=0;
- e<a;
- e+=1){
- JSON.indent+=" "
- }}else{
- if(typeof a==="string"){
- JSON.indent=a
- }}
- JSON.rep=t;
- if(t&&typeof t!=="function"&&(typeof t!=="object"||typeof t.length!=="number")){
- throw new Error("JSON.stringify")
- }
- return JSON.str("",{
- "":o}
- )
- };
- JSON.parse=function(text,reviver){
- var j;
- var walk=function walk(holder,key){
- var k,v,value=holder[key];
- if(value&&typeof value==="object"){
- for(k in value){
- if(Object.hasOwnProperty.call(value,k)){
- v=walk(value,k);
- if(v!==undefined){
- value[k]=v
- }else{
- delete value[k]
- }}}}
- return reviver.call(holder,key,value)
- };
- text=String(text);
- JSON.lastIndex=0;
- if(JSON.cx.test(text)){
- text=text.replace(JSON.cx,function(a){
- return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)
- }
- )
- }
- if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){
- j=eval("("+text+")");
- return typeof reviver==="function"?walk({
- "":j}
- ,""):j
- }
- throw new SyntaxError("JSON.parse")
- };
- JSON.gparse=function(o,t){
- try{
- return JSON.parse(o,t)
- }
- catch(a){
- return null
- }};
- if(!window.caboUtil){
- window.caboUtil={
- onload_listeners:{}
- ,has_loaded:{}
- ,namespace:function(e){
- if(!this[e]){
- this[e]={};
- return true
- }
- return false
- }
- ,onload:function(e,t){
- if(this.has_loaded[e]){
- caboUtil.run(t)
- }else{
- if(!this.onload_listeners[e]){
- this.onload_listeners[e]=[]
- }
- this.onload_listeners[e].push(t)
- }}
- ,fill:function(e,a){
- var t=(AjxUtil.isObject(e)&&e)||(AjxUtil.isString(e)&&this[e])||null;
- if(t){
- AjxUtil.hashUpdate(t,a,true)
- }}
- ,fillProto:function(e,t){
- if(this[e]&&this[e].prototype){
- AjxUtil.hashUpdate(this[e].prototype,t,true)
- }}
- ,run:function(o){
- if(o){
- var e=Array.prototype.slice.call(arguments,1);
- if(o instanceof AjxCallback){
- return o.run.apply(o,e)
- }else{
- if(AjxUtil.isFunction(o)){
- return o.apply(o,e)
- }else{
- if(AjxUtil.isArray(o)){
- var n=[];
- var s=[].concat(o);
- for(var a=0,t=s.length;
- a<t;
- a++){
- n[a]=this.run.apply(this,[s[a]].concat(e))
- }
- return n
- }}}}}
- ,apply:function(o,t){
- var e=[o];
- for(var a=0;
- a<t.length;
- a++){
- e.push(t[a])
- }
- this.run.apply(this,e)
- }
- ,augment:function(n,o,e,t){
- if(!n){
- n=window
- }
- var a=n[o];
- if(a){
- n[o]=function(){
- if(t){
- var s=e.apply(this,arguments);
- return a.apply(this,s)
- }else{
- var s=[a.apply(this,arguments)].concat(Array.prototype.slice.call(arguments,0));
- return e.apply(this,s)
- }}
- }}
- ,urlParam:function(e){
- e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");
- var a=new RegExp("[\\?&]"+e+"=([^&#]*)");
- var t=a.exec(window.location.href);
- return(t==null)?"":t[1]
- }
- ,log:function(){
- if(window.console&&window.console.log){
- if(AjxEnv.isIE){
- console.log(Array.prototype.join.call(arguments,", "))
- }else{
- console.log.apply(console,arguments)
- }}}
- ,__load:function(t){
- var e=this.onload_listeners[t];
- this.run(e);
- this.has_loaded[t]=true
- }}
- }
- if(caboUtil.namespace("Coll")){
- caboUtil.fill("Coll",{
- collapseHashArray:function(t,a,n){
- var e={};
- for(var o=0;
- o<t.length;
- o++){
- AjxUtil.hashUpdate(e,t[o],a,n)
- }
- return e
- }
- ,asHash:function(t,e){
- if(AjxUtil.isObject(t)){
- if(AjxUtil.isArray(t)){
- return AjxUtil.arrayAsHash(t,e)
- }else{
- return t
- }}else{
- return AjxUtil.arrayAsHash([t],e)
- }}
- ,isEmpty:function(e){
- if(AjxUtil.isObject(e)&&!AjxUtil.isArray(e)){
- for(var t in e){
- return false
- }
- return true
- }else{
- return AjxUtil.isEmpty(e)
- }}
- ,uniq:function(o){
- var t=[];
- for(var s=0,n=o.length;
- s<n;
- s++){
- var e=o[s];
- if(!e.___uniq_flag){
- e.___uniq_flag=true;
- t.push(e)
- }}
- for(var s=0,n=o.length;
- s<n;
- s++){
- delete o[s].___uniq_flag
- }
- return t
- }
- ,range:function(n,o,t){
- var e=[];
- for(var a=n;
- a<=o;
- a++){
- e.push(t?t(a):a)
- }
- return e
- }
- ,deref:function(a,l,r){
- var s=(arguments.length>=3);
- var n=l.split(".");
- for(var o=0,e=n.length;
- o<e;
- o++){
- var h=n[o];
- var t=s&&(o+1==e);
- if(s){
- if(t){
- a[h]=r;
- return
- }else{
- if(!AjxUtil.isObject(a[h])){
- a[h]={}
- }}}else{
- if(!AjxUtil.isObject(a)){
- return undefined
- }}
- a=a[h]
- }
- return a
- }
- ,deepcopy:function(n){
- if(AjxUtil.isObject(n)){
- var e=AjxUtil.isArray(n)?[]:{};
- for(var a in n){
- var o=n[a];
- if(AjxUtil.isArray(o)){
- var s=e[a]=[];
- for(var t=0;
- t<o.length;
- t++){
- s[t]=this.deepcopy(o[t])
- }}else{
- if(AjxUtil.isObject(o)){
- e[a]=this.deepcopy(o)
- }else{
- e[a]=o
- }}}
- return e
- }else{
- return n
- }}
- ,isHash:function(e){
- return AjxUtil.isObject(e)&&!AjxUtil.isArray(e)
- }
- ,map:function(o,a){
- if(AjxUtil.isFunction(a)){
- return AjxUtil.map(o,a)
- }else{
- if(AjxUtil.isObject(a)){
- var e=new Array(o.length);
- for(var t=0;
- t<o.length;
- t++){
- e[t]=a[o[t]]
- }
- return e
- }}}
- ,mapToHash:function(o,a){
- var e={};
- for(var t=0;
- t<o.length;
- t++){
- e[a(o[t])]=o[t]
- }
- return e
- }
- ,flatten:function(o,a){
- if(!AjxUtil.isObject(o)){
- return[o]
- }else{
- if(AjxUtil.isObject(o)&&!AjxUtil.isArray(o)){
- if(a&&o.constructor!==Object){
- return[o]
- }else{
- o=AjxUtil.values(o)
- }}}
- var e=[];
- for(var t=0;
- t<o.length;
- t++){
- e=e.concat(this.flatten(o[t],a))
- }
- return e
- }
- ,getValues:function(o,a){
- var e=[];
- for(var t=0;
- t<a.length;
- t++){
- e[t]=o[a[t]]
- }
- return e
- }}
- );
- caboUtil.__load("caboUtil.Coll")
- }
- if(caboUtil.namespace("Preferences")){
- AjxDispatcher.addPackageLoadFunction("Preferences",new AjxCallback(this,function(){
- caboUtil.Preferences.View=function(t,a,e){
- if(!arguments.length){
- return
- }
- ZmPreferencesPage.call(this,t,a,e)
- };
- caboUtil.Preferences.View.prototype=new ZmPreferencesPage;
- caboUtil.Preferences.View.prototype.constructor=caboUtil.Preferences.View;
- caboUtil.Preferences.View.prototype.toString=function(){
- return"caboUtil.Preferences.View"
- };
- caboUtil.Preferences.View.prototype.getMessage=function(e){
- return this._handler.getMessage(e)
- };
- caboUtil.Preferences.View.prototype.addCommand=function(e){
- e.add(new AjxCallback(this,this._save,[null]));
- e.size=function(){
- return this.curId||this._cmds.length
- }
- };
- caboUtil.Preferences.View.prototype._save=function(t,e){
- this._controller.savePref(t,e)
- };
- caboUtil.Preferences.Controller=function(o,t,a,n,s,e){
- if(!arguments.length){
- return
- }
- ZmPrefController.call(this,t,a);
- this._parentController=e;
- this._handler=o;
- this._basePrefsView=n;
- this._section=s
- };
- caboUtil.Preferences.Controller.prototype=new ZmPrefController;
- caboUtil.Preferences.Controller.prototype.constructor=caboUtil.Preferences.Controller;
- caboUtil.Preferences.Controller.prototype.toString=function(){
- return"caboUtil.Preferences.Controller"
- };
- caboUtil.Preferences.Controller.prototype.getMessage=function(e){
- return this._handler.getMessage(e)
- };
- caboUtil.Preferences.Controller.prototype.getHandler=function(){
- return this._handler
- };
- caboUtil.Preferences.Controller.prototype._resetOperations=function(t,e){
- t=t||this._parentController._toolbar;
- ZmPrefController.prototype._resetOperations.call(this,t,e)
- };
- caboUtil.Preferences.Controller.prototype.getToolbar=function(){
- return this._parentController._toolbar
- };
- caboUtil.Preferences.Controller.prototype.isDirty=function(e){
- console.log("isDirty",e);
- return ZmPrefController.prototype.isDirty.call(this,e)
- };
- caboUtil.Preferences.Controller.prototype.savePref=function(a,t){
- if(t){
- var e=AjxSoapDoc.create("NoOpRequest","urn:zimbraMail");
- t.addRequestParams(e);
- caboUtil.run(a)
- }};
- caboUtil.Preferences.Controller.prototype.getView=function(e){
- if(!this._view){
- this._view=this.__getPrefsView()
- }
- return this._view
- };
- caboUtil.__load("caboUtil.Preferences")
- }
- ))
- }
- if(caboUtil.namespace("MultiCallback")){
- caboUtil.MultiCallback=function(t,e,o,a){
- this.i=caboUtil.Coll.asHash(t);
- this.e=e;
- this.a=o;
- this.r=AjxUtil.hashCopy(this.i);
- this.v={};
- this.o=a
- };
- caboUtil.MultiCallback.prototype._run=function(t){
- if(this.i[t]){
- if(this.r[t]){
- delete this.r[t]
- }else{
- if(this.o){
- return
- }}
- var e=this.v[t]=Array.prototype.slice.call(arguments,1);
- caboUtil.run.apply(null,[this.e,t].concat(e));
- if(caboUtil.Coll.isEmpty(this.r)){
- caboUtil.run.apply(null,[this.a,this.v])
- }}};
- caboUtil.MultiCallback.prototype.getCallback=function(e){
- return this.i[e]&&new AjxCallback(this,this._run,[e])||null
- };
- caboUtil.MultiCallback.simple=function(t,e,o,a){
- return new caboUtil.MultiCallback(caboUtil.Coll.range(0,t-1),e,o,a)
- };
- caboUtil.__load("caboUtil.MultiCallback")
- }
- if(caboUtil.namespace("Dom")){
- caboUtil.fill("Dom",{
- getElementCssProperty:function(t,h){
- var c,o=!AjxUtil.isArray(h);
- if(o){
- h=[h]
- }
- if(t.ownerDocument==null){
- for(var r=t.parentNode;
- r.parentNode!=null;
- r=r.parentNode){}
- var s=r
- }else{
- var s=t.ownerDocument
- }
- if(s.defaultView&&s.defaultView.getComputedStyle){
- var e=s.defaultView.getComputedStyle(t,"");
- if(e&&e.length>0){
- c=caboUtil.Coll.map(h,AjxCallback.simpleClosure(e.getPropertyValue,e))
- }}
- if(!c){
- var l=[];
- for(var a=0;
- a<h.length;
- a++){
- if(h[a]){
- var n=h[a].split("-");
- l.push(n.shift()+AjxUtil.map(n,AjxStringUtil.capitalize).join(""))
- }}
- if(t.currentStyle){
- c=caboUtil.Coll.map(l,t.currentStyle)
- }else{
- if(t.style){
- c=caboUtil.Coll.map(l,t.style)
- }}}
- return(o)?c[0]:c
- }
- ,getScrollBarWidth:function(){
- if(!this.__scrollbarSize){
- var a=document.createElement("p");
- AjxUtil.hashUpdate(a.style,{
- width:"100%",height:"200px"}
- ,true);
- var o=document.createElement("div");
- AjxUtil.hashUpdate(o.style,{
- position:"absolute",top:"0px",left:"0px",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}
- ,true);
- o.appendChild(a);
- document.body.appendChild(o);
- var t=a.offsetWidth;
- o.style.overflow="scroll";
- var e=a.offsetWidth;
- if(t==e){
- e=o.clientWidth
- }
- document.body.removeChild(o);
- this.__scrollbarSize=(t-e)
- }
- return this.__scrollbarSize
- }
- ,isAncestor:Dwt.isAncestor||function(e,t){
- if(e instanceof DwtControl){
- e=e.getHtmlElement()
- }
- if(t instanceof DwtControl){
- t=t.getHtmlElement()
- }
- if(e==t){
- return true
- }
- while(t){
- t=t.parentNode;
- if(t==e){
- return true
- }}
- return false
- }
- ,htmlToElement:function(t,e){
- var a=document.createElement(e||"div");
- a.innerHTML=t;
- return a.childNodes
- }
- ,remove:function(t){
- t=AjxUtil.toArray(t);
- for(var e=0;
- e<t.length;
- e++){
- var a=t[e];
- if(a.parentNode){
- a.parentNode.removeChild(a)
- }}}
- ,hasClass:function(t,e){
- if(!t||!e||!t.className){
- return false
- }
- return t.className.match(new RegExp("\\b"+e+"\\b"))
- }
- ,byClass:function(o,a){
- a=a||document;
- var n=[];
- if(this.hasClass(a,o)){
- n.push(a)
- }
- for(var t=0;
- t<a.childNodes.length;
- t++){
- if(a.childNodes[t].nodeType==1){
- var e=this.byClass(o,a.childNodes[t]);
- if(e){
- n=n.concat(e)
- }}}
- return n
- }}
- );
- caboUtil.__load("caboUtil.Dom")
- }
- net_comcast_sms.Util={};
- net_comcast_sms.Util.UI={};
- net_comcast_sms.Util.UI.dialog=function(a,t){
- var e=appCtxt.getMsgDialog();
- e.reset();
- e.setMessage(a,DwtMessageDialog.INFO_STYLE,t||"Informational");
- e.popup(null,true)
- };
- net_comcast_sms.Util.showLoading=function(t,h,e,n){
- var a=appCtxt.getAppViewMgr();
- if(!net_comcast_sms.Util.__loading_ids){
- net_comcast_sms.Util.__loading_ids={}
- }
- var o=net_comcast_sms.Util.__loading_ids;
- var r=caboUtil.Coll.isEmpty(o);
- if(t){
- o[h]=true
- }else{
- if(o[h]){
- delete o[h]
- }}
- var s=caboUtil.Coll.isEmpty(o);
- if(s!=r){
- if(!s){
- a.pushView(ZmId.VIEW_LOADING,n)
- }else{
- a.popView(n,ZmId.VIEW_LOADING,true);
- if(e){
- a.pushView(e)
- }}}};
- net_comcast_sms.Util.UI.loadingIsShown=function(){
- return appCtxt.getAppViewMgr().getCurrentViewId()==ZmId.VIEW_LOADING
- };
- net_comcast_sms.Util.DOM={};
- net_comcast_sms.Util.DOM.isAncestor=Dwt.isAncestor||function(t,e){
- if(t==e){
- return true
- }
- var a=e;
- while(a){
- a=a.parentNode;
- if(a==t){
- return true
- }}
- return false
- };
- net_comcast_sms.Util.DOM.resetSize=function(t){
- var e=t.getSize();
- if(e.x&&e.y){
- t.setSize(e.x,e.y)
- }};
- net_comcast_sms.Util.DOM.getElements=function(e,o,l,d){
- var t=AjxUtil.isString(o)&&o||"*";
- var n=(o instanceof RegExp)&&o||null;
- d=d||document;
- var c=(l instanceof RegExp)?l:new RegExp("\\b"+l+"\\b");
- var s=[];
- var h=d.getElementsByTagName(t);
- for(var r=0,a=h.length;
- r<a;
- r++){
- var u=h[r];
- if(!e||u.id==e){
- if(!n||u.tagName.match(n)){
- if(!l||u.className.match(c)){
- s.push(u)
- }}}}
- return s
- };
- net_comcast_sms.Util.DOM.convertHtml2Text=function(a,n,o){
- var t=true;
- if(t){
- if(!a){
- return null
- }
- if(n&&AjxUtil.isFunction(n._before)){
- a=n._before(a)
- }
- this._convert={
- convertor:n,onlyOneNewLinePerP:o}
- }
- var e=AjxStringUtil.convertHtml2Text.call(this,a,n,o);
- if(t){
- this._convert=null;
- if(n&&AjxUtil.isFunction(n._after)){
- e=n._after(e)
- }}
- return e
- };
- net_comcast_sms.Util.DOM._traverse=function(e,p,u,c,h,n,s,d,m){
- var r=(AjxStringUtil._traverse.length<9);
- if(r){
- d=d||(this._convert&&this._convert.convertor);
- m=m||(this._convert&&this._convert.onlyOneNewLinePerP);
- var l=e.nodeName.toLowerCase();
- var g=null;
- if(d&&d[l]){
- g=d[l](e,s)
- }
- if(g===null&&l=="p"){
- g=m?"\n":"\n\n"
- }
- if(g!==null){
- p[u++]=g;
- var f=e.childNodes;
- var o=f.length;
- for(var a=0;
- a<o;
- a++){
- var t=f[a];
- if(t.nodeType==1&&t.tagName.toLowerCase()=="li"){
- n++
- }
- u=this._traverse(t,p,u,c,h,n,s,d,m)
- }
- if(d&&d["/"+l]){
- p[u++]=d["/"+l](e)
- }
- s.lastNode=l;
- return u
- }}
- return AjxStringUtil._traverse.call(this,e,p,u,c,h,n,s,d,m)
- };
- net_comcast_sms.Util.DOM.scrollIntoView=Dwt.scrollIntoView||function(a,t){
- if(!a||!t){
- return
- }
- var e=Dwt.toWindow(a,0,0,null,null,DwtPoint.tmp).y;
- var r=Dwt.toWindow(t,0,0,null,null,DwtPoint.tmp).y+t.scrollTop;
- var s=e-r;
- if(s<0){
- t.scrollTop+=s
- }else{
- var n=Dwt.getSize(t,DwtPoint.tmp).y;
- var o=Dwt.getSize(a,DwtPoint.tmp).y;
- s=(e+o)-(r+n);
- if(s>0){
- t.scrollTop+=s
- }}};
- net_comcast_sms.Util.Date={};
- net_comcast_sms.Util.Date.WEEKDAY_NAMES=[I18nMsg.weekdaySunLong,I18nMsg.weekdayMonLong,I18nMsg.weekdayTueLong,I18nMsg.weekdayWedLong,I18nMsg.weekdayThuLong,I18nMsg.weekdayFriLong,I18nMsg.weekdaySatLong];
- net_comcast_sms.Util.Date.computeDateStr=function(a){
- var s=function(h){
- h.setHours(0);
- h.setMinutes(0);
- h.setSeconds(0);
- h.setMilliseconds(0);
- return h
- };
- var t=s(new Date());
- var o=s(new Date(a));
- var r=AjxDateUtil.computeTimeString(a).toLowerCase();
- var e;
- var n=Math.floor(t.getTime()/AjxDateUtil.MSEC_PER_DAY)-Math.floor(o.getTime()/AjxDateUtil.MSEC_PER_DAY);
- if(n==0){}else{
- if(n==1){
- e=ZmMsg.yesterday||"Yesterday"
- }else{
- if(n<7){
- e=this.WEEKDAY_NAMES[a.getDay()]
- }else{
- if(a.getYear()==t.getYear()){
- e=AjxDateUtil._dateFormatNoYear.format(a)
- }else{
- AjxDateFormat.format(AjxDateFormat.SHORT,a)
- }}}}
- return e?(r+"\n"+e):r
- };
- net_comcast_sms.Util.TN={};
- net_comcast_sms.Util.TN.INTL_PREFIX="011";
- net_comcast_sms.Util.TN.format=function(e){
- if(e.length==13){
- var t=e.substring(0,3);
- if(t=="001"||t=="011"){
- e=e.substring(3)
- }}
- if(e.length==11&&e.charAt(0)=="1"){
- e=e.substring(1)
- }
- return e
- };
- net_comcast_sms.Util.TN.strip=function(e){
- return e.replace(/\D/g,"")
- };
- net_comcast_sms.Util.TN.normalize=function(e,a){
- if(!AjxUtil.isString(e)){
- return e
- }
- var t=this.format(this.strip(e));
- if(t!=""){
- if(t.length<5||t.length>14){
- return a?null:e
- }else{
- return t
- }}else{
- return a?null:e
- }};
- net_comcast_sms.Util.TN.pretty=function(e){
- var t=e&&this.normalize(e);
- if(t&&t.length==10){
- return["(",t.substring(0,3),") ",t.substring(3,6),"-",t.substring(6,10)].join("")
- }
- return e
- };
- net_comcast_sms.Util.Contact={
- __loadListeners:[]};
- net_comcast_sms.Util.Contact.getByTN=function(e,o){
- var a=appCtxt.getApp(ZmApp.CONTACTS);
- this.__loadListeners.push(new AjxCallback(this,function(){
- var n=appCtxt.getActiveAccount().id;
- if(a.contactsLoaded[n]&&a._contactList[n]){
- return this._handleGetContactList(e,o,a.getContactList())
- }else{
- a.getContactList(new AjxCallback(this,this._handleGetContactList,[e,o]),new AjxCallback(this,this._handleGetContactListFail,[e,o]))
- }}
- ));
- if(!this._loading){
- this._loading=true;
- AjxDispatcher.require(["ContactsCore","Contacts"],true,new AjxCallback(this,function(){
- var n=[].concat(this.__loadListeners);
- this.__loadListeners.length=0;
- caboUtil.run(n);
- this._loaded=true
- }
- ))
- }else{
- if(this._loaded){
- var t=[].concat(this.__loadListeners);
- this.__loadListeners.length=0;
- return caboUtil.run(t)[0]
- }}};
- net_comcast_sms.Util.Contact._handleGetContactList=function(u,m,d){
- u=net_comcast_sms.Util.TN.normalize(u);
- var r=null;
- if(!this._contactHash){
- if(d.size()){
- this._contactHash={};
- for(var o=0,t=d.size();
- o<t;
- o++){
- var n=d.get(o);
- for(var s=0;
- s<ZmContact.PHONE_FIELDS.length;
- s++){
- var c=ZmContact.PHONE_FIELDS[s];
- for(var a=1;
- true;
- a++){
- var l=ZmContact.getAttributeName(c,a);
- var h=ZmContact.getAttr(n,l);
- if(!h){
- break
- }
- var e=d._getPhoneDigits(h);
- if(e){
- e=net_comcast_sms.Util.TN.normalize(e);
- this._contactHash[e]={
- contact:n,field:l};
- if(e==u){
- r=this._contactHash[e]
- }}}}}}}else{
- r=this._contactHash[u]
- }
- caboUtil.run(m,r);
- return r
- };
- net_comcast_sms.Util.Contact._handleGetContactListFail=function(e,t){
- caboUtil.run(t,null)
- };
- net_comcast_sms.Util.Contact.getImageUrl=function(e){
- return(e&&e.getImageUrl&&e.getImageUrl())||(e&&ZmContact.getAttr(e,"image")&&"http://"+ZmContact.getAttr(e,"image"))||[appCtxt.get(ZmSetting.CSFE_MSG_FETCHER_URI),"&id=",e.id,"&part=",1,"&t=",(new Date()).getTime()].join("")
- };
- net_comcast_sms.Util.Contact.getName=function(e){
- return e&&AjxUtil.isObject(e)&&((e.getFileAs&&e.getFileAs())||ZmContact.getAttr(e,"fileAsStr")||ZmContact.getAttr(e,"fullName")||AjxUtil.collapseList([ZmContact.getAttr(e,"firstName"),ZmContact.getAttr(e,"lastName")]).join(""))||null
- };
- net_comcast_sms.Util.Contact.getPhone=function(e){
- return ZmContact.getAttr(e,ZmContact.F_mobilePhone)||ZmContact.getAttr(e,ZmContact.F_workPhone)||ZmContact.getAttr(e,ZmContact.F_homePhone)||ZmContact.getAttr(e,ZmContact.F_otherPhone)
- };
- net_comcast_sms.Util.EMOTICONS=[{
- img:"ImgEmoticonHappy",chars:":)",regex:":-?\\)"}
- ,{
- img:"ImgEmoticonSad",chars:":(",regex:":-?\\("}
- ,{
- img:"ImgEmoticonMellow",chars:":|",regex:":-?\\|"}
- ,{
- img:"ImgEmoticonDry",chars:":/",regex:":-?/"}
- ,{
- img:"ImgEmoticonGrin",chars:":D",regex:":-?D"}
- ,{
- img:"ImgEmoticonTongue",chars:":P",regex:":-?P"}
- ];
- net_comcast_sms.Util.getUserName=function(){
- return appCtxt.get(ZmSetting.DISPLAY_NAME)||appCtxt.accountList.activeAccount.name
- };
- net_comcast_sms.Util.getCOSName=function(){
- return appCtxt.accountList.mainAccount.settings.getInfoResponse.cos.name
- };
- net_comcast_sms.Util.getZimletHandler=function(){
- return net_comcast_sms.instance
- };
- net_comcast_sms.Util.plainComparator=function(t,e){
- if(t==e){
- return 0
- }
- if(!t&&t!==0){
- return 1
- }
- if(!e&&e!==0){
- return -1
- }
- return(t<e)?-1:1
- };
- net_comcast_sms.Util.unescape=function(e){
- return e.replace(/%([\da-e][\da-e])/ig,function(a,t){
- var o=window.parseInt(t,16);
- return(!isNaN(o))?String.fromCharCode(o):"?"
- }
- )
- };
- net_comcast_sms.Util.sendMail=function(e,s,h,l,r){
- var a=new ZmMailMsg(1234567890,new ZmMailList(ZmItem.MSG),true);
- for(var n=0,o=e.length;
- n<o;
- n++){
- if(e[n] instanceof AjxEmailAddress){
- a.addAddress(e[n])
- }}
- if(h){
- a.setSubject(h)
- }
- var t=new ZmMimePart();
- t.setContent(s);
- t.setContentType("text/plain");
- t.setIsBody(true);
- a.setTopPart(t);
- a.send(false,l,r)
- };
- net_comcast_sms.Util.getObjectProxy=function(e){
- var t=function(){};
- t.prototype=e;
- return new t
- };
- net_comcast_sms.Util.getProperty=function(e){
- return this._getPropertiesObj(e,true)._content
- };
- net_comcast_sms.Util.setProperties=function(t,s){
- var a=AjxSoapDoc.create("ModifyPropertiesRequest","urn:zimbraAccount");
- for(var e in t){
- var o=a.set("prop",t[e]);
- o.setAttribute("zimlet","net_comcast_sms");
- o.setAttribute("name",e)
- }
- var n={
- soapDoc:a,callback:new AjxCallback(this,this._handleSetProperties,[t,s]),asyncMode:true,sensitive:true};
- appCtxt.getAppController().sendRequest(n)
- };
- net_comcast_sms.Util._handleSetProperties=function(t,o){
- for(var e in t){
- var a=this._getPropertiesObj(e,true);
- if(a){
- a._content=String(t[e])
- }}
- caboUtil.run(o)
- };
- net_comcast_sms.Util._getPropertiesObj=function(t,o){
- var n=appCtxt.accountList.mainAccount.settings.getInfoResponse.props;
- var e=n.prop=n.prop||[];
- for(var a=0;
- a<e.length;
- a++){
- var s=e[a];
- if(s&&s.zimlet=="net_comcast_sms"&&s.name==t){
- return s
- }}
- if(o){
- var s={
- zimlet:"net_comcast_sms",name:t,_content:""};
- e.push(s);
- return s
- }};
- net_comcast_sms.Contact=function(e){
- this.tn=e
- };
- net_comcast_sms.Contact.prototype.getDetails=function(e){
- if(!this._hasDetails){
- net_comcast_sms.Util.Contact.getByTN(this.tn,new AjxCallback(this,this._handleGetDetails,[e]))
- }else{
- caboUtil.run(e,this)
- }};
- net_comcast_sms.Contact.prototype._handleGetDetails=function(a,t){
- if(t){
- var e=this.contact=t.contact;
- if(e){
- this.name=net_comcast_sms.Util.Contact.getName(e)
- }
- this.field=t.field
- }
- this._hasDetails=true;
- caboUtil.run(a,this)
- };
- net_comcast_sms.Model=function(){
- this._listeners={}
- };
- net_comcast_sms.Model.USE_STATIC=0;
- net_comcast_sms.Model.STATUS_OK=1;
- net_comcast_sms.Model.prototype.getSessionId=function(){
- return null
- };
- net_comcast_sms.Model.prototype.getBroadCloudDomain=function(){
- return net_comcast_sms.Util.getZimletHandler().getConfig("broadcloudBase")
- };
- net_comcast_sms.Model.prototype.rest=function(t,l,n,o,s){
- var h=net_comcast_sms.SmsZimlet.PROXY+AjxStringUtil.urlComponentEncode(t),r=n&&JSON.stringify(n)||null,e=new AjxCallback(this,this._handleRest,[l,t]),a={
- "Content-type":"application/json"};
- if(!AjxUtil.isUndefined(s)){
- h+="&timeout="+s
- }
- if(net_comcast_sms.Model.USE_STATIC){
- var c=this;
- setTimeout(function(){
- c._handleRest(l,t,{
- success:true,obj:net_comcast_sms.Testdata[t]}
- )
- }
- ,0)
- }else{
- AjxRpc.invoke(r,h,a,e,!!o)
- }};
- net_comcast_sms.Model.prototype._handleRest=function(o,t,e){
- if(e&&e.success){
- var a=e.obj||JSON.gparse(e.text);
- caboUtil.run(o,a)
- }else{
- if(ZmZimbraMail._endSessionDone){}else{
- caboUtil.run(o,new net_comcast_sms.ConnError(t,e))
- }}};
- net_comcast_sms.Model.prototype._copyParams=function(s,n,e,a){
- a=a||this.acceptedParams||AjxUtil.keys(s);
- if(e){
- for(var t=0;
- t<e.length;
- t++){
- var o=e[t];
- if(AjxUtil.isUndefined(s[o])){
- throw net_comcast_sms.ModelError.missingParameterInConstructor(o,this.toString())
- }}}
- for(var t=0;
- t<a.length;
- t++){
- var o=a[t];
- if(!AjxUtil.isUndefined(s[o])){
- n[o]=s[o]
- }}
- return n
- };
- net_comcast_sms.Model.prototype.parseStatus=function(t){
- var e=(t&&AjxUtil.isObject(t.status))?t.status:t;
- if(AjxUtil.isArray(e)){
- e=e[0]
- }
- return(e&&e.code==net_comcast_sms.Model.STATUS_OK)?true:new net_comcast_sms.RestError(e)
- };
- net_comcast_sms.Model.prototype.loginError=function(e){
- throw net_comcast_sms.ModelError.notLoggedIn(this.toString()+"::"+e)
- };
- net_comcast_sms.Model.prototype.runCallback=function(e){
- return caboUtil.run.apply(null,arguments)
- };
- net_comcast_sms.Model.prototype.addListener=function(e,t){
- if(!this._listeners[e]){
- this._listeners[e]=[]
- }
- if(AjxUtil.indexOf(this._listeners[e],t)==-1){
- this._listeners[e].push(t)
- }};
- net_comcast_sms.Model.prototype.removeListener=function(e,t){
- if(this._listeners[e]){
- AjxUtil.arrayRemove(this._listeners[e],t)
- }};
- net_comcast_sms.Model.prototype.replaceListener=function(t,a,e){
- this.removeListener(t,a);
- this.addListener(t,e)
- };
- net_comcast_sms.Model.prototype.callListeners=function(t){
- var a=this._listeners[t];
- var e=Array.prototype.slice.call(arguments,1);
- if(a){
- caboUtil.apply(a,e)
- }};
- net_comcast_sms.Model.prototype.getUrl=function(){
- var e=[];
- for(var t=0;
- t<arguments.length;
- t++){
- var a=arguments[t];
- if(!AjxUtil.isUndefined(a)&&!AjxUtil.isNull(a)){
- e.push(a)
- }}
- var o=this.getSessionId();
- return e.join("/")+(o?(";JSESSIONID="+o):"")
- };
- net_comcast_sms.ModelError=function(e){
- this.message=e
- };
- net_comcast_sms.ModelError.prototype.toString=function(){
- return"ModelError: "+this.message
- };
- net_comcast_sms.ModelError.missingParameterInConstructor=function(e,t){
- return new net_comcast_sms.ModelError('Required parameter "'+e+'" is undefined in '+t)
- };
- net_comcast_sms.ModelError.incorrectParameter=function(t,a,e){
- return new net_comcast_sms.ModelError('Required parameter "'+t+'" must be of type "'+a+'" in '+e)
- };
- net_comcast_sms.ModelError.notLoggedIn=function(e){
- return new net_comcast_sms.ModelError('The user must be logged in to access "'+e+'"')
- };
- net_comcast_sms.RestError=function(e){
- if(!e||!e.message){
- this.message="Empty response";
- this.code=0
- }else{
- this.message=e.message||e.status;
- this.code=e.code
- }};
- net_comcast_sms.RestError.prototype.toString=function(){
- return"RestError: "+this.message
- };
- net_comcast_sms.ConnError=function(t,e){
- this.message="Failed connection to "+t+"<br/>Response was:<br/>"+AjxStringUtil._escapeForHTML(JSON.stringify(e));
- this.code=0
- };
- net_comcast_sms.ConnError.prototype.toString=function(){
- return"ConnError: "+this.message
- };
- net_comcast_sms.FwdConfig=function(e){
- net_comcast_sms.Model.call(this);
- this.useraccount=e;
- this._loading=false;
- this._loaded=false;
- this._loadListeners=[];
- this._current={};
- this._orig={}
- };
- net_comcast_sms.FwdConfig.prototype=new net_comcast_sms.Model;
- net_comcast_sms.FwdConfig.prototype.constructor=net_comcast_sms.FwdConfig;
- net_comcast_sms.FwdConfig.prototype.EMAIL="email";
- net_comcast_sms.FwdConfig.prototype.SMS="sms";
- net_comcast_sms.FwdConfig.prototype.acceptedParams=[net_comcast_sms.FwdConfig.prototype.EMAIL];
- net_comcast_sms.FwdConfig.prototype.FLAG_OFF="off";
- net_comcast_sms.FwdConfig.prototype.FLAG_ON="on";
- net_comcast_sms.FwdConfig.prototype.toString=function(){
- return"net_comcast_sms.FwdConfig"
- };
- net_comcast_sms.FwdConfig.prototype.getUAdomain=function(){
- return this.useraccount.getUAdomain()
- };
- net_comcast_sms.FwdConfig.prototype.getUATN=function(){
- return this.useraccount.getUATN()
- };
- net_comcast_sms.FwdConfig.prototype.setConfigValue=function(e,t){
- caboUtil.Coll.deref(this._current,e,t)
- };
- net_comcast_sms.FwdConfig.prototype.getConfigValue=function(e){
- return caboUtil.Coll.deref(this._current,e)
- };
- net_comcast_sms.FwdConfig.prototype.load=function(a){
- if(this.useraccount.isLoggedIn()){
- this._loading=true;
- var t=this.getUrl(this.getUAdomain(),"ua","config","fwdinfo",this.getUATN());
- var e=new AjxCallback(this,this._handleLoad,[a]);
- this.rest(t,e,null,true)
- }else{
- this.loginError("getConfig")
- }};
- net_comcast_sms.FwdConfig.prototype._handleLoad=function(s,o){
- var a=this.parseStatus(o);
- if(a===true){
- var n=this._current={
- email:{}
- ,sms:{}};
- for(var e=0;
- e<this.acceptedParams.length;
- e++){
- var t=this.acceptedParams[e];
- n[t].enabled=o[t]&&(o[t].flag==this.FLAG_ON)||false;
- n[t].addr=o[t]&&o[t].data
- }
- this._orig=caboUtil.Coll.deepcopy(n)
- }
- this._loading=false;
- this._loaded=true;
- caboUtil.run(s,a)
- };
- net_comcast_sms.FwdConfig.prototype.get=function(e){
- this._loadListeners.push(e);
- if(!this._loading&&!this._loaded){
- this.load(new AjxCallback(this,this._handleGet))
- }else{
- if(this._loaded){
- this._handleGet()
- }}};
- net_comcast_sms.FwdConfig.prototype._handleGet=function(){
- caboUtil.run(this._loadListeners,this);
- this._loadListeners.length=0
- };
- net_comcast_sms.FwdConfig.prototype.put=function(l){
- if(this.useraccount.isLoggedIn()){
- var c=[];
- for(var a=0;
- a<this.acceptedParams.length;
- a++){
- var n=this.acceptedParams[a];
- var r=this._current[n];
- var t=this._orig[n];
- if(r&&t){
- r.addr=AjxUtil.toArray(r.addr);
- t.addr=AjxUtil.toArray(t.addr);
- var h=(AjxUtil.isArray(r.addr)?r.addr[0]:r.addr)||"";
- var e=this.getUrl(this.getUAdomain(),"ua","config","fwddetail",this.getUATN());
- var o={
- data:h,type:n};
- c.push({
- url:e,body:o}
- );
- var e=this.getUrl(this.getUAdomain(),"ua","config","fwd",this.getUATN());
- var o={
- flag:r.enabled,type:n};
- c.push({
- url:e,body:o}
- )
- }}
- var s=function(u){
- var d=(u<c.length-1)?new AjxCallback(this,s,[u+1]):l;
- this.rest(c[u].url,d,c[u].body)
- };
- s.call(this,0)
- }else{
- this.loginError("putConfig")
- }};
- net_comcast_sms.FwdConfig.prototype._handlePut=function(a,t){
- var e=this.parseStatus(t);
- if(e===true){
- this._orig=caboUtil.Coll.deepcopy(this._current)
- }
- caboUtil.run(a,e)
- };
- net_comcast_sms.MasterAccount=function(t){
- net_comcast_sms.Model.call(this);
- var e=["spcode","sppwd","mname","users"];
- this._copyParams(t,this,e);
- this._created=false;
- this._activated=false;
- this.enabled=false
- };
- net_comcast_sms.MasterAccount.prototype=new net_comcast_sms.Model;
- net_comcast_sms.MasterAccount.prototype.constructor=net_comcast_sms.MasterAccount;
- net_comcast_sms.MasterAccount.prototype.acceptedParams=["spcode","sppwd","mname","acctnum","hwmac","zipcode","users"];
- net_comcast_sms.MasterAccount.prototype.toString=function(){
- return"net_comcast_sms.MasterAccount"
- };
- net_comcast_sms.MasterAccount.prototype.toJSON=function(){
- var t=this._copyParams(this,{}
- );
- for(var e=0;
- e<t.users.length;
- e++){
- t.users[e]=t.users[e].toJSON()
- }
- return t
- };
- net_comcast_sms.MasterAccount.prototype.getUserAccounts=function(){
- return this.users
- };
- net_comcast_sms.MasterAccount.prototype.getUAdomain=function(){
- return this.ua_domain
- };
- net_comcast_sms.MasterAccount.prototype.setCreated=function(t){
- this._created=!!t;
- for(var e=0;
- e<this.users.length;
- e++){
- this.users[e].setCreated(t)
- }};
- net_comcast_sms.MasterAccount.prototype.setHandler=function(e){
- this._handler=e
- };
- net_comcast_sms.MasterAccount.prototype.getHandler=function(){
- return this._handler
- };
- net_comcast_sms.MasterAccount.prototype.create=function(n){
- if(!this._created&&!this._creating){
- this._creating=true;
- var o=["spcode","sppwd","mname","users"];
- var t=this.getUrl(this.getBroadCloudDomain(),"ma","create");
- var a=this._copyParams(this,{}
- ,o,this.acceptedParams);
- var e=new AjxCallback(this,this._handleCreate,[n]);
- this.rest(t,e,a)
- }};
- net_comcast_sms.MasterAccount.prototype._handleCreate=function(a,t){
- this._creating=false;
- var e=this.parseStatus(t);
- if(e===true){
- this.setCreated(true)
- }
- if(a instanceof AjxCallback){
- a.run(e)
- }};
- net_comcast_sms.MasterAccount.prototype.activate=function(n){
- if(!this._activated&&!this._activating){
- this._activating=true;
- var t=this.getUrl(this.getBroadCloudDomain(),"ma","activate");
- var o=["spcode","sppwd","mname"];
- var a=this._copyParams(this,{}
- ,o,o);
- var e=new AjxCallback(this,this._handleActivate,[n]);
- this.rest(t,e,a)
- }};
- net_comcast_sms.MasterAccount.prototype._handleActivate=function(a,t){
- this._activating=false;
- var e=this.parseStatus(t);
- if(e===true){
- this._activated=true
- }
- if(a instanceof AjxCallback){
- a.run(e)
- }};
- net_comcast_sms.MasterAccount.prototype.enable=function(a,s){
- if(!this._enabling){
- this._enabling=true;
- var t=this.getUrl(this.getBroadCloudDomain(),"ma",a?"enable":"disable");
- var n=["spcode","sppwd","mname"];
- var o=this._copyParams(this,{}
- ,n,n);
- var e=new AjxCallback(this,this._handleEnable,[a,s]);
- this.rest(t,e,o)
- }};
- net_comcast_sms.MasterAccount.prototype._handleEnable=function(e,o,a){
- this._enabling=false;
- var t=this.parseStatus(a);
- if(t===true){
- this.enabled=e
- }
- if(o instanceof AjxCallback){
- o.run(t)
- }};
- net_comcast_sms.MasterAccount.prototype.remove=function(n){
- if(!this._deleting){
- this._deleting=true;
- var t=this.getUrl(this.getBroadCloudDomain(),"ma","delete");
- var o=["spcode","sppwd","mname"];
- var a=this._copyParams(this,{}
- ,o,o);
- var e=new AjxCallback(this,this._handleRemove,[n]);
- this.rest(t,e,a)
- }};
- net_comcast_sms.MasterAccount.prototype._handleRemove=function(a,t){
- this._deleting=false;
- var e=this.parseStatus(t);
- if(e===true){
- this.setCreated(false)
- }
- if(a instanceof AjxCallback){
- a.run(e)
- }};
- net_comcast_sms.MasterAccount.prototype.info=function(a){
- var t=this.getUrl(this.getBroadCloudDomain(),"ma","info",this.spcode,this.sppwd,this.mname);
- var e=new AjxCallback(this,this._handleInfo,[a]);
- this.rest(t,e,null,true)
- };
- net_comcast_sms.MasterAccount.prototype._handleInfo=function(n,a){
- var t=this.parseStatus(a);
- if(t===true){
- var o=["enabled","mname","acctnum","ua_domain","hw_mac"];
- this._copyParams(a,this,null,o);
- this.users=[];
- for(var e=0;
- e<a.users.length;
- e++){
- this.users.push(new net_comcast_sms.UserAccount(this,a.users[e]))
- }
- this.setCreated(true)
- }
- if(n instanceof AjxCallback){
- n.run(t)
- }};
- net_comcast_sms.MasterAccount.get=function(e,s,o,t,n){
- var a=new net_comcast_sms.MasterAccount({
- spcode:e,sppwd:s,mname:o,users:[]}
- );
- a.setHandler(t);
- a.info(new AjxCallback(net_comcast_sms.MasterAccount._handleGet,[n,a]));
- return a
- };
- net_comcast_sms.MasterAccount._handleGet=function(a,t,e){
- caboUtil.run(a,t)
- };
- net_comcast_sms.UserAccount=function(a,t){
- net_comcast_sms.Model.call(this);
- this.masteraccount=a;
- var e=["name","parameters"];
- this._copyParams(t,this,e);
- this._created=false;
- this._loggedIn=false;
- this._configLoadListeners=[];
- this._messageStore=new net_comcast_sms.MessageStore(this);
- this.fwd=new net_comcast_sms.FwdConfig(this)
- };
- net_comcast_sms.UserAccount.prototype=new net_comcast_sms.Model;
- net_comcast_sms.UserAccount.prototype.constructor=net_comcast_sms.UserAccount;
- net_comcast_sms.UserAccount.prototype.acceptedParams=["tn","name","email","displayname","parameters"];
- net_comcast_sms.UserAccount.prototype.toString=function(){
- return"net_comcast_sms.UserAccount"
- };
- net_comcast_sms.UserAccount.prototype.getClientId=function(){
- return"12345678"
- };
- net_comcast_sms.UserAccount.prototype.toJSON=function(){
- return this._copyParams(this,{}
- )
- };
- net_comcast_sms.UserAccount.prototype.setCreated=function(e){
- this._created=!!e
- };
- net_comcast_sms.UserAccount.prototype.setMasterAccount=function(e){
- this.masteraccount=e
- };
- net_comcast_sms.UserAccount.prototype.getMasterAccount=function(){
- return this.masteraccount
- };
- net_comcast_sms.UserAccount.prototype.getUAdomain=function(){
- return this.masteraccount.getUAdomain()
- };
- net_comcast_sms.UserAccount.prototype.getUATN=function(){
- return this.tn
- };
- net_comcast_sms.UserAccount.prototype.isLoggedIn=function(){
- return this._loggedIn
- };
- net_comcast_sms.UserAccount.prototype.getMessageStore=function(){
- return this._messageStore
- };
- net_comcast_sms.UserAccount.prototype.getHandler=function(){
- return this.masteraccount.getHandler()
- };
- net_comcast_sms.UserAccount.prototype.getSessionId=function(){
- return this.sessionid||null
- };
- net_comcast_sms.UserAccount.prototype.login=function(e,n,s){
- if(!this._loggedIn){
- var a=this.getUrl(this.getUAdomain(),"ua","login"),o={
- uname:e,pwd:n,clientid:this.getClientId()}
- ,t=new AjxCallback(this,this._handleLogin,[n,s]);
- this.rest(a,t,o)
- }};
- net_comcast_sms.UserAccount.prototype._handleLogin=function(a,n,t){
- var e=this.parseStatus(t);
- if(e===true){
- this._loggedIn=true;
- var o=["enabled","serverid","sessionid","apiversion","expiry","pushurl","parameters"];
- this._copyParams(t,this,null,o);
- this._pwd=a
- }else{
- this._pwd=null;
- this._loggedIn=false
- }
- if(n instanceof AjxCallback){
- n.run(e)
- }};
- net_comcast_sms.UserAccount.prototype.logout=function(a){
- if(this._loggedIn){
- var t="https://"+[this.getUAdomain(),"ua","logout"].join("/"),e=new AjxCallback(this,this._handleLogout,[a]);
- this.rest(t,e)
- }};
- net_comcast_sms.UserAccount.prototype._handleLogout=function(a,t){
- var e=this.parseStatus(t);
- if(e===true){
- this._loggedIn=false
- }
- if(a instanceof AjxCallback){
- a.run(e)
- }};
- net_comcast_sms.UserAccount.prototype.setupPush=function(o,a,s){
- if(this._loggedIn){
- var t=this.getUrl(this.getUAdomain(),"ua","push",a?"enable":"disable",this.tn),n={
- deviceid:o}
- ,e=new AjxCallback(this,this._handleSetupPush,[s]);
- this.rest(t,e,n)
- }else{
- this.loginError("setupPush")
- }};
- net_comcast_sms.UserAccount.prototype._handleSetupPush=function(a,t){
- var e=this.parseStatus(t);
- if(a instanceof AjxCallback){
- a.run(e)
- }};
- net_comcast_sms.UserAccount.prototype.setPassword=function(a,n){
- if(this._loggedIn&&this._pwd){
- var t=this.getUrl(this.getUAdomain(),"ua","config","pwd",this.tn);
- var o={
- curpwd:this._pwd,newpwd:a};
- var e=new AjxCallback(this,this._handleSetPassword,[n]);
- this.rest(t,e,o)
- }else{
- this.loginError("setPassword")
- }};
- net_comcast_sms.UserAccount.prototype._handleSetPassword=function(a,t){
- var e=this.parseStatus(t);
- if(a instanceof AjxCallback){
- a.run(e)
- }};
- net_comcast_sms.Message=function(t,e,a){
- if(!arguments.length){
- return
- }
- net_comcast_sms.Model.call(this);
- this.useraccount=t;
- this.thread=e;
- this._copyParams(a,this,this.requiredParams);
- this.body=net_comcast_sms.Util.unescape(this.body);
- this.body=AjxStringUtil.htmlEncode(this.body)
- };
- net_comcast_sms.Message.prototype=new net_comcast_sms.Model;
- net_comcast_sms.Message.prototype.constructor=net_comcast_sms.Message;
- net_comcast_sms.Message.prototype.requiredParams=["mid","status","type","body","tn"];
- net_comcast_sms.Message.prototype.acceptedParams=["mid","status","type","time","stime","name","stype","body","dir","tn","long","lat","murl"];
- net_comcast_sms.Message.prototype.toString=function(){
- return"net_comcast_sms.Message"
- };
- net_comcast_sms.Message.STATUS={
- N:1,U:2,R:3,L:4,D:5};
- net_comcast_sms.Message.STATUSINDEX={
- N:3,U:3,R:2,L:2,D:1};
- net_comcast_sms.Message.TYPE_SMS="sms";
- net_comcast_sms.Message.TYPE_GROUP="group";
- net_comcast_sms.Message.TYPE_VMAIL="vmail";
- net_comcast_sms.Message.DIR_INCOMING="I";
- net_comcast_sms.Message.DIR_OUTGOING="O";
- net_comcast_sms.Message.STATUS_NEW="N";
- net_comcast_sms.Message.STATUS_UNREAD="U";
- net_comcast_sms.Message.STATUS_READ="R";
- net_comcast_sms.Message.STATUS_LOCKED="L";
- net_comcast_sms.Message.STATUS_DELETED="D";
- net_comcast_sms.Message.acceptedType=function(e){
- return e&&(e==net_comcast_sms.Message.TYPE_SMS||e=="group"||e=="vmail")
- };
- net_comcast_sms.Message.acceptedStatus=function(e){
- return e&&!!net_comcast_sms.Message.STATUS[e]
- };
- net_comcast_sms.Message.prototype.getUAdomain=function(){
- return this.useraccount.getUAdomain()
- };
- net_comcast_sms.Message.prototype.getUATN=function(){
- return this.useraccount.getUATN()
- };
- net_comcast_sms.Message.prototype.isLoggedIn=function(){
- return this.useraccount.isLoggedIn()
- };
- net_comcast_sms.Message.prototype.getHandler=function(){
- return this.useraccount.getHandler()
- };
- net_comcast_sms.Message.prototype.getSessionId=function(){
- return this.useraccount.getSessionId()
- };
- net_comcast_sms.Message.prototype.getUSTN=function(){
- return net_comcast_sms.Util.TN.normalize(this.tn)
- };
- net_comcast_sms.Message.prototype.getID=function(){
- return this.mid
- };
- net_comcast_sms.Message.prototype.setStatus=function(e,s,o){
- if(net_comcast_sms.Message.acceptedStatus(e)){
- if(!o){
- if(e==net_comcast_sms.Message.STATUS_DELETED){
- return this.remove(s)
- }
- if(this.isLoggedIn()){
- var a=this.getUrl(this.getUAdomain(),"ua","msg",this.type,"status",this.mid,this.getUATN()),n={
- status:e}
- ,t=new AjxCallback(this,this._handleSetStatus,[e,s]);
- this.rest(a,t,n,false)
- }else{
- this.loginError("setStatus")
- }}}else{}};
- net_comcast_sms.Message.prototype.setEditStatus=function(e){
- this.editstatus=e;
- this.thread.onChangeMessageEditStatus(this);
- this.callListeners("editstatus")
- };
- net_comcast_sms.Message.prototype.getEditStatus=function(){
- return this.editstatus
- };
- net_comcast_sms.Message.prototype.getContact=function(e){
- if(this._contact){
- caboUtil.run(e,this._contact);
- return this._contact
- }
- net_comcast_sms.Util.Contact.getByTN(this.tn,new AjxCallback(this,this._handleGetContact,[e]))
- };
- net_comcast_sms.Message.prototype._handleGetContact=function(t,e){
- this._contact=e;
- caboUtil.run(t,e)
- };
- net_comcast_sms.Message.prototype.setForwardStatus=function(e){
- this.forwardstatus=!!e;
- this.thread.onChangeMessageForwardStatus(this);
- this.callListeners("forwardstatus")
- };
- net_comcast_sms.Message.prototype.canDelete=function(){
- var e=this.status;
- return(e==net_comcast_sms.Message.STATUS_NEW||e==net_comcast_sms.Message.STATUS_UNREAD||e==net_comcast_sms.Message.STATUS_READ)
- };
- net_comcast_sms.Message.prototype._handleSetStatus=function(e,o,a){
- var t=this.parseStatus(a);
- if(t===true){
- this.localSetStatus(e)
- }else{
- this._clearEditStatus();
- if(t instanceof net_comcast_sms.RestError){}}
- caboUtil.run(o,t)
- };
- net_comcast_sms.Message.prototype.localSetStatus=function(t){
- var e=this.status;
- this.status=t;
- this._clearEditStatus();
- this.thread.onChangeMessageStatus(this,e,t);
- this.thread.store.onChangeMessageStatus(this,e,t);
- this.callListeners("status")
- };
- net_comcast_sms.Message.prototype._clearEditStatus=function(){
- if(this.editstatus){
- this.editstatus=null;
- this.callListeners("editstatus")
- }};
- net_comcast_sms.Message.prototype.setRead=function(e){
- if(this.status==net_comcast_sms.Message.STATUS_NEW||this.status==net_comcast_sms.Message.STATUS_UNREAD){
- this.setStatus(net_comcast_sms.Message.STATUS_READ,e)
- }else{
- caboUtil.run(e)
- }};
- net_comcast_sms.Message.prototype.setUnread=function(e){
- if(this.status==net_comcast_sms.Message.STATUS_READ){
- this.setStatus(net_comcast_sms.Message.STATUS_UNREAD,e)
- }else{
- caboUtil.run(e)
- }};
- net_comcast_sms.Message.prototype.getStatusIndex=function(){
- return this.status&&net_comcast_sms.Message.STATUSINDEX[this.status]
- };
- net_comcast_sms.Message.prototype.getAnnotation=function(){
- return[net_comcast_sms.Util.Date.computeDateStr(new Date(this.time)).replace(/\n/g," ")].join("")
- };
- net_comcast_sms.Message.prototype.getBody=function(){
- return this.body
- };
- net_comcast_sms.Message.prototype.remove=function(o){
- if(this.isLoggedIn()){
- var t=this.getUrl(this.getUAdomain(),"ua","msg",this.type,"delete",this.getUATN()),a={
- mids:[this.mid]}
- ,e=new AjxCallback(this,this._handleSetStatus,["D",o]);
- this.rest(t,e,a,false)
- }else{
- this.loginError("remove")
- }};
- net_comcast_sms.Message.dateComparator=function(t,e){
- return net_comcast_sms.Util.plainComparator(t&&t.time,e&&e.time)
- };
- net_comcast_sms.Message.statusComparator=function(t,e){
- return net_comcast_sms.Util.plainComparator(t&&t.getStatusIndex(),e&&e.getStatusIndex())
- };
- net_comcast_sms.MessageStore=function(e){
- net_comcast_sms.Model.call(this);
- this.useraccount=e;
- this.messages_byId={};
- this.messages_byType={};
- this.messages_byType[net_comcast_sms.Message.TYPE_SMS]={};
- this.messages_byType[net_comcast_sms.Message.TYPE_GROUP]={};
- this.messages_byType[net_comcast_sms.Message.TYPE_VMAIL]={};
- this.messages_byStatus={
- N:{}
- ,U:{}
- ,R:{}
- ,L:{}
- ,D:{}};
- this.messages_byDir={
- I:{}
- ,O:{}};
- this.threads={};
- this._hasMoreThreads=false;
- window.messagestore=this
- };
- net_comcast_sms.MessageStore.prototype=new net_comcast_sms.Model;
- net_comcast_sms.MessageStore.prototype.constructor=net_comcast_sms.MessageStore;
- net_comcast_sms.MessageStore.prototype.toString=function(){
- return"net_comcast_sms.MessageStore"
- };
- net_comcast_sms.MessageStore.prototype.getUAdomain=function(){
- return this.useraccount.getUAdomain()
- };
- net_comcast_sms.MessageStore.prototype.getUATN=function(){
- return this.useraccount.getUATN()
- };
- net_comcast_sms.MessageStore.prototype.isLoggedIn=function(){
- return this.useraccount.isLoggedIn()
- };
- net_comcast_sms.MessageStore.prototype.getHandler=function(){
- return this.useraccount.getHandler()
- };
- net_comcast_sms.MessageStore.prototype.getSessionId=function(){
- return this.useraccount.getSessionId()
- };
- net_comcast_sms.MessageStore.prototype.getById=function(e){
- if(AjxUtil.isArray(e)){
- var a=[];
- for(var t=0;
- t<e.length;
- t++){
- a[t]=this.getById(e[t])
- }
- return a
- }
- return this.messages_byId[e]
- };
- net_comcast_sms.MessageStore.prototype.getByType=function(a){
- if(AjxUtil.isArray(a)){
- var t=[];
- for(var e=0;
- e<a.length;
- e++){
- t[e]=this.getByType(a[e])
- }
- return t
- }
- return this.messages_byType[a]
- };
- net_comcast_sms.MessageStore.prototype.getByStatus=function(e){
- if(AjxUtil.isArray(e)){
- var a=[];
- for(var t=0;
- t<e.length;
- t++){
- a[t]=this.getByStatus(e[t])
- }
- return a
- }
- return this.messages_byStatus[e]
- };
- net_comcast_sms.MessageStore.prototype.getByDir=function(e){
- if(AjxUtil.isArray(e)){
- var a=[];
- for(var t=0;
- t<e.length;
- t++){
- a[t]=this.getByDir(e[t])
- }
- return a
- }
- return this.messages_byDir[e]
- };
- net_comcast_sms.MessageStore.prototype.putCache=function(a){
- var e=a.mid;
- this.messages_byId[e]=a;
- if(this.messages_byType[a.type]){
- this.messages_byType[a.type][e]=a
- }
- if(this.messages_byStatus[a.status]){
- var t=(this.messages_byStatus[a.status][e]!=a);
- this.messages_byStatus[a.status][e]=a;
- if(t){
- this.callListeners("status")
- }}
- if(this.messages_byDir[a.dir]){
- this.messages_byDir[a.dir][e]=a
- }};
- net_comcast_sms.MessageStore.prototype.delCache=function(o){
- if(AjxUtil.isArray(o)){
- for(var t=0;
- t<o.length;
- t++){
- this.delCache(o[t])
- }}
- if(o instanceof net_comcast_sms.Message){
- var e=o.mid;
- delete this.messages_byId[e];
- if(this.messages_byType[o.type]){
- delete this.messages_byType[o.type][e]
- }
- if(this.messages_byStatus[o.status]){
- var a=(this.messages_byStatus[o.status][e]==o);
- delete this.messages_byStatus[o.status][e];
- if(a){
- this.callListeners("status")
- }}
- if(this.messages_byDir[o.dir]){
- delete this.messages_byDir[o.dir][e]
- }}};
- net_comcast_sms.MessageStore.sortByType=function(n){
- var a={};
- for(var t=0,e=n.length;
- t<e;
- t++){
- var o=n[t];
- if(o){
- if(!a[o.type]){
- a[o.type]=[]
- }
- a[o.type].push(o)
- }}
- return a
- };
- net_comcast_sms.MessageStore.getMid=function(a){
- if(AjxUtil.isArray(a)){
- var o=[];
- for(var t=0,e=a.length;
- t<e;
- t++){
- o[t]=a[t].mid
- }
- return o
- }
- return a&&a.mid
- };
- net_comcast_sms.MessageStore.prototype.onChangeMessageStatus=function(o,e,t){
- var a=o.mid;
- if(o==this.messages_byStatus[e][a]){
- delete this.messages_byStatus[e][a];
- this.messages_byStatus[t][a]=o;
- this.callListeners("status")
- }};
- net_comcast_sms.MessageStore.prototype.refreshThreadHeaders=function(t){
- var e=20;
- this.loadThreadHeaders(t,e,null,e)
- };
- net_comcast_sms.MessageStore.prototype.moreThreadHeaders=function(t,e){
- e=e||this.getNextLoadSize();
- this.loadThreadHeaders(t,e,this.getOldestThread().getNewest().time,this.getThreadCount()+e)
- };
- net_comcast_sms.MessageStore.prototype.loadThreadHeaders=function(s,n,e,o){
- if(this.isLoggedIn()){
- var a=this.getUrl(this.getUAdomain(),"ua","msg","sms","thread","headers",n||null,e||(n?0:null),this.getUATN()),t=new AjxCallback(this,this._handleLoadThreadHeaders,[s,o]);
- this.rest(a,t,null,true)
- }else{
- this.loginError("loadThreadHeaders")
- }};
- net_comcast_sms.MessageStore.prototype._handleLoadThreadHeaders=function(s,e,n){
- var a=this.parseStatus(n);
- if(a===true||a.code=="0030006"){
- var o;
- if(n.messages){
- o=n.messages.length;
- for(var t=0;
- t<n.messages.length;
- t++){
- this._createMessage(n.messages[t])
- }}else{
- o=this.getThreadCount()
- }
- if(e){
- if(o<e){
- this._hasMoreThreads=false
- }else{
- this._hasMoreThreads=true
- }}
- a=true
- }else{
- this._hasMoreThreads=false
- }
- caboUtil.run(s,a);
- this.callListeners("threads");
- this.callListeners("status")
- };
- net_comcast_sms.MessageStore.prototype.getNextLoadSize=function(){
- var e=this.getThreadCount();
- return(e<=40)?20:Math.ceil(e*0.5)
- };
- net_comcast_sms.MessageStore.prototype._createMessage=function(t){
- var a=new net_comcast_sms.Message(this.useraccount,null,t),e=this.threads[a.tn]||this.threads["001"+a.tn];
- if(e){
- e.update(a,true)
- }else{
- this.threads[a.tn]=new net_comcast_sms.Thread(this.useraccount,this,a);
- this.callListeners("threads")
- }
- this.putCache(a);
- return a
- };
- net_comcast_sms.MessageStore.prototype.getThread=function(e){
- if(e instanceof net_comcast_sms.Message){
- if(!(this.threads[e.tn]||this.threads["001"+e])){
- this.threads[e.tn]=new net_comcast_sms.Thread(this.useraccount,this,e);
- this.callListeners("threads")
- }
- return this.threads[e.tn]
- }else{
- if(AjxUtil.isNumber(e)||AjxUtil.isString(e)){
- return this.threads[e]||this.threads["001"+e]
- }}};
- net_comcast_sms.MessageStore.prototype.getThreads=function(){
- return this.threads
- };
- net_comcast_sms.MessageStore.prototype.getNonDeletedThreads=function(a){
- var t=[];
- a=a||this.threads;
- if(AjxUtil.isArray(a)){}else{
- if(a instanceof AjxVector){
- a=a.getArray()
- }else{
- if(AjxUtil.isObject(a)){
- a=AjxUtil.values(a)
- }else{
- return t
- }}}
- for(var e=0;
- e<a.length;
- e++){
- if(a[e].getNonDeletedCount()>0){
- t.push(a[e])
- }}
- return t
- };
- net_comcast_sms.MessageStore.prototype.getThreadCount=function(){
- return AjxUtil.keys(this.threads).length
- };
- net_comcast_sms.MessageStore.prototype.getOldestThread=function(){
- var a,o;
- for(var t in this.threads){
- var e=this.threads[t],n=e.getNewest().time;
- if(!o||n<o){
- a=e;
- o=n
- }}
- return a
- };
- net_comcast_sms.MessageStore.prototype.getNewestThread=function(){
- var a,o;
- for(var t in this.threads){
- var e=this.threads[t],n=e.getNewest().time;
- if(!o||n>o){
- a=e;
- o=n
- }}
- return a
- };
- net_comcast_sms.MessageStore.prototype.hasMoreThreads=function(){
- return this._hasMoreThreads
- };
- net_comcast_sms.MessageStore.prototype.getMessage=function(a,o,s){
- var n=this.getById(a);
- if(n){
- caboUtil.run(s,n)
- }else{
- if(this.isLoggedIn()){
- var t=this.getUrl(this.getUAdomain(),"ua","msg",o,a,this.getUATN()),e=new AjxCallback(this,this._handleGetMessage,[a,s]);
- this.rest(t,e,null,true)
- }else{
- this.loginError("getMessage")
- }}};
- net_comcast_sms.MessageStore.prototype._handleGetMessage=function(e,o,a){
- var t=this.parseStatus(a);
- if(t===true){
- t=new net_comcast_sms.Message(this.useraccount,null,a.messages[0]);
- t.thread=this.getThread(t);
- this.putCache(t)
- }
- caboUtil.run(o,t)
- };
- net_comcast_sms.MessageStore.prototype.getMessageCounts=function(a){
- if(this.isLoggedIn()){
- var t=this.getUrl(this.getUAdomain(),"ua","msg","sms","msgcounts",this.getUATN()),e=new AjxCallback(this,this._handleGetMessageCounts,[a]);
- this.rest(t,e,null,true)
- }else{
- this.loginError("getMessageCounts")
- }};
- net_comcast_sms.MessageStore.prototype._handleGetMessageCounts=function(o,t){
- var e=this.parseStatus(t);
- if(e===true){
- var a=["smsnew","smsunread","smstotal","smsmax","smsquota","smsquotamax","family","group","vmail"];
- e=this._copyParams(t,{}
- ,null,a)
- }
- caboUtil.run(o,e)
- };
- net_comcast_sms.MessageStore.prototype.getMessagesSince=function(a,o){
- if(this.isLoggedIn()){
- var t=this.getUrl(this.getUAdomain(),"ua","msg","sms","all","statuschange",a,this.getUATN()),e=new AjxCallback(this,this._handleGetMessagesSince,[o]);
- this.rest(t,e,null,true)
- }else{
- this.loginError("getMessageCounts")
- }};
- net_comcast_sms.MessageStore.prototype._handleGetMessagesSince=function(n,a){
- var t=this.parseStatus(a);
- if(t===true){
- for(var e=0;
- e<a.messages.length;
- e++){
- var o=new net_comcast_sms.Message(this.useraccount,null,a.messages[e]);
- this.getThread(o).update(o,true);
- this.putCache(o)
- }}
- caboUtil.run(n,t)
- };
- net_comcast_sms.MessageStore.prototype.remove=function(o,h){
- if(this.isLoggedIn()){
- var c=net_comcast_sms.Message.TYPE_SMS,t=net_comcast_sms.Message.TYPE_GROUP,r=net_comcast_sms.Message.TYPE_VMAIL,e=this.getById(o),n=net_comcast_sms.MessageStore.sortByType(e),a={}
- ,l=new AjxCallback(this,this._handleRemove,[o,h]);
- a[c]=!!n[c];
- a[t]=!!n[t];
- a[r]=!!n[r];
- if(a[c]){
- this.removeByType(c,net_comcast_sms.MessageStore.getMid(n[c]),new AjxCallback(this,this._handleRemoveOne,[c,a,n[c],l]))
- }
- if(a[t]){
- this.removeByType(t,net_comcast_sms.MessageStore.getMid(n[t]),new AjxCallback(this,this._handleRemoveOne,[t,a,n[t],l]))
- }
- if(a[r]){
- this.removeByType(r,net_comcast_sms.MessageStore.getMid(n[r]),new AjxCallback(this,this._handleRemoveOne,[r,a,n[r],l]))
- }}else{
- this.loginError("remove")
- }};
- net_comcast_sms.MessageStore.prototype._handleRemoveOne=function(a,t,o,r,n){
- t[a]=false;
- var s=true;
- for(var e in t){
- if(t[e]){
- s=false;
- break
- }}
- if(s){
- caboUtil.run(r,true)
- }};
- net_comcast_sms.MessageStore.prototype._handleRemove=function(t,a,e){
- caboUtil.run(a,e)
- };
- net_comcast_sms.MessageStore.prototype.removeByType=function(o,r,h){
- if(this.isLoggedIn()){
- var n=this._copyParams(this.getByType(o),{}
- ,null,r),t=AjxUtil.map(AjxUtil.values(n),function(l){
- return l.mid
- }
- );
- if(t.length){
- var a=this.getUrl(this.getUAdomain(),"ua","msg",o,"delete",this.getUATN()),s={
- mids:t}
- ,e=new AjxCallback(this,this._handleRemoveByType,[n,h]);
- this.rest(a,e,s)
- }else{
- if(h instanceof AjxCallback){
- caboUtil.run(h,true)
- }}}else{
- this.loginError("remove")
- }};
- net_comcast_sms.MessageStore.prototype._handleRemoveByType=function(a,n,o){
- var t=this.parseStatus(o);
- if(t===true||t.code=="0030003"){
- for(var e in a){
- a[e].localSetStatus("D")
- }}
- caboUtil.run(n,t)
- };
- net_comcast_sms.MessageStore.prototype.sendMessage=function(t,e,s){
- if(this.isLoggedIn()){
- t=AjxUtil.toArray(t);
- if(t&&t.length){
- t=AjxUtil.map(t,function(r){
- return net_comcast_sms.Util.TN.normalize(r,true)
- }
- );
- t=AjxUtil.uniq(t);
- var o=this.getUrl(this.getUAdomain(),"ua","msg","sms","send",this.getUATN()),n={
- desttnarray:t,body:e}
- ,a=new AjxCallback(this,this._handleSendMessage,[n,s]);
- this.rest(o,a,n)
- }else{
- caboUtil.run(s,false)
- }}else{
- this.loginError("sendMessage")
- }};
- net_comcast_sms.MessageStore.prototype._handleSendMessage=function(t,l,s){
- var e=this.parseStatus(s);
- if(e===true){
- var n=[];
- for(var r=0,a=s.message.length;
- r<a;
- r++){
- var o=s.message[r];
- o.body=t.body;
- var c=this._createMessage(o);
- n.push(c)
- }
- e=n
- }
- var h=this.useraccount.getHandler().getController();
- h._handleTestQuota(true,true,null,s);
- caboUtil.run(l,e)
- };
- net_comcast_sms.MessageStore.prototype.handleNotification=function(e){
- if(e&&e.id=="comcast_SMS"){
- var t=e.sms.id;
- this.getMessage(t,"sms",function(a){
- if(a instanceof net_comcast_sms.Message){
- a.thread.update(a,true)
- }}
- )
- }};
- net_comcast_sms.Thread=function(t,e,a){
- if(!arguments.length){
- return
- }
- net_comcast_sms.Model.call(this);
- this.useraccount=t;
- this.store=e;
- this._byIndex=new AjxVector();
- this._byId={};
- this._resetStatusCount();
- this._hasMore=true;
- this._nonloadedNewMsgs=0;
- this._refreshListeners=[];
- if(a&&!this.addSingle(a)){
- throw net_comcast_sms.ModelError.incorrectParameter("headerMsg","net_comcast_sms.Message or raw hash",this.toString())
- }};
- net_comcast_sms.Thread.prototype=new net_comcast_sms.Model;
- net_comcast_sms.Thread.prototype.constructor=net_comcast_sms.Thread;
- net_comcast_sms.Thread.prototype.toString=function(){
- return"net_comcast_sms.Thread"
- };
- net_comcast_sms.Thread.PINNED="pinned";
- net_comcast_sms.Thread.DEFAULT_COUNT=20;
- net_comcast_sms.Thread.prototype.getUAdomain=function(){
- return this.useraccount.getUAdomain()
- };
- net_comcast_sms.Thread.prototype.getUATN=function(){
- return this.useraccount.getUATN()
- };
- net_comcast_sms.Thread.prototype.isLoggedIn=function(){
- return this.useraccount.isLoggedIn()
- };
- net_comcast_sms.Thread.prototype.getMessageStore=function(){
- return this.useraccount.getMessageStore()
- };
- net_comcast_sms.Thread.prototype.getHandler=function(){
- return this.useraccount.getHandler()
- };
- net_comcast_sms.Thread.prototype.getSessionId=function(){
- return this.useraccount.getSessionId()
- };
- net_comcast_sms.Thread.prototype.isPinned=function(){
- return this.pinned
- };
- net_comcast_sms.Thread.prototype.togglePinned=function(){
- this.pinned=!this.pinned;
- return this.pinned
- };
- net_comcast_sms.Thread.prototype.isHouseholdThread=function(){
- return false
- };
- net_comcast_sms.Thread.prototype.getContact=function(e){
- if(!this._contact){
- this._contact=new net_comcast_sms.Contact(this.getTN())
- }
- this._contact.getDetails(e);
- return this._contact
- };
- net_comcast_sms.Thread.prototype.refresh=function(t){
- var e=net_comcast_sms.Thread.DEFAULT_COUNT;
- this._refreshListeners.push(t);
- if(!this._loading){
- this._load(new AjxCallback(this,this._handleRefresh),e,null,true,e)
- }};
- net_comcast_sms.Thread.prototype._handleRefresh=function(t){
- this.setNonloadedNewMsgs(0);
- var e=[].concat(this._refreshListeners);
- this._refreshListeners.length=0;
- caboUtil.run(e,t)
- };
- net_comcast_sms.Thread.prototype.more=function(t,e){
- e=e||this.getNextLoadSize();
- this._load(t,e,this.getOldest().time,true,this.size()+e)
- };
- net_comcast_sms.Thread.prototype._load=function(r,o,s,n,a){
- if(this.isLoggedIn()){
- this._loading=true;
- o=o||net_comcast_sms.Thread.DEFAULT_COUNT;
- s=s||(net_comcast_sms.Model.USE_STATIC_DATA?0:new Date().getTime());
- var t=this.getUrl(this.getUAdomain(),"ua","msg","sms","thread",this.getUSTN(),o,s,this.getUATN()),e=new AjxCallback(this,this._handleLoad,[r,n,a]);
- this.rest(t,e,null,true)
- }else{
- this.loginError("_load")
- }};
- net_comcast_sms.Thread.prototype._handleLoad=function(n,a,e,o){
- var t=this.parseStatus(o);
- if(t===true||t.code=="0030006"){
- if(o.messages){
- this.update(o.messages,a)
- }
- t=this;
- this._loaded=true;
- this._loading=false;
- if(e&&(this.size()<e)){
- this._hasMore=false
- }}
- caboUtil.run(n,t)
- };
- net_comcast_sms.Thread.prototype.hasMore=function(){
- return this._hasMore
- };
- net_comcast_sms.Thread.prototype.update=function(h,t){
- var r=false,s=AjxUtil.toArray(this._getMessage(h));
- for(var l=0,o=s.length;
- l<o;
- l++){
- r=this.addSingle(s[l],true)||r
- }
- if(!t){
- var e=[];
- for(var l=0,o=this.size();
- l<o;
- l++){
- var u=false,a=this.getByIndex(l),d=a.mid;
- for(var n=0,c=s.length;
- n<c;
- n++){
- if(s[n].mid==d){
- u=true;
- break
- }}
- if(!u){
- e.push(a)
- }}
- for(var l=0,o=e.length;
- l<o;
- l++){
- r=this.removeSingle(e[l],true)||r
- }}
- if(r){
- if(this.size()>1){
- this._byIndex.sort(net_comcast_sms.Message.dateComparator)
- }
- this.onChangeMessageCount()
- }
- return r
- };
- net_comcast_sms.Thread.prototype._getMessage=function(a){
- if(AjxUtil.isArray(a)){
- var t=[];
- for(var e=0;
- e<a.length;
- e++){
- var o=this._getMessage(a[e]);
- if(o instanceof net_comcast_sms.Message){
- t.push(o)
- }}
- return t
- }else{
- if(a instanceof net_comcast_sms.Message){
- a.thread=this;
- return a
- }else{
- if(AjxUtil.isObject(a)&&net_comcast_sms.Message.acceptedType(a.type)){
- return new net_comcast_sms.Message(this.useraccount,this,a)
- }}}};
- net_comcast_sms.Thread.prototype.addSingle=function(t,e){
- var a=this._getMessage(t);
- if(a&&!this.getById(a.mid)){
- if(net_comcast_sms.Message.acceptedStatus(a.status)){
- this._statusCount[a.status]++
- }
- this._byIndex.add(a);
- this._byId[a.mid]=a;
- this.store.putCache(a);
- if(!e){
- this.callListeners("messages",a)
- }
- return true
- }else{
- return false
- }};
- net_comcast_sms.Thread.prototype.removeSingle=function(t,e){
- if(t instanceof net_comcast_sms.Message){
- this._byIndex.remove(t);
- delete this._byId[t.mid];
- this.store.delCache(t);
- if(!e){
- this.callListeners("messages",t)
- }
- return true
- }};
- net_comcast_sms.Thread.prototype.deleteThread=function(n){
- if(this.isLoggedIn()){
- var e=net_comcast_sms.Util.TN.normalize(this.getTN());
- var a=this.getUrl(this.getUAdomain(),"ua","msg","sms","thread","delete",e,this.getUATN());
- var o={
- tn:e};
- var t=new AjxCallback(this,this._handleDeleteThread,[n]);
- this.rest(a,t,o,false)
- }else{
- this.loginError("setStatus")
- }};
- net_comcast_sms.Thread.prototype._handleDeleteThread=function(s,e){
- var o=this.parseStatus(e);
- if(o===true){
- for(var a=0,t=this.size();
- a<t;
- a++){
- var n=this.getByIndex(a);
- if(n.status!=net_comcast_sms.Message.STATUS_LOCKED){
- n.localSetStatus(net_comcast_sms.Message.STATUS_DELETED)
- }}}
- caboUtil.run(s)
- };
- net_comcast_sms.Thread.prototype.getTN=function(){
- var e=this.getNewest();
- return e&&e.tn
- };
- net_comcast_sms.Thread.prototype.getUSTN=function(){
- var e=this.getTN();
- return e&&net_comcast_sms.Util.TN.normalize(e)
- };
- net_comcast_sms.Thread.prototype.getById=function(e){
- return this._byId[e]||null
- };
- net_comcast_sms.Thread.prototype.getNewest=function(){
- return this._byIndex.getLast()
- };
- net_comcast_sms.Thread.prototype.getNewestNonDeleted=function(){
- for(var e=this._byIndex.size()-1;
- e>-1;
- e--){
- var t=this._byIndex.get(e);
- if(t.status!=net_comcast_sms.Message.STATUS_DELETED){
- return t
- }}
- return null
- };
- net_comcast_sms.Thread.prototype.getOldest=function(){
- return this._byIndex.get(0)||null
- };
- net_comcast_sms.Thread.prototype.getMessages=function(){
- return this._byIndex
- };
- net_comcast_sms.Thread.prototype.getByIndex=function(e,t){
- if(!t){
- return this._byIndex.get(e)
- }else{
- if(t>0){
- return this._byIndex.slice(e,t)
- }else{
- return this._byIndex.slice(e)
- }}};
- net_comcast_sms.Thread.prototype.size=function(){
- return this._byIndex.size()
- };
- net_comcast_sms.Thread.prototype.getNextLoadSize=function(){
- var e=this.size();
- return(e<=40)?20:Math.ceil(e*0.5)
- };
- net_comcast_sms.Thread.prototype.isLoaded=function(){
- return !!this._loaded
- };
- net_comcast_sms.Thread.prototype.isLoading=function(){
- return !!this._loading
- };
- net_comcast_sms.Thread.prototype.setNonloadedNewMsgs=function(e){
- this._nonloadedNewMsgs=e;
- this.callListeners("newmessages")
- };
- net_comcast_sms.Thread.prototype.getNonloadedNewMsgs=function(){
- return this._nonloadedNewMsgs
- };
- net_comcast_sms.Thread.prototype.getStatusCount=function(e){
- if(this._statusCount[e]!==null){
- return this._statusCount[e]
- }
- this._statusCount={
- N:0,U:0,R:0,L:0,D:0};
- for(var a=0,t=this.size();
- a<t;
- a++){
- var o=this.getByIndex(a).status;
- if(net_comcast_sms.Message.acceptedStatus(o)){
- this._statusCount[o]++
- }}
- return this._statusCount[e]
- };
- net_comcast_sms.Thread.prototype._resetStatusCount=function(){
- this._statusCount={
- N:null,U:null,R:null,L:null,D:null}
- };
- net_comcast_sms.Thread.prototype.onChangeMessageStatus=function(o,e,a){
- if(this.getById(o.mid)===o&&e!=a){
- var t=AjxUtil.hashCopy(this._statusCount);
- if(this._statusCount[e]){
- this._statusCount[e]--
- }
- if(this._statusCount[a]!==null){
- this._statusCount[a]++
- }
- this.callListeners("status")
- }};
- net_comcast_sms.Thread.prototype.onChangeMessageCount=function(){
- var e=AjxUtil.hashCopy(this._statusCount);
- this._resetStatusCount();
- this.getStatusCount("N");
- if(!AjxUtil.hashCompare(e,this._statusCount)){
- this.callListeners("status")
- }
- this.callListeners("messages")
- };
- net_comcast_sms.Thread.prototype.onChangeMessageEditStatus=function(e){
- this.callListeners("editstatus")
- };
- net_comcast_sms.Thread.prototype.onChangeMessageForwardStatus=function(e){
- this.callListeners("forwardstatus")
- };
- net_comcast_sms.Thread.prototype.getNewMessageCount=function(){
- return this.getStatusCount(net_comcast_sms.Message.STATUS_NEW)
- };
- net_comcast_sms.Thread.prototype.getUnreadMessageCount=function(){
- return this.getStatusCount(net_comcast_sms.Message.STATUS_UNREAD)+this.getNewMessageCount()
- };
- net_comcast_sms.Thread.prototype.getDeletedCount=function(){
- return this.getStatusCount(net_comcast_sms.Message.STATUS_DELETED)
- };
- net_comcast_sms.Thread.prototype.getNonDeletedCount=function(){
- return this.size()-this.getDeletedCount()
- };
- net_comcast_sms.Thread.prototype.getID=function(){
- return this.getTN()
- };
- net_comcast_sms.Thread.prototype.setStatus=function(e,n){
- if(this.isLoggedIn()){
- var a=this.getUrl(this.getUAdomain(),"ua","msg","sms","thread","status",this.getUATN());
- var o={
- tn:this.getTN(),status:e};
- var t=new AjxCallback(this,this._handleSetStatus,[e,n]);
- this.rest(a,t,o,true)
- }else{
- this.loginError("setStatus")
- }};
- net_comcast_sms.Thread.prototype._handleSetStatus=function(e,r,n){
- var o=this.parseStatus(n);
- if(o===true){
- for(var a=0,t=this.size();
- a<t;
- a++){
- var s=this.getByIndex(a);
- this.onChangeMessageStatus(s,s.status,e);
- s.status=e
- }}
- caboUtil.run(r,o)
- };
- net_comcast_sms.Thread.dateComparator=function(t,e){
- return net_comcast_sms.Message.dateComparator(t.getNewest(),e.getNewest())
- };
- net_comcast_sms.Thread.unreadComparator=function(t,e){
- return net_comcast_sms.Util.plainComparator(t.getUnreadMessageCount()+t.getNewMessageCount(),e.getUnreadMessageCount()+e.getNewMessageCount())
- };
- net_comcast_sms.Thread.statusComparator=function(t,e){
- return net_comcast_sms.Util.plainComparator(t.getNewest().getStatusIndex(),e.getNewest().getStatusIndex())||net_comcast_sms.Thread.unreadComparator(t,e)||net_comcast_sms.Thread.dateComparator(t,e)
- };
- AjxDispatcher.addPackageLoadFunction("ContactsCore",new AjxCallback(this,function(){
- net_comcast_sms.Autocomplete=function(e){
- if(!arguments.length){
- return
- }
- this._aa=Dwt.getNextId();
- ZmAutocomplete.call(this,e);
- this.enabled=e.enabled||{
- name:true,phone:true,email:false};
- this._searchFields=[].concat(this.enabled.name?net_comcast_sms.Autocomplete.NAME_FIELDS:[],this.enabled.phone?net_comcast_sms.Autocomplete.PHONE_FIELDS:[],this.enabled.email?net_comcast_sms.Autocomplete.EMAIL_FIELDS:[]);
- this._outTextFunc=e.outTextFunc
- };
- net_comcast_sms.Autocomplete.prototype=new ZmAutocomplete;
- net_comcast_sms.Autocomplete.prototype.constructor=net_comcast_sms.Autocomplete;
- net_comcast_sms.Autocomplete.prototype.toString=function(){
- return"net_comcast_sms.Autocomplete"
- };
- net_comcast_sms.Autocomplete.PHONE_FIELDS=[ZmContact.F_mobilePhone].concat(AjxUtil.complement([ZmContact.F_mobilePhone],ZmContact.PHONE_FIELDS));
- net_comcast_sms.Autocomplete.EMAIL_FIELDS=ZmContact.EMAIL_FIELDS;
- net_comcast_sms.Autocomplete.NAME_FIELDS=[ZmContact.F_firstName,ZmContact.F_middleName,ZmContact.F_lastName];
- net_comcast_sms.Autocomplete.DATA_FIELDS=net_comcast_sms.Autocomplete.PHONE_FIELDS;
- net_comcast_sms.Autocomplete.SEARCH_FIELDS=net_comcast_sms.Autocomplete.NAME_FIELDS.concat(net_comcast_sms.Autocomplete.DATA_FIELDS);
- net_comcast_sms.Autocomplete.counter=0;
- net_comcast_sms.Autocomplete.prototype._doSearch=net_comcast_sms.Autocomplete.prototype._doAutocomplete=function(l,r,m,t,d,h){
- l=l.replace(/[()]/,"");
- var o=l.split(/\s+/);
- var a=[];
- for(var s=0,e=o.length;
- s<e;
- s++){
- var c="("+AjxUtil.map(this._searchFields,function(f){
- return"FIELD["+f+"]:*"+o[s]+"*"
- }
- ).join(" || ")+")";
- a.push(c)
- }
- var n=a.join(" && ");
- var u=new ZmSearch({
- query:n,types:AjxVector.fromArray([ZmItem.CONTACT]),accountName:h&&h.name,expandDL:appCtxt.get(ZmSetting.GAL_AUTOCOMPLETE),sortBy:ZmSearch.SCORE_DESC,attrs:[ZmContact.F_fileAs].concat(ZmContact.PHONE_FIELDS)}
- );
- this._currentStr=l;
- this._current=net_comcast_sms.Autocomplete.counter++;
- u.execute({
- callback:new AjxCallback(this,this._handleResponseDoAutocomplete,[l,r,m,t,d,h,this._current]),timeout:ZmAutocomplete.AC_TIMEOUT}
- )
- };
- net_comcast_sms.Autocomplete.prototype._handleResponseDoAutocomplete=function(b,c,t,n,a,e,h,l){
- if(h==this._current){
- if(c){
- c.setWaiting(false)
- }
- var W,g=false,w=(f&&f.search&&f.search.isGalAutocompleteSearch);
- var f=l.getResponse();
- var r=f.getResults(ZmItem.CONTACT);
- W=(r&&r.getArray())||[];
- g=true;
- if(!window.ZmResource){
- window.ZmResource={
- F_type:"zimbraCalResType"}
- }
- var T=[];
- for(var q=0;
- q<W.length;
- q++){
- var s=new ZmAutocompleteMatch(W[q],t,g||W[q] instanceof ZmContact,b);
- if(s.acType==n){
- if(s.type==ZmAutocomplete.AC_TYPE_GAL){
- w=true
- }
- var x=s.item;
- var p={};
- var u=net_comcast_sms.Autocomplete.DATA_FIELDS;
- for(var k=0,v=u.length;
- k<v;
- k++){
- var y=x.getAttr(u[k]);
- if(y||y===0){
- p[u[k]]=y
- }}
- var O=net_comcast_sms.Autocomplete._contactHasValueInField(x,net_comcast_sms.Autocomplete.NAME_FIELDS,b);
- var z=O||net_comcast_sms.Autocomplete._contactHasValueInField(x,net_comcast_sms.Autocomplete.PHONE_FIELDS,b);
- for(var A in p){
- var y=p[A];
- if(O||(z&&AjxUtil.indexOf(ZmContact.PHONE_FIELDS,A)!=-1&&y.indexOf(b)!=-1)){
- var o=AjxUtil.createProxy(s);
- o.text=this._outTextFunc(A,s);
- o.field=A;
- o.value=y;
- o.matches=net_comcast_sms.Autocomplete.Match_matches;
- T.push(o)
- }}}}
- var d=!(f&&f.getAttribute("more"));
- var m=this;
- setTimeout(function(){
- caboUtil.run(a,T);
- m._cacheResults(b,n,T,w,d&&f._respEl.canBeCached,null,e)
- }
- ,0)
- }};
- net_comcast_sms.Autocomplete._contactHasValueInField=function(r,o,l){
- var s=l.toLowerCase().split(/\s+/);
- var e=AjxUtil.collapseList(AjxUtil.map(o,function(d){
- var u=r.getAttr(d);
- return u&&u.toLowerCase()
- }
- ));
- for(var a=0,h=s.length;
- a<h;
- a++){
- var c=false;
- for(var t=0,n=e.length;
- t<n;
- t++){
- if(e[t].indexOf(s[a])!=-1){
- c=true;
- break
- }}
- if(!c){
- return false
- }}
- return true
- };
- net_comcast_sms.Autocomplete.Match_matches=function(s){
- s=s.toLowerCase();
- if(this.name&&!this._nameParsed){
- var n=this.name.split(/\s+/,3);
- var a=n[0];
- this._lastName=n[n.length-1];
- this._firstLast=[a,this._lastName].join(" ");
- this._nameParsed=true
- }
- var e=[this.value,this.name,this._lastName,this._firstLast];
- for(var t=0;
- t<e.length;
- t++){
- var o=e[t];
- var o=o&&o.toLowerCase();
- if(o&&(o.indexOf(s)==0)){
- return true
- }}
- return false
- };
- net_comcast_sms.Autocomplete.prototype.quickComplete=function(e){
- return null
- }
- }
- ));
- net_comcast_sms.NotificationClient=function(){
- this._url="http://195.41.32.235:8080/test/GetNotifications.php";
- this._pollCallback=new AjxCallback(this,this._handlePoll);
- this._running=false
- };
- net_comcast_sms.NotificationClient.prototype=new net_comcast_sms.Model;
- net_comcast_sms.NotificationClient.prototype.constructor=net_comcast_sms.NotificationClient;
- net_comcast_sms.NotificationClient.prototype.TIMEOUT=300000;
- net_comcast_sms.NotificationClient.prototype.WHITESPACE_RE=/^\s+$/;
- net_comcast_sms.NotificationClient.prototype.toString=function(){
- return"net_comcast_sms.NotificationClient"
- };
- net_comcast_sms.NotificationClient.prototype.start=function(){
- if(!this._running){
- this._running=true;
- this._poll()
- }};
- net_comcast_sms.NotificationClient.prototype.stop=function(){
- this._running=false
- };
- net_comcast_sms.NotificationClient.prototype._createSession=function(){};
- net_comcast_sms.NotificationClient.prototype._handleCreateSession=function(e){};
- net_comcast_sms.NotificationClient.prototype._destroySession=function(){};
- net_comcast_sms.NotificationClient.prototype._handleDestroySession=function(e){};
- net_comcast_sms.NotificationClient.prototype._poll=function(){};
- net_comcast_sms.NotificationClient.prototype._handlePoll=function(e){
- if(this._running){
- if(e.status==504){
- this._poll()
- }else{
- if(e.success){
- this._poll();
- var t=AjxXmlDoc.createFromXml(e.text);
- if(t.getDoc().documentElement.nodeName=="parsererror"){}else{
- var n=t.toJSObject(true,false,true);
- var o=AjxUtil.toArray(n.tuple);
- for(var a=0;
- a<o.length;
- a++){
- this._handleTuple(this._parse(o[a]))
- }}}}}};
- net_comcast_sms.NotificationClient.prototype._parse=function(o){
- var a={};
- for(var e in o){
- if(o.hasOwnProperty(e)){
- var t=o[e];
- if(AjxUtil.isFunction(t)){}else{
- if(e=="__msh_content"){
- if(!this.WHITESPACE_RE.test(t)){
- a.value=AjxStringUtil.trim(t)
- }}else{
- if(AjxUtil.isObject(t)){
- a[e]=this._parse(t)
- }else{
- a[e]=t
- }}}}}
- return a
- };
- net_comcast_sms.NotificationClient.prototype._handleRest=function(t,e){
- if(e&&e.success||e.status==504){
- caboUtil.run(t,e)
- }else{
- net_comcast_sms.Model.prototype._handleRest.call(this,t,e)
- }};
- net_comcast_sms.NotificationClient.prototype._handleTuple=function(e){
- this.callListeners("notification",e)
- };
- net_comcast_sms.Provisioning={
- _loadListeners:[],_loaded:false,_loading:false};
- net_comcast_sms.Provisioning.STATENAME="subscribeState";
- net_comcast_sms.Provisioning.STATE_UNKNOWN="";
- net_comcast_sms.Provisioning.STATE_WAITING_REC_CONTRACT="1";
- net_comcast_sms.Provisioning.STATE_WAITING_ORDERADD="2";
- net_comcast_sms.Provisioning.STATE_WAITING_POLL="3";
- net_comcast_sms.Provisioning.STATE_SUBSCRIBED="4";
- net_comcast_sms.Provisioning.STATE_WAITING_UNSUBSCRIBE="5";
- net_comcast_sms.Provisioning.STATE_UNSUBSCRIBED="6";
- net_comcast_sms.Provisioning.VOICE_LIMITED="voice-limited";
- net_comcast_sms.Provisioning.ACTIVATED="A";
- net_comcast_sms.Provisioning.setState=function(t,e,o){
- var a=e||{};
- a[this.STATENAME]=t;
- net_comcast_sms.Util.setProperties(a,o)
- };
- net_comcast_sms.Provisioning.getState=function(e){
- caboUtil.run(e,net_comcast_sms.Util.getProperty(this.STATENAME))
- };
- net_comcast_sms.Provisioning.load=function(o,t){
- this._loadListeners.push(o);
- var a;
- if((this._loaded||this.error)&&!t){
- this._handleLoad()
- }else{
- if(!this._loading||t){
- var e=appCtxt.accountList.mainAccount;
- if(this.isEntitled()){
- if(net_comcast_sms.Model.USE_STATIC){
- var a=net_comcast_sms.voiceapp
- }else{
- var a=appCtxt.getApp("Voice")
- }
- this._loading=true;
- a.getVoiceInfo(new AjxCallback(this,function(){
- this._tn=this._availTNs=null;
- this._loading=false;
- this._phones={};
- this._isSNSEnabled=false;
- var s=[],h=this._availTNs=[],l=appCtxt.getActiveAccount()&&appCtxt.getActiveAccount().name&&appCtxt.getActiveAccount().name.split("@")[0].toLowerCase(),r=a.phones.length;
- for(var c=0;
- c<r;
- c++){
- var u=a.phones[c],n=u.id,d=u.hasTextMessaging?s:h;
- this._phones[u.id]=u;
- d.push(n);
- if(u.textmsg_users&&u.textmsg_users.toLowerCase()==l){
- this._tn=n
- }
- if(u.sns){
- this._isSNSEnabled=true
- }}
- if(!this._tn){
- for(var n in this._phones){
- var u=this._phones[n];
- if(u.textmsg_users){
- this._tn=n
- }}}
- if(!this._tn){
- for(var n in this._phones){
- var u=this._phones[n];
- if(u.hasTextMessaging){
- this._tn=n
- }}}
- if(this._tn){
- var u=this._phones[this._tn];
- this._isSNSEnabled=u.sns;
- this._assignedUser=u.textmsg_users;
- this._isAssignedUser=this._assignedUser&&this._assignedUser.toLowerCase()==l.toLowerCase()
- }
- var m=a._storeprincipal;
- this._uid=m.accountNumber;
- this._acctNum=m.accountNumber;
- this._name=m.name;
- this._isPrimary=m.is_primary;
- this._accountType=m.accountType;
- this._isCommercial=!!m.accountType;
- this._productDesc=m.productDesc;
- this._isLimited=m.productDesc===this.VOICE_LIMITED;
- this._isNeither=!m.productDesc;
- this._dvs=m.digitalVoiceService;
- this._isActivated=m.digitalVoiceService===this.ACTIVATED;
- this._loaded=true;
- this.getState(new AjxCallback(this,function(f){
- var p=null;
- if(this._tn&&(f==this.STATE_WAITING_ORDERADD||f==this.STATE_WAITING_REC_CONTRACT||f==this.STATE_UNKNOWN||f==this.STATE_WAITING_POLL)){
- p=this.STATE_SUBSCRIBED
- }else{
- if(!this._tn&&(f==this.STATE_WAITING_UNSUBSCRIBE||f==this.STATE_SUBSCRIBED)){
- p=this.STATE_UNSUBSCRIBED
- }}
- if(p!==null){
- this.setState(p,null,new AjxCallback(this,this._handleLoad))
- }else{
- this._handleLoad()
- }}
- ))
- }
- ),new AjxCallback(this,function(n){
- this.error=n||true;
- this._handleLoad();
- return true
- }
- ),true,t)
- }else{
- this._handleLoad()
- }}else{}}};
- net_comcast_sms.Provisioning._handleLoad=function(){
- var e=[].concat(this._loadListeners);
- this._loadListeners.length=0;
- caboUtil.run(e,this.error)
- };
- net_comcast_sms.Provisioning.get=function(t,a,e){
- t=AjxUtil.toArray(t);
- this.load(new AjxCallback(this,function(){
- caboUtil.apply(a,caboUtil.Coll.getValues(this,t))
- }
- ))
- };
- net_comcast_sms.Provisioning.getSubscribed=function(e){
- this.load(new AjxCallback(this,function(){
- var t=this.error?null:!!(this._tn);
- this.getState(new AjxCallback(this,function(a){
- setTimeout(function(){
- caboUtil.run(e,t&&a==net_comcast_sms.Provisioning.STATE_SUBSCRIBED)
- }
- ,0)
- }
- ))
- }
- ))
- };
- net_comcast_sms.Provisioning.isPrimary=function(){
- return this._isPrimary
- };
- net_comcast_sms.Provisioning.isTextMsgEnabled=function(){
- return !!this._tn
- };
- net_comcast_sms.Provisioning.isSNSEnabled=function(){
- return this._isSNSEnabled
- };
- net_comcast_sms.Provisioning.getAccountType=function(){
- return this._accountType
- };
- net_comcast_sms.Provisioning.isCommercial=function(){
- return this._isCommercial
- };
- net_comcast_sms.Provisioning.isLimited=function(){
- return this._isLimited
- };
- net_comcast_sms.Provisioning.isNeitherLimitedOrUnlimited=function(){
- return this._isNeither
- };
- net_comcast_sms.Provisioning.isActivated=function(){
- return this._isActivated
- };
- net_comcast_sms.Provisioning.hasAssignedUser=function(){
- return this._assignedUser
- };
- net_comcast_sms.Provisioning.isAssignedUser=function(){
- return this._isAssignedUser
- };
- net_comcast_sms.Provisioning.isEntitled=function(){
- var e=appCtxt.accountList.mainAccount;
- return net_comcast_sms.Model.USE_STATIC||!!(e.isMain&&appCtxt.get(ZmSetting.VOICE_ENABLED,null,e)&&appCtxt.getApp("Voice")&&net_comcast_sms.Util.getCOSName()!="combo-secondary")
- };
- net_comcast_sms.Provisioning.signup=function(t,e,o,a){
- this.getState(new AjxCallback(this,function(n){
- var s=new AjxCallback(this,this._orderAdd,[e,t,new AjxCallback(this,this._handleSignup,[t,o]),a,60000]);
- if(t&&n!=this.STATE_WAITING_ORDERADD){
- this._recordContract(e,s,a)
- }else{
- caboUtil.run(s)
- }}
- ))
- };
- net_comcast_sms.Provisioning._handleSignup=function(e,t){
- this.setState(e?this.STATE_WAITING_POLL:this.STATE_UNSUBSCRIBED);
- caboUtil.run(t)
- };
- net_comcast_sms.Provisioning.unsubscribe=function(t,e){
- this.signup(false,this._tn,t,e)
- };
- net_comcast_sms.Provisioning._recordContract=function(e,a,t){
- this.getAcctNum(new AjxCallback(this,function(o){
- this.setState(this.STATE_WAITING_REC_CONTRACT,{
- tn:e}
- ,new AjxCallback(this,function(){
- var n=[net_comcast_sms.SmsZimlet.RECORDCONTRACT,"?tn=",e,"&acctNum=",o,"&uid=",this._name].join("");
- AjxRpc.invoke(null,n,null,new AjxCallback(this,this._handleRecordContract,[a,t,e]),true)
- }
- ))
- }
- ))
- };
- net_comcast_sms.Provisioning._handleRecordContract=function(n,a,e,t){
- var o=t.obj||JSON.gparse(t.text);
- if(t.success&&o&&o.recordContractReturn){
- this._tn=e;
- caboUtil.run(n)
- }else{
- caboUtil.run(a,o&&o.__fault_messagetext)
- }};
- net_comcast_sms.Provisioning._orderAdd=function(e,t,n,a,o){
- this.getAcctNum(new AjxCallback(this,function(s){
- this.setState(t?this.STATE_WAITING_ORDERADD:this.STATE_WAITING_UNSUBSCRIBE,null,new AjxCallback(this,function(d){
- var c=!this._isLimited!=!d;
- var l=[net_comcast_sms.SmsZimlet.ORDERADD,"?tn=",e,"&acctNum=",s,"&action=",t?"ADD":"DISCONNECT","&limited=",c?"1":"0"].join("");
- var r=new AjxCallback(this,this._handleOrderAdd,[t,e,n,a]);
- if(!t&&!d){
- var u=arguments.callee;
- var h=new AjxCallback(this,function(m){
- var p=m.obj||JSON.gparse(m.text),f=p&&p.__fault_messagecode;
- if(f=="FAULT"){
- u(true)
- }else{
- caboUtil.run(r,m)
- }}
- )
- }
- AjxRpc.invoke(null,l,null,h||r,true,o)
- }
- ))
- }
- ))
- };
- net_comcast_sms.Provisioning._handleOrderAdd=function(t,h,l,r,o){
- var n=o.obj||JSON.gparse(o.text),e=n&&n.__fault_messagecode;
- if(n&&(o.success&&n.orderAddReturn)||(t&&e=="307")||(!t&&e=="OO-1037")||(!t&&e=="OO-1020")){
- this._tn=t&&h;
- this.setState(t?this.STATE_WAITING_POLL:this.STATE_UNSUBSCRIBED,null,l)
- }else{
- var s,d,c=net_comcast_sms.Util.getZimletHandler();
- switch(e){
- case"10072":case"OO-1019":case"OO-1037":s="provErrorAlready";
- break;
- case undefined:case null:e="No error code";
- default:s="provErrorGeneric";
- break
- }
- d="provErrorTitle";
- var a=function(){
- caboUtil.run(r,c.getMsg(s,e),c.getMsg(d))
- };
- if(!t){
- this.setState(this.STATE_SUBSCRIBED,null,a)
- }else{
- a()
- }}};
- net_comcast_sms.Provisioning.getAvailableTNs=function(e){
- this.get(["_availTNs","_tn"],e)
- };
- net_comcast_sms.Provisioning.getSelectedTN=function(t){
- var e=this;
- setTimeout(function(){
- caboUtil.run(t,e._tn||null)
- }
- ,0)
- };
- net_comcast_sms.Provisioning.getUserId=function(e){
- this.get("_uid",e)
- };
- net_comcast_sms.Provisioning.getAcctNum=function(e){
- this.get("_acctNum",e)
- };
- net_comcast_sms.Provisioning.getMasterAccount=function(e){
- this.load(new AjxCallback(this,function(){
- var a=net_comcast_sms.Util.getZimletHandler(),o;
- if(this.error){
- o=null
- }else{
- o=new net_comcast_sms.MasterAccount({
- spcode:"spcode",sppwd:"sppwd",mname:"mname",users:[]}
- );
- AjxUtil.hashUpdate(o,{
- mname:null,hwmac:null,enabled:true}
- ,true);
- o.setHandler(a);
- o.ua_domain=a.getConfig("broadcloudBase");
- var t=new net_comcast_sms.UserAccount(o,{
- name:this._name,tn:this._tn,parameters:{
- sms_enable:true,sms_international:true,sms_max_total_msgs:1000,sms_max_sent_msgs:1000}}
- );
- t._loggedIn=true;
- o.users.push(t)
- }
- caboUtil.run(e,o)
- }
- ))
- };
- net_comcast_sms.Provisioning.poll=function(e,n,a,o){
- var t=function(s){
- caboUtil.run(a,new AjxCallback(this,function(r,l){
- if(l){
- setTimeout(function(){
- caboUtil.run(e)
- }
- ,0)
- }else{
- var h=r+1;
- if(h>=o.length){
- setTimeout(function(){
- caboUtil.run(n)
- }
- ,0)
- }else{
- setTimeout(function(){
- t.call(this,h)
- }
- ,(!isNaN(o[h])?o[h]:10)*1000)
- }}}
- ,[s]))
- };
- t.call(this,0)
- };
- net_comcast_sms.Controller=function(e,t){
- if(!arguments.length){
- return
- }
- ZmController.call(this,this.toString(),e,t);
- this._container=e;
- this._handler=t;
- this._registerOperations();
- this._refreshListener=new AjxCallback(this,this._updateRefreshButton);
- this._popdownListener=new AjxListener(this,this.popdownChoosers);
- this._lastPoll=0;
- this._canResizeOverview=true
- };
- net_comcast_sms.Controller.prototype=new ZmController;
- net_comcast_sms.Controller.prototype.constructor=net_comcast_sms.Controller;
- net_comcast_sms.Controller.prototype.toString=function(){
- return"net_comcast_sms.Controller"
- };
- net_comcast_sms.Controller.VIEW_COMPOSE="net_comcast_VIEW_COMPOSE";
- net_comcast_sms.Controller.VIEW_MAILCOMPOSE="net_comcast_VIEW_MAILCOMPOSE";
- net_comcast_sms.Controller.VIEW_THREADS="net_comcast_VIEW_THREADS";
- net_comcast_sms.Controller.INCOMING_QUOTA_WARN_LIMIT=0.95;
- net_comcast_sms.Controller.OUTGOING_QUOTA_WARN_LIMIT=0.95;
- net_comcast_sms.Controller.prototype.getHandler=function(){
- return this._handler
- };
- net_comcast_sms.Controller.prototype.getMsg=function(){
- return this._handler.getMsg.apply(this._handler,arguments)
- };
- net_comcast_sms.Controller.prototype.getMsgObj=function(){
- return this._handler.getMsgObj()
- };
- net_comcast_sms.Controller.prototype.getMainView=function(){
- if(!this._mainView){
- var a=this._handler.app;
- var e={};
- e[ZmAppViewMgr.CB_POST_SHOW]=new AjxCallback(this,this._postShowCallback);
- e[ZmAppViewMgr.CB_PRE_HIDE]=new AjxCallback(this,this._preHideCallback);
- this._mainView=new net_comcast_sms.MainView({
- parent:this._container,controller:this}
- );
- net_comcast_sms.Controller.__hack_clean_tabgroups(appCtxt.getRootTabGroup());
- appCtxt.getRootTabGroup().addMember(this._mainView.getTabGroupMember());
- var t={};
- t[ZmAppViewMgr.C_TOOLBAR_TOP]=this.getToolbar();
- t[ZmAppViewMgr.C_APP_CONTENT]=this._mainView;
- a.createView({
- viewId:this.getViewId(),elements:t,callbacks:e,isAppView:true,isTransient:false}
- );
- this.loadThreads()
- }
- return this._mainView
- };
- net_comcast_sms.Controller.__hack_clean_tabgroups=function(a){
- if(a instanceof DwtTabGroup){
- a.__members._array=caboUtil.Coll.uniq(a.__members._array);
- for(var t=0,e=a.__members.length;
- t<e;
- t++){
- net_comcast_sms.Controller.__hack_clean_tabgroups(a.__members[t])
- }}};
- net_comcast_sms.Controller.prototype._getOverview=function(){
- var t=this._handler.app;
- t.getOverviewPanelContent();
- var e=t.getOverview();
- if(!this._overviewHasBeenCleared){
- e.clear();
- this._overviewHasBeenCleared=true
- }
- return e
- };
- net_comcast_sms.Controller.prototype.getListView=function(){
- if(!this._listView){
- var t=this._getOverview();
- var e=this._listView=new net_comcast_sms.ThreadListView({
- parent:t,controller:this}
- );
- e.addSelectionListener(new AjxListener(this,this._handleSelectThread));
- e.set(new AjxVector());
- var a=t.getSize();
- e.setSize(a.x,a.y);
- caboUtil.augment(t,"setSize",function(n,o,s){
- e.setSize(o,s)
- }
- )
- }
- return this._listView
- };
- net_comcast_sms.Controller.prototype.getToolbar=function(){
- if(!this._toolbar){
- var a=Dwt.byId("skin_main_toolbar_container")||Dwt.byId("skin_td_main"),l=this._toolbar=new ZmButtonToolBar({
- parent:this._container,buttons:this.getToolbarOps(),className:"ZmToolBar ImgSkin_Toolbar MessageToolbar",refElementId:a&&a.id}
- );
- for(var n=0;
- n<l.opList.length;
- n++){
- var h=l.opList[n],s=l.getOp(h);
- if(s){
- var d=ZmOperation.getProp(h,"text"),e=ZmOperation.getProp(h,"textKey"),u=ZmOperation.getProp(h,"tooltip"),r=ZmOperation.getProp(h,"tooltipKey"),o=ZmOperation.getProp(h,"action"),t=e&&this.getMsg(e);
- if(AjxUtil.isString(t)){
- s.setText(t)
- }else{
- if(d&&AjxUtil.isString(d)){
- s.setText(d)
- }}
- t=r&&this.getMsg(r);
- if(AjxUtil.isString(t)){
- s.setToolTipContent(t)
- }else{
- if(u&&AjxUtil.isString(u)){
- s.setToolTipContent(u)
- }}
- if(o instanceof AjxListener){
- s.addSelectionListener(o)
- }
- if(s instanceof DwtButton&&h!="SMS_COMPOSEEMOTICON"){
- s.addSelectionListener(this._popdownListener)
- }}}
- l._createPrecedenceList();
- var c=this._newCount=l.getOp(ZmOperation.TEXT);
- c.addClassName("itemCountText");
- l.addListener(DwtEvent.ONMOUSEUP,this._popdownListener);
- l.setSize(Dwt.DEFAULT,Dwt.CLEAR);
- this._showToolbarItems(this.getToolbarOps(),false)
- }
- return this._toolbar
- };
- net_comcast_sms.Controller.prototype.getCurrentToolbar=function(){
- return this.getToolbar()
- };
- net_comcast_sms.Controller.prototype.updateNewMessageCount=function(){
- var t=this.getMessageStore().messages_byStatus;
- var e=AjxUtil.keys(t[net_comcast_sms.Message.STATUS_NEW]).length+AjxUtil.keys(t[net_comcast_sms.Message.STATUS_UNREAD]).length;
- if(this._newCountVal!==e){
- this._newCountVal=e;
- this._newCount.setText(this.getMsg("newMessageCount",e))
- }};
- net_comcast_sms.Controller.prototype.getUserAccount=function(){
- return this._userAccount
- };
- net_comcast_sms.Controller.prototype.setUserAccount=function(e,t){
- this._userAccount=e;
- this.loadThreads(t,false)
- };
- net_comcast_sms.Controller.prototype.getMessageStore=function(){
- return this._userAccount&&this._userAccount.getMessageStore()
- };
- net_comcast_sms.Controller.prototype.loadThreads=function(a,t){
- var e=net_comcast_sms.Provisioning;
- e.getState(new AjxCallback(this,function(o){
- if(this._userAccount&&o==e.STATE_SUBSCRIBED){
- this.getMessageStore().refreshThreadHeaders(new AjxCallback(this,this._handleLoadThreads,[a]))
- }}
- ))
- };
- net_comcast_sms.Controller.prototype._handleLoadThreads=function(s,n){
- if(n instanceof net_comcast_sms.ConnError||n instanceof net_comcast_sms.RestError||n instanceof net_comcast_sms.ModelError){
- this.showLoading(false,"show");
- var a=net_comcast_sms.Provisioning;
- if(n.code=="0040005"&&a.isTextMsgEnabled()&&!a.hasAssignedUser()&&a.isPrimary()&&a.isSNSEnabled()){
- this.showError(this.getMsg("accountNotActiveError"),this.getMsg("accountNotActiveErrorHeader"))
- }else{
- this.showError(this.getMsg("loadFailedBody")+"<br/>"+n.toString(),this.getMsg("loadFailedHead"))
- }
- caboUtil.run(s)
- }else{
- var t=this.getMessageStore();
- var o=this.getMessageStore().getNonDeletedThreads();
- var e=this.getListView();
- if(!this._lastIsCompose()&&!this._showingIframe){
- this.getMainView().getThreadView().setVisible(true)
- }
- e.set(AjxVector.fromArray(AjxUtil.values(o)),ZmItem.F_STATUS);
- t.addListener("threads",new AjxCallback(e,e.reset));
- caboUtil.run(s)
- }};
- net_comcast_sms.Controller.prototype.showLoading=function(e,s){
- var t=appCtxt.getAppViewMgr();
- if(!this.__loading_ids){
- this.__loading_ids={}
- }
- var a=this.__loading_ids;
- var n=caboUtil.Coll.isEmpty(a);
- if(e){
- a[s]=true
- }else{
- if(a[s]){
- delete a[s]
- }}
- var o=caboUtil.Coll.isEmpty(a);
- if(o!=n){
- if(!o){
- this.getMainView().getLoadingView().setVisible(true)
- }else{
- this.getMainView().getLoadingView().setVisible(false)
- }}};
- net_comcast_sms.Controller.prototype.showError=function(t,e){
- this.showLoading(false,"show");
- this.showLoading(false,"load");
- this._showingError=true;
- if(this._mainView){
- this._showToolbarItems(this.getMarketingToolbarOps(),true);
- this._enableToolbarItems(this.getToolbarOps(),false,true);
- this.getMainView().showErrorView(t,e);
- if(this._showingIframe){
- this.showIframe()
- }}};
- net_comcast_sms.Controller.prototype.showStatic=function(e){
- this.showIframe(this._handler.getResource("html/"+e),true)
- };
- net_comcast_sms.Controller.prototype.showIframe=function(t,e){
- this.showLoading(false,"show");
- this.showLoading(false,"load");
- if(this._mainView){
- if(e){
- this._showToolbarItems(this.getToolbarOps(),false)
- }
- this.getMainView().showIframeView(t);
- this._showingIframe=true
- }};
- net_comcast_sms.Controller.prototype._resetToolbarOperations=function(){};
- net_comcast_sms.Controller.prototype.getAutocompleter=function(){
- if(!this._autoCompleter){
- this._autoCompleter=new net_comcast_sms.Autocomplete({
- enabled:{
- name:true,phone:true}
- ,outTextFunc:function(t,e){
- return e.text+"[ "+(ZmContact._AB_FIELD[t]||AjxStringUtil.capitalizeWords(AjxStringUtil.fromMixed(t))||t)+"]"
- }}
- )
- }
- return this._autoCompleter
- };
- net_comcast_sms.Controller.prototype.show=function(a){
- var t=this.getMainView();
- var e=net_comcast_sms.Provisioning;
- this.showLoading(true,"load");
- e.load(new AjxCallback(this,function(n){
- var o,s;
- this._doShow();
- if(n){
- caboUtil.log("Error in GetVoiceInfoExtRequest: ",n.code);
- switch(n.code){
- case"voice.ACCOUNT_NOT_CPNI_COMPLIANT":case"2070":case"ACCOUNT_CPNI_NOT_AVAILABLE":case"voice.ACCOUNT_CPNI_NOT_AVAILABLE":case"2071":this.showIframe(net_comcast_sms.SmsZimlet.NO_CPNI,true);
- break;
- case"voice.UNABLE_TO_RETRIEVE_PROFILE_SUMMARY":this.showError(this.getMsg("provErrorProfile",n.msg),this.getMsg("provErrorHeader"));
- break;
- case"voice.UNABLE_TO_RETRIEVE_VOICEMAIL_SUMMARY":this.showError(this.getMsg("provErrorVoicemail",n.msg),this.getMsg("provErrorHeader"));
- break;
- case"voice.SECONDARY_NOT_ALLOWED":case"2051":this.showIframe(net_comcast_sms.SmsZimlet.SECONDARY_NOTASSIGNED,true);
- break;
- default:this.showError(this.getMsg("provErrorException",n.msg),this.getMsg("provErrorHeader"));
- break
- }}else{
- if(e.isCommercial()){
- caboUtil.log("Account is BCDV");
- this.showIframe(net_comcast_sms.SmsZimlet.BUSINESS,true)
- }else{
- if(!e.isActivated()){
- caboUtil.log("Account is syncing");
- this.showIframe(net_comcast_sms.SmsZimlet.SYNCING,true)
- }else{
- if(e.isTextMsgEnabled()){
- if(e.hasAssignedUser()){
- if(e.isAssignedUser()){
- o=true
- }else{
- if(e.isPrimary()){
- if(e.isSNSEnabled()){
- caboUtil.log("Provisioning case 1");
- this.showIframe(net_comcast_sms.SmsZimlet.PRIMARY_CCENTRAL,true)
- }else{
- caboUtil.log("Provisioning case 2");
- this.showIframe(net_comcast_sms.SmsZimlet.NO_ACCESS,true)
- }}else{
- if(e.isSNSEnabled()){
- caboUtil.log("Provisioning case 3a");
- this.showIframe(net_comcast_sms.SmsZimlet.SECONDARY_NOTASSIGNED,true)
- }else{
- caboUtil.log("Provisioning case 3b");
- this.showIframe(net_comcast_sms.SmsZimlet.SECONDARY,true)
- }}}}else{
- if(e.isPrimary()){
- if(e.isSNSEnabled()){
- caboUtil.log("Provisioning case 4");
- o=s=true
- }else{
- o=true
- }}else{
- if(e.isSNSEnabled()){
- caboUtil.log("Provisioning case 5a");
- this.showIframe(net_comcast_sms.SmsZimlet.SECONDARY_NOTASSIGNED,true)
- }else{
- caboUtil.log("Provisioning case 5b");
- this.showIframe(net_comcast_sms.SmsZimlet.SECONDARY,true)
- }}}}else{
- if(e.isSNSEnabled()){
- if(e.isPrimary()){
- caboUtil.log("Provisioning case 6");
- this.showIframe(net_comcast_sms.SmsZimlet.SNS_ENABLED,true)
- }else{
- caboUtil.log("Provisioning case 7");
- this.showIframe(net_comcast_sms.SmsZimlet.SECONDARY_NOTASSIGNED,true)
- }}else{
- if(e.isPrimary()){
- if(e.isNeitherLimitedOrUnlimited()){
- caboUtil.log("Account is neither limited or unlimited");
- this.showIframe(net_comcast_sms.SmsZimlet.COSTS_NEITHER,true)
- }else{
- o=true
- }}else{
- caboUtil.log("Provisioning case 8");
- this.showIframe(net_comcast_sms.SmsZimlet.SECONDARY,true)
- }}}}}}
- if(o){
- e.getState(new AjxCallback(this,function(c){
- this.showLoading(false,"load");
- switch(c){
- case e.STATE_UNKNOWN:case e.STATE_UNSUBSCRIBED:this._showMarketing();
- caboUtil.run(a);
- break;
- case e.STATE_WAITING_REC_CONTRACT:case e.STATE_WAITING_ORDERADD:var r=net_comcast_sms.Util.getProperty("tn");
- t.getProvisioningView().signup(r);
- break;
- case e.STATE_WAITING_POLL:this._poll(new AjxCallback(this,this.show,[a]));
- break;
- case e.STATE_SUBSCRIBED:this._updateRefreshButton();
- if(this._lastIsCompose()){
- this.showCompose()
- }else{
- if(s){
- this.getMainView().getThreadView().setVisible(false);
- var l=net_comcast_sms.SmsZimlet.SNS_ENABLED;
- this.showIframe(l+(l.indexOf("?")==-1?"?":"&")+"xtmCallback=net_comcast_sms.instance.getController().showThreadList()",true)
- }else{
- this.showThreadList()
- }}
- this._hasInited=true;
- var h=this;
- setTimeout(function(){
- h.showLoading(true,"load");
- h.getHandler().load(new AjxCallback(h,function(){
- this.showLoading(false,"show");
- this.showLoading(false,"load");
- caboUtil.run(a);
- this.getHandler().getNotificationClient().start();
- var m=this.getMessageStore();
- if(m){
- this.testQuota(true,true);
- m.addListener("status",new AjxCallback(this,this.updateNewMessageCount));
- this.updateNewMessageCount()
- }}
- ))
- }
- ,5);
- break;
- case e.STATE_WAITING_UNSUBSCRIBE:var u=new net_comcast_sms.UnsubscribeDialog({
- parent:appCtxt.getShell(),handler:this._handler}
- ,null);
- var d=new AjxCallback(this,function(){
- this.show(a)
- }
- );
- u._unsubscribe(new AjxCallback(this._handler,this._handler.unsubscribe,[new AjxCallback(u,u._finish),new AjxCallback(u,u._fail,[d])]));
- u.popup();
- break
- }}
- ))
- }}
- ))
- };
- net_comcast_sms.Controller.prototype.__continueShow=function(){
- this.show(null,true)
- };
- net_comcast_sms.Controller.prototype._doShow=function(){
- this._setThread(this._thread||null);
- var e=appCtxt.getAppViewMgr();
- if(net_comcast_sms.Util.UI.loadingIsShown()){
- e.stageView(this.getViewId())
- }else{
- e.pushView(this.getViewId())
- }};
- net_comcast_sms.Controller.prototype._showMarketing=function(e){
- this._showingIframe=false;
- this.getMainView().showProvisioningView(e);
- this._showToolbarItems(this.getMarketingToolbarOps(),true);
- this._enableToolbarItems(this.getToolbarOps(),false,true)
- };
- net_comcast_sms.Controller.prototype._poll=function(t){
- this.showIframe(net_comcast_sms.SmsZimlet.PENDING,true);
- var e=this;
- setTimeout(function(){
- net_comcast_sms.Provisioning.load(new AjxCallback(this,function(a){
- caboUtil.run(t)
- }
- ),true)
- }
- ,this._handler.getConfig("pollTime"))
- };
- net_comcast_sms.Controller.prototype.showThreadList=function(e,s,a){
- var t=this;
- this._showingIframe=false;
- if(this._showingError){
- this.showError()
- }else{
- var n=function(){
- var r=t.getMainView();
- if(t._lastIsCompose()){
- t._latestView=net_comcast_sms.Controller.VIEW_THREADS;
- t.unmoveMailComposeToolbar();
- r.getComposeView().endMailComposeView()
- }
- r.showThreadView();
- t._showToolbarItems(t.getThreadToolbarOps(),true);
- t._updateToolbarThreadButtons();
- caboUtil.run(s)
- };
- if(!e&&this._lastIsCompose()){
- var o=this._composeExitDialog;
- if(!o){
- o=this._composeExitDialog=new DwtMessageDialog({
- parent:appCtxt.getShell(),buttons:[DwtDialog.YES_BUTTON,DwtDialog.NO_BUTTON]}
- );
- o._button[DwtDialog.YES_BUTTON].setText(this.getMsg("composeExitNotificationOk"));
- o._button[DwtDialog.NO_BUTTON].setText(this.getMsg("composeExitNotificationCancel"))
- }else{
- o.reset()
- }
- o.setMessage(this.getMsg("composeExitNotification"));
- o.registerCallback(DwtDialog.YES_BUTTON,new AjxCallback(this,function(){
- o.popdown();
- n()
- }
- ));
- o.registerCallback(DwtDialog.NO_BUTTON,new AjxCallback(this,function(){
- o.popdown();
- caboUtil.run(a)
- }
- ));
- o.popup()
- }else{
- n()
- }}};
- net_comcast_sms.Controller.prototype.showCompose=function(){
- this._showingIframe=false;
- if(!this._lastIsCompose()){
- this._latestView=net_comcast_sms.Controller.VIEW_COMPOSE
- }
- this.getMainView().showComposeView();
- this._oldVisibleToolbarItems=this._getVisibleToolbarItems();
- this._oldEnabledToolbarItems=this._getEnabledToolbarItems();
- this._showToolbarItems(this.getComposeToolbarOps(),true);
- this._enableToolbarItems(this.getComposeToolbarOps(),true)
- };
- net_comcast_sms.Controller.prototype.send=function(){
- var e=this._getFirstComposeView();
- if(e){
- this._enableToolbarItems(this.getComposeToolbarOps(),false);
- e.send()
- }};
- net_comcast_sms.Controller.prototype.cancelCompose=function(){
- var e=this._getFirstComposeView();
- if(e){
- e.cancel()
- }
- this.hideCompose()
- };
- net_comcast_sms.Controller.prototype.hideCompose=function(t){
- var e=this;
- return this.showThreadList(true,function(){
- e._showToolbarItems(e._oldVisibleToolbarItems||e.getThreadToolbarOps(),true);
- e._enableToolbarItems(e._oldEnabledToolbarItems||e.getThreadToolbarOps(),true)
- }
- )
- };
- net_comcast_sms.Controller.prototype._getFirstComposeView=function(){
- var e=this.getMainView().getComposeView().getVisibleViews();
- if(e&&e.length){
- return e[0]
- }};
- net_comcast_sms.Controller.prototype.showMailCompose=function(e){
- AjxPackage.require({
- name:"Mail",callback:new AjxCallback(this,function(){
- AjxDispatcher.setLoaded("Mail",true);
- if(e.inNewWindow){
- AjxDispatcher.run("GetComposeController").doAction(e)
- }else{
- this.getMainView().getComposeView().clear();
- this._showToolbarItems(this.getMailComposeToolbarOps(),true);
- if(!e){
- e={
- action:ZmId.OP_NEW_MESSAGE}
- }
- this._latestView=net_comcast_sms.Controller.VIEW_MAILCOMPOSE;
- this.setCanResizeOverview(false);
- var t=this.getMainView().showMailComposeView(e);
- this.setCanResizeOverview(true);
- this.moveMailComposeToolbar(t._controller)
- }}
- )}
- )
- };
- net_comcast_sms.Controller.prototype.moveMailComposeToolbar=function(t){
- if(this._movedToolbarButtons&&this._movedToolbarButtons.length){
- this.unmoveMailComposeToolbar()
- }
- var e=t&&t._toolbar;
- var s=this._toolbar;
- var o=this._movedToolbarButtons=[];
- var a=e&&e._buttons;
- if(a){
- for(var n in a){
- o.push(a[n])
- }
- this.moveToolbarButtons(e,s,o);
- e.getButton=function(r){
- return s.getButton(r)
- }
- }};
- net_comcast_sms.Controller.prototype.unmoveMailComposeToolbar=function(){
- this.moveToolbarButtons(this._toolbar,null,this._movedToolbarButtons);
- this._movedToolbarButtons=null
- };
- net_comcast_sms.Controller.prototype.moveToolbarButtons=function(e,s,o){
- if(o&&o.length){
- for(var a=0;
- a<o.length;
- a++){
- var t=o[a];
- var n=t.getData("_buttonId");
- if(!t.textPrecedence){
- t.textPrecedence=a
- }
- if(s){
- t.reparent(s,a);
- s._buttons[n]=t
- }else{
- if(e){
- e.removeChild(t)
- }}
- if(e){
- delete e._buttons[n]
- }}
- if(s){
- s._createPrecedenceList()
- }}};
- net_comcast_sms.Controller.prototype._lastIsCompose=function(){
- return(this._lastIsTextCompose()||this._lastIsMailCompose())
- };
- net_comcast_sms.Controller.prototype._lastIsTextCompose=function(){
- return(this._latestView==net_comcast_sms.Controller.VIEW_COMPOSE)
- };
- net_comcast_sms.Controller.prototype._lastIsMailCompose=function(){
- return(this._latestView==net_comcast_sms.Controller.VIEW_MAILCOMPOSE)
- };
- net_comcast_sms.Controller.prototype._postShowCallback=function(){
- if(this._canResizeOverview){
- this._priorWidth=this._handler.getOverviewWidth();
- this._handler.setOverviewWidth(this._overviewWidth||net_comcast_sms.ThreadListView.DEFAULT_SIZE)
- }
- return true
- };
- net_comcast_sms.Controller.prototype._preHideCallback=function(){
- if(this._canResizeOverview&&this._listView){
- this._overviewWidth=this._listView.getSize().x;
- this._handler.setOverviewWidth(this._priorWidth)
- }
- this.popdownChoosers();
- return true
- };
- net_comcast_sms.Controller.prototype.popdownChoosers=function(){
- net_comcast_sms.EmoticonChooser.popdown()
- };
- net_comcast_sms.Controller.prototype._saveUnsentMessage=function(){
- this.setUnsentMessages(this.getMainView().getComposeView().getUnsentMessages())
- };
- net_comcast_sms.Controller.prototype._loadUnsentMessages=function(e){
- this.getMainView().getComposeView().setUnsentMessages(e)
- };
- net_comcast_sms.Controller.prototype.isEntitled=function(){
- return this._handler.isEntitled()
- };
- net_comcast_sms.Controller.prototype.loadVoiceData=function(e){
- this._handler.loadVoiceData(e)
- };
- net_comcast_sms.Controller.prototype.getAvailableTNs=function(e){
- this._handler.getAvailableTNs(e)
- };
- net_comcast_sms.Controller.prototype.signup=function(e,t){
- this._handler.signup(true,e,new AjxCallback(this,this._handleSignup,[t]),new AjxCallback(this,this._handleSignupError,[t]))
- };
- net_comcast_sms.Controller.prototype._handleSignup=function(e){
- this.showLoading(false,"signup");
- this._poll(new AjxCallback(this,function(){
- caboUtil.run(e,true);
- this._handler._registerPrefs();
- this.show()
- }
- ))
- };
- net_comcast_sms.Controller.prototype._handleSignupError=function(a,t,e){
- caboUtil.run(a,false,t,e);
- this.showError(t,e)
- };
- net_comcast_sms.Controller.prototype.getViewId=function(){
- return"net_comcast_sms_VIEW"
- };
- net_comcast_sms.Controller.prototype._getThreadViewType=function(){
- return this.toString()+"_thread"
- };
- net_comcast_sms.Controller.prototype._getComposeViewType=function(){
- return this.toString()+"_compose"
- };
- net_comcast_sms.Controller.prototype.handleKeyAction=function(e){
- if(e==ZmKeyMap.CANCEL){
- this.popdownChoosers()
- }
- return ZmController.prototype.handleKeyAction.call(this,e)
- };
- net_comcast_sms.Controller.prototype._registerOperations=function(){
- ZmOperation.registerOp("SMS_NEW",{
- text:this.getMsg("actionNew"),tooltip:this.getMsg("actionNewTooltip"),action:new AjxListener(this,this.compose),textPrecedence:11}
- );
- ZmOperation.registerOp("SMS_FORWARD",{
- text:this.getMsg("actionForward"),tooltip:this.getMsg("actionForwardTooltip"),action:new AjxListener(this,this.forward),textPrecedence:10,style:DwtButton.TOGGLE_STYLE}
- );
- ZmOperation.registerOp("SMS_EDIT",{
- text:this.getMsg("actionEdit"),tooltip:this.getMsg("actionEditTooltip"),action:new AjxListener(this,this.edit),textPrecedence:9,style:DwtButton.TOGGLE_STYLE}
- );
- ZmOperation.registerOp("SMS_REFRESH",{
- text:this.getMsg("actionRefresh"),tooltip:this.getMsg("actionRefreshTooltip"),action:new AjxListener(this,this.refresh),textPrecedence:8}
- );
- ZmOperation.registerOp("SMS_SEND",{
- text:this.getMsg("actionSend"),tooltip:this.getMsg("actionSendTooltip"),action:new AjxListener(this,this.send),textPrecedence:7}
- );
- ZmOperation.registerOp("SMS_COMPOSECANCEL",{
- text:this.getMsg("actionCancel"),tooltip:this.getMsg("actionCancelTooltip"),action:new AjxListener(this,this.cancelCompose),textPrecedence:6}
- );
- ZmOperation.registerOp("SMS_COMPOSEEMOTICON",{
- image:"HappyEmoticon",textPrecedence:5}
- )
- };
- net_comcast_sms.Controller.prototype.getToolbarOps=function(){
- var e=[ZmOperation.SMS_NEW,ZmOperation.SMS_FORWARD,ZmOperation.SMS_EDIT,ZmOperation.SMS_SEND,ZmOperation.SMS_COMPOSECANCEL,ZmOperation.SMS_COMPOSEEMOTICON,ZmOperation.FILLER,ZmOperation.SMS_REFRESH,ZmOperation.TEXT];
- return e
- };
- net_comcast_sms.Controller.prototype.getStartToolbarOps=net_comcast_sms.Controller.prototype.getMarketingToolbarOps=net_comcast_sms.Controller.prototype.getThreadToolbarOps=function(){
- return[ZmOperation.SMS_NEW,ZmOperation.SMS_FORWARD,ZmOperation.SMS_EDIT,ZmOperation.FILLER,ZmOperation.SMS_REFRESH,ZmOperation.TEXT]
- };
- net_comcast_sms.Controller.prototype.getComposeToolbarOps=function(){
- return[ZmOperation.SMS_SEND,ZmOperation.SMS_COMPOSECANCEL,ZmOperation.SMS_COMPOSEEMOTICON,ZmOperation.FILLER,ZmOperation.SMS_REFRESH,ZmOperation.TEXT]
- };
- net_comcast_sms.Controller.prototype.getMailComposeToolbarOps=function(){
- return[]
- };
- net_comcast_sms.Controller.prototype.setThread=function(e){
- this._listView.setSelection(e)
- };
- net_comcast_sms.Controller.prototype._handleSelectThread=function(t){
- var e=t.item;
- if(e=="more"){
- this.getMessageStore().moreThreadHeaders()
- }else{
- this._setThread(e)
- }};
- net_comcast_sms.Controller.prototype._setThread=function(e){
- if(e){
- var t=this.getMainView().getThreadView();
- this.showThreadList(false,new AjxCallback(this,function(){
- this._mainView.getThreadView().getReplyView().setVisible(true);
- if(this._thread==e){
- t.getThreadView().reset()
- }else{
- if(this._thread){
- this._thread.removeListener("newmessages",this._refreshListener);
- this._clearStatus();
- this.popdownChoosers()
- }
- t.set(e);
- e.addListener("newmessages",this._refreshListener)
- }
- this._thread=e;
- this._updateRefreshButton();
- this._showToolbarItems(this.getThreadToolbarOps(),true);
- this._updateToolbarThreadButtons()
- }
- ))
- }else{
- this._showToolbarItems(this.getThreadToolbarOps(),true);
- this._updateToolbarThreadButtons();
- this._mainView.getThreadView().getReplyView().setVisible(false)
- }};
- net_comcast_sms.Controller.prototype.getThread=function(){
- return this._thread
- };
- net_comcast_sms.Controller.prototype.refresh=function(){
- var t=this.getMessageStore();
- var e=t.getNewestThread();
- var a=e&&e.getNewest().time||1;
- t.getMessagesSince(a,new AjxCallback(this,this._handleRefresh))
- };
- net_comcast_sms.Controller.prototype._handleRefresh=function(e){
- this._lastPoll=new Date().getTime();
- this._updateRefreshButton()
- };
- net_comcast_sms.Controller.prototype._updateRefreshButton=function(){
- var a=new Date().getTime()-this._lastPoll;
- var t=a>60000;
- var e=this._toolbar.getButton(ZmOperation.SMS_REFRESH);
- e.setEnabled(t);
- if(!t){
- window.setTimeout(AjxCallback.simpleClosure(this._updateRefreshButton,this),(60000-a+1))
- }};
- net_comcast_sms.Controller.prototype.testQuota=function(e,a,t){
- if(e||a){
- this.getInfo(new AjxCallback(this,this._handleTestQuota,[e,a,t]))
- }else{
- caboUtil.run(t)
- }};
- net_comcast_sms.Controller.prototype._handleTestQuota=function(t,n,o,e){
- if(e&&!this._hasWarnedQuota){
- var a=[];
- if(t){
- if(e.smstotal>=e.smsmax){
- a.push(this.getMsg("quotaInReached"))
- }else{
- if(!this._hasWarnedInbox&&((e.smstotal/e.smsmax)>=net_comcast_sms.Controller.INCOMING_QUOTA_WARN_LIMIT)){
- a.push(this.getMsg("quotaInNear"));
- this._hasWarnedInbox=true
- }}}
- if(n){
- if(e.smsquota>=e.smsquotamax){
- a.push(this.getMsg("quotaOutReached"))
- }else{
- if(!this._hasWarnedOutbox&&((e.smsquota/e.smsquotamax)>=net_comcast_sms.Controller.OUTGOING_QUOTA_WARN_LIMIT)){
- a.push(this.getMsg("quotaOutNear"));
- this._hasWarnedOutbox=true
- }}}
- if(a.length){
- net_comcast_sms.Util.UI.dialog(a.join("<br/>"),this.getMsg("quotaDialogTitle"));
- this._hasWarnedQuota=true
- }}
- caboUtil.run(o)
- };
- net_comcast_sms.Controller.prototype.getInfo=function(e){
- this.getMessageStore().getMessageCounts(new AjxCallback(this,this._handleGetInfo,[e]))
- };
- net_comcast_sms.Controller.prototype._handleGetInfo=function(t,e){
- caboUtil.run(t,e)
- };
- net_comcast_sms.Controller.prototype._enableToolbarItems=function(t,a,o){
- a=a!==false;
- var e=[ZmOperation.FILLER,ZmOperation.SMS_REFRESH,ZmOperation.TEXT];
- var n=AjxUtil.complement(t,this._toolbar.opList);
- this._toolbar.enable(o?this._toolbar.opList:AjxUtil.complement(e,this._toolbar.opList),a);
- this._toolbar.enable(o?n:AjxUtil.complement(e,n),!a)
- };
- net_comcast_sms.Controller.prototype._getEnabledToolbarItems=function(t){
- t=t!==false;
- var e=[];
- var n=this._toolbar.opList;
- for(var o=0,a=n.length;
- o<a;
- o++){
- var s=this._toolbar.getButton(n[o]);
- if(s&&s.getEnabled()==t){
- e.push(n[o])
- }}
- return e
- };
- net_comcast_sms.Controller.prototype._getVisibleToolbarItems=function(n){
- n=n!==false;
- var e=[];
- var o=this._toolbar.opList;
- for(var a=0,t=o.length;
- a<t;
- a++){
- var s=this._toolbar.getButton(o[a]);
- if(s&&s.getVisible()==n){
- e.push(o[a])
- }}
- return e
- };
- net_comcast_sms.Controller.prototype._showToolbarItems=function(t,n){
- n=n!==false;
- var e=AjxUtil.arrayAsHash(t);
- for(var o=0;
- o<this._toolbar.opList.length;
- o++){
- var s=this._toolbar.opList[o];
- var a=this._toolbar.getButton(s);
- if(a){
- a.setVisible(e[s]==n)
- }}};
- net_comcast_sms.Controller.prototype.compose=function(){
- this.showCompose();
- var t=this.getMainView().getComposeView();
- t.reset();
- var e=t.add();
- this._updateSendButton(false);
- e.addUpdateSendListener(new AjxCallback(this,this._updateSendButton));
- return e
- };
- net_comcast_sms.Controller.prototype.forward=function(){
- this.setForwarding(!this._forwarding)
- };
- net_comcast_sms.Controller.prototype.setForwarding=function(e){
- this._forwarding=e;
- this.getMainView().getThreadView().setForwarding(e);
- this.getMainView().showThreadView();
- this._updateToolbarThreadButtons()
- };
- net_comcast_sms.Controller.prototype.edit=function(){
- this.setEditing(!this._editing)
- };
- net_comcast_sms.Controller.prototype.setEditing=function(t){
- this._editing=t;
- this.getMainView().getThreadView().setEditing(t);
- this.getListView().setEditing(t);
- this._updateToolbarThreadButtons();
- if(!t){
- var e=this._thread;
- if(e){
- for(var n=0,o=e.size();
- n<o;
- n++){
- var s=e.getByIndex(n);
- var a=s.getEditStatus();
- if(a){
- s.setStatus(a)
- }}}}};
- net_comcast_sms.Controller.prototype._updateToolbarThreadButtons=function(){
- var s=this.getToolbar(),n=!!this.getThread(),o=[],t=this._editing,e=this._forwarding;
- if(!t&&!e){
- o.push(ZmOperation.SMS_NEW)
- }
- if(!e&&n){
- o.push(ZmOperation.SMS_EDIT)
- }
- if(!t&&n){
- o.push(ZmOperation.SMS_FORWARD)
- }
- this._enableToolbarItems(o,true);
- var r=s.getOp(ZmOperation.SMS_EDIT);
- r.setText(this.getMsg(t?"actionEditEnd":"actionEdit"));
- r.setToolTipContent(this.getMsg(t?"actionEditEndTooltip":"actionEditTooltip"));
- var a=s.getOp(ZmOperation.SMS_FORWARD);
- a.setText(this.getMsg(e?"actionForwardEnd":"actionForward"));
- a.setToolTipContent(this.getMsg(e?"actionForwardEndTooltip":"actionForwardTooltip"))
- };
- net_comcast_sms.Controller.prototype._updateSendButton=function(t,e,a){
- this.getToolbar().enable(ZmOperation.SMS_SEND,t||(e&&a))
- };
- net_comcast_sms.Controller.prototype._clearStatus=function(){
- this._forwarding=true;
- this.forward();
- this._editing=true;
- this.edit()
- };
- net_comcast_sms.Controller.prototype.doForwardAsText=function(o){
- var h=this._forwarding=!this._forwarding;
- this.getMainView().getThreadView().setForwarding(h);
- this._updateToolbarThreadButtons();
- var s=[];
- for(var n=0,t=o.length;
- n<t;
- n++){
- var e=o[n];
- s[n]=e.mid
- }
- var r=function(){
- var u="<br/>";
- var c=[];
- for(var f=0,m=o.length;
- f<m;
- f++){
- var p=o[f];
- var g;
- c[f]=p.body+u+p.getAnnotation()
- }
- var d=this.compose();
- d.setContent(c.join(u+u))
- };
- var l=new caboUtil.MultiCallback(s,null,new AjxCallback(this,r));
- for(var n=0,t=o.length;
- n<t;
- n++){
- var e=o[n];
- var a=l.getCallback(e.mid);
- if(e.dir==net_comcast_sms.Message.DIR_INCOMING){
- e.getContact(a)
- }else{
- caboUtil.run(a)
- }}};
- net_comcast_sms.Controller.prototype.doForwardAsEmail=function(o){
- var t=this._forwarding=!this._forwarding;
- this.getMainView().getThreadView().setForwarding(t);
- this._updateToolbarThreadButtons();
- var a=(appCtxt.get(ZmSetting.COMPOSE_AS_FORMAT)==ZmSetting.COMPOSE_HTML);
- var e=(o&&o.length)?this._getForwardBody(o).join(a?"<br/>":"\n"):"";
- var n={
- action:ZmId.OP_NEW_MESSAGE,extraBodyText:e,inNewWindow:appCtxt.get(ZmSetting.NEW_WINDOW_COMPOSE)};
- this.showMailCompose(n);
- this._handler.app.pushView(this.getViewId())
- };
- net_comcast_sms.Controller.prototype._getForwardBody=function(h){
- if(h&&h.length){
- var t=[];
- for(var n=0,o=h.length;
- n<o;
- n++){
- var r=h[n];
- var a,s,e;
- s=r.body;
- e=r.getAnnotation();
- t.push(s,e,"\n")
- }
- return t
- }};
- net_comcast_sms.Controller.prototype.composeToContact=function(e){
- var t=this;
- this._latestView=net_comcast_sms.Controller.VIEW_COMPOSE;
- this.show(function(){
- var a=t.getMainView().getComposeView();
- a.clear();
- a.add().addRecipient(e)
- }
- )
- };
- net_comcast_sms.Controller.prototype.setCanResizeOverview=function(e){
- this._canResizeOverview=e
- };
- AjxDispatcher.addPackageLoadFunction("Mail",new AjxCallback(function(){
- net_comcast_sms.ComposeController=function(t,a){
- if(!arguments.length){
- return
- }
- this._handler=a;
- var o=net_comcast_sms.Util.getObjectProxy(appCtxt.getApp(ZmApp.MAIL));
- this._parentView=t;
- var e=this._view=new DwtComposite({
- parent:t,posStyle:Dwt.ABSOLUTE_STYLE}
- );
- this.viewId="net_comcast_sms_MAIL_"+Dwt.getNextId();
- ZmComposeController.call(this,e,o)
- };
- net_comcast_sms.ComposeController.prototype=net_comcast_sms.Util.getObjectProxy(ZmComposeController.prototype);
- net_comcast_sms.ComposeController.prototype.constructor=net_comcast_sms.ComposeController;
- net_comcast_sms.ComposeController.prototype.toString=function(){
- return"net_comcast_sms.ComposeController"
- };
- net_comcast_sms.ComposeController.prototype.getView=function(){
- return this._view
- };
- net_comcast_sms.ComposeController.prototype.getMsg=function(){
- return this._handler.getMsg.apply(this._handler,arguments)
- };
- net_comcast_sms.ComposeController.prototype.initComposeView=function(s,t){
- if(this._composeView){
- return
- }
- this.sessionId="_sms_"+Dwt.getNextId();
- var e=this._container;
- var a=this._composeView=new ZmComposeView(e,this,t);
- this._initializeToolBar();
- var n=this._toolbar;
- n.setVisible(false);
- if(this._newButton){
- this._newButton.setVisible(false)
- }
- this._view.setSize=function(c,d){
- DwtComposite.prototype.setSize.call(this,c,d);
- a.setSize(c,d-n.getSize().y)
- };
- a.setLocation(0,n.getSize().y);
- var l=this._view.getSize();
- this._view.setSize(l.x,l.y);
- if(this._composeView.identitySelect){
- this._composeView.identitySelect.addChangeListener(new AjxListener(this,this._identityChangeListener,[true]))
- }
- var h=this._parentView;
- var o=this._view;
- var r=this;
- this._app.popView=function(d,c){
- h._controller.showThreadList(d);
- return false
- }
- };
- net_comcast_sms.ComposeController.prototype._cancelCompose=function(){
- var t=this._composeView.isDirty();
- var e=t||(this._draftType==ZmComposeController.DRAFT_TYPE_AUTO);
- if(!e){
- this._composeView.reset(true)
- }else{
- this._composeView.enableInputs(false)
- }
- this._composeView.reEnableDesignMode();
- this._app.popView(!e)
- };
- net_comcast_sms.ComposeController.prototype._setComposeTabGroup=function(){
- ZmComposeController.prototype._setComposeTabGroup.apply(this,arguments);
- var t=this._tabGroup;
- var e=t.__parent;
- if(!e.contains(t)){
- e.addMember(t)
- }};
- net_comcast_sms.ComposeController.prototype._getOptionsMenu=function(e){
- return this._toolbar.getButton(ZmOperation.COMPOSE_OPTIONS).getMenu()||this._optionsMenu[e]
- };
- net_comcast_sms.ComposeController.prototype._getSignatureButton=function(){
- var e=this._getOptionsMenu(ZmOperation.ADD_SIGNATURE);
- return e&&e.getItemById(ZmPopupMenu.MENU_ITEM_ID_KEY,ZmOperation.ADD_SIGNATURE)
- };
- net_comcast_sms.ComposeController.prototype._switchInclude=function(o){
- var t=this._curIncOptions.what;
- var e=this._optionsMenu[this._action];
- if(o==ZmOperation.USE_PREFIX||o==ZmOperation.INCLUDE_HEADERS){
- var n=e.getOp(o);
- if(n){
- if(o==ZmOperation.USE_PREFIX){
- this._curIncOptions.prefix=n.getChecked()
- }else{
- this._curIncOptions.headers=n.getChecked()
- }}}else{
- if(ZmComposeController.INC_MAP[o]){
- this._curIncOptions.what=ZmComposeController.INC_MAP[o]
- }}
- var h=(t==ZmSetting.INC_BODY||t==ZmSetting.INC_SMART);
- var a=this._composeView;
- var s="";
- if(o!=ZmOperation.FORMAT_HTML&&o!=ZmOperation.FORMAT_TEXT){
- if(a._preface||!h){
- var c=this._getBodyContent();
- if(a._preface){
- var l=c.indexOf(a._preface);
- if(l>0){
- s=c.substr(0,l)
- }}else{
- s=c
- }}
- if(a._composeMode==DwtHtmlEditor.TEXT){
- AjxTimedAction.scheduleAction(new AjxTimedAction(this,function(){
- a.getHtmlEditor().moveCaretToTop()
- }
- ),200)
- }}else{
- if(!this._msg){
- s=this._getBodyContent()
- }}
- var r=this._curIncOptions.what;
- if(this._action==ZmOperation.FORWARD_INLINE&&r==ZmSetting.INC_ATTACH){
- this._action=ZmOperation.FORWARD_ATT
- }
- if(this._action==ZmOperation.FORWARD_ATT&&r!=ZmSetting.INC_ATTACH){
- this._action=ZmOperation.FORWARD_INLINE
- }
- a.resetBody(this._action,this._msg,s)
- }
- }
- ));
- caboUtil.onload("caboUtil.Preferences",function(){
- net_comcast_sms.PrefController=function(o,e,t,n,s,a){
- if(!arguments.length){
- return
- }
- caboUtil.Preferences.Controller.call(this,o,a._container,t,n,s,a)
- };
- net_comcast_sms.PrefController.prototype=new caboUtil.Preferences.Controller;
- net_comcast_sms.PrefController.prototype.constructor=net_comcast_sms.PrefController;
- net_comcast_sms.PrefController.prototype.toString=function(){
- return"net_comcast_sms.PrefController"
- };
- net_comcast_sms.PrefController.prototype.__getPrefsView=function(){
- return new net_comcast_sms.PrefsView(this._basePrefsView,this._section,this)
- };
- net_comcast_sms.PrefController.prototype.savePref=function(a,t){
- var e=caboUtil.MultiCallback.simple(2,null,a,true);
- caboUtil.Preferences.Controller.prototype.savePref.call(this,e.getCallback(0),t);
- this._handler.saveSettings(e.getCallback(1))
- }
- }
- );
- net_comcast_sms.MainView=function(e){
- if(!arguments.length){
- return
- }
- this._controller=e.controller;
- DwtComposite.call(this,{
- parent:e.parent,className:"DwtComposite",posStyle:Dwt.ABSOLUTE_STYLE,noMaximize:false,controller:e.controller}
- );
- this._threadViewList=new net_comcast_sms.ThreadViewList({
- parent:this,controller:this._controller}
- );
- this._composeViewList=new net_comcast_sms.ComposeViewList({
- parent:this,controller:this._controller}
- );
- this._provisioningView=new net_comcast_sms.ProvisioningView({
- parent:this,controller:this._controller}
- );
- this._errorView=new net_comcast_sms.ErrorView({
- parent:this,controller:this._controller}
- );
- this._iframeView=new DwtIframe({
- parent:this,html:"",className:"SmsIframe"}
- );
- this._loadingView=this.getLoadingView();
- this._hideViews()
- };
- net_comcast_sms.MainView.prototype=new DwtComposite;
- net_comcast_sms.MainView.prototype.constructor=net_comcast_sms.MainView;
- net_comcast_sms.MainView.prototype.getTitle=function(){
- return ZmMsg.zimbraTitle+": "+this._controller.getMsg("xtmTitle")
- };
- net_comcast_sms.MainView.prototype.getThreadView=function(){
- return this._threadViewList
- };
- net_comcast_sms.MainView.prototype.getComposeView=function(){
- return this._composeViewList
- };
- net_comcast_sms.MainView.prototype.getMailComposeController=function(){
- return this._composeListView._mailController
- };
- net_comcast_sms.MainView.prototype.getController=function(){
- return this._controller
- };
- net_comcast_sms.MainView.prototype.getProvisioningView=function(){
- return this._provisioningView
- };
- net_comcast_sms.MainView.prototype._hideViews=function(){
- this._provisioningView.setVisible(false);
- this._composeViewList.setVisible(false);
- this._threadViewList.setVisible(false);
- this._errorView.setVisible(false);
- this._iframeView.setVisible(false)
- };
- net_comcast_sms.MainView.prototype.showIframeView=function(e){
- this._hideViews();
- if(e){
- this._iframeView.setSrc(e)
- }
- this._iframeView.setVisible(true)
- };
- net_comcast_sms.MainView.prototype.showThreadView=function(){
- this._hideViews();
- this._threadViewList.setVisible(true)
- };
- net_comcast_sms.MainView.prototype.showComposeView=function(){
- this._hideViews();
- this._composeViewList.setVisible(true)
- };
- net_comcast_sms.MainView.prototype.showErrorView=function(t,e){
- this._hideViews();
- this._errorView.setVisible(true);
- if(t){
- this._errorView.setMsg(t)
- }
- if(e){
- this._errorView.setTitle(e)
- }};
- net_comcast_sms.MainView.prototype.showProvisioningView=function(e){
- this._hideViews();
- this._provisioningView.setVisible(true);
- if(e){
- this._provisioningView.setLoadedCallback(e)
- }};
- net_comcast_sms.MainView.prototype.showMailComposeView=function(t){
- this._hideViews();
- this._composeViewList.setVisible(true);
- this._composeViewList.clear();
- var e=this._composeViewList.addMail(t);
- return e
- };
- net_comcast_sms.MainView.prototype.setSize=function(e,t){
- this._threadViewList.setSize(e,t);
- this._composeViewList.setSize(e,t);
- this._provisioningView.setSize(e,t);
- this._loadingView.setSize(e,t);
- DwtComposite.prototype.setSize.call(this,e,t)
- };
- net_comcast_sms.MainView.prototype.getTabGroupMember=function(){
- if(!this._tabGroup){
- this._tabGroup=new DwtTabGroup(this.toString());
- this._tabGroup.addMember(this._composeViewList.getTabGroupMember());
- this._tabGroup.toString=function(){
- return"SMS Mainview"
- }
- }
- return this._tabGroup
- };
- net_comcast_sms.MainView.prototype.showCustomView=function(e){};
- net_comcast_sms.MainView.prototype.getLoadingView=function(){
- if(!this._loadingView){
- this._loadingView=new DwtControl({
- parent:this,className:"DwtListView",posStyle:Dwt.ABSOLUTE_STYLE}
- );
- this._loadingView.setSize("100%","100%");
- var e=this._loadingView.getHtmlElement();
- e.innerHTML=AjxTemplate.expand("share.App#Loading",this._htmlElId);
- e.style.top="0px";
- e.style.zIndex="300"
- }
- return this._loadingView
- };
- net_comcast_sms.ThreadListView=function(e){
- if(!arguments.length){
- return
- }
- this._controller=e.controller;
- ZmListView.call(this,{
- view:"net_comcast_sms_THREADLIST",parent:e.parent,className:"ThreadListView DwtListView",posStyle:Dwt.STATIC_STYLE,headerList:this._getHeaderList(),noMaximize:false,controller:e.controller}
- );
- this._statusCallbacks={};
- this._messageCallbacks={}
- };
- net_comcast_sms.ThreadListView.prototype=new ZmListView;
- net_comcast_sms.ThreadListView.prototype.constructor=net_comcast_sms.ThreadListView;
- net_comcast_sms.ThreadListView.prototype.toString=function(){
- return"net_comcast_sms.ThreadListView"
- };
- net_comcast_sms.ThreadListView.DEFAULT_SIZE=300;
- net_comcast_sms.ThreadListView.prototype.set=function(n,a){
- if(this._list){
- for(var r=0,s=this._list.size();
- r<s;
- r++){
- var h=this._list.get(r);
- if(h!="more"){
- var t=this._messageCallbacks[h.getID()];
- if(t){
- h.removeListener("messages",t);
- h.removeListener("status",t)
- }}}}
- for(var r=0,s=n.size();
- r<s;
- r++){
- var h=n.get(r),t=this._messageCallbacks[h.getID()]=new AjxCallback(this,this._updateThread,[h]);
- h.addListener("messages",t);
- h.addListener("status",t)
- }
- if(n){
- n=AjxVector.fromArray(this._controller.getMessageStore().getNonDeletedThreads(n))
- }
- var o=this._controller.getMessageStore();
- if(o&&o.hasMoreThreads()){
- n.add("more")
- }
- a=a||(this._headerIdHash&&this._headerIdHash[this._currentColId]&&this._headerIdHash[this._currentColId]._field)||ZmItem.F_STATUS;
- if(a){
- this._sortItems(n,a,this._bSortAsc)
- }
- var e=this._parentEl.scrollTop;
- ZmListView.prototype.set.call(this,n,a);
- this._focus();
- this._parentEl.scrollTop=e
- };
- net_comcast_sms.ThreadListView.prototype.reset=function(){
- var t=this._controller.getMessageStore().getThreads(),e=AjxVector.fromArray(AjxUtil.values(t));
- this.set(e)
- };
- net_comcast_sms.ThreadListView.prototype._getHeaderList=function(e){
- var t=[];
- t.push(new DwtListHeaderItem({
- field:ZmItem.F_STATUS,icon:"ThreadStatus",width:40,resizeable:false,sortable:true,align:"center",noSortArrow:true}
- ));
- t.push(new DwtListHeaderItem({
- field:ZmItem.F_FROM,text:ZmMsg.sender,resizeable:false,sortable:true,noRemove:true}
- ));
- t.push(new DwtListHeaderItem({
- field:ZmItem.F_DATE,text:ZmMsg.date,width:60,resizeable:true,sortable:true}
- ));
- return t
- };
- net_comcast_sms.ThreadListView.prototype._getCellId=function(e,t){
- return"sms_list_"+((e instanceof net_comcast_sms.Thread)?e.getTN():"more")+"_"+t
- };
- net_comcast_sms.ThreadListView.prototype._getItemId=function(e,t){
- return DwtId.getListViewItemId(DwtId.WIDGET_ITEM,this._view,(e instanceof net_comcast_sms.Thread)?e.getTN():"more")
- };
- net_comcast_sms.ThreadListView.prototype._getCellContents=function(h,r,l,s,n,o){
- var a;
- if(l instanceof net_comcast_sms.Thread){
- var e=this._getFieldId(l,s),t=this._getCellId(l,s);
- switch(s){
- case ZmItem.F_STATUS:a=this.getStatusCellContents(t,l);
- break;
- case ZmItem.F_FROM:a=this.getBodyCellContents(t,l);
- break;
- case ZmItem.F_DATE:a=this.getDateCellContents(t,l);
- break
- }}else{
- if(l=="more"){
- a="<div class='MoreThreadsCell'>"+this._controller.getMsg("actionMore")+"</div>"
- }}
- if(a){
- h[r++]=a
- }
- return r
- };
- net_comcast_sms.ThreadListView.prototype._getCell=function(m,u,p,c,o,a){
- if(p=="more"){
- if(!o){
- var t=this._getCellId(p,c,a),d=t?[" id=","'",t,"'"].join(""):"",r=(" width='100%'"),h=this._getCellClass(p,c,a),n=h?[" class=",h].join(""):"",f=this._getCellAlign(o,a),l=f?[" align=",f].join(""):"",e=(this._getCellAttrText(p,c,a))||"",s=[d,r,n,l,e].join(" ");
- m[u++]="<td";
- m[u++]=s?(" "+s):"";
- m[u++]=">";
- u=this._getCellContents(m,u,p,c,o,a);
- m[u++]="</td>"
- }
- return u
- }else{
- return ZmListView.prototype._getCell.apply(this,arguments)
- }};
- net_comcast_sms.ThreadListView.prototype._getDivClass=function(a,t,o){
- var e=DwtListView.prototype._getDivClass.apply(this,arguments);
- return t=="more"?e+" MoreThreadsRow":e
- };
- net_comcast_sms.ThreadListView.prototype._resetList=function(){
- ZmListView.prototype._resetList.call(this);
- this._statusCallbacks={}
- };
- net_comcast_sms.ThreadListView.prototype.getMinSize=function(){
- return 200
- };
- net_comcast_sms.ThreadListView.prototype._sortColumn=function(e,t){
- if(this._list){
- if(this._sortItems(this._list,e._field,t)){
- this._renderList(this._list)
- }}
- this._controller.popdownChoosers()
- };
- net_comcast_sms.ThreadListView.prototype._sortThreads=function(t,e,a){
- if(e){
- t.sort(e);
- if(!a){
- t.reverse()
- }}};
- net_comcast_sms.ThreadListView.prototype._sortItems=function(t,a,o){
- var n=t.remove("more");
- var e=net_comcast_sms.ThreadListView.COMPARATOR[a];
- this._sortThreads(t,e,o);
- if(n){
- t.add("more")
- }
- return !!e
- };
- net_comcast_sms.ThreadListView.prototype._getNoResultsMessage=function(){
- return this._controller.getMsg("threadNone")
- };
- net_comcast_sms.ThreadListView.prototype.getStatusCellContents=function(t,e){
- var a=new AjxCallback(this,this._updateStatusCell,[t,e]);
- if(e.isLoaded()){
- contents=a.run()
- }else{
- contents=a.run(true);
- e.refresh(a)
- }
- if(!this._statusCallbacks[t]){
- this._statusCallbacks[t]=a;
- e.addListener("status",a)
- }
- return contents
- };
- net_comcast_sms.ThreadListView.prototype.redrawItem=function(e){
- DwtListView.prototype.redrawItem.apply(this,arguments)
- };
- net_comcast_sms.ThreadListView.prototype._updateStatusCell=function(n,t,s){
- if(n&&t){
- var a=t.getUnreadMessageCount(),e=Dwt.byId(n),o=["<div class='",(a?"MessageUnreadBalloon":"MessageReadBalloon"),"'>",(s!==true&&a||""),"</div>"].join("");
- if(e){
- Dwt.setInnerHtml(e,o)
- }
- return o
- }};
- net_comcast_sms.ThreadListView.prototype.getBodyCellContents=function(a,t){
- if(t instanceof net_comcast_sms.Thread){
- var e=t.getContact(new AjxCallback(this,this._updateBodyCell,[a,t]));
- return this._updateBodyCell(a,t,e)
- }};
- net_comcast_sms.ThreadListView.prototype._updateBodyCell=function(n,a,t){
- var s=a.getNewestNonDeleted();
- if(s){
- var o=t.name||null;
- tn=net_comcast_sms.Util.TN.pretty(t.tn),field=t.field,contents=["<div class='MessageSender'>",o?(o+"<br/>"):"",tn,field?(" ("+ZmMsg["AB_FIELD_"+field]+")"):"","</div>","<div class='MessageBody'>",AjxStringUtil.clipByLength(s.getBody(),30),"</div>"].join("");
- if(n){
- var e=Dwt.byId(n);
- if(e){
- Dwt.setInnerHtml(e,contents)
- }}
- return contents
- }
- return""
- };
- net_comcast_sms.ThreadListView.prototype.setEditing=function(t){
- this._editing=t;
- for(var o=0,a=this._list.size();
- o<a;
- o++){
- var e=this._list.get(o),n=this._getCellId(e,ZmItem.F_FROM);
- this.getBodyCellContents(n,e)
- }};
- net_comcast_sms.ThreadListView.prototype.getDateCellContents=function(t,e){
- var a=e.getNewest();
- return["<div class='MessageDate'>",a.time&&net_comcast_sms.Util.Date.computeDateStr(new Date(a.time)).replace(/\n/g,"<br/>")||"","</div>"].join("")
- };
- net_comcast_sms.ThreadListView.prototype._updateThread=function(e){
- if(!e.getNonDeletedCount()){
- if(this._controller.getThread()==e){
- this._selectNextItem(true,false,true,e)
- }
- this.removeItem(e)
- }else{
- var t=this.getSelection();
- if(this._list.indexOf(e)==-1){
- this.addItem(e)
- }else{
- this.redrawItem(e)
- }
- this.setSelectedItems(t)
- }};
- net_comcast_sms.ThreadListView.prototype._selectNextItem=function(o,t,s,e){
- if(!this.size()){
- return
- }
- var a=this._getElFromItem(e),n=(a)?this._getSiblingElement(a,o):this._parentEl.firstChild;
- this._scrollList(n);
- this._emulateSingleClick({
- target:n,button:DwtMouseEvent.LEFT,shiftKey:t,kbNavEvent:s}
- )
- };
- net_comcast_sms.ThreadListView.senderComparator=function(t,e){
- return net_comcast_sms.Util.plainComparator(t.getTN(),e.getTN())
- };
- net_comcast_sms.ThreadListView.COMPARATOR={};
- net_comcast_sms.ThreadListView.COMPARATOR[ZmItem.F_STATUS]=net_comcast_sms.Thread.statusComparator;
- net_comcast_sms.ThreadListView.COMPARATOR[ZmItem.F_FROM]=net_comcast_sms.ThreadListView.senderComparator;
- net_comcast_sms.ThreadListView.COMPARATOR[ZmItem.F_DATE]=net_comcast_sms.Thread.dateComparator;
- net_comcast_sms.ThreadView=function(e){
- if(!arguments.length){
- return
- }
- this._controller=e.controller;
- DwtComposite.call(this,{
- parent:e.parent,className:"ThreadView DwtComposite",posStyle:Dwt.STATIC_STYLE,controller:e.controller}
- );
- this.setScrollStyle(Dwt.SCROLL);
- this._messageViews=[];
- this._messageListener=new AjxCallback(this,this.updateMessages);
- this._createHtml();
- this._initialize()
- };
- net_comcast_sms.ThreadView.prototype=new DwtComposite;
- net_comcast_sms.ThreadView.prototype.constructor=net_comcast_sms.ThreadView;
- net_comcast_sms.ThreadView.prototype.toString=function(){
- return"net_comcast_sms.ThreadView"
- };
- net_comcast_sms.ThreadView.prototype.TEMPLATE=net_comcast_sms.TEMPLATE_BASE+"#ThreadView";
- net_comcast_sms.ThreadView.prototype._createHtml=function(){
- this._createHtmlFromTemplate(this.TEMPLATE,{
- id:this.getHTMLElId()}
- )
- };
- net_comcast_sms.ThreadView.prototype._initialize=function(){
- var a=this.getHTMLElId();
- var e=this._contactLabel=new DwtLabel({
- parent:this,className:"ThreadLabel DwtLabel overviewHeader"}
- );
- e.replaceElement(a+"_header");
- e.setVisible(false);
- this._messageArea=Dwt.byId(a+"_thread");
- var t=this._moreButton=new DwtButton({
- parent:this,className:"ThreadMore ZButton"}
- );
- t.replaceElement(a+"_more");
- t.addSelectionListener(new AjxListener(this,this.getMore));
- t.setText(this._controller.getMsg("threadMoreButton"));
- t.setVisible(false)
- };
- net_comcast_sms.ThreadView.prototype.dispose=function(){
- this.clear(true);
- DwtComposite.prototype.dispose.call(this)
- };
- net_comcast_sms.ThreadView.prototype.setSize=function(e,t){
- DwtComposite.prototype.setSize.call(this,e,t)
- };
- net_comcast_sms.ThreadView.prototype.setVisible=function(a){
- DwtComposite.prototype.setVisible.call(this,a);
- if(this._pendingScroll){
- var t=this._pendingScroll,e=this.getHtmlElement();
- setTimeout(function(){
- net_comcast_sms.Util.DOM.scrollIntoView(t,e)
- }
- ,1);
- this._pendingScroll=null
- }};
- net_comcast_sms.ThreadView.prototype.getMsg=function(){
- return this._controller.getMsg.apply(this._controller,arguments)
- };
- net_comcast_sms.ThreadView.prototype.setContact=function(e){
- var t=this._controller.getMsg("threadHeader",[e.name?(e.name+" "):"",net_comcast_sms.Util.TN.pretty(e.tn),e.field?(" ("+ZmMsg["AB_FIELD_"+e.field]+")"):""].join(""));
- this._contactLabel.setText(t)
- };
- net_comcast_sms.ThreadView.prototype.set=function(a){
- if(a){
- this._moreButton.setVisible(false);
- var t=a.getTN();
- var e=a.getContact(new AjxCallback(this,this.setContact));
- this.setContact(e);
- if(a!=this._thread){
- this._sorted=false;
- this.clear(false);
- this._thread=a;
- this._thread.addListener("messages",this._messageListener);
- this._thread.addListener("status",this._messageListener)
- }
- this._updateList(a);
- var o=this;
- setTimeout(function(){
- o._moreButton.setVisible(true);
- o._updateMoreButton()
- }
- ,0)
- }
- this._contactLabel.setVisible(!!a)
- };
- net_comcast_sms.ThreadView.prototype.reset=function(){
- this.set(this._thread);
- this.setEditing(this._editing);
- this.setForwarding(this._forwarding)
- };
- net_comcast_sms.ThreadView.prototype._updateList=function(e){
- if(e instanceof net_comcast_sms.Thread){
- this.setMessages(e.getMessages().getArray())
- }};
- net_comcast_sms.ThreadView.prototype.addMessage=function(a){
- if(a.status!==net_comcast_sms.Message.STATUS_DELETED&&!this.getMessageView(a)){
- var e=new net_comcast_sms.MessageView({
- parent:this,controller:this._controller,message:a}
- );
- var t=this._messageViews;
- var o;
- t.push(e);
- if(t.length>1){
- t.sort(function(s,n){
- return net_comcast_sms.Message.dateComparator(s.getMessage(),n.getMessage())
- }
- );
- o=AjxUtil.indexOf(t,e)
- }else{
- o=0
- }
- e.reparentHtmlElement(this._messageArea,o);
- a.setRead()
- }};
- net_comcast_sms.ThreadView.prototype.setMessages=function(a){
- var t=this._messageViews;
- var r=t.length&&t[t.length-1];
- for(var n=0;
- n<a.length;
- n++){
- var l=a[n];
- var h=this.getMessageView(l);
- if(!h){
- h=new net_comcast_sms.MessageView({
- parent:this,controller:this._controller,message:l}
- );
- t.push(h)
- }
- l.setRead()
- }
- t.sort(function(d,c){
- return net_comcast_sms.Message.dateComparator(d.getMessage(),c.getMessage())
- }
- );
- for(var n=0;
- n<t.length;
- n++){
- t[n].reparentHtmlElement(this._messageArea,n)
- }
- var s=t.length&&t[t.length-1];
- if(s&&r!=s){
- var e=this.getHtmlElement(),o=s.getHtmlElement();
- if(this.getVisible()&&this.parent.getVisible()){
- setTimeout(function(){
- net_comcast_sms.Util.DOM.scrollIntoView(o,e)
- }
- ,1)
- }else{
- this._pendingScroll=o
- }}};
- net_comcast_sms.ThreadView.prototype.getMessageView=function(o){
- var e=this._messageViews;
- for(var a=0,t=e.length;
- a<t;
- a++){
- if(e[a].getMessage()==o){
- return e[a]
- }}
- return null
- };
- net_comcast_sms.ThreadView.prototype.clear=function(e){
- if(this._thread){
- this._thread.removeListener("messages",this._messageListener);
- this._thread.removeListener("status",this._messageListener)
- }
- while(this._messageViews.length){
- this.removeChild(this._messageViews.pop())
- }
- this._controller.setEditing(false);
- if(e){
- this.parent.set(null)
- }};
- net_comcast_sms.ThreadView.prototype.getMore=function(e){
- this._thread.more(new AjxCallback(this,this._updateMoreButton,[e]))
- };
- net_comcast_sms.ThreadView.prototype._updateMoreButton=function(e){
- this._moreButton.setVisible(this._thread.hasMore());
- caboUtil.run(e)
- };
- net_comcast_sms.ThreadView.prototype.setEditing=function(e){
- this._editing=e;
- for(var a=0,t=this._messageViews.length;
- a<t;
- a++){
- this._messageViews[a].setEditing(e)
- }};
- net_comcast_sms.ThreadView.prototype.setForwarding=function(e){
- this._forwarding=e;
- for(var a=0,t=this._messageViews.length;
- a<t;
- a++){
- this._messageViews[a].setForwarding(e)
- }};
- net_comcast_sms.ThreadView.prototype.getMessagesForForwarding=function(){
- var o=[];
- for(var a=0,t=this._messageViews.length;
- a<t;
- a++){
- var e=this._messageViews[a];
- if(e.isSelectedForForwarding()){
- o.push(e.getMessage())
- }}
- return o
- };
- net_comcast_sms.ThreadView.prototype.updateMessages=function(){
- var e=this._thread.getNonDeletedCount();
- if(!e){
- this.clear(true)
- }else{
- if(e!=this._messageViews.length){
- this.reset()
- }}};
- net_comcast_sms.ThreadViewList=function(e){
- if(!arguments.length){
- return
- }
- this._controller=e.controller;
- DwtComposite.call(this,{
- parent:e.parent,className:"ThreadViewList DwtComposite",posStyle:Dwt.ABSOLUTE_STYLE,noMaximize:false,controller:e.controller}
- );
- this.setScrollStyle(DwtControl.CLIP);
- this._createHtml();
- this._initialize()
- };
- net_comcast_sms.ThreadViewList.prototype=new DwtComposite;
- net_comcast_sms.ThreadViewList.prototype.constructor=net_comcast_sms.ThreadViewList;
- net_comcast_sms.ThreadViewList.prototype.toString=function(){
- return"net_comcast_sms.ThreadViewList"
- };
- net_comcast_sms.ThreadViewList.prototype.TEMPLATE=net_comcast_sms.TEMPLATE_BASE+"#ThreadViewList";
- net_comcast_sms.ThreadViewList.prototype._createHtml=function(){
- this._createHtmlFromTemplate(this.TEMPLATE,{
- id:this.getHTMLElId()}
- )
- };
- net_comcast_sms.ThreadViewList.prototype._initialize=function(){
- var s=this.getHTMLElId();
- var n=this._noneView=new DwtControl({
- parent:this}
- );
- n.replaceElement(s+"_none");
- n.setContent(AjxTemplate.expand("dwt.Widgets#DwtListView-NoResults",{
- message:this._controller.getMsg("threadPleaseSelect")}
- ));
- n.setVisible(true);
- var a=this._threadView=new net_comcast_sms.ThreadView({
- parent:this,controller:this._controller}
- );
- a.replaceElement(s+"_thread");
- a.setVisible(false);
- var o=this._replyView=new net_comcast_sms.ReplyView({
- parent:this,controller:this._controller}
- );
- o.replaceElement(s+"_reply");
- o.setEnabled(false);
- var t=this._deleteThreadView=new net_comcast_sms.DeleteThreadView({
- parent:this,controller:this._controller}
- );
- t.replaceElement(s+"_deleteThread");
- var e=this._forwardView=new net_comcast_sms.ForwardView({
- parent:this,controller:this._controller}
- );
- e.replaceElement(s+"_forward");
- this.setEditing(false);
- this.setForwarding(false);
- this.setVisible(false)
- };
- net_comcast_sms.ThreadViewList.prototype.setSize=function(e,o){
- DwtComposite.prototype.setSize.call(this,e,o);
- var a=(this._replyView.getVisible()&&this._replyView)||(this._deleteThreadView.getVisible()&&this._deleteThreadView)||(this._forwardView.getVisible()&&this._forwardView);
- var t=o-(a&&a.getSize().y||0);
- this._threadView.setSize(e,t)
- };
- net_comcast_sms.ThreadViewList.prototype.setVisible=function(e){
- DwtComposite.prototype.setVisible.call(this,e);
- this._threadView.setVisible(e);
- if(e){
- net_comcast_sms.Util.DOM.resetSize(this)
- }};
- net_comcast_sms.ThreadViewList.prototype.clear=function(){
- this._threadView.clear();
- this.set(null)
- };
- net_comcast_sms.ThreadViewList.prototype.set=function(e){
- var t=!!e;
- this._noneView.setVisible(!t);
- this._threadView.setVisible(!!t);
- this._threadView.set(e);
- this._deleteThreadView.set(e);
- this._thread=e;
- net_comcast_sms.Util.DOM.resetSize(this);
- this._replyView.setEnabled(t);
- this._threadView.setVisible(t)
- };
- net_comcast_sms.ThreadViewList.prototype.getThreadView=function(){
- return this._threadView
- };
- net_comcast_sms.ThreadViewList.prototype.setEditing=function(e){
- this._editing=e;
- this._threadView.setEditing(e);
- this._replyView.setVisible(!e&&!this._forwarding);
- this._deleteThreadView.setVisible(e&&!this._forwarding);
- this._deleteThreadView.set();
- this._forwardView.setVisible(!e&&this._forwarding);
- if(!e&&this._forwarding){
- this._forwardView.setThread(this._thread)
- }
- net_comcast_sms.Util.DOM.resetSize(this)
- };
- net_comcast_sms.ThreadViewList.prototype.setForwarding=function(e){
- this._forwarding=e;
- this._threadView.setForwarding(e);
- this._replyView.setVisible(!e&&!this._editing);
- this._deleteThreadView.setVisible(!e&&this._editing);
- this._forwardView.setVisible(e&&!this._editing);
- if(e&&!this._editing){
- this._forwardView.setThread(this._thread)
- }
- net_comcast_sms.Util.DOM.resetSize(this)
- };
- net_comcast_sms.ThreadViewList.prototype.popdownChoosers=function(){
- this._replyView.popdownChoosers()
- };
- net_comcast_sms.ThreadViewList.prototype.getReplyView=function(){
- return this._replyView
- };
- net_comcast_sms.MessageView=function(e){
- if(!arguments.length){
- return
- }
- this._controller=e.controller;
- DwtComposite.call(this,{
- parent:e.parent,className:"MessageView DwtComposite",controller:e.controller}
- );
- this._message=e.message;
- this._noImage=this._controller.getHandler().getResource("img/none.png");
- this._statusListener=new AjxCallback(this,this.updateStatus);
- this._createHtml();
- this._initialize();
- this._setMouseEvents();
- this.addListener(DwtEvent.ONMOUSEUP,new AjxListener(this,this._mouseUpListener));
- this._updateStatusCallback=new AjxCallback(this,this.updateStatus)
- };
- net_comcast_sms.MessageView.prototype=new DwtComposite;
- net_comcast_sms.MessageView.prototype.constructor=net_comcast_sms.MessageView;
- net_comcast_sms.MessageView.prototype.toString=function(){
- return"net_comcast_sms.MessageView"
- };
- net_comcast_sms.MessageView.prototype.TEMPLATE={};
- net_comcast_sms.MessageView.prototype.TEMPLATE[0]=net_comcast_sms.MessageView.prototype.TEMPLATE[net_comcast_sms.Message.DIR_INCOMING]=net_comcast_sms.TEMPLATE_BASE+"#MessageViewIncoming";
- net_comcast_sms.MessageView.prototype.TEMPLATE[net_comcast_sms.Message.DIR_OUTGOING]=net_comcast_sms.TEMPLATE_BASE+"#MessageViewOutgoing";
- net_comcast_sms.MessageView.prototype.NO_CONTACT_IMAGE=(window.ZmEditContactViewImage&&ZmEditContactViewImage.NO_IMAGE_URL)||(appContextPath+"/img/large/ImgPerson_48.png");
- net_comcast_sms.MessageView.prototype.NO_CONTACT_IMAGE_CLASS="ImgPerson_48";
- net_comcast_sms.MessageView.prototype._createHtml=function(){
- if(!net_comcast_sms.MessageView.LOCKED_HTML){
- net_comcast_sms.MessageView.LOCKED_HTML="<img src='"+this._controller.getHandler().getResource("img/locked.png")+"'/>"
- }
- this._createHtmlFromTemplate(this.TEMPLATE[this._message.dir]||this.TEMPLATE[0],{
- id:this.getHTMLElId(),msg:this._controller.getHandler().getMsgObj()}
- )
- };
- net_comcast_sms.MessageView.prototype._initialize=function(){
- var e=this.getHTMLElId();
- var a=this._message;
- var h=this._controller;
- this._img=Dwt.byId(e+"_image");
- if(a.dir==net_comcast_sms.Message.DIR_INCOMING){
- net_comcast_sms.Util.Contact.getByTN(a.tn,new AjxCallback(this,this._setContactImage))
- }else{
- this._clearContactImage()
- }
- this._body=Dwt.byId(e+"_body");
- this._body.innerHTML=this.replaceEmoticons(a.getBody());
- this._balloon=Dwt.byId(e+"_balloon");
- this._annotation=Dwt.byId(e+"_annotation");
- this._lock=Dwt.byId(e+"_lock");
- var n=this._lockButton=new DwtButton({
- parent:this}
- );
- n.replaceElement(e+"_button_lock",true,true);
- n.setText(h.getMsg("actionLock"));
- n.addSelectionListener(new AjxListener(this,this.lock,[true]));
- var t=this._unlockButton=new DwtButton({
- parent:this}
- );
- t.replaceElement(e+"_button_unlock",true,true);
- t.setText(h.getMsg("actionUnlock"));
- t.addSelectionListener(new AjxListener(this,this.unlock,[true]));
- var l=this._deleteButton=new DwtButton({
- parent:this}
- );
- l.replaceElement(e+"_button_delete",true,true);
- l.setText(h.getMsg("actionDelete"));
- l.addSelectionListener(new AjxListener(this,this.remove,[true]));
- var s=this._restoreButton=new DwtButton({
- parent:this}
- );
- s.replaceElement(e+"_button_restore",true,true);
- s.setText(h.getMsg("actionRestore"));
- s.addSelectionListener(new AjxListener(this,this.restore,[true]));
- var r=this._forwardCheckbox=new DwtCheckbox({
- parent:this}
- );
- r.replaceElement(e+"_check_forward",true,true);
- r.addSelectionListener(new AjxListener(this,this._handleForwardSelect));
- var o=this._processing=new DwtLabel({
- parent:this}
- );
- o.replaceElement(e+"_processing");
- o.setText(h.getMsg("processing"));
- var d=this._restoring=new DwtLabel({
- parent:this}
- );
- d.replaceElement(e+"_restoring");
- d.setText(h.getMsg("processing"));
- this._messageDiv=Dwt.byId(e+"_message");
- this._restoreDiv=Dwt.byId(e+"_restore");
- this.setVisible(false);
- var c=this;
- setTimeout(function(){
- c.updateStatus();
- c.setVisible(true)
- }
- ,0);
- a.addListener("status",this._statusListener)
- };
- net_comcast_sms.MessageView.prototype.dispose=function(){
- this._message.removeListener("status",this._statusListener);
- DwtComposite.prototype.dispose.call(this)
- };
- net_comcast_sms.MessageView.prototype._setContactImage=function(t){
- var a=this._img;
- this._clearContactImage();
- if(t&&a){
- var e=new Image();
- e.onload=function(){
- a.src=e.src;
- a.className=""
- };
- e.src=net_comcast_sms.Util.Contact.getImageUrl(t)
- }};
- net_comcast_sms.MessageView.prototype._clearContactImage=function(){
- var e=this._img;
- if(e){
- e.src=this._noImage;
- e.className=this.NO_CONTACT_IMAGE_CLASS
- }};
- net_comcast_sms.MessageView.prototype.setEditing=function(e){
- this._editing=e;
- this.condClassName(e,"editing","");
- this.updateStatus()
- };
- net_comcast_sms.MessageView.prototype.setForwarding=function(e){
- this._forwarding=e;
- this.condClassName(e,"forwarding","");
- if(!e){
- this._forwardCheckbox.setSelected(false);
- this._handleForwardSelect()
- }};
- net_comcast_sms.MessageView.prototype.setProcessing=function(e){
- this.condClassName(e,"processing","")
- };
- net_comcast_sms.MessageView.prototype.isSelectedForForwarding=function(){
- return this._forwardCheckbox.isSelected()
- };
- net_comcast_sms.MessageView.prototype._handleForwardSelect=function(){
- this._message.setForwardStatus(this._forwardCheckbox.isSelected())
- };
- net_comcast_sms.MessageView.prototype.updateStatus=function(){
- this.setProcessing(false);
- var a=this._getStatus();
- var t=(a==net_comcast_sms.Message.STATUS_LOCKED);
- var e=(a==net_comcast_sms.Message.STATUS_DELETED);
- if(this._editing){
- this._setButtonVisible(this._lockButton,!t);
- this._setButtonVisible(this._unlockButton,t);
- this._setButtonVisible(this._deleteButton,!t&&!e)
- }
- Dwt.setVisible(this._restoreDiv,e);
- Dwt.setVisible(this._messageDiv,!e);
- this._lock.innerHTML=(a==net_comcast_sms.Message.STATUS_LOCKED)?net_comcast_sms.MessageView.LOCKED_HTML:"";
- this._annotation.innerHTML=this._message.getAnnotation();
- this.condClassName(e,"deleted","");
- this._setActionEnabled("lock",!t);
- this._setActionEnabled("unlock",t);
- this._setActionEnabled("delete",!t&&!e);
- this._setActionEnabled("forward",!e&&!this._editing)
- };
- net_comcast_sms.MessageView.prototype._setButtonVisible=function(e,t){
- if(e.getVisible()!=t){
- e.setVisible(t)
- }};
- net_comcast_sms.MessageView.prototype._setPendingStatus=function(e){
- this._message.setEditStatus(e)
- };
- net_comcast_sms.MessageView.prototype._getStatus=function(e){
- return(!e&&this._message.getEditStatus())||this._message.status
- };
- net_comcast_sms.MessageView.prototype._applyStatus=function(e){
- this._message.setStatus(this._getStatus(false),e)
- };
- net_comcast_sms.MessageView.prototype.getMessage=function(){
- return this._message
- };
- net_comcast_sms.MessageView.prototype.lock=function(e){
- this._setPendingStatus(net_comcast_sms.Message.STATUS_LOCKED);
- this._handleChangeStatus(e);
- return true
- };
- net_comcast_sms.MessageView.prototype.unlock=function(e){
- this._setPendingStatus(net_comcast_sms.Message.STATUS_READ);
- this._handleChangeStatus(e);
- return true
- };
- net_comcast_sms.MessageView.prototype.remove=function(e){
- if(this._getStatus()!=net_comcast_sms.Message.STATUS_LOCKED){
- this._setPendingStatus(net_comcast_sms.Message.STATUS_DELETED);
- this._handleChangeStatus(e);
- return true
- }};
- net_comcast_sms.MessageView.prototype.restore=function(e){
- this._setPendingStatus(net_comcast_sms.Message.STATUS_READ);
- this._handleChangeStatus(e);
- return true
- };
- net_comcast_sms.MessageView.prototype._handleChangeStatus=function(e){
- if(e){
- this.setProcessing(true);
- this._applyStatus(this._updateStatusCallback)
- }else{
- this.updateStatus()
- }};
- net_comcast_sms.MessageView.prototype.forward=function(){
- this._controller.setForwarding(true);
- this._forwardCheckbox.setSelected(true);
- this._handleForwardSelect()
- };
- net_comcast_sms.MessageView.prototype._mouseUpListener=function(e){
- if(e.button==DwtMouseEvent.RIGHT){
- if(!this._editing&&!this._forwarding&&caboUtil.Dom.isAncestor(this._balloon,e.target)){
- var t=this._getActionMenu();
- if(t&&t instanceof DwtMenu){
- this.updateStatus();
- t.popup(0,e.docX,e.docY)
- }}}
- this._controller.popdownChoosers()
- };
- net_comcast_sms.MessageView.prototype._getActionMenu=function(){
- if(!this._actionMenu){
- var t=this._controller;
- var o=[{
- id:"lock",text:t.getMsg("actionLock"),listener:new AjxListener(this,this.lock,[true])}
- ,{
- id:"unlock",text:t.getMsg("actionUnlock"),listener:new AjxListener(this,this.unlock,[true])}
- ,{
- id:"delete",text:t.getMsg("actionDelete"),listener:new AjxListener(this,this.remove,[true])}
- ,{
- id:"forward",text:t.getMsg("actionForward"),listener:new AjxListener(this,this.forward)}
- ];
- var h=this._actionMenu=new ZmPopupMenu(this);
- for(var s=0,n=o.length;
- s<n;
- s++){
- var r=o[s];
- var e="lock";
- var a=h.createMenuItem(r.id,{
- text:r.text}
- );
- h.addSelectionListener(r.id,r.listener)
- }}
- return this._actionMenu
- };
- net_comcast_sms.MessageView.prototype._setActionEnabled=function(o,e){
- var a=this._getActionMenu();
- var t=a.getItemById("menuItemId",o);
- if(t){
- t.setVisible(e)
- }};
- net_comcast_sms.MessageView.prototype.replaceEmoticons=function(e){
- var o=net_comcast_sms.Util.EMOTICONS;
- for(var a=0,t=o.length;
- a<t;
- a++){
- var s=o[a];
- var n=new RegExp(s.regex,"g");
- e=e.replace(n,"<span class='"+s.img+"'></span>")
- }
- return e
- };
- net_comcast_sms.MessageView.prototype.reparentHtmlElement=function(a,e){
- if(typeof a=="string"){
- a=document.getElementById(a)
- }
- if(!a){
- return
- }
- var t=this.getHtmlElement();
- if(t){
- if(e==null){
- a.appendChild(t)
- }else{
- if(typeof e=="object"){
- a.insertBefore(t,e)
- }else{
- if(a.childNodes[e]){
- if(a.childNodes[e]!=t){
- a.insertBefore(t,a.childNodes[e])
- }}else{
- a.appendChild(t)
- }}}}};
- net_comcast_sms.ComposeView=function(e){
- if(!arguments.length){
- return
- }
- this._controller=e.controller;
- DwtComposite.call(this,{
- parent:e.parent,className:e.className||"ComposeView DwtComposite",posStyle:e.posStyle||Dwt.ABSOLUTE_STYLE,noMaximize:false,controller:e.controller}
- );
- this.resetCachedBodyText();
- this._recipients={};
- this._maxHeight=100;
- this._minHeight=100;
- this._keyEventListened="keydown";
- this._subjectSettingListener=new AjxListener(this,this._updateSubjectVisibility);
- this._updateSendListeners=[];
- this.setVisible(true);
- this._setKeyPressEventHdlr(false)
- };
- net_comcast_sms.ComposeView.prototype=new DwtComposite;
- net_comcast_sms.ComposeView.prototype.constructor=net_comcast_sms.ComposeView;
- net_comcast_sms.ComposeView.prototype.toString=function(){
- return"net_comcast_sms.ComposeView"
- };
- net_comcast_sms.ComposeView.prototype.getMsg=function(){
- return this._controller.getMsg.apply(this._controller,arguments)
- };
- net_comcast_sms.ComposeView.prototype.TEMPLATE=net_comcast_sms.TEMPLATE_BASE+"#Compose";
- net_comcast_sms.ComposeView.RECIPIENT_SEP=/\s*[;,]+\s*/g;
- net_comcast_sms.ComposeView.SUBJECT_SEP=". ";
- net_comcast_sms.ComposeView.prototype.getTabGroupMember=function(){
- if(!this._tabGroup){
- this._tabGroup=new DwtTabGroup(this.toString())
- }
- this._tabGroup.toString=function(){
- return"SMS Compose View"
- };
- return this._tabGroup
- };
- net_comcast_sms.ComposeView.prototype._createHtml=function(){
- this._createHtmlFromTemplate(this.TEMPLATE,{
- id:this.getHTMLElId(),msg:this._controller.getHandler().getMsgObj()}
- )
- };
- net_comcast_sms.ComposeView.prototype._initialize=function(){
- var e=this.getHTMLElId();
- var a=this.getTabGroupMember();
- var h=this._contactLabel=new DwtLabel({
- parent:this,className:"ComposeLabel DwtLabel overviewHeader"}
- );
- h.replaceElement(e+"_header");
- h.setText(this.getMsg("composeHeader"));
- var s=this._toField=new DwtInputField({
- parent:this}
- );
- s.replaceElement(e+"_to");
- a.addMember(s.getTabGroupMember());
- var t=this._acList=new ZmAutocompleteListView({
- dataClass:this._controller.getAutocompleter(),matchValue:"text",compCallback:new AjxCallback(this,this._acComplete),keyUpCallback:new AjxCallback(this,this._acKeyUp),options:{
- addrBubbles:false,needItem:true}}
- );
- t.handle(s.getInputElement());
- t.setActiveAccount(appCtxt.accountList.activeAccount);
- t._acInterval=700;
- var n=this._textField=new DwtHtmlEditor({
- parent:this,mode:DwtHtmlEditor.HTML}
- );
- n.replaceElement(e+"_field");
- n.setSize("100%",100);
- caboUtil.augment(n,"_handleEditorEvent",AjxCallback.simpleClosure(this._handleEditorEvent,this),false);
- a.addMember(n);
- n.replaceNodeContent=net_comcast_sms.ComposeView.__override_replaceNodeContent(this);
- var r=this._lengthLabel=new DwtLabel({
- parent:this}
- );
- r.replaceElement(e+"_length");
- var l=this._controller._toolbar.getButton(ZmOperation.SMS_COMPOSEEMOTICON);
- var o=this._emoChooser=new net_comcast_sms.EmoticonChooser({
- button:l,callback:new AjxCallback(this,this._applyEmoticon)}
- );
- this._loadEmoticons();
- this.updateLength()
- };
- net_comcast_sms.ComposeView.prototype.dispose=function(){
- this.popdownChoosers();
- DwtComposite.prototype.dispose.call(this)
- };
- net_comcast_sms.ComposeView.prototype._handleEditorEvent=function(a,t){
- if(t.type==this._keyEventListened){
- var e=this,o;
- if(t.keyCode==13){
- a=false;
- o=true
- }
- if(t.keyCode==90&&t.ctrlKey){
- a=false
- }
- if(t.keyCode==89&&t.ctrlKey){
- a=false
- }
- window.setTimeout(function(){
- e.resetCachedBodyText();
- e.updateLength();
- if(o&&e._canSend()){
- e.send()
- }}
- ,0)
- }
- if(t.type=="mousedown"){
- this._controller.popdownChoosers();
- if(this._acList){
- this._acList.show(false)
- }}
- if(!this.getEnabled()){
- a=false
- }
- if(!a){
- DwtUiEvent.setDhtmlBehaviour(t,true,false)
- }
- return a
- };
- net_comcast_sms.ComposeView.prototype.addUpdateSendListener=function(e){
- this._updateSendListeners.push(e)
- };
- net_comcast_sms.ComposeView.prototype._updateSend=function(){
- caboUtil.run(this._updateSendListeners,this._canSend(),this._hasInvalidTNs(),!!this.getBodyText().length)
- };
- net_comcast_sms.ComposeView.prototype.setVisible=function(e){
- if(e&&!this._initialized){
- this._createHtml();
- this._initialize();
- this._initialized=true
- }
- DwtComposite.prototype.setVisible.call(this,e);
- if(e){
- this.updateMaxHeight();
- this.updateHeight();
- if(this._toField){
- this._toField.focus()
- }}
- if(!e){
- this.popdownChoosers()
- }};
- net_comcast_sms.ComposeView.prototype.popdownChoosers=function(){
- if(this._emoChooser){
- this._emoChooser.popdown()
- }};
- net_comcast_sms.ComposeView.prototype.setSize=function(e,t){
- DwtComposite.prototype.setSize.apply(this,arguments);
- this.updateMaxHeight();
- this.updateHeight()
- };
- net_comcast_sms.ComposeView.prototype.setContent=function(a){
- this._textField.setContent(a);
- this.resetCachedBodyText();
- var e=this;
- var t=function(){
- if(e._textField._pendingContent){
- setTimeout(t,10)
- }else{
- e.updateLength()
- }};
- t()
- };
- net_comcast_sms.ComposeView.prototype.addRecipient=function(h,s){
- if(h){
- var o;
- if(h instanceof ZmContact){
- if(!s){
- var r=ZmContact.PHONE_FIELDS;
- for(var t=0;
- t<r.length;
- t++){
- s=r[t];
- if(h.getAttr(s)){
- break
- }}}
- if(s){
- var a=h.getAttr(s);
- var n=ZmContact._AB_FIELD[s];
- o=h.getFileAs()+" ["+n+"]";
- this._recipients[o]={
- field:s,value:a}
- }}else{
- if(AjxUtil.isString(h)){
- var e=net_comcast_sms.Util.TN.pretty(h,true);
- if(e){
- o=e
- }}}
- if(o){
- this._toField.setValue(this._toField.getValue()+o+"; ");
- return true
- }}
- return false
- };
- net_comcast_sms.ComposeView.prototype._acComplete=function(a,o,t){
- var e=this;
- if(t&&t.value){
- setTimeout(function(){
- e._recipients[t.text]={
- field:t.field,value:t.value&&t.value.address||t.value};
- e._updateSend()
- }
- ,100)
- }};
- net_comcast_sms.ComposeView.prototype._acKeyUp=function(){
- var e=this;
- setTimeout(function(){
- e._updateSend()
- }
- ,200)
- };
- net_comcast_sms.ComposeView.prototype.cancel=function(){
- this.parent.endMailComposeView(this);
- this._controller.setForwarding(false)
- };
- net_comcast_sms.ComposeView.prototype.reset=function(){
- this._toField.setValue("");
- this._recipients={};
- this.setContent("")
- };
- net_comcast_sms.ComposeView.prototype.getRecipients=function(d,n){
- var o=this._toField.getValue().split(net_comcast_sms.ComposeView.RECIPIENT_SEP);
- var e=[];
- var r=[];
- var h=!d||!!(AjxUtil.intersection(d,ZmContact.PHONE_FIELDS).length);
- d=(AjxUtil.isObject(d)&&(AjxUtil.isArray(d)?AjxUtil.arrayAsHash(d):d))||null;
- for(var a=0,t=o.length;
- a<t;
- a++){
- var s=o[a]&&AjxStringUtil.trim(o[a]);
- if(s){
- var c=this._recipients[s];
- if(c){
- if(!d){
- e.push(c)
- }else{
- if(d[c.field]){
- e.push(c.value)
- }}}else{
- if(AjxUtil.isString(s)&&h){
- var l=net_comcast_sms.Util.TN.normalize(s,true);
- if(l){
- e.push(l)
- }else{
- r.push(s)
- }}}
- if(n&&e.length){
- break
- }}}
- return{
- invalid:r,valid:e}
- };
- net_comcast_sms.ComposeView.prototype.getPhoneRecipients=function(){
- var e=this;
- return AjxUtil.collapseList(AjxUtil.map(this.getRecipients(ZmContact.PHONE_FIELDS).valid,function(t){
- return net_comcast_sms.Util.TN.normalize(t,true)
- }
- ))
- };
- net_comcast_sms.ComposeView.prototype.CONVERTOR={
- _before:function(e){
- this.__ff_hasIgnoredBR=false;
- return e
- }
- ,"#text":function(t,e){
- var a=t.nodeValue;
- if(a.search(AjxStringUtil._NON_WHITESPACE)!=-1){
- if(e&&(e.lastNode=="ol"||e.lastNode=="ul")){
- return"\n"
- }
- return(e&&e.isPreformatted)?a:a.replace(AjxStringUtil._LF," ")
- }
- return a
- }
- ,br:function(t,e){
- if(!this.__ff_hasIgnoredBR){
- this.__ff_hasIgnoredBR=true;
- return""
- }
- return null
- }
- ,img:function(t,e){
- var a=Dwt.getObjectFromElement(t,"emoticon");
- if(a&&a.chars){
- return a.chars
- }
- return null
- }};
- net_comcast_sms.ComposeView.prototype.CONVERTOR.p=net_comcast_sms.ComposeView.prototype.CONVERTOR.br;
- net_comcast_sms.ComposeView.prototype.CONVERTOR_NOEMO={
- _before:net_comcast_sms.ComposeView.prototype.CONVERTOR._before,"#text":net_comcast_sms.ComposeView.prototype.CONVERTOR["#text"],br:net_comcast_sms.ComposeView.prototype.CONVERTOR.br,p:net_comcast_sms.ComposeView.prototype.CONVERTOR.p,img:function(t,e){
- var a=Dwt.getObjectFromElement(t,"emoticon");
- if(a){
- return"@"
- }
- return null
- }};
- net_comcast_sms.ComposeView.prototype.resetCachedBodyText=function(){
- return this._bodyValue=null
- };
- net_comcast_sms.ComposeView.prototype.getBodyText=function(){
- if(this._bodyValue===null){
- var t=this._textField._getIframeDoc();
- var e=t&&t.body;
- this._bodyValue=net_comcast_sms.Util.DOM.convertHtml2Text(e,this.CONVERTOR,true)
- }
- return this._bodyValue||""
- };
- net_comcast_sms.ComposeView.prototype.getRawBodyText=function(){
- var t=this._textField._getIframeDoc();
- var e=t&&t.body&&t.body.innerHTML;
- e=e&&e.replace(/<[^>]+>/g,"");
- return e
- };
- net_comcast_sms.ComposeView.prototype.getFullText=function(){
- return this.getBodyText()
- };
- net_comcast_sms.ComposeView.prototype.updateLength=function(){
- if(this.getEnabled()){
- if(this._emoticonElements&&this._hasUnconvertedEmoticons()){
- this._replaceEmoticons()
- }
- var o=this._textField;
- var s=this.getFullText();
- var t=s.length;
- if(t!==this._lastCharCount){
- var n=Math.ceil(t/160)||1;
- var a=t%160;
- this._lengthLabel.setText([a,"/",160,n>1?(" ("+n+")"):""].join(""));
- this._lastCharCount=t;
- this._updateSend()
- }
- var e=s.replace(/[^\n]/g,"").length+1;
- if(e!==this._lastLineCount){
- this.updateHeight();
- this._lastLineCount=e
- }}};
- net_comcast_sms.ComposeView.prototype.updateMaxHeight=function(){
- var o=0;
- var s=this.getHtmlElement().firstChild;
- if(s){
- var e=Dwt.byId(this.getHTMLElId()+"_textRow");
- for(var a=0,t=s.rows.length;
- a<t;
- a++){
- var r=s.rows[a];
- if(r!=e){
- var n=r.clientHeight;
- o+=n
- }}
- this._maxHeight=this.getSize().y-o
- }};
- net_comcast_sms.ComposeView.prototype.updateHeight=function(){
- if(this._textField){
- var a=this._maxHeight;
- var o=Math.min(this._minHeight,a);
- var t=this._textField._getIframeDoc().body;
- var s=0;
- if(t){
- try{
- s=t.scrollHeight||(Dwt.getSize(t).y+(parseInt(caboUtil.Dom.getElementCssProperty(t,"margin-top"))||0)+(parseInt(caboUtil.Dom.getElementCssProperty(t,"margin-bottom"))))
- }
- catch(n){}
- this._textField.setSize(Dwt.DEFAULT,Math.max(Math.min(s,a),o))
- }}};
- net_comcast_sms.ComposeView.prototype._canSend=function(){
- return !!(this.getBodyText().length&&this.getRecipients(null,true).valid.length)
- };
- net_comcast_sms.ComposeView.prototype._hasInvalidTNs=function(){
- return !!(this.getRecipients(null,false).invalid.length)
- };
- net_comcast_sms.ComposeView.prototype.send=function(r){
- if(this._hasInvalidTNs()){
- this._controller.getHandler().displayStatusMessage({
- msg:this.getMsg("composeInvalidTN"),level:ZmStatusView.LEVEL_CRITICAL}
- );
- this._updateSend()
- }else{
- if(!AjxStringUtil.trim(this.getFullText()).length){
- this._controller.getHandler().displayStatusMessage({
- msg:this.getMsg("composeEmptyError"),level:ZmStatusView.LEVEL_WARNING}
- );
- this._updateSend()
- }else{
- var o="sms";
- var t=this._controller.getMessageStore();
- var s=this.getPhoneRecipients();
- var n=[];
- if(s&&s.length){
- n.push(o)
- }
- if(n.length){
- this._controller.getHandler().displayStatusMessage(this.getMsg("composeSendingStatus"));
- var e=new caboUtil.MultiCallback(n,null,new AjxCallback(this,this._handleSend,[s,r]),true);
- if(s&&s.length){
- for(var a=0;
- a<s.length;
- a++){
- s[a]=s[a].replace(/^\+1/,"").replace(/^\+/,net_comcast_sms.Util.TN.INTL_PREFIX)
- }
- t.sendMessage(s,this.getFullText(),e.getCallback(o))
- }}}}};
- net_comcast_sms.ComposeView.prototype._handleSend=function(t,h,e){
- var a="sms";
- if(e){
- var o=this._controller;
- var l=o.getHandler();
- var c=e[a];
- if(c&&c[0] instanceof net_comcast_sms.RestError){
- l.displayStatusMessage(this.getMsg((c[0].code=="0030009")?"quotaError":"composeErrorStatus",[c[0].message]));
- return
- }}
- l.displayStatusMessage(this.getMsg("composeSentStatus"));
- this.reset();
- var r=t&&t.length&&t[0];
- var s=this._controller.getMessageStore();
- var n=s.getThread(r);
- if(n){
- n.refresh(new AjxCallback(this,this._handleLoadThread,[n,h]))
- }else{
- s.refreshThreadHeaders(new AjxCallback(this,this._handleLoadHeaders,[r,h]))
- }};
- net_comcast_sms.ComposeView.prototype._handleLoadHeaders=function(t,o){
- var a=this._controller.getMessageStore();
- var e=a.getThread(t);
- if(e){
- e.load(new AjxCallback(this,this._handleLoadThread,[e,o]))
- }else{
- this._controller.hideCompose();
- caboUtil.run(o)
- }};
- net_comcast_sms.ComposeView.prototype._handleLoadThread=function(e,t){
- this._controller.hideCompose();
- this._controller.setThread(e);
- caboUtil.run(t)
- };
- net_comcast_sms.ComposeView.prototype._hasUnconvertedEmoticons=function(e){
- e=e||this.getRawBodyText();
- var o=net_comcast_sms.Util.EMOTICONS;
- for(var a=0,t=o.length;
- a<t;
- a++){
- if(new RegExp(o[a].regex).test(e)){
- return true
- }}
- return false
- };
- net_comcast_sms.ComposeView.prototype._applyEmoticon=function(t){
- var n=this._textField,a=n._getIframeDoc();
- n.focus();
- var o=a.createTextNode(t);
- n._insertNodeAtSelection(o,true);
- if(AjxEnv.isIE){
- n._currInsPt=a.selection.createRange();
- if(a.selection.type=="None"){
- n._currInsPt.collapse(false)
- }}else{
- var e=n._getRange();
- e.selectNode(o);
- e.collapse(false)
- }
- this.resetCachedBodyText();
- this.updateLength()
- };
- net_comcast_sms.ComposeView.prototype._loadEmoticons=function(){
- this._emoticonElements=[];
- var l=net_comcast_sms.Util.EMOTICONS;
- for(var r=0,o=l.length;
- r<o;
- r++){
- var a=l[r];
- var t=this._emoticonElements[r]=document.createElement("img");
- t.src=this._controller.getHandler().getResource("img/none.png");
- t.className=a.img;
- document.body.appendChild(t);
- var d=["background-color","background-image","background-repeat","background-attachment","width","height"];
- if(AjxEnv.isIE){
- d.push("background-position-x","background-position-y")
- }else{
- d.push("background-position")
- }
- for(var n=0;
- n<d.length;
- n++){
- var s=d[n];
- var u=s.replace(/-(\w)/g,function(e,m){
- return m.toUpperCase()
- }
- );
- var c=caboUtil.Dom.getElementCssProperty(t,s);
- if(!AjxUtil.isUndefined(c)){
- t.style[u]=c
- }}
- t.style.display="inline-block";
- t.className="__emoticon__";
- Dwt.associateElementWithObject(t,a,"emoticon");
- try{
- document.body.removeChild(t)
- }
- catch(h){}}};
- net_comcast_sms.ComposeView.prototype._replaceEmoticons=function(){
- var h=this._textField,u=net_comcast_sms.Util.EMOTICONS,r=net_comcast_sms.Util.DOM.getElements(null,"img","__emoticon__",h._getIframeDoc());
- if(AjxEnv.isIE){
- var d=h._getIframeDoc().selection.createRange();
- var a=d.getBookmark()
- }else{
- var d=h._getRange();
- d.collapse(false);
- var s=document.createElement("span");
- d.insertNode(s)
- }
- for(var c=0,n=u.length;
- c<n;
- c++){
- var t=this._emoticonElements[c],o=u[c];
- if(AjxEnv.isIE){
- h.range_findnreplace={
- findText:true}
- }
- var l=h.searchnReplace({
- searchstring:o.regex,replacestring:t,replacemode:"all"}
- )
- }
- if(AjxEnv.isIE){
- d.moveToBookmark(a)
- }else{
- d.selectNode(s);
- d.collapse(false);
- var e=h._getIframeWin().getSelection();
- e.removeAllRanges();
- e.addRange(d);
- s.parentNode.removeChild(s)
- }};
- net_comcast_sms.ComposeView.__override_replaceNodeContent=function(e){
- return function(l,s,x,m,g){
- var p=this,q=e;
- if(!AjxEnv.isIE||(x&&(x.nodeType!=1))){
- for(var k=0;
- k<l.childNodes.length;
- k++){
- var w=l.childNodes[k];
- if(w.nodeType==3){
- if(x&&(x.nodeType==1)){
- if(s.test(w.nodeValue)){
- var b=w.nodeValue.split(s);
- var o=w.nextSibling;
- for(var v=0;
- v<b.length;
- v++){
- var t=(v==0)?w:w.cloneNode(false);
- t.nodeValue=b[v];
- if(v>0){
- var r=x.cloneNode(false);
- var y=Dwt.getObjectFromElement(x,"emoticon");
- if(y){
- Dwt.associateElementWithObject(r,AjxUtil.hashCopy(y),"emoticon")
- }
- if(o){
- l.insertBefore(r,o);
- l.insertBefore(t,o)
- }else{
- l.appendChild(r);
- l.appendChild(t)
- }
- g++;
- if(m!="all"){
- return g
- }}}}
- s.lastIndex=0
- }else{
- var u=w.nodeValue.replace(s,x);
- if(w.nodeValue!=u){
- w.nodeValue=u;
- g++;
- if(m!="all"){
- return g
- }}}}
- this.replaceNodeContent(w,s,x,m,g);
- if((m!="all")&&(g>0)){
- return g
- }}}else{
- var c=100;
- do{
- var f=p._getIframeDoc().selection.createRange();
- f.moveToElementText(l);
- var a=f.text,h=s.exec(a);
- if(h){
- s.lastIndex=0;
- var n=h[0].length,z=f.duplicate();
- f.collapse(true);
- f.moveEnd("character",n);
- for(var k=0,d=-1;
- k<100&&d<0;
- k++){
- if(k>0){
- f.moveStart("character",1);
- f.moveEnd("character",1)
- }
- d=f.compareEndPoints("EndToEnd",z);
- if(s.test(f.text)){
- f.pasteHTML(x.outerHTML);
- g++;
- if(m!="all"){
- return g
- }
- break
- }
- s.lastIndex=0
- }}}
- while(h&&c--)
- }
- return g
- }
- };
- net_comcast_sms.ComposeViewList=function(e){
- if(!arguments.length){
- return
- }
- this._controller=e.controller;
- DwtComposite.call(this,{
- parent:e.parent,className:"ComposeViewList DwtComposite",posStyle:Dwt.ABSOLUTE_STYLE,noMaximize:false,controller:e.controller}
- );
- this._composeViews=[];
- this.setScrollStyle(Dwt.SCROLL)
- };
- net_comcast_sms.ComposeViewList.prototype=new DwtComposite;
- net_comcast_sms.ComposeViewList.prototype.constructor=net_comcast_sms.ComposeViewList;
- net_comcast_sms.ComposeViewList.prototype.toString=function(){
- return"net_comcast_sms.ComposeViewList"
- };
- net_comcast_sms.ComposeViewList.MIN_COMPOSE_SIZE=250;
- net_comcast_sms.ComposeViewList.prototype.setSize=function(r,s){
- DwtComposite.prototype.setSize.call(this,r,s);
- var c=this.getVisibleViews();
- var t=c.length;
- if(t){
- var o=s;
- var h=Math.floor(o/t);
- var l=0;
- if(h<net_comcast_sms.ComposeViewList.MIN_COMPOSE_SIZE){
- h=net_comcast_sms.ComposeViewList.MIN_COMPOSE_SIZE;
- r-=caboUtil.Dom.getScrollBarWidth()
- }else{
- l=o-t*h
- }
- var u=[];
- var n=0;
- for(var a=0,e=c.length;
- a<e;
- a++){
- var d=h+((l-->0)?1:0);
- c[a].setSize(r,d);
- c[a].setLocation(Dwt.DEFAULT,n);
- n+=d
- }}};
- net_comcast_sms.ComposeViewList.prototype.setVisible=function(o){
- DwtComposite.prototype.setVisible.call(this,o);
- for(var a=0,t=this._composeViews.length;
- a<t;
- a++){
- var e=this._composeViews[a];
- e.setVisible(o&&!e._forceHide)
- }
- if(o){
- net_comcast_sms.Util.DOM.resetSize(this)
- }};
- net_comcast_sms.ComposeViewList.prototype.getVisibleViews=function(){
- var o=[];
- for(var a=0,t=this._composeViews.length;
- a<t;
- a++){
- var e=this._composeViews[a];
- if(e.getVisible()){
- o.push(e)
- }}
- return o
- };
- net_comcast_sms.ComposeViewList.prototype.clear=function(){
- for(var a=0,t=this._composeViews.length;
- a<t;
- a++){
- var e=this._composeViews[a];
- this._tabGroup.removeMember(e.getTabGroupMember());
- e._forceHide=true;
- e.setVisible(false)
- }};
- net_comcast_sms.ComposeViewList.prototype.reset=function(){
- this.clear()
- };
- net_comcast_sms.ComposeViewList.prototype.add=function(){
- var e=new net_comcast_sms.ComposeView({
- parent:this,controller:this._controller}
- );
- this._composeViews.push(e);
- this._tabGroup.addMember(e.getTabGroupMember());
- net_comcast_sms.Util.DOM.resetSize(this);
- return e
- };
- net_comcast_sms.ComposeViewList.prototype.addMail=function(a){
- if(!a){
- a={
- action:ZmId.OP_NEW_MESSAGE}
- }
- var t=new net_comcast_sms.ComposeController(this,this._controller._handler);
- var e=t.getView();
- e._controller=t;
- this._composeViews.push(e);
- net_comcast_sms.Util.DOM.resetSize(this);
- t.doAction(a);
- return e
- };
- net_comcast_sms.ComposeViewList.prototype.endMailComposeView=function(t){
- t=t&&AjxUtil.toArray(t)||this._composeViews;
- for(var a=0;
- a<t.length;
- a++){
- var e=t[a];
- this._controller.unmoveMailComposeToolbar(e._controller);
- AjxUtil.arrayRemove(this._composeViews,e);
- DwtControl.prototype.dispose.call(e)
- }};
- net_comcast_sms.ComposeViewList.prototype.get=function(e){
- return this._composeViews[e]
- };
- net_comcast_sms.ComposeViewList.prototype.getFirst=function(){
- return this._composeViews[0]||null
- };
- net_comcast_sms.ComposeViewList.prototype.getTabGroupMember=function(){
- if(!this._tabGroup){
- this._tabGroup=new DwtTabGroup(this.toString());
- for(var t=0,e=this._composeViews.length;
- t<e;
- t++){
- this._tabGroup.addMember(this._composeViews[t].getTabGroupMember())
- }
- this._tabGroup.toString=function(){
- return"SMS Compose View List"
- }
- }
- return this._tabGroup
- };
- net_comcast_sms.ReplyView=function(e){
- if(!arguments.length){
- return
- }
- this._controller=e.controller;
- net_comcast_sms.ComposeView.call(this,{
- parent:e.parent,className:e.className||"ReplyView DwtComposite",controller:e.controller,posStyle:Dwt.STATIC_STYLE}
- );
- this._createHtml();
- this._initialize()
- };
- net_comcast_sms.ReplyView.prototype=new net_comcast_sms.ComposeView;
- net_comcast_sms.ReplyView.prototype.constructor=net_comcast_sms.ReplyView;
- net_comcast_sms.ReplyView.prototype.toString=function(){
- return"net_comcast_sms.ReplyView"
- };
- net_comcast_sms.ReplyView.prototype.TEMPLATE=net_comcast_sms.TEMPLATE_BASE+"#Reply";
- net_comcast_sms.ReplyView.prototype._createHtml=function(){
- this._createHtmlFromTemplate(this.TEMPLATE,{
- id:this.getHTMLElId(),msg:this._controller.getHandler().getMsgObj()}
- )
- };
- net_comcast_sms.ReplyView.prototype._initialize=function(){
- var r=this.getHTMLElId();
- var o=this._textField=new DwtHtmlEditor({
- parent:this,mode:DwtHtmlEditor.HTML}
- );
- o.replaceElement(r+"_field");
- if(!AjxEnv.isIE){
- o.addListener(DwtEvent.ONKEYUP,new AjxListener(this,this.updateLength))
- }else{
- var n=AjxCallback.simpleClosure(this.updateLength,this);
- setTimeout(function(){
- var l=o._getIframeDoc();
- var h=l&&l.body;
- if(h){
- h.attachEvent(DwtEvent.ONKEYUP,n)
- }}
- ,0)
- }
- o.setSize("100%",64);
- caboUtil.augment(o,"_handleEditorEvent",AjxCallback.simpleClosure(this._handleEditorEvent,this),false);
- o.replaceNodeContent=net_comcast_sms.ComposeView.__override_replaceNodeContent(this);
- var e=this._lengthLabel=new DwtLabel({
- parent:this}
- );
- e.replaceElement(r+"_length");
- var s=this._emoButton=new DwtButton({
- parent:this}
- );
- s.setImage("HappyEmoticon");
- s.replaceElement(r+"_emoticon");
- var a=this._emoChooser=new net_comcast_sms.EmoticonChooser({
- button:s,callback:new AjxCallback(this,this._applyEmoticon)}
- );
- var t=this._sendButton=new DwtButton({
- parent:this}
- );
- t.setText(this.getMsg("replySendButton"));
- t.replaceElement(r+"_send");
- t.addSelectionListener(new AjxListener(this,this.send));
- this.addUpdateSendListener(new AjxCallback(this,this._updateSendButton));
- this._updateSendButton(false);
- this._loadEmoticons();
- this.updateLength()
- };
- net_comcast_sms.ReplyView.prototype.reset=function(){
- this.setContent("")
- };
- net_comcast_sms.ReplyView.prototype.setVisible=function(e){
- DwtComposite.prototype.setVisible.call(this,e);
- if(this._textField){
- this._textField.setVisible(e);
- this._textField.setVisibility(e)
- }
- if(this._emoButton){
- this._emoButton.setVisible(e);
- this._emoButton.setVisibility(e)
- }
- if(this._sendButton){
- this._sendButton.setVisible(e);
- this._sendButton.setVisibility(e)
- }
- if(!e){
- this.popdownChoosers()
- }};
- net_comcast_sms.ReplyView.prototype.popdownChoosers=function(){
- net_comcast_sms.ComposeView.prototype.popdownChoosers.call(this)
- };
- net_comcast_sms.ReplyView.prototype.setEnabled=function(e){
- DwtComposite.prototype.setEnabled.call(this,e);
- this._textField.setEnabled(e);
- this._emoButton.setEnabled(e)
- };
- net_comcast_sms.ReplyView.prototype._updateSendButton=function(e){
- this._sendButton.setEnabled(e)
- };
- net_comcast_sms.ReplyView.prototype.updateHeight=function(){};
- net_comcast_sms.ReplyView.prototype._canSend=function(){
- return !!(this.getBodyText().length)
- };
- net_comcast_sms.ReplyView.prototype._hasInvalidTNs=function(){
- return false
- };
- net_comcast_sms.ReplyView.prototype.send=function(a){
- if(!AjxStringUtil.trim(this.getFullText()).length){
- this._controller.getHandler().displayStatusMessage({
- msg:this.getMsg("composeEmptyError"),level:ZmStatusView.LEVEL_WARNING}
- );
- this._updateSend()
- }else{
- var t=this._controller.getMessageStore();
- var e=this._controller.getThread();
- t.sendMessage(e.getTN(),this.getFullText(),new AjxCallback(this,this._handleSend,[a||null]));
- this.reset()
- }};
- net_comcast_sms.ReplyView.prototype._handleSend=function(o,a){
- var e=this._controller;
- var t=e.getHandler();
- if(a instanceof net_comcast_sms.RestError){
- t.displayStatusMessage(this.getMsg((a.code=="0030009")?"quotaError":"composeErrorStatus",[a.message]));
- return
- }
- this._textField.focus();
- caboUtil.run(o)
- };
- net_comcast_sms.ForwardView=function(e){
- if(!arguments.length){
- return
- }
- this._controller=e.controller;
- DwtComposite.call(this,{
- parent:e.parent,className:"ForwardView DwtComposite",controller:e.controller}
- );
- this._updateListener=new AjxListener(this,this.updateButtons);
- this._createHtml();
- this._initialize();
- this._thread=null
- };
- net_comcast_sms.ForwardView.prototype=new DwtComposite;
- net_comcast_sms.ForwardView.prototype.constructor=net_comcast_sms.ForwardView;
- net_comcast_sms.ForwardView.prototype.toString=function(){
- return"net_comcast_sms.ForwardView"
- };
- net_comcast_sms.ForwardView.prototype.TEMPLATE=net_comcast_sms.TEMPLATE_BASE+"#Forward";
- net_comcast_sms.ForwardView.prototype._createHtml=function(){
- this._createHtmlFromTemplate(this.TEMPLATE,{
- id:this.getHTMLElId()}
- )
- };
- net_comcast_sms.ForwardView.prototype._initialize=function(){
- var a=this.getHTMLElId();
- var t=this._smsButton=new DwtButton({
- parent:this}
- );
- t.setText(this._controller.getMsg("forwardTextButton"));
- t.replaceElement(a+"_sms");
- t.addSelectionListener(new AjxListener(this,this._fwdAsSms));
- var e=this._emailButton=new DwtButton({
- parent:this}
- );
- e.setText(this._controller.getMsg("forwardEmailButton"));
- e.replaceElement(a+"_email");
- e.addSelectionListener(new AjxListener(this,this._fwdAsEmail));
- if(!appCtxt.get(ZmSetting.MAIL_ENABLED)){
- e.setVisible(false)
- }
- this.updateButtons()
- };
- net_comcast_sms.ForwardView.prototype.dispose=function(){
- if(this._thread){
- this._thread.removeListener("forwardstatus",this._updateListener)
- }
- DwtComposite.prototype.dispose.call(this)
- };
- net_comcast_sms.ForwardView.prototype.setThread=function(e){
- if(this._thread){
- this._thread.removeListener("forwardstatus",this._updateListener)
- }
- if(e){
- e.addListener("forwardstatus",this._updateListener)
- }
- this._thread=e
- };
- net_comcast_sms.ForwardView.prototype._getSelectedMessages=function(){
- var e=this.parent.getThreadView();
- return e&&e.getMessagesForForwarding()||[]
- };
- net_comcast_sms.ForwardView.prototype._fwdAsSms=function(){
- this._controller.doForwardAsText(this._getSelectedMessages())
- };
- net_comcast_sms.ForwardView.prototype._fwdAsEmail=function(){
- this._controller.doForwardAsEmail(this._getSelectedMessages())
- };
- net_comcast_sms.ForwardView.prototype.updateButtons=function(){
- var t=this._getSelectedMessages();
- var e=!!(t&&t.length);
- this._smsButton.setEnabled(e);
- this._emailButton.setEnabled(e)
- };
- net_comcast_sms.DeleteThreadView=function(e){
- if(!arguments.length){
- return
- }
- this._controller=e.controller;
- DwtComposite.call(this,{
- parent:e.parent,className:"DeleteThreadView DwtComposite",controller:e.controller}
- );
- this._deleteListener=new AjxListener(this,this._doDelete);
- this._updateListener=new AjxCallback(this,this.update);
- this._createHtml();
- this._initialize()
- };
- net_comcast_sms.DeleteThreadView.prototype=new DwtComposite;
- net_comcast_sms.DeleteThreadView.prototype.constructor=net_comcast_sms.DeleteThreadView;
- net_comcast_sms.DeleteThreadView.prototype.toString=function(){
- return"net_comcast_sms.DeleteThreadView"
- };
- net_comcast_sms.DeleteThreadView.prototype.TEMPLATE=net_comcast_sms.TEMPLATE_BASE+"#DeleteThread";
- net_comcast_sms.DeleteThreadView.prototype._createHtml=function(){
- this._createHtmlFromTemplate(this.TEMPLATE,{
- id:this.getHTMLElId()}
- )
- };
- net_comcast_sms.DeleteThreadView.prototype._initialize=function(){
- var a=this.getHTMLElId();
- var e=this._countLabel=new DwtLabel({
- parent:this}
- );
- e.replaceElement(a+"_messageCount");
- var t=this._deleteButton=new DwtButton({
- parent:this}
- );
- t.setText("<nobr>"+this._controller.getMsg("deleteThreadButton")+"</nobr>");
- t.replaceElement(a+"_deleteButton");
- t.setEnabled(false);
- t.addSelectionListener(new AjxListener(this,this._deleteThread))
- };
- net_comcast_sms.DeleteThreadView.prototype.dispose=function(){
- if(this._thread){
- this._thread.removeListener("editstatus",this._updateListener);
- this._thread.removeListener("status",this._updateListener);
- this._thread.removeListener("messages",this._updateListener)
- }
- DwtComposite.prototype.dispose.call(this)
- };
- net_comcast_sms.DeleteThreadView.prototype.set=function(e){
- if(e){
- if(this._thread){
- this._thread.removeListener("editstatus",this._updateListener);
- this._thread.removeListener("status",this._updateListener);
- this._thread.removeListener("messages",this._updateListener)
- }
- this._thread=e;
- e.addListener("editstatus",this._updateListener);
- e.addListener("status",this._updateListener);
- e.addListener("messages",this._updateListener)
- }
- this.update()
- };
- net_comcast_sms.DeleteThreadView.prototype._updateCount=function(){
- if(this._thread instanceof net_comcast_sms.Thread){
- this._countLabel.setText(this._controller.getMsg("deleteThreadMsg",[this._thread.getNonDeletedCount()]))
- }};
- net_comcast_sms.DeleteThreadView.prototype._deleteThread=function(){
- var e=this._dialog=appCtxt.getOkCancelMsgDialog();
- e.reset();
- e.setMessage(this._controller.getMsg("deleteThreadWarning"));
- e.setButtonListener(DwtDialog.OK_BUTTON,this._deleteListener);
- e.popup()
- };
- net_comcast_sms.DeleteThreadView.prototype._doDelete=function(){
- this._dialog.popdown();
- this._thread.deleteThread()
- };
- net_comcast_sms.DeleteThreadView.prototype._handleDelete=function(){
- this.update()
- };
- net_comcast_sms.DeleteThreadView.prototype.update=function(){
- var e=this._thread;
- var o=false;
- if(e){
- for(var a=0,t=e.size();
- a<t&&!o;
- a++){
- var n=e.getByIndex(a);
- if(n.canDelete()&&n.getEditStatus()!=net_comcast_sms.Message.STATUS_LOCKED){
- o=true
- }}
- this._deleteButton.setEnabled(o);
- this._updateCount()
- }};
- net_comcast_sms.EmoticonChooser=function(t){
- if(!arguments.length){
- return
- }
- this._emoticons=net_comcast_sms.Util.EMOTICONS;
- DwtToolTip.call(this,appCtxt.getShell(),"EmoticonChooser DwtToolTip");
- var a=this.id=this._div.id=Dwt.getNextId();
- var e="dwt.Widgets#"+this._borderStyle;
- this._div.innerHTML=AjxTemplate.expand(e,a+"_");
- this._contentDiv=document.getElementById(a+"_Contents");
- this._button=t.button;
- t.button.addSelectionListener(new AjxListener(this,this.toggle));
- this._callback=t.callback;
- this._createHtml();
- this._initialize();
- net_comcast_sms.EmoticonChooser.instances.push(this)
- };
- net_comcast_sms.EmoticonChooser.prototype=new DwtToolTip;
- net_comcast_sms.EmoticonChooser.prototype.constructor=net_comcast_sms.EmoticonChooser;
- net_comcast_sms.EmoticonChooser.prototype.toString=function(){
- return"net_comcast_sms.EmoticonChooser"
- };
- net_comcast_sms.EmoticonChooser.prototype.TEMPLATE=net_comcast_sms.TEMPLATE_BASE+"#EmoticonChooser";
- net_comcast_sms.EmoticonChooser.instances=[];
- net_comcast_sms.EmoticonChooser.prototype.charsToImg=function(o){
- for(var a=0,t=this._emoticons.length;
- a<t;
- a++){
- var n=this._emoticons[a];
- if(n.chars==o){
- return n.img
- }}};
- net_comcast_sms.EmoticonChooser.prototype._createHtml=function(){
- this.setContent(AjxTemplate.expand(this.TEMPLATE,{
- id:this.id,count:this._emoticons.length}
- ),true)
- };
- net_comcast_sms.EmoticonChooser.prototype._initialize=function(){
- this._emos=[];
- var e=this.id+"_emo";
- var s=this.id+"_btn";
- for(var o=0,a=this._emoticons.length;
- o<a;
- o++){
- var n=this._emos[o]=Dwt.byId(e+o);
- if(n){
- n.className=this._emoticons[o].img;
- Dwt.setHandler(n,DwtEvent.ONCLICK,AjxCallback.simpleClosure(this._choose,this,this._emoticons[o].chars))
- }
- var t=Dwt.byId(s+o);
- if(t){
- Dwt.setHandler(t,DwtEvent.ONMOUSEOVER,net_comcast_sms.EmoticonChooser.btnOver);
- Dwt.setHandler(t,DwtEvent.ONMOUSEOUT,net_comcast_sms.EmoticonChooser.btnOut)
- }}};
- net_comcast_sms.EmoticonChooser.prototype.toggle=function(){
- if(this._poppedUp){
- this.popdown()
- }else{
- var n=this._button.getLocation();
- var t=this._button.getSize();
- var e=n.x+0.5*t.x;
- var o=n.y+t.y;
- var a=(o+8+Dwt.getSize(Dwt.byId(this.id+"_TopPointer")).y-this._borderHeight+Dwt.getSize(this._div).y<DwtShell.getShell(window).getSize().y-5);
- if(!a){
- o=n.y
- }
- this.popup(e,o,true)
- }};
- net_comcast_sms.EmoticonChooser.prototype._choose=function(e){
- this.popdown();
- caboUtil.run(this._callback,e)
- };
- net_comcast_sms.EmoticonChooser.popdown=function(e){
- var o=net_comcast_sms.EmoticonChooser.instances;
- for(var a=0,t=o.length;
- a<t;
- a++){
- if(!e||!net_comcast_sms.Util.DOM.isAncestor(o[a]._contentDiv,e)){
- o[a].popdown()
- }}};
- (function(){
- var e=document.onmousedown;
- document.onmousedown=function(t){
- if(!t){
- t=window.event
- }
- net_comcast_sms.EmoticonChooser.popdown(t&&(t.target||t.srcElement)||null);
- caboUtil.apply(e,arguments)
- }
- }
- ());
- net_comcast_sms.EmoticonChooser.btnOver=function(t){
- if(!t){
- t=window.event
- }
- var e=(t.target)?t.target:t.srcElement;
- Dwt.addClass(e,"ZHover")
- };
- net_comcast_sms.EmoticonChooser.btnOut=function(t){
- if(!t){
- t=window.event
- }
- var e=(t.target)?t.target:t.srcElement;
- Dwt.delClass(e,"ZHover")
- };
- net_comcast_sms.EmoticonChooser.prototype._positionElement=function(T,z){
- this._popupAction=null;
- var n=this._div;
- var m=this.id+"_";
- var j=this._dialog;
- var q=5;
- var c=8;
- var h=8;
- var e=document.getElementById(m+"TopPointer");
- e.style.display="block";
- var y=Dwt.getSize(e),v=y.x,a=y.y;
- var s=document.getElementById(m+"BottomPointer");
- s.style.display="block";
- y=Dwt.getSize(s),bottomPointerWidth=y.x,bottomPointerHeight=y.y;
- var k=e;
- var r=DwtShell.getShell(window).getSize(),B=r.x,f=r.y;
- var W=Dwt.getSize(n),x=W.x,d=W.y;
- var u=this._borderHeight,C=this._borderHeight,g=this._borderWidth,w=this._borderWidth;
- var A=T-x/2-c,O;
- var t,o,b;
- if(z+h+a-u+d<f-q){
- s.style.display="none";
- O=z+h+a-u;
- t=u-a;
- b=v;
- k=e
- }else{
- e.style.display="none";
- O=z-h-bottomPointerHeight+C-d;
- t=d-C;
- b=bottomPointerWidth;
- k=s
- }
- var l=document.getElementById(m+"Contents");
- if(x-g-w<b){
- l.width=b;
- l.style.width=String(b)+"px"
- }else{
- l.width="auto";
- l.style.width="auto"
- }
- if(A<q){
- A=q
- }else{
- if(A+x>B-q){
- A=B-q-x
- }}
- o=T-A-b/2;
- if(o+b>x-w){
- o=x-w-b
- }
- if(o<g){
- o=g
- }
- k.style.left=o;
- k.style.top=t;
- Dwt.setLocation(n,A,O);
- var p=j?j.getZIndex()+Dwt._Z_INC:Dwt.Z_TOOLTIP;
- Dwt.setZIndex(n,p);
- this._poppedUp=true
- };
- caboUtil.onload("caboUtil.Preferences",function(){
- net_comcast_sms.PrefsView=function(t,a,e){
- if(!arguments.length){
- return
- }
- caboUtil.Preferences.View.call(this,t,a,e)
- };
- net_comcast_sms.PrefsView.prototype=new caboUtil.Preferences.View;
- net_comcast_sms.PrefsView.prototype.constructor=net_comcast_sms.PrefsView;
- net_comcast_sms.PrefsView.prototype.toString=function(){
- return"net_comcast_sms.PrefsView"
- };
- net_comcast_sms.PrefsView.prototype.showMe=function(){
- var e=this._controller.getHandler().getSubscribed(new AjxCallback(this,this._doShow));
- this._doShow(e)
- };
- net_comcast_sms.PrefsView.prototype._doShow=function(t){
- if(AjxUtil.isUndefined(t)){
- this.showLoading()
- }else{
- if(!t){
- this.showUnsubscribed()
- }else{
- this.showChildren(true);
- this.showLoading(false);
- ZmPreferencesPage.prototype.showMe.apply(this,arguments);
- if(!this._isShown){
- this._isShown=true;
- var e=this._controller.getHandler();
- if(!e.getSettingsLoaded()){
- this.showLoading(true);
- e.loadSettings(new AjxCallback(this,this._handleSettingsLoaded))
- }
- this._dwtObjects[ZmSetting.SMS_AUTO_FORWARD_EMAIL].addSelectionListener(new AjxListener(this,this._handleForwardChanged));
- this._handleForwardChanged()
- }}}};
- net_comcast_sms.PrefsView.prototype.showLoading=function(e){
- if(!this._loadingView){
- var t=this._loadingView=new DwtComposite({
- parent:this}
- );
- t.setContent("Loading ...")
- }
- this.showChildren(!e);
- this._loadingView.setVisible(e)
- };
- net_comcast_sms.PrefsView.prototype.showUnsubscribed=function(){
- if(!this._unsubscribedView){
- var e=this._unsubscribedView=new DwtComposite({
- parent:this}
- );
- e.setContent("You are not subscribed to XTM")
- }
- this.showChildren(false);
- this._unsubscribedView.setVisible(true)
- };
- net_comcast_sms.PrefsView.prototype.showChildren=function(e){
- for(var t=0;
- t<this._children.size();
- t++){
- this._children.get(t).setVisible(e)
- }};
- net_comcast_sms.PrefsView.prototype._setupCustom=function(o,e,a){
- if(o=="SMS_UNSUBSCRIBE"){
- var t=this._addButton(Dwt.byId(this.getHTMLElId()+"_SMS_UNSUBSCRIBE"),this._controller.getMsg("unsubscribe"),110,new AjxListener(this,this._unsubscribe));
- this.setFormObject("SMS_UNSUBSCRIBE",t)
- }else{
- return ZmPreferencesPage.prototype._setupCustom.call(this,o,e,a)
- }};
- net_comcast_sms.PrefsView.prototype._handleSettingsLoaded=function(){
- var e=appCtxt.getSettings();
- this._dwtObjects[ZmSetting.SMS_AUTO_FORWARD_EMAIL].setSelectedValue(e.getSetting("SMS_AUTO_FORWARD_EMAIL").value);
- this._dwtObjects[ZmSetting.SMS_AUTO_FORWARD_EMAIL_ADDR].setValue(e.getSetting("SMS_AUTO_FORWARD_EMAIL_ADDR").value);
- this.showLoading(false)
- };
- net_comcast_sms.PrefsView.prototype._handleForwardChanged=function(){
- var e=this._dwtObjects[ZmSetting.SMS_AUTO_FORWARD_EMAIL].getSelectedValue();
- this._dwtObjects[ZmSetting.SMS_AUTO_FORWARD_EMAIL_ADDR].setEnabled(e&&e!="false")
- };
- net_comcast_sms.PrefsView.prototype._unsubscribe=function(){
- var e=this._controller.getHandler();
- var t=this._getUnsubscribeDialog();
- t.reset();
- t.popup()
- };
- net_comcast_sms.PrefsView.prototype._doUnsubscribe=function(a,e){
- var t=this._controller.getHandler();
- t.unsubscribe(a,e)
- };
- net_comcast_sms.PrefsView.prototype._getUnsubscribeDialog=function(){
- if(!this._unsubscribeDialog){
- var e=this._controller.getHandler();
- var t=this._unsubscribeDialog=new net_comcast_sms.UnsubscribeDialog({
- parent:appCtxt.getShell(),handler:e}
- ,new AjxCallback(this,this._doUnsubscribe))
- }
- return this._unsubscribeDialog
- };
- net_comcast_sms.PrefsView.prototype._getTemplateData=function(){
- var e=caboUtil.Preferences.View.prototype._getTemplateData.call(this);
- e.msg=this._controller.getHandler().getMsgObj();
- return e
- }
- }
- );
- net_comcast_sms.ProvisioningView=function(t){
- if(!arguments.length){
- return
- }
- var e=this._controller=t.controller;
- t.className="ProvisioningView";
- DwtComposite.call(this,t);
- this._createHtmlFromTemplate(this.TEMPLATE,{
- id:this.getHTMLElId()}
- );
- this._initialize();
- if(e.isEntitled()){
- e.loadVoiceData(new AjxCallback(this,function(a){
- if(a){
- if(a.code=="voice.SECONDARY_NOT_ALLOWED"){
- this.showNotEntitled()
- }else{
- e.showError(this.getMsg("provErrorException",JSON.stringify(a)),this.getMsg("provErrorHeader"))
- }}else{
- this.showMarketing()
- }}
- ))
- }else{
- this.showNotEntitled()
- }
- this._loaded=true;
- caboUtil.run(this._loadedCallback)
- };
- net_comcast_sms.ProvisioningView.prototype=new DwtComposite();
- net_comcast_sms.ProvisioningView.prototype.constructor=net_comcast_sms.ProvisioningView;
- net_comcast_sms.ProvisioningView.prototype.TEMPLATE=net_comcast_sms.TEMPLATE_BASE+"#Provisioning";
- net_comcast_sms.ProvisioningView.prototype.toString=function(){
- return"net_comcast_sms.ProvisioningView"
- };
- net_comcast_sms.ProvisioningView.prototype.getMsg=function(){
- return this._controller.getMsg.apply(this._controller,arguments)
- };
- net_comcast_sms.ProvisioningView.prototype.setLoadedCallback=function(e){
- if(this._loaded){
- caboUtil.run(e)
- }else{
- this._loadedCallback=e
- }};
- net_comcast_sms.ProvisioningView.prototype._initialize=function(){
- var t=this.getHTMLElId();
- var c=[];
- var p=this._nameLabel=new DwtLabel({
- parent:this,className:"ProvisioningLabel DwtLabel overviewHeader"}
- );
- p.replaceElement(t+"_header");
- p.setText(appCtxt.get(ZmSetting.DISPLAY_NAME)||appCtxt.getUsername());
- var d=this._notEntitled=new DwtIframe({
- parent:this,html:""}
- );
- d.replaceElement(t+"_notEntitled");
- c.push(d);
- var l=this._marketing=new DwtIframe({
- parent:this,html:""}
- );
- l.replaceElement(t+"_marketing");
- c.push(l);
- var u=this._signupButton=new DwtButton({
- parent:this}
- );
- u.replaceElement(t+"_signupButton");
- u.setText(this.getMsg("provSignup"));
- var h=this._terms=new DwtIframe({
- parent:this,html:"",onload:"net_comcast_sms.ProvisioningView.handleShowTerms(this)"}
- );
- Dwt.associateElementWithObject(h.getIframe(),this,"provisioningView");
- h.replaceElement(t+"_terms");
- c.push(h);
- var e=this._costs=new DwtIframe({
- parent:this,html:"",onload:"net_comcast_sms.ProvisioningView.handleShowCosts(this)"}
- );
- Dwt.associateElementWithObject(e.getIframe(),this,"provisioningView");
- e.replaceElement(t+"_costs");
- c.push(e);
- var a=this._congratulations=new DwtIframe({
- parent:this,html:""}
- );
- a.replaceElement(t+"_congratulations");
- c.push(a);
- var y=this._backButton=new DwtButton({
- parent:this}
- );
- y.replaceElement(t+"_backButton");
- y.setText(this.getMsg("provBack"));
- var o=this._declineButton=new DwtButton({
- parent:this}
- );
- o.replaceElement(t+"_declineButton");
- o.setText(this.getMsg("provDecline"));
- var m=this._acceptButton=new DwtButton({
- parent:this}
- );
- m.replaceElement(t+"_acceptButton");
- m.setText(this.getMsg("provAccept"));
- var f=this._okButton=new DwtButton({
- parent:this}
- );
- f.replaceElement(t+"_okButton");
- f.setText(this.getMsg("provOK"));
- var g=this._nextButton=new DwtButton({
- parent:this}
- );
- g.replaceElement(t+"_nextButton");
- g.setText(this.getMsg("provNext"));
- for(var r=0;
- r<c.length;
- r++){
- var s=c[r];
- var n=s.getIframe();
- n.width=n.height="100%"
- }};
- net_comcast_sms.ProvisioningView.prototype.hideAll=function(){
- var e=false;
- this._backButton.setVisible(e);
- this._okButton.setVisible(e);
- this._declineButton.setVisible(e);
- this._acceptButton.setVisible(e);
- this._nextButton.setVisible(e);
- this._signupButton.setVisible(e);
- this._notEntitled.setVisible(e);
- this._marketing.setVisible(e);
- if(this._accountChooser){
- this._accountChooser.setVisible(e)
- }else{
- Dwt.setVisible(Dwt.byId(this.getHTMLElId()+"_accountChooser"),e)
- }
- this._terms.setVisible(e);
- this._costs.setVisible(e);
- this._congratulations.setVisible(e)
- };
- net_comcast_sms.ProvisioningView.prototype._setSelectionListener=function(e,t){
- e.removeSelectionListeners();
- e.addSelectionListener(t)
- };
- net_comcast_sms.ProvisioningView.prototype._hasMultipleTNs=function(){
- return this._tns&&this._tns.length>1
- };
- net_comcast_sms.ProvisioningView.prototype.showMarketing=function(){
- this.hideAll();
- if(!this.__showingMarketing){
- this.__showingMarketing=true;
- this._marketing.setSrc(net_comcast_sms.SmsZimlet.MARKETING)
- }
- this._signupButton.setVisible(true);
- this._setSelectionListener(this._signupButton,new AjxListener(this,this.showCost));
- this._marketing.setVisible(true)
- };
- net_comcast_sms.ProvisioningView.prototype.showNotEntitled=function(){
- this.hideAll();
- this._notEntitled.setSrc(net_comcast_sms.SmsZimlet.NOT_ENTITLED);
- this._notEntitled.setVisible(true)
- };
- net_comcast_sms.ProvisioningView.prototype.showTNChooser=function(e){
- this.hideAll();
- this._controller.showLoading(true,"tns");
- this._controller.getAvailableTNs(new AjxCallback(this,this._handleGetTNs,[e]))
- };
- net_comcast_sms.ProvisioningView.prototype._handleGetTNs=function(e,t,n){
- this._tns=t||[n];
- if(this._hasMultipleTNs()){
- var a=this._backButton,s=this._nextButton;
- if(!this._accountChooser){
- var o=this._accountChooser=new net_comcast_sms.ProvisioningView.AccountChooser({
- parent:this,tns:t,controller:this._controller}
- );
- o.replaceElement(this.getHTMLElId()+"_accountChooser")
- }else{
- var o=this._accountChooser
- }
- this._setSelectionListener(a,new AjxListener(this,this.showMarketing));
- this._setSelectionListener(s,new AjxListener(this,this.showTerms));
- a.setVisible(true);
- s.setVisible(true);
- o.setVisible(true)
- }else{
- if(e){
- this.showMarketing()
- }else{
- this.showTerms()
- }}
- this._controller.showLoading(false,"tns")
- };
- net_comcast_sms.ProvisioningView.prototype.showCost=function(){
- var t=this._acceptButton,n=this._declineButton,s=this._okButton,a=this._costs,e=net_comcast_sms.Provisioning.isLimited();
- this.hideAll();
- if(!this.__showingCosts){
- this._controller.showLoading(true,"costs");
- this.__showingCosts=true;
- var o=e?net_comcast_sms.SmsZimlet.COSTS_LIMITED:net_comcast_sms.SmsZimlet.COSTS_UNLIMITED;
- a.setSrc(o)
- }else{
- this._handleShowCosts()
- }
- this._setSelectionListener(n,new AjxListener(this,this.showMarketing,[true]));
- this._setSelectionListener(t,new AjxListener(this,this.showTNChooser,[false]));
- this._setSelectionListener(s,new AjxListener(this,this.showTNChooser,[false]));
- if(e){
- n.setEnabled(true);
- n.setVisible(true);
- t.setEnabled(true);
- t.setVisible(true)
- }else{
- s.setVisible(true);
- s.setEnabled(true)
- }
- a.setVisible(true)
- };
- net_comcast_sms.ProvisioningView.handleShowCosts=function(t){
- var e=Dwt.getObjectFromElement(t,"provisioningView");
- if(e&&e.__showingCosts){
- e._handleShowCosts()
- }};
- net_comcast_sms.ProvisioningView.prototype._handleShowCosts=function(){
- this._controller.showLoading(false,"costs")
- };
- net_comcast_sms.ProvisioningView.prototype.showTerms=function(){
- var t=this._acceptButton,a=this._declineButton,e=this._terms;
- this.hideAll();
- if(!this.__showingTerms){
- this._controller.showLoading(true,"terms");
- this.__showingTerms=true;
- e.setSrc(net_comcast_sms.SmsZimlet.TERMS)
- }else{
- this._handleShowTerms()
- }
- e.setVisible(true)
- };
- net_comcast_sms.ProvisioningView.handleShowTerms=function(t){
- var e=Dwt.getObjectFromElement(t,"provisioningView");
- if(e&&e.__showingTerms){
- e._handleShowTerms()
- }};
- net_comcast_sms.ProvisioningView.prototype._handleShowTerms=function(){
- var e=this._acceptButton,t=this._declineButton;
- this._setSelectionListener(t,new AjxListener(this,this.showCost));
- this._setSelectionListener(e,new AjxListener(this,this.signup,[null]));
- e.setEnabled(true);
- e.setVisible(true);
- t.setEnabled(true);
- t.setVisible(true);
- this._controller.showLoading(false,"terms")
- };
- net_comcast_sms.ProvisioningView.prototype.signup=function(e){
- this._declineButton.setEnabled(false);
- this._acceptButton.setEnabled(false);
- this._controller.showLoading(true,"signup");
- if(e){
- this._tns=[e]
- }
- this._controller.signup(this._hasMultipleTNs()?this._accountChooser.getSelectedValue():this._tns[0],new AjxCallback(this,this._handleSignup))
- };
- net_comcast_sms.ProvisioningView.prototype._handleSignup=function(t,e){
- this._controller.showLoading(false,"signup");
- if(t){
- this.showCongratulations()
- }else{
- net_comcast_sms.Util.UI.dialog(this.getMsg("provFailed",e),this.getMsg("provErrorTitle"));
- this._declineButton.setEnabled(true);
- this._acceptButton.setEnabled(true)
- }};
- net_comcast_sms.ProvisioningView.prototype.showCongratulations=function(){
- var t=this._okButton;
- this.hideAll();
- var e=net_comcast_sms.SmsZimlet.CONGRATULATIONS;
- this._congratulations.setSrc(e);
- t.setVisible(true);
- t.setEnabled(true);
- this._setSelectionListener(t,new AjxListener(this,this.close))
- };
- net_comcast_sms.ProvisioningView.prototype.close=function(){
- this.setVisible(false)
- };
- net_comcast_sms.ProvisioningView.AccountChooser=function(e){
- if(!arguments.length){
- return
- }
- this._controller=e.controller;
- this._tns=e.tns;
- DwtComposite.call(this,e);
- this._createHtmlFromTemplate(this.TEMPLATE,{
- id:this.getHTMLElId()}
- );
- this._initialize()
- };
- net_comcast_sms.ProvisioningView.AccountChooser.prototype=new DwtComposite();
- net_comcast_sms.ProvisioningView.AccountChooser.prototype.constructor=net_comcast_sms.ProvisioningView.AccountChooser;
- net_comcast_sms.ProvisioningView.AccountChooser.prototype.TEMPLATE="net_comcast_sms#Provisioning.AccountChooser";
- net_comcast_sms.ProvisioningView.AccountChooser.prototype.toString=function(){
- return"net_comcast_sms.ProvisioningView"
- };
- net_comcast_sms.ProvisioningView.AccountChooser.prototype._initialize=function(){
- var r=this.getHTMLElId();
- var s=new DwtLabel({
- parent:this,className:"AccountChooserText"}
- );
- s.replaceElement(r+"_text1");
- s.setText(this._controller.getMsg("provText1"));
- var t=this._radioButtons=[];
- var n=Dwt.byId(r+"_list");
- for(var e=0;
- e<this._tns.length;
- e++){
- var o=new net_comcast_sms.ProvisioningView.AccountChooser.RadioButton({
- parent:this,style:DwtCheckbox.ALIGN_LEFT|DwtCheckbox.TEXT_LEFT,name:"tnChooser",value:this._tns[e],checked:e==0}
- );
- o.setText(this._tns[e]);
- o.reparentHtmlElement(n);
- o.addSelectionListener(new AjxListener(this,this._updateRadioClass));
- t.push(o)
- }
- this._updateRadioClass();
- var a=new DwtLabel({
- parent:this,className:"AccountChooserText"}
- );
- a.replaceElement(r+"_text2");
- a.setText(this._controller.getMsg("provText2"))
- };
- net_comcast_sms.ProvisioningView.AccountChooser.prototype._updateRadioClass=function(){
- for(i=0;
- i<this._radioButtons.length;
- i++){
- var e=this._radioButtons[i];
- e.condClassName(e.isSelected(),"ZSelected","")
- }};
- net_comcast_sms.ProvisioningView.AccountChooser.prototype.getSelectedValue=function(){
- for(i=0;
- i<this._radioButtons.length;
- i++){
- var e=this._radioButtons[i];
- if(e.isSelected()){
- return e.getValue()
- }}};
- AjxPackage.require({
- name:"Ajax",callback:new AjxCallback(this,function(){
- AjxDispatcher.setLoaded("Ajax",true);
- net_comcast_sms.ProvisioningView.AccountChooser.RadioButton=function(e){
- if(!arguments.length){
- return
- }
- DwtRadioButton.call(this,e);
- this._image=Dwt.byId(this.getHTMLElId()+"_image_right")
- };
- net_comcast_sms.ProvisioningView.AccountChooser.RadioButton.prototype=new DwtRadioButton;
- net_comcast_sms.ProvisioningView.AccountChooser.RadioButton.prototype.constructor=net_comcast_sms.ProvisioningView.AccountChooser.RadioButton;
- net_comcast_sms.ProvisioningView.AccountChooser.RadioButton.prototype.TEMPLATE="net_comcast_sms#Provisioning.AccountChooser.RadioButton"
- }
- )}
- );
- net_comcast_sms.ErrorView=function(e){
- if(!arguments.length){
- return
- }
- this._controller=e.controller;
- DwtComposite.call(this,{
- parent:e.parent,className:e.className||"ErrorView DwtComposite",posStyle:e.posStyle||Dwt.ABSOLUTE_STYLE,noMaximize:false,controller:e.controller}
- )
- };
- net_comcast_sms.ErrorView.prototype=new DwtComposite;
- net_comcast_sms.ErrorView.prototype.constructor=net_comcast_sms.ErrorView;
- net_comcast_sms.ErrorView.prototype.toString=function(){
- return"net_comcast_sms.ErrorView"
- };
- net_comcast_sms.ErrorView.prototype.TEMPLATE=net_comcast_sms.TEMPLATE_BASE+"#ErrorView";
- net_comcast_sms.ErrorView.prototype.setVisible=function(e){
- if(e&&!this.created){
- this._createHtml()
- }
- DwtComposite.prototype.setVisible.call(this,e)
- };
- net_comcast_sms.ErrorView.prototype._createHtml=function(){
- var e=this.getHTMLElId();
- this._createHtmlFromTemplate(this.TEMPLATE,{
- id:e,img:this._controller.getHandler().getResource("img/error.gif"),msg:this._controller.getHandler().getMsgObj()}
- );
- this._titleEl=Dwt.byId(e+"_title");
- this._msgEl=Dwt.byId(e+"_msg");
- this._created=true;
- if(this._msg){
- this.setMsg(this._msg)
- }
- if(this._title){
- this.setTitle(this._title)
- }};
- net_comcast_sms.ErrorView.prototype.setMsg=function(e){
- this._msg=e;
- if(this._created){
- this._msgEl.innerHTML=e
- }};
- net_comcast_sms.ErrorView.prototype.setTitle=function(e){
- this._title=e;
- if(this._created){
- this._titleEl.innerHTML=e
- }};
- AjxDispatcher.addPackageLoadFunction("Ajax",new AjxCallback(function(){
- net_comcast_sms.UnsubscribeDialog=function(t,a){
- var e=this._handler=t.handler;
- t.buttons=[DwtDialog.OK_BUTTON,DwtDialog.CANCEL_BUTTON];
- t.extraButtons=[new DwtDialog_ButtonDescriptor("UNSUBSCRIBE",e.getMsg("unsubscribe"),DwtDialog.ALIGN_RIGHT)];
- t.id="smsUnsubscribe";
- DwtMessageDialog.call(this,t);
- this.setButtonListener("UNSUBSCRIBE",new AjxListener(this,this._unsubscribe,[a]));
- this.reset()
- };
- net_comcast_sms.UnsubscribeDialog.prototype=new DwtMessageDialog;
- net_comcast_sms.UnsubscribeDialog.prototype.constructor=net_comcast_sms.UnsubscribeDialog;
- net_comcast_sms.UnsubscribeDialog.prototype.reset=function(){
- this.setMessage(this._handler.getMsg("unsubscribeBody"),DwtMessageDialog.WARNING_STYLE,this._handler.getMsg("unsubscribeHead"));
- this.setButtonVisible(DwtDialog.OK_BUTTON,false);
- this.setButtonVisible(DwtDialog.CANCEL_BUTTON,true);
- this.setButtonVisible("UNSUBSCRIBE",true)
- };
- net_comcast_sms.UnsubscribeDialog.prototype._unsubscribe=function(e){
- appCtxt.getShell().setBusy(true,this.getHTMLElId(),false,30000);
- this.setMessage(this._handler.getMsg("unsubscribeBodyProc"),DwtMessageDialog.INFO_STYLE,this._handler.getMsg("unsubscribeHeadProc"));
- this.setButtonVisible("UNSUBSCRIBE",false);
- this.setButtonVisible(DwtDialog.CANCEL_BUTTON,false);
- caboUtil.run(e,new AjxCallback(this,this._finish),new AjxCallback(this,this._fail))
- };
- net_comcast_sms.UnsubscribeDialog.prototype._finish=function(e){
- appCtxt.getShell().setBusy(false,this.getHTMLElId());
- this.setMessage(this._handler.getMsg("unsubscribeBodyFinish"),DwtMessageDialog.INFO_STYLE,this._handler.getMsg("unsubscribeHeadFinish"));
- this.setButtonVisible(DwtDialog.OK_BUTTON,true);
- this.setButtonListener(DwtDialog.OK_BUTTON,new AjxListener(this,this._end,[e]))
- };
- net_comcast_sms.UnsubscribeDialog.prototype._fail=function(e){
- appCtxt.getShell().setBusy(false,this.getHTMLElId());
- this.setMessage(this._handler.getMsg("unsubscribeBodyFail"),DwtMessageDialog.INFO_STYLE,this._handler.getMsg("unsubscribeHeadFail"));
- this.setButtonVisible(DwtDialog.OK_BUTTON,true);
- this.setButtonListener(DwtDialog.OK_BUTTON,new AjxListener(this,this._end,[e]))
- };
- net_comcast_sms.UnsubscribeDialog.prototype._end=function(e){
- this.popdown();
- caboUtil.run(e)
- }
- }
- ));
- skin.overrideAPI(VelodromeSkin.prototype,"show",function(){
- arguments.callee.func.apply(this,arguments);
- if(!this._hasRun){
- this._hasRun=true;
- setTimeout(function(){
- appCtxt.getAppController().addPostRenderCallback(new AjxCallback({}
- ,function(){
- window.Net_Comcast_Sms=new net_comcast_sms.SmsZimlet();
- window.Net_Comcast_Sms.init()
- }
- ))
- }
- ,0)
- }}
- );
- </script>
- <script type="text/javascript" src="/zimbra/js/skin.js?client=advanced&skin=velodrome2&locale=en_US&debug=false&compress=true&templates=only&v=110527090709"></script>
- <script>
- // compile locale specific templates
- for (var pkg in window.AjxTemplateMsg) {
- var text = AjxTemplateMsg[pkg];
- AjxTemplate.compile(pkg, true, true, text);
- }
- </script>
- <script>
- var cacheKillerVersion = "110527090709";
- function launch() {
- // quit if this function has already been called
- if (arguments.callee.done) {return;}
- // flag this function so we don't do the same thing twice
- arguments.callee.done = true;
- // kill the timer
- if (_timer) {
- clearInterval(_timer);
- _timer = null;
- }
- var prodMode = true;
- var debugLevel = "";
- if (!prodMode || debugLevel) {
- AjxDispatcher.require("Debug");
- DBG = new AjxDebug(AjxDebug.NONE, null, false);
- // figure out the debug level
- if (debugLevel == 't') {
- DBG.showTiming(true);
- } else {
- DBG.setDebugLevel(debugLevel);
- }
- }
- AjxHistoryMgr.BLANK_FILE = "/zimbra/public/blankHistory.html";
- var noSplashScreen = "";
- var protocolMode = "http";
- var batchInfoResponse = {"Header":{"context":{"session":{"id":"14023552","_content":"14023552"},"refresh":{"version":"6.0.13_GA_2944 20111101161122 20111101-1613 NETWORK","mbx":[{"s":35500633}],"folder":[{"id":"1","name":"USER_ROOT","l":"11","rev":1,"ms":1,"n":0,"s":0,"i4ms":1,"i4next":2,"folder":[{"id":"16","name":"Briefcase","l":"1","view":"document","rev":1,"ms":1,"n":0,"s":0,"i4ms":1,"i4next":17},{"id":"10","name":"Calendar","l":"1","f":"#","view":"appointment","rev":1,"ms":1,"n":0,"s":0,"i4ms":1,"i4next":11},{"id":"14","name":"Chats","l":"1","view":"message","rev":1,"ms":1,"n":0,"s":0,"i4ms":1,"i4next":15},{"id":"7","name":"Contacts","l":"1","view":"contact","rev":1,"ms":1,"n":1,"s":0,"i4ms":867,"i4next":1122},{"id":"6","name":"Drafts","l":"1","view":"message","rev":1,"ms":3,"n":1,"s":45190,"i4ms":424312,"i4next":83407},{"id":"13","name":"Emailed Contacts","l":"1","view":"contact","rev":1,"ms":1,"n":0,"s":0,"i4ms":1,"i4next":14},{"id":"2","name":"Inbox","l":"1","f":"u","u":325,"view":"message","rev":1,"ms":861,"n":1131,"s":35455313,"i4ms":1310800,"i4next":248221},{"id":"4","name":"Junk","l":"1","view":"message","rev":1,"ms":862,"n":0,"s":0,"i4ms":278700,"i4next":54582},{"id":"12","name":"Notebook","l":"1","view":"wiki","rev":1,"ms":1,"n":0,"s":0,"i4ms":1,"i4next":13},{"id":"5","name":"Sent","l":"1","view":"message","rev":1,"ms":863,"n":0,"s":0,"i4ms":1205217,"i4next":228376},{"id":"15","name":"Tasks","l":"1","f":"#","view":"task","rev":1,"ms":1,"n":0,"s":0,"i4ms":1,"i4next":16},{"id":"3","name":"Trash","l":"1","rev":1,"ms":864,"n":0,"s":0,"i4ms":1205218,"i4next":228378}]}]},"change":{"token":1310899},"_jsns":"urn:zimbra"}},"Body":{"BatchResponse":{"GetInfoResponse":[{"version":"6.0.13_GA_2944 20111101161122 20111101-1613 NETWORK","id":"e150e9f7-465d-4759-a68d-258b42c273d1","name":"armada15@comcast.net","crumb":"23f436aeb5d05d4b218b0d2e5c51b376","lifetime":43196401,"docSizeLimit":36700160,"attSizeLimit":36700160,"rest":"http://sz0133.wc.mail.comcast.net:80/home/armada15@comcast.net","used":35500633,"prevSession":1329989027000,"accessed":1329989027000,"recent":1133,"cos":{"id":"5589aa3c-b8cd-4fc3-8d34-8d60bb1d3496","name":"combo-secondary"},"prefs":{"_attrs":{"zimbraPrefSentLifetime":"30d","zimbraPrefShowSelectionCheckbox":"TRUE","zimbraPrefReadingPaneEnabled":"FALSE","zimbraPrefGroupMailBy":"message","zimbraPrefDeleteInviteOnReply":"TRUE","zimbraPrefSentMailFolder":"sent","zimbraPrefGalAutoCompleteEnabled":"FALSE","zimbraPrefMailDefaultCharset":"UTF-8","zimbraPrefForwardIncludeOriginalText":"includeBody","zimbraPrefShowFragments":"FALSE","zimbraPrefImapSearchFoldersEnabled":"FALSE","zimbraPrefHtmlEditorDefaultFontFamily":"Arial","zimbraPrefInboxReadLifetime":"0d","zimbraPrefVoiceItemsPerPage":"25","zimbraPrefShowSearchString":"FALSE","zimbraPrefAutoAddAddressEnabled":"FALSE","zimbraPrefComposeFormat":"html","zimbraPrefForwardReplyInOriginalFormat":"FALSE","zimbraPrefAutoSaveDraftInterval":"0","zimbraPrefIMNotifyPresence":"TRUE","zimbraPrefOpenMailInNewWindow":"FALSE","zimbraPrefHtmlEditorDefaultFontColor":"#000000","zimbraPrefContactsInitialView":"list","zimbraPrefOutOfOfficeReplyEnabled":"FALSE","zimbraPrefCalendarAlwaysShowMiniCal":"TRUE","zimbraPrefClientType":"advanced","zimbraPrefTimeZoneId":"(GMT-05.00) Eastern Time (US & Canada)","zimbraPrefReadingPaneLocation":"off","zimbraPrefCalendarApptReminderWarningTime":"5","zimbraPrefInboxUnreadLifetime":"45d","zimbraPrefContactsPerPage":"25","zimbraPrefWarnOnExit":"FALSE","zimbraPrefIMInstantNotify":"FALSE","zimbraPrefOutOfOfficeCacheDuration":"7d","zimbraPrefIncludeTrashInSearch":"FALSE","zimbraPrefHtmlEditorDefaultFontSize":"12pt","zimbraPrefComposeInNewWindow":"FALSE","zimbraPrefIncludeSpamInSearch":"FALSE","zimbraPrefMailItemsPerPage":"25","zimbraPrefCalendarDayHourStart":"8","zimbraPrefUseKeyboardShortcuts":"TRUE","zimbraPrefUseRfc2231":"FALSE","zimbraPrefReplyIncludeOriginalText":"includeBody","zimbraPrefDedupeMessagesSentToSelf":"dedupeNone","zimbraPrefSaveToSent":"FALSE","zimbraPrefSkin":"velodrome2","zimbraPrefCalendarFirstDayOfWeek":"0","zimbraPrefMailInitialSearch":"in:inbox","zimbraPrefCalendarInitialView":"workWeek","zimbraPrefUseTimeZoneListInCalendar":"FALSE","zimbraPrefMailPollingInterval":"5m","zimbraPrefIMNotifyStatus":"TRUE","zimbraPrefTrashLifetime":"1d","zimbraPrefDisplayExternalImages":"TRUE","zimbraPrefJunkLifetime":"3d","zimbraPrefCalendarDayHourEnd":"18","zimbraPrefForwardReplyPrefixChar":"\u003E","zimbraPrefCalendarNotifyDelegatedChanges":"FALSE","zimbraPrefMailSignatureStyle":"outlook","zimbraPrefIMAutoLogin":"FALSE","zimbraPrefMessageViewHtmlPreferred":"TRUE","zimbraPrefIMFlashIcon":"TRUE","zimbraPrefCalendarUseQuickAdd":"TRUE"}},"attrs":{"_attrs":{"zimbraFeatureNotebookEnabled":"FALSE","zimbraFeatureSkinChangeEnabled":"FALSE","zimbraFeatureConversationsEnabled":"TRUE","zimbraZimletAvailableZimlets":["+comcast_promo","+com_zimbra_gm","+comcast_html","+comcast_newsfeed","+comcast_accounts","+comcast_search","+com_zimbra_url","+com_zimbra_email","+comcast_msgcenterad","+comcast_omniture","+comcast_msgcontact","+comcast_contactactions","+comcast_adsrvc","+comcast_voice","+comcast_hello"],"zimbraPrefReadingPaneEnabled":"FALSE","zimbraFeatureOutOfOfficeReplyEnabled":"TRUE","zimbraFeatureFlaggingEnabled":"FALSE","zimbraAllowAnyFromAddress":"FALSE","zimbraFeatureContactsEnabled":"TRUE","zimbraFeatureInitialSearchPreferenceEnabled":"FALSE","zimbraLocale":"en_US","zimbraFeatureMailForwardingEnabled":"TRUE","zimbraFeatureIMEnabled":"FALSE","zimbraFeatureVoiceEnabled":"TRUE","zimbraFeatureReadReceiptsEnabled":"FALSE","zimbraSignatureMaxNumEntries":"3","zimbraFeatureMailPollingIntervalPreferenceEnabled":"FALSE","zimbraFeatureCalendarEnabled":"FALSE","zimbraPrefReadingPaneLocation":"off","zimbraFeatureTaggingEnabled":"FALSE","zimbraFeaturePortalEnabled":"TRUE","zimbraFeatureMobileSyncEnabled":"FALSE","zimbraFeaturePop3DataSourceEnabled":"TRUE","zimbraFeatureNewMailNotificationEnabled":"FALSE","zimbraMailTrashLifetime":"0","uid":"armada15","zimbraFeatureOptionsEnabled":"TRUE","zimbraId":"e150e9f7-465d-4759-a68d-258b42c273d1","zimbraFeatureSharingEnabled":"FALSE","zimbraMailQuota":"10737418240","zimbraFeatureTasksEnabled":"FALSE","zimbraFeatureCalendarUpsellURL":"http://calendar.comcast.net/calendar/?skin=none","zimbraFeatureAdvancedSearchEnabled":"FALSE","zimbraFeatureGalAutoCompleteEnabled":"FALSE","zimbraFeatureShortcutAliasesEnabled":"FALSE","zimbraFeatureCalendarUpsellEnabled":"TRUE","zimbraFeatureGalEnabled":"FALSE","zimbraFeatureImapDataSourceEnabled":"TRUE","zimbraFeatureChangePasswordEnabled":"FALSE","zimbraMailSignatureMaxLength":"5120","zimbraFeatureMailEnabled":"TRUE","zimbraFeatureViewInHtmlEnabled":"FALSE","zimbraFeatureHtmlComposeEnabled":"TRUE","cn":"102535030029112006Comcast.USR8JR","zimbraFeatureVoiceUpsellEnabled":"FALSE","zimbraPortalName":"velodrome2","zimbraFeatureSavedSearchesEnabled":"FALSE","zimbraFeatureIdentitiesEnabled":"TRUE","zimbraContactMaxNumEntries":"10000","zimbraFeatureFiltersEnabled":"TRUE","zimbraSignatureMinNumEntries":"3","zimbraFeatureNewAddrBookEnabled":"FALSE","displayName":"armada15"}},"zimlets":{"zimlet":[{"zimletContext":[{"baseUrl":"/service/zimlet/com_zimbra_email/","priority":0,"presence":"enabled"}],"zimlet":[{"description":"Highlights and previews associated contact for an email address.","name":"com_zimbra_email","target":"main view-window","version":"2.0_6.0.13.20110802.033552","include":[{"_content":"email.js"}],"handlerObject":[{"_content":"Com_Zimbra_Email"}],"contentObject":[{"type":"email","matchOn":[{"regex":[{"attrs":"ig","_content":"\\b(mailto:[ ]*)?([0-9a-zA-Z]+[.&#!$%'*+-/=?^_`{}|~])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}([\\w/_\\.]*(\\?\\S+)?)\\b"}]}],"contextMenu":[{"menuItem":[{"id":"SEARCH","icon":"Search","label":"${msg.search}"},{"id":"SEARCHBUILDER","icon":"SearchBuilder","label":"${msg.advancedSearch}"},{"id":"NEWEMAIL","icon":"NewMessage","label":"${msg.newEmail}"},{"id":"NEWIM","icon":"ImAvailable","label":"${msg.newIM}"},{"id":"NEWCONTACT","icon":"Edit","label":"${msg.newContact}"},{"id":"ADDTOFILTER","icon":"AddFilter","label":"${msg.addToFilter}"},{"id":"GOTOURL","icon":"URL","label":"${msg.goToUrl}"}]}]}]}],"zimletConfig":[{"name":"com_zimbra_email","version":"1.0","global":[{"property":[{"name":"yahooSocialEnabled","_content":"false"}]}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/com_zimbra_url/","priority":1,"presence":"enabled"}],"zimlet":[{"description":"Highlights and links URLs.","name":"com_zimbra_url","target":"main view-window","version":"2.0_6.0.13.20111101.043516","include":[{"_content":"url.js"}],"resource":[{"_content":"blank_pixel.gif"}],"handlerObject":[{"_content":"Com_Zimbra_Url"}],"serverExtension":[{"extensionClass":"com.zimbra.cs.zimlet.handler.RegexHandler","hasKeyword":"url"}],"contentObject":[{"type":"url","matchOn":[{"regex":[{"attrs":"ig","_content":"((telnet:)|((https?|ftp|gopher|news|file):\\/\\/)|(www\\.[\\w\\.\\_\\-]+))[^\\s\\xA0\\(\\)\\\u003C\\\u003E\\[\\]\\{\\}\\'\\\"]*"}]}]}]}],"zimletConfig":[{"name":"com_zimbra_url","version":"1.0","global":[{"property":[{"name":"ZIMLET_CONFIG_REGEX_VALUE","_content":"((telnet:)|((https?|ftp|gopher|news|file):\\/\\/)|(www\\.[\\w\\.\\_\\-]+))[^\\s\\\u003C\\\u003E\\[\\]\\{\\}\\'\\\"]*"},{"name":"ZIMLET_UNC_REGEX_VALUE","_content":"\\s*\\\\\\\\[a-zA-Z0-9.-_]+.*\\s*"},{"name":"stripUrls","_content":"true"},{"name":"disablePreview","_content":"true"},{"name":"supportUNC","_content":"true"}]}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_contactactions/","priority":2,"presence":"enabled"}],"zimlet":[{"description":"Adds actions to contact views","name":"comcast_contactactions","version":"1.0","include":[{"_content":"contactactions.js"},{"_content":"templates/ContactActions.template.js"}],"includeCSS":[{"_content":"contactactions.css"}],"handlerObject":[{"_content":"ComcastContactActions"}]}],"zimletConfig":[{"name":"comcast_contactactions","version":"1.0","global":[{}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_hello/","priority":3,"presence":"enabled"}],"zimlet":[{"description":"Hello","name":"comcast_hello","version":"1.0","include":[{"_content":"hello.js"},{"_content":"templates/Hello.template.js"}],"includeCSS":[{"_content":"hello.css"}],"handlerObject":[{"_content":"ComcastHello"}],"portlet":[{}]}],"zimletConfig":[{"name":"comcast_hello","version":"1.0","global":[{}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_html/","priority":4,"presence":"enabled"}],"zimlet":[{"description":"HTML","name":"comcast_html","version":"1.0","include":[{"_content":"html.js"}],"handlerObject":[{"_content":"ComcastHtml"}],"portlet":[{}]}],"zimletConfig":[{"name":"comcast_html","version":"1.0","global":[{}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_msgcontact/","priority":5,"presence":"enabled"}],"zimlet":[{"description":"Adds contact data to message view","name":"comcast_msgcontact","target":"main view-window","version":"1.0","include":[{"_content":"msgcontact.js"},{"_content":"templates/MsgContact.template.js"}],"includeCSS":[{"_content":"msgcontact.css"}],"handlerObject":[{"_content":"ComcastMsgContact"}]}],"zimletConfig":[{"name":"comcast_msgcontact","version":"1.0","global":[{"property":[{"name":"SZheaderName","_content":"X-SmartZone-Brand"},{"name":"CCheaderValue","_content":"comcast"},{"name":"GMheaderName","_content":"X-GoodmailSystems-Isp"},{"name":"GMheaderValue","_content":"goodmail"},{"name":"headerName","_content":"X-GoodmailSystems-Isp"},{"name":"headerValue","_content":"comcast"},{"name":"GoodmailUrl","_content":"http://www.comcast.net/certifiedemail"},{"name":"ComcastUrl","_content":"http://customer.comcast.com/Pages/FAQViewer.aspx?seoid=branded-mail"}]}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_newsfeed/","priority":6,"presence":"enabled"}],"zimlet":[{"description":"News Feeds","name":"comcast_newsfeed","version":"1.0","include":[{"_content":"newsfeed.js"}],"includeCSS":[{"_content":"newsfeed.css"}],"handlerObject":[{"_content":"ComcastNewsFeed"}],"portlet":[{}]}],"zimletConfig":[{"name":"comcast_newsfeed","version":"1.0","global":[{"property":[{"name":"allowedDomains","_content":"*.comcast.net"}]}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_promo/","priority":7,"presence":"enabled"}],"zimlet":[{"description":"Promotions","name":"comcast_promo","version":"1.0","include":[{"_content":"promotions.js"},{"_content":"templates/Promotions.template.js"}],"includeCSS":[{"_content":"promotions.css"}],"handlerObject":[{"_content":"ComcastPromotions"}],"portlet":[{}]}],"zimletConfig":[{"name":"comcast_promo","version":"1.0","global":[{"property":[{"name":"allowedDomains","_content":"*.comcast.net"}]}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_search/","priority":8,"presence":"enabled"}],"zimlet":[{"description":"Search","name":"comcast_search","version":"1.0","include":[{"_content":"search.js"}],"handlerObject":[{"_content":"ComcastSearch"}]}],"zimletConfig":[{"name":"comcast_search","version":"1.0","global":[{}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_omniture/","priority":9,"presence":"enabled"}],"zimlet":[{"description":"Tracks Zimbra Web Client usage.","name":"comcast_omniture","version":"1.0_6.0.5.20100216.112139","include":[{"_content":"comcast_omniture.js"},{"_content":"s_code.js"}],"handlerObject":[{"_content":"Comcast_Omniture"}]}],"zimletConfig":[{"name":"comcast_omniture","version":"1.0","global":[{}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/com_zimbra_gm/","priority":10,"presence":"enabled"}],"zimlet":[{"description":"Allows message list badging of subsidized spam","name":"com_zimbra_gm","version":"20110407.00","include":[{"_content":"com_zimbra_gm.js"}],"includeCSS":[{"_content":"com_zimbra_gm.css"}],"handlerObject":[{"_content":"com_zimbra_gm"}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_accounts/","priority":11,"presence":"enabled"}],"zimlet":[{"description":"Accounts","name":"comcast_accounts","version":"1.0","include":[{"_content":"accounts.js"},{"_content":"templates/Accounts.template.js"}],"includeCSS":[{"_content":"accounts.css"}],"handlerObject":[{"_content":"ComcastAccounts"}],"portlet":[{}]}],"zimletConfig":[{"name":"comcast_accounts","version":"1.0","global":[{}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_adsrvc/","priority":12,"presence":"enabled"}],"zimlet":[{"description":"AdService","name":"comcast_adsrvc","version":"2.0","include":[{"_content":"adsrvc.js"}],"includeCSS":[{"_content":"adsrvc.css"}],"handlerObject":[{"_content":"Comcast_Adsrvc"}]}],"zimletConfig":[{"name":"comcast_adsrvc","version":"2.0","global":[{"property":[{"name":"refreshCount","_content":"3"},{"name":"comcast-skyscraperad","_content":"\n \u003Ciframe src=\"http://pn2.adserver.yahoo.com/a?f=yahoo_ad_space_id&pn=comcast&p=com-mail&l=SKY&c=sh&bg=f5f5f5&no_expandable=1\"\n marginwidth=\"0\"\n marginheight=\"0\"\n width=\"160\"\n height=\"100%\"\n border=\"0\"\n frameborder=\"0\"\n style=\"border:none;\"\n scrolling=\"no\" align=\"center\"\u003E\u003C/iframe\u003E\n \n "},{"name":"comcast-skyscraperad-view","_content":"\n \u003Ciframe src=\"/h/msgviewAds\"\n marginwidth=\"0\"\n marginheight=\"0\"\n width=\"160\"\n height=\"100%\"\n border=\"0\"\n frameborder=\"0\"\n style=\"border:none;\"\n scrolling=\"no\" align=\"center\"\u003E\u003C/iframe\u003E\n \n "},{"name":"comcast-skyscraperad-list","_content":"\n \u003Ciframe src=\"/h/msglistAds\"\n marginwidth=\"0\"\n marginheight=\"0\"\n width=\"160\"\n height=\"100%\"\n border=\"0\"\n frameborder=\"0\"\n style=\"border:none;\"\n scrolling=\"no\" align=\"center\"\u003E\u003C/iframe\u003E\n \n "},{"name":"comcastAdInfo","_content":"http://www.comcast.net/adinformation/"},{"name":"comcastAdFeedback","_content":"https://www.surveymonkey.com/s.aspx?sm=FyNNVDhj_2f2FNc2KVOHQ4eg_3d_3d"},{"name":"autoExpandSideBarAd","_content":"false"},{"name":"hideSideBarAd","_content":"false"},{"name":"list_ad_space_id","_content":"2142030097"},{"name":"msg_ad_space_id","_content":"2142030098"}]}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_msgcenterad/","priority":13,"presence":"enabled"}],"zimlet":[{"description":"MsgCenter Ad","name":"comcast_msgcenterad","version":"1.0","include":[{"_content":"msgcenterad.js"}],"includeCSS":[{"_content":"msgcenterad.css"}],"handlerObject":[{"_content":"ComcastMsgCenterAd"}],"portlet":[{}]}],"zimletConfig":[{"name":"comcast_msgcenterad","version":"1.0","global":[{"property":[{"name":"comcast_msgcenterad","_content":"\n \u003Ciframe src=\"\"\n marginwidth=\"0\"\n marginheight=\"0\"\n width=\"300\"\n height=\"264\"\n border=\"0\"\n frameborder=\"0\"\n style=\"border:none;\"\n scrolling=\"no\" align=\"center\"\u003E\u003C/iframe\u003E\n "},{"name":"comcast_msgcenterad_url","_content":"http://pn2.adserver.yahoo.com/a?f=2022363872&pn=comcast&p=com-mail&l=LREC&c=sh&bg=ffffff&no_expandable=1"},{"name":"comcast_msgcenterad_hurl","_content":"/h/msgcenterAds"},{"name":"comcastAdInfo","_content":"http://www.comcast.net/adinformation/"},{"name":"comcastAdFeedback","_content":"https://www.surveymonkey.com/s.aspx?sm=FyNNVDhj_2f2FNc2KVOHQ4eg_3d_3d"}]}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_voice/","priority":14,"presence":"enabled"}],"zimlet":[{"description":"Comcast Voice Preferences","name":"comcast_voice","version":"1.1","include":[{"_content":"voice.js"},{"_content":"controller/ComcastVoiceListController.js"},{"_content":"controller/ComcastCallListController.js"},{"_content":"controller/ComcastVoicemailListController.js"},{"_content":"controller/ComcastVoicePrefsController.js"},{"_content":"controller/ComcastVoicePrefsGeneralController.js"},{"_content":"controller/ComcastVoicePrefsNotificationController.js"},{"_content":"controller/ComcastVoicePrefsForwardingController.js"},{"_content":"controller/ComcastVoicePrefsRejectionController.js"},{"_content":"view/ComcastVoicePrefsView.js"},{"_content":"view/list/ComcastVoicePhoneList.js"},{"_content":"view/list/ComcastVoiceBufferList.js"},{"_content":"view/list/ComcastVoicePhoneBufferList.js"},{"_content":"view/page/ComcastVoicePrefsPage.js"},{"_content":"view/page/ComcastVoiceGeneralPage.js"},{"_content":"view/page/ComcastVoiceNotificationPage.js"},{"_content":"view/page/ComcastVoiceForwardingPage.js"},{"_content":"view/page/ComcastVoiceRejectionPage.js"},{"_content":"view/UI/ComcastVoiceFeatureUI.js"},{"_content":"view/UI/ComcastVoiceSendToVoicemailAfterRingsUI.js"},{"_content":"view/UI/ComcastVoiceAnnounceDateTimeUI.js"},{"_content":"view/UI/ComcastVoiceAnonymousCallRejectionUI.js"},{"_content":"view/UI/ComcastVoiceLanguageUI.js"},{"_content":"view/UI/ComcastVoiceAnsweringLanguageUI.js"},{"_content":"view/UI/ComcastVoiceUserLanguageUI.js"},{"_content":"view/UI/ComcastVoiceAutoplayUI.js"},{"_content":"view/UI/ComcastVoicePromptUI.js"},{"_content":"view/UI/ComcastVoiceRequirePinUI.js"},{"_content":"view/UI/ComcastVoiceNotificationUI.js"},{"_content":"view/UI/ComcastVoiceNotificationTranscriptUI.js"},{"_content":"view/UI/ComcastVoiceNotificationAttachmentUI.js"},{"_content":"view/UI/ComcastVoiceCallForwardingUI.js"},{"_content":"view/UI/ComcastVoiceSelectiveCallForwardingUI.js"},{"_content":"view/UI/ComcastVoiceSelectiveCallRejectionUI.js"},{"_content":"view/UI/ComcastVoiceSelectiveCallAcceptanceUI.js"},{"_content":"view/UI/ComcastABBuilderUI.js"},{"_content":"model/ComcastCallFeature.js"},{"_content":"model/ComcastPhone.js"},{"_content":"templates/voice.template.js"}],"includeCSS":[{"_content":"voice.css"}],"handlerObject":[{"_content":"ComcastVoice"}]}],"zimletConfig":[{"name":"comcast_voice","version":"1.0","global":[{}]}]}]},"props":{},"identities":{"identity":[{"name":"DEFAULT","id":"e150e9f7-465d-4759-a68d-258b42c273d1","_attrs":{"zimbraPrefIdentityId":"e150e9f7-465d-4759-a68d-258b42c273d1","zimbraPrefForwardReplyPrefixChar":"\u003E","zimbraPrefSaveToSent":"FALSE","zimbraPrefSentMailFolder":"sent","zimbraPrefForwardIncludeOriginalText":"includeBody","zimbraPrefForwardReplyFormat":"html","zimbraPrefMailSignatureStyle":"outlook","zimbraPrefIdentityName":"DEFAULT","zimbraPrefReplyIncludeOriginalText":"includeBody","zimbraPrefFromAddress":"armada15@comcast.net"}}]},"signatures":{},"dataSources":{},"childAccounts":{},"soapURL":"http://sz0133.wc.mail.comcast.net:80/service/soap/","publicURL":"http://sz0133.wc.mail.comcast.net:80","_jsns":"urn:zimbraAccount"}],"SearchResponse":[{"sortBy":"dateDesc","offset":0,"m":[{"s":83216,"d":1341115873000,"l":"2","cid":"-248220","f":"u","rev":1310800,"id":"248220","e":[{"a":"eBay@reply1.ebay.com","d":"eBay","p":"eBay Insider","t":"f"}],"su":"famoussas15: Get great selling tips for Back to School","fr":"Hurry! List by July 5 for a chance to win View this message in your browser. ==\u003E http://mail.ebay.com/r/mail/267feaII909a56II18087365a1e eBay ==\u003E ...","score":1.0,"cm":true,"sf":"1341115873000"},{"s":43499,"d":1341090166000,"l":"2","cid":"-248200","f":"u","rev":1310700,"id":"248200","e":[{"a":"eBay@reply1.ebay.com","d":"eBay","p":"eBay","t":"f"}],"su":"famoussas15, it's your eBay anniversary","fr":"Happy anniversary. eBay ==\u003E ...","score":1.0,"cm":true,"sf":"1341090166000"},{"s":83728,"d":1341070951000,"l":"2","cid":"-248180","f":"u","rev":1310600,"id":"248180","e":[{"a":"reminder@e.gilt.com","d":"Gilt","p":"Gilt","t":"f"}],"su":"Swim Shop, Summer Style Guide, Weekend Wear, Make a Statement: Horizon Rugs, Maroon 5 ‘Overexposed’ Digital Download, Charles Jourdan & Mark + James Shoes and more Starts Today at Noon ET","fr":"If you are unable to see this message, http://click.e.gilt.com/?qs=59998bbe5b1437ad0d0f55a638801341641f6689f3f52c6babca3199371abd925734f99012c3e240 ...","score":1.0,"cm":true,"sf":"1341070951000"},{"s":49963,"d":1341029084000,"l":"2","cid":"-248160","f":"u","rev":1310500,"id":"248160","e":[{"a":"do_not_reply@itunes.com","d":"iTunes","p":"iTunes Store","t":"f"}],"su":"My Alerts for this week: Maroon 5, Elvis Presley, Muse and more","fr":"iTunes artist alert Maroon 5 Overexposed Release Date: Jun 26, 2012 Genre: Pop Total Songs: 12 (P) â„— 2012 A&M/Octone Records ...","score":1.0,"cm":true,"sf":"1341029084000"},{"s":7672,"d":1340995082000,"l":"2","cid":"-248140","f":"u","rev":1310400,"id":"248140","e":[{"a":"gcarpino@ravensclawgolfclub.com","d":"Raven's","p":"Raven's Claw Golf Club","t":"f"}],"su":"Beat the Heat Afternoon Special- Book Now!","fr":"[Don't Get Beat by the Heat] Another Raven's Claw Advantage! Beat the Heat Special! This Weekend Only! (Saturday, June 30th & Sunday July 1st) $50 ...","score":1.0,"cm":true,"sf":"1340995082000"},{"s":13702,"d":1340993857000,"l":"2","cid":"-248120","f":"u","rev":1310300,"id":"248120","e":[{"a":"Offers@offers.dominos.com","d":"Domino's","p":"Domino's Pizza","t":"f"}],"su":"Want to know our secret ingredient?","fr":"Domino’s Pizza Choose any 2 or more Oven Baked Sandwiches, Medium 2-Topping Pizzas or Stuffed Cheesy Breads for just $5.99 each. 2-item minimum. ...","score":1.0,"cm":true,"sf":"1340993857000"},{"s":82931,"d":1340984530000,"l":"2","cid":"-248100","f":"u","rev":1310200,"id":"248100","e":[{"a":"reminder@e.gilt.com","d":"Gilt","p":"Gilt","t":"f"}],"su":"American Apparel, Garrett Leight, T-Shirts in Your Size, Summer Staples: Polos, Oliberté, Best Bets Under $50, Brian Atwood Shoes & Handbags, La Fée Verte and more Starts Today at Noon ET","fr":"If you are unable to see this message, http://click.e.gilt.com/?qs=c1ae0a17831adfc5724c433fbe422417721cfce7b17522992f301b77d4538c0a6511858ac0bdf8a8 ...","score":1.0,"cm":true,"sf":"1340984530000"},{"s":14393,"d":1340979701000,"l":"2","cid":"-248080","f":"u","rev":1310100,"id":"248080","e":[{"a":"golflink@mail.golflink.com","d":"GolfLink","p":"GolfLink Newsletter","t":"f"}],"su":"Start 'Em Young: Teach Your Kids How To Golf This Summer","fr":"GolfLink Newsletter Instructional Video Start 'Em Young: Teaching Your Kids How To Golf It’s summer--the perfect opportunity to get the kids out of ...","score":1.0,"cm":true,"sf":"1340979701000"},{"s":99691,"d":1340976376000,"l":"2","cid":"-248060","f":"u","rev":1310000,"id":"248060","e":[{"a":"movies@mkt.fandango.com","d":"Fandango","p":"Fandango FanMail","t":"f"}],"su":"Magic Mike tickets on sale now!","fr":"Fandango Newsletter Countdown to Spider-Man View web version. | View mobile version. Add movies@mkt.fandango.com to your address book. More Details . ...","score":1.0,"cm":true,"sf":"1340976376000"},{"s":6302,"d":1340954686000,"l":"2","cid":"-248040","f":"u","rev":1309900,"id":"248040","e":[{"a":"gcarpino@ravensclawgolfclub.com","d":"Raven's","p":"Raven's Claw Golf Club","t":"f"}],"su":"Tee times Specials available for this Weekend!","fr":"Another Raven's Claw Advantage! Friday (6/29), Saturday (6/30) & Sunday (7/1) We still have open Tee Times for this Weekend! The weekends weather ...","score":1.0,"cm":true,"sf":"1340954686000"},{"s":156413,"d":1340945402000,"l":"2","cid":"-248020","f":"u","rev":1309800,"id":"248020","e":[{"a":"newsletter@reply.ticketmaster.com","d":"Ticketmaster","p":"Ticketmaster","t":"f"}],"su":"James, See it Live: Tickets on Sale & Special Offers This Week","fr":"TicketMaster: TicketAlert [Ticketmaster] Ticket Alert ® June 28, 2012 Music | Sports | Arts & Theater | Family View your cart & shop for events [My ...","score":1.0,"cm":true,"sf":"1340945402000"},{"s":25755,"d":1340899014000,"l":"2","cid":"-248000","f":"u","rev":1309700,"id":"248000","e":[{"a":"GQ_Daily@email.GQ.com","d":"GQ","p":"GQ","t":"f"}],"su":"The Tank Tops You Need this Summer, The Smaht Man's Guide to Cambridge, and More ","fr":"GQ Daily Newsletter [SMART + SHARP] Thursday 06.28.12 A Higher Bar When you think \"Tank top,\" do you immediately think of Jersey Shore meatheads? ...","score":1.0,"cm":true,"sf":"1340899014000"},{"s":102735,"d":1340898340000,"l":"2","cid":"-247980","f":"u","rev":1309600,"id":"247980","e":[{"a":"reminder@e.gilt.com","d":"Gilt","p":"Gilt","t":"f"}],"su":"Façonnable, Get Ready for the 4th, J.D. Fisk, kai fragrance, VBN, Pantherella Socks, Suede Shoes, Belts, Get the Look: Paris Fashion Week, Incotex & Incotex Ivory and more Starts Today at Noon ET","fr":"If you are unable to see this message, http://click.e.gilt.com/?qs=8f54054517c2122aea5501573a0502e814ee8fc40068e15f0e605feedfc37f8d79f0bfa0e0f8d646 ...","score":1.0,"cm":true,"sf":"1340898340000"},{"s":11748,"d":1340897330000,"l":"2","cid":"-247960","f":"u","rev":1309500,"id":"247960","e":[{"a":"Bear_Creek_Mountain_Resort@mail.vresp.com","d":"Bear","p":"Bear Creek Mountain Resort","t":"f"}],"su":"Music Under The Stars Tonight from 7-10PM","fr":"Music Under The Stars A Free Community Concert Series 6.28.12 7.26.12 8.23.12 9.27.12 - Tonight 6.28.12 7-10Pm featuring the sounds of Tavern Tan - ...","score":1.0,"cm":true,"sf":"1340897330000"},{"s":12311,"d":1340887296000,"l":"2","cid":"-247940","f":"u","rev":1309400,"id":"247940","e":[{"a":"golflink@mail.golflink.com","d":"GolfLink","p":"GolfLink Tee Time Alert","t":"f"}],"su":"This Week’s Tee Time Hot Deals in Your Area","fr":"Tee Times Newsletter Hot Tee Time Deals in Quakertown, PA Thursday, Jun 28 to Tuesday, Jul 03 Lederach Golf Course » From $25.00 (save 36%) Spring ...","score":1.0,"cm":true,"sf":"1340887296000"},{"s":36775,"d":1340885793000,"l":"2","cid":"-247920","f":"u","rev":1309300,"id":"247920","e":[{"a":"cs@email.zappos.com","d":"Zappos.com","p":"Zappos.com","t":"f"}],"su":"Who Says Travel Has To Be Stressful...","fr":"\u003Cimg src=\"https://track.zappos.com/email.cgi?ref=int_mkt_zappos_120628_casual\" width=\"1\" height=\"1\" /\u003E You pay for your ticket; we pay for your ...","score":1.0,"cm":true,"sf":"1340885793000"},{"s":42757,"d":1340881242000,"l":"2","cid":"-247900","f":"u","rev":1309100,"id":"247900","e":[{"a":"foundation@bucks.edu","d":"Bucks","p":"Bucks County Community College Foundation","t":"f"}],"su":"New Alumni Benefit! BCCC's Early Learning Center Now Enrolling for Fall","fr":"Having trouble viewing this email? Click here ...","score":1.0,"cm":true,"sf":"1340881242000"},{"s":53629,"d":1340844428000,"l":"2","cid":"-247880","f":"u","rev":1309000,"id":"247880","e":[{"a":"reminder@e.parkandbond.com","d":"Park","p":"Park & Bond","t":"f"}],"su":"The key shapes for summer sunglasses, our tribute to America’s stylish best, and more substance & style","fr":"Park & Bond If you are unable to see this message, ...","score":1.0,"cm":true,"sf":"1340844428000"},{"s":26425,"d":1340842952000,"l":"2","cid":"-247860","f":"u","rev":1308900,"id":"247860","e":[{"a":"n-neznqn15=pbzpnfg.arg-262c0@postmaster.twitter.com","d":"Twitter","p":"Twitter","t":"f"}],"su":"Jake Ferrara(@JakeFerrara) mentioned you on Twitter!","fr":"Jake Ferrara @JakeFerrara Had an excellent time with my buhls in Long Island #AlotOfLaughs #AlotOfMemories @JamesSoGaughan @TonyLatronica @effdock ...","score":1.0,"cm":true,"sf":"1340842952000"},{"s":34111,"d":1340837471000,"l":"2","cid":"-247840","f":"u","rev":1308800,"id":"247840","e":[{"a":"GQ_Weekly@email.GQ.com","d":"GQ","p":"GQ","t":"f"}],"su":"New Kate Upton Video, the Latest From Men's Fashion Week, and More","fr":"GQ Weekly Newsletter [Your Weekly GQ - What not to miss this week on GQ.com] This Week's Big Story Model Tee Here, Avenger and rising star Chris ...","score":1.0,"cm":true,"sf":"1340837471000"},{"s":25550,"d":1340837101000,"l":"2","cid":"-247820","f":"u","rev":1308700,"id":"247820","e":[{"a":"GQ_Daily@email.GQ.com","d":"GQ","p":"GQ","t":"f"}],"su":"The Ultimate Guide to Watches, Avenger Chris Hemsworth in the Best Tees of Summer, and More","fr":"GQ Daily Newsletter [SMART + SHARP] Wednesday 06.27.12 The GQ Guide to Watches Whether you're looking for an inexpensive time-teller or a solid-gold ...","score":1.0,"cm":true,"sf":"1340837101000"},{"s":17074,"d":1340830582000,"l":"2","cid":"-247800","f":"u","rev":1308600,"id":"247800","e":[{"a":"TheNorthFace@mail.thenorthface.com","d":"The","p":"The North Face","t":"f"}],"su":"Get Outdoors. Take Someone With You.","fr":"Spark a connection to nature, or better yet inspire the next generation of outdoor enthusiasts, explorers and conservationists to Never Stop ...","score":1.0,"cm":true,"sf":"1340830582000"},{"s":20135,"d":1340821145000,"l":"2","cid":"-247780","f":"u","rev":1308500,"id":"247780","e":[{"a":"info@oldehomesteadgolfclub.com","d":"Olde","p":"Olde Homestead Golf Club","t":"f"}],"su":"Membership Extravaganza","fr":"-- Olde Homestead News and Events! June 27th, 2012 TABLE OF CONTENTS Fourth of July Membership Special! 3-Day July Junior Camp Club Championship ...","score":1.0,"cm":true,"sf":"1340821145000"},{"s":7210,"d":1340819037000,"l":"2","cid":"-247760","f":"u","rev":1308400,"id":"247760","e":[{"a":"gcarpino@ravensclawgolfclub.com","d":"Raven's","p":"Raven's Claw Golf Club","t":"f"}],"su":"One Day $35 Golf Special - Tomorrow Only!","fr":"[Don't Get Beat by the Heat] Another Raven's Claw Advantage! Tomorrow Only! (Thursday, June 27th) $35 Green fee w/ cart - 7AM - 4PM $25 Green fee w/ ...","score":1.0,"cm":true,"sf":"1340819037000"},{"s":19783,"d":1340816923000,"l":"2","cid":"-247740","f":"u","rev":1308300,"id":"247740","e":[{"a":"dividendmiles@myusairways.com","d":"US","p":"US Airways - Dividend Miles","t":"f"}],"su":"Enough miles for an award ticket","fr":"Enough miles for an award ticket Earn more miels with a US Airways Premier World MasterCard JAMES GAUGHAN | Dividend Miles #: 50019631360 [US Airways ...","score":1.0,"cm":true,"sf":"1340816923000"},{"s":98338,"d":1340811721000,"l":"2","cid":"-247720","f":"u","rev":1308200,"id":"247720","e":[{"a":"reminder@e.gilt.com","d":"Gilt","p":"Gilt","t":"f"}],"su":"Grenson, Puma Apparel, Vanishing Elephant, A Tranquil Bedroom, PRO-Keds, Up to 75% Off: White Sale, Summer Staples: Shorts, Dolce & Gabbana, SmoothCo. and more Starts Today at Noon ET","fr":"If you are unable to see this message, http://click.e.gilt.com/?qs=470b23f27ac790570b7ac6514d329c2b40133f5f610f959f17fe21f9db17a4583ae2709676d9c31f ...","score":1.0,"cm":true,"sf":"1340811721000"},{"s":34743,"d":1340803770000,"l":"2","cid":"-247700","f":"u","rev":1308100,"id":"247700","e":[{"a":"movies@mkt.fandango.com","d":"Fandango","p":"Fandango FanMail","t":"f"}],"su":"Just in time for summer","fr":"Introducing a new and improved Fandango . View web version | View mobile version Add movies@mkt.fandango.com to your address book. More Details . ...","score":1.0,"cm":true,"sf":"1340803770000"},{"s":95651,"d":1340782102000,"l":"2","cid":"-247680","f":"u","rev":1308000,"id":"247680","e":[{"a":"ebay@ebay.com","d":"eBay","p":"eBay","t":"f"}],"su":"eBay Watched Item Reminder: Scotty Cameron Newport 2.6 HEAVY 20glike new condition 34 in (270993497217)","fr":"-- eBay sent this message to James Gaughan (famoussas15). Your registered name is included to show this message originated from eBay. Learn more at ...","score":1.0,"cm":true,"sf":"1340782102000"},{"s":14206,"d":1340734674000,"l":"2","cid":"-247660","f":"u","rev":1307800,"id":"247660","e":[{"a":"Offers@offers.dominos.com","d":"Domino's","p":"Domino's Pizza","t":"f"}],"su":"Peace of mind for $7.99.","fr":"Domino's Pizza Monday thru Wednesday get any large 3-topping pizza for $7.99 each. Carryout only. ORDER ONLINE . Order Domino’s anywhere now using ...","score":1.0,"cm":true,"sf":"1340734674000"},{"s":30484,"d":1340733798000,"l":"2","cid":"-247640","f":"u","rev":1307700,"id":"247640","e":[{"a":"wb@email.whistlerblackcomb.com","d":"Whistler","p":"Whistler Blackcomb","t":"f"}],"su":"Last chance - Whistler summer 3rd night free offer ends June 30","fr":"View this e-mail with images ...","score":1.0,"cm":true,"sf":"1340733798000"}],"more":true,"_jsns":"urn:zimbraMail"}],"_jsns":"urn:zimbra"}},"_jsns":"urn:zimbraSoap"};
- // NOTE: Domain info settings moved into launch function to
- // prevent sloppy code from accessing extraneous window
- // scoped variable.
- var settings = {
- "dummy":1,
- "zimbraPrefMailItemsPerPage":"25",
- "zimbraPrefGroupMailBy":"message",
- "zimbraPrefSkin":"velodrome2",
- "zimbraPrefClientType":"advanced",
- "zimbraFeatureTasksEnabled":"FALSE",
- "zimbraFeatureNotebookEnabled":"FALSE",
- "zimbraFeatureIMEnabled":"FALSE",
- "zimbraFeatureVoiceEnabled":"TRUE",
- "zimbraFeatureContactsEnabled":"TRUE",
- "zimbraFeatureConversationsEnabled":"TRUE",
- "zimbraFeaturePortalEnabled":"TRUE",
- "zimbraFeatureVoiceUpsellEnabled":"FALSE",
- "zimbraFeatureOptionsEnabled":"TRUE",
- "zimbraFeatureMailEnabled":"TRUE",
- "zimbraFeatureCalendarUpsellEnabled":"TRUE",
- "zimbraFeatureCalendarEnabled":"FALSE",
- "zimbraWebClientLogoutURL":"https://login.comcast.net/logout?s=smartzone&continue=http://www.comcast.net",
- "zimbraWebClientLoginURL":"https://login.comcast.net/logout?s=portal&continue=http://xfinity.comcast.net/?cid=xfinityconnecttocomcastnet"
- };
- var params = {
- app:"",
- settings:settings, batchInfoResponse:batchInfoResponse,
- offlineMode:false, devMode:false,
- protocolMode:protocolMode, httpPort:"80", httpsPort:"443",
- noSplashScreen:noSplashScreen
- };
- ZmZimbraMail.run(params);
- }
- // START DOMContentLoaded
- // Mozilla and Opera 9 expose the event we could use
- if (document.addEventListener) {
- document.addEventListener("DOMContentLoaded", launch, null);
- // mainly for Opera 8.5, won't be fired if DOMContentLoaded fired already.
- document.addEventListener("load", launch, null);
- }
- // for Internet Explorer. readyState will not be achieved on init call
- if (AjxEnv.isIE && AjxEnv.isWindows) {
- document.attachEvent("onreadystatechange", function(e) {
- if (document.readyState == "complete") {
- launch();
- }
- });
- }
- if (/(WebKit|khtml)/i.test(navigator.userAgent)) { // sniff
- var _timer = setInterval(function() {
- if (/loaded|complete/.test(document.readyState)) {
- launch();
- // call the onload handler
- }
- }, 10);
- }
- // END DOMContentLoaded
- AjxCore.addOnloadListener(launch);
- AjxCore.addOnunloadListener(ZmZimbraMail.unload);
- </script>
- </div>
- </body>
- </html>
- EMAIL RESPONSE TIMED OUT
- HTTP/1.0 200 OK
- Date: Sun, 01 Jul 2012 09:29:10 GMT
- Content-Type: text/javascript; charset=utf-8
- Content-Length: 209
- {"Header":{"context":{"session":{"id":"13756433","_content":"13756433"},"change":{"token":187599},"_jsns":"urn:zimbra"}},"Body":{"SendMsgResponse":{"m":[{}],"_jsns":"urn:zimbraMail"}},"_jsns":"urn:zimbraSoap"}
- 1ST REDIRECT TIMED OUT
- HTTP/1.1 302 Moved Temporarily
- Date: Sun, 01 Jul 2012 09:29:12 GMT
- Server: Apache
- Cache-Control: no-cache="Set-Cookie"
- Location: http://wnamp.mail.comcast.net/istp/LandingPage/
- Set-Cookie: tg_ticket=VEdUAQEAABSTtgaCj6t9xCjw_3W0EBE-IrCskhDrK99fl5vSjiLpMeP-M4NVAAAA4D_3N6Y9ZIXu3hH6r0cfiSyx62M5Hh8fBPfH3XETO-fj35NlE92ak-snepKL3BhQTnDEd_OHnBP_MEPLIjpESMUQXg8UnmkGOSihYGNVks7VtLDQY1wnpK3yijLXcWiG1aDL9JdqSV7RrNUILfy3tGO88t_4Qw_zy6mChZYUUKvS_9Ed7JnmsCjZEPEhaUCRP3SRMimI0v6c7-H640Ad79PZ_LCKOvpF6ZMtZF3bh5jW6_aUNqNlCl-WsGbCu8KW6_-7oLpesZLFkS4UXYNB7FzXoMvdI5TuJFDVCXNMlbLq; domain=login.comcast.net; path=/; secure
- Set-Cookie: MYPORTAL=em=atruestar>=Stephanie&guid=028533111715062006Comcast.USR1JR&auto=0&ipr=0&cdvs=0&wid=98446&zip=98446&tid=4354cf501c1df6b38f07-5903c09d58cb0a4af43a91b51692a0a879822ce6; domain=comcast.net; path=/
- Set-Cookie: s_ticket=TFNUAQECAIA4GKR649skuNmP94R2gUFV0BZyRypMYOYzAG_H4GvjW8H80PAtw9yqpigp4d4uaxtl5-XfYb1FXQ12nGDj2kqaOTkPGmBpl0_rBJncFh5C429EGsj1rMJDDXyIro8H_N-g0utBEuPjAQWU3a0G-li9pY_Bg67Y5LmdRAqyXtLIuxDeKDIS5oOKPLd_Xywvu5AVAAAA8OotbTnUQkzarug2KPcCe0vluhECtxOlN8dZlsZpWPNhWr1c9xyUEthQ2-rNV5NCI3BWw9H6tUzx_LqQigyu3KuhejTiX8z6OzMP8jgrko5JylgE_6jhWaev4h9-K6Ue7WkcsU1biFY-ii-_nG_Qluc1S7LuTMyFwG26pYqQRXhkRw0ZzpGOiAEyc1JyRndNThBi3kJr62BaPDYPh5WtOtR372Q95g4ZcxvMajXpFrPgdnzTwRaE0ysC-0uRdLIwUeZ-ZhcZyCDuVztrUixDC_52iLthqVwD5mvXvx4BRLwUee7lLOMn-MAorKSDkE7Txg**; domain=comcast.net; path=/
- Set-Cookie: tls_s_ticket=TFNUAQECAIBMMkPBihbn75yBRCks4gncFMHXmnuI9Fwy1GACKGADjF4U8B3-RcVcdgD7n6MrYFhUNdgqGaykwtDZHaxrgi_QjaMNNdS6m0l_UXYP3O6zYW6MYXwpqm8qEmIaPDq0WCnGOV2OS6KxHX28NWKdcvfY_pPV3XHpjZYwe3vUBOsSGBBN9qqvwtR_x3nkvzYGFZVAAAAA8Mh7NXAYPoqdGosdJn2w_RKG0OHnpO9Nd2-AwCyPikSmOYC9_rV5wkhXaEsPBnBiu07UQGnaL98waUDUNbaxm_BJPqa3nqQwum9LvpyI2UiSv052xI1JEGXgKHBzGod89f0XaFyv1YhwlCfJyysAY9FeX1Ewo8cZgnZrd9M24LNUIiPAF9FIoyGAOPO3A097CPJHkDqn0SOWT_nzZlhoFIzHek84tNjSQ__7TT7K1McIGiACjCM2nkfl8UOgo1W6LpefhIZjClL2Sl2iupi35e9VI4pI3Z3n8JwdKcp_rJCvSvsGv8k2bKMc6fwX5B1XFQ**; domain=comcast.net; path=/; secure
- Set-Cookie: session@comcast.net=TFNUAQECAIA4GKR649skuNmP94R2gUFV0BZyRypMYOYzAG_H4GvjW8H80PAtw9yqpigp4d4uaxtl5-XfYb1FXQ12nGDj2kqaOTkPGmBpl0_rBJncFh5C429EGsj1rMJDDXyIro8H_N-g0utBEuPjAQWU3a0G-li9pY_Bg67Y5LmdRAqyXtLIuxDeKDIS5oOKPLd_Xywvu5AVAAAA8OotbTnUQkzarug2KPcCe0vluhECtxOlN8dZlsZpWPNhWr1c9xyUEthQ2-rNV5NCI3BWw9H6tUzx_LqQigyu3KuhejTiX8z6OzMP8jgrko5JylgE_6jhWaev4h9-K6Ue7WkcsU1biFY-ii-_nG_Qluc1S7LuTMyFwG26pYqQRXhkRw0ZzpGOiAEyc1JyRndNThBi3kJr62BaPDYPh5WtOtR372Q95g4ZcxvMajXpFrPgdnzTwRaE0ysC-0uRdLIwUeZ-ZhcZyCDuVztrUixDC_52iLthqVwD5mvXvx4BRLwUee7lLOMn-MAorKSDkE7Txg**; domain=comcast.net; path=/
- X-Powered-By: Servlet/2.5 JSP/2.1
- Vary: Accept-Encoding
- Content-Encoding: gzip
- Connection: close
- Content-Type: text/html
- Set-Cookie: BIGipServerrs_cima-web=306798668.36895.0000; path=/
- <html><head><title>302 Moved Temporarily</title></head>
- <body bgcolor="#FFFFFF">
- <p>This document you requested has moved temporarily.</p>
- <p>It's now at <a href="http://wnamp.mail.comcast.net/istp/LandingPage/">http://wnamp.mail.comcast.net/istp/LandingPage/</a>.</p>
- </body></html>
- LOGIN TIMED OUT
- HTTP/1.0 200 OK
- Date: Sun, 01 Jul 2012 09:29:14 GMT
- Content-Type: text/javascript; charset=utf-8
- Content-Length: 210
- Connection: keep-alive
- {"Header":{"context":{"session":{"id":"11358783","_content":"11358783"},"change":{"token":1137902},"_jsns":"urn:zimbra"}},"Body":{"SendMsgResponse":{"m":[{}],"_jsns":"urn:zimbraMail"}},"_jsns":"urn:zimbraSoap"}
- CONTACT FETCH TIMED OUT
- HTTP/1.0 302 Moved Temporarily
- Date: Sun, 01 Jul 2012 09:29:10 GMT
- Server: Apache
- Cache-Control: no-cache, must-revalidate
- Expires: Mon, 26 Jul 1997 05:00:00 GMT
- Location: http://www.comcast.net/errors/unauthorized
- Content-Length: 0
- Content-Type: text/html
- Connection: keep-alive
- COMPOSE PAGE TIMED OUT
- HTTP/1.0 302 Moved Temporarily
- Date: Sun, 01 Jul 2012 09:31:12 GMT
- Content-Type: text/html; charset=utf-8
- Expires: Tue, 24 Jan 2000 20:46:50 GMT
- Cache-Control: no-store, no-cache, must-revalidate, max-age=0
- Pragma: no-cache
- Content-Language: en-US
- Location: http://sz0093.wc.mail.comcast.net/zimbra/h/search?view=compose&view=compose&mesg=welcome&initial=true&app=
- Content-Length: 0
- Connection: keep-alive
- COMPOSE PAGE TIMED OUT
- HTTP/1.0 302 Moved Temporarily
- Date: Sun, 01 Jul 2012 09:33:20 GMT
- Content-Type: text/html; charset=utf-8
- Expires: Tue, 24 Jan 2000 20:46:50 GMT
- Cache-Control: no-store, no-cache, must-revalidate, max-age=0
- Pragma: no-cache
- Content-Language: en-US
- Location: http://sz0093.wc.mail.comcast.net/zimbra/h/search?view=compose&view=compose&mesg=welcome&initial=true&app=
- Content-Length: 0
- Connection: keep-alive
- CONTACT FETCH TIMED OUT
- HTTP/1.0 302 Moved Temporarily
- Date: Sun, 01 Jul 2012 09:33:47 GMT
- Server: Apache
- Cache-Control: no-cache, must-revalidate
- Expires: Mon, 26 Jul 1997 05:00:00 GMT
- Location: http://www.comcast.net/errors/unauthorized
- Content-Length: 0
- Content-Type: text/html
- Connection: keep-alive
- EMAIL RESPONSE TIMED OUT
- HTTP/1.0 200 OK
- Date: Sun, 01 Jul 2012 09:37:03 GMT
- Content-Type: text/javascript; charset=utf-8
- Content-Length: 208
- Connection: keep-alive
- {"Header":{"context":{"session":{"id":"11185526","_content":"11185526"},"change":{"token":30899},"_jsns":"urn:zimbra"}},"Body":{"SendMsgResponse":{"m":[{}],"_jsns":"urn:zimbraMail"}},"_jsns":"urn:zimbraSoap"}
- EMAIL RESPONSE TIMED OUT
- HTTP/1.0 200 OK
- Date: Sun, 01 Jul 2012 09:37:13 GMT
- Content-Type: text/javascript; charset=utf-8
- Content-Length: 210
- Connection: keep-alive
- {"Header":{"context":{"session":{"id":"13390199","_content":"13390199"},"change":{"token":1250901},"_jsns":"urn:zimbra"}},"Body":{"SendMsgResponse":{"m":[{}],"_jsns":"urn:zimbraMail"}},"_jsns":"urn:zimbraSoap"}
- CONTACT FETCH TIMED OUT
- HTTP/1.0 302 Moved Temporarily
- Date: Sun, 01 Jul 2012 09:40:28 GMT
- Server: Apache
- Cache-Control: no-cache, must-revalidate
- Expires: Mon, 26 Jul 1997 05:00:00 GMT
- Location: http://www.comcast.net/errors/unauthorized
- Content-Length: 0
- Content-Type: text/html
- Connection: close
- CONTACT FETCH TIMED OUT
- HTTP/1.0 302 Moved Temporarily
- Date: Sun, 01 Jul 2012 09:43:13 GMT
- Server: Apache
- Cache-Control: no-cache, must-revalidate
- Expires: Mon, 26 Jul 1997 05:00:00 GMT
- Location: http://www.comcast.net/errors/unauthorized
- Content-Length: 0
- Content-Type: text/html
Add Comment
Please, Sign In to add comment