--- /dev/null
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is mozilla.org code.
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 1998
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either of the GNU General Public License Version 2 or later (the "GPL"),
+# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH = ../../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+MODULE = ximf-company-def
+DIRS =
+
+XPI_NAME = ximf_company_def
+INSTALL_EXTENSION_ID = {E255643F-7DCA-4cd8-B0C2-61EAADE39FCE}
+XPI_PKGNAME = ximf_company_def
+
+DIST_FILES = install.rdf
+
+USE_EXTENSION_MANIFEST = 1
+
+libs::
+ $(INSTALL) $(srcdir)/chrome/content/*.xml $(FINAL_TARGET)/chrome/content
+ $(INSTALL) $(srcdir)/chrome/content/AmocoCorporation/*.xml $(FINAL_TARGET)/chrome/content/AmocoCorporation
+ $(INSTALL) $(srcdir)/chrome/content/CaterpillarInc/*.xml $(FINAL_TARGET)/chrome/content/CaterpillarInc
+ $(INSTALL) $(srcdir)/chrome/content/WhirlpoolCorporation/*.xml $(FINAL_TARGET)/chrome/content/WhirlpoolCorporation
+
+include $(topsrcdir)/config/rules.mk
--- /dev/null
+content ximf-conpany-def chrome/content/
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<ximf:instance name="Amoco" version="1.0" ximfVersion="2.0" xmlns:ximf="http://eads.org/ximf/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://eads.org/ximf/ ximf.xsd">\r
+ <ximf:dictionary id="OneDico">\r
+ <ximf:locale lang="fr">\r
+ <ximf:ilk entity="ilk-info-box">Information</ximf:ilk>\r
+ <ximf:ilk entity="ilk-security-panel">Securité</ximf:ilk>\r
+ <ximf:ilk entity="ilk-originator-reference">Réferences d'origine</ximf:ilk> \r
+ <ximf:ilk entity="ilk-reply-before">Répondre avant</ximf:ilk>\r
+ <ximf:ilk entity="ilk-classification-panel">Classification</ximf:ilk>\r
+ <ximf:ilk entity="ilk-classification">Classification de sécurité</ximf:ilk>\r
+ <ximf:ilk entity="ilk-privacy-mark">Marque privée</ximf:ilk> \r
+ <ximf:ilk entity="ilk-general">Général</ximf:ilk>\r
+ <ximf:ilk entity="ilk-confidential">Confidentiel</ximf:ilk> \r
+ <ximf:ilk entity="ilk-highly-confidential">Très confidentiel</ximf:ilk>\r
+ <ximf:ilk entity="ilk-minimum">Minimum</ximf:ilk>\r
+ <ximf:ilk entity="ilk-medium">Moyen</ximf:ilk>\r
+ <ximf:ilk entity="ilk-maximum">Maximum</ximf:ilk>\r
+ <ximf:ilk entity="ilk-critical">Critique</ximf:ilk> \r
+ </ximf:locale>\r
+ <ximf:locale lang="en-US">\r
+ <ximf:ilk entity="ilk-info-box">Information</ximf:ilk>\r
+ <ximf:ilk entity="ilk-security-panel">Security</ximf:ilk>\r
+ <ximf:ilk entity="ilk-reply-before">Reply before</ximf:ilk>\r
+ <ximf:ilk entity="ilk-originator-reference">Origin references</ximf:ilk>\r
+ <ximf:ilk entity="ilk-classification-panel">Classification</ximf:ilk>\r
+ <ximf:ilk entity="ilk-classification">Security classification</ximf:ilk>\r
+ <ximf:ilk entity="ilk-privacy-mark">Privacy mark</ximf:ilk>\r
+ <ximf:ilk entity="ilk-general">General</ximf:ilk>\r
+ <ximf:ilk entity="ilk-confidential">Confidential</ximf:ilk> \r
+ <ximf:ilk entity="ilk-highly-confidential">Highly Confidential</ximf:ilk>\r
+ <ximf:ilk entity="ilk-minimum">Minimum</ximf:ilk>\r
+ <ximf:ilk entity="ilk-medium">Medium</ximf:ilk>\r
+ <ximf:ilk entity="ilk-maximum">Maximum</ximf:ilk>\r
+ <ximf:ilk entity="ilk-critical">Critical</ximf:ilk> \r
+ </ximf:locale>\r
+ </ximf:dictionary>\r
+</ximf:instance>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<?xml-stylesheet type="text/xsl" href="ximftoxul.xsl"?>\r
+<ximf:instance name="Amoco" version="1.0" ximfVersion="2.0" xmlns:ximf="http://eads.org/ximf/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://eads.org/ximf/ ximf.xsd">\r
+\r
+ <!-- OID AMOCO -->\r
+ <ximf:header id="header-policy-identifier" headerName="X-XIMF-Security-Policy-Identifier" > \r
+ <ximf:string content="1.2.840.113549.1.9.16.7.1"/>\r
+ </ximf:header>\r
+ \r
+ <!-- Security Classification-->\r
+ <ximf:header id="header-classification" \r
+ headerName="X-XIMF-Security-Classification"\r
+ technicalHeaderName="X-XIMF-Security-Classification-Identifier"\r
+ type="string"\r
+ technicalType="oid"\r
+ ilk="ilk-classification"\r
+ isMandatory="true">\r
+ <ximf:set id="value-amoco-classification">\r
+ <ximf:string ilk="ilk-general" content="amoco-general" technicalContent="6" /> \r
+ <ximf:string ilk="ilk-confidential" content="amoco-confidential" technicalContent="7" />\r
+ <ximf:string ilk="ilk-highly-confidential" content="amoco-highly-confidential" technicalContent="8" /> \r
+ </ximf:set>\r
+ </ximf:header>\r
+ \r
+ <ximf:header id="header-privacy-mark" headerName="X-XIMF-Privacy-Mark" ilk="ilk-privacy-mark" isMandatory="true">\r
+ <ximf:set id="value-privacy-mark">\r
+ <ximf:string ilk="ilk-minimum" content="amoco-minimum" />\r
+ <ximf:string ilk="ilk-medium" content="amoco-medium" />\r
+ <ximf:string ilk="ilk-maximum" content="amoco-maximum" />\r
+ <ximf:string ilk="ilk-critical" content="amoco-critical" />\r
+ </ximf:set>\r
+ </ximf:header>\r
+ \r
+ <!-- headers advanced -->\r
+ <!-- headers advanced -->\r
+ <ximf:header id="header-primary-precedence" headerName="X-XIMF-Primary-Precedence" ilk="ilk-primary-precedence" isMandatory="true">\r
+ <ximf:set id="value-precedence">\r
+ <ximf:string id="data-routine-precedence" ilk="ilk-routine" content="routine" index="0" aclLevel="30"/>\r
+ <ximf:string id="data-urgent-precedence" ilk="ilk-urgent" content="priority" index="1" aclLevel="40"/>\r
+ <ximf:string id="data-immediat-precedence" ilk="ilk-immediat" content="immediate" index="2" aclLevel="50"/>\r
+ <ximf:string id="data-flash-precedence" ilk="ilk-flash" content="flash" index="3" aclLevel="100"/>\r
+ </ximf:set>\r
+ </ximf:header>\r
+ \r
+ <ximf:header id="header-copy-precedence" headerName="X-XIMF-Copy-Precedence" ilk="ilk-copy-precedence" isMandatory="false">\r
+ <ximf:set ref="value-precedence"/>\r
+ </ximf:header>\r
+ \r
+ <ximf:header id="header-reply-before" headerName="X-XIMF-Reply-Before" ilk="ilk-reply-before" isMandatory="false" type="date">\r
+ <ximf:string id="value-reply-before" editable="true" />\r
+ </ximf:header> \r
+ \r
+ <ximf:header id="header-originator-reference" headerName="X-XIMF-Originator-Reference" ilk="ilk-originator-reference" isMandatory="false" type="string">\r
+ <ximf:string id="value-originator-reference" maxItem="5" editable="true" separator=";"/>\r
+ </ximf:header>\r
+ \r
+</ximf:instance>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<ximf:instance name="Amoco" version="1.0" ximfVersion="2.0" xmlns:ximf="http://eads.org/ximf/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://eads.org/ximf/ ximf.xsd">\r
+<ximf:ihm xmlns:ximf="http://eads.org/ximf/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\r
+ <ximf:panel id="pane_security" ilk="ilk-classification-panel">\r
+ <ximf:groupbox id="group-classification" ilk="ilk-security-panel">\r
+ <ximf:headerRef>header-classification</ximf:headerRef> \r
+ <ximf:headerRef>header-privacy-mark</ximf:headerRef>\r
+ </ximf:groupbox> \r
+ <ximf:groupbox id="group-info" ilk="ilk-info-box"> \r
+ <ximf:headerRef>header-originator-reference</ximf:headerRef> \r
+ <ximf:headerRef>header-reply-before</ximf:headerRef> \r
+ </ximf:groupbox> \r
+ </ximf:panel> \r
+ <ximf:treeRcv>\r
+ <ximf:headerRef>header-classification</ximf:headerRef> \r
+ <ximf:headerRef>header-privacy-mark</ximf:headerRef>\r
+ </ximf:treeRcv>\r
+</ximf:ihm>\r
+</ximf:instance>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<ximf:instance name="Amoco" version="1.0" ximfVersion="2.0" xmlns:ximf="http://eads.org/ximf/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://eads.org/ximf/ ximf.xsd">\r
+ <ximf:rule id="compatibility-rule" description="Règle sur la compatibilités X-SMTP / XIMF" >\r
+ <ximf:compatibility targetName="X-SMTP" targetVersion="1.1">\r
+ <ximf:aliasHeader headerName="X-P772-Version">\r
+ <ximf:aliasValue valueName="1.1"/> \r
+ </ximf:aliasHeader> \r
+ <ximf:aliasHeader headerName="X-P772-Originator-Reference" headerRef="X-XIMF-Originator-Reference"/>\r
+ <ximf:aliasHeader headerName="X-P772-Security-Classification" headerRef="X-XIMF-Security-Classification"/>\r
+ </ximf:compatibility> \r
+ </ximf:rule>\r
+ <ximf:rule id="association-rule" description="Règle d'associations de valeurs" >\r
+ <ximf:association>\r
+ <ximf:aliasHeader headerName="X-XIMF-Privacy-Mark" headerRef="X-XIMF-Security-Classification">\r
+ <ximf:aliasValue valueName="amoco-minimum,amoco-medium" valueRef="amoco-general" />\r
+ <ximf:aliasValue valueName="amoco-minimum,amoco-medium,amoco-maximum" valueRef="amoco-confidential" />\r
+ <ximf:aliasValue valueName="amoco-minimum,amoco-medium,amoco-maximum,amoco-critical" valueRef="amoco-highly-confidential" />\r
+ </ximf:aliasHeader> \r
+ </ximf:association>\r
+ </ximf:rule> \r
+</ximf:instance>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<ximf xmlns:ximf="http://eads.org/ximf/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\r
+ <ximf:base name="Attribution_List">\r
+ <ximf:header>\r
+ <ximf:title>Attribution</ximf:title>\r
+ <ximf:description>Attribution keys</ximf:description>\r
+ <ximf:column>key</ximf:column>\r
+ <ximf:column>description</ximf:column>\r
+ </ximf:header>\r
+ <ximf:tree>\r
+ <ximf:description>\r
+ <ximf:data>HUMAN RESOURCE</ximf:data>\r
+ <ximf:data>Message for human resource only</ximf:data>\r
+ </ximf:description>\r
+ <ximf:description>\r
+ <ximf:data>SOFTWARE RESOURCE</ximf:data>\r
+ <ximf:data>Message for software resource only</ximf:data>\r
+ </ximf:description> \r
+ <ximf:description>\r
+ <ximf:data>BUSINESS RESOURCE</ximf:data>\r
+ <ximf:data>Message for businnes resource only</ximf:data>\r
+ </ximf:description> \r
+ <ximf:description>\r
+ <ximf:data>MARKET RESOURCE</ximf:data>\r
+ <ximf:data>Message for market resource only</ximf:data>\r
+ </ximf:description>\r
+ <ximf:description>\r
+ <ximf:data>ALL PUBLIC</ximf:data>\r
+ <ximf:data>Message for public</ximf:data>\r
+ </ximf:description>\r
+ <ximf:description>\r
+ <ximf:data>CONTRIBUTORS ONLY</ximf:data>\r
+ <ximf:data>Message for contributors only</ximf:data>\r
+ </ximf:description> \r
+ </ximf:tree>\r
+ </ximf:base>\r
+</ximf>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<ximf:instance name="caterpillar" version="1.0" ximfVersion="2.0" xmlns:ximf="http://eads.org/ximf/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://eads.org/ximf/ ximf.xsd">\r
+ <ximf:dictionary id="OneDico">\r
+ <ximf:locale lang="fr">\r
+ <ximf:ilk entity="ilk-akw">Attribution</ximf:ilk>\r
+ <ximf:ilk entity="ilk-security-box">Sécurité</ximf:ilk>\r
+ <ximf:ilk entity="ilk-precedence-panel">Urgence</ximf:ilk>\r
+ <ximf:ilk entity="ilk-public">PUBLIC</ximf:ilk>\r
+ <ximf:ilk entity="ilk-confidential-green">CONFIDENTIEL VERT</ximf:ilk>\r
+ <ximf:ilk entity="ilk-confidential-yellow">CONFIDENTIEL JAUNE</ximf:ilk>\r
+ <ximf:ilk entity="ilk-confidential-red">CONFIDENTIEL ROUGE</ximf:ilk>\r
+ <ximf:ilk entity="ilk-routine">Routine</ximf:ilk>\r
+ <ximf:ilk entity="ilk-urgent">Urgent</ximf:ilk>\r
+ <ximf:ilk entity="ilk-immediat">Immédiat</ximf:ilk>\r
+ <ximf:ilk entity="ilk-flash">Flash</ximf:ilk> \r
+ <ximf:ilk entity="header-akw">Attribution</ximf:ilk>\r
+ <ximf:ilk entity="ilk-primary-precedence">Urgence pour action</ximf:ilk>\r
+ <ximf:ilk entity="ilk-copy-precedence">Urgence pour information</ximf:ilk>\r
+ <ximf:ilk entity="ilk-advanced-panel">Avancé</ximf:ilk>\r
+ <ximf:ilk entity="ilk-originator-reference">Réferences d'origine</ximf:ilk> \r
+ <ximf:ilk entity="ilk-reply-before">Répondre avant</ximf:ilk>\r
+ <ximf:ilk entity="ilk-classification-panel">Classification</ximf:ilk>\r
+ <ximf:ilk entity="ilk-classification">Classification de sécurité</ximf:ilk>\r
+ <ximf:ilk entity="ilk-privacy-mark">Marque privée</ximf:ilk> \r
+ <ximf:ilk entity="ilk-general">Général</ximf:ilk>\r
+ <ximf:ilk entity="ilk-confidential">Confidentiel</ximf:ilk> \r
+ <ximf:ilk entity="ilk-highly-confidential">Très confidentiel</ximf:ilk>\r
+ <ximf:ilk entity="ilk-minimum">Minimum</ximf:ilk>\r
+ <ximf:ilk entity="ilk-medium">Moyen</ximf:ilk>\r
+ <ximf:ilk entity="ilk-maximum">Maximum</ximf:ilk>\r
+ <ximf:ilk entity="ilk-critical">Critique</ximf:ilk> \r
+ </ximf:locale>\r
+ <ximf:locale lang="en-US">\r
+ <ximf:ilk entity="ilk-akw">Attribution</ximf:ilk>\r
+ <ximf:ilk entity="ilk-security-box">Security</ximf:ilk>\r
+ <ximf:ilk entity="ilk-precedence-panel">Precedence</ximf:ilk>\r
+ <ximf:ilk entity="ilk-public">PUBLIC</ximf:ilk>\r
+ <ximf:ilk entity="ilk-confidential-green">CONFIDENTIAL GREEN</ximf:ilk>\r
+ <ximf:ilk entity="ilk-confidential-yellow">CONFIDENTIAL YELLOW</ximf:ilk>\r
+ <ximf:ilk entity="ilk-confidential-red">CONFIDENTIAL RED</ximf:ilk>\r
+ <ximf:ilk entity="ilk-routine">Routine</ximf:ilk>\r
+ <ximf:ilk entity="ilk-urgent">Urgent</ximf:ilk>\r
+ <ximf:ilk entity="ilk-immediat">Immediate</ximf:ilk>\r
+ <ximf:ilk entity="ilk-flash">Flash</ximf:ilk>\r
+ <ximf:ilk entity="header-akw">Attribution</ximf:ilk>\r
+ <ximf:ilk entity="ilk-primary-precedence">Primary precedence</ximf:ilk>\r
+ <ximf:ilk entity="ilk-copy-precedence">Copy precedence</ximf:ilk>\r
+ <ximf:ilk entity="ilk-advanced-panel">Advanced</ximf:ilk>\r
+ <ximf:ilk entity="ilk-reply-before">Reply before</ximf:ilk>\r
+ <ximf:ilk entity="ilk-originator-reference">Origin references</ximf:ilk>\r
+ <ximf:ilk entity="ilk-classification-panel">Classification</ximf:ilk>\r
+ <ximf:ilk entity="ilk-classification">Security classification</ximf:ilk>\r
+ <ximf:ilk entity="ilk-privacy-mark">Privacy mark</ximf:ilk>\r
+ <ximf:ilk entity="ilk-general">General</ximf:ilk>\r
+ <ximf:ilk entity="ilk-confidential">Confidential</ximf:ilk> \r
+ <ximf:ilk entity="ilk-highly-confidential">Highly Confidential</ximf:ilk>\r
+ <ximf:ilk entity="ilk-minimum">Minimum</ximf:ilk>\r
+ <ximf:ilk entity="ilk-medium">Medium</ximf:ilk>\r
+ <ximf:ilk entity="ilk-maximum">Maximum</ximf:ilk>\r
+ <ximf:ilk entity="ilk-critical">Critical</ximf:ilk> \r
+ </ximf:locale>\r
+ </ximf:dictionary>\r
+</ximf:instance>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<?xml-stylesheet type="text/xsl" href="ximftoxul.xsl"?>\r
+<ximf:instance name="Caterpillar" version="1.0" ximfVersion="2.0" xmlns:ximf="http://eads.org/ximf/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://eads.org/ximf/ ximf.xsd">\r
+\r
+ <!-- OID CATERPILLAR -->\r
+ <ximf:header id="header-policy-identifier" headerName="X-XIMF-Security-Policy-Identifier" > \r
+ <ximf:string content="1.2.840.113549.1.9.16.7.2"/>\r
+ </ximf:header>\r
+ \r
+ <!-- Security Classification-->\r
+ <ximf:header id="header-classification" \r
+ headerName="X-XIMF-Security-Classification"\r
+ technicalHeaderName="X-XIMF-Security-Classification-Identifier"\r
+ type="string"\r
+ technicalType="oid"\r
+ ilk="ilk-classification"\r
+ isMandatory="true">\r
+ <ximf:set id="value-caterpillar-classification">\r
+ <ximf:string ilk="ilk-public" content="caterpillar-public" technicalContent="6" /> \r
+ <ximf:string ilk="ilk-confidential-green" content="caterpillar-green" technicalContent="7" />\r
+ <ximf:string ilk="ilk-confidential-yellow" content="caterpillar-yellow" technicalContent="8" />\r
+ <ximf:string ilk="ilk-confidential-red" content="caterpillar-red" technicalContent="9" /> \r
+ </ximf:set>\r
+ </ximf:header>\r
+ \r
+ <!-- headers advanced -->\r
+ <ximf:header id="header-primary-precedence" headerName="X-XIMF-Primary-Precedence" ilk="ilk-primary-precedence" isMandatory="true">\r
+ <ximf:set id="value-precedence">\r
+ <ximf:string id="data-routine-precedence" ilk="ilk-routine" content="routine" index="0" aclLevel="30"/>\r
+ <ximf:string id="data-urgent-precedence" ilk="ilk-urgent" content="priority" index="1" aclLevel="40"/>\r
+ <ximf:string id="data-immediat-precedence" ilk="ilk-immediat" content="immediate" index="2" aclLevel="50"/>\r
+ <ximf:string id="data-flash-precedence" ilk="ilk-flash" content="flash" index="3" aclLevel="100"/>\r
+ </ximf:set>\r
+ </ximf:header>\r
+ \r
+ <ximf:header id="header-copy-precedence" headerName="X-XIMF-Copy-Precedence" ilk="ilk-copy-precedence" isMandatory="false">\r
+ <ximf:set ref="value-precedence"/>\r
+ </ximf:header>\r
+ \r
+ <!-- attribution --> \r
+ <ximf:header id="header-akw" headerName="X-XIMF-Attribution-Key-Word" ilk="ilk-akw" type="string">\r
+ <ximf:set ref="attribution-list.xml" separator=";" maxItem="2"/>\r
+ </ximf:header> \r
+ \r
+</ximf:instance>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<ximf:instance name="Caterpillar" version="1.0" ximfVersion="2.0" xmlns:ximf="http://eads.org/ximf/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://eads.org/ximf/ ximf.xsd">\r
+<ximf:ihm xmlns:ximf="http://eads.org/ximf/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\r
+ <ximf:panel id="pane_security" ilk="ilk-classification-panel">\r
+ <ximf:groupbox ilk="ilk-security-box">\r
+ <ximf:headerRef>header-classification</ximf:headerRef>\r
+ </ximf:groupbox>\r
+ </ximf:panel> \r
+ <ximf:panel id="pane_adanced" ilk="ilk-advanced-panel">\r
+ <ximf:groupbox ilk="ilk-precedence-panel">\r
+ <ximf:headerRef>header-primary-precedence</ximf:headerRef>\r
+ <ximf:headerRef>header-copy-precedence</ximf:headerRef>\r
+ <ximf:headerRef>header-akw</ximf:headerRef>\r
+ </ximf:groupbox> \r
+ </ximf:panel>\r
+ <ximf:treeRcv>\r
+ <ximf:headerRef>header-classification</ximf:headerRef>\r
+ </ximf:treeRcv>\r
+</ximf:ihm>\r
+</ximf:instance>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<ximf:instance name="caterpillar" version="1.0" ximfVersion="2.0" xmlns:ximf="http://eads.org/ximf/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://eads.org/ximf/ ximf.xsd">\r
+ <ximf:rule id="compatibility-rule" description="Règle sur la compatibilités X-SMTP / XIMF" >\r
+ <ximf:association>\r
+ <ximf:aliasHeader headerName="X-XIMF-Copy-Precedence" headerRef="X-XIMF-Primary-Precedence"> \r
+ <ximf:aliasValue valueName="routine" valueRef="routine" />\r
+ <ximf:aliasValue valueName="routine" valueRef="priority" />\r
+ <ximf:aliasValue valueName="routine,priority" valueRef="immediate" />\r
+ <ximf:aliasValue valueName="routine,priority,immediate" valueRef="flash" />\r
+ </ximf:aliasHeader>\r
+ </ximf:association>\r
+ </ximf:rule>\r
+ <ximf:rule id="label-pictures-rule" description="rule to display pictures on received mails" > \r
+ <ximf:classificationPictures targetName="ClassificationPictures">\r
+ <ximf:aliasHeader headerName="url" headerRef="X-XIMF-Security-Classification-Identifier" > \r
+ <ximf:aliasValue valueRef="7" valueName="chrome://ximf-conpany-def/content/CaterpillarInc/resource/caterpillar-green.png" />\r
+ <ximf:aliasValue valueRef="8" valueName="chrome://ximf-conpany-def/content/CaterpillarInc/resource/caterpillar-yellow.png" />\r
+ <ximf:aliasValue valueRef="9" valueName="chrome://ximf-conpany-def/content/CaterpillarInc/resource/caterpillar-red.png" /> \r
+ </ximf:aliasHeader>\r
+ </ximf:classificationPictures> \r
+ </ximf:rule>\r
+</ximf:instance>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<ximf:instance name="Whirlpool" version="1.0" ximfVersion="2.0" xmlns:ximf="http://eads.org/ximf/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://eads.org/ximf/ ximf.xsd">\r
+ <ximf:dictionary id="OneDico">\r
+ <ximf:locale lang="fr">\r
+ <ximf:ilk entity="ilk-exempted-address">Adresses exemptées</ximf:ilk>\r
+ <ximf:ilk entity="ilk-address">Addresses</ximf:ilk>\r
+ <ximf:ilk entity="ilk-urgence-box">Information</ximf:ilk>\r
+ <ximf:ilk entity="ilk-general-panel">Général</ximf:ilk>\r
+ <ximf:ilk entity="ilk-internal">INTERNE</ximf:ilk>\r
+ <ximf:ilk entity="ilk-public">PUBLIC</ximf:ilk>\r
+ <ximf:ilk entity="ilk-security-panel">Securité</ximf:ilk>\r
+ <ximf:ilk entity="ilk-originator-reference">Réferences d'origine</ximf:ilk> \r
+ <ximf:ilk entity="ilk-reply-before">Répondre avant</ximf:ilk>\r
+ <ximf:ilk entity="ilk-classification-panel">Classification</ximf:ilk>\r
+ <ximf:ilk entity="ilk-classification">Classification de sécurité</ximf:ilk>\r
+ <ximf:ilk entity="ilk-privacy-mark">Marque privée</ximf:ilk> \r
+ <ximf:ilk entity="ilk-general">Général</ximf:ilk>\r
+ <ximf:ilk entity="ilk-confidential">CONFIDENTIEL</ximf:ilk> \r
+ <ximf:ilk entity="ilk-highly-confidential">Très confidentiel</ximf:ilk>\r
+ <ximf:ilk entity="ilk-minimum">Minimum</ximf:ilk>\r
+ <ximf:ilk entity="ilk-medium">Moyen</ximf:ilk>\r
+ <ximf:ilk entity="ilk-maximum">Maximum</ximf:ilk>\r
+ <ximf:ilk entity="ilk-critical">Critique</ximf:ilk> \r
+ </ximf:locale>\r
+ <ximf:locale lang="en-US">\r
+ <ximf:ilk entity="ilk-exempted-address">Exempted adresses</ximf:ilk>\r
+ <ximf:ilk entity="ilk-address">Address</ximf:ilk>\r
+ <ximf:ilk entity="ilk-urgence-box">Information</ximf:ilk>\r
+ <ximf:ilk entity="ilk-general-panel">General</ximf:ilk>\r
+ <ximf:ilk entity="ilk-internal">INTERAL</ximf:ilk>\r
+ <ximf:ilk entity="ilk-public">PUBLIC</ximf:ilk>\r
+ <ximf:ilk entity="ilk-security-panel">Security</ximf:ilk>\r
+ <ximf:ilk entity="ilk-reply-before">Reply before</ximf:ilk>\r
+ <ximf:ilk entity="ilk-originator-reference">Origin references</ximf:ilk>\r
+ <ximf:ilk entity="ilk-classification-panel">Classification</ximf:ilk>\r
+ <ximf:ilk entity="ilk-classification">Security classification</ximf:ilk>\r
+ <ximf:ilk entity="ilk-privacy-mark">Privacy mark</ximf:ilk>\r
+ <ximf:ilk entity="ilk-general">General</ximf:ilk>\r
+ <ximf:ilk entity="ilk-confidential">CONFIDENTIAL</ximf:ilk> \r
+ <ximf:ilk entity="ilk-highly-confidential">Highly Confidential</ximf:ilk>\r
+ <ximf:ilk entity="ilk-minimum">Minimum</ximf:ilk>\r
+ <ximf:ilk entity="ilk-medium">Medium</ximf:ilk>\r
+ <ximf:ilk entity="ilk-maximum">Maximum</ximf:ilk>\r
+ <ximf:ilk entity="ilk-critical">Critical</ximf:ilk> \r
+ </ximf:locale>\r
+ </ximf:dictionary>\r
+</ximf:instance>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<?xml-stylesheet type="text/xsl" href="ximftoxul.xsl"?>\r
+<ximf:instance name="Whirlpool" version="1.0" ximfVersion="2.0" xmlns:ximf="http://eads.org/ximf/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://eads.org/ximf/ ximf.xsd">\r
+\r
+ <!-- OID WHIRLPOOL -->\r
+ <ximf:header id="header-policy-identifier" headerName="X-XIMF-Security-Policy-Identifier" > \r
+ <ximf:string content="1.2.840.113549.1.9.16.7.3"/>\r
+ </ximf:header>\r
+ \r
+ <!-- Security Classification-->\r
+ <ximf:header id="header-classification" \r
+ headerName="X-XIMF-Security-Classification"\r
+ technicalHeaderName="X-XIMF-Security-Classification-Identifier"\r
+ type="string"\r
+ technicalType="oid"\r
+ ilk="ilk-classification"\r
+ isMandatory="true">\r
+ <ximf:set id="value-whirlpool-classification">\r
+ <ximf:string ilk="ilk-public" content="whirlpool-public" technicalContent="6" > \r
+ <ximf:linkedValue ref="value-privacy-mark-other" />\r
+ </ximf:string> \r
+ <ximf:string ilk="ilk-internal" content="whirlpool-internal" technicalContent="7" >\r
+ <ximf:linkedValue ref="value-privacy-mark-confidential" />\r
+ </ximf:string> \r
+ <ximf:string ilk="ilk-confidential" content="whirlpool-confidential" technicalContent="8" >\r
+ <ximf:linkedValue ref="value-privacy-mark-confidential" />\r
+ </ximf:string> \r
+ </ximf:set>\r
+ </ximf:header> \r
+ <ximf:header id="header-privacy-mark" headerName="X-XIMF-Privacy-Mark" ilk="ilk-privacy-mark" isMandatory="false">\r
+ <ximf:set id="value-privacy-mark-confidential">\r
+ <ximf:compstring ilk="LIMITED TO" content="LIMITED TO" separator=" : ">\r
+ <ximf:string editable="true" />\r
+ </ximf:compstring>\r
+ <ximf:string ilk="MAKE NO COPY" content="MAKE NO COPY" />\r
+ <ximf:string ilk="ATTORNEY-CLIENT PRIVILEGED DOCUMENT" content="ATTORNEY-CLIENT PRIVILEGED DOCUMENT" />\r
+ <ximf:string ilk="THIRD PARTY CONFIDENTIAL" content="THIRD PARTY CONFIDENTIAL" />\r
+ <ximf:string ilk="COVERED BY A NON-ANALYSIS AGREEMENT" content="COVERED BY A NON-ANALYSIS AGREEMENT" />\r
+ </ximf:set>\r
+ <ximf:set id="value-privacy-mark-other">\r
+ <ximf:string ilk="SEND BY INTERNET" content="SEND BY INTERNET" />\r
+ <ximf:string ilk="PRIVATE" content="PRIVATE" />\r
+ </ximf:set>\r
+ </ximf:header>\r
+ \r
+ <!-- headers unmandatories -->\r
+ <ximf:header id="header-reply-before" headerName="X-XIMF-Reply-Before" ilk="ilk-reply-before" isMandatory="false" type="date">\r
+ <ximf:string id="value-reply-before" editable="true" />\r
+ </ximf:header> \r
+ \r
+ <ximf:header id="header-originator-reference" headerName="X-XIMF-Originator-Reference" ilk="ilk-originator-reference" isMandatory="false" type="string">\r
+ <ximf:string id="value-originator-reference" maxItem="10" editable="true" separator=" - "/>\r
+ </ximf:header>\r
+ \r
+ <!-- Adresses exemptées -->\r
+ <ximf:header id="header-exempted-address" headerName="X-XIMF-Exempted-Address" ilk="ilk-exempted-address" isMandatory="false" type="address">\r
+ <ximf:string id="value-exempted-address" editable="true" />\r
+ </ximf:header>\r
+\r
+</ximf:instance>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<ximf:instance name="Whirlpool" version="1.0" ximfVersion="2.0" xmlns:ximf="http://eads.org/ximf/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://eads.org/ximf/ ximf.xsd">\r
+ <ximf:ihm xmlns:ximf="http://eads.org/ximf/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\r
+ <ximf:panel id="pane_security" ilk="ilk-security-panel">\r
+ <ximf:groupbox id="group-classification" ilk="ilk-classification-panel">\r
+ <ximf:headerRef>header-classification</ximf:headerRef> \r
+ <ximf:headerRef>header-privacy-mark</ximf:headerRef>\r
+ </ximf:groupbox> \r
+ </ximf:panel> \r
+ <ximf:panel id="pane_general" ilk="ilk-general-panel"> \r
+ <ximf:groupbox id="group-ref" ilk="ilk-urgence-box"> \r
+ <ximf:headerRef>header-originator-reference</ximf:headerRef> \r
+ <ximf:headerRef>header-reply-before</ximf:headerRef> \r
+ </ximf:groupbox> \r
+ </ximf:panel>\r
+ <ximf:panel id="pane_address" ilk="ilk-address"> \r
+ <ximf:headerRef>header-exempted-address</ximf:headerRef> \r
+ </ximf:panel>\r
+ <ximf:treeRcv>\r
+ <ximf:headerRef>header-classification</ximf:headerRef> \r
+ <ximf:headerRef>header-privacy-mark</ximf:headerRef>\r
+ </ximf:treeRcv>\r
+ </ximf:ihm>\r
+</ximf:instance>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<ximf:instance name="Whirlpool" version="1.0" ximfVersion="2.0" xmlns:ximf="http://eads.org/ximf/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://eads.org/ximf/ ximf.xsd">\r
+</ximf:instance>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<profile>\r
+ <theme name="Company Def"\r
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+ xsi:noNamespaceSchemaLocation="D:\DOC\ximf_profile.xsd">\r
+ <instance id="smtp" ximfVersion="2.0" version="1.0" label="Message standard" name="smtp" directory="" author="string"/>\r
+ <instance id="idAmocoDefinition" ximfVersion="2.0" version="1.0"\r
+ name="Amoco"\r
+ directory="{E255643F-7DCA-4cd8-B0C2-61EAADE39FCE}/chrome/content/AmocoCorporation/"\r
+ author="Ximfmail">\r
+ <schema id="AAAAB" name="Amoco">headers-amoco.xml</schema>\r
+ <dictionary author="EADS DS">dictionary-amoco.xml</dictionary>\r
+ <ihm id="AAAAC" name="string">ihm-amoco.xml</ihm>\r
+ <rule id="AAAAD" author="string">rules-amoco.xml</rule>\r
+ </instance>\r
+ <instance id="idCaterpillarDefinition" ximfVersion="2.0"\r
+ version="1.0" name="Caterpillar"\r
+ directory="{E255643F-7DCA-4cd8-B0C2-61EAADE39FCE}/chrome/content/CaterpillarInc/"\r
+ author="Ximfmail">\r
+ <schema name="Caterpillar">headers-caterpillar.xml</schema>\r
+ <dictionary>dictionary-caterpillar.xml</dictionary>\r
+ <ihm>ihm-caterpillar.xml</ihm>\r
+ <rule author="string">rules-caterpillar.xml</rule>\r
+ </instance>\r
+ <instance id="idWhirlpoolDefinition" ximfVersion="2.0"\r
+ version="1.0" name="Whirlpool"\r
+ directory="{E255643F-7DCA-4cd8-B0C2-61EAADE39FCE}/chrome/content/WhirlpoolCorporation/"\r
+ author="Ximfmail">\r
+ <schema name="Whirlpool">headers-whirlpool.xml</schema>\r
+ <dictionary>dictionary-whirlpool.xml</dictionary>\r
+ <ihm>ihm-whirlpool.xml</ihm>\r
+ <rule>rules-whirlpool.xml</rule>\r
+ </instance>\r
+ </theme>\r
+</profile>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">\r
+ <Description about="urn:mozilla:install-manifest">\r
+ <em:name>Definition Company Sample</em:name>\r
+ <em:version>24.3.0.1.0</em:version>\r
+ <em:id>{E255643F-7DCA-4cd8-B0C2-61EAADE39FCE}</em:id>\r
+ <em:description>Sample Definition Instances for Ximfmail</em:description>\r
+ <em:unpack>true</em:unpack>\r
+ <em:targetApplication>\r
+ <!-- Thunderbird -->\r
+ <Description>\r
+ <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>\r
+ <em:minVersion>24.3.0</em:minVersion>\r
+ <em:maxVersion>24.3.*</em:maxVersion>\r
+ </Description>\r
+ </em:targetApplication>\r
+ <!-- Development team -->\r
+ <em:creator>Airbus Defence and Space</em:creator>\r
+ <!-- Informations -->\r
+ <em:homepageURL>http://www.airbusdefenceandspace.com</em:homepageURL>\r
+ <em:optionsURL/><em:aboutURL/><em:iconURL/><em:updateURL/>\r
+ </Description>\r
+</RDF>
\ No newline at end of file
--- /dev/null
+ximf-company-def.jar:
+% content ximf-company-def %content/
+% locale ximf-company-def fr %locale/fr-FR/
+% locale ximf-company-def us %locale/en-US/
+% skin ximf-incompany-def %classic/1.0 skin/classic/
+ content/CaterpillarInc/resource/caterpillar-green.png (chrome/content/CaterpillarInc/resource/caterpillar-green.png)
+ content/CaterpillarInc/resource/caterpillar-yellow.png (chrome/content/CaterpillarInc/resource/caterpillar-yellow.png)
+ content/CaterpillarInc/resource/caterpillar-red.png (chrome/content/CaterpillarInc/resource/caterpillar-red.png)
+
+
--- /dev/null
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is mozilla.org code.
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 1998
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either of the GNU General Public License Version 2 or later (the "GPL"),
+# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH = ../../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+MODULE = ximf_mdn
+DIRS =
+
+XPI_NAME = Ximf_mdn
+INSTALL_EXTENSION_ID = {A9FAF6FB-7786-4a66-AE31-9D4E5A22E445}
+XPI_PKGNAME = ximf_mdn
+
+DIST_FILES = install.rdf update.rdf
+
+USE_EXTENSION_MANIFEST = 1
+
+include $(topsrcdir)/config/rules.mk
--- /dev/null
+content ximf_mdn chrome/content/
+overlay chrome://messenger/content/messenger.xul chrome://ximf_mdn/content/messenger_ov_ximfmdn.xul
+overlay chrome://messenger/content/messageWindow.xul chrome://ximf_mdn/content/messageWindow_ov_ximfmdn.xul
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!-- ***** BEGIN LICENSE BLOCK *****\r
+ - Version: MPL 1.1/GPL 2.0/LGPL 2.1\r
+ -\r
+ - The contents of this file are subject to the Mozilla Public License Version\r
+ - 1.1 (the "License"); you may not use this file except in compliance with\r
+ - the License. You may obtain a copy of the License at\r
+ - http://www.mozilla.org/MPL/\r
+ -\r
+ - Software distributed under the License is distributed on an "AS IS" basis,\r
+ - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License\r
+ - for the specific language governing rights and limitations under the\r
+ - License.\r
+ -\r
+ - The Original Code is Mozilla Communicator\r
+ -\r
+ - The Initial Developer of the Original Code is\r
+ - BT Global Services / Etat francais Ministere de la Defense\r
+ - Portions created by the Initial Developer are Copyright (C) 2002\r
+ - the Initial Developer. All Rights Reserved.\r
+ -\r
+ - Contributor(s):\r
+ - Eric Ballet Baz BT Global Services / Etat francais Ministere de la Defense\r
+ -\r
+ - Alternatively, the contents of this file may be used under the terms of\r
+ - either the GNU General Public License Version 2 or later (the "GPL"), or\r
+ - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ - in which case the provisions of the GPL or the LGPL are applicable instead\r
+ - of those above. If you wish to allow use of your version of this file only\r
+ - under the terms of either the GPL or the LGPL, and not to allow others to\r
+ - use your version of this file under the terms of the MPL, indicate your\r
+ - decision by deleting the provisions above and replace them with the notice\r
+ - and other provisions required by the LGPL or the GPL. If you do not delete\r
+ - the provisions above, a recipient may use your version of this file under\r
+ - the terms of any one of the MPL, the GPL or the LGPL.\r
+ -\r
+ - ***** END LICENSE BLOCK ***** -->\r
+ \r
+<overlay id="mdn_extended_messengeWindow_overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">\r
+ <script type="application/javascript" src="chrome://ximf_mdn/content/ximfmdn_extended.js"/> \r
+</overlay>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!-- ***** BEGIN LICENSE BLOCK *****\r
+ - Version: MPL 1.1/GPL 2.0/LGPL 2.1\r
+ -\r
+ - The contents of this file are subject to the Mozilla Public License Version\r
+ - 1.1 (the "License"); you may not use this file except in compliance with\r
+ - the License. You may obtain a copy of the License at\r
+ - http://www.mozilla.org/MPL/\r
+ -\r
+ - Software distributed under the License is distributed on an "AS IS" basis,\r
+ - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License\r
+ - for the specific language governing rights and limitations under the\r
+ - License.\r
+ -\r
+ - The Original Code is Mozilla Communicator\r
+ -\r
+ - The Initial Developer of the Original Code is\r
+ - BT Global Services / Etat francais Ministere de la Defense\r
+ - Portions created by the Initial Developer are Copyright (C) 2002\r
+ - the Initial Developer. All Rights Reserved.\r
+ -\r
+ - Contributor(s):\r
+ - Eric Ballet Baz BT Global Services / Etat francais Ministere de la Defense\r
+ -\r
+ - Alternatively, the contents of this file may be used under the terms of\r
+ - either the GNU General Public License Version 2 or later (the "GPL"), or\r
+ - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ - in which case the provisions of the GPL or the LGPL are applicable instead\r
+ - of those above. If you wish to allow use of your version of this file only\r
+ - under the terms of either the GPL or the LGPL, and not to allow others to\r
+ - use your version of this file under the terms of the MPL, indicate your\r
+ - decision by deleting the provisions above and replace them with the notice\r
+ - and other provisions required by the LGPL or the GPL. If you do not delete\r
+ - the provisions above, a recipient may use your version of this file under\r
+ - the terms of any one of the MPL, the GPL or the LGPL.\r
+ -\r
+ - ***** END LICENSE BLOCK ***** -->\r
+<overlay id="mdn_extended_messenger_overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">\r
+ <script type="application/javascript" src="chrome://ximf_mdn/content/ximfmdn_extended.js"/>\r
+</overlay>
\ No newline at end of file
--- /dev/null
+/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-\r
+ * ***** BEGIN LICENSE BLOCK *****\r
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1\r
+ *\r
+ * The contents of this file are subject to the Mozilla Public License Version\r
+ * 1.1 (the "License"); you may not use this file except in compliance with\r
+ * the License. You may obtain a copy of the License at\r
+ * http://www.mozilla.org/MPL/\r
+ *\r
+ * Software distributed under the License is distributed on an "AS IS" basis,\r
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License\r
+ * for the specific language governing rights and limitations under the\r
+ * License.\r
+ *\r
+ * The Original Code is mozilla.org Code.\r
+ *\r
+ * The Initial Developer of the Original Code is\r
+ * BT Global Services / Etat francais Ministere de la Defense\r
+ * Portions created by the Initial Developer are Copyright (C) 1998-2001\r
+ * the Initial Developer. All Rights Reserved.\r
+ *\r
+ * Contributor(s):\r
+ * Eric Ballet Baz BT Global Services / Etat francais Ministere de la Defense\r
+ * Copyright (c) 2014 CASSIDIAN - All rights reserved\r
+ *\r
+ * Alternatively, the contents of this file may be used under the terms of\r
+ * either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ * in which case the provisions of the GPL or the LGPL are applicable instead\r
+ * of those above. If you wish to allow use of your version of this file only\r
+ * under the terms of either the GPL or the LGPL, and not to allow others to\r
+ * use your version of this file under the terms of the MPL, indicate your\r
+ * decision by deleting the provisions above and replace them with the notice\r
+ * and other provisions required by the GPL or the LGPL. If you do not delete\r
+ * the provisions above, a recipient may use your version of this file under\r
+ * the terms of any one of the MPL, the GPL or the LGPL.\r
+ *\r
+ * ***** END LICENSE BLOCK ***** */\r
+\r
+// MDN Disposition Type for Deletion\r
+var MDN_DISPOSE_TYPE_DELETED = 3;\r
+var MDN_Registered=false;\r
+//Save the original built SetupCommandUpdateHandlers functions\r
+var mdn_extended_OriginalSetupCommandUpdateHandlers;\r
+if(!mdn_extended_OriginalSetupCommandUpdateHandlers)\r
+{\r
+ mdn_extended_OriginalSetupCommandUpdateHandlers=SetupCommandUpdateHandlers;\r
+}\r
+\r
+// Controller object that will handle deletion commands : used to override default controller\r
+var mdn_extended_MDN_DeleteController = {\r
+ supportsCommand: function(command) {\r
+ switch (command) {\r
+ case "cmd_delete":\r
+ case "button_delete":\r
+ case "cmd_shiftDelete":\r
+ return true;\r
+ default:\r
+ return false;\r
+ }\r
+ },\r
+ isCommandEnabled: function(command) {\r
+ // Delegate this call to the default controller\r
+ return DefaultController.isCommandEnabled(command);\r
+ },\r
+ doCommand: function(command) {\r
+ // if the user invoked a key short cut then it is possible that we got here for a command which is really disabled. kick out if the command should be disabled.\r
+ if (!this.isCommandEnabled(command)) {\r
+ return;\r
+ }\r
+ // HandleMDNDeleteResponse for each message to delete\r
+ var selectedMessages = gFolderDisplay.selectedMessageUris;\r
+ if (selectedMessages) {\r
+ var nbSelectedMessages = selectedMessages.length;\r
+ for (var i = 0; i < nbSelectedMessages; i++) {\r
+ var URL = mdn_extended_createURLFromURI(selectedMessages[i]);\r
+ var headers = mdn_extended_createHeadersFromURI(selectedMessages[i]);\r
+ mdn_extended_HandleMDNDeleteResponse(URL, headers);\r
+ }\r
+ }\r
+ // Delegate deletion to the default controller\r
+ DefaultController.doCommand(command);\r
+ },\r
+ onEvent: function(event) {\r
+ }\r
+};\r
+\r
+function mdn_extended_createHeadersFromURI(messageURI) {\r
+ var messageService = messenger.messageServiceFromURI(messageURI);\r
+ var messageStream = Components.classes["@mozilla.org/network/sync-stream-listener;1"].createInstance().QueryInterface(Components.interfaces.nsIInputStream);\r
+ var inputStream = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance().QueryInterface(Components.interfaces.nsIScriptableInputStream);\r
+ inputStream.init(messageStream);\r
+ var newuri = messageService.streamMessage(messageURI,messageStream, msgWindow, null, false, null);\r
+\r
+ var content = "";\r
+ inputStream.available();\r
+ while (inputStream.available()) {\r
+ content = content + inputStream.read(512);\r
+ var p = content.indexOf("\r\n\r\n");\r
+ var p1 = content.indexOf("\r\r");\r
+ var p2 = content.indexOf("\n\n");\r
+ if (p > 0) {\r
+ content = content.substring(0, p);\r
+ break;\r
+ }\r
+ if (p1 > 0) {\r
+ content = content.substring(0, p1);\r
+ break;\r
+ }\r
+ if (p2 > 0) {\r
+ content = content.substring(0, p2);\r
+ break;\r
+ }\r
+ if (content.length > 512 * 8)\r
+ {\r
+ throw "Could not find end-of-headers line.";\r
+ return null;\r
+ }\r
+ }\r
+ content = content + "\r\n";\r
+\r
+ var headers = Components.classes["@mozilla.org/messenger/mimeheaders;1"].createInstance().QueryInterface(Components.interfaces.nsIMimeHeaders);\r
+ headers.initialize(content, content.length);\r
+ return headers;\r
+}\r
+\r
+function mdn_extended_createURLFromURI(messageURI) {\r
+ var messageService = messenger.messageServiceFromURI(messageURI);\r
+ var holder = new Object();\r
+ messageService.GetUrlForUri(messageURI, holder, null);\r
+ holder.value.QueryInterface(Components.interfaces.nsIMsgMailNewsUrl);\r
+ return holder.value;\r
+}\r
+\r
+\r
+// This function handles all mdn delete response generation\r
+function mdn_extended_HandleMDNDeleteResponse(aUrl, headers) {\r
+ if (!aUrl) {\r
+ return;\r
+ }\r
+ var msgFolder = aUrl.folder;\r
+ var msgURI = gFolderDisplay.selectedMessageUris[0]; //GetLoadedMessage();\r
+ if (!msgFolder || !msgURI || gFolderDisplay.selectedMessageIsNews) {\r
+ return;\r
+ }\r
+ // If the message is already in the Trash don't send a MDN delete report\r
+ if (msgFolder.isSpecialFolder( Components.interfaces.nsMsgFolderFlags.Trash, true)) {\r
+ return;\r
+ }\r
+ // if the message is marked as junk, do NOT attempt to process a return receipt in order to better protect the user\r
+ var msgHdr = gFolderDisplay.selectedMessage;\r
+ var junkScore = msgHdr.getStringProperty("junkscore");\r
+ if(junkScore !== "0") {\r
+ return;\r
+ }\r
+ var msgHdr = messenger.msgHdrFromURI(msgURI);\r
+ var mimeHdr = headers;\r
+ // If we didn't get the message id when we downloaded the message header,\r
+ // we cons up an md5: message id. If we've done that, we'll try to extract\r
+ // the message id out of the mime headers for the whole message.\r
+ var msgId = msgHdr.messageId;\r
+ if (msgId.split(":")[0] == "md5") {\r
+ var mimeMsgId = mimeHdr.extractHeader("Message-Id", false);\r
+ if (mimeMsgId) {\r
+ msgHdr.messageId = mimeMsgId;\r
+ }\r
+ }\r
+ // Check if the message has already been delete (IMAP)\r
+ var msgFlags = msgHdr.flags;\r
+ if ((msgFlags & Components.interfaces.nsMsgMessageFlags.IMAPDeleted)) {\r
+ return;\r
+ }\r
+ // Check if the positive MDN message has been sent\r
+ if ((msgFlags & Components.interfaces.nsMsgMessageFlags.MDNReportSent)) {\r
+ return;\r
+ }\r
+ // Check if the msg has a "Disposition-Notification-To" header.\r
+ var DNTHeader = mimeHdr.extractHeader("Disposition-Notification-To", false);\r
+ var oldDNTHeader = mimeHdr.extractHeader("Return-Receipt-To", false);\r
+ if (!DNTHeader && !oldDNTHeader) {\r
+ return;\r
+ }\r
+ // Everything looks good so far, let's generate the MDN delete response.\r
+ var mdnGenerator = Components.classes["@mozilla.org/messenger-mdn/generator;1"].createInstance(Components.interfaces.nsIMsgMdnGenerator);\r
+ if (mdnGenerator.process(MDN_DISPOSE_TYPE_DELETED, msgWindow, msgFolder, msgHdr.messageKey, mimeHdr, true)) {\r
+ mdnGenerator.userAgreed();\r
+ }\r
+}\r
+\r
+\r
+// Extension Hook : replace the built in SetupCommandUpdateHandlers functions defined in mail3PaneWindowCommands.js and in messageWindow.js with our own..\r
+SetupCommandUpdateHandlers = function mdn_extended_SetupCommandUpdateHandlers() {\r
+ //Test if the MDN controller is registered\r
+ // to have not some calls in loop\r
+ if(!MDN_Registered)\r
+ {\r
+ // Call built in SetupCommandUpdateHandlers function\r
+ mdn_extended_OriginalSetupCommandUpdateHandlers();\r
+\r
+ // Register our MDN_DeleteController as the first controller in the list\r
+ top.controllers.insertControllerAt(0, mdn_extended_MDN_DeleteController);\r
+ MDN_Registered=true;\r
+ dump("MDN_DeleteController Registered\n");\r
+ }\r
+}\r
+\r
+\r
+\r
--- /dev/null
+<?xml version="1.0"?>\r
+<RDF:RDF xmlns:em="http://www.mozilla.org/2004/em-rdf#"\r
+ xmlns:NC="http://home.netscape.com/NC-rdf#"\r
+ xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">\r
+ <RDF:Description RDF:about="urn:mozilla:install-manifest"\r
+ em:id="{A9FAF6FB-7786-4a66-AE31-9D4E5A22E445}"\r
+ em:name="XIMF MDN extented"\r
+ em:version="24.3.0.1.0"\r
+ em:description="Message Disposition Notification extended"\r
+ em:creator="Airbus Defence and Space"\r
+ em:homepageURL="http://www.airbusdefenceandspace.com">\r
+ <em:targetApplication>\r
+ <!-- Thunderbird -->\r
+ <Description>\r
+ <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>\r
+ <em:minVersion>24.3.0</em:minVersion>\r
+ <em:maxVersion>24.3.*</em:maxVersion>\r
+ </Description>\r
+ </em:targetApplication>\r
+ </RDF:Description> \r
+</RDF:RDF>
\ No newline at end of file
--- /dev/null
+ximf_mdn.jar:
+% content ximf_mdn %content/
+% locale ximf_mdn fr %locale/fr_FR/
+% locale ximf_mdn us %locale/en_US/
+% skin ximf_mdn %classic/1.0 skin/
+% overlay chrome://messenger/content/messenger.xul chrome://ximf_mdn/content/messenger_ov_ximfmdn.xul
+% overlay chrome://messenger/content/messageWindow.xul chrome://ximf_mdn/content/messageWindow_ov_ximfmdn.xul
+ content/ximfmdn_extended.js (chrome/content/ximfmdn_extended.js)
+ content/messenger_ov_ximfmdn.xul (chrome/content/messenger_ov_ximfmdn.xul)
+ content/messageWindow_ov_ximfmdn.xul (chrome/content/messageWindow_ov_ximfmdn.xul)
+
--- /dev/null
+<?xml version="1.0"?>\r
+\r
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\r
+xmlns:em="http://www.mozilla.org/2004/em-rdf#">\r
+\r
+<RDF:Description about="urn:mozilla:extension:${thunext.name}">\r
+ <em:updates>\r
+ <RDF:Seq>\r
+ <RDF:li resource="urn:mozilla:extension:${thunext.name}:1.0.1.1265161759"/>\r
+ </RDF:Seq>\r
+ </em:updates>\r
+ <em:version>1.0.1.1265161759</em:version>\r
+ <em:updateLink>http://smdev085/update/fr/ximf_mdn/@ARCHIVE_NAME@</em:updateLink>\r
+</RDF:Description>\r
+\r
+<RDF:Description about="urn:mozilla:extension:${thunext.name}:1.0.1.1265161759">\r
+<em:version>1.0.1.1265161759</em:version>\r
+<em:targetApplication>\r
+ <!-- Thunderbird -->\r
+ <Description>\r
+ <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>\r
+ <em:minVersion>1.5</em:minVersion>\r
+ <em:maxVersion>2.0.*</em:maxVersion>\r
+ <em:updateLink>http://smdev085/update/fr/ximf_mdn/@ARCHIVE_NAME@</em:updateLink>\r
+ </Description>\r
+</em:targetApplication>\r
+</RDF:Description>\r
+\r
+</RDF:RDF>\r
--- /dev/null
+Ximfmail (3.1.11+0.6.4)
+ * Corrective on blocking TrustedBird on downloading messages with big attachments
+ * Corrective on using settings to sign messages
+-- Sep 09 2011
+Ximfmail (24.3.0.0.1.0)
+ * Upgrade to be used with Trustedbird 24.3.0
+-- 06 Mai 2014
\ No newline at end of file
--- /dev/null
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is mozilla.org code.
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 1998
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either of the GNU General Public License Version 2 or later (the "GPL"),
+# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+
+
+
+DEPTH = ../../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+MODULE = ximfmail
+DIRS =
+
+XPI_NAME = ximf_mail
+INSTALL_EXTENSION_ID = {A627B834-BD9F-4b3f-9AF5-347B5A570402}
+XPI_PKGNAME = ximf_mail
+
+DIST_FILES = install.rdf update.rdf
+
+USE_EXTENSION_MANIFEST = 1
+
+libs::
+ $(INSTALL) $(srcdir)/components/*.js $(FINAL_TARGET)/components
+ $(INSTALL) $(srcdir)/chrome/content/theme/*.xsl $(FINAL_TARGET)/chrome/content/theme
+
+include $(topsrcdir)/config/rules.mk
--- /dev/null
+content ximfmail chrome/content/kernel/
+content theme_ximfmail chrome/content/theme/
+locale ximfmail fr chrome/locale/fr-FR/
+locale ximfmail us chrome/locale/en-US/
+skin ximfmail classic/1.0 chrome/skin/
+overlay chrome://messenger/content/messenger.xul chrome://ximfmail/content/messenger-ov-ximfmail.xul
+overlay chrome://messenger/content/messengercompose/messengercompose.xul chrome://ximfmail/content/messengerCompose-ov-ximfmail.xul
+overlay chrome://messenger/content/messageWindow.xul chrome://ximfmail/content/messageWindow-ov-ximfmail.xul
+overlay chrome://messenger-smime/content/msgReadSecurityInfo.xul chrome://ximfmail/content/msgReadSecurityInfo-ov-ximfmail.xul
+
+# Preference Service
+component {4B539696-E605-4663-B9E9-CB6D44B6FFEB} components/ximfmail-service.js
+contract @mozilla.org/accountmanager/extension;1?name=ximfmail-account {4B539696-E605-4663-B9E9-CB6D44B6FFEB}
+category mailnews-accountmanager-extensions ximfmail-account-manager-extension @mozilla.org/accountmanager/extension;1?name=ximfmail-account
--- /dev/null
+/* ***** BEGIN LICENSE BLOCK *****\r
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ *\r
+ *\r
+ * Redistribution and use, in source and binary forms, with or without modification,\r
+ * are permitted provided that the following conditons are met :\r
+ *\r
+ * 1. Redistributions of source code must retain the above copyright notice,\r
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ * in the redistribution of the source code.\r
+ * 3. Neither the names of the copyright holders nor the names of any contributors\r
+ * may be used to endorse or promote products derived from this software without specific\r
+ * prior written permission from EADS Defence and Security.\r
+ *\r
+ * Alternatively, the contents of this file may be used under the terms of\r
+ * either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ * in which case the provisions of the GPL or the LGPL are applicable instead\r
+ * of those above. If you wish to allow use of your version of this file only\r
+ * under the terms of either the GPL or the LGPL, and not to allow others to\r
+ * use your version of this file under the terms of the MPL, indicate your\r
+ * decision by deleting the provisions above and replace them with the notice\r
+ * and other provisions required by the GPL or the LGPL. If you do not delete\r
+ * the provisions above, a recipient may use your version of this file under\r
+ * the terms of any one of the MPL, the GPL or the LGPL.\r
+ *\r
+ * REMINDER :\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ *\r
+ * Contributor(s):\r
+ * Copyright(c) Airbus Defence and Space 2014 - All rights reserved\r
+ * ***** END LICENSE BLOCK ***** */\r
+// get pref settings\r
+function onPreInit(account, accountValues) {\r
+ XimfmailAccountPage.getInstance().setIdentity(account.defaultIdentity);\r
+}\r
+function onInit(aPageId, aServerId) {\r
+ XimfmailAccountPage.getInstance().init();\r
+}\r
+// save all changes on this page\r
+function onSave() {\r
+ XimfmailAccountPage.getInstance().save();\r
+}\r
+/**\r
+ * Ximfmail settings account page\r
+ */\r
+var XimfmailAccountPage = ( function () {\r
+ var instantiated = null;\r
+ var accountIdentity = null;\r
+ var log = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);\r
+ // enable/disable ximfmail settings\r
+ function toogle(){\r
+ if ($("#checkListTheme").attr("checked") === "true") {\r
+ $("#isUsingXimfail").attr("disabled", "false");\r
+ } else {\r
+ $("#isUsingXimfail").attr("disabled", "true");\r
+ }\r
+ }\r
+ /*\r
+ * init default menulist xul element with first menuitem\r
+ * idMenuList : id of menulist xul element\r
+ */\r
+ function initEntryMenu(idMenuList){\r
+ var itemlist = $("#"+ idMenuList +" > menupopup > menuitem");\r
+ $("#"+idMenuList).attr("value",$(itemlist[0]).attr("value"));\r
+ $("#"+idMenuList).attr("label",$(itemlist[0]).attr("label"));\r
+ }\r
+ /*\r
+ * display user pref value in menulist if exists\r
+ * manage RDF Catalog list in accountWizard, accountManager\r
+ * identity : user identity key\r
+ * idPref : user preference key\r
+ * idList : id of menulist xul element\r
+ */\r
+ function initEntryMenuWithPref(idPref,idList){\r
+ var pref = ximfPref.get(accountIdentity.key,idPref);\r
+ log.logStringMessage("[am-ximfmail - initEntryMenuWithPref] pref : " + pref);\r
+ if (pref) {\r
+ var entry = document.getElementById(idList);\r
+ if(!entry){\r
+ log.logStringMessage("[am-ximfmail - initEntryMenuWithPref] unloaded entry : " + entry);\r
+ return;\r
+ }\r
+ var themeList = entry.menupopup.childNodes;\r
+ for (var i=0; i<themeList.length; ++i) {\r
+ if(themeList[i].localName === "menuitem") {\r
+ var themeListval = themeList[i].value;\r
+ if( pref === themeListval){\r
+ entry.value = themeListval;\r
+ entry.label = themeList[i].label;\r
+ break;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ // load instances of selected theme\r
+ function loadTheme() {\r
+ var themeRef = $("#listTheme").attr("value");\r
+ AddRdfDataSce2domList("instanceCompose", themeRef);\r
+ initEntryMenu("instanceComposeList");\r
+ AddRdfDataSce2domList("instanceTreeThread", themeRef);\r
+ initEntryMenu("instanceTreeThreadList");\r
+ };\r
+ /**\r
+ * Listener on datasources of istance definitions menu\r
+ */\r
+ var treebuilderListener = {\r
+ item: null,\r
+ willRebuild : function(builder) {\r
+ },\r
+ didRebuild : function(builder) {\r
+ // determine if user uses ximfmail\r
+ $("#checkListTheme").attr("checked", "false");\r
+ if (ximfPref.getBool(accountIdentity.key, ximfConst.XIMF_PREF_IDENTITY_USE_XIMFMAIL)) {\r
+ $("#checkListTheme").attr("checked", "true");\r
+ }\r
+ initEntryMenuWithPref("ximfmail_theme_ref","listTheme");\r
+ loadTheme();\r
+ initEntryMenuWithPref("ximfmail_instance_compose_ref","instanceComposeList");\r
+ initEntryMenuWithPref(ximfConst.XIMF_PREF_IDENTITY_TREETHREAD_REF,"instanceTreeThreadList");\r
+ $("#listTheme").bind('command', loadTheme);\r
+ $("#checkListTheme").click(toogle);\r
+ toogle();\r
+ // determine if user wants XSMTP compatibility\r
+ $("#xsmtpComptibilityBox").attr("checked", ximfPref.getBool(accountIdentity.key, "ximfmail_xsmtp_compatibility_on").toString());\r
+ }\r
+ };\r
+ //\r
+ function instantiate() {\r
+ return {\r
+ setIdentity : function (aIdentity) {\r
+ accountIdentity = aIdentity;\r
+ },\r
+ init : function () {\r
+ try {\r
+ if (!accountIdentity) {\r
+ // no account id (local folder)\r
+ $("#checkListTheme").attr("checked", "false");\r
+ toogle();\r
+ $("#checkListTheme").attr("disabled", "true");\r
+ return;\r
+ }\r
+ $("#checkListTheme").removeAttr("disabled");\r
+ //load XIMF instances of profile for account\r
+ XimfCatalogFactory.getIntance(function(instance){\r
+ var listInstances = document.getElementById("listThemPopup");\r
+ listInstances.database.AddDataSource(instance.getDSCatalog());\r
+ listInstances.builder.addListener(treebuilderListener);\r
+ listInstances.builder.rebuild();\r
+ });\r
+ } catch (ex) {\r
+ log.logStringMessage("[am-ximfmail] Error on init settings for account " + accountIdentity.key + " : " + ex);\r
+ }\r
+ },\r
+ save : function () {\r
+ try {\r
+ if (!accountIdentity) {\r
+ return;\r
+ }\r
+ // save ximfmail selection to preferences\r
+ ximfPref.set(accountIdentity.key, "ximfmail_theme_ref", $("#listTheme").attr("value"));\r
+ ximfPref.set(accountIdentity.key, "ximfmail_theme_name", $("#listTheme").attr("label"));\r
+ ximfPref.set(accountIdentity.key, "ximfmail_instance_compose_ref", $("#instanceComposeList").attr("value"));\r
+ ximfPref.set(accountIdentity.key, ximfConst.XIMF_PREF_IDENTITY_TREETHREAD_REF,$("#instanceTreeThreadList").attr("value"));\r
+ if($("#checkListTheme").attr("checked") === "true"){\r
+ ximfPref.setBool(accountIdentity.key, ximfConst.XIMF_PREF_IDENTITY_USE_XIMFMAIL,true);\r
+ try{\r
+ CreateSecurityLabelXml();\r
+ }catch(e){}\r
+ }else{\r
+ ximfPref.setBool(accountIdentity.key, ximfConst.XIMF_PREF_IDENTITY_USE_XIMFMAIL,false);\r
+ }\r
+ if($("#xsmtpComptibilityBox").attr("checked") === "true"){\r
+ ximfPref.setBool(accountIdentity.key, "ximfmail_xsmtp_compatibility_on",true);\r
+ }else{\r
+ ximfPref.setBool(accountIdentity.key, "ximfmail_xsmtp_compatibility_on",false);\r
+ }\r
+ log.logStringMessage("[am-ximfmail] Save settings for account " + accountIdentity.key);\r
+ } catch (ex) {\r
+ log.logStringMessage("[am-ximfmail] Error on saving settings for account " + accountIdentity.key + " : " + ex);\r
+ }\r
+ }\r
+ };\r
+ };\r
+ //\r
+ return {\r
+ getInstance : function(){\r
+ if(!instantiated){\r
+ instantiated = instantiate();\r
+ }\r
+ return instantiated;\r
+ }\r
+ };\r
+})();
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>\r
+<!-- ***** BEGIN LICENSE BLOCK *****\r
+ - Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ - ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ -\r
+ -\r
+ - Redistribution and use, in source and binary forms, with or without modification,\r
+ - are permitted provided that the following conditons are met :\r
+ -\r
+ - 1. Redistributions of source code must retain the above copyright notice,\r
+ - 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ - in the redistribution of the source code.\r
+ - 3. Neither the names of the copyright holders nor the names of any contributors\r
+ - may be used to endorse or promote products derived from this software without specific\r
+ - prior written permission from EADS Defence and Security.\r
+ -\r
+ - Alternatively, the contents of this file may be used under the terms of\r
+ - either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ - or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ - in which case the provisions of the GPL or the LGPL are applicable instead\r
+ - of those above. If you wish to allow use of your version of this file only\r
+ - under the terms of either the GPL or the LGPL, and not to allow others to\r
+ - use your version of this file under the terms of the MPL, indicate your\r
+ - decision by deleting the provisions above and replace them with the notice\r
+ - and other provisions required by the GPL or the LGPL. If you do not delete\r
+ - the provisions above, a recipient may use your version of this file under\r
+ - the terms of any one of the MPL, the GPL or the LGPL.\r
+ -\r
+ - REMINDER :\r
+ - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ - IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ -\r
+ - EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ - ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ - \r
+ - Contributor(s):\r
+ - Copyright(c) Airbus Defence and Space 2014 - All rights reserved \r
+ - ***** END LICENSE BLOCK ***** -->\r
+\r
+<?xml-stylesheet href="chrome://messenger/skin/accountManage.css" type="text/css"?>\r
+<!DOCTYPE page SYSTEM "chrome://ximfmail/locale/ximfmail.dtd">\r
+<page\r
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"\r
+ class="color-dialog" onload="parent.onPanelLoaded('am-ximfmail.xul');"\r
+ orient="vertical">\r
+\r
+ <script type="application/javascript" src="chrome://messenger/content/AccountManager.js"/>\r
+ <script type="application/javascript" src="chrome://ximfmail/content/jquery.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/constant-ximfmail.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/ximfCatalog.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/controler-ximfmail.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/ximfmail.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/am-ximfmail.js" />\r
+\r
+ <broadcasterset>\r
+ <broadcaster id="isUsingXimfail" disabled="true"/>\r
+ </broadcasterset>\r
+\r
+ <dialogheader title="&ximfmail.am.dialogTitle;" />\r
+ <description>&ximfmail.am.description;\r
+ </description>\r
+ <vbox id="am-ximfmailBox">\r
+ <separator />\r
+ <hbox>\r
+ <checkbox id="checkListTheme" label="&ximfmail.am.themeChoice;" />\r
+ <menulist id="listTheme" observes="isUsingXimfail" flex="1">\r
+ <menupopup\r
+ datasources="rdf:null"\r
+ ref="http://www.ximfmail.com/catalog"\r
+ id="listThemPopup">\r
+ <template>\r
+ <rule>\r
+ <conditions>\r
+ <content uri="?list" />\r
+ <member container="?list"\r
+ child="?elt" />\r
+ <triple subject="?elt"\r
+ predicate="http://www.ximfmail.com/RDF#refSeq"\r
+ object="?refSeq" />\r
+ <triple subject="?elt"\r
+ predicate="http://www.ximfmail.com/RDF#name" object="?name" />\r
+ </conditions>\r
+ <action>\r
+ <menuitem uri="?elt" value="?refSeq"\r
+ label="?name" />\r
+ </action>\r
+ </rule>\r
+ </template>\r
+ </menupopup>\r
+ </menulist>\r
+ </hbox>\r
+ <groupbox flex="1">\r
+ <caption>\r
+ <label value="&ximfmail.am.instanceGroup.message;" />\r
+ </caption>\r
+ <grid flex="1">\r
+ <columns>\r
+ <column id="col1" />\r
+ <column id="col2" flex="1"/>\r
+ </columns>\r
+ <rows>\r
+ <row>\r
+ <label value="&ximfmail.am.instanceComposeChoice;" />\r
+ <menulist id="instanceComposeList" observes="isUsingXimfail" flex="1">\r
+ <menupopup id="instanceCompose"\r
+ datasources="rdf:null" ref="">\r
+ <template id="tplInstanceMenu">\r
+ <rule>\r
+ <conditions>\r
+ <content uri="?list" />\r
+ <member container="?list"\r
+ child="?elt" />\r
+ <triple subject="?elt"\r
+ predicate="http://www.ximfmail.com/RDF#ximfVersion"\r
+ object="?ximfVersion" />\r
+ <triple subject="?elt"\r
+ predicate="http://www.ximfmail.com/RDF#instance"\r
+ object="?name" />\r
+ <triple subject="?elt"\r
+ predicate="http://www.ximfmail.com/RDF#instanceLabel"\r
+ object="?label" />\r
+ <triple subject="?elt"\r
+ predicate="http://www.ximfmail.com/RDF#active"\r
+ object="true" />\r
+ </conditions>\r
+ <action>\r
+ <menuitem uri="?elt" value="?elt" label="?label"/>\r
+ </action>\r
+ </rule>\r
+ </template>\r
+ </menupopup>\r
+ </menulist>\r
+ </row>\r
+ <row>\r
+ <label value="&ximfmail.am.instanceTreeThreadChoice;" />\r
+ <menulist id="instanceTreeThreadList" observes="isUsingXimfail" flex="1">\r
+ <menupopup\r
+ id="instanceTreeThread"\r
+ datasources="rdf:null"\r
+ ref=""\r
+ template="tplInstanceMenu" />\r
+ </menulist>\r
+ </row>\r
+ </rows>\r
+ </grid>\r
+ <!--\r
+ <checkbox id="ximfAdvancedReceivedMsg" label="afficher les entetes" observes="isUsingXimfail" />\r
+ -->\r
+ <checkbox id="xsmtpComptibilityBox" label="&ximfmail.am.xsmtpCompatibilityCheck;" observes="isUsingXimfail" />\r
+ <!--\r
+ <checkbox id="secureHeadersRuleBox" label="&ximfmail.am.secureHeadersRuleCheck;" observes="isUsingXimfail" />\r
+ <checkbox id="signMsgAlwaysRuleBox" label="&ximfmail.am.signMsgAlwaysRuleCheck;" observes="isUsingXimfail" />\r
+ -->\r
+ </groupbox>\r
+\r
+ </vbox>\r
+</page>
\ No newline at end of file
--- /dev/null
+\r
+#ximf-date-picker-title{\r
+ color: #FFFFFF;\r
+ font-weight: bold;\r
+}\r
+\r
+#oe-date-picker-overlay-box\r
+{\r
+ color: black;\r
+ background-color : #F8F8F8;\r
+ font-size : 12px;\r
+ border : 4px solid #7090b0; \r
+}\r
+\r
+ \r
+#oe-date-picker-year-controls-box\r
+{\r
+ border : 2px solid #7090b0; \r
+ -moz-box-align : center;\r
+ -moz-box-pack : center;\r
+ background-color : #7090b0\r
+}\r
+\r
+#oe-date-picker-year-title-text\r
+{\r
+ color: #FFFFFF;\r
+ font-weight: bold;\r
+ font-size:1.5em;\r
+}\r
+\r
+#oe-date-picker-currenttime-text\r
+{\r
+ list-style-image:url('chrome://ximfmail/content/calendar/date-n.png');\r
+ \r
+}\r
+\r
+#oe-date-picker-currenttime-text:hover\r
+{\r
+ list-style-image:url('chrome://ximfmail/content/calendar/date-h.png');\r
+ \r
+}\r
+\r
+\r
+#oe-date-picker-year-previous-button\r
+{\r
+ list-style-image: url("chrome://ximfmail/content/calendar/left_arrow.png");\r
+ width:1.5em;\r
+ height:1.5em;\r
+}\r
+\r
+#oe-date-picker-year-previous-button:hover\r
+{\r
+ list-style-image: url("chrome://ximfmail/content/calendar/left_arrow_hov.png");\r
+ width:1.5em;\r
+ height:1.5em;\r
+}\r
+\r
+#oe-date-picker-year-previous-jump-button\r
+{\r
+ list-style-image: url("chrome://ximfmail/content/calendar/left_dblarrow.png");\r
+ width:1.5em;\r
+ height:1.5em;\r
+}\r
+\r
+#oe-date-picker-year-previous-jump-button:hover\r
+{\r
+ list-style-image: url("chrome://ximfmail/content/calendar/left_dblarrow_hov.png");\r
+ width:1.5em;\r
+ height:1.5em;\r
+}\r
+\r
+#oe-date-picker-year-next-jump-button\r
+{\r
+ list-style-image : url("chrome://ximfmail/content/calendar/right_dblarrow.png");\r
+ width:1.5em;\r
+ height:1.5em;\r
+}\r
+\r
+#oe-date-picker-year-next-jump-button:hover\r
+{\r
+ list-style-image : url("chrome://ximfmail/content/calendar/right_dblarrow_hov.png");\r
+ width:1.5em;\r
+ height:1.5em;\r
+}\r
+\r
+#oe-date-picker-year-next-button\r
+{\r
+ list-style-image : url("chrome://ximfmail/content/calendar/right_arrow.png");\r
+ width:1.5em;\r
+ height:1.5em;\r
+}\r
+\r
+#oe-date-picker-year-next-button:hover\r
+{\r
+ list-style-image : url("chrome://ximfmail/content/calendar/right_arrow_hov.png");\r
+ width:1.5em;\r
+ height:1.5em;\r
+}\r
+\r
+#oe-date-picker-year-next-button-box\r
+{\r
+ -moz-box-pack : end;\r
+}\r
+\r
+#oe-date-picker-year-grid\r
+{\r
+ border-top : 1px solid #2085c4; \r
+ border-left : 1px solid #2085c4; \r
+ margin : 1px;\r
+}\r
+\r
+#ximfmail-date-picker-hour-grid\r
+{\r
+ border-top : 1px solid #2085c4; \r
+ border-left : 1px solid #2085c4; \r
+ margin : 1px;\r
+}\r
+\r
+#ximfmail-date-picker-min-grid\r
+{ \r
+ margin : 1px;\r
+}\r
+ \r
+.oe-date-picker-year-month-box-class\r
+{\r
+ -moz-box-align : center;\r
+ border-right : 1px solid #2085c4; \r
+ border-bottom : 1px solid #2085c4;\r
+ background-color : #E9E9E9;\r
+}\r
+\r
+\r
+.oe-date-picker-year-month-box-class:hover\r
+{\r
+ background-color : #C9E8F1;\r
+}\r
+\r
+.oe-date-picker-year-month-box-class[selected="true"]\r
+{\r
+ background-color : #6699CC;\r
+}\r
+\r
+\r
+.oe-date-picker-month-day-number-class\r
+{\r
+ margin : 1px;\r
+}\r
+\r
+.oe-date-picker-month-day-number-class[selected="true"]\r
+{\r
+\r
+ background-color : #6699CC;\r
+}\r
+\r
+#oe-date-picker-month-grid\r
+{\r
+ margin : 1px;\r
+}\r
+\r
+#start-date-button\r
+{\r
+ border: 0px;\r
+ list-style-image : url("chrome://ximfmail/content/calendar/calendar-down.gif");\r
+ margin: 0px;\r
+ padding: 0px;\r
+ max-width: 36px;\r
+}\r
+\r
+#start-date-button:hover\r
+{\r
+ margin: 0px;\r
+ padding: 0px;\r
+ list-style-image : url("chrome://ximfmail/content/calendar/calendar-up.gif");\r
+}\r
+\r
+.oe-date-picker-month-day-box-class\r
+{\r
+ min-width : 25px;\r
+ min-height : 15px;\r
+ background-color : #FFFFFF;\r
+}\r
+\r
+.oe-date-picker-month-day-box-class[selected="true"]\r
+{\r
+ background-color : #6699CC;\r
+}\r
+\r
+.oe-date-picker-month-day-box-class:hover\r
+{\r
+ background-color : #FFFF99;\r
+}\r
+\r
+.oe-date-picker-month-day-box-class\r
+{\r
+ -moz-box-align : center;\r
+ border-right : 1px solid #E2E2E2; \r
+ border-bottom : 1px solid #E2E2E2;\r
+ border-top : 1px solid #E2E2E2; \r
+ border-left : 1px solid #E2E2E2;\r
+}\r
+\r
+.oe-date-picker-month-days-header-class\r
+{\r
+ margin : 0px;\r
+ padding : 0px;\r
+}\r
+\r
+.oe-date-picker-month-days-header-class-red\r
+{\r
+ color : #FF0000;\r
+}\r
+\r
+#oe-date-picker-month-days-header-box\r
+{\r
+ margin : 0px 0px;\r
+}\r
+\r
+.oe-date-picker-month-days-box-header-class\r
+{\r
+ -moz-box-align : center;\r
+}\r
+\r
+#ximf-date-picker-end-controls-box\r
+{\r
+ border : 2px solid #7090b0; \r
+ -moz-box-align : center;\r
+ -moz-box-pack : center;\r
+ background-color : #7090b0\r
+}\r
+\r
+#ximf-date-picker-ok-control-box\r
+{\r
+ list-style-image : url("chrome://ximfmail/content/calendar/ok.png");\r
+\r
+}\r
+\r
+#ximf-date-picker-ok-control-box:hover\r
+{\r
+ list-style-image : url("chrome://ximfmail/content/calendar/ok_hov.png");\r
+\r
+}\r
+\r
+#ximf-date-picker-head-controls-box\r
+{\r
+ border : 2px solid #7090b0; \r
+ -moz-box-align : center;\r
+ -moz-box-pack : center;\r
+ background-color : #7090b0\r
+}\r
+\r
+#ximf-date-picker-cancel-control-box\r
+{\r
+ list-style-image : url("chrome://ximfmail/content/calendar/button_cancel_20x20.png");\r
+\r
+}\r
+\r
+#ximf-date-picker-cancel-control-box:hover\r
+{\r
+ list-style-image : url("chrome://ximfmail/content/calendar/button_cancel_hov_20x20.png");\r
+\r
+}\r
+\r
--- /dev/null
+/* ***** BEGIN LICENSE BLOCK *****\r
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ *\r
+ *\r
+ * Redistribution and use, in source and binary forms, with or without modification,\r
+ * are permitted provided that the following conditons are met :\r
+ *\r
+ * 1. Redistributions of source code must retain the above copyright notice,\r
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ * in the redistribution of the source code.\r
+ * 3. Neither the names of the copyright holders nor the names of any contributors\r
+ * may be used to endorse or promote products derived from this software without specific\r
+ * prior written permission from EADS Defence and Security.\r
+ *\r
+ * Alternatively, the contents of this file may be used under the terms of\r
+ * either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ * in which case the provisions of the GPL or the LGPL are applicable instead\r
+ * of those above. If you wish to allow use of your version of this file only\r
+ * under the terms of either the GPL or the LGPL, and not to allow others to\r
+ * use your version of this file under the terms of the MPL, indicate your\r
+ * decision by deleting the provisions above and replace them with the notice\r
+ * and other provisions required by the GPL or the LGPL. If you do not delete\r
+ * the provisions above, a recipient may use your version of this file under\r
+ * the terms of any one of the MPL, the GPL or the LGPL.\r
+ *\r
+ * REMINDER :\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ * ***** END LICENSE BLOCK ***** */\r
+var gJSLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].createInstance(Components.interfaces.mozIJSSubScriptLoader);\r
+var gConsole = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);\r
+gJSLoader.loadSubScript("chrome://ximfmail/content/jquery.js");\r
+gJSLoader.loadSubScript("chrome://ximfmail/content/ximfmail.js");\r
+\r
+var gDlgTreeXimf_maxItem = null;\r
+var gDlgTreeXimf_current_selection = null;\r
+var gDlgTreeXimf_current_separator = null;\r
+var gXmlDatasFilePath = null;\r
+var gRdfTempo = null;\r
+var gSelectedDate = null;\r
+var gSelectedDayItem = null;\r
+var gSelectedMonthItem = null;\r
+var gSelectedHourItem = null;\r
+var gSelectedMinItem = null;\r
+var gTitleDlg = null;\r
+/*\r
+ window.arguments = [];\r
+ args[0] id de la textbox à enrichir\r
+ args[1] date courant affichee\r
+*/\r
+// gBoxOpener : display date\r
+var gBoxOpener = null;\r
+$(document).ready(function(){\r
+ var gArgs = window.arguments;\r
+ if (gArgs[0].length <= 0) {\r
+ return;\r
+ }\r
+ // load background datas\r
+ gBoxOpener = gArgs[0][0];\r
+ gTitleDlg = gArgs[0][2];\r
+ if(gBoxOpener){\r
+ gSelectedDate = parseDate(gArgs[0][1]);\r
+ }else{\r
+ adjustCurrentDate();\r
+ }\r
+ UpdateCalendar();\r
+});\r
+/*\r
+ *\r
+ */\r
+function clickOk(){\r
+ var date = ConvertDateForDisplay();\r
+ window.opener.document.getElementById(gBoxOpener).value = date;\r
+ window.opener.document.getElementById(gBoxOpener).setAttribute("ximfvalue", gSelectedDate.toGMTString());\r
+ window.close();\r
+ return true;\r
+}\r
+/*\r
+ *\r
+ */\r
+function clickCancel(){\r
+ window.close();\r
+ return false;\r
+}\r
+/*\r
+ *\r
+ */\r
+function adjustCurrentDate(){\r
+ gSelectedDate = new Date();\r
+ // minutes %5\r
+ gSelectedDate.setMinutes(parseInt(Math.round(gSelectedDate.getMinutes()/5)*5, 10));\r
+ UpdateCalendar();\r
+}\r
+function ConvertDateForDisplay(){\r
+ var displayDate = null;\r
+ var date = new Date();\r
+ if ( gSelectedDate ) {\r
+ date = gSelectedDate;\r
+ }\r
+ try{\r
+ // day\r
+ if(date.getDate()>=10){\r
+ displayDate = date.getDate();\r
+ }else{\r
+ displayDate = "0"+date.getDate();\r
+ }\r
+ //month\r
+ if((date.getMonth()+1)>=10){\r
+ displayDate += "/" + (date.getMonth()+1);\r
+ }else{\r
+ displayDate += "/0" + (date.getMonth()+1);\r
+ }\r
+ //year\r
+ displayDate += "/" + date.getFullYear() + " ";\r
+ // hour\r
+ if(date.getHours()>=10){\r
+ displayDate += "" + date.getHours();\r
+ }else{\r
+ displayDate += "0" + date.getHours();\r
+ }\r
+ //minutes\r
+ displayDate += ":";\r
+ if(date.getMinutes()>=10){\r
+ displayDate += date.getMinutes();\r
+ }else{\r
+ displayDate += "0" + date.getMinutes();\r
+ }\r
+ }catch( e ){\r
+ }\r
+ return displayDate;\r
+}\r
+function UpdateCalendar(){\r
+ try{\r
+ // Set up the picker, called when the popup pops\r
+ // get the start date from the popup value attribute and select it\r
+ var startDate = gSelectedDate;\r
+ if(startDate){\r
+ gOriginalDate = new Date( startDate );\r
+ gSelectedDate = new Date( startDate );\r
+ }else{\r
+ gOriginalDate = new Date();\r
+ gSelectedDate = new Date();\r
+ gSelectedDate.setMinutes(Math.round((gSelectedDate.getMinutes()/5))*5);\r
+ gOriginalDate.setMinutes(Math.round((gOriginalDate.getMinutes()/5))*5);\r
+ }\r
+ // draw the year based on the selected date\r
+ redrawYear();\r
+ // draw the month based on the selected date\r
+ var month = gSelectedDate.getMonth() + 1;\r
+ var selectedMonthBoxItem = document.getElementById("oe-date-picker-year-month-" + month + "-box" );\r
+ selectMonthItem( selectedMonthBoxItem );\r
+ // draw in the days for the selected date\r
+ redrawDays();\r
+ //EADS - draw in hours and minutes for selected date\r
+ var hour = gSelectedDate.getHours();\r
+ var selectedHoursBoxItem = document.getElementById("ximfmail-date-picker-hour-box-" + hour );\r
+ selectHoursItem(selectedHoursBoxItem);\r
+ var min = gSelectedDate.getMinutes();\r
+ var selectedMinutesBoxItem = null;\r
+ if(min%5 !== 0){\r
+ selectedMinutesBoxItem = document.getElementById("ximfmail-date-picker-min-box-" + (Math.round(min/5)*5) );\r
+ }else{\r
+ selectedMinutesBoxItem = document.getElementById("ximfmail-date-picker-min-box-" + min );\r
+ }\r
+ selectMinutesItem(selectedMinutesBoxItem);\r
+ // title calendar\r
+ $("#ximf-date-picker-title").attr("value", gTitleDlg.substring(0,gTitleDlg.lastIndexOf(":")));\r
+ }catch(e){}\r
+}\r
+function clickDay(newDayItem, newDayItemNumber){\r
+ // Called when a day is clicked, close the picker and call the client's oncommand\r
+ // get the clicked day\r
+ if( gSelectedDayItem === newDayItem ) {\r
+ return;\r
+ }\r
+ // update new selection\r
+ newDayItem.setAttribute("selected",true);\r
+ if(gSelectedDayItem){\r
+ gSelectedDayItem.removeAttribute("selected");\r
+ }\r
+ gSelectedDayItem = newDayItem;\r
+ var dayNumberItem = document.getElementById("oe-date-picker-month-day-text-" + newDayItemNumber );\r
+ var dayNumber = dayNumberItem.getAttribute( "value" );\r
+ // they may have clicked an unfilled day, if so ignore it and leave the picker up\r
+ if( dayNumber !== "" ){\r
+ selectDayItem(newDayItem);\r
+ // set the selected date to what they cliked on\r
+ gSelectedDate.setDate( dayNumber );\r
+ }\r
+}\r
+/*\r
+ *\r
+ */\r
+function clickMonth(newMonthItem, newMonthNumber){\r
+ // Called when a month box is clicked\r
+ // already selected, return\r
+ if( gSelectedMonthItem === newMonthItem ) {\r
+ return;\r
+ }\r
+ // update new selection\r
+ newMonthItem.setAttribute("selected",true);\r
+ if(gSelectedMonthItem){\r
+ gSelectedMonthItem.removeAttribute("selected");\r
+ }\r
+ gSelectedMonthItem = newMonthItem;\r
+ // Avoid problems when changing months if the date is at the end of the month\r
+ // i.e. if date is 31 march and you do a setmonth to april, the month would\r
+ // actually be set to may, beacause april only has 30 days.\r
+ // This is why we keep the original date around.\r
+ var oldDate = gSelectedDate.getDate();\r
+ var yearNumber = gSelectedDate.getFullYear();\r
+ var pastLastDate = new Date( yearNumber, newMonthNumber-1, 32 );\r
+ var lastDayOfMonth = 32 - pastLastDate.getDate();\r
+ if( oldDate > lastDayOfMonth ){\r
+ gSelectedDate.setDate(lastDayOfMonth);\r
+ }\r
+ // update the selected date\r
+ gSelectedDate.setMonth( newMonthNumber - 1 );\r
+ // select Month\r
+ selectMonthItem( newMonthItem );\r
+ // redraw days\r
+ redrawDays();\r
+}\r
+/*\r
+ *\r
+ */\r
+function previousYearCommand(increment){\r
+ // Called when previous Year button is clicked\r
+ // update the selected date\r
+ var oldYear = gSelectedDate.getFullYear();\r
+ gSelectedDate.setFullYear( oldYear - increment );\r
+ // redraw the year and the days\r
+ redrawYear();\r
+ redrawDays();\r
+}\r
+/*\r
+ *\r
+ */\r
+function nextYearCommand(increment){\r
+ // Called when next Year button is clicked\r
+ // update the selected date\r
+ var oldYear = gSelectedDate.getFullYear();\r
+ gSelectedDate.setFullYear( oldYear + increment );\r
+ // redraw the year and the days\r
+ redrawYear();\r
+ redrawDays();\r
+}\r
+/*\r
+ *\r
+ */\r
+function redrawYear(){\r
+ var yearTitleItem = document.getElementById("oe-date-picker-year-title-text");\r
+ yearTitleItem.setAttribute( "value", gSelectedDate.getFullYear() );\r
+}\r
+/*\r
+ *\r
+ */\r
+function selectMonthItem(newMonthItem){\r
+ // Select a month box\r
+ // clear old selection, if there is one\r
+ if( gSelectedMonthItem !== null ){\r
+ gSelectedMonthItem.removeAttribute("selected");\r
+ }\r
+ // Set the selected attribute, used to give it a different style\r
+ newMonthItem.setAttribute( "selected" , true );\r
+ // Remember new selection\r
+ gSelectedMonthItem = newMonthItem;\r
+}\r
+/*\r
+ *\r
+ */\r
+function selectDayItem(newDayItem){\r
+ // Select a day box\r
+ // clear old selection, if there is one\r
+ if( gSelectedDayItem !== null ){\r
+ gSelectedDayItem.removeAttribute("selected");\r
+ }\r
+ if( newDayItem !== null ){\r
+ // Set the selected attribute, used to give it a different style\r
+ newDayItem.setAttribute( "selected" , true );\r
+ }\r
+ // Remember new selection\r
+ gSelectedDayItem = newDayItem;\r
+}\r
+/*\r
+ *\r
+ */\r
+function redrawDays(){\r
+ // Redraw day numbers based on the selected date\r
+ // Write in all the day numbers\r
+ var firstDate = new Date( gSelectedDate.getFullYear(), gSelectedDate.getMonth(), 1 );\r
+ var firstDayOfWeek = firstDate.getDay();\r
+ //get last Day Of Month\r
+ var pastLastDate = new Date( gSelectedDate.getFullYear(), gSelectedDate.getMonth(), 32 );\r
+ var lastDayOfMonth = 32 - pastLastDate.getDate();\r
+ // clear the selected day item\r
+ selectDayItem( null );\r
+ // redraw each day bax in the 7 x 6 grid\r
+ var dayNumber = 1;\r
+ for( var dayIndex = 0; dayIndex < 42; ++dayIndex ){\r
+ // get the day text box\r
+ var dayNumberItem = document.getElementById("oe-date-picker-month-day-text-" + (dayIndex + 1) );\r
+ // if it is an unfilled day ( before first or after last ), just set its value to "",\r
+ // and don't increment the day number.\r
+ if( dayIndex < firstDayOfWeek || dayNumber > lastDayOfMonth )\r
+ {\r
+ dayNumberItem.setAttribute( "value" , "" );\r
+ }else{\r
+ // set the value to the day number\r
+ dayNumberItem.setAttribute( "value" , dayNumber );\r
+ // draw the day as selected\r
+ if( dayNumber === gSelectedDate.getDate() ){\r
+ var dayNumberBoxItem = document.getElementById( "oe-date-picker-month-day-" + (dayIndex + 1) + "-box" );\r
+ selectDayItem( dayNumberBoxItem );\r
+ }\r
+ // advance the day number\r
+ ++dayNumber;\r
+ }\r
+ }\r
+}\r
+/*\r
+ *\r
+ */\r
+function parseDate(datestr){\r
+ try{\r
+ if( datestr !== "" ){\r
+ var reg=new RegExp("[ / :]+", "g"); //eads\r
+ var parts = datestr.split(reg);\r
+ if( parts.length >= 5 ){\r
+ var new_date = new Date();\r
+ new_date.setDate(parseInt(parts[0], 10));\r
+ new_date.setMonth(parseInt(parts[1]-1, 10));\r
+ new_date.setFullYear(parseInt(parts[2], 10));\r
+ new_date.setHours(parseInt(parts[3], 10));\r
+ new_date.setMinutes(parseInt(parts[4], 10));\r
+ new_date.setSeconds(0);\r
+ return new_date;\r
+ }\r
+ }\r
+ }catch(e){}\r
+ return null;\r
+}\r
+/*\r
+ *\r
+ */\r
+function clickHour(newHoursItem,newHourItemNumber){\r
+ if( gSelectedHourItem === newHoursItem ) {\r
+ return;\r
+ }\r
+ selectHoursItem(newHoursItem);\r
+ gSelectedDate.setHours(parseInt(newHourItemNumber, 10));\r
+}\r
+/*\r
+ *\r
+ */\r
+function selectHoursItem(newHoursItem){\r
+ // Select a month box\r
+ // clear old selection, if there is one\r
+ if( gSelectedHourItem !== null ){\r
+ gSelectedHourItem.removeAttribute( "selected" );\r
+ }\r
+ // Set the selected attribute, used to give it a different style\r
+ newHoursItem.setAttribute( "selected" , true );\r
+ // Remember new selection\r
+ gSelectedHourItem = newHoursItem;\r
+}\r
+/*\r
+ *\r
+ */\r
+function clickMin(newMinItem,newMinItemNumber){\r
+ if ( gSelectedMinItem === newMinItem ) {\r
+ return;\r
+ }\r
+ // update new selection\r
+ selectMinutesItem(newMinItem);\r
+ gSelectedDate.setMinutes(parseInt(newMinItemNumber, 10));\r
+}\r
+/*\r
+ *\r
+ */\r
+function selectMinutesItem(newMinutesItem){\r
+ // Select a month box\r
+ // clear old selection, if there is one\r
+ if( gSelectedMinItem !== null ){\r
+ gSelectedMinItem.removeAttribute( "selected" );\r
+ }\r
+ // Set the selected attribute, used to give it a different style\r
+ newMinutesItem.setAttribute( "selected" , true );\r
+ // Remember new selection\r
+ gSelectedMinItem = newMinutesItem;\r
+}
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!-- ***** BEGIN LICENSE BLOCK *****\r
+ - Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ - ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ -\r
+ -\r
+ - Redistribution and use, in source and binary forms, with or without modification,\r
+ - are permitted provided that the following conditons are met :\r
+ -\r
+ - 1. Redistributions of source code must retain the above copyright notice,\r
+ - 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ - in the redistribution of the source code.\r
+ - 3. Neither the names of the copyright holders nor the names of any contributors\r
+ - may be used to endorse or promote products derived from this software without specific\r
+ - prior written permission from EADS Defence and Security.\r
+ -\r
+ - Alternatively, the contents of this file may be used under the terms of\r
+ - either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ - or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ - in which case the provisions of the GPL or the LGPL are applicable instead\r
+ - of those above. If you wish to allow use of your version of this file only\r
+ - under the terms of either the GPL or the LGPL, and not to allow others to\r
+ - use your version of this file under the terms of the MPL, indicate your\r
+ - decision by deleting the provisions above and replace them with the notice\r
+ - and other provisions required by the GPL or the LGPL. If you do not delete\r
+ - the provisions above, a recipient may use your version of this file under\r
+ - the terms of any one of the MPL, the GPL or the LGPL.\r
+ -\r
+ - REMINDER :\r
+ - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ - IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ -\r
+ - EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ - ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ - \r
+ - Contributor(s):\r
+ - Copyright(c) Airbus Defence and Space 2014 - All rights reserved\r
+ - ***** END LICENSE BLOCK ***** -->\r
+\r
+<?xml-stylesheet href="chrome://ximfmail/content/calendar/calendar.css" type="text/css"?>\r
+<!DOCTYPE overlay SYSTEM "chrome://ximfmail/locale/datepicker.dtd">\r
+\r
+<window id="datetimepicker_dialog"\r
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >\r
+\r
+ <script type="application/javascript" src="chrome://ximfmail/content/calendar/dialogCalendar-ximfmail.js" />\r
+\r
+\r
+ <vbox id="oe-date-picker-overlay-box" >\r
+ <hbox id="ximf-date-picker-head-controls-box">\r
+ <box>\r
+ <label id="ximf-date-picker-title" />\r
+ </box>\r
+ <box flex="1"/>\r
+ <box>\r
+ <image id="ximf-date-picker-cancel-control-box" onclick="clickCancel()"/>\r
+ </box>\r
+ </hbox>\r
+ <hbox id="oe-date-picker-year-controls-box" >\r
+ <box flex="1">\r
+ <image id="oe-date-picker-year-previous-jump-button" onclick="previousYearCommand(10)"/>\r
+ <image id="oe-date-picker-year-previous-button" onclick="previousYearCommand(1)"/>\r
+ </box>\r
+ <label id="oe-date-picker-year-title-text" value="" />\r
+ <box flex="1" id="oe-date-picker-year-next-button-box" >\r
+ <image id="oe-date-picker-year-next-button" onclick="nextYearCommand(1)"/>\r
+ <image id="oe-date-picker-year-next-jump-button" onclick="nextYearCommand(10)"/>\r
+ </box>\r
+ </hbox>\r
+ <grid id="oe-date-picker-year-grid" flex="1">\r
+ <columns>\r
+ <column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <column class="oe-date-picker-year-column-class" flex="1"/>\r
+ </columns>\r
+ <rows >\r
+ <row flex="1">\r
+ <vbox class="oe-date-picker-year-month-box-class" id="oe-date-picker-year-month-1-box" onclick="clickMonth(this, 1)" >\r
+ <spacer flex="1" />\r
+ <box ><label class="oe-date-picker-year-month-name-class" value="&month.1.MMM;" /></box>\r
+ <spacer flex="1" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="oe-date-picker-year-month-2-box" onclick="clickMonth(this, 2)" >\r
+ <spacer flex="1" />\r
+ <box><label class="oe-date-picker-year-month-name-class" value="&month.2.MMM;" /></box>\r
+ <spacer flex="1" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="oe-date-picker-year-month-3-box" onclick="clickMonth(this, 3)" >\r
+ <spacer flex="1" />\r
+ <box><label class="oe-date-picker-year-month-name-class" value="&month.3.MMM;" /></box>\r
+ <spacer flex="1" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="oe-date-picker-year-month-4-box" onclick="clickMonth(this, 4)" >\r
+ <spacer flex="1" />\r
+ <box><label class="oe-date-picker-year-month-name-class" value="&month.4.MMM;" /></box>\r
+ <spacer flex="1" />\r
+ </vbox>\r
+ </row>\r
+ <row flex="1">\r
+ <vbox class="oe-date-picker-year-month-box-class" id="oe-date-picker-year-month-5-box" onclick="clickMonth(this, 5)" >\r
+ <spacer flex="1" />\r
+ <box><label class="oe-date-picker-year-month-name-class" value="&month.5.MMM;" /></box>\r
+ <spacer flex="1" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="oe-date-picker-year-month-6-box" onclick="clickMonth(this, 6)" >\r
+ <spacer flex="1" />\r
+ <box><label class="oe-date-picker-year-month-name-class" value="&month.6.MMM;" /></box>\r
+ <spacer flex="1" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="oe-date-picker-year-month-7-box" onclick="clickMonth(this, 7)" >\r
+ <spacer flex="1" />\r
+ <box><label class="oe-date-picker-year-month-name-class" value="&month.7.MMM;" /></box>\r
+ <spacer flex="1" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="oe-date-picker-year-month-8-box" onclick="clickMonth(this, 8)" >\r
+ <spacer flex="1" />\r
+ <box><label class="oe-date-picker-year-month-name-class" value="&month.8.MMM;" /></box>\r
+ <spacer flex="1" />\r
+ </vbox>\r
+ </row>\r
+ <row flex="1" >\r
+ <vbox class="oe-date-picker-year-month-box-class" id="oe-date-picker-year-month-9-box" onclick="clickMonth(this, 9)" >\r
+ <spacer flex="1" />\r
+ <box><label class="oe-date-picker-year-month-name-class" value="&month.9.MMM;" /></box>\r
+ <spacer flex="1" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="oe-date-picker-year-month-10-box" onclick="clickMonth(this, 10)" >\r
+ <spacer flex="1" />\r
+ <box><label class="oe-date-picker-year-month-name-class" value="&month.10.MMM;" /></box>\r
+ <spacer flex="1" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="oe-date-picker-year-month-11-box" onclick="clickMonth(this, 11)" >\r
+ <spacer flex="1" />\r
+ <box><label class="oe-date-picker-year-month-name-class" value="&month.11.MMM;" /></box>\r
+ <spacer flex="1" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="oe-date-picker-year-month-12-box" onclick="clickMonth(this, 12)" >\r
+ <spacer flex="1" />\r
+ <box><label class="oe-date-picker-year-month-name-class" value="&month.12.MMM;" /></box>\r
+ <spacer flex="1" />\r
+ </vbox>\r
+ </row>\r
+ </rows>\r
+ </grid>\r
+ <box id="oe-date-picker-month-grid-box" flex="1">\r
+ <grid id="oe-date-picker-month-grid" flex="1">\r
+ <columns>\r
+ <column flex="1"/>\r
+ <column flex="1"/>\r
+ <column flex="1"/>\r
+ <column flex="1"/>\r
+ <column flex="1"/>\r
+ <column flex="1"/>\r
+ <column flex="1"/>\r
+ <column flex="1"/>\r
+ </columns>\r
+ <rows>\r
+ <row id="oe-date-picker-month-days-header-box">\r
+ <vbox class="oe-date-picker-month-days-header-class-red" id="oe-date-picker-month-day-1-header-box">\r
+ <label class="oe-date-picker-month-days-header-class" value="&day.1.DDD;" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-days-box-header-class" id="oe-date-picker-month-day-2-header-box">\r
+ <label class="oe-date-picker-month-days-header-class" value="&day.2.DDD;" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-days-box-header-class" id="oe-date-picker-month-day-3-header-box">\r
+ <label class="oe-date-picker-month-days-header-class" value="&day.3.DDD;" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-days-box-header-class" id="oe-date-picker-month-day-4-header-box">\r
+ <label class="oe-date-picker-month-days-header-class" value="&day.4.DDD;" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-days-box-header-class" id="oe-date-picker-month-day-5-header-box">\r
+ <label class="oe-date-picker-month-days-header-class" value="&day.5.DDD;" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-days-box-header-class" id="oe-date-picker-month-day-6-header-box">\r
+ <label class="oe-date-picker-month-days-header-class" value="&day.6.DDD;" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-days-box-header-class" id="oe-date-picker-month-day-7-header-box">\r
+ <label class="oe-date-picker-month-days-header-class" value="&day.7.DDD;" />\r
+ </vbox>\r
+ </row>\r
+ <row>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-1-box" onclick="clickDay(this,1)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-1" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-2-box" onclick="clickDay(this,2)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-2" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-3-box" onclick="clickDay(this,3)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-3" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-4-box" onclick="clickDay(this,4)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-4" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-5-box" onclick="clickDay(this,5)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-5" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-6-box" onclick="clickDay(this,6)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-6" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-7-box" onclick="clickDay(this,7)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-7" value="" />\r
+ </vbox>\r
+ </row>\r
+ <row>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-8-box" onclick="clickDay(this,8)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-8" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-9-box" onclick="clickDay(this,9)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-9" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-10-box" onclick="clickDay(this,10)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-10" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-11-box" onclick="clickDay(this,11)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-11" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-12-box" onclick="clickDay(this,12)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-12" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-13-box" onclick="clickDay(this,13)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-13" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-14-box" onclick="clickDay(this,14)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-14" value="" />\r
+ </vbox>\r
+ </row>\r
+ <row>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-15-box" onclick="clickDay(this,15)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-15" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-16-box" onclick="clickDay(this,16)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-16" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-17-box" onclick="clickDay(this,17)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-17" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-18-box" onclick="clickDay(this,18)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-18" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-19-box" onclick="clickDay(this,19)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-19" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-20-box" onclick="clickDay(this,20)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-20" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-21-box" onclick="clickDay(this,21)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-21" value="" />\r
+ </vbox>\r
+ </row>\r
+ <row>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-22-box" onclick="clickDay(this,22)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-22" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-23-box" onclick="clickDay(this,23)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-23" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-24-box" onclick="clickDay(this,24)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-24" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-25-box" onclick="clickDay(this,25)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-25" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-26-box" onclick="clickDay(this,26)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-26" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-27-box" onclick="clickDay(this,27)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-27" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-28-box" onclick="clickDay(this,28)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-28" value="" />\r
+ </vbox>\r
+ </row>\r
+ <row>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-29-box" onclick="clickDay(this,29)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-29" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-30-box" onclick="clickDay(this,30)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-30" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-31-box" onclick="clickDay(this,31)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-31" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-32-box" onclick="clickDay(this,32)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-32" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-33-box" onclick="clickDay(this,33)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-33" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-34-box" onclick="clickDay(this,34)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-34" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-35-box" onclick="clickDay(this,35)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-35" value="" />\r
+ </vbox>\r
+ </row>\r
+ <row>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-36-box" onclick="clickDay(this,36)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-36" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-37-box" onclick="clickDay(this,37)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-37" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-38-box" onclick="clickDay(this,38)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-38" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-39-box" onclick="clickDay(this,39)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-39" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-40-box" onclick="clickDay(this,40)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-40" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-41-box" onclick="clickDay(this,41)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-41" value="" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="oe-date-picker-month-day-42-box" onclick="clickDay(this,42)">\r
+ <label class="oe-date-picker-month-day-number-class" id="oe-date-picker-month-day-text-42" value="" />\r
+ </vbox>\r
+ </row>\r
+ </rows>\r
+ </grid>\r
+ </box>\r
+ <separator />\r
+ <hbox><label value="&hour.label;"/></hbox>\r
+ <grid flex="1" id="ximfmail-date-picker-hour-grid">\r
+ <columns>\r
+ <column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <column class="oe-date-picker-year-column-class" flex="1"/>\r
+ </columns>\r
+ <rows>\r
+ <row flex="1" id="ximfmail-date-picker-hour-12-header-box">\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-0" onclick="clickHour(this,0)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-0" value=" 00 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-1" onclick="clickHour(this,1)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-1" value=" 01 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-2" onclick="clickHour(this,2)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-2" value=" 02 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-3" onclick="clickHour(this,3)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-3" value=" 03 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-4" onclick="clickHour(this,4)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-4" value=" 04 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-5" onclick="clickHour(this,5)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-5" value=" 05 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-6" onclick="clickHour(this,6)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-6" value=" 06 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-7" onclick="clickHour(this,7)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-7" value=" 07 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-8" onclick="clickHour(this,8)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-8" value=" 08 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-9" onclick="clickHour(this,9)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-9" value=" 09 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-10" onclick="clickHour(this,10)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-10" value=" 10 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-11" onclick="clickHour(this,11)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-11" value=" 11 " />\r
+ </vbox>\r
+ </row>\r
+ <row flex="1" id="ximfmail-date-picker-hour-24-header-box">\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-12" onclick="clickHour(this,12)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-12" value=" 12 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-13" onclick="clickHour(this,13)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-13" value=" 13 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-14" onclick="clickHour(this,14)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-14" value=" 14 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-15" onclick="clickHour(this,15)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-15" value=" 15 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-16" onclick="clickHour(this,16)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-16" value=" 16 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-17" onclick="clickHour(this,17)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-17" value=" 17 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-18" onclick="clickHour(this,18)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-18" value=" 18 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-19" onclick="clickHour(this,19)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-19" value=" 19 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-20" onclick="clickHour(this,20)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-20" value=" 20 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-21" onclick="clickHour(this,21)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-21" value=" 21 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-22" onclick="clickHour(this,22)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-22" value=" 22 " />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-year-month-box-class" id="ximfmail-date-picker-hour-box-23" onclick="clickHour(this,23)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-hour-text-23" value=" 23 " />\r
+ </vbox>\r
+ </row>\r
+ </rows>\r
+ </grid>\r
+ <hbox><label value="&min.label;"/></hbox>\r
+ <grid flex="1" id="ximfmail-date-picker-min-grid">\r
+ <columns>\r
+ <column flex="1"/>\r
+ <column flex="1"/>\r
+ <column flex="1"/>\r
+ <column flex="1"/>\r
+ <column flex="1"/>\r
+ <column flex="1"/>\r
+ </columns>\r
+ <rows>\r
+ <row id="ximfmail-date-picker-min-line1-header-box">\r
+ <vbox class="oe-date-picker-month-day-box-class" id="ximfmail-date-picker-min-box-0" onclick="clickMin(this,0)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-min-text-0" value=":00" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="ximfmail-date-picker-min-box-5" onclick="clickMin(this,5)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-min-text-5" value=":05" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="ximfmail-date-picker-min-box-10" onclick="clickMin(this,10)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-min-text-10" value=":10" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="ximfmail-date-picker-min-box-15" onclick="clickMin(this,15)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-min-text-15" value=":15" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="ximfmail-date-picker-min-box-20" onclick="clickMin(this,20)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-min-text-20" value=":20" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="ximfmail-date-picker-min-box-25" onclick="clickMin(this,25)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-min-text-25" value=":25" />\r
+ </vbox>\r
+ </row>\r
+ <row id="ximfmail-date-picker-min-line2-header-box">\r
+ <vbox class="oe-date-picker-month-day-box-class" id="ximfmail-date-picker-min-box-30" onclick="clickMin(this,30)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-min-text-30" value=":30" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="ximfmail-date-picker-min-box-35" onclick="clickMin(this,35)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-min-text-35" value=":35" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="ximfmail-date-picker-min-box-40" onclick="clickMin(this,40)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-min-text-40" value=":40" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="ximfmail-date-picker-min-box-45" onclick="clickMin(this,45)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-min-text-45" value=":45" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="ximfmail-date-picker-min-box-50" onclick="clickMin(this,50)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-min-text-50" value=":50" />\r
+ </vbox>\r
+ <vbox class="oe-date-picker-month-day-box-class" id="ximfmail-date-picker-min-box-55" onclick="clickMin(this,55)">\r
+ <label class="oe-date-picker-month-day-number-class" id="ximfmail-date-picker-min-text-55" value=":55" />\r
+ </vbox>\r
+ </row>\r
+ </rows>\r
+ </grid>\r
+ <hbox id="ximf-date-picker-end-controls-box">\r
+ <box>\r
+ <image id="oe-date-picker-currenttime-text" onclick="adjustCurrentDate()" />\r
+ </box>\r
+ <box flex="1" />\r
+ <box>\r
+ <image id="ximf-date-picker-ok-control-box" onclick="clickOk()"/>\r
+ </box>\r
+ </hbox>\r
+ </vbox>\r
+</window>
\ No newline at end of file
--- /dev/null
+/* ***** BEGIN LICENSE BLOCK *****\r
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ *\r
+ *\r
+ * Redistribution and use, in source and binary forms, with or without modification,\r
+ * are permitted provided that the following conditons are met :\r
+ *\r
+ * 1. Redistributions of source code must retain the above copyright notice,\r
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ * in the redistribution of the source code.\r
+ * 3. Neither the names of the copyright holders nor the names of any contributors\r
+ * may be used to endorse or promote products derived from this software without specific\r
+ * prior written permission from EADS Defence and Security.\r
+ *\r
+ * Alternatively, the contents of this file may be used under the terms of\r
+ * either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ * in which case the provisions of the GPL or the LGPL are applicable instead\r
+ * of those above. If you wish to allow use of your version of this file only\r
+ * under the terms of either the GPL or the LGPL, and not to allow others to\r
+ * use your version of this file under the terms of the MPL, indicate your\r
+ * decision by deleting the provisions above and replace them with the notice\r
+ * and other provisions required by the GPL or the LGPL. If you do not delete\r
+ * the provisions above, a recipient may use your version of this file under\r
+ * the terms of any one of the MPL, the GPL or the LGPL.\r
+ *\r
+ * REMINDER :\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ *\r
+ * Contributor(s):\r
+ * Copyright(c) Airbus Defence and Space 2014 - All rights reserved\r
+ * ***** END LICENSE BLOCK ***** */\r
+\r
+var ximfConst = ximfConst || {};\r
+ximfConst = {\r
+ SMTP_VERSION : "0.0",\r
+ SMTP_INSTANCE_KEY : "smtp",\r
+ LATIN_CHARSET : "ISO-8859-1",\r
+ XIMF_PREF_IDENTITY_USE_XIMFMAIL : "ximfmail_on",\r
+ XIMF_PREF_IDENTITY_TREETHREAD_REF : "ximfmail_instance_treethread_ref",\r
+ // XIMF_PREF_IDENTITY_MAIL_PANEL_REF : "ximfmail_instance_mail_panel_ref",\r
+ PREF_DEFAULT_CHARSET : "mailnews.view_default_charset",\r
+ PREF_MAILNEWS_DEFAULT_CHARSET : "view_default_charset",\r
+ PREF_MAILNEWS : "mailnews",\r
+ PREF_MSGWINDOW_REFRESH : "ximfmail.msgwindow.hdr",\r
+ XIMFMAIL_SECURE_HEADERS_XML_FILE : "secureHeadersMail.xml",\r
+ XIMF_VERSION_HEADER : "X-XIMF-Version",\r
+ _XIMF_ATT_XVALUE : "ximfvalue",\r
+ _XIMF_ATT_TEC_VALUE : "ximftecvalue",\r
+ _XIMF_ATT_MAX_ITEMS : "ximfmaxitems",\r
+ _XIMF_ATT_IS_MULTISET : "ismultiset",\r
+ _XIMF_ATT_REF_BOX : "ximfreftextbox",\r
+ _XIMF_ATT_REF_HEADER : "refheader",\r
+ _XIMF_ATT_LINK_POPUP_BOX : "linkpopupbox",\r
+ _XIMF_ATT_CONCAT_ID : "ximfconcatid",\r
+ _XIMF_ATT_SEPARATOR : "ximfseparator",\r
+ _XIMF_ATT_TEC_SEPARATOR : "ximftecseparator",\r
+ _XIMF_DEFAULT_SEPARATOR : ",",\r
+ DEFAULT_XIMF_VERSION : "1.0",\r
+ DEFAULT_XIMF_NAME : "XIMF_BASIC",\r
+ XIMF_NAME_HEADER : "X-XIMF-NAME",\r
+ XIMF_ENDLINE : "\r\n",\r
+ XIMF_SEPARATOR_HEADER : ": ",\r
+ CHROME_XSL_SECURE_HEADERS: "chrome://theme_ximfmail/content/secureHeaders-ximfmail.xsl",\r
+ CHROME_XSL_MSG_COMPOSE : "chrome://theme_ximfmail/content/messengerCompose-ximfmail.xsl",\r
+ CHROME_XSL_TREE_RCV : "chrome://theme_ximfmail/content/threadTree-ximfmail.xsl", //gChromeXslTreeRcv\r
+ CHROME_XSL_SECURITY_LABEL : "chrome://theme_ximfmail/content/securityLabel-ximfmail.xsl",\r
+ CHROME_XSL_TREE_DIALOG : "chrome://ximfmail/content/dialogTree-ximfmail.xul",\r
+ CHROME_XSL_DLG_CALENDAR : "chrome://ximfmail/content/calendar/dialogCalendar-ximfmail.xul",\r
+ CHROME_XSL_DLG_EDITOR : "chrome://ximfmail/content/editor/dialogEditor-ximfmail.xul"\r
+};
\ No newline at end of file
--- /dev/null
+/* ***** BEGIN LICENSE BLOCK *****\r
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ *\r
+ *\r
+ * Redistribution and use, in source and binary forms, with or without modification,\r
+ * are permitted provided that the following conditons are met :\r
+ *\r
+ * 1. Redistributions of source code must retain the above copyright notice,\r
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ * in the redistribution of the source code.\r
+ * 3. Neither the names of the copyright holders nor the names of any contributors\r
+ * may be used to endorse or promote products derived from this software without specific\r
+ * prior written permission from EADS Defence and Security.\r
+ *\r
+ * Alternatively, the contents of this file may be used under the terms of\r
+ * either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ * in which case the provisions of the GPL or the LGPL are applicable instead\r
+ * of those above. If you wish to allow use of your version of this file only\r
+ * under the terms of either the GPL or the LGPL, and not to allow others to\r
+ * use your version of this file under the terms of the MPL, indicate your\r
+ * decision by deleting the provisions above and replace them with the notice\r
+ * and other provisions required by the GPL or the LGPL. If you do not delete\r
+ * the provisions above, a recipient may use your version of this file under\r
+ * the terms of any one of the MPL, the GPL or the LGPL.\r
+ *\r
+ * REMINDER :\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ *\r
+ * Contributor(s):\r
+ * Copyright(c) Airbus Defence and Space 2014 - All rights reserved\r
+ * ***** END LICENSE BLOCK ***** */\r
+/**\r
+ * Object to manage user preference for Ximfmail\r
+ */\r
+var ximfPref = ximfPref || {};\r
+ximfPref = {\r
+ log : function (sMessage, sFileName, iLineNumber) {\r
+ var trace = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);\r
+ if (sFileName) {\r
+ trace.logStringMessage("[controler-ximfmail] " + sMessage + "\nfile : " + sFileName + "\nline : " + sFileName);\r
+ } else {\r
+ trace.logStringMessage("[controler-ximfmail] " + sMessage);\r
+ }\r
+ },\r
+ get : function (idIdentity, key) {\r
+ var prefValue = undefined;\r
+ try {\r
+ var ximfmailPrefBranch = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("mail.identity." + idIdentity + ".");\r
+ if(ximfmailPrefBranch.prefHasUserValue(key)) {\r
+ prefValue = ximfmailPrefBranch.getCharPref(key);\r
+ }\r
+ } catch (ex) {\r
+ this.log(ex, Error().fileName, ex.lineNumber);\r
+ }\r
+ return prefValue;\r
+ },\r
+ set : function (idIdentity, key, value) {\r
+ try{\r
+ var prefSvc = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);\r
+ var ximfmailPrefBranch = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("mail.identity." + idIdentity + ".");\r
+ ximfmailPrefBranch.setCharPref(key,value);\r
+ prefSvc.savePrefFile(null);\r
+ this.log("set pref " + key + " of " + idIdentity + " to " + value);\r
+ }catch(ex){\r
+ this.log(ex, Error().fileName, ex.lineNumber);\r
+ }\r
+ },\r
+ getBool : function (idIdentity, key) {\r
+ var prefValue = undefined;\r
+ try {\r
+ var ximfmailPrefBranch = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("mail.identity." + idIdentity + ".");\r
+ if(ximfmailPrefBranch.prefHasUserValue(key)) {\r
+ prefValue = ximfmailPrefBranch.getBoolPref(key);\r
+ }\r
+ } catch (ex) {\r
+ this.log(ex, Error().fileName, ex.lineNumber);\r
+ }\r
+ return prefValue;\r
+ },\r
+ setBool: function (idIdentity, key, value) {\r
+ try{\r
+ var prefSvc = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);\r
+ var ximfmailPrefBranch = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("mail.identity." + idIdentity + ".");\r
+ ximfmailPrefBranch.setBoolPref(key, value);\r
+ prefSvc.savePrefFile(null);\r
+ this.log("set pref " + key + " of " + idIdentity + " to " + value);\r
+ }catch(ex){\r
+ this.log(ex, Error().fileName, ex.lineNumber);\r
+ }\r
+ },\r
+ isXimfAccountOn : function (identity) {\r
+ if (identity.getBoolAttribute("ximfmail_on")) {\r
+ return true;\r
+ } else {\r
+ return false;\r
+ }\r
+ },\r
+ reset : function (idIdentity,key) {\r
+ try{\r
+ var prefSvc = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);\r
+ var ximfmailPrefBranch = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("mail.identity." + idIdentity + ".");\r
+ ximfmailPrefBranch.ClearUserPref(key);\r
+ prefSvc.savePrefFile(null);\r
+ }catch(ex){\r
+ this.log(ex, Error().fileName, ex.lineNumber);\r
+ }\r
+ }\r
+};\r
+/**\r
+ * set value to reference attribute of xul element\r
+ * used for RDF resource\r
+ * idElement : id of xul element\r
+ * refValue : value of ref attribute\r
+ */\r
+function AddRdfDataSce2domList(idElement,refValue) {\r
+ var list = document.getElementById(idElement);\r
+ list.database.AddDataSource(XimfCatalog.getInstance().getDSCatalog());\r
+ list.setAttribute("ref",refValue);\r
+ list.builder.rebuild();\r
+}
\ No newline at end of file
--- /dev/null
+#datepicker-button{\r
+ list-style-image:url('chrome://ximfmail/content/datepicker/date-n.png');\r
+ max-width:20px;\r
+ min-width:20px;\r
+ width:20px;\r
+ padding:0px;\r
+ margin:0px;\r
+ border-style: none;\r
+ -moz-box-pack:center;\r
+ -moz-box-align:center;\r
+ -moz-outline-width: 0px !important;\r
+ -moz-border-top-colors: none !important;\r
+ -moz-border-right-colors: none !important;\r
+ -moz-border-bottom-colors: none !important;\r
+ -moz-border-left-colors: none !important;\r
+ -moz-appearance: none !important;\r
+}\r
+#datepicker-button:hover{\r
+ list-style-image:url('chrome://ximfmail/content/datepicker/date-h.png');\r
+}\r
+\r
+#oe-date-picker-overlay-box\r
+{\r
+ color: black;\r
+ background-color : #F8F8F8;\r
+ font-size : 10px;\r
+}\r
+\r
+ \r
+#oe-date-picker-year-controls-box\r
+{\r
+ border : 2px solid #7090b0; \r
+ -moz-box-align : center;\r
+ -moz-box-pack : center;\r
+ background-color : #7090b0\r
+}\r
+\r
+#oe-date-picker-year-title-text\r
+{\r
+ color: #FFFFFF;\r
+ font-weight: bold;\r
+ font-size:1.5em;\r
+}\r
+\r
+#oe-date-picker-currenttime-text\r
+{\r
+ list-style-image:url('chrome://ximfmail/content/datepicker/date-n.png');\r
+ \r
+}\r
+\r
+#oe-date-picker-currenttime-text:hover\r
+{\r
+ list-style-image:url('chrome://ximfmail/content/datepicker/date-h.png');\r
+ \r
+}\r
+\r
+\r
+#oe-date-picker-year-previous-button\r
+{\r
+ list-style-image: url("chrome://ximfmail/content/datepicker/left_arrow.png");\r
+ width:1.5em;\r
+ height:1.5em;\r
+}\r
+\r
+#oe-date-picker-year-previous-button:hover\r
+{\r
+ list-style-image: url("chrome://ximfmail/content/datepicker/left_arrow_hov.png");\r
+ width:1.5em;\r
+ height:1.5em;\r
+}\r
+\r
+#oe-date-picker-year-previous-jump-button\r
+{\r
+ list-style-image: url("chrome://ximfmail/content/datepicker/left_dblarrow.png");\r
+ width:1.5em;\r
+ height:1.5em;\r
+}\r
+\r
+#oe-date-picker-year-previous-jump-button:hover\r
+{\r
+ list-style-image: url("chrome://ximfmail/content/datepicker/left_dblarrow_hov.png");\r
+ width:1.5em;\r
+ height:1.5em;\r
+}\r
+\r
+#oe-date-picker-year-next-jump-button\r
+{\r
+ list-style-image : url("chrome://ximfmail/content/datepicker/right_dblarrow.png");\r
+ width:1.5em;\r
+ height:1.5em;\r
+}\r
+\r
+#oe-date-picker-year-next-jump-button:hover\r
+{\r
+ list-style-image : url("chrome://ximfmail/content/datepicker/right_dblarrow_hov.png");\r
+ width:1.5em;\r
+ height:1.5em;\r
+}\r
+\r
+#oe-date-picker-year-next-button\r
+{\r
+ list-style-image : url("chrome://ximfmail/content/datepicker/right_arrow.png");\r
+ width:1.5em;\r
+ height:1.5em;\r
+}\r
+\r
+#oe-date-picker-year-next-button:hover\r
+{\r
+ list-style-image : url("chrome://ximfmail/content/datepicker/right_arrow_hov.png");\r
+ width:1.5em;\r
+ height:1.5em;\r
+}\r
+\r
+#oe-date-picker-year-next-button-box\r
+{\r
+ -moz-box-pack : end;\r
+}\r
+\r
+#oe-date-picker-year-grid\r
+{\r
+ border-top : 1px solid #2085c4; \r
+ border-left : 1px solid #2085c4; \r
+ margin-top : 1px;\r
+ margin-right : 1px;\r
+}\r
+\r
+#ximfmail-date-picker-hour-grid\r
+{\r
+ border-top : 1px solid #2085c4; \r
+ border-left : 1px solid #2085c4; \r
+ margin-top : 1px;\r
+ margin-right : 1px;\r
+}\r
+\r
+.oe-date-picker-year-month-box-class\r
+{\r
+ -moz-box-align : center;\r
+ border-right : 1px solid #2085c4; \r
+ border-bottom : 1px solid #2085c4;\r
+ background-color : #E9E9E9;\r
+}\r
+\r
+\r
+.oe-date-picker-year-month-box-class:hover\r
+{\r
+ background-color : #C9E8F1;\r
+}\r
+\r
+.oe-date-picker-year-month-box-class[selected="true"]\r
+{\r
+ background-color : #6699CC;\r
+}\r
+\r
+\r
+.oe-date-picker-month-day-number-class\r
+{\r
+ margin : 1px;\r
+}\r
+\r
+.oe-date-picker-month-day-number-class[selected="true"]\r
+{\r
+\r
+ background-color : #6699CC;\r
+}\r
+\r
+#oe-date-picker-month-grid\r
+{\r
+ margin-right : 0px;\r
+ margin-bottom : 0px;\r
+}\r
+\r
+#start-date-button\r
+{\r
+ border: 0px;\r
+ list-style-image : url("chrome://ximfmail/content/datepicker/calendar-down.gif");\r
+ margin: 0px;\r
+ padding: 0px;\r
+ max-width: 36px;\r
+}\r
+\r
+#start-date-button:hover\r
+{\r
+ margin: 0px;\r
+ padding: 0px;\r
+ list-style-image : url("chrome://ximfmail/content/datepicker/calendar-up.gif");\r
+}\r
+\r
+.oe-date-picker-month-day-box-class\r
+{\r
+ min-width : 25px;\r
+ min-height : 15px;\r
+ background-color : #FFFFFF;\r
+}\r
+\r
+.oe-date-picker-month-day-box-class[selected="true"]\r
+{\r
+ background-color : #6699CC;\r
+}\r
+\r
+.oe-date-picker-month-day-box-class:hover\r
+{\r
+ background-color : #FFFF99;\r
+}\r
+\r
+.oe-date-picker-month-day-box-class\r
+{\r
+ -moz-box-align : center;\r
+ border-right : 1px solid #E2E2E2; \r
+ border-bottom : 1px solid #E2E2E2;\r
+ border-top : 1px solid #E2E2E2; \r
+ border-left : 1px solid #E2E2E2;\r
+}\r
+\r
+.oe-date-picker-month-days-header-class\r
+{\r
+ margin : 0px;\r
+ padding : 0px;\r
+}\r
+\r
+.oe-date-picker-month-days-header-class-red\r
+{\r
+ color : #FF0000;\r
+}\r
+\r
+#oe-date-picker-month-days-header-box\r
+{\r
+ margin : 0px 0px;\r
+}\r
+\r
+.oe-date-picker-month-days-box-header-class\r
+{\r
+ -moz-box-align : center;\r
+}\r
+\r
+#ximf-date-picker-end-controls-box\r
+{\r
+ border : 2px solid #7090b0; \r
+ -moz-box-align : center;\r
+ -moz-box-pack : center;\r
+ background-color : #7090b0\r
+}\r
+\r
+#ximf-date-picker-ok-control-box\r
+{\r
+ list-style-image : url("chrome://ximfmail/content/datepicker/ok.png");\r
+\r
+}\r
+\r
+#ximf-date-picker-ok-control-box:hover\r
+{\r
+ list-style-image : url("chrome://ximfmail/content/datepicker/ok_hov.png");\r
+\r
+}
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>\r
+<!DOCTYPE bindings \r
+[\r
+ <!ENTITY % dtd1 SYSTEM "chrome://ximfmail/locale/datepicker.dtd" > %dtd1; \r
+ \r
+]>\r
+<bindings \r
+ xmlns="http://www.mozilla.org/xbl"\r
+ xmlns:html="http://www.w3.org/1999/xhtml"\r
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"\r
+ xmlns:xbl="http://www.mozilla.org/xbl">\r
+\r
+ <binding id="datepicker" extends="xul:box">\r
+ <resources>\r
+ <stylesheet src="chrome://ximfmail/content/datepicker/datepicker.css"/>\r
+ <script src="util.js"/>\r
+ </resources>\r
+\r
+ <content>\r
+ <xul:hbox class="textbox-input-box" flex="1" style="padding-right: 3px;" xbl:inherits="context">\r
+ <xul:hbox align="center" pack="center" flex="1">\r
+ <xul:textbox maxlength="17" anonid="input" flex="1" \r
+ xbl:inherits="class=txtclass,id,context,width,disabled,onfocus,onblur,value,type,maxlength,size,readonly,tabindex,accesskey"/> \r
+ </xul:hbox>\r
+ <xul:hbox pack="center" align="center" flex="0">\r
+ <xul:button id="datepicker-button" oncommand="openPopup(this)" position="after_start" />\r
+ </xul:hbox>\r
+\r
+ <xul:popup onpopupshowing="popupshowing(this)" \r
+ anonid="oe-date-picker-popup" \r
+ position="start_before" \r
+ oncommand="format(this, 'oe-date-picker-text-box')" value="">\r
+ <xul:vbox id="oe-date-picker-overlay-box" > \r
+ <xul:hbox id="oe-date-picker-year-controls-box" >\r
+ <xul:box flex="1">\r
+ <xul:image id="oe-date-picker-year-previous-jump-button" onclick="previousYearCommand(10)"/> \r
+ <xul:image id="oe-date-picker-year-previous-button" onclick="previousYearCommand(1)"/> \r
+ </xul:box>\r
+ <xul:label id="oe-date-picker-year-title-text" anonid="oe-date-picker-year-title-text" value="" /> \r
+ <xul:box flex="1" id="oe-date-picker-year-next-button-box" >\r
+ <xul:image id="oe-date-picker-year-next-button" onclick="nextYearCommand(1)"/>\r
+ <xul:image id="oe-date-picker-year-next-jump-button" onclick="nextYearCommand(10)"/>\r
+ </xul:box> \r
+ </xul:hbox> \r
+ \r
+ <xul:grid id="oe-date-picker-year-grid" flex="1">\r
+ <xul:columns>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ </xul:columns>\r
+ <xul:rows >\r
+ <xul:row flex="1" >\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" \r
+ anonid="oe-date-picker-year-month-1-box" \r
+ onclick="clickMonth(this, 1)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box ><xul:label class="oe-date-picker-year-month-name-class" value="&month.1.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="oe-date-picker-year-month-2-box" onclick="clickMonth(this, 2)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.2.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="oe-date-picker-year-month-3-box" onclick="clickMonth(this, 3)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.3.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="oe-date-picker-year-month-4-box" onclick="clickMonth(this, 4)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.4.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ </xul:row> \r
+ <xul:row flex="1" >\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="oe-date-picker-year-month-5-box" onclick="clickMonth(this, 5)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.5.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="oe-date-picker-year-month-6-box" onclick="clickMonth(this, 6)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.6.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="oe-date-picker-year-month-7-box" onclick="clickMonth(this, 7)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.7.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="oe-date-picker-year-month-8-box" onclick="clickMonth(this, 8)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.8.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ </xul:row> \r
+ <xul:row flex="1" >\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="oe-date-picker-year-month-9-box" onclick="clickMonth(this, 9)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.9.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="oe-date-picker-year-month-10-box" onclick="clickMonth(this, 10)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.10.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="oe-date-picker-year-month-11-box" onclick="clickMonth(this, 11)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.11.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" \r
+ anonid="oe-date-picker-year-month-12-box" \r
+ onclick="clickMonth(this, 12)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.12.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ </xul:row> \r
+ \r
+ \r
+ </xul:rows>\r
+ \r
+ </xul:grid>\r
+ \r
+ <xul:box id="oe-date-picker-month-grid-box" flex="1">\r
+ \r
+ <xul:grid id="oe-date-picker-month-grid" flex="1">\r
+ <xul:columns>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ </xul:columns>\r
+ <xul:rows>\r
+ \r
+ <xul:row id="oe-date-picker-month-days-header-box">\r
+ <xul:vbox class="oe-date-picker-month-days-header-class-red" anonid="oe-date-picker-month-day-1-header-box">\r
+ <xul:label class="oe-date-picker-month-days-header-class" value="&day.1.DDD;" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-days-box-header-class" anonid="oe-date-picker-month-day-2-header-box">\r
+ <xul:label class="oe-date-picker-month-days-header-class" value="&day.2.DDD;" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-days-box-header-class" anonid="oe-date-picker-month-day-3-header-box">\r
+ <xul:label class="oe-date-picker-month-days-header-class" value="&day.3.DDD;" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-days-box-header-class" anonid="oe-date-picker-month-day-4-header-box">\r
+ <xul:label class="oe-date-picker-month-days-header-class" value="&day.4.DDD;" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-days-box-header-class" anonid="oe-date-picker-month-day-5-header-box">\r
+ <xul:label class="oe-date-picker-month-days-header-class" value="&day.5.DDD;" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-days-box-header-class" anonid="oe-date-picker-month-day-6-header-box">\r
+ <xul:label class="oe-date-picker-month-days-header-class" value="&day.6.DDD;" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-days-box-header-class" anonid="oe-date-picker-month-day-7-header-box">\r
+ <xul:label class="oe-date-picker-month-days-header-class" value="&day.7.DDD;" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ \r
+ <xul:row>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-1-box" onclick="clickDay(this,1)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-1" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-2-box" onclick="clickDay(this,2)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-2" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-3-box" onclick="clickDay(this,3)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-3" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-4-box" onclick="clickDay(this,4)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-4" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-5-box" onclick="clickDay(this,5)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-5" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-6-box" onclick="clickDay(this,6)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-6" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-7-box" onclick="clickDay(this,7)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-7" value="" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ \r
+ <xul:row>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-8-box" onclick="clickDay(this,8)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-8" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-9-box" onclick="clickDay(this,9)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-9" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-10-box" onclick="clickDay(this,10)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-10" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-11-box" onclick="clickDay(this,11)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-11" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-12-box" onclick="clickDay(this,12)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-12" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-13-box" onclick="clickDay(this,13)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-13" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-14-box" onclick="clickDay(this,14)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-14" value="" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ \r
+ <xul:row>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-15-box" onclick="clickDay(this,15)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-15" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-16-box" onclick="clickDay(this,16)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-16" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-17-box" onclick="clickDay(this,17)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-17" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-18-box" onclick="clickDay(this,18)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-18" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-19-box" onclick="clickDay(this,19)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-19" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-20-box" onclick="clickDay(this,20)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-20" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-21-box" onclick="clickDay(this,21)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-21" value="" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ \r
+ <xul:row>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-22-box" onclick="clickDay(this,22)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-22" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-23-box" onclick="clickDay(this,23)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-23" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-24-box" onclick="clickDay(this,24)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-24" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-25-box" onclick="clickDay(this,25)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-25" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-26-box" onclick="clickDay(this,26)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-26" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-27-box" onclick="clickDay(this,27)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-27" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-28-box" onclick="clickDay(this,28)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-28" value="" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ \r
+ <xul:row>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-29-box" onclick="clickDay(this,29)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-29" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-30-box" onclick="clickDay(this,30)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-30" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-31-box" onclick="clickDay(this,31)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-31" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-32-box" onclick="clickDay(this,32)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-32" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-33-box" onclick="clickDay(this,33)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-33" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-34-box" onclick="clickDay(this,34)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-34" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-35-box" onclick="clickDay(this,35)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-35" value="" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ \r
+ <xul:row>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-36-box" onclick="clickDay(this,36)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-36" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-37-box" onclick="clickDay(this,37)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-37" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-38-box" onclick="clickDay(this,38)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-38" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-39-box" onclick="clickDay(this,39)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-39" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-40-box" onclick="clickDay(this,40)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-40" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-41-box" onclick="clickDay(this,41)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-41" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-42-box" onclick="clickDay(this,42)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-42" value="" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ \r
+ </xul:rows>\r
+ </xul:grid>\r
+ </xul:box>\r
+ \r
+ <!-- EADS MODIFICATIONS -->\r
+ <!-- \r
+ <xul:hbox>\r
+ <xul:label value="TIME : " />\r
+ <xul:radiogroup orient="horizontal">\r
+ <xul:radio id="time12" label="12" onclick="clickHourRange(12)"/>\r
+ <xul:radio id="time24" label="24" onclick="clickHourRange(24)" selected="true"/>\r
+ </xul:radiogroup> \r
+ </xul:hbox>\r
+ -->\r
+ <xul:separator />\r
+ <xul:hbox><xul:label value="Heure"/></xul:hbox>\r
+ <xul:grid flex="1" id="ximfmail-date-picker-hour-grid">\r
+ <xul:columns>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ </xul:columns>\r
+ \r
+ <xul:rows>\r
+ <!-- \r
+ <xul:row flex="1">\r
+ <xul:vbox class="oe-date-picker-year-month-box-class">\r
+ <xul:label value="Hour"/>\r
+ </xul:vbox> \r
+ </xul:row>\r
+ --> \r
+ <xul:row flex="1" anonid="ximfmail-date-picker-hour-12-header-box">\r
+ \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-0" onclick="clickHour(this,0)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-0" value="00" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-1" onclick="clickHour(this,1)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-1" value="01" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-2" onclick="clickHour(this,2)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-2" value="02" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-3" onclick="clickHour(this,3)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-3" value="03" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-4" onclick="clickHour(this,4)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-4" value="04" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-5" onclick="clickHour(this,5)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-5" value="05" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-6" onclick="clickHour(this,6)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-6" value="06" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-7" onclick="clickHour(this,7)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-7" value="07" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-8" onclick="clickHour(this,8)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-8" value="08" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-9" onclick="clickHour(this,9)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-9" value="09" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-10" onclick="clickHour(this,10)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-10" value="10" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-11" onclick="clickHour(this,11)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-11" value="11" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ <xul:row flex="1" anonid="ximfmail-date-picker-hour-24-header-box"> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-12" onclick="clickHour(this,12)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-12" value="12" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-13" onclick="clickHour(this,13)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-13" value="13" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-14" onclick="clickHour(this,14)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-14" value="14" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-15" onclick="clickHour(this,15)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-15" value="15" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-16" onclick="clickHour(this,16)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-16" value="16" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-17" onclick="clickHour(this,17)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-17" value="17" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-18" onclick="clickHour(this,18)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-18" value="18" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-19" onclick="clickHour(this,19)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-19" value="19" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-20" onclick="clickHour(this,20)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-20" value="20" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-21" onclick="clickHour(this,21)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-21" value="21" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-22" onclick="clickHour(this,22)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-22" value="22" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-23" onclick="clickHour(this,23)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-23" value="23" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ </xul:rows>\r
+ </xul:grid> \r
+ <xul:hbox><xul:label value="Minutes"/></xul:hbox>\r
+ <xul:grid flex="1">\r
+ <xul:columns>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/> \r
+ </xul:columns>\r
+ <xul:rows>\r
+ <!-- \r
+ <xul:row>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class">\r
+ <xul:label value="Min" />\r
+ </xul:vbox>\r
+ </xul:row>\r
+ -->\r
+ <xul:row id="ximfmail-date-picker-min-line1-header-box">\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-0" onclick="clickMin(this,0)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-0" value=":00" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-5" onclick="clickMin(this,5)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-5" value=":05" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-10" onclick="clickMin(this,10)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-10" value=":10" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-15" onclick="clickMin(this,15)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-15" value=":15" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-20" onclick="clickMin(this,20)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-20" value=":20" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-25" onclick="clickMin(this,25)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-25" value=":25" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ <xul:row id="ximfmail-date-picker-min-line2-header-box">\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-30" onclick="clickMin(this,30)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-30" value=":30" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-35" onclick="clickMin(this,35)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-35" value=":35" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-40" onclick="clickMin(this,40)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-40" value=":40" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-45" onclick="clickMin(this,45)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-45" value=":45" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-50" onclick="clickMin(this,50)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-50" value=":50" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-55" onclick="clickMin(this,55)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-55" value=":55" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ </xul:rows>\r
+ </xul:grid> \r
+ <xul:hbox id="ximf-date-picker-end-controls-box">\r
+ <xul:box> \r
+ <xul:image id="oe-date-picker-currenttime-text" onclick="setToday()" /></xul:box> \r
+ <xul:box flex="1" />\r
+ <xul:box> <xul:image id="ximf-date-picker-ok-control-box" onclick="clickOk()"/>\r
+ </xul:box>\r
+ </xul:hbox>\r
+ </xul:vbox> \r
+ </xul:popup>\r
+ </xul:hbox>\r
+ </content>\r
+\r
+ <implementation>\r
+ <constructor>\r
+ <![CDATA[\r
+ // The popup window containing the picker\r
+ this.gPopup = null\r
+ \r
+ // The original starting date and currently selected date\r
+ this.gOriginalDate = null; \r
+ this.gSelectedDate = null; \r
+ \r
+ // selected items\r
+ this.gSelectedMonthItem = null;\r
+ this.gSelectedDayItem = null; \r
+ \r
+ this._input = document.getAnonymousElementByAttribute( this, "anonid", "input");\r
+ \r
+ var defaultDate = this.date;\r
+ if( defaultDate )\r
+ this.date = defaultDate;\r
+ \r
+ //EADS DS\r
+ this.gSelectedHoursItem = null;\r
+ this.gSelectedMinutesItem = null;\r
+ ]]>\r
+ </constructor> \r
+ <property name="date">\r
+ <getter>\r
+ if( this.hasAttribute( "date" ) ){\r
+ var val = this.getAttribute( "date" );\r
+ if( val == "now" )\r
+ return new Date();\r
+ else\r
+ return new Date( val );\r
+ }\r
+ else\r
+ return null;\r
+ </getter>\r
+ <setter>\r
+ if( val == "now" ){\r
+ this.setDate( new Date() );\r
+ this.setAttribute( "date", "now" );\r
+ }\r
+ else{\r
+ this.setDate( val );\r
+ this.setAttribute( "date", val.getTime() );\r
+ }\r
+ </setter>\r
+ </property>\r
+ <property name="disabled">\r
+ <getter>\r
+ return this._input.disabled;\r
+ </getter>\r
+ <setter>\r
+ this.setAttribute( "disabled", val );\r
+ this._input.disabled = val;\r
+ </setter>\r
+ </property>\r
+\r
+ <!-- see keypress example from mozilla/toolkit/content/widgets/autocomplete.xml -->\r
+ <method name="onKeyPress">\r
+ <parameter name="aEvent"/>\r
+ <body><![CDATA[\r
+ //XXX: this is so bogus...\r
+ if (aEvent.getPreventDefault())\r
+ return false;\r
+\r
+ if (aEvent.keyCode || aEvent.charCode <= 32 || aEvent.altKey || \r
+ aEvent.ctrlKey || aEvent.metaKey)\r
+ return true; // No printable char pressed, not a potential accesskey\r
+\r
+ var key = aEvent.which;\r
+ var keychar = String.fromCharCode( aEvent.which );//String.fromCharCode(key);\r
+\r
+ // control keys\r
+ if ((key==null) || (key==0) || (key==8) || \r
+ (key==9) || (key==13) || (key==27) ){\r
+ return true;\r
+ }\r
+\r
+ // numbers and a single decimal\r
+ if ((("-/0123456789").indexOf(keychar) > -1)){\r
+ return true;\r
+ }\r
+ \r
+ // blocking event\r
+ aEvent.stopPropagation();\r
+ aEvent.preventDefault();\r
+ return false;\r
+ ]]>\r
+ </body>\r
+ </method>\r
+ <method name="popupshowing">\r
+ <parameter name="popup"/>\r
+ <body><![CDATA[\r
+ // Set up the picker, called when the popup pops\r
+ this.gPopup = popup;\r
+\r
+ // get the start date from the popup value attribute and select it \r
+ var startDate = this.gPopup.value; \r
+ \r
+ if(startDate){ \r
+ this.gOriginalDate = new Date( startDate );\r
+ this.gSelectedDate = new Date( startDate );\r
+ }else{\r
+ this.gOriginalDate = new Date();\r
+ this.gSelectedDate = new Date();\r
+ this.gSelectedDate.setMinutes(Math.round((this.gSelectedDate.getMinutes()/5))*5); \r
+ this.gOriginalDate.setMinutes(Math.round((this.gOriginalDate.getMinutes()/5))*5); \r
+ }\r
+ \r
+ // draw the year based on the selected date\r
+ this.redrawYear();\r
+\r
+ // draw the month based on the selected date\r
+ var month = this.gSelectedDate.getMonth() + 1;\r
+ var selectedMonthBoxItem = document.getAnonymousElementByAttribute( this, "anonid", "oe-date-picker-year-month-" + month + "-box" );\r
+ this.selectMonthItem( selectedMonthBoxItem );\r
+\r
+ // draw in the days for the selected date\r
+ this.redrawDays();\r
+ \r
+ //EADS - draw in hours and minutes for selected date\r
+ var hour = this.gSelectedDate.getHours();\r
+ var selectedHoursBoxItem = document.getAnonymousElementByAttribute( this, "anonid", "ximfmail-date-picker-hour-box-" + hour );\r
+ this.selectHoursItem(selectedHoursBoxItem);\r
+ \r
+ var min = this.gSelectedDate.getMinutes();\r
+ var selectedMinutesBoxItem = null;\r
+ if(min%5 != 0)\r
+ selectedMinutesBoxItem = document.getAnonymousElementByAttribute( this, "anonid", "ximfmail-date-picker-min-box-" + (Math.round(min/5)*5) );\r
+ else\r
+ selectedMinutesBoxItem = document.getAnonymousElementByAttribute( this, "anonid", "ximfmail-date-picker-min-box-" + min );\r
+ this.selectMinutesItem(selectedMinutesBoxItem); \r
+ ]]></body>\r
+ </method>\r
+ \r
+ <method name="clickDay">\r
+ <parameter name="newDayItem"/>\r
+ <parameter name="newDayItemNumber"/>\r
+ <body><![CDATA[\r
+ // Called when a day is clicked, close the picker and call the client's oncommand\r
+ // get the clicked day\r
+ \r
+ var dayNumberItem = document.getAnonymousElementByAttribute( this, "anonid", "oe-date-picker-month-day-text-" + newDayItemNumber );\r
+\r
+ var dayNumber = dayNumberItem.getAttribute( "value" );\r
+\r
+ // they may have clicked an unfilled day, if so ignore it and leave the picker up\r
+\r
+ if( dayNumber != "" ){ \r
+ this.selectDayItem(newDayItem);\r
+ // set the selected date to what they cliked on\r
+ this.gSelectedDate.setDate( dayNumber ); \r
+ this.selectDate();\r
+\r
+ }\r
+ ]]></body>\r
+ </method>\r
+ <method name="selectDate">\r
+ <body><![CDATA[\r
+ // We copy the picked date to avoid problems with changing the Date object in place\r
+ \r
+ var pickedDate = new Date( this.gSelectedDate );\r
+\r
+ // put the selected date in the popup item's value property\r
+\r
+ this.gPopup.value = pickedDate;\r
+\r
+ // get the client oncommand function, call it if there is one\r
+\r
+ var commandEventMethod = this.gPopup.getAttribute( "oncommand" );\r
+\r
+ if( commandEventMethod != null )\r
+ {\r
+ // set up a variable date, that will be avaialable from within the \r
+ // client method\r
+\r
+ var date = pickedDate;\r
+\r
+ // Make the function a member of the popup before calling it so that \r
+ // 'this' will be the popup\r
+\r
+ this.gPopup._input = this._input; // save the input\r
+ var input = this._input;\r
+\r
+ this.gPopup.oeDatePickerFunction = function(){\r
+ var datePopup = this;\r
+ var newDate = datePopup.value;\r
+ var day = newDate.getDate();\r
+ if(day < 10){day = "0" + day;}\r
+ var month = newDate.getMonth() + 1;\r
+ if(month < 10){month = "0" + month;}\r
+ var hour = newDate.getHours();\r
+ if(hour < 10){hour = "0"+ hour;}\r
+ var min = newDate.getMinutes();\r
+ if(min < 10){min = "0" + min;}\r
+\r
+ this._input.value = day + "/" + month + "/" + newDate.getFullYear() + " " + hour + ":" + min;\r
+ \r
+ };\r
+ \r
+ this.gPopup.oeDatePickerFunction();\r
+ }\r
+\r
+ // close the popup\r
+ //this.gPopup.closePopup();\r
+ ]]></body>\r
+ </method>\r
+ <method name="clickMonth">\r
+ <parameter name="newMonthItem"/>\r
+ <parameter name="newMonthNumber"/>\r
+ <body><![CDATA[\r
+ // Called when a month box is clicked \r
+ // already selected, return\r
+ if( this.gSelectedMonthItem == newMonthItem )\r
+ return;\r
+\r
+ // Avoid problems when changing months if the date is at the end of the month\r
+ // i.e. if date is 31 march and you do a setmonth to april, the month would\r
+ // actually be set to may, beacause april only has 30 days.\r
+ // This is why we keep the original date around.\r
+\r
+ var oldDate = this.gSelectedDate.getDate();\r
+ var yearNumber = this.gSelectedDate.getFullYear();\r
+\r
+ var pastLastDate = new Date( yearNumber, newMonthNumber-1, 32 );\r
+ var lastDayOfMonth = 32 - pastLastDate.getDate(); \r
+\r
+ if( oldDate > lastDayOfMonth ){\r
+ this.gSelectedDate.setDate(lastDayOfMonth);\r
+ }\r
+\r
+ // update the selected date\r
+ this.gSelectedDate.setMonth( newMonthNumber - 1 );\r
+\r
+ // select Month\r
+ this.selectMonthItem( newMonthItem );\r
+\r
+ // redraw days\r
+ this.redrawDays();\r
+ this.selectDate();\r
+ ]]></body>\r
+ </method>\r
+ <method name="previousYearCommand">\r
+ <parameter name="increment"/>\r
+ <body><![CDATA[\r
+ // Called when previous Year button is clicked \r
+ // update the selected date\r
+\r
+ var oldYear = this.gSelectedDate.getFullYear(); \r
+ this.gSelectedDate.setFullYear( oldYear - increment ); \r
+\r
+ // redraw the year and the days\r
+ this.redrawYear();\r
+ this.redrawDays();\r
+ this.selectDate();\r
+ ]]></body>\r
+ </method>\r
+ <method name="setToday">\r
+ <body><![CDATA[\r
+ this.gSelectedDate = new Date();\r
+\r
+ // redraw the year and the days\r
+ this.redrawYear();\r
+ this.redrawDays();\r
+ \r
+ //select new month item\r
+ var newMonth = this.gSelectedDate.getMonth(); \r
+ var monthItem = document.getAnonymousElementByAttribute( this, "anonid", "oe-date-picker-year-month-" + (newMonth+1) + "-box");\r
+ this.selectMonthItem(monthItem); \r
+ \r
+ // select new hours item \r
+ var newHour = this.gSelectedDate.getHours(); \r
+ var hourNumberItem = document.getAnonymousElementByAttribute( this, "anonid", "ximfmail-date-picker-hour-box-" + newHour );\r
+ this.selectHoursItem(hourNumberItem);\r
+ \r
+ // select new minutes item\r
+ this.gSelectedDate.setMinutes(Math.round((this.gSelectedDate.getMinutes()/5))*5); \r
+ var newMinutes = this.gSelectedDate.getMinutes(); \r
+ var minutesNumberItem = document.getAnonymousElementByAttribute( this, "anonid", "ximfmail-date-picker-min-box-" + newMinutes );\r
+ this.selectMinutesItem(minutesNumberItem); \r
+ \r
+ this.selectDate();\r
+ ]]></body>\r
+ </method>\r
+ <method name="nextYearCommand">\r
+ <parameter name="increment"/>\r
+ <body><![CDATA[\r
+ // Called when next Year button is clicked \r
+ // update the selected date\r
+\r
+ var oldYear = this.gSelectedDate.getFullYear(); \r
+ this.gSelectedDate.setFullYear( oldYear + increment ); \r
+\r
+ // redraw the year and the days\r
+ this.redrawYear();\r
+ this.redrawDays();\r
+ this.selectDate();\r
+ ]]></body>\r
+ </method>\r
+ <method name="redrawYear">\r
+ <body><![CDATA[\r
+ var yearTitleItem = document.getAnonymousElementByAttribute( this, "anonid", "oe-date-picker-year-title-text" );\r
+ yearTitleItem.setAttribute( "value", this.gSelectedDate.getFullYear() );\r
+ ]]></body>\r
+ </method>\r
+\r
+ <method name="selectMonthItem">\r
+ <parameter name="newMonthItem"/>\r
+ <body><![CDATA[\r
+ // Select a month box \r
+ // clear old selection, if there is one\r
+ if( this.gSelectedMonthItem != null ){\r
+ this.gSelectedMonthItem.setAttribute( "selected" , false );\r
+ }\r
+\r
+ // Set the selected attribute, used to give it a different style\r
+ newMonthItem.setAttribute( "selected" , true );\r
+\r
+ // Remember new selection\r
+ this.gSelectedMonthItem = newMonthItem;\r
+ ]]></body>\r
+ </method>\r
+ <method name="selectDayItem">\r
+ <parameter name="newDayItem"/>\r
+ <body><![CDATA[\r
+ // Select a day box \r
+ // clear old selection, if there is one\r
+\r
+ if( this.gSelectedDayItem != null ){\r
+ this.gSelectedDayItem.setAttribute( "selected" , false );\r
+ }\r
+\r
+ if( newDayItem != null ){\r
+ // Set the selected attribute, used to give it a different style\r
+ newDayItem.setAttribute( "selected" , true );\r
+ }\r
+ // Remember new selection\r
+ this.gSelectedDayItem = newDayItem;\r
+ ]]></body>\r
+ </method>\r
+ <method name="redrawDays">\r
+ <body><![CDATA[\r
+ // Redraw day numbers based on the selected date\r
+ // Write in all the day numbers\r
+ \r
+ var firstDate = new Date( this.gSelectedDate.getFullYear(), this.gSelectedDate.getMonth(), 1 );\r
+ var firstDayOfWeek = firstDate.getDay();\r
+ \r
+ //get last Day Of Month \r
+ var pastLastDate = new Date( this.gSelectedDate.getFullYear(), this.gSelectedDate.getMonth(), 32 );\r
+ var lastDayOfMonth = 32 - pastLastDate.getDate(); \r
+ \r
+ // clear the selected day item \r
+ this.selectDayItem( null );\r
+ \r
+ // redraw each day bax in the 7 x 6 grid\r
+ \r
+ var dayNumber = 1;\r
+ \r
+ for( var dayIndex = 0; dayIndex < 42; ++dayIndex )\r
+ {\r
+ // get the day text box\r
+ \r
+ var dayNumberItem = document.getAnonymousElementByAttribute( this, "anonid", "oe-date-picker-month-day-text-" + (dayIndex + 1) );\r
+ \r
+ // if it is an unfilled day ( before first or after last ), just set its value to "",\r
+ // and don't increment the day number.\r
+ \r
+ if( dayIndex < firstDayOfWeek || dayNumber > lastDayOfMonth )\r
+ {\r
+ dayNumberItem.setAttribute( "value" , "" ); \r
+ }\r
+ else\r
+ {\r
+ // set the value to the day number\r
+ \r
+ dayNumberItem.setAttribute( "value" , dayNumber );\r
+ \r
+ // draw the day as selected\r
+ if( dayNumber == this.gSelectedDate.getDate() ) \r
+ {\r
+ var dayNumberBoxItem = document.getAnonymousElementByAttribute( this, "anonid", "oe-date-picker-month-day-" + (dayIndex + 1) + "-box" );\r
+ this.selectDayItem( dayNumberBoxItem );\r
+ }\r
+ \r
+ // advance the day number\r
+ \r
+ ++dayNumber; \r
+ }\r
+ }\r
+ ]]></body>\r
+ </method>\r
+\r
+ <method name="openPopup">\r
+ <parameter name="button"/>\r
+ <body><![CDATA[\r
+ var datestr = this._input.value;\r
+ var datePickerPopup = document.getAnonymousElementByAttribute( this, "anonid", "oe-date-picker-popup" );\r
+ var date = this.parseDate( datestr );\r
+ if( !date )\r
+ date = new Date();\r
+\r
+ datePickerPopup.setAttribute( "value", date );\r
+ // XXX: is there a better way to offset the popup then hard coding 25?\r
+ //datePickerPopup.showPopup( button, button.boxObject.screenX,(button.boxObject.screenY + 25), "popup" );\r
+ datePickerPopup.showPopup( button, -1, -1, "popup" );\r
+ ]]></body>\r
+ </method>\r
+ <method name="parseDate">\r
+ <parameter name="datestr"/>\r
+ <body><![CDATA[\r
+ //var datestr = this._input.value; \r
+ try{\r
+ if( datestr != "" ){\r
+ var reg=new RegExp("[ / :]+", "g"); //eads\r
+ var parts = datestr.split(reg); \r
+ if( parts.length >= 5 ){ \r
+ //var d = new Date(month, day, year, hour, minutes, seconds);\r
+ //return new Date(parseInt(parts[1]-1),parseInt(parts[0]),parseInt(parts[2]),parseInt(parts[3]),parseInt(parts[4]),0);\r
+ alert("SPLIT DATE\nmonth : "+parts[1] + "\n day : " + parts[0] +"\n year : "+ parts[2] +"\n hour : "+ parts[3] +"\n min : "+ parts[4]);\r
+ var new_date = new Date();\r
+ new_date.setDate(parseInt(parts[0], 10));\r
+ new_date.setMonth(parseInt(parts[1]-1, 10));\r
+ new_date.setFullYear(parseInt(parts[2], 10));\r
+ new_date.setHours(parseInt(parts[3], 10));\r
+ new_date.setMinutes(parseInt(parts[4], 10));\r
+ new_date.setSeconds(0);\r
+ return new_date; \r
+ }\r
+ }\r
+ }catch(e){}\r
+ return null;\r
+ ]]></body>\r
+ </method>\r
+\r
+ <method name="getDate">\r
+ <body><![CDATA[\r
+ return this.parseDate( this._input.value );\r
+ ]]></body>\r
+ </method>\r
+ <method name="setDate">\r
+ <parameter name="date"/>\r
+ <body><![CDATA[\r
+ if( !date )\r
+ return;\r
+\r
+ try{\r
+ this.gSelectedDate = date;\r
+ this._input.value = date.getDate() + "/" + (date.getMonth()+1) + "/" + date.getFullYear() + " " + date.getHours() + ":" + date.getMinutes();\r
+ }catch( e ){\r
+ // try parsing the date as a string \r
+ this.gSelectedDate = this.parseDate( date );\r
+ if( this.gSelectedDate )\r
+ this._input.value = date;\r
+ else{\r
+ dump( "Date is invalid: " + date + "\n" );\r
+ alert( "Date is invalid: " + date + "\n" );\r
+ return;\r
+ }\r
+ }\r
+ if( this.gPopup ){\r
+ // redraw the year and the days\r
+ this.redrawYear();\r
+ this.redrawDays();\r
+ this.selectDate();\r
+ }\r
+ ]]></body>\r
+ </method>\r
+ <property name="value">\r
+ <getter>\r
+ return this.getDate();\r
+ </getter>\r
+ <setter>\r
+ this.setDate(val);\r
+ </setter>\r
+ </property>\r
+ <!-- EADS BEGIN -->\r
+ <method name="clickHour">\r
+ <parameter name="newHoursItem"/>\r
+ <parameter name="newHourItemNumber"/>\r
+ <body><![CDATA[ \r
+ var hourNumberItem = document.getAnonymousElementByAttribute( this, "anonid", "ximfmail-date-picker-hour-text-" + newHourItemNumber );\r
+ var hourNumber = hourNumberItem.getAttribute( "value" ); \r
+ // they may have clicked an unfilled day, if so ignore it and leave the picker up\r
+ if( hourNumber != "" ){ \r
+ \r
+ this.selectHoursItem(newHoursItem);\r
+ \r
+ //bug on 8 and 9 ParseInt hourNumber\r
+ //alert(hourNumber +" .. " + parseInt(hourNumber)+">>"+this.gSelectedDate.getHours());\r
+ \r
+ //var iHour = 0; parseInt(hourNumber);\r
+ //if(hourNumber=="08"){\r
+ // iHour = 8;\r
+ //}else{\r
+ // if(hourNumber=="09"){\r
+ // iHour = 9;\r
+ // }else{\r
+ // iHour = parseInt(hourNumber);\r
+ // }\r
+ //}\r
+ \r
+ //this.gSelectedDate.setHours(iHour);\r
+ this.gSelectedDate.setHours(parseInt(hourNumber, 10)); \r
+ this.selectDate();\r
+ \r
+ }\r
+ ]]></body>\r
+ </method>\r
+ <method name="selectHoursItem">\r
+ <parameter name="newHoursItem"/>\r
+ <body><![CDATA[\r
+ // Select a month box \r
+ // clear old selection, if there is one\r
+ if( this.gSelectedHoursItem != null ){\r
+ this.gSelectedHoursItem.setAttribute( "selected" , false );\r
+ }\r
+\r
+ // Set the selected attribute, used to give it a different style\r
+ newHoursItem.setAttribute( "selected" , true );\r
+\r
+ // Remember new selection\r
+ this.gSelectedHoursItem = newHoursItem;\r
+ ]]></body>\r
+ </method>\r
+ <method name="clickMin">\r
+ <parameter name="newMinItem"/>\r
+ <parameter name="newMinItemNumber"/>\r
+ <body><![CDATA[ \r
+ var minItem = document.getAnonymousElementByAttribute( this, "anonid", "ximfmail-date-picker-min-text-" + newMinItemNumber );\r
+ var minNumber = minItem.getAttribute( "value" );\r
+ \r
+ // they may have clicked an unfilled day, if so ignore it and leave the picker up\r
+ if( minNumber != "" ){\r
+ //\r
+ this.selectMinutesItem(newMinItem);\r
+ //\r
+ \r
+ this.gSelectedDate.setMinutes(parseInt(newMinItemNumber, 10)); \r
+ this.selectDate(); \r
+ }\r
+ ]]></body>\r
+ </method>\r
+\r
+ <method name="selectMinutesItem">\r
+ <parameter name="newMinutesItem"/>\r
+ <body><![CDATA[\r
+ // Select a month box \r
+ // clear old selection, if there is one\r
+ if( this.gSelectedMinutesItem != null ){\r
+ this.gSelectedMinutesItem.setAttribute( "selected" , false );\r
+ }\r
+\r
+ // Set the selected attribute, used to give it a different style\r
+ newMinutesItem.setAttribute( "selected" , true );\r
+\r
+ // Remember new selection\r
+ this.gSelectedMinutesItem = newMinutesItem;\r
+ ]]></body>\r
+ </method> \r
+ <method name="clickOk">\r
+ <body><![CDATA[\r
+ this.selectDate();\r
+ this.gPopup.hidePopup();\r
+ ]]></body>\r
+ </method>\r
+ \r
+ <method name="clickHourRange"> \r
+ <parameter name="newValueNumber"/>\r
+ <body><![CDATA[\r
+ var rowItem = document.getAnonymousElementByAttribute( this, "anonid", "ximfmail-date-picker-hour-24-header-box" );\r
+ if(newValueNumber == "12"){ \r
+ //rowItem.setAttribute("hidden","true");\r
+ rowItem.style.display="none";\r
+ }else{\r
+ //rowItem.setAttribute("hidden","false");\r
+ rowItem.style.display="";\r
+ }\r
+ ]]></body>\r
+ </method>\r
+ <!-- EADS END -->\r
+ </implementation> \r
+ <handlers> \r
+ <handler event="keypress" phase="capturing" action="return this.onKeyPress(event);"/>\r
+ </handlers>\r
+ </binding>\r
+</bindings>\r
--- /dev/null
+/* ***** BEGIN LICENSE BLOCK *****\r
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ *\r
+ *\r
+ * Redistribution and use, in source and binary forms, with or without modification,\r
+ * are permitted provided that the following conditons are met :\r
+ *\r
+ * 1. Redistributions of source code must retain the above copyright notice,\r
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ * in the redistribution of the source code.\r
+ * 3. Neither the names of the copyright holders nor the names of any contributors\r
+ * may be used to endorse or promote products derived from this software without specific\r
+ * prior written permission from EADS Defence and Security.\r
+ *\r
+ * Alternatively, the contents of this file may be used under the terms of\r
+ * either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ * in which case the provisions of the GPL or the LGPL are applicable instead\r
+ * of those above. If you wish to allow use of your version of this file only\r
+ * under the terms of either the GPL or the LGPL, and not to allow others to\r
+ * use your version of this file under the terms of the MPL, indicate your\r
+ * decision by deleting the provisions above and replace them with the notice\r
+ * and other provisions required by the GPL or the LGPL. If you do not delete\r
+ * the provisions above, a recipient may use your version of this file under\r
+ * the terms of any one of the MPL, the GPL or the LGPL.\r
+ *\r
+ * REMINDER :\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ *\r
+ * Contributor(s):\r
+ * Copyright(c) Airbus Defence and Space 2014 - All rights reserved\r
+ * ***** END LICENSE BLOCK ***** */\r
+/*\r
+ window.arguments = [];\r
+ args[0] header label\r
+ args[1] header XIMF\r
+ args[2] list of label values\r
+ args[3] list of XIMF values\r
+ args[4] label separator\r
+ args[5] XIMF separator\r
+*/\r
+function OnDisplayInformations(){\r
+ var gArgs = window.arguments;\r
+ var xSeparator = null;\r
+ var NB_CHARACTERS = 45;\r
+ if(gArgs[0].length > 0){\r
+ var title = gArgs[0][0];\r
+ var xHdr = gArgs[0][1];\r
+ var val = gArgs[0][2];\r
+ var xval = gArgs[0][3];\r
+ }\r
+ if(gArgs[0].length === 5){\r
+ var xSeparator = gArgs[0][4];\r
+ }\r
+ //add complete header to description\r
+ document.title = title.substring(0,title.lastIndexOf(":"));\r
+ if(!xSeparator){\r
+ document.getElementById("ximfheaderValue").value = val;\r
+ }else{\r
+ var reg=new RegExp("["+xSeparator+"]+", "g");\r
+ document.getElementById("ximfheaderValue").value = val.replace(reg,"\n");\r
+ }\r
+}\r
+function doOK()\r
+{\r
+ return true;\r
+}\r
+function doCancel()\r
+{\r
+ return true;\r
+}\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!-- ***** BEGIN LICENSE BLOCK *****\r
+ - Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ - ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ -\r
+ -\r
+ - Redistribution and use, in source and binary forms, with or without modification,\r
+ - are permitted provided that the following conditons are met :\r
+ -\r
+ - 1. Redistributions of source code must retain the above copyright notice,\r
+ - 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ - in the redistribution of the source code.\r
+ - 3. Neither the names of the copyright holders nor the names of any contributors\r
+ - may be used to endorse or promote products derived from this software without specific\r
+ - prior written permission from EADS Defence and Security.\r
+ -\r
+ - Alternatively, the contents of this file may be used under the terms of\r
+ - either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ - or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ - in which case the provisions of the GPL or the LGPL are applicable instead\r
+ - of those above. If you wish to allow use of your version of this file only\r
+ - under the terms of either the GPL or the LGPL, and not to allow others to\r
+ - use your version of this file under the terms of the MPL, indicate your\r
+ - decision by deleting the provisions above and replace them with the notice\r
+ - and other provisions required by the GPL or the LGPL. If you do not delete\r
+ - the provisions above, a recipient may use your version of this file under\r
+ - the terms of any one of the MPL, the GPL or the LGPL.\r
+ -\r
+ - REMINDER :\r
+ - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ - IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ -\r
+ - EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ - ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ - \r
+ - Contributor(s):\r
+ - Copyright(c) Airbus Defence and Space 2014 - All rights reserved \r
+ - ***** END LICENSE BLOCK ***** -->\r
+\r
+<!DOCTYPE overlay SYSTEM "chrome://ximfmail/locale/ximfmail.dtd">\r
+<?xml-stylesheet href="chrome://ximfmail/skin" type="text/css"?>\r
+<!-- title="&dlgheader.hdrInfo.descr;" -->\r
+<dialog id="ximfmail-dialog-hdrInfo"\r
+\r
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"\r
+ buttons="accept"\r
+ buttonlabelaccept="OK"\r
+ ondialogaccept="return doOK();"\r
+ onload="OnDisplayInformations();">\r
+ <script type="application/javascript" src="chrome://ximfmail/content/dialogHdrInfo-ximfmail.js" />\r
+ <vbox flex="1">\r
+ <label id="ximfheaderName"/>\r
+ <vbox id="box-ilkheaderValue" flex="1">\r
+ <spacer flex="1"/>\r
+ <textbox id="ximfheaderValue" rows="5" readonly="true" multiline="true" flex="1"/>\r
+ </vbox>\r
+ </vbox>\r
+</dialog>
\ No newline at end of file
--- /dev/null
+/* ***** BEGIN LICENSE BLOCK *****\r
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ *\r
+ *\r
+ * Redistribution and use, in source and binary forms, with or without modification,\r
+ * are permitted provided that the following conditons are met :\r
+ *\r
+ * 1. Redistributions of source code must retain the above copyright notice,\r
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ * in the redistribution of the source code.\r
+ * 3. Neither the names of the copyright holders nor the names of any contributors\r
+ * may be used to endorse or promote products derived from this software without specific\r
+ * prior written permission from EADS Defence and Security.\r
+ *\r
+ * Alternatively, the contents of this file may be used under the terms of\r
+ * either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ * in which case the provisions of the GPL or the LGPL are applicable instead\r
+ * of those above. If you wish to allow use of your version of this file only\r
+ * under the terms of either the GPL or the LGPL, and not to allow others to\r
+ * use your version of this file under the terms of the MPL, indicate your\r
+ * decision by deleting the provisions above and replace them with the notice\r
+ * and other provisions required by the GPL or the LGPL. If you do not delete\r
+ * the provisions above, a recipient may use your version of this file under\r
+ * the terms of any one of the MPL, the GPL or the LGPL.\r
+ *\r
+ * REMINDER :\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ *\r
+ * Contributor(s):\r
+ * Copyright(c) Airbus Defence and Space 2014 - All rights reserved\r
+ * ***** END LICENSE BLOCK ***** */\r
+var XIMF_DIALOG_TREE_RDF_ROOT_URI = "http://www.ximfmail.com/dialogtree/datas";\r
+var XIMF_DIALOG_TREE_PREDICATE_COLUMN_0 = "http://www.ximfmail.com/RDF#column0";\r
+var XIMF_DIALOG_TREE_PREDICATE_COLUMN_1 = "http://www.ximfmail.com/RDF#column1";\r
+\r
+function Indexage(){\r
+ this.A = -1;\r
+ this.B = -1;\r
+ this.C = -1;\r
+ this.D = -1;\r
+ this.E = -1;\r
+ this.F = -1;\r
+ this.G = -1;\r
+ this.H = -1;\r
+ this.I = -1;\r
+ this.J = -1;\r
+ this.K = -1;\r
+ this.L = -1;\r
+ this.M = -1;\r
+ this.N = -1;\r
+ this.O = -1;\r
+ this.P = -1;\r
+ this.Q = -1;\r
+ this.R = -1;\r
+ this.S = -1;\r
+ this.T = -1;\r
+ this.U = -1;\r
+ this.V = -1;\r
+ this.W = -1;\r
+ this.X = -1;\r
+ this.Y = -1;\r
+ this.Z = -1;\r
+};\r
+/*\r
+ *\r
+ */\r
+function DialogTreeRDFSourceClass() {\r
+ // private:\r
+ var _rdfService = null;\r
+ var _rdfCUtils = null;\r
+ var _treeProjectsDatasource = null;\r
+ var _treeProjectsRefURI = null;\r
+ var _SeqRDFC_data = null;\r
+ // public:\r
+ if (typeof DialogTreeRDFSourceClass.initialized === "undefined") {\r
+ //init\r
+ DialogTreeRDFSourceClass.prototype.initialize = function(dataSource, strURI) {\r
+ try {\r
+ gConsole.logStringMessage("[ximfmail - DialogTreeRDFClass ] \n ");\r
+ // ref : attribut of tree. use to save all data in the same dataSource\r
+ _treeProjectsRefURI = strURI;\r
+ // init RDF service\r
+ _rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);\r
+ // init data source\r
+ if (null === _treeProjectsDatasource) {\r
+ _treeProjectsDatasource = dataSource;\r
+ }\r
+ // init RDF Container Utils\r
+ _rdfCUtils = Components.classes["@mozilla.org/rdf/container-utils;1"].createInstance(Components.interfaces.nsIRDFContainerUtils);\r
+ // Init seq Container data source\r
+ var seqNode = _rdfService.GetResource(_treeProjectsRefURI);\r
+ _SeqRDFC_data = _rdfCUtils.MakeSeq(_treeProjectsDatasource, seqNode);\r
+ } catch(e){\r
+ gConsole.logStringMessage("[ximfmail - DialogTreeRDFClass ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ }\r
+ //\r
+ DialogTreeRDFSourceClass.prototype.getEntriesCount = function() {\r
+ if (_SeqRDFC_data) {\r
+ return _SeqRDFC_data.GetCount();\r
+ } else {\r
+ return 0;\r
+ }\r
+ }\r
+ //\r
+ DialogTreeRDFSourceClass.prototype.getDataSource=function() {\r
+ return _treeProjectsDatasource;\r
+ };\r
+\r
+ DialogTreeRDFSourceClass.prototype.getDataEntry = function(uri,predicate) {\r
+ try {\r
+ var data = "";\r
+ var resource = _rdfService.GetResource(uri);\r
+ var targets = _treeProjectsDatasource.ArcLabelsOut(resource);\r
+ while (targets.hasMoreElements()) {\r
+ var newpredicate = targets.getNext();\r
+ if (newpredicate instanceof Components.interfaces.nsIRDFResource) {\r
+ var target = _treeProjectsDatasource.GetTarget(resource, newpredicate, true);\r
+ if (target instanceof Components.interfaces.nsIRDFLiteral && newpredicate.Value === predicate) {\r
+ data = target.Value;\r
+ }\r
+ }\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - DialogTreeRDFSourceClass ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ return data;\r
+ };\r
+ DialogTreeRDFSourceClass.prototype.getEntryByPos = function(beggin, nbr) {\r
+ var arrayResult = [];\r
+ try {\r
+ var seq = _SeqRDFC_data.GetElements();\r
+ var currentData = 0;\r
+ while (seq.hasMoreElements()) {\r
+ var element = seq.getNext();\r
+ if (element instanceof Components.interfaces.nsIRDFResource && currentData >= beggin && currentData <= beggin+nbr) {\r
+ var col0 = this.getDataEntry(element.ValueUTF8,XIMF_DIALOG_TREE_PREDICATE_COLUMN_0);\r
+ var col1 = this.getDataEntry(element.ValueUTF8,XIMF_DIALOG_TREE_PREDICATE_COLUMN_1);\r
+ arrayResult.push([col0,col1]);\r
+ }\r
+ currentData++;\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - getSeachText ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ return arrayResult;\r
+ };\r
+\r
+ //\r
+ DialogTreeRDFSourceClass.prototype.getEntryByText = function(textToFind, nbr, curpos) {\r
+ var arrayResult = [];\r
+ var beggin = _SeqRDFC_data.GetCount();\r
+ try {\r
+ var seq = _SeqRDFC_data.GetElements();\r
+ var currentData = 0;\r
+ while (seq.hasMoreElements()) {\r
+ var element = seq.getNext();\r
+ if (element instanceof Components.interfaces.nsIRDFResource && curpos <= currentData) {\r
+ var col0 = this.getDataEntry(element.ValueUTF8,XIMF_DIALOG_TREE_PREDICATE_COLUMN_0);\r
+ if (beggin === _SeqRDFC_data.GetCount() && col0.toUpperCase().indexOf(textToFind.toUpperCase()) !== -1) {\r
+ beggin = currentData;\r
+ }\r
+ if (currentData >= beggin && currentData <= beggin+nbr) {\r
+ var col1 = this.getDataEntry(element.ValueUTF8,XIMF_DIALOG_TREE_PREDICATE_COLUMN_1);\r
+ arrayResult.push([col0,col1]);\r
+ }\r
+ }\r
+ currentData++;\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - getSeachText ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ return [arrayResult,beggin];\r
+ };\r
+ DialogTreeRDFSourceClass.prototype.getIndex = function() {\r
+ var arrayResult = [];\r
+ var beggin = -1;\r
+ var indexAZ = new Indexage();\r
+ try {\r
+ var seq = _SeqRDFC_data.GetElements();\r
+ var currentData = 0;\r
+ while (seq.hasMoreElements()) {\r
+ var element = seq.getNext();\r
+ if (element instanceof Components.interfaces.nsIRDFResource) {\r
+ var col0 = this.getDataEntry(element.ValueUTF8,XIMF_DIALOG_TREE_PREDICATE_COLUMN_0);\r
+ if(indexAZ[col0[0].toUpperCase()] === -1) {\r
+ indexAZ[col0[0].toUpperCase()] = currentData;\r
+ }\r
+ }\r
+ currentData++;\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - getIndex ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ return indexAZ;\r
+ };\r
+ // object initialisation\r
+ DialogTreeRDFSourceClass.initialized = true;\r
+ }\r
+}\r
+\r
+/*\r
+ *\r
+ */\r
+function DialogTreeRDFClass() {\r
+ // private:\r
+ var _rdfService = null;\r
+ var _rdfCUtils = null;\r
+ var _treeProjectsDatasource = null;\r
+ var _treeProjectsRefURI = null;\r
+ var _SeqRDFC_data = null;\r
+ var _RdfDataSourceOrigin = null;\r
+ var _indexAZ = null;\r
+ // public:\r
+ if(typeof DialogTreeRDFClass.initialized === "undefined") {\r
+ //init\r
+ DialogTreeRDFClass.prototype.initialize = function(dataSource, strURI) {\r
+ try {\r
+ // ref : attribut of tree. use to save all data in the same dataSource\r
+ _treeProjectsRefURI = XIMF_DIALOG_TREE_RDF_ROOT_URI;\r
+ // init RDF service\r
+ _rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);\r
+ // init data source\r
+ if (null === _treeProjectsDatasource) {\r
+ _treeProjectsDatasource = _rdfService.GetDataSource("rdf:in-memory-datasource");\r
+ _treeProjectsDatasource.QueryInterface(Components.interfaces.nsIRDFInMemoryDataSource);\r
+ }\r
+ // init RDF Container Utils\r
+ _rdfCUtils = Components.classes["@mozilla.org/rdf/container-utils;1"].createInstance(Components.interfaces.nsIRDFContainerUtils);\r
+ // Init seq Container data source\r
+ var seqNode = _rdfService.GetResource(_treeProjectsRefURI);\r
+ _SeqRDFC_data = _rdfCUtils.MakeSeq(_treeProjectsDatasource, seqNode);\r
+ _RdfDataSourceOrigin = new DialogTreeRDFSourceClass();\r
+ _RdfDataSourceOrigin.initialize(dataSource, strURI);\r
+ _indexAZ = _RdfDataSourceOrigin.getIndex();\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - DialogTreeRDFClass ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ }\r
+ //\r
+ DialogTreeRDFClass.prototype.getEntriesCount = function() {\r
+ if (_SeqRDFC_data) {\r
+ return _SeqRDFC_data.GetCount();\r
+ }else{\r
+ return 0;\r
+ }\r
+ }\r
+ //\r
+ DialogTreeRDFClass.prototype.getDataSource=function() {\r
+ return _treeProjectsDatasource;\r
+ };\r
+ DialogTreeRDFClass.prototype.addEntryDisplay = function(entry, index) {\r
+ // append resource element to sequence\r
+ //[DN,name,type]\r
+ var col0 = entry[0];\r
+ var col1 = entry[1];\r
+ var newURI = _treeProjectsRefURI + "/data" + index ;\r
+ var newResource = _rdfService.GetResource(newURI);\r
+ _SeqRDFC_data.AppendElement(newResource);\r
+ // save user informations\r
+ if(col0) {\r
+ _treeProjectsDatasource.Assert(newResource,\r
+ _rdfService.GetResource(XIMF_DIALOG_TREE_PREDICATE_COLUMN_0),\r
+ _rdfService.GetLiteral(col0),\r
+ true);\r
+ }\r
+ if(col1) {\r
+ _treeProjectsDatasource.Assert(newResource,\r
+ _rdfService.GetResource(XIMF_DIALOG_TREE_PREDICATE_COLUMN_1),\r
+ _rdfService.GetLiteral(col1),\r
+ true);\r
+ }\r
+ };\r
+ DialogTreeRDFClass.prototype.getDataEntry = function(uri,predicate) {\r
+ try{\r
+ _RdfDataSourceOrigin.getDataEntry(uri,predicate);\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - DialogTreeRDFClass ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ return data;\r
+ };\r
+ DialogTreeRDFClass.prototype.removeAllDisplay = function() {\r
+ try {\r
+ if(_SeqRDFC_data) {\r
+ var numEntri = _SeqRDFC_data.GetCount();\r
+ for (var indexCur = numEntri; indexCur >0; indexCur--) {\r
+ _SeqRDFC_data.RemoveElementAt(indexCur,true);\r
+ }\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - DialogTreeRDFClass ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ };\r
+ //\r
+ DialogTreeRDFClass.prototype.updateDisplay = function(curpos,maxPos) {\r
+ var colFoundArray = [];\r
+ var maxEntry = _RdfDataSourceOrigin.getEntriesCount();\r
+ if(curpos+maxPos > maxEntry) {\r
+ curpos = maxEntry-maxPos;\r
+ }\r
+ colFoundArray = _RdfDataSourceOrigin.getEntryByPos(curpos, maxPos);\r
+ this.removeAllDisplay();\r
+ for(var currItem=0;currItem<colFoundArray.length;currItem++) {\r
+ this.addEntryDisplay(colFoundArray[currItem], currItem);\r
+ }\r
+ $("#ximfmail.treedialog").attr("hidevscroll","true");\r
+ };\r
+ DialogTreeRDFClass.prototype.updateDisplayByText = function(textToFind,maxPos,curpos) {\r
+ var colFoundArray = [];\r
+ var index = _indexAZ[textToFind[0].toUpperCase()];\r
+ if(index === -1) {\r
+ return -1;\r
+ }\r
+ if(textToFind.length === 1) {\r
+ if(index===curpos){\r
+ return -1;\r
+ }\r
+ this.updateDisplay(index,maxPos);\r
+ return index;\r
+ }\r
+ var maxEntry = _RdfDataSourceOrigin.getEntriesCount();\r
+ if(index+maxPos > maxEntry){\r
+ index = maxEntry-maxPos-1;\r
+ }\r
+ var result = _RdfDataSourceOrigin.getEntryByText(textToFind, maxPos, index);\r
+ colFoundArray = result[0];\r
+ if(colFoundArray.length === 0){\r
+ return -1;\r
+ }\r
+ this.removeAllDisplay();\r
+ for(var currItem=0;currItem<colFoundArray.length;currItem++) {\r
+ this.addEntryDisplay(colFoundArray[currItem], currItem);\r
+ }\r
+ $("#ximfmail.treedialog").attr("hidevscroll","true");\r
+ return result[1];\r
+ };\r
+ //\r
+ DialogTreeRDFClass.prototype.getMaxEntry = function() {\r
+ var remoteCount = 0;\r
+ remoteCount = _RdfDataSourceOrigin.getEntriesCount();\r
+ return remoteCount;\r
+ };\r
+ // object initialisation\r
+ DialogTreeRDFClass.initialized = true;\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+/* ***** BEGIN LICENSE BLOCK *****\r
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ *\r
+ *\r
+ * Redistribution and use, in source and binary forms, with or without modification,\r
+ * are permitted provided that the following conditons are met :\r
+ *\r
+ * 1. Redistributions of source code must retain the above copyright notice,\r
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ * in the redistribution of the source code.\r
+ * 3. Neither the names of the copyright holders nor the names of any contributors\r
+ * may be used to endorse or promote products derived from this software without specific\r
+ * prior written permission from EADS Defence and Security.\r
+ *\r
+ * Alternatively, the contents of this file may be used under the terms of\r
+ * either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ * in which case the provisions of the GPL or the LGPL are applicable instead\r
+ * of those above. If you wish to allow use of your version of this file only\r
+ * under the terms of either the GPL or the LGPL, and not to allow others to\r
+ * use your version of this file under the terms of the MPL, indicate your\r
+ * decision by deleting the provisions above and replace them with the notice\r
+ * and other provisions required by the GPL or the LGPL. If you do not delete\r
+ * the provisions above, a recipient may use your version of this file under\r
+ * the terms of any one of the MPL, the GPL or the LGPL.\r
+ *\r
+ * REMINDER :\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ *\r
+ * Contributor(s):\r
+ * Copyright(c) Airbus Defence and Space 2014 - All rights reserved\r
+ * ***** END LICENSE BLOCK ***** */\r
+var gJSLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].createInstance(Components.interfaces.mozIJSSubScriptLoader);\r
+var gConsole = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);\r
+var gDlgTreeXimf_maxItem_alert = "";\r
+var gDlgTreeXimf_current_selection = null;\r
+var gDlgTreeXimf_current_separator = null;\r
+var gTitleDlg = "";\r
+// RDF list\r
+var gMaxDataList = 15;\r
+var gCurposList = -1;\r
+var gIDTimeoutList = null;\r
+var gIDTimeoutListSearch = null;\r
+var gSearchText = "";\r
+var gRDFList = null;\r
+var gArgsOpener = null;\r
+$(document).ready(function(){\r
+ var gArgs = window.arguments;\r
+ if(gArgs[0].length <= 0) {\r
+ return;\r
+ }\r
+ // load event manager\r
+ $("#ximfmail_dTreeAdd").bind("command",OnPushAddSelection);\r
+ $("#iTreechildDialog").dblclick(OnPushAddSelection);\r
+ $("#ximfmail_dTreeDel").bind("command",OnPushDelSelection);\r
+ $("#ximfmail_dTreeRaz").bind("command",OnPushRazSelection);\r
+ // event for scroll\r
+ $("#ximfmailTreeDialogScroll").mousemove(OnClickScrollTreeList);\r
+ $("#ximfmailTreeDialogScroll").click(OnClickScrollTreeList);\r
+ $("#iTreechildDialog").mousemove(OnClickScrollTreeList);\r
+ $(window).resize(OnClickScrollTreeList);\r
+ document.getElementById("iTreechildDialog").addEventListener('DOMMouseScroll', OnScrollTreeList, false);\r
+ $("#ximfmail.treedialog").keypress(OnKeyPressScrollTreeList);\r
+ $("#ximfmailTreeDialogDisplaybox").keypress(OnKeyPressScrollTreeList);\r
+ // load background datas\r
+ try{\r
+ // gArgs[0] is an XimfmailTreedialogArgs object - XimfmailTreedialogArgs class description at ximfmail.js file\r
+ gArgsOpener = gArgs[0];\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - ready ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ return;\r
+ }\r
+ // create alert message\r
+ if(parseInt(gArgsOpener.maxItemsSelected, 10) > 1){\r
+ gDlgTreeXimf_maxItem_alert = gArgsOpener.maxItemsSelected + " "+ getIlkProperties("ximfmail.dialog.editor.warning.nbrows");\r
+ }else{\r
+ if(parseInt(gArgsOpener.maxItemsSelected, 10) === 1){\r
+ gDlgTreeXimf_maxItem_alert = gArgsOpener.maxItemsSelected + " "+ getIlkProperties("ximfmail.dialog.editor.warning.nbrows.one");\r
+ }\r
+ }\r
+ try{\r
+ //set main title\r
+ var sTitle = gArgsOpener.title;\r
+ if(sTitle.indexOf(":") !== -1){\r
+ sTitle = sTitle.substring(0,sTitle.lastIndexOf(":"));\r
+ }\r
+ $("#treeDialogHeader").attr("title",sTitle);\r
+ $("#treeDialogHeader").attr("description",gDlgTreeXimf_maxItem_alert);\r
+ //set title columns\r
+ $("#iCol0").attr("label",gArgsOpener.titleColKey);\r
+ $("#iCol1").attr("label",gArgsOpener.titleColLabel);\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - AddCurrentSelection ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+ e.lineNumber);\r
+ }\r
+ LoadXmlDatas();\r
+});\r
+/*\r
+ * attach RDF Source to local tree\r
+ */\r
+function LoadXmlDatas(){\r
+ try{\r
+ //\r
+ var tree = document.getElementById("iTreechildDialog");\r
+ gRDFList = new DialogTreeRDFClass();\r
+ gRDFList.initialize(gArgsOpener.dataSource, gArgsOpener.refdataSource);\r
+ tree.database.AddDataSource(gRDFList.getDataSource());\r
+ tree.builder.rebuild();\r
+ OnClickScrollTreeList(0);\r
+ AddCurrentSelection();\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - LoadXmlDatas ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+}\r
+function AddCurrentSelection(){\r
+ // load current selected values\r
+ if(gArgsOpener.currentKeys.length > 0){\r
+ var list = document.getElementById("ximfmail_selection");\r
+ for (var i=0; i<gArgsOpener.currentKeys.length; i++) {\r
+ if(gArgsOpener.currentLabels[i]!==""){\r
+ var item = list.appendItem(gArgsOpener.currentKeys[i]);\r
+ if(gArgsOpener.currentKeys[i]!==""){\r
+ item.setAttribute("tooltiptext",gArgsOpener.currentLabels[i]);\r
+ }\r
+ }\r
+ }\r
+ }\r
+}\r
+function OnPushAddSelection(){\r
+ try{\r
+ var tree = document.getElementById("ximfmail.treedialog");\r
+ var list = document.getElementById("ximfmail_selection");\r
+ var start = new Object();\r
+ var end = new Object();\r
+ var numRanges = tree.view.selection.getRangeCount();\r
+ for (var t=0; t<numRanges; t++){\r
+ tree.view.selection.getRangeAt(t,start,end);\r
+ for (var v=start.value; v<=end.value; v++){\r
+ if(gArgsOpener.maxItemsSelected){\r
+ var nbItems = $("#ximfmail_selection listitem");\r
+ if(nbItems.length >= gArgsOpener.maxItemsSelected){\r
+ ximfAlert(gDlgTreeXimf_maxItem_alert);\r
+ return;\r
+ }\r
+ }\r
+ var item = list.appendItem(tree.view.getCellText(v, tree.columns.getColumnAt(0))); //list.appendItem(label,value)\r
+ item.tooltipText=tree.view.getCellText(v, tree.columns.getColumnAt(1));\r
+ }\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - OnPushAddSelection ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+}\r
+function OnPushDelSelection(){\r
+ var list = document.getElementById("ximfmail_selection");\r
+ list.removeItemAt( list.selectedIndex );\r
+}\r
+function OnPushRazSelection(){\r
+ var list = document.getElementById("ximfmail_selection");\r
+ var count = $("#ximfmail_selection listitem");\r
+ for(var i=count.length; i>0; --i){\r
+ list.removeItemAt(i-1);\r
+ }\r
+}\r
+function doOK(){\r
+ // get current selection\r
+ var list = $("#ximfmail_selection listitem");\r
+ for(var idx_list = 0; idx_list < list.length;++idx_list){\r
+ var currentItem = list[idx_list].getAttribute("label");\r
+ var currentTooltip = list[idx_list].getAttribute("tooltiptext");\r
+ if(currentItem !== ""){\r
+ gArgsOpener.retKeys.push(currentItem);\r
+ gArgsOpener.retLabels.push(currentTooltip);\r
+ }\r
+ }\r
+ return true;\r
+}\r
+/*\r
+ *\r
+ */\r
+function doCancel()\r
+{\r
+ gArgsOpener.retIsCancel=true;\r
+}\r
+function getTreeSelection(){\r
+ var list="";\r
+ var tree = document.getElementById("ximfmail.treedialog");\r
+ var start = new Object();\r
+ var end = new Object();\r
+ var numRanges = tree.view.selection.getRangeCount();\r
+ for (var t=0; t<numRanges; t++){\r
+ tree.view.selection.getRangeAt(t,start,end);\r
+ for (var v=start.value; v<=end.value; v++){\r
+ if (list!=="") {\r
+ list+=",";\r
+ }\r
+ list += tree.view.getCellText(v, tree.columns.getColumnAt(0));\r
+ }\r
+ }\r
+ return list;\r
+}\r
+function OnSelectTreeData(evt){\r
+ var elt = evt.currentTarget;\r
+ if(elt.view){\r
+ // on select\r
+ var cellIndex = 0;\r
+ var cellText = elt.view.getCellText(elt.currentIndex, elt.columns.getColumnAt(cellIndex));\r
+ }\r
+ var row = new Object();\r
+ var col = new Object();\r
+ var child = new Object();\r
+ elt.treeBoxObject.getCellAt(evt.clientX, evt.clientY, row, col, child);\r
+ var idMatch;\r
+ try {\r
+ idMatch = col.value.element.getAttribute('id');\r
+ } catch (error) {\r
+ idMatch = col.value;\r
+ }\r
+}\r
+function OnClickTreeData(evt){\r
+ var elt = evt.currentTarget;\r
+ var row = new Object();\r
+ var col = new Object();\r
+ var child = new Object();\r
+ elt.treeBoxObject.getCellAt(evt.clientX, evt.clientY, row, col, child);\r
+ var idMatch;\r
+ try {\r
+ idMatch = col.value.element.getAttribute('id');\r
+ } catch (error) {\r
+ idMatch = col.value;\r
+ }\r
+}\r
+/* for to scroll */\r
+function OnClickScrollTreeList(evt)\r
+{\r
+ try {\r
+ if (parseInt($("#ximfmailTreeDialogScroll").attr("maxpos"), 10) <=0) {\r
+ return;\r
+ }\r
+ var treeResult = document.getElementById("ximfmail.treedialog");\r
+ $("#iTreechildDialog").attr("hidevscroll","true");\r
+ var curpos = 0;\r
+ curpos = parseInt($("#ximfmailTreeDialogScroll").attr("curpos"), 10);\r
+ var pageLength = gMaxDataList;\r
+ try{\r
+ pageLength = treeResult.boxObject.getPageLength();\r
+ if (0 === pageLength) {\r
+ pageLength = gMaxDataList;\r
+ }\r
+ }catch(e){\r
+ pageLength = gMaxDataList;\r
+ }\r
+ if(gCurposList !== curpos || gMaxDataList !== pageLength || gMaxDataList !== gRDFList.getEntriesCount() || evt === 0) {\r
+ window.setCursor("wait");\r
+ gMaxDataList = pageLength;\r
+ var maxEntry = parseInt(gRDFList.getMaxEntry(), 10);\r
+ gRDFList.updateDisplay(curpos,gMaxDataList-1);\r
+ var maxpos = gMaxDataList;\r
+ if(maxEntry - gMaxDataList >= 0) {\r
+ maxpos = maxEntry - gMaxDataList;\r
+ } else {\r
+ maxpos = -1;\r
+ }\r
+ if (maxEntry < gMaxDataList) {\r
+ gMaxDataList = maxEntry;\r
+ }\r
+ $("#ximfmailTreeDialogScroll").attr("maxpos",maxpos);\r
+ gCurposList = curpos;\r
+ if(maxEntry === 0 || maxpos <= 0) {\r
+ $("#ximfmailTreeDialogScroll").attr("hidden","true");\r
+ gMaxDataList = maxEntry;\r
+ } else {\r
+ $("#ximfmailTreeDialogScroll").removeAttr("hidden");\r
+ }\r
+ if(treeResult.database !== null) {\r
+ treeResult.database.AddDataSource(gRDFList.getDataSource());\r
+ treeResult.builder.rebuild();\r
+ clearTimeout(gIDTimeoutList);\r
+ gIDTimeoutList = setTimeout(OnClickScrollTreeList,100,1);\r
+ }\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - OnClickScrollTreeList ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ window.setCursor("auto");\r
+}\r
+function OnScrollTreeList(event)\r
+{\r
+ window.setCursor("wait");\r
+ try {\r
+ var curpos = parseInt($("#ximfmailTreeDialogScroll").attr("curpos"), 10);\r
+ var addPos = 0;\r
+ if(event.detail === -3) {\r
+ addPos = -3;\r
+ } else if (event.detail === 3) {\r
+ addPos = 3;\r
+ }\r
+ curpos += addPos;\r
+ var maxpos = parseInt(gRDFList.getMaxEntry(), 10) - gMaxDataList;\r
+ if (curpos<0) {\r
+ curpos = 0;\r
+ }\r
+ if (curpos>maxpos) {\r
+ curpos = maxpos;\r
+ }\r
+ $("#ximfmailTreeDialogScroll").attr("curpos", curpos);\r
+ OnClickScrollTreeList(0);\r
+ }\r
+ catch(e)\r
+ {\r
+ gConsole.logStringMessage("[ximfmail - OnScrollTreeList ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ window.setCursor("auto");\r
+}\r
+function OnKeyPressScrollTreeList(event)\r
+{\r
+ window.setCursor("wait");\r
+ gConsole.logStringMessage("[ximfmail - OnKeyPressScrollTreeList ] enter");\r
+ try\r
+ {\r
+ var curpos = parseInt($("#ximfmailTreeDialogScroll").attr("curpos"), 10);\r
+ var addPos = 0;\r
+ var maxEntry = parseInt(gRDFList.getMaxEntry(), 10);\r
+ var maxpos = maxEntry - gMaxDataList;\r
+ var textToFind = "";\r
+ switch(event.keyCode)\r
+ {\r
+ case 33:\r
+ // page up\r
+ addPos = 1-gMaxDataList;\r
+ break;\r
+ case 34:\r
+ // page down\r
+ addPos = gMaxDataList-1;\r
+ break;\r
+ case 35:\r
+ // end\r
+ addPos = 0;\r
+ curpos = maxpos;\r
+ break;\r
+ case 36:\r
+ // beggin\r
+ addPos = 0;\r
+ curpos = 0;\r
+ break;\r
+ case 38:\r
+ // up\r
+ addPos = -1;\r
+ break;\r
+ case 40:\r
+ // down\r
+ addPos = 1;\r
+ break;\r
+ default:\r
+ if(event.charCode === 0)\r
+ {\r
+ window.setCursor("auto");\r
+ return;\r
+ }\r
+ else {\r
+ textToFind = String.fromCharCode(event.charCode);\r
+ }\r
+ }\r
+ if("" === textToFind)\r
+ {\r
+ curpos += addPos;\r
+ if(curpos<0) {\r
+ curpos = 0;\r
+ }\r
+ if(curpos>maxpos) {\r
+ curpos = maxpos;\r
+ }\r
+ $("#ximfmailTreeDialogScroll").attr("curpos", curpos);\r
+ OnClickScrollTreeList(0);\r
+ }\r
+ else\r
+ {\r
+ clearTimeout(gIDTimeoutListSearch);\r
+ gSearchText += textToFind;\r
+ var curposAfter = gRDFList.updateDisplayByText(gSearchText,gMaxDataList,curpos);\r
+ if(curposAfter === -1)\r
+ {\r
+ gSearchText = "";\r
+ window.setCursor("auto");\r
+ return;\r
+ }\r
+ else\r
+ {\r
+ var maxpos = gMaxDataList;\r
+ if(maxEntry - gMaxDataList >= 0){\r
+ maxpos = maxEntry - gMaxDataList;\r
+ } else {\r
+ maxpos = -1;\r
+ }\r
+\r
+ if(maxEntry < gMaxDataList) {\r
+ gMaxDataList = maxEntry;\r
+ }\r
+ $("#ximfmailTreeDialogScroll").attr("maxpos",maxpos);\r
+ $("#ximfmailTreeDialogScroll").attr("curpos", curposAfter);\r
+ OnClickScrollTreeList(0);\r
+\r
+ gIDTimeoutListSearch = setTimeout(resetSearchText,2000);\r
+ }\r
+ }\r
+ }\r
+ catch(e)\r
+ {\r
+ gConsole.logStringMessage("[ximfmail - OnKeyPressScrollTreeList ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ window.setCursor("auto");\r
+}\r
+function resetSearchText()\r
+{\r
+ gSearchText = "";\r
+ gIDTimeoutListSearch = null;\r
+}\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!-- ***** BEGIN LICENSE BLOCK *****\r
+ - Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ - ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ -\r
+ -\r
+ - Redistribution and use, in source and binary forms, with or without modification,\r
+ - are permitted provided that the following conditons are met :\r
+ -\r
+ - 1. Redistributions of source code must retain the above copyright notice,\r
+ - 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ - in the redistribution of the source code.\r
+ - 3. Neither the names of the copyright holders nor the names of any contributors\r
+ - may be used to endorse or promote products derived from this software without specific\r
+ - prior written permission from EADS Defence and Security.\r
+ -\r
+ - Alternatively, the contents of this file may be used under the terms of\r
+ - either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ - or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ - in which case the provisions of the GPL or the LGPL are applicable instead\r
+ - of those above. If you wish to allow use of your version of this file only\r
+ - under the terms of either the GPL or the LGPL, and not to allow others to\r
+ - use your version of this file under the terms of the MPL, indicate your\r
+ - decision by deleting the provisions above and replace them with the notice\r
+ - and other provisions required by the GPL or the LGPL. If you do not delete\r
+ - the provisions above, a recipient may use your version of this file under\r
+ - the terms of any one of the MPL, the GPL or the LGPL.\r
+ -\r
+ - REMINDER :\r
+ - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ - IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ -\r
+ - EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ - ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ - \r
+ - Contributor(s):\r
+ - Copyright(c) Airbus Defence and Space 2014 - All rights reserved \r
+ - ***** END LICENSE BLOCK ***** -->\r
+\r
+<!DOCTYPE overlay SYSTEM "chrome://ximfmail/locale/ximfmail.dtd">\r
+<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>\r
+\r
+<!-- onload="window.sizeToContent();" -->\r
+<dialog id="treedialog" title=""\r
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"\r
+ buttons="accept,cancel"\r
+ buttonlabelcancel="&treedialog.buttonlabelcancel;"\r
+ buttonlabelaccept="&treedialog.buttonlabelaccept;"\r
+ ondialogaccept="return doOK();"\r
+ ondialogcancel="return doCancel();">\r
+ <script type="application/javascript" src="chrome://ximfmail/content/jquery.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/ximfmail.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/constant-ximfmail.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/dialogTree-ximfmail.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/dialogTree-rdf-ximfmail.js" />\r
+\r
+ <hbox id="ximfmailTreeDialogBox" flex="1" style="height:400px; width:800px;">\r
+ <hbox id="ximfmailTreeDialogDisplaybox" flex="1">\r
+ <tree id="ximfmail.treedialog" flex="1" enableColumnDrag="true"\r
+ flags="dont-build-content">\r
+ <treecols>\r
+ <treecol id="iCol0" label="&ximfmail.dialogtree.title.col0;" primary="true" persist="hidden ordinal width sortDirection" flex="1"/>\r
+ <splitter class="tree-splitter"/>\r
+ <treecol id="iCol1" label="&ximfmail.dialogtree.title.col1;" persist="hidden ordinal width sortDirection" flex="2" />\r
+ <splitter class="tree-splitter"/>\r
+ </treecols>\r
+ <treechildren flex="1"\r
+ id="iTreechildDialog"\r
+ datasources="rdf:null"\r
+ ref="http://www.ximfmail.com/dialogtree/datas">\r
+ <template>\r
+ <treeitem uri="?uri">\r
+ <treerow>\r
+ <treecell label="rdf:http://www.ximfmail.com/RDF#column0"/>\r
+ <treecell label="rdf:http://www.ximfmail.com/RDF#column1"/>\r
+ </treerow>\r
+ </treeitem>\r
+ </template>\r
+ </treechildren>\r
+ </tree>\r
+ <scrollbar id="ximfmailTreeDialogScroll" curpos="0" maxpos="50" orient="vertical" />\r
+ </hbox>\r
+ <vbox id="ximfmailTreeDialogButtonbox">\r
+ <spacer flex="1"/>\r
+ <button id="ximfmail_dTreeAdd" image="chrome://ximfmail/content/resource/arrow_right.png" tooltiptext="add selection"/>\r
+ <button id="ximfmail_dTreeDel" image="chrome://ximfmail/content/resource/arrow_left.png" tooltiptext="delete item" />\r
+ <button id="ximfmail_dTreeRaz" image="chrome://ximfmail/content/resource/clear_right_list.png" tooltiptext="delete complete selection"/>\r
+ <spacer flex="1"/>\r
+ </vbox>\r
+ <listbox id="ximfmail_selection" style="width:200px;">\r
+ </listbox>\r
+ </hbox>\r
+</dialog>
\ No newline at end of file
--- /dev/null
+/* ***** BEGIN LICENSE BLOCK *****\r
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ *\r
+ *\r
+ * Redistribution and use, in source and binary forms, with or without modification,\r
+ * are permitted provided that the following conditons are met :\r
+ *\r
+ * 1. Redistributions of source code must retain the above copyright notice,\r
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ * in the redistribution of the source code.\r
+ * 3. Neither the names of the copyright holders nor the names of any contributors\r
+ * may be used to endorse or promote products derived from this software without specific\r
+ * prior written permission from EADS Defence and Security.\r
+ *\r
+ * Alternatively, the contents of this file may be used under the terms of\r
+ * either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ * in which case the provisions of the GPL or the LGPL are applicable instead\r
+ * of those above. If you wish to allow use of your version of this file only\r
+ * under the terms of either the GPL or the LGPL, and not to allow others to\r
+ * use your version of this file under the terms of the MPL, indicate your\r
+ * decision by deleting the provisions above and replace them with the notice\r
+ * and other provisions required by the GPL or the LGPL. If you do not delete\r
+ * the provisions above, a recipient may use your version of this file under\r
+ * the terms of any one of the MPL, the GPL or the LGPL.\r
+ *\r
+ * REMINDER :\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ * ***** END LICENSE BLOCK ***** */\r
+var gJSLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].createInstance(Components.interfaces.mozIJSSubScriptLoader);\r
+var gConsole = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);\r
+gJSLoader.loadSubScript("chrome://ximfmail/content/jquery.js");\r
+gJSLoader.loadSubScript("chrome://ximfmail/content/ximfmail.js");\r
+var gBoxOpener = null;\r
+var gXimfMaxItems = null;\r
+var gXimfMinItems = null;\r
+var gXimfSeparator = null;\r
+var gCurrentText = null;\r
+var gEditorElt = null;\r
+var gTitleDlg = null;\r
+var gDlgEditorXimf_maxItem_alert = "";\r
+/*\r
+ window.arguments = [];\r
+ args[0] id of textbox\r
+ args[1] text\r
+ args[2] separator value\r
+ args[3] max items to write\r
+ args[4] min items to write\r
+*/\r
+$(document).ready(function(){\r
+ var gArgs = window.arguments;\r
+ if(gArgs[0].length < 5){\r
+ ximfAlert("error nbargs = "+gArgs[0].length);\r
+ return;\r
+ }\r
+ // load background datas\r
+ gBoxOpener = gArgs[0][0];\r
+ gCurrentText = gArgs[0][1];\r
+ gXimfSeparator = gArgs[0][2];\r
+ gXimfMaxItems = gArgs[0][3];\r
+ gXimfMinItems = gArgs[0][4];\r
+ gTitleDlg = gArgs[0][5];\r
+ gEditorElt = document.getElementById("textbox-editor");\r
+ gConsole.logStringMessage("[ximfmail - dialogEditor ] \n id of textbox :" + gArgs[0][0] + "\n separator value: " + gArgs[0][2] + "\n max items to write: "+ gArgs[0][3] + "\n min items to write: " +gArgs[0][4]);\r
+ if(parseInt(gXimfMaxItems, 10) > 1){\r
+ gDlgEditorXimf_maxItem_alert = gXimfMaxItems + " "+ getIlkProperties("ximfmail.dialog.editor.warning.nbrows");\r
+ $("#textbox-editor").attr("style","width:400px;height:100px");\r
+ }else{\r
+ gDlgEditorXimf_maxItem_alert = gXimfMaxItems + "1 "+ getIlkProperties("ximfmail.dialog.editor.warning.nbrows.one");\r
+ $("#textbox-editor").attr("maxrows","1");\r
+ }\r
+ RefreshEditor();\r
+ // event observer\r
+ $("#textbox-editor").keypress(onCheck);\r
+});\r
+/*\r
+ *\r
+ */\r
+function doOK()\r
+{\r
+ if (!gEditorElt) {\r
+ return false;\r
+ }\r
+ if(gXimfMinItems){\r
+ if( getWritedRowsCount() < parseInt(gXimfMinItems, 10)){\r
+ ximfAlert("not enough item");\r
+ }\r
+ }\r
+ var newvalue = "";\r
+ if(!gXimfSeparator){\r
+ newvalue = gEditorElt.value;\r
+ }else{\r
+ var reg=new RegExp("\n", "g");\r
+ var arrayValue = gEditorElt.value.split(reg);\r
+ var nbElements = arrayValue.length;\r
+ if(parseInt(gXimfMaxItems, 10)<arrayValue.length){\r
+ nbElements = parseInt(gXimfMaxItems, 10);\r
+ ximfAlert(gDlgEditorXimf_maxItem_alert);\r
+ }\r
+ for(var i=0 ; i<nbElements ; ++i){\r
+ if(arrayValue[i] !== ""){\r
+ if (i === 0) {\r
+ newvalue = arrayValue[i];\r
+ } else {\r
+ newvalue += gXimfSeparator + arrayValue[i];\r
+ }\r
+ }\r
+ }\r
+ }\r
+ //remove last separator\r
+ if(newvalue.lastIndexOf(gXimfSeparator)+1 === newvalue.length){\r
+ newvalue = newvalue.substring(0,newvalue.lastIndexOf(gXimfSeparator));\r
+ }\r
+ window.opener.document.getElementById(gBoxOpener).value = newvalue;\r
+ window.opener.document.getElementById(gBoxOpener).setAttribute("ximfvalue", newvalue);\r
+ window.opener.document.getElementById(gBoxOpener).setAttribute("tooltiptext", newvalue);\r
+ return true;\r
+}\r
+function doCancel()\r
+{\r
+ return true;\r
+}\r
+/*\r
+ *\r
+ */\r
+function onCheck(aEvent){\r
+ if (!gEditorElt) {\r
+ return false;\r
+ }\r
+ var key = aEvent.which;\r
+ switch(key){\r
+ case 13: // key==="\n"\r
+ if ( getWritedRowsCount() >= parseInt(gXimfMaxItems, 10)) {\r
+ ximfAlert(gDlgEditorXimf_maxItem_alert);\r
+ var reg = new RegExp("\n", "g");\r
+ var artxt = gEditorElt.value.split(reg);\r
+ var newText = "";\r
+ for(var i=0 ; i < gXimfMaxItems; ++i){\r
+ if(i < artxt.length){\r
+ if(gXimfMaxItems-1 === i){\r
+ newText += artxt[i];\r
+ }else{\r
+ newText += artxt[i] + "\n";\r
+ }\r
+ }\r
+ }\r
+ gEditorElt.value = newText;\r
+ }\r
+ case 8: // backspace\r
+ case 0: // delete\r
+ break;\r
+ default:\r
+ if( getWritedRowsCount() > parseInt(gXimfMaxItems, 10)){\r
+ ximfAlert(gDlgEditorXimf_maxItem_alert);\r
+ return false;\r
+ }\r
+ }\r
+ return true;\r
+}\r
+function getWritedRowsCount(){\r
+ var nblines = 0;\r
+ var reg=new RegExp("\n", "g");\r
+ var nbvalue = gEditorElt.value.split(reg);\r
+ return nbvalue.length;\r
+}\r
+function RefreshEditor(){\r
+ if(!gEditorElt) {\r
+ return;\r
+ }\r
+ // title box\r
+ $("#editorDialogHeader").attr("title",gTitleDlg);\r
+ $("#editorDialogHeader").attr("description",gDlgEditorXimf_maxItem_alert);\r
+ // text value\r
+ if(!gXimfSeparator){\r
+ gEditorElt.setAttribute("multiline","false");\r
+ gEditorElt.value = gCurrentText;\r
+ }else{\r
+ try{\r
+ gEditorElt.setAttribute("multiline","true");\r
+ if(gCurrentText){\r
+ var reg=new RegExp(gXimfSeparator, "g");\r
+ var multitxt = gCurrentText.replace(reg , "\n");\r
+ gEditorElt.setAttribute("value",multitxt);\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - RefreshEditor ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+ e.lineNumber);\r
+ }\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!-- ***** BEGIN LICENSE BLOCK *****\r
+ - Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ - ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ - \r
+ - Redistribution and use, in source and binary forms, with or without modification, \r
+ - are permitted provided that the following conditons are met :\r
+ -\r
+ - 1. Redistributions of source code must retain the above copyright notice, \r
+ - 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached \r
+ - in the redistribution of the source code.\r
+ - 3. Neither the names of the copyright holders nor the names of any contributors \r
+ - may be used to endorse or promote products derived from this software without specific \r
+ - prior written permission from EADS Defence and Security.\r
+ - \r
+ - Alternatively, the contents of this file may be used under the terms of\r
+ - either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ - or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ - in which case the provisions of the GPL or the LGPL are applicable instead\r
+ - of those above. If you wish to allow use of your version of this file only\r
+ - under the terms of either the GPL or the LGPL, and not to allow others to\r
+ - use your version of this file under the terms of the MPL, indicate your\r
+ - decision by deleting the provisions above and replace them with the notice\r
+ - and other provisions required by the GPL or the LGPL. If you do not delete\r
+ - the provisions above, a recipient may use your version of this file under\r
+ - the terms of any one of the MPL, the GPL or the LGPL.\r
+ - \r
+ - REMINDER :\r
+ - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND \r
+ - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \r
+ - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \r
+ - IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \r
+ - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \r
+ - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \r
+ - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \r
+ - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING \r
+ - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ - \r
+ - EADS Defence and Security - 1 Boulevard Jean Moulin - \r
+ - ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ - \r
+ - Contributor(s):\r
+ - Copyright(c) Airbus Defence and Space 2014 - All rights reserved\r
+ - ***** END LICENSE BLOCK ***** -->\r
+\r
+<!DOCTYPE overlay SYSTEM "chrome://ximfmail/locale/ximfmail.dtd">\r
+<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>\r
+\r
+<!-- onload="window.sizeToContent();" -->\r
+<dialog id="treedialog" title="" \r
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" \r
+ buttons="accept,cancel" \r
+ buttonlabelcancel="&treedialog.buttonlabelcancel;"\r
+ buttonlabelaccept="&treedialog.buttonlabelaccept;"\r
+ ondialogaccept="return doOK();"\r
+ ondialogcancel="return doCancel();">\r
+ <script type="application/javascript" src="chrome://ximfmail/content/ximfmail.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/editor/dialogEditor-ximfmail.js" /> \r
+ <dialogheader id="editorDialogHeader" />\r
+ <textbox id="textbox-editor" maxrows="30" style="width:400px;" flex="1"/>\r
+</dialog>
\ No newline at end of file
--- /dev/null
+/*\r
+ * jQuery 1.2.6 - New Wave Javascript\r
+ *\r
+ * Copyright (c) 2008 John Resig (jquery.com)\r
+ * Dual licensed under the MIT (MIT-LICENSE.txt)\r
+ * and GPL (GPL-LICENSE.txt) licenses.\r
+ *\r
+ * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $\r
+ * $Rev: 5685 $\r
+ */\r
+(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else\r
+return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else\r
+return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else\r
+selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)return value;values.push(value);}}return values;}else\r
+return(this[0].value||"").replace(/\r/g,"");}return undefined;}if(value.constructor==Number)value+='';return this.each(function(){if(this.nodeType!=1)return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else\r
+this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else\r
+return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else\r
+jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i<length;i++)if((options=arguments[i])!=null)for(var name in options){var src=target[name],copy=options[name];if(target===copy)continue;if(deep&©&&typeof copy=="object"&&!copy.nodeType)target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)target[name]=copy;}return target;};var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)script.text=data;else\r
+script.appendChild(document.createTextNode(data));head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!==undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object)if(callback.apply(object[name],args)===false)break;}else\r
+for(;i<length;)if(callback.apply(object[i++],args)===false)break;}else{if(length==undefined){for(name in object)if(callback.call(object[name],name,object[name])===false)break;}else\r
+for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))value=value.call(elem,i);return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else\r
+jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i<stack.length;i++)if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++)if(swap[i]!=null)stack[i].style.display=swap[i];}if(name=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)return;if(elem.constructor==Number)elem+='';if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else\r
+ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&¬xml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&¬xml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&¬xml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else\r
+while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)if(array[i]===elem)return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++])if(elem.nodeType!=8)first[pos++]=elem;}else\r
+while(elem=second[i++])first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)if(!inv!=!callback(elems[i],i))ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)ret[ret.length]=value;}return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)this.parentNode.removeChild(this);}},empty:function(){jQuery(">*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==0){if(node.nodeIndex==last)add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else\r
+for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i<args.length)jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)fn.call(document,jQuery);else\r
+jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();if(jQuery.browser.opera)document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}if(numStyles===undefined)numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}jQuery.event.add(window,"load",jQuery.ready);}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!='string')return this._load(url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username)xhr.open(type,s.url,s.async,s.username,s.password);else\r
+xhr.open(type,s.url,s.async);try{if(s.data)xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xhr)&&"error"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else\r
+jQuery.handleError(s,xhr,status);complete();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xhr,s]);}function complete(){if(s.complete)s.complete(xhr,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(filter)data=filter(data,type);if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else\r
+for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else\r
+s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return opt.complete.call(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else\r
+e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done)this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})();
\ No newline at end of file
--- /dev/null
+/* ***** BEGIN LICENSE BLOCK *****
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.
+ *
+ *
+ * Redistribution and use, in source and binary forms, with or without modification,
+ * are permitted provided that the following conditons are met :
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached
+ * in the redistribution of the source code.
+ * 3. Neither the names of the copyright holders nor the names of any contributors
+ * may be used to endorse or promote products derived from this software without specific
+ * prior written permission from EADS Defence and Security.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either of the GNU General Public License Version 2 or later (the "GPL"),
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * REMINDER :
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * EADS Defence and Security - 1 Boulevard Jean Moulin -
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)
+ * ***** END LICENSE BLOCK ***** */
+var gConsole = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);
+/**
+Get message source
+@param {nsIMsgDBHdr} header
+@param {function} callbackFunction Function to call when data are received: callbackFunction(header, receivedData, callbackParam)
+@param callbackParam Parameter of callbackFunction
+@return {string} Message source or <b>false</b> if an error occurs
+*/
+function XimfmailGetMessage(mailUri, callbackFunction, callbackParam){
+ if (!mailUri) {
+ return;
+ }
+ var streamListener = {
+ QueryInterface: function(aIID) {
+ if (aIID.equals(Components.interfaces.nsISupports) || aIID.equals(Components.interfaces.nsIStreamListener)) {
+ return this;
+ }
+ },
+ data: "",
+ isDataComplete: false,
+ onStartRequest: function(request, context) {},
+ onDataAvailable: function(request, context, inputStream, offset, available) {
+ if(!this.isDataComplete ){
+ var stream = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance(Components.interfaces.nsIScriptableInputStream);
+ stream.init(inputStream);
+ this.data += stream.read(available);
+ stream.close();
+ stream = null;
+ // parse headers only
+ // * CRLF DOS : "\r\n"
+ var idxEnd = this.data.indexOf("\r\n\r\n",0);
+ if (idxEnd === -1) {
+ // * CRLF UNIX : "\n"
+ idxEnd = this.data.indexOf("\n\n",0);
+ }
+ if (idxEnd === -1) {
+ //CRLF OS : "\r"
+ idxEnd = this.data.indexOf("\r\r",0);
+ }
+ if (idxEnd !== -1) {
+ this.isDataComplete = true;
+ }
+ gConsole.logStringMessage("[XimfmailGetMessage - streamListener.onDataAvailable ]isDataComplete=true ");
+ }
+ gConsole.logStringMessage("[XimfmailGetMessage - streamListener.onDataAvailable ]");
+ },
+ onStopRequest: function(request, context, status) {
+ if (Components.isSuccessCode(status)) {
+ gConsole.logStringMessage("[XimfmailGetMessage - streamListener.isDataComplete ] all mime headers have been parsed - status = " + status );
+ callbackFunction( this.data, mailUri, callbackParam);
+ } else {
+ if(this.isDataComplete === true){
+ // all mime headers have been parsed
+ gConsole.logStringMessage("[XimfmailGetMessage - streamListener.isDataComplete ] all mime headers have been parsed !");
+ callbackFunction( this.data, mailUri, callbackParam);
+ }else{
+ gConsole.logStringMessage("[XimfmailGetMessage - streamListener.onStopRequest ] Error: "+status);
+ }
+ }
+ }
+ };
+ gConsole.logStringMessage("[ximfmail - XimfmailGetMessage ]");
+ if(Services.prefs.getBoolPref("mailnews.headers.showXimfmail")){
+ // parse message to get XIMF headers
+ var cmessenger = Components.classes["@mozilla.org/messenger;1"].createInstance(Components.interfaces.nsIMessenger);
+ var msgSvc = cmessenger.messageServiceFromURI(mailUri);
+ try {
+ msgSvc.streamMessage(mailUri, streamListener, null, null, false, null);
+ } catch (ex) {
+ return false;
+ }
+ }else{
+ DeleteXimfHeaders();
+ gUriMsgLoading.remove(mailUri);
+ }
+}
+/*
+ * Set Ximf headers of message to array : {[headerName][headerValue],[headerName][headerValue],...}
+ * headerName will be low-case formated
+ * use "for (headerName in gSecureHeadersArray) {}" to parse array
+ */
+function XimfmailParseMessage(msgSrc){
+ // separator : split end lines
+ var separator = new RegExp("\\r\\n|\\r|\\n", "i");
+ var tab = msgSrc.split(separator);
+ var currentXimfHdrArray = {};
+ // filter on IMF headers - append data to array
+ var reg_folding = new RegExp("( )","g");
+ var reg_folding2 = new RegExp("(\t)","g");
+ for(var idxTab=0; idxTab<tab.length; ++idxTab){
+ try{
+ var header_line = tab[idxTab];
+ // search for long header fields (folding) - RFC 2822
+ if(header_line[0] !== " "){
+ while( idxTab < tab.length ){
+ try{
+ var next_line = tab[idxTab+1];
+ if(next_line){
+ if(next_line[0] === " " || next_line[0] === "\t"){
+ header_line += next_line;
+ header_line = header_line.replace(reg_folding," ");
+ header_line = header_line.replace(reg_folding2,"");
+ ++idxTab;
+ }else{ break; }
+ }else{ break; }
+ }catch(e){}
+ }
+ }
+ // decode MIME Header and add header to arrray
+ if(header_line.indexOf(":") !== -1){
+ var hdrName = header_line.substring(0,header_line.indexOf(": ",0));
+ var hdrValue = header_line.substring(header_line.indexOf(": ",header_line)+2);
+ if (hdrName !== "") {
+ currentXimfHdrArray[hdrName/*.toLowerCase()*/]= DecodeMimeXimfheader(hdrValue);
+ }
+ }
+ }catch(e){}
+ }
+ return currentXimfHdrArray;
+}
+/*
+ * Convert mime header value to string value
+ */
+function DecodeMimeXimfheader(sHeaderValue){
+ var newHdrValue = null;
+ var charsetDefault = "LATIN_CHARSET";
+ try{
+ // convert MIME format (encoded-word ASCII) to String
+ if (gLastMailCharset) {
+ charsetDefault = gLastMailCharset;
+ }
+ var mimeXimfConverter = Components.classes["@mozilla.org/messenger/mimeconverter;1"].getService(Components.interfaces.nsIMimeConverter);
+ newHdrValue = mimeXimfConverter.decodeMimeHeader(sHeaderValue,charsetDefault,false,true);
+ }catch(ex){
+ newHdrValue = sHeaderValue;
+ }
+ return newHdrValue;
+}
+/*
+ * Ximf headers of current message
+ */
+function XimfmailMesssage(){
+ this._mailUri = null;
+ this._instanceMsgXimf = null;
+ this._currentXimfHdrArray = {};
+ if(typeof XimfmailMesssage.initialized === "undefined"){
+ // set uri of message
+ XimfmailMesssage.prototype.set = function(uri){
+ try{
+ if (!uri) {
+ return;
+ }
+ if (this._mailUri === uri) {
+ return;
+ }
+ this._mailUri = uri;
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - XimfmailMesssage.set ] " + e +"\nline : " + e.lineNumber + " : "+ e + "\nfile : "+ Error().fileName);
+ }
+ return false;
+ };
+ XimfmailMesssage.prototype.init = function(uri,headerArray) {
+ try{
+ if (!uri) {
+ return;
+ }
+ if (this._mailUri === uri) {
+ return;
+ }
+ this._mailUri = uri;
+ this._instanceMsgXimf = null;
+ // be sure to have lower case header name
+ for (hdr in headerArray) {
+ this._currentXimfHdrArray[hdr] = headerArray[hdr];
+ }
+ var uriXimfInstance = this.getXimfmailInstanceURI();
+ if(uriXimfInstance !== undefined){
+ gConsole.logStringMessage("DBG [ximfmail - XimfmailMesssage.init ] mail instance : " + uriXimfInstance);
+ this._instanceMsgXimf = uriXimfInstance;
+ return true;
+ }else{
+ return false;
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - XimfmailMesssage.init ] " + e +"\nline : " + e.lineNumber + " : "+ e + "\nfile : "+ Error().fileName);
+ }
+ return false;
+ };
+ // check message with XimfmailCatalog
+ XimfmailMesssage.prototype.getXimfmailInstanceURI = function(){
+ var uriInstanceXimf = undefined;
+ try{
+ var sversion = this.getHeaderValue(ximfConst.XIMF_VERSION_HEADER);
+ var sname = this.getHeaderValue(ximfConst.XIMF_NAME_HEADER);
+ if(sname){
+ var arrayInstances = XimfCatalog.getInstance().getInstanceList();
+ for(idx in arrayInstances){
+ var instance = arrayInstances[idx];
+ if (instance.substring(instance.lastIndexOf("/")+1).toLowerCase() === sname.toLowerCase()) {
+ uriInstanceXimf = instance;
+ break;
+ }
+ }
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - XimfmailMesssage.hasXimfHeaders ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);
+ }
+
+ return uriInstanceXimf;
+ };
+ // get XIMF value from message
+ XimfmailMesssage.prototype.getHeaderValue = function(headerName){
+ var value = null;
+ try{
+ value = this._currentXimfHdrArray[headerName];
+ if(value === null){
+ // try to get header insensitive case
+ for(hdr in this._currentXimfHdrArray){
+ if(headerName.toLowerCase() === hdr.toLowerCase()){
+ value = this._currentXimfHdrArray[hdr];
+ break;
+ }
+ }
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - XimfmailMesssage.getValue ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);
+ value=null;
+ }
+ return value;
+ };
+ // get XIMF value from message
+ XimfmailMesssage.prototype.getCompleteXimfArray = function(){
+ return this._currentXimfHdrArray;
+ };
+ // set XIMF value to message
+ XimfmailMesssage.prototype.setXimfHeader = function(headerName,headerValue){
+ try{
+ this._currentXimfHdrArray[headerName] = headerValue;
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - XimfmailMesssage.setXimfHeader ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);
+ }
+ };
+ XimfmailMesssage.initialized = true;
+ }
+}
\ No newline at end of file
--- /dev/null
+/* ***** BEGIN LICENSE BLOCK *****
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.
+ *
+ *
+ * Redistribution and use, in source and binary forms, with or without modification,
+ * are permitted provided that the following conditons are met :
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached
+ * in the redistribution of the source code.
+ * 3. Neither the names of the copyright holders nor the names of any contributors
+ * may be used to endorse or promote products derived from this software without specific
+ * prior written permission from EADS Defence and Security.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either of the GNU General Public License Version 2 or later (the "GPL"),
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * REMINDER :
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * EADS Defence and Security - 1 Boulevard Jean Moulin -
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)
+ * ***** END LICENSE BLOCK ***** */
+var gConsole = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);
+gConsole.logStringMessage("messageWindow-ov-ximfmail.js file loaded");
+window.addEventListener('messagepane-loaded', InitXimfailMsgWindow, true);
+/*
+ * gUriMsgLoading check for messages which are currently loading *
+ */
+var gUriMsgLoading = {
+ // array of uri loading
+ uriList : [],
+ add : function(uri){
+ if (uri) {
+ this.uriList.push(uri);
+ }
+ gConsole.logStringMessage("[ximfmail - gUriMsgLoading.add ] uri : " + uri);
+ },
+ remove : function(uri){
+ if (!uri) {
+ return;
+ }
+ var idx = 0;
+ try{
+ for(idx ; idx<this.uriList.length ; ++idx){
+ if(this.uriList[idx] === uri){
+ this.uriList.splice(idx,1);
+ gConsole.logStringMessage("[ximfmail - gUriMsgLoading.remove ] uri : " + uri);
+ return;
+ }
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - gUriMsgLoading.remove ] error for uri " + uri +"\n error: "+ e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+ },
+ isLoading : function(uri){
+ if (!uri) {
+ return;
+ }
+ try{
+ for(var idx=0 ; idx<this.uriList.length ; ++idx){
+ if(this.uriList[idx] === uri){
+ gConsole.logStringMessage("[ximfmail - gUriMsgLoading.isloading : true ] uri : " + uri);
+ return true;
+ }
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - gUriMsgLoading.isloading ] error for uri " + uri +"\n error: "+ e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+ gConsole.logStringMessage("[ximfmail - gUriMsgLoading.isloading : false ] uri : " + uri);
+ return false;
+ }
+};
+/*
+ * Create a message listener
+ */
+function InitXimfailMsgWindow(){
+ //
+ gMessageListeners.push({
+ onStartHeaders: function (){
+ // box for ximf headers
+ $("#ximfmailMailPanel").attr("collapsed","true");
+ // box for ximf pictures
+ $("#ximfHeadBox").attr("collapsed","true");
+ },
+ onEndHeaders: function(){
+ var uriMsg = null;
+ if (gMessageDisplay.isDummy){
+ // displayed message from disk
+ uriMsg = gMessageDisplay.displayedUri;
+ gConsole.logStringMessage("[ximfmail - InitXimfailMsgWindow.onEndHeaders ]\ndisplayed message from disk - url = "+uriMsg);
+ } else {
+ // get uri of selected message
+ var msgDBHdr = gFolderDisplay.selectedMessage;
+ if (msgDBHdr) {
+ uriMsg = msgDBHdr.folder.getUriForMsg(msgDBHdr);
+ }
+ }
+ if(!gUriMsgLoading.isLoading(uriMsg)){
+ gUriMsgLoading.add(uriMsg);
+ XimfmailGetMessage(uriMsg, function(msgSrc, uriSrc) {
+ // Parse Ximf headers in message and display them if necessary
+ var currentXimfHdrArray = XimfmailParseMessage(msgSrc);
+ var folderPaneElt = document.getElementById('folderPaneBox');
+ if (folderPaneElt) {
+ var ximfMsg = new XimfmailMesssage();
+ if (ximfMsg.init(uriSrc, currentXimfHdrArray)) {
+ if (folderPaneElt.hasAttribute("collapsed")) {
+ // message opened in new tab
+ $("#ximfmail-custom-panel").attr("collapsed","true");
+ ShowXimfmailPanel(ximfMsg);
+ ShowExpandedHeaders(ximfMsg);
+ $("#ximfmailMailPanel").removeAttr("collapsed");
+ } else {
+ // preview pane, no headers to display
+ ShowExpandedHeaders(ximfMsg);
+ $("#ximfmail-custom-panel").removeAttr("collapsed");
+ }
+ gUriMsgLoading.remove(uriSrc);
+ }
+ } else {
+ // message opened in new window
+ OpenWindowXimfMesssage(uriSrc, currentXimfHdrArray);
+ }
+ });
+ }
+ },
+ onEndAttachments: function (){
+ }
+ });
+}
+/**
+ * Add Ximf headers to new window message
+ * @param uriSrc
+ * @param ximfHdrArray
+ */
+function OpenWindowXimfMesssage(uriSrc, ximfHdrArray) {
+ try {
+ // ximfCatalog must be loaded (new window here...)
+ var ximfMsg = new XimfmailMesssage();
+ if(ximfMsg.init(uriSrc, ximfHdrArray)){
+ ShowXimfmailPanel(ximfMsg);
+ ShowExpandedHeaders(ximfMsg);
+ gUriMsgLoading.remove(uriSrc);
+ $("#ximfmailMailPanel").removeAttr("collapsed");
+ }
+ }catch(e){
+ gConsole.logStringMessage("[OpenWindowXimfMesssage] Error: " + e);
+ }
+}
+/*
+ * Remove all XIMF functions if selected account is not XIMFMAIL tagged
+ */
+function DeleteXimfHeaders(){
+ try{
+ // hide ximf expanded headers
+ $("#ximfCategoryClassificationLabelImg").removeAttr("src");
+ $("#ximfSecurityClassificationLabelImg").removeAttr("src");
+ if($("#signedHdrIcon").attr("signed") === "ximfalert"){
+ $("#signedHdrIcon").attr("signed","");
+ }
+ try{
+ $(".ximfImgCategory").remove();
+ }catch(e){}
+ }catch(e){}
+}
+/*
+ * Dom document manipulations
+ */
+function ToogleHiddenPanel(){
+ if($("#ximfMailTable").attr("hidden") === "true"){
+ $("#ximfMailTable").attr("hidden","false");
+ $("#ximfmailComposeMessageMaximize").attr("hidden","true");
+ $("#ximfmailComposeMessageMinimize").attr("hidden","false");
+ }else{
+ $("#ximfMailTable").attr("hidden","true");
+ $("#ximfmailComposeMessageMaximize").attr("hidden","false");
+ $("#ximfmailComposeMessageMinimize").attr("hidden","true");
+ }
+}
+//
+function ConvertMimeDatasToLabelValues() {
+ try {
+ var valueItem = "";
+ var valueBox = "";
+ var txtBoxList = $("textbox[class='XimfTextboxDisplay']");
+ for (var x = 0; x<txtBoxList.length; ++x) {
+ valueBox = txtBoxList[x].getAttribute("value");
+ if ( valueBox !== "") {
+ // menuitem case
+ var items = $("panel[id='"+ txtBoxList[x].getAttribute("refpanel") +"'] menuitem");
+ if (items.length > 0) {
+ for (var idxItm = 0; idxItm < items.length; ++idxItm) {
+ valueItem = items[idxItm].getAttribute("ximfvalue");
+ if (valueBox.toLowerCase() === valueItem.toLowerCase()) {
+ txtBoxList[x].setAttribute("value", items[idxItm].getAttribute("label"));
+ }
+ }
+ }
+ // button case
+ var buttons = $("panel[id='"+ txtBoxList[x].getAttribute("refpanel") +"'] button");
+ if (buttons.length > 0) {
+ for (var idxBtn = 0; idxBtn < buttons.length; ++idxBtn) {
+ valueItem = buttons[idxBtn].getAttribute("ximfvalue");
+ if (valueBox.toLowerCase() === valueItem.toLowerCase()) {
+ txtBoxList[x].setAttribute("value", buttons[idxBtn].getAttribute("label"));
+ }
+ }
+ }
+ // chekbox case
+ var checkboxes = $("panel[id='"+ txtBoxList[x].getAttribute("refpanel") +"'] checkbox");
+ if (checkboxes.length > 0 ){
+ for (var idxChk = 0; idxChk < checkboxes.length; ++idxChk) {
+ valueItem = checkboxes[idxChk].getAttribute("ximfvalue");
+ if (valueBox.toLowerCase() === valueItem.toLowerCase()) {
+ txtBoxList[x].setAttribute("value", checkboxes[idxChk].getAttribute("label"));
+ }
+ }
+ }
+ }
+ }
+ } catch(e) {}
+};
+/*
+ * Set label and ximfvalue of ximf linked element
+ *
+ * @ximfMesssage : ximfmailMesssage object
+ */
+function ComputeXimfElementLinked(ximfelement,idPanel,ximfMessage){
+ try{
+ var xHeader = $("label[id='"+$(ximfelement).attr("refheader")+"']").attr("ximfheader");
+ var ximfValue = ximfMessage.getHeaderValue(xHeader);
+ if(ximfValue){
+ // search for value and comlete display box
+ $(ximfelement).attr("refpanel",idPanel);
+ var display_box = $("textbox[refheader='" + xHeader + "']");
+ // default values
+ $(ximfelement).attr("value",ximfValue);
+ $(ximfelement).attr("ximfvalue",ximfValue);
+ $(ximfelement).attr("tooltiptext",ximfValue);
+ // menuitem value (ilk, linkpopup...)
+ var menu_item = $("panel[id='"+$(ximfelement).attr("refpanel")+"'] menuitem");
+ for(var idx_menu_item = 0 ; idx_menu_item < menu_item.length ; ++idx_menu_item){
+ var current_ximfvalue = menu_item[idx_menu_item].getAttribute("ximfvalue");
+ if(current_ximfvalue.toLowerCase() === ximfValue.toLowerCase()){
+ ximfelement.setAttribute("value",menu_item[idx_menu_item].getAttribute("label"));
+ $(ximfelement).attr("ximfvalue",ximfValue);
+ $(ximfelement).attr("tooltiptext",menu_item[idx_menu_item].getAttribute("label"));
+ //linkpopup manager
+ var linkpopup = menu_item[idx_menu_item].getAttribute("linkpopupbox");
+ if(linkpopup){
+ var targetpopup = $("panel[id='"+linkpopup+"']");
+ $("textbox[id='" + targetpopup[0].getAttribute("ximfreftextbox")+"']").attr("refpanel",linkpopup);
+ ComputeXimfElementLinked($("textbox[id='" + targetpopup[0].getAttribute("ximfreftextbox")+"']"),targetpopup[0].id,ximfMessage);
+ }
+ }
+ }
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - ComputeXimfElementLinked ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+}
+// load ximf headers in DOM documents
+function ShowXimfmailPanel(ximfmailMesssage) {
+ try {
+ var defaultXimfName = ximfConst.DEFAULT_XIMF_NAME;
+ var ximfName = XimfCatalog.getInstance().getNameInstance(ximfmailMesssage._instanceMsgXimf);
+ if (!ximfName) {
+ ximfName = defaultXimfName;
+ }
+ var arrList = XimfCatalog.getInstance().getInstanceList;
+ // create DOM panel using compose message template xslt
+ $("#ximfmailMailPanelTitle").attr("value",ximfName);
+ $("#ximfmailMailHeadersTablist").empty();
+ var composeDom = CreateDOMWithXimfInstance(ximfmailMesssage._instanceMsgXimf,"chrome://theme_ximfmail/content/messengerCompose-ximfmail.xsl");
+ $("#ximfmailMailHeadersTablist").append(composeDom);
+ $("#ximfmailMailPanel").attr("hidden","true");
+ // Dom element of preview panel
+ $("#ximfmail-custom-panel").attr("collapsed",true);
+ // compute datas to message
+ try {
+ var xheader_dom = $("label[ximfheader]");
+ var ximfValue = "";
+ var display_box = "";
+ for (var idxXmfHdr=0; idxXmfHdr < xheader_dom.length; ++idxXmfHdr) {
+ try {
+ ximfValue = ximfmailMesssage.getHeaderValue(xheader_dom[idxXmfHdr].getAttribute("ximfheader"));
+ if (ximfValue) {
+ // search for value and comlete display box
+ display_box = $("textbox[refheader='" + xheader_dom[idxXmfHdr].getAttribute("id") + "']");
+ if (display_box.length > 0) {
+ try {
+ // ximfValue is in Array
+ if (ximfValue.constructor === Array) {
+ var sSeparator = display_box[0].getAttribute("ximfseparator");
+ ximfValue = ximfValue.join(sSeparator);
+ }
+ } catch(e) {}
+ // default values
+ display_box[0].setAttribute("value",ximfValue);
+ display_box[0].setAttribute("ximfvalue",ximfValue);
+ display_box[0].setAttribute("tooltiptext",ximfValue);
+ // menuitem value (ilk, linkpopup...)
+ var menu_item = $("panel[id='"+display_box[0].getAttribute("refpanel")+"'] menuitem");
+ for (var idx_menu_item = 0 ; idx_menu_item < menu_item.length ; ++idx_menu_item) {
+ var current_ximfvalue = menu_item[idx_menu_item].getAttribute("ximfvalue");
+ if (current_ximfvalue.toLowerCase() === ximfValue.toLowerCase()) {
+ display_box[0].setAttribute("value",menu_item[idx_menu_item].getAttribute("label"));
+ display_box[0].setAttribute("ximfvalue",current_ximfvalue);
+ display_box[0].setAttribute("tooltiptext",menu_item[idx_menu_item].getAttribute("label"));
+ //linkpopup manager
+ var linkpopup = menu_item[idx_menu_item].getAttribute("linkpopupbox");
+ if (linkpopup) {
+ var targetpopup = $("panel[id='"+linkpopup+"']");
+
+ ComputeXimfElementLinked($("textbox[id='" + targetpopup[0].getAttribute("ximfreftextbox")+"']"),targetpopup[0].id,ximfmailMesssage);
+ }
+ }
+ }
+ }
+ }
+ } catch(e) {
+ gConsole.logStringMessage("[ximfmail - ShowXimfmailPanel ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+ }
+ // load free text values
+ xheader_dom = $("textbox[class='ximfEditor']");
+ for (var idxXmfEdtr=0; idxXmfEdtr<xheader_dom.length; ++idxXmfEdtr) {
+ try {
+ var oriTxtboxId = xheader_dom[idxXmfEdtr].getAttribute("ximfreftextbox");
+ var ximfLabelId = $("textbox[id='"+oriTxtboxId+"']").attr("refheader");
+ if (ximfLabelId) {
+ ximfValue = ximfmailMesssage.getHeaderValue($("label[id='"+ximfLabelId+"']").attr("ximfheader"));
+ if (ximfValue) {
+ try{
+ // ximfValue is in Array
+ if(ximfValue.constructor === Array){
+ display_box = $("textbox[refheader='" + xheader_dom[idxXmfEdtr].getAttribute("id") + "']");
+ if(display_box.length > 0){
+ var sSeparator = display_box[0].getAttribute("ximfseparator");
+ ximfValue = ximfValue.join(sSeparator);
+ }
+ }
+ }catch(e){}
+ xheader_dom[idxXmfEdtr].setAttribute("value",ximfValue);
+ }
+ }
+ } catch(e) {
+ gConsole.logStringMessage("[ximfmail - ShowXimfmailPanel] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+ }
+ // load address values
+ xheader_dom = $("ximfaddress");
+ for(var idxXmfAddr=0; idxXmfAddr<xheader_dom.length; ++idxXmfAddr){
+ try{
+ var refHeader = xheader_dom[idxXmfAddr].getAttribute("refheader");
+ if(refHeader){
+ ximfValue = ximfmailMesssage.getHeaderValue($("label[id='"+refHeader+"']").attr("ximfheader"));
+ if(ximfValue){
+ try{
+ // ximfValue is in Array
+ if(ximfValue.constructor === Array){
+ display_box = $("textbox[refheader='" + xheader_dom[idxXmfAddr].getAttribute("id") + "']");
+ if(display_box.length > 0){
+ var sSeparator = display_box[0].getAttribute("ximfseparator");
+ ximfValue = ximfValue.join(sSeparator);
+ }
+ }
+ }catch(e){}
+ xheader_dom[idxXmfAddr].listaddress = ximfValue;
+ }
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - ShowXimfmailPanel] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+ }
+ // load datetime values
+ xheader_dom = $("textbox[class='ximfDatetime']");
+ for (var idxDttm=0; idxDttm<xheader_dom.length; ++idxDttm) {
+ try {
+ var refHeader = xheader_dom[idxDttm].getAttribute("refheader");
+ if (refHeader) {
+ ximfValue = ximfmailMesssage.getHeaderValue($("label[id='"+refHeader+"']").attr("ximfheader"));
+ if (ximfValue) {
+ xheader_dom[idxDttm].setAttribute("ximfvalue", ximfValue);
+ var thisDate = ConvertZTimeToLocal(ximfValue);
+ if (!thisDate) {
+ thisDate = ximfValue;
+ }
+ xheader_dom[idxDttm].setAttribute("value",thisDate );
+ xheader_dom[idxDttm].setAttribute("ximftype","date");
+ }
+ }
+ } catch(e) {
+ gConsole.logStringMessage("[ximfmail - ShowXimfmailPanel] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+ }
+ } catch(e) {
+ gConsole.logStringMessage("[ximfmail - ShowXimfmailPanel] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+ // replace values with international labels
+ ConvertMimeDatasToLabelValues();
+ // modify DOM to create readable ihm
+ //replace textbox elements with labels elements
+ xheader_dom = $("textbox[class='XimfTextboxDisplay']");
+ for (var idxTxtDsp=0; idxTxtDsp<xheader_dom.length; ++idxTxtDsp) {
+ try {
+ ReplaceTxtboxWithLabel(xheader_dom[idxTxtDsp]);
+ } catch(e) {
+ gConsole.logStringMessage("[ximfmail - ShowXimfmailPanel] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+ }
+ xheader_dom = $("textbox[class='ximfDatetime']");
+ for (var idx_xheader_dom=0; idx_xheader_dom<xheader_dom.length; ++idx_xheader_dom) {
+ try {
+ ReplaceTxtboxWithLabel(xheader_dom[idx_xheader_dom]);
+ } catch(e) {
+ gConsole.logStringMessage("[ximfmail - ShowXimfmailPanel] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+ }
+ // remove template datas
+ // delete erase button
+ $("button[class*='ximfEraser']").remove();
+ // delete popup
+ $("#ximfmailMailHeadersTablist panel").remove();
+ // no mandatory labels
+ $("label[class='ximfHeaderLabel']").attr("style","color:inherit;");
+ // event manager panel
+ $("#ximfmailComposeMessageMaximize").click(ToogleHiddenPanel);
+ $("#ximfmailComposeMessageMinimize").click(ToogleHiddenPanel);
+ $("#ximfmailMailPanelFocusBar").dblclick(ToogleHiddenPanel);
+ // display new panel
+ $("#ximfmailMailPanel").attr("hidden","false");
+ $("button[class*='ximfDetail']").bind("command",OnSelectDetail);
+ } catch(e) {
+ gConsole.logStringMessage("[ximfmail - ShowXimfmailPanel ] " + e +"\nline : " + e.lineNumber + " : "+ e + "\nfile : "+ Error().fileName);
+ }
+ return true;
+};
+// remove compose template textbox and add dispayed label
+function ReplaceTxtboxWithLabel(element){
+ try{
+ //label
+ var ximflabel = document.createElement("label");
+ $(ximflabel).attr("id",element.getAttribute("id"));
+ $(ximflabel).attr("value",element.getAttribute("value"));
+ $(ximflabel).attr("ximfvalue",element.getAttribute("ximfvalue"));
+
+ $(ximflabel).attr("refheader",element.getAttribute("refheader"));
+ $(ximflabel).attr("class","ximfDisplay");
+ $(ximflabel).attr("crop","end");
+ if(element.hasAttribute("ximfseparator")){
+ $(ximflabel).attr("ximfseparator",element.getAttribute("ximfseparator"));
+ }
+ if(element.hasAttribute("ximftype")){
+ $(ximflabel).attr("ximftype",element.getAttribute("ximftype"));
+ }
+ // replace DOM
+ $(element).replaceWith(ximflabel);
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - ReplaceTxtboxWithLabel] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+}
+// insert security pictures...
+function ShowExpandedHeaders(ximfmailMesssage){
+ try {
+ gConsole.logStringMessage("[ximfmail - showExpandedHeaders ] get gor pictures rules... ");
+ // raz ximf pictures elements
+ try {
+ $(".ximfImgCategory").remove();
+ $("#ximfSecurityClassificationLabelImg").attr("src","");
+ $("#ximfCategoryClassificationLabelImg").attr("src","");
+ } catch(e) {}
+ // selected message has no XIMF headers
+ if (!ximfmailMesssage._instanceMsgXimf) {
+ return false;
+ }
+ // ximfmail elements to display pictures
+ var headerRef = "";
+ var valueRef = "";
+ var tabPictureValueRef = undefined;
+ var tabPictureValueName = undefined;
+ var imgClassification = document.getElementById("ximfSecurityClassificationLabelImg");
+ var imgCategory = document.getElementById("ximfCategoryClassificationLabelImg");
+ //display security labels pictures
+ gConsole.logStringMessage("[ximfmail - showExpandedHeaders ] \n search for labels to display... ");
+ if (imgClassification) {
+ imgClassification.setAttribute("src","");
+ var reg=new RegExp("[&]+", "g");
+ var picturesClassifArray = CreateRulesArray(ximfmailMesssage._instanceMsgXimf,"ximf:classificationPictures");
+ for (var idxClssfPct=0; idxClssfPct<picturesClassifArray.length ; ++idxClssfPct) {
+ headerRef = picturesClassifArray[idxClssfPct]._headerRef;
+ valueRef = ximfmailMesssage.getHeaderValue(headerRef);
+ if (valueRef) {
+ for (var idxClssPix = 0 ; idxClssPix < picturesClassifArray.length ; ++idxClssPix) {
+ tabPictureValueRef =picturesClassifArray[idxClssPix]._valueRef.split(reg);
+ tabPictureValueName =picturesClassifArray[idxClssPix]._valueName.split(reg);
+ for (var idxClssfPict = 0 ; idxClssfPict<tabPictureValueRef.length ; ++idxClssfPict ) {
+ var regClassImg = new RegExp(tabPictureValueRef[idxClssfPict] + "[\\W]","gi");
+ // valueRef : SECTION SIGN caracter as last item checked with regex
+ valueRef += "\u00A7";
+ if (valueRef.match(regClassImg)) {
+ imgClassification.setAttribute("src",tabPictureValueName[idxClssfPict]);
+ }
+ }
+ }
+ }
+ }
+ }
+ // check categories logos
+ if (imgCategory) {
+ imgCategory.setAttribute("src","");
+ $(".ximfImgCategory").remove();
+ var regImgCtg=new RegExp("[&]+", "g");
+ var picturesCategorArray = CreateRulesArray(ximfmailMesssage._instanceMsgXimf,"ximf:categoryPictures");
+ var container = document.getElementById("ximfHeadBox");
+ for (var iHdr=0; iHdr<picturesCategorArray.length ; ++iHdr) {
+ headerRef = picturesCategorArray[iHdr]._headerRef;
+ valueRef = ximfmailMesssage.getHeaderValue(headerRef);
+ if (valueRef) {
+ for (var idxPix = 0 ; idxPix < picturesCategorArray.length ; ++idxPix) {
+ tabPictureValueRef = picturesCategorArray[idxPix]._valueRef.split(regImgCtg);
+ tabPictureValueName = picturesCategorArray[idxPix]._valueName.split(regImgCtg);
+ for (var iPict = 0 ; iPict<tabPictureValueRef.length ; ++iPict ) {
+ var regCatImg = new RegExp(tabPictureValueRef[iPict] + "[\\W]","gi");
+ // SECTION SIGN caracter as last item checked with regex
+ valueRef += "\u00A7";
+ if (valueRef.match(regCatImg)) {
+ try {
+ var img = document.createElement("image");
+ img.setAttribute("class","ximfImgCategory");
+ img.setAttribute("src",tabPictureValueName[iPict]);
+ container.appendChild(img);
+ } catch(e) {
+ gConsole.logStringMessage("[ximfmail - showExpandedHeaders ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ } catch(e) {
+ gConsole.logStringMessage("[ximfmail - showExpandedHeaders ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+ // secure headers signature are present in message, isn't it?
+ // this rule is applied only on ximf messages with same instance of current account
+ try {
+ secureHdrsArray = CreateRulesArray(ximfmailMesssage._instanceMsgXimf,"ximfsecureHeaders");
+ if (secureHdrsArray.length > 0) {
+ var smimeBox = document.getElementById("smimeBox");
+ if (smimeBox.hasAttribute("collapsed")) {
+ // Trustedbird hasn't detected signature
+ // set ximfmail information to user
+ smimeBox.removeAttribute("collapsed");
+ $("#signedHdrIcon").attr("signed","ximfalert");
+ }
+ }
+ } catch(e) {
+ gConsole.logStringMessage("[ximfmail - showExpandedHeaders ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+ $("#ximfHeadBox").removeAttr("collapsed");
+ return true;
+}
+// show values ximf
+function OnSelectDetail(evt){
+ try{
+ idBox = evt.currentTarget.getAttribute("refLabel");
+ var eltTextbox = document.getElementById(idBox);
+ // display datas of current XIMF header
+ if(eltTextbox.value !== ""){
+ // get informations of datas to load
+ var args = [];
+ var hLabel = document.getElementById(eltTextbox.getAttribute("refheader"));
+ // args[0] : textbox id
+ args.push(hLabel.getAttribute("value"));
+ // args[1] : catalog ref
+ args.push(hLabel.getAttribute("ximfheader"));
+ // args[2] : title dialogbox
+ args.push(eltTextbox.value);
+ // args[3] : description dialogbox
+ args.push(eltTextbox.getAttribute("ximfvalue"));
+ if(eltTextbox.hasAttribute("ximfseparator")){
+ args.push(eltTextbox.getAttribute("ximfseparator"));
+ }
+ // open dialog
+ window.openDialog("chrome://ximfmail/content/dialogHdrInfo-ximfmail.xul","showmore", "chrome,resizable,centerscreen,modal",args);
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - OnSelectXimfmailContextBox ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+}
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ - Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.
+ - ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.
+ -
+ -
+ - Redistribution and use, in source and binary forms, with or without modification,
+ - are permitted provided that the following conditons are met :
+ -
+ - 1. Redistributions of source code must retain the above copyright notice,
+ - 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached
+ - in the redistribution of the source code.
+ - 3. Neither the names of the copyright holders nor the names of any contributors
+ - may be used to endorse or promote products derived from this software without specific
+ - prior written permission from EADS Defence and Security.
+ -
+ - Alternatively, the contents of this file may be used under the terms of
+ - either of the GNU General Public License Version 2 or later (the "GPL"),
+ - or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ - in which case the provisions of the GPL or the LGPL are applicable instead
+ - of those above. If you wish to allow use of your version of this file only
+ - under the terms of either the GPL or the LGPL, and not to allow others to
+ - use your version of this file under the terms of the MPL, indicate your
+ - decision by deleting the provisions above and replace them with the notice
+ - and other provisions required by the GPL or the LGPL. If you do not delete
+ - the provisions above, a recipient may use your version of this file under
+ - the terms of any one of the MPL, the GPL or the LGPL.
+ -
+ - REMINDER :
+ - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ - IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ -
+ - EADS Defence and Security - 1 Boulevard Jean Moulin -
+ - ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)
+ -
+ - Contributor(s):
+ - Copyright(c) Airbus Defence and Space 2014 - All rights reserved
+ - ***** END LICENSE BLOCK ***** -->
+
+<?xml-stylesheet href="chrome://ximfmail/skin" type="text/css"?>
+<!DOCTYPE overlay SYSTEM "chrome://ximfmail/locale/ximfmail.dtd">
+
+<overlay id="ximfMessengerOverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml">\r
+\r
+ <script type="application/javascript" src="chrome://ximfmail/content/jquery.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/controler-ximfmail.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/constant-ximfmail.js" />
+ <script type="application/javascript" src="chrome://ximfmail/content/ximfCatalog.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/ximfmail.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/messageAnalyser-ximfmail.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/messageWindow-ov-ximfmail.js" />\r
+\r
+ <!-- Display Ximf pictures in message -->
+ <html:div id="expandedHeadersTopBox">
+ <hbox id="ximfHeadBox" insertafter="header-view-toolbox">
+ <image id="ximfSecurityClassificationLabelImg"/>
+ <image id="ximfCategoryClassificationLabelImg"/>
+ </hbox>
+ </html:div>\r
+\r
+ <vbox id="messagepanebox">\r
+ <!-- Display Ximf headers in message of new window -->
+ <vbox id="ximfmailMailPanel" insertafter="msgHeaderView" collapsed="true">
+ <hbox id="ximfmailMailPanelFocusBar" class="ximfmailFocusBar" flex="1" align="center">
+ <button class="ximfmailButton" id="ximfmailComposeMessageMaximize" tooltiptext="&ximfmail.compose.focus;" accesskey="+" hidden="true" />
+ <button class="ximfmailButton" id="ximfmailComposeMessageMinimize" tooltiptext="&ximfmail.compose.unfocus;" accesskey="-" />
+ <label id="ximfmailMailPanelTitle" value="&ximfmail.compose.headerTab;"/>
+ <image id="ximfmailComposeMessageLogo"/>
+ <spacer flex="1" />
+ </hbox>
+ <hbox id="ximfMailTable" >
+ <tabbox id="ximfmailMailHeadersTablist" flex="1"/>
+ </hbox>
+ </vbox>
+ </vbox>
+</overlay>
\ No newline at end of file
--- /dev/null
+/* ***** BEGIN LICENSE BLOCK *****\r
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ *\r
+ *\r
+ * Redistribution and use, in source and binary forms, with or without modification,\r
+ * are permitted provided that the following conditons are met :\r
+ *\r
+ * 1. Redistributions of source code must retain the above copyright notice,\r
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ * in the redistribution of the source code.\r
+ * 3. Neither the names of the copyright holders nor the names of any contributors\r
+ * may be used to endorse or promote products derived from this software without specific\r
+ * prior written permission from EADS Defence and Security.\r
+ *\r
+ * Alternatively, the contents of this file may be used under the terms of\r
+ * either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ * in which case the provisions of the GPL or the LGPL are applicable instead\r
+ * of those above. If you wish to allow use of your version of this file only\r
+ * under the terms of either the GPL or the LGPL, and not to allow others to\r
+ * use your version of this file under the terms of the MPL, indicate your\r
+ * decision by deleting the provisions above and replace them with the notice\r
+ * and other provisions required by the GPL or the LGPL. If you do not delete\r
+ * the provisions above, a recipient may use your version of this file under\r
+ * the terms of any one of the MPL, the GPL or the LGPL.\r
+ *\r
+ * REMINDER :\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ * ***** END LICENSE BLOCK ***** */\r
+/**\r
+ * messenger-ov-ximfmail.js\r
+ *\r
+ */\r
+// global variables\r
+var gCurrentIdentity = null;\r
+var gPreviousIdentity = null;\r
+var gComposeMsgByMenuitem = false;\r
+var gConsole = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);\r
+gConsole.logStringMessage("[messenger-ov-ximfmail] file loaded");\r
+/*\r
+ * Get account user settings\r
+ */\r
+function GetCurrentXimfUser() {\r
+ try {\r
+ var folders = GetSelectedMsgFolders();\r
+ var identity = null;\r
+ var server = null;\r
+ var ximfUser = "";\r
+ if (folders.length > 0){\r
+ // Get the incoming server associated with this uri.\r
+ identity = getIdentityForServer(folders[0].server);\r
+ }\r
+ if (!identity) {\r
+ identity = MailServices.accounts.defaultAccount.defaultIdentity;\r
+ }\r
+ if (identity) {\r
+ gCurrentIdentity = identity;\r
+ var prefName="mail.identity."+identity.key+".useremail";\r
+ if (Services.prefs.prefHasUserValue( prefName )) {\r
+ ximfUser = Services.prefs.getCharPref(prefName);\r
+ }\r
+ }\r
+ }catch (ex){\r
+ gConsole.logStringMessage("[messenger-ov-ximfmail - GetCurrentXimfUser] failed to get an identity to pre-select: " + ex);\r
+ }\r
+ return ximfUser;\r
+};\r
+/**\r
+ * Compute DOM user folder with XIMF account user informations\r
+ */\r
+function OnSelectfolderPane() {\r
+ try{\r
+ // get current identity\r
+ GetCurrentXimfUser();\r
+ if (!gCurrentIdentity) {\r
+ gConsole.logStringMessage("[messenger-ov-ximfmail - OnSelectfolderPane ] gCurrentIdentity invalid");\r
+ return;\r
+ }\r
+ // custom-panel update\r
+ var title = ximfPref.get(gCurrentIdentity.key, "ximfmail_theme_name");\r
+ $("#title-custom").attr("value",title);\r
+ // load context of currentUser\r
+ var refRdf = ximfPref.get(gCurrentIdentity.key,"ximfmail_theme_ref");\r
+ AddRdfDataSce2domList("menupopup-newmsg", refRdf);\r
+ // mailpanel instance : to display compose messages\r
+ var mailTheme = ximfPref.get(gCurrentIdentity.key, "ximfmail_theme_ref");\r
+ Services.prefs.setCharPref("mailnews.theme.mailpanel",mailTheme);\r
+ // is ximfail context used\r
+ if (ximfPref.isXimfAccountOn(gCurrentIdentity)) {\r
+ Services.prefs.setBoolPref("mailnews.headers.showXimfmail",true);\r
+ $("#menupopup-newmsg").attr("datasources","chrome://theme_ximfmail/content/ximfCatalog.rdf");\r
+ $("#menupopup-newmsg menuitem").attr("hidden","false");\r
+ $("#ximfmail-custom-panel").removeAttr("collapsed");\r
+ $("#button-newmsg").attr("type","menu-button");\r
+ try {\r
+ // update secure headers settings file with ximf instance\r
+ var currentInstance = ximfPref.get(gCurrentIdentity.key, "ximfmail_instance_compose_ref");\r
+ gConsole.logStringMessage("[messenger-ov-ximfmail - OnSelectfolderPane - UpdateSecureHeadersFileSettings]currentInstance = " + currentInstance );\r
+ UpdateSecureHeadersFileSettings (currentInstance, gCurrentIdentity);\r
+ gConsole.logStringMessage("[messenger-ov-ximfmail - OnSelectfolderPane - UpdateSecureHeadersFileSettings] Succes updating secure headers file settings");\r
+ } catch (e) {\r
+ gConsole.logStringMessage("[messenger-ov-ximfmail - OnSelectfolderPane - UpdateSecureHeadersFileSettings] Problem updating secure headers file settings : " + e);\r
+ }\r
+ } else {\r
+ Services.prefs.setBoolPref("mailnews.headers.showXimfmail",false);\r
+ $("#menupopup-newmsg").attr("datasources","");\r
+ $("#menupopup-newmsg menuitem").attr("hidden","true");\r
+ $("#ximfmail-custom-panel").attr("collapsed","true");\r
+ $("#button-newmsg").attr("type","");\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[messenger-ov-ximfmail - OnSelectfolderPane ] " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+}\r
+/**\r
+ * Set/Unset XIMFMAIL flag on opening message\r
+ * @returns {Boolean}\r
+ */\r
+function OnOpenMsg(){\r
+ if (!gCurrentIdentity) {\r
+ return false;\r
+ }\r
+ if (ximfPref.isXimfAccountOn(gCurrentIdentity)){\r
+ Services.prefs.setBoolPref("mailnews.headers.showXimfmail",true);\r
+ // flag on new open message requested\r
+ try{\r
+ if(!Services.prefs.getBoolPref(ximfConst.PREF_MSGWINDOW_REFRESH)){\r
+ Services.prefs.setBoolPref(ximfConst.PREF_MSGWINDOW_REFRESH,true);\r
+ }else{\r
+ Services.prefs.setBoolPref(ximfConst.PREF_MSGWINDOW_REFRESH,false);\r
+ }\r
+ }catch(e){Services.prefs.setBoolPref(ximfConst.PREF_MSGWINDOW_REFRESH,true);}\r
+ }else{\r
+ Services.prefs.setBoolPref("mailnews.headers.showXimfmail",false);\r
+ }\r
+ return true;\r
+}\r
+/**\r
+ * Set/Unset XIMFMAIL flag on selected message\r
+ * @returns {Boolean}\r
+ */\r
+function OnSelectMsg(){\r
+ try{\r
+ if (!gCurrentIdentity) {\r
+ return false;\r
+ }\r
+ if (ximfPref.isXimfAccountOn(gCurrentIdentity)){\r
+ Services.prefs.setBoolPref("mailnews.headers.showXimfmail",true);\r
+ }else{\r
+ Services.prefs.setBoolPref("mailnews.headers.showXimfmail",false);\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[messenger-ov-ximfmail - OnSelectMsg ] " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+}\r
+/**\r
+ * Set instance ximf to use on composing message.\r
+ * Called on press new message button.\r
+ */\r
+function OnCommandComposeMsgXimfmail(event){\r
+ gComposeMsgByMenuitem=true;\r
+ var pathXmlXimf = event.currentTarget.getAttribute("value");\r
+ Services.prefs.setCharPref("ximfmail.composeMsg.instance",pathXmlXimf);\r
+ var prefXsmtpCompatibility = ximfPref.get(gCurrentIdentity.key, "ximfmail_xsmtp_compatibility");\r
+ if (prefXsmtpCompatibility === "true") {\r
+ Services.prefs.setCharPref("ximfmail.composeMsg.xsmtp_on", "true");\r
+ }\r
+}\r
+/**\r
+ * Set XIMF instance to use on composing message.\r
+ * @param evt\r
+ */\r
+function OnComposeDefaultMsg(evt){\r
+ if(!gComposeMsgByMenuitem){\r
+ var idButton = evt.currentTarget.id;\r
+ var prefKey = "";\r
+ if (idButton === "button-newmsg") {\r
+ prefKey = "ximfmail_instance_compose_ref";}\r
+ if (idButton === "button-reply") {\r
+ prefKey = "ximfmail_instance_answer_ref";\r
+ }\r
+ if (idButton === "button-replyall") {\r
+ prefKey = "ximfmail_instance_answer_ref";\r
+ }\r
+ if (idButton === "button-forward") {\r
+ prefKey = "ximfmail_instance_forward_ref";\r
+ }\r
+ if (ximfPref.isXimfAccountOn(gCurrentIdentity)) {\r
+ Services.prefs.setCharPref("ximfmail.composeMsg.instance", ximfPref.get(gCurrentIdentity.key, prefKey));\r
+ } else {\r
+ Services.prefs.setCharPref("ximfmail.composeMsg.instance","");\r
+ }\r
+ }\r
+ gComposeMsgByMenuitem=false;\r
+}\r
+/**\r
+ * Update main panel with XIMF environment\r
+ */\r
+$(document).ready(function(){\r
+ // event manager\r
+ $("#folderTree").select(OnSelectfolderPane);\r
+ $("#threadTree").dblclick(OnOpenMsg);\r
+ $("#cmd_openMessage").bind("command",OnOpenMsg);\r
+ $("#key_openMessage").bind("command",OnOpenMsg);\r
+ $("#threadTree").keypress(function(evt){\r
+ if(evt.keyCode === 13){\r
+ OnOpenMsg();\r
+ }\r
+ });\r
+ // load instances\r
+ $("#button-newmsg").mousedown(OnSelectfolderPane);\r
+ // use default instance\r
+ $("#button-newmsg").bind('command', OnComposeDefaultMsg);\r
+ $("#button-reply").mousedown(OnSelectfolderPane);\r
+ $("#button-reply").bind('command', OnComposeDefaultMsg);\r
+ $("#button-replyall").mousedown(OnSelectfolderPane);\r
+ $("#button-replyall").bind('command', OnComposeDefaultMsg);\r
+ $("#button-forward").mousedown(OnSelectfolderPane);\r
+ $("#button-forward").bind('command', OnComposeDefaultMsg);\r
+ $("#threadTree").bind('select', OnSelectMsg);\r
+ // Creating Ximf Custom Columns\r
+ var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);\r
+ observerService.addObserver(XimfThreadTreeDBViewObserver, "MsgCreateDBView", false);\r
+ // switch to current folder\r
+ OnSelectfolderPane();\r
+ try{\r
+ // Security Labels compatibility (RFC2634)\r
+ CreateSecurityLabelXml();\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[messenger-ov-ximfmail] Warning - Security Label compatibility : " + e);\r
+ }\r
+});
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!-- ***** BEGIN LICENSE BLOCK *****\r
+ - Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ - ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ -\r
+ -\r
+ - Redistribution and use, in source and binary forms, with or without modification,\r
+ - are permitted provided that the following conditons are met :\r
+ -\r
+ - 1. Redistributions of source code must retain the above copyright notice,\r
+ - 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ - in the redistribution of the source code.\r
+ - 3. Neither the names of the copyright holders nor the names of any contributors\r
+ - may be used to endorse or promote products derived from this software without specific\r
+ - prior written permission from EADS Defence and Security.\r
+ -\r
+ - Alternatively, the contents of this file may be used under the terms of\r
+ - either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ - or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ - in which case the provisions of the GPL or the LGPL are applicable instead\r
+ - of those above. If you wish to allow use of your version of this file only\r
+ - under the terms of either the GPL or the LGPL, and not to allow others to\r
+ - use your version of this file under the terms of the MPL, indicate your\r
+ - decision by deleting the provisions above and replace them with the notice\r
+ - and other provisions required by the GPL or the LGPL. If you do not delete\r
+ - the provisions above, a recipient may use your version of this file under\r
+ - the terms of any one of the MPL, the GPL or the LGPL.\r
+ -\r
+ - REMINDER :\r
+ - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ - IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ -\r
+ - EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ - ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ - \r
+ - Contributor(s):\r
+ - Copyright(c) Airbus Defence and Space 2014 - All rights reserved\r
+ - ***** END LICENSE BLOCK ***** -->\r
+\r
+<?xml-stylesheet href="chrome://ximfmail/skin" type="text/css"?>\r
+<!DOCTYPE overlay SYSTEM "chrome://ximfmail/locale/ximfmail.dtd">\r
+<overlay id="ximfMessengerOverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"\r
+ xmlns:html="http://www.w3.org/1999/xhtml">\r
+ <script type="application/javascript" src="chrome://ximfmail/content/jquery.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/constant-ximfmail.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/ximfmail.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/ximfCatalog.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/messageAnalyser-ximfmail.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/controler-ximfmail.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/threadTree-ximfmail.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/messageWindow-ov-ximfmail.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/messenger-ov-ximfmail.js" />\r
+\r
+ <!-- pane of messages received -->\r
+ <tree id="threadTree">\r
+ <treecols id="threadCols">\r
+ </treecols>\r
+ </tree>\r
+\r
+ <!-- messages box -->\r
+ <box id="messagesBox" >\r
+ <hbox id="ximfmail-custom-panel" class="ximfmailFocusBar" insertafter="threadpane-splitter" collapsed="true">\r
+ <label id="title-custom"/>\r
+ <separator flex="1"/>\r
+ </hbox>\r
+ </box>\r
+\r
+ <!-- toolbar button Compose New Message -->\r
+ <toolbarbutton id="button-newmsg" type="menu-button" >\r
+ <menupopup id="menupopup-newmsg"\r
+ datasources="chrome://theme_ximfmail/content/ximfCatalog.rdf"\r
+ ref="" >\r
+ <template>\r
+ <rule>\r
+ <conditions>\r
+ <content uri="?list" />\r
+ <member container="?list" child="?elt" />\r
+ <triple subject="?elt"\r
+ predicate="http://www.ximfmail.com/RDF#instance" object="?name" />\r
+ <triple subject="?elt"\r
+ predicate="http://www.ximfmail.com/RDF#pathSchema"\r
+ object="?pathSchema" />\r
+ <triple subject="?elt"\r
+ predicate="http://www.ximfmail.com/RDF#pathIhm"\r
+ object="?pathIhm" />\r
+ <triple subject="?elt"\r
+ predicate="http://www.ximfmail.com/RDF#pathDictionary"\r
+ object="?pathDictionary" />\r
+ <triple subject="?elt"\r
+ predicate="http://www.ximfmail.com/RDF#instanceLabel"\r
+ object="?label" />\r
+ <triple subject="?elt"\r
+ predicate="http://www.ximfmail.com/RDF#active"\r
+ object="true" />\r
+ </conditions>\r
+ <action>\r
+ <menuitem uri="?elt"\r
+ value="?elt"\r
+ label="?label"\r
+ pathSchema="?pathSchema"\r
+ pathDictionary="?pathDictionary"\r
+ pathIhm="?pathIhm"\r
+ observes="isXimfailActivated"\r
+ oncommand="OnCommandComposeMsgXimfmail(event);"/>\r
+ </action>\r
+ </rule>\r
+ </template>\r
+ </menupopup>\r
+ </toolbarbutton>\r
+\r
+ <!-- Display Ximf headers in single message -->\r
+ <vbox id="singlemessage">\r
+ <vbox id="ximfmailMailPanel" insertafter="msgHeaderView" collapsed="true">\r
+ <hbox id="ximfmailMailPanelFocusBar" class="ximfmailFocusBar" flex="1" align="center">\r
+ <button class="ximfmailButton" id="ximfmailComposeMessageMaximize" tooltiptext="&ximfmail.compose.focus;" accesskey="+" hidden="true" />\r
+ <button class="ximfmailButton" id="ximfmailComposeMessageMinimize" tooltiptext="&ximfmail.compose.unfocus;" accesskey="-" />\r
+ <label id="ximfmailMailPanelTitle" value="&ximfmail.compose.headerTab;"/>\r
+ <image id="ximfmailComposeMessageLogo"/>\r
+ <spacer flex="1" />\r
+ </hbox>\r
+ <hbox id="ximfMailTable" >\r
+ <tabbox id="ximfmailMailHeadersTablist" flex="1"/>\r
+ </hbox>\r
+ </vbox>\r
+ </vbox>\r
+\r
+ <!-- Display Ximf pictures in message expandedHeadersBottomBox -->\r
+ <html:div id="expandedHeadersTopBox">\r
+ <hbox id="ximfHeadBox" insertafter="header-view-toolbox">\r
+ <image id="ximfSecurityClassificationLabelImg"/>\r
+ <image id="ximfCategoryClassificationLabelImg"/>\r
+ </hbox>\r
+ </html:div>\r
+\r
+</overlay>
\ No newline at end of file
--- /dev/null
+/* ***** BEGIN LICENSE BLOCK *****\r
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ *\r
+ *\r
+ * Redistribution and use, in source and binary forms, with or without modification,\r
+ * are permitted provided that the following conditons are met :\r
+ *\r
+ * 1. Redistributions of source code must retain the above copyright notice,\r
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ * in the redistribution of the source code.\r
+ * 3. Neither the names of the copyright holders nor the names of any contributors\r
+ * may be used to endorse or promote products derived from this software without specific\r
+ * prior written permission from EADS Defence and Security.\r
+ *\r
+ * Alternatively, the contents of this file may be used under the terms of\r
+ * either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ * in which case the provisions of the GPL or the LGPL are applicable instead\r
+ * of those above. If you wish to allow use of your version of this file only\r
+ * under the terms of either the GPL or the LGPL, and not to allow others to\r
+ * use your version of this file under the terms of the MPL, indicate your\r
+ * decision by deleting the provisions above and replace them with the notice\r
+ * and other provisions required by the GPL or the LGPL. If you do not delete\r
+ * the provisions above, a recipient may use your version of this file under\r
+ * the terms of any one of the MPL, the GPL or the LGPL.\r
+ *\r
+ * REMINDER :\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ * ***** END LICENSE BLOCK ***** */\r
+gConsole.logStringMessage("[ximfmail] messengerCompose-ov-ximfmail.js file loaded ");\r
+var gCurrentInstance = "";\r
+var gcounterStarter = 1;\r
+/**\r
+ * mail:composeOnSend observer\r
+ * Add XIMF Headers to MIME message\r
+ */\r
+var XimfMsgSend = XimfMsgSend || {};\r
+XimfMsgSend = {\r
+ observe: function(subject, topic, data) {\r
+ if (!gCurrentIdentity) {\r
+ return;\r
+ }\r
+ try {\r
+ var msgCompFields = gMsgCompose.compFields;\r
+ var charSet = null;\r
+ charSet = msgCompFields.characterSet;\r
+ if(!charSet){\r
+ charSet === msgCompFields.defaultCharacterSet;\r
+ }\r
+ var currCompfieldsotherHeaders = msgCompFields.otherRandomHeaders;\r
+ // add headers of ximf instance\r
+ var addCompfieldsotherHeaders = "";\r
+ var ximfCatalog = XimfCatalog.getInstance();\r
+ if (ximfCatalog) {\r
+ var ximfName = ximfConst.DEFAULT_XIMF_NAME;\r
+ ximfName = ximfCatalog.getNameInstance(gXimfHdrs.getXimfInstanceResource());\r
+ try {\r
+ if (ximfName.toLowerCase() === ximfConst.SMTP_INSTANCE_KEY) {\r
+ // FT INT_FT3970\r
+ gConsole.logStringMessage("[ximfmail - ximfmailOnSend ] Send non XIMF message - instance " + ximfName);\r
+ } else {\r
+ addCompfieldsotherHeaders += EncodeMimeXimfheader(ximfConst.XIMF_NAME_HEADER, ximfName, charSet) + ximfConst.XIMF_ENDLINE;\r
+ // insert XIMF-Version - B4521\r
+ var ximfVersion = ximfConst.DEFAULT_XIMF_VERSION;\r
+ ximfVersion = ximfCatalog.getVersionInstance(gXimfHdrs.getXimfInstanceResource());\r
+ addCompfieldsotherHeaders += EncodeMimeXimfheader(ximfConst.XIMF_VERSION_HEADER, ximfVersion, charSet) + ximfConst.XIMF_ENDLINE;\r
+ // insert extended headers in sending message\r
+ var headersToSend = ReadMimeHeadersSelection(ximfConst.XIMF_ENDLINE, charSet);\r
+ if (headersToSend) {\r
+ addCompfieldsotherHeaders += headersToSend;\r
+ gConsole.logStringMessage("[XimfMsgSend] Ximf header added to send message!");\r
+ }\r
+ }\r
+ } catch(ex) {\r
+ gConsole.logStringMessage("[XimfMsgSend]Exception : " + ex + "\nfile : " + Error().fileName + "\nline : " + Error().lineNumber);\r
+ }\r
+ }\r
+ // apply xsmtp rules instances\r
+ if (gCurrentIdentity.getBoolAttribute("ximfmail_xsmtp_compatibility_on")) {\r
+ var xsmtpHeadersToSend = ReadXsmptHeadersTranslation(ximfConst.XIMF_SEPARATOR_HEADER, ximfConst.XIMF_ENDLINE,charSet);\r
+ if (xsmtpHeadersToSend) {\r
+ addCompfieldsotherHeaders += xsmtpHeadersToSend;\r
+ gConsole.logStringMessage("[XimfMsgSend]XSMTP compatibility process");\r
+ }\r
+ }\r
+ // add ximf headers 1 time - copy last XIMF entries\r
+ if (currCompfieldsotherHeaders.length <= 0 ) {\r
+ msgCompFields.otherRandomHeaders = addCompfieldsotherHeaders;\r
+ } else {\r
+ var regCRLF = new RegExp(ximfConst.XIMF_ENDLINE, "g");\r
+ var arrayAddCompfieldsotherHeaders = addCompfieldsotherHeaders.split(regCRLF);\r
+ var arrayCurrCompfieldsotherHeaders = currCompfieldsotherHeaders.split(regCRLF);\r
+ for (var i=0; i < arrayAddCompfieldsotherHeaders.length; ++i) {\r
+ var tmpAdd = arrayAddCompfieldsotherHeaders[i].slice(0,arrayAddCompfieldsotherHeaders[i].indexOf(":",0));\r
+ if (tmpAdd !=="") {\r
+ for (j=0 ; j<arrayCurrCompfieldsotherHeaders.length ; ++j) {\r
+ var tmpCurr = arrayCurrCompfieldsotherHeaders[j].slice(0,arrayCurrCompfieldsotherHeaders[j].indexOf(":",0));\r
+ if (tmpCurr !== "" && tmpCurr === tmpAdd) {\r
+ arrayCurrCompfieldsotherHeaders[j] = arrayAddCompfieldsotherHeaders[i];\r
+ arrayAddCompfieldsotherHeaders[i] = "";\r
+ break;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ //update new selection\r
+ var arrayAddCompfieldsotherHeaders2 = new Array();\r
+ for (var i=0 ; i<arrayAddCompfieldsotherHeaders.length ; ++i) {;\r
+ if (arrayAddCompfieldsotherHeaders[i]!== "") {\r
+ arrayAddCompfieldsotherHeaders2.push(arrayAddCompfieldsotherHeaders[i]);\r
+ }\r
+ }\r
+ // insert header\r
+ msgCompFields.otherRandomHeaders = arrayCurrCompfieldsotherHeaders.join(ximfConst.XIMF_ENDLINE);\r
+ if (arrayAddCompfieldsotherHeaders2.length>0) {\r
+ msgCompFields.otherRandomHeaders += arrayAddCompfieldsotherHeaders2.join(ximfConst.XIMF_ENDLINE);\r
+ }\r
+ }\r
+ // append Security labels\r
+ AppendESSSecuityLabel();\r
+ }catch(e){\r
+ gConsole.logStringMessage("[XimfMsgSend] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ }\r
+};\r
+/**\r
+ * (Re)open message composer with XIMF instance\r
+ */\r
+var XimfMsgCompose = XimfMsgCompose || {};\r
+XimfMsgCompose = { \r
+ maxNbStarter : 20,\r
+ counterStarter : 0,\r
+ catalog: null,\r
+ currentInstance : undefined,\r
+ preinit: function(){\r
+ var objMsgCompose = this;\r
+ XimfCatalogFactory.getIntance(function (instance) {\r
+ gConsole.logStringMessage("[ximfmail - XimfMsgCompose ] instance of catalog ready to use, init composer...");\r
+ objMsgCompose.catalog = instance;\r
+ objMsgCompose.init();\r
+ });\r
+ },\r
+ init: function () {\r
+ // ximfmail not requested\r
+ gConsole.logStringMessage("[ximfmail - XimfMsgCompose ] init begin...");\r
+ var prefBranch = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch(null);\r
+ var showXimfmail = prefBranch.getBoolPref("mailnews.headers.showXimfmail");\r
+ //ResetXimfhdrsDom();\r
+ if (showXimfmail === false) {\r
+ gConsole.logStringMessage("[ximfmail - XimfMsgCompose ] no ximfmail composerfor this message");\r
+ $("#isUsingXimfail").attr("hidden","true");\r
+ try{\r
+ //remove ximf events ...\r
+ HideSendMessageElements(true);\r
+ $("#addressingWidget").unbind("command",SpecialXimfRule_CheckAddress);\r
+ ReloadSecurityAccess();\r
+ }catch(e){\r
+ }\r
+ return;\r
+ }\r
+ // let's compose ximf message\r
+ gConsole.logStringMessage("[ximfmail - XimfMsgCompose ] instance of ximfmail has to be loaded");\r
+ var o = this;\r
+ $("#isUsingXimfail").attr("hidden","false");\r
+ // observer on sending message\r
+ var ximfmailObserverSvc = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);\r
+ ximfmailObserverSvc.addObserver(XimfMsgSend, "mail:composeOnSend", false);\r
+ // add catalog\r
+ XimfMsgSend.ximfCatalog = o.catalog;\r
+ // check message type\r
+ try {\r
+ // is Template or Draft message\r
+ var typeMsg = -1;\r
+ var args = window.arguments[0];\r
+ if (args) {\r
+ typeMsg = args.type;\r
+ } else {\r
+ if (gMsgCompose) {\r
+ typeMsg = gMsgCompose.type;\r
+ }\r
+ }\r
+ switch (typeMsg) {\r
+ case nsIMsgCompType.Draft:\r
+ case nsIMsgCompType.Template:\r
+ case nsIMsgCompType.Reply:\r
+ case nsIMsgCompType.ReplyAll:\r
+ case nsIMsgCompType.ReplyToSender:\r
+ case nsIMsgCompType.ForwardInline:\r
+ case nsIMsgCompType.ForwardAsAttachment:\r
+ var uriMsg = null;\r
+ if (args) {\r
+ uriMsg = args.originalMsgURI;\r
+ } else {\r
+ if (gMsgCompose) {\r
+ uriMsg = gMsgCompose.originalMsgURI;\r
+ }\r
+ } \r
+ ResetXimfhdrsDom();\r
+ XimfmailGetMessage(uriMsg, function (msgSrc,uriSrc) {\r
+ // Get Extended headers of messages and display known instances\r
+ var currentXimfHdrArray = XimfmailParseMessage(msgSrc);\r
+ var ximfMsg = new XimfmailMesssage();\r
+ if (ximfMsg.init(uriSrc,currentXimfHdrArray)) {\r
+ gConsole.logStringMessage("[ximfmail - XimfMsgCompose ] parse original message and load Ximf instance " + ximfMsg._instanceMsgXimf);\r
+ o.currentInstance = ximfMsg._instanceMsgXimf;\r
+ o.loadPanel();\r
+ ComputeWithForm(ximfMsg);\r
+ } else {\r
+ $("#ximfmailComposeMessageTitle").attr("value","");\r
+ $("#isUsingXimfail").attr("hidden","false");\r
+ HideSendMessageElements(true);\r
+ $("#addressingWidget").unbind("command",SpecialXimfRule_CheckAddress);\r
+ ReloadSecurityAccess();\r
+ }\r
+ });\r
+ break;\r
+ default :\r
+ // default instance of account loaded\r
+ o.currentInstance = prefBranch.getCharPref("ximfmail.composeMsg.instance");\r
+ gConsole.logStringMessage("[ximfmail - XimfMsgCompose ] load Ximf instance " + o.currentInstance);\r
+ o.loadPanel();\r
+ break;\r
+ }\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - XimfMsgCompose ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ } \r
+ },\r
+ loadPanel : function () {\r
+ gConsole.logStringMessage("[XimfMsgCompose:loadPanel ] XIMF instance : " + this.currentInstance);\r
+ try{\r
+ // reload security user functions\r
+ ReloadSecurityAccess();\r
+ }catch(e){}\r
+ \r
+ if (this.currentInstance) {\r
+ try {\r
+ gCurrentInstance = this.currentInstance;\r
+ if (null !== gXimfHdrs) {\r
+ gXimfHdrs = null;\r
+ }\r
+ gXimfHdrs = new XimfmailInstanceHeaders();\r
+ gXimfHdrs.init(gCurrentInstance);\r
+ gXimfHdrs.loadXimfSecurityRules(gCurrentIdentity);\r
+ InsertXimfhdrsDom(gXimfHdrs.getXimfInstanceResource(), ximfConst.CHROME_XSL_MSG_COMPOSE, this.catalog);\r
+ // controler init\r
+ LoadXimfhdrsEventObserver();\r
+ ExecuteXimfHdrsDefaultValuesRule();\r
+ InitSpecialXimfRules();\r
+ CheckXimfhdrsSelection();\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - InsertXimfmailComposer ] " + e +"\nline : " + e.lineNumber + " : "+ e + "\nfile : "+ Error().fileName);\r
+ }\r
+ }\r
+ // ximfmail composer is initialized, event-it\r
+ var event = document.createEvent('Events');\r
+ event.initEvent('compose-ximfmail-init', false, true);\r
+ document.getElementById("msgcomposeWindow").dispatchEvent(event);\r
+ }\r
+};\r
+/**\r
+ * wait for thunderbird context before initializing ximfmail composer\r
+ * @returns\r
+ */\r
+function ximfMsgComposeStarter() {\r
+ var maxNbStarter = 20;\r
+ gConsole.logStringMessage("[ximfmail - ximfMsgComposeStarter ]start try " + gcounterStarter + "/" + maxNbStarter + " - gCurrentIdentity = " + gCurrentIdentity.key);\r
+ if (!gCurrentIdentity) {\r
+ try{\r
+ // try to get identity\r
+ // copy code from LoadIdentity(startup) function of MsgComposeCommand.js file\r
+ var identityElement = document.getElementById("msgIdentity");\r
+ if (identityElement) {\r
+ gCurrentIdentity = MailServices.accounts.getIdentity(identityElement.value);\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - ximfMsgComposeStarter ] error : " + e);\r
+ }\r
+ gConsole.logStringMessage("[ximfmail - ximfMsgComposeStarter ] get gCurrentIdentity = " + gCurrentIdentity.key);\r
+ // I can't catch event on completely initialized compose message, so loop on gCurrentIdentity loaded\r
+ if (gcounterStarter < maxNbStarter) {\r
+ gcounterStarter++;\r
+ setTimeout(function() {\r
+ ximfMsgComposeStarter();\r
+ }, 50);\r
+ return;\r
+ }\r
+ }\r
+ // init XimfMsgCompose\r
+ gConsole.logStringMessage("[ximfmail - ximfMsgComposeStarter ] Init XimfMsgCompose with identity " + gCurrentIdentity.key);\r
+ XimfMsgCompose.preinit();\r
+}\r
+//init ximfmail document\r
+window.addEventListener("compose-window-reopen", function() {\r
+ XimfMsgCompose.init(); \r
+ }, true);\r
+window.addEventListener("compose-window-init", function() {\r
+ gConsole.logStringMessage("[ximfmail - ximfMsgComposeStarter ] compose-window-init event catched! ");\r
+ gcounterStarter = 1;\r
+ ximfMsgComposeStarter(); \r
+ }, true);\r
+// overload Trustedbird function : add verifications on security message\r
+SendMessage = function(){\r
+ if (CheckIfMustBSigned()) {\r
+ return false;\r
+ }\r
+ GenericSendMessage(nsIMsgCompDeliverMode.Now);\r
+};\r
+// overload Trustedbird function : add verifications on security message\r
+SendMessageLater = function() {\r
+ if(CheckIfMustBSigned()){\r
+ return false;\r
+ }\r
+ GenericSendMessage(nsIMsgCompDeliverMode.Later);\r
+};\r
+/*\r
+ * is XIMFMAIL message ?\r
+ * yes : check if message must be signed\r
+ * no : continue\r
+ */\r
+function CheckIfMustBSigned() {\r
+ try {\r
+ var arrSecureHdrs = CreateRulesArray(gCurrentInstance,"ximf:secureHeaders");\r
+ var arrSecurityLabelHdrs = CreateRulesArray(gCurrentInstance,"ximf:securityLabel");\r
+ if ((arrSecureHdrs.length > 0 || arrSecurityLabelHdrs.length > 0) && !gSMFields.signMessage) {\r
+ // current message must be secured\r
+ toggleSignMessage();\r
+ if (!gCurrentIdentity.getUnicharAttribute("signing_cert_name")) {\r
+ return true;\r
+ } else {\r
+ if (!gSMFields.signMessage) {\r
+ // certificate is set by user\r
+ toggleSignMessage();\r
+ }\r
+ }\r
+ }\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - SendMessage_Ximf ] not a ximf message... \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ }\r
+ return false;\r
+}
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!-- ***** BEGIN LICENSE BLOCK *****\r
+ - Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ - ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ -\r
+ -\r
+ - Redistribution and use, in source and binary forms, with or without modification,\r
+ - are permitted provided that the following conditons are met :\r
+ -\r
+ - 1. Redistributions of source code must retain the above copyright notice,\r
+ - 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ - in the redistribution of the source code.\r
+ - 3. Neither the names of the copyright holders nor the names of any contributors\r
+ - may be used to endorse or promote products derived from this software without specific\r
+ - prior written permission from EADS Defence and Security.\r
+ -\r
+ - Alternatively, the contents of this file may be used under the terms of\r
+ - either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ - or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ - in which case the provisions of the GPL or the LGPL are applicable instead\r
+ - of those above. If you wish to allow use of your version of this file only\r
+ - under the terms of either the GPL or the LGPL, and not to allow others to\r
+ - use your version of this file under the terms of the MPL, indicate your\r
+ - decision by deleting the provisions above and replace them with the notice\r
+ - and other provisions required by the GPL or the LGPL. If you do not delete\r
+ - the provisions above, a recipient may use your version of this file under\r
+ - the terms of any one of the MPL, the GPL or the LGPL.\r
+ -\r
+ - REMINDER :\r
+ - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ - IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ -\r
+ - EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ - ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ - \r
+ - Contributor(s):\r
+ - Copyright(c) Airbus Defence and Space 2014 - All rights reserved\r
+ - ***** END LICENSE BLOCK ***** -->\r
+\r
+<!-- Feuilles de style -->\r
+<?xml-stylesheet href="chrome://ximfmail/skin" type="text/css"?>\r
+\r
+<!-- Internationalisation -->\r
+<!DOCTYPE overlay SYSTEM "chrome://ximfmail/locale/ximfmail.dtd">\r
+\r
+<overlay id="ov-composeMsg"\r
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"\r
+ xmlns:html="http://www.w3.org/1999/xhtml">\r
+ <script type="application/javascript" src="chrome://ximfmail/content/jquery.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/constant-ximfmail.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/ximfCatalog.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/ximfmail.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/ximfDataSource.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/messageAnalyser-ximfmail.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/messengerComposeHeaders-ximfmail.js" />\r
+ <script type="application/javascript" src="chrome://ximfmail/content/ximfSpecial.js" />\r
+ <script type="application/javascript" src="chrome://messenger/content/messengercompose/addressingWidgetOverlay.js"/>\r
+ <script type="application/javascript" src="chrome://ximfmail/content/messengerCompose-ov-ximfmail.js" /> \r
+ <broadcasterset id="composeBroadcasters">\r
+ <broadcaster id="isShowingXimfail" hidden="false"/>\r
+ <broadcaster id="isUsingXimfail" hidden="false"/>\r
+ </broadcasterset>\r
+ <toolbox id="headers-box">\r
+ <toolbar insertbefore="FormatToolbar">\r
+ <vbox id="ximfmailComposeMessagePanel" observes="isUsingXimfail" flex="1">\r
+ <hbox id="ximfmailComposeMessageFocusBar" class="ximfmailFocusBar" flex="1" align="center">\r
+ <button class="ximfmailButton" id="ximfmailComposeMessageMaximize" tooltiptext="&ximfmail.compose.focus;" accesskey="+" hidden="true" />\r
+ <button class="ximfmailButton" id="ximfmailComposeMessageMinimize" tooltiptext="&ximfmail.compose.unfocus;" accesskey="-" />\r
+ <image id="ximfmailComposeMessageLogo"/>\r
+ <label id="ximfmailComposeMessageTitle" value="&ximfmail.compose.headerTab;" />\r
+ <spacer flex="1" />\r
+ </hbox>\r
+ <tabbox id="ximfmailComposeMessageHeadersTablist" observes="isShowingXimfail" handleCtrlTab="true" eventnode="parent"/>\r
+ </vbox>\r
+ </toolbar>\r
+ </toolbox>\r
+</overlay>
\ No newline at end of file
--- /dev/null
+/* ***** BEGIN LICENSE BLOCK *****\r
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ *\r
+ *\r
+ * Redistribution and use, in source and binary forms, with or without modification,\r
+ * are permitted provided that the following conditons are met :\r
+ *\r
+ * 1. Redistributions of source code must retain the above copyright notice,\r
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ * in the redistribution of the source code.\r
+ * 3. Neither the names of the copyright holders nor the names of any contributors\r
+ * may be used to endorse or promote products derived from this software without specific\r
+ * prior written permission from EADS Defence and Security.\r
+ *\r
+ * Alternatively, the contents of this file may be used under the terms of\r
+ * either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ * in which case the provisions of the GPL or the LGPL are applicable instead\r
+ * of those above. If you wish to allow use of your version of this file only\r
+ * under the terms of either the GPL or the LGPL, and not to allow others to\r
+ * use your version of this file under the terms of the MPL, indicate your\r
+ * decision by deleting the provisions above and replace them with the notice\r
+ * and other provisions required by the GPL or the LGPL. If you do not delete\r
+ * the provisions above, a recipient may use your version of this file under\r
+ * the terms of any one of the MPL, the GPL or the LGPL.\r
+ *\r
+ * REMINDER :\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ * ***** END LICENSE BLOCK ***** */\r
+gConsole.logStringMessage("[ximfmail] messengerComposeHeaders-ximfmail.js file loaded ");\r
+var gXimfHdrs = null;\r
+function onclosepanel() {\r
+ var lisitem = $("#search-panel checkbox");\r
+ var resString = "";\r
+ for (i=0;i<lisitem.length;++i) {\r
+ if (lisitem[i].hasAttribute("checked")) {\r
+ resString += $(lisitem[i]).attr("label")+ " | ";\r
+ }\r
+ }\r
+ var b = document.getElementById("txtpanel");\r
+ b.value = resString;\r
+}\r
+function XimfmailInstanceHeaders() {\r
+ //private:\r
+ var _instance = null;\r
+ var _ximfHdrArray = [];\r
+ var _xsmtpHdrArray = [];\r
+ var _eSSSecurityLabelHdrArray = [];\r
+ var _ximfAssociatedHdrArray = [];\r
+ var _ximfSpecialRulesArray = []; //FT 3504\r
+ //public:\r
+ if (typeof XimfmailInstanceHeaders.initialized === "undefined") {\r
+ XimfmailInstanceHeaders.prototype.init = function(ximfInstanceResource){\r
+ _instance = ximfInstanceResource;\r
+ _xsmtpHdrArray = CreateRulesArray(_instance,"ximf:compatibility");\r
+ _ximfAssociatedHdrArray = CreateRulesArray(_instance, "ximf:association");\r
+ _ximfSpecialRulesArray = CreateRulesArray(_instance, "ximf:special"); //FT 3504\r
+ };\r
+ XimfmailInstanceHeaders.prototype.getXimfInstanceResource = function(){\r
+ return _instance;\r
+ };\r
+ XimfmailInstanceHeaders.prototype.getXimfHdrArray = function(){\r
+ return _ximfHdrArray;\r
+ };\r
+ XimfmailInstanceHeaders.prototype.getXsmtpHdrArray = function(){\r
+ return _xsmtpHdrArray;\r
+ };\r
+ XimfmailInstanceHeaders.prototype.getXimfAssociatedHdrArray = function(){\r
+ return _ximfAssociatedHdrArray;\r
+ };\r
+ XimfmailInstanceHeaders.prototype.getESSSecurityLabelHdrArray = function(){\r
+ return _eSSSecurityLabelHdrArray;\r
+ };\r
+ //FT 3504\r
+ XimfmailInstanceHeaders.prototype.getSpecialRulesArray = function(){\r
+ return _ximfSpecialRulesArray;\r
+ };\r
+ XimfmailInstanceHeaders.prototype.loadXimfSecurityRules = function(identity){\r
+ var isForceSign = false;\r
+ // get secure state from prefs\r
+ if (!gSMFields) {\r
+ // use Trustedbird function to initialize gSMFields\r
+ onComposerReOpen();\r
+ }\r
+ // secure headers\r
+ try {\r
+ // create XMLFile at temp directory with rules datas\r
+ if (UpdateSecureHeadersFileSettings (_instance, identity)) {\r
+ // message with secure headers : force sign message\r
+ identity.setBoolAttribute("secureheaders.checked",true);\r
+ setSecureHeaderUI();\r
+ $("#secureHeaderStatus").attr("disabled","true");\r
+ $("#menu_securitySign1").attr("disabled","true");\r
+ $("#menu_securitySign2").attr("disabled","true");\r
+ isForceSign = true;\r
+ gConsole.logStringMessage("ximfmail - loadSecurityRules - secureHeaders on ");\r
+ } else {\r
+ gConsole.logStringMessage("ximfmail - loadSecurityRules - secureHeaders off ");\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - loadSecurityRules - secureHeaders] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ }\r
+ // Security Labels\r
+ try{\r
+ // create XMLFile at temp directory with rules datas\r
+ _eSSSecurityLabelHdrArray = CreateRulesArray(_instance,"ximf:securityLabel");\r
+ if (_eSSSecurityLabelHdrArray.length > 0) {\r
+ $("#menu_securityLabelDialog1").attr("checked","true");\r
+ $("#menu_securityLabelDialog1").attr("disabled","true");\r
+ $("#menu_securityLabelDialog2").attr("checked","true");\r
+ $("#menu_securityLabelDialog2").attr("disabled","true");\r
+\r
+ $("#menu_securitySign1").attr("checked","true");\r
+ $("#menu_securitySign1").attr("disabled","true");\r
+ $("#menu_securitySign2").attr("checked","true");\r
+ $("#menu_securitySign2").attr("disabled","true");\r
+ if (!gSMFields.signMessage && !isForceSign) {\r
+ toggleSignMessage();\r
+ // if certificate problem resolved, try to load ui signature\r
+ if (identity.getUnicharAttribute("signing_cert_name")&&!gSMFields.signMessage) {\r
+ toggleSignMessage();// certificate is set by user\r
+ }\r
+ }\r
+ gSMFields.securityClassification = -1;\r
+ gSMFields.privacyMark = "";\r
+ gSMFields.securityCategories = "";\r
+ gConsole.logStringMessage("ximfmail - loadSecurityRules - securityLabels on ");\r
+ } else {\r
+ gConsole.logStringMessage("ximfmail - loadSecurityRules - securityLabels off ");\r
+ }\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - loadSecurityRules - securityLabel] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ }\r
+ };\r
+ // init object\r
+ XimfmailInstanceHeaders.initialized = true;\r
+ }\r
+}\r
+function XimfDataSource() {\r
+ this._id; // xml file name path\r
+ this._dataSource;\r
+ this._refDataSource;\r
+}\r
+/*\r
+ * DOM MANIPULATIONS OF XIMFMAIL ELEMENTS\r
+ */\r
+function ResetXimfhdrsDom(){\r
+ try{\r
+ // delete old ximf items\r
+ $("#ximfmailComposeMessageHeadersTablist").empty();\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - ResetXimfhdrsDom ] " + e +"\nline : " + e.lineNumber + " : "+ e + "\nfile : "+ Error().fileName);\r
+ }\r
+}\r
+function InsertXimfhdrsDom(ximfInstanceResource, urlXslTemplate, ximfCatalog) {\r
+ // append to document ximfmail panel ihm\r
+ if(!ximfInstanceResource){\r
+ $("#isUsingXimfail").attr("hidden","true");\r
+ return;\r
+ }\r
+ if (ximfCatalog) {\r
+ $("#ximfmailComposeMessageTitle").attr("value",ximfCatalog.getLabelInstance(ximfInstanceResource));\r
+ } else {\r
+ $("#ximfmailComposeMessageTitle").attr("value","XIMFMAIL");\r
+ $("#ximfmailComposeMessageTitle").attr("tooltiptext",ximfInstanceResource);\r
+ }\r
+ try{\r
+ // Add XSLT result in MessengerCompose window\r
+ $("#ximfmailComposeMessageHeadersTablist").append(CreateDOMWithXimfInstance(ximfInstanceResource, urlXslTemplate));\r
+ }catch(e){\r
+ // TODO : alert user of xslt problem\r
+ gConsole.logStringMessage("[ximfmail - ResetXimfhdrsDom ] Error creating ximfmail panel :" + e +"\nline : " + e.lineNumber + " : "+ e + "\nfile : "+ Error().fileName);\r
+ ("#isUsingXimfail").attr("hidden","true");\r
+ }\r
+ // custom panels where maxitem=1 and contains composed elements\r
+ var arrPanel = $("panel[ximfmaxitem='1']");\r
+ for (var idxPnl=0; idxPnl < arrPanel.length; ++idxPnl) {\r
+ // checkboxes are used\r
+ var chkboxes = $("panel[id='"+arrPanel[idxPnl].id+"'] checkbox");\r
+ if (chkboxes.length >= 1) {\r
+ var mnuitems = $("panel[id='"+arrPanel[idxPnl].id+"'] menuitem");\r
+ for (var idxMnuItm=0; idxMnuItm < mnuitems.length; ++idxMnuItm) {\r
+ var chkbx = document.createElement("checkbox");\r
+ $(chkbx).attr("id",$(mnuitems[idxMnuItm]).attr("id"));\r
+ $(chkbx).attr("class","ximfCheckbox");\r
+ $(chkbx).attr("label",$(mnuitems[idxMnuItm]).attr("label"));\r
+ $(chkbx).attr("ximfvalue",$(mnuitems[idxMnuItm]).attr("ximfvalue"));\r
+ $(chkbx).attr("ximftextbox",$(mnuitems[idxMnuItm]).attr("ximftextbox"));\r
+ if (mnuitems[idxMnuItm].hasAttribute("ximftecvalue")) {\r
+ $(chkbx).attr("ximftecvalue",$(mnuitems[idxMnuItm]).attr("ximftecvalue"));\r
+ }\r
+ $(mnuitems[idxMnuItm].parentNode).append(chkbx);\r
+ $(mnuitems[idxMnuItm]).remove();\r
+ }\r
+ }\r
+ }\r
+ // custom input boxes\r
+ try {\r
+ var inputPopupList = $("textbox[class='ximfInputbox']");\r
+ for (var idxPpLst = 0; idxPpLst < inputPopupList.length; ++idxPpLst) {\r
+ var padre = inputPopupList[idxPpLst].parentNode;\r
+ if (padre.nodeName === "popup") {\r
+ padre.setAttribute("position", "overlap");\r
+ }\r
+ }\r
+ } catch(err) {}\r
+ // internationalisation of ximfmail context popup\r
+ try {\r
+ var gBundle = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Components.interfaces.nsIStringBundleService);\r
+ var stringBundle = gBundle.createBundle("chrome://ximfmail/locale/ximfmail.properties");\r
+ var contextMenuList = $("menuitem[class='ximfContext']");\r
+ for (var idxCtxtMnu=0; idxCtxtMnu<contextMenuList.length; ++idxCtxtMnu) {\r
+ var ilabel = contextMenuList[idxCtxtMnu].getAttribute("label");\r
+ var sLabel = stringBundle.GetStringFromName(ilabel);\r
+ if (sLabel !== "") {\r
+ contextMenuList[idxCtxtMnu].setAttribute("label",sLabel);\r
+ }\r
+ }\r
+ } catch(err) {}\r
+ // Custom Ximf Headers Dom\r
+ CustomXimfhdrsInputBox();\r
+ CustomXimfhdrsButton();\r
+ // append DOM elements to access external datas\r
+ CustomXimfhdrsTreeDialog();\r
+ // display Ximf elements\r
+ $("#isUsingXimfail").attr("hidden","false");\r
+}\r
+/*\r
+* change ximtextbox elements to edit box\r
+*/\r
+function CustomXimfhdrsInputBox() {\r
+ var listEditorClass = $("popup > textbox[class='ximfInputbox']");\r
+ for (var i = 0 ; i<listEditorClass.length ; ++i) {\r
+ try {\r
+ var idTxtBox = $(listEditorClass[i]).attr("ximfreftextbox");\r
+ var inputbox = $("textbox[id='"+idTxtBox+"']");\r
+ if ($(inputbox).attr("class") !== "ximfDatetime") {\r
+ var editor_button = $("textbox[id='"+idTxtBox+"']>button");\r
+ $(editor_button).attr("class","ximfmailButtonTxt ximfEditor");\r
+ $(editor_button).attr("tooltiptext",getIlkProperties("ximfmail.composer.editor.image"));\r
+ $(editor_button).attr("refbox",$(inputbox).attr("id"));\r
+ $(inputbox).attr("ximfmaxitems", $(listEditorClass[i]).attr("ximfmaxitems"));\r
+ $(inputbox).attr("ximfminitems", $(listEditorClass[i]).attr("ximfminitems"));\r
+ $(inputbox).attr("ximseparator", $(listEditorClass[i]).attr("ximseparator"));\r
+ $(inputbox).attr("tabindex",parseInt(i, 10)+100);\r
+ $(inputbox).attr("class","ximfEditor");\r
+ $(inputbox).removeAttr("popup");\r
+ $(inputbox).removeAttr("readonly");\r
+ }\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - CustomXimfhdrsInputBox ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ }\r
+ }\r
+ try {\r
+ // remove popup of free text\r
+ $("textbox[class='ximfEditor'] ~ popup").remove();\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - CustomXimfhdrsInputBox ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+ e.lineNumber);\r
+ }\r
+}\r
+/*\r
+ * Add international tooltiptext to button\r
+ */\r
+function CustomXimfhdrsButton() {\r
+ var listCalendarClass = $("button[class*='ximfDatepicker']");\r
+ for (var idxClndr = 0; idxClndr < listCalendarClass.length; ++idxClndr) {\r
+ try {\r
+ listCalendarClass[idxClndr].setAttribute("tooltiptext",getIlkProperties("ximfmail.composer.calendar.image"));\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - customizeCalendarBox ] \n " + e + "\nfile : " + Error().fileName+"\nline : " + e.lineNumber);\r
+ }\r
+ }\r
+ var listPopupClass = $("button[class*='ximfPopup']");\r
+ for (var idxPp = 0 ; idxPp < listPopupClass.length ; ++idxPp){\r
+ try{\r
+ listPopupClass[idxPp].setAttribute("tooltiptext",getIlkProperties("ximfmail.composer.popup.image"));\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - customizeCalendarBox ] \n " + e + "\nfile : " + Error().fileName+"\nline : " + e.lineNumber);\r
+ }\r
+ }\r
+}\r
+/*\r
+ * Add informations to load ximfTreeDialog\r
+ */\r
+function CustomXimfhdrsTreeDialog() {\r
+ var listTreeClass = $("box[class='ximfTreeDialog']");\r
+ for(var i = 0; i<listTreeClass.length;++i){\r
+ try {\r
+ var idTxtBox = listTreeClass[i].getAttribute("refBox");\r
+ // create DOM element to acces External Tree Dialog\r
+ var data_button = $("textbox[id='"+idTxtBox+"']>button");\r
+ data_button[0].setAttribute("class", "ximfmailButtonTxt ximfTreeDialog");// insert image in DOM\r
+ data_button[0].setAttribute("id","image-"+idTxtBox);\r
+ data_button[0].setAttribute("refBox",idTxtBox);\r
+ data_button[0].setAttribute("refExternal",listTreeClass[i].getAttribute("refExternal"));\r
+ data_button[0].setAttribute("tooltiptext",getIlkProperties("ximfmail.composer.treedlg.image"));\r
+ $("textbox[id='"+idTxtBox+"']").attr("refExternal",listTreeClass[i].getAttribute("refExternal"));\r
+ $("textbox[id='"+idTxtBox+"']").attr("refBox",idTxtBox);\r
+ $("textbox[id='"+idTxtBox+"']").removeAttr("popup");\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - createButtonsOfExternDatas ] \n " + e + "\nfile : " + Error().fileName+"\nline : " + e.lineNumber);\r
+ }\r
+ }\r
+}\r
+/*\r
+ * Switch On / Off Ximf DOM\r
+ */\r
+function ToogleXimfhdrsPanel(){\r
+ if ($("#isShowingXimfail").attr("hidden") === "true") {\r
+ $("#isShowingXimfail").attr("hidden","false");\r
+ $("#ximfmailComposeMessageMaximize").attr("hidden","true");\r
+ $("#ximfmailComposeMessageMinimize").attr("hidden","false");\r
+ // set focus on first tab\r
+ try{\r
+ var tbox = $("#ximfmailComposeMessageHeadersTablist textbox[class='ximfEditor']");\r
+ if(tbox){\r
+ $(tbox[0]).click();\r
+ }\r
+ } catch(e) {}\r
+ try {\r
+ var tab = $("#ximfmailComposeMessageHeadersTablist tab");\r
+ if(tab){\r
+ $(tab[0]).click();\r
+ }\r
+ } catch(e) {}\r
+ } else {\r
+ $("#isShowingXimfail").attr("hidden","true");\r
+ $("#ximfmailComposeMessageMaximize").attr("hidden","false");\r
+ $("#ximfmailComposeMessageMinimize").attr("hidden","true");\r
+ }\r
+};\r
+/*\r
+ * manage DOM elements to send message\r
+ */\r
+function HideSendMessageElements(isToSend) {\r
+ if (!isToSend) {\r
+ // ihm to unactive sending message\r
+ $("#button-send").attr("disabled", "true");\r
+ $("#menu_File menuitem[command='cmd_sendNow']").attr("hidden", "true");\r
+ $("#menu_File menuitem[key='key_sendLater']").attr("hidden", "true");\r
+ } else {\r
+ // ihm to active sending message\r
+ $("#button-send").removeAttr("disabled");\r
+ $("#menu_File menuitem[command='cmd_sendNow']").removeAttr("hidden");\r
+ $("#menu_File menuitem[key='key_sendLater']").removeAttr("hidden");\r
+ }\r
+}\r
+/*\r
+ * Open Window to select external datas\r
+ */\r
+ var _dataSourceArray = []; // array of ximfHdr : _ximfHdrArray[ximfHdr]\r
+ function OpenTreeDialog(element) {\r
+ var keyCat = element.getAttribute("refExternal");\r
+ var refBox = element.getAttribute("refBox");\r
+ var idxDatasSource = -1;\r
+ var rdfdataSource = null;\r
+ var refRdfdataSource = null;\r
+ // get/create RDF sources\r
+ try {\r
+ for (var idx_dataSourceArray = 0; idx_dataSourceArray < _dataSourceArray.length ; ++idx_dataSourceArray) {\r
+ if (keyCat === _dataSourceArray[idx_dataSourceArray]._id) {\r
+ idxDatasSource = idx_dataSourceArray;\r
+ }\r
+ }\r
+ if (idxDatasSource >= 0) {\r
+ rdfdataSource = _dataSourceArray[idxDatasSource]._dataSource;\r
+ refRdfdataSource = _dataSourceArray[idxDatasSource]._refDataSource;\r
+ } else {\r
+ // get xml schema from profile instance directory\r
+ var sCompletePath = getFilePathInProfile("extensions/"+ XimfCatalog.getInstance().getSchemaInstance(gXimfHdrs.getXimfInstanceResource()));\r
+ sCompletePath = sCompletePath.substring(0, sCompletePath.lastIndexOf("\\")+1) + keyCat;\r
+ var dir = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);\r
+ dir.initWithPath( sCompletePath );\r
+ if (!dir.exists()) {\r
+ return;\r
+ }\r
+ // create and save datasource\r
+ xDataSource = new XimfDataSource();\r
+ xDataSource._id = keyCat;\r
+ var res = CreateRdfDatasSource(sCompletePath);\r
+ rdfdataSource = res._dataSource;\r
+ xDataSource._dataSource = rdfdataSource;\r
+ refRdfdataSource = res._refDataSource;\r
+ xDataSource._refDataSource = refRdfdataSource;\r
+ _dataSourceArray.push(xDataSource);\r
+ }\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - addExternDatas ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+ e.lineNumber);\r
+ }\r
+ // push datas to new dialog window\r
+ try {\r
+ // get informations of datas to load\r
+ var eltTxtBox = document.getElementById(refBox);\r
+ var separator = eltTxtBox.getAttribute(ximfConst._XIMF_ATT_SEPARATOR);\r
+ var header = document.getElementById(eltTxtBox.getAttribute("refheader"));\r
+ // set informations of datas to load\r
+ var args = new XimfmailTreedialogArgs();\r
+ args.dataSource = rdfdataSource;\r
+ args.refdataSource = refRdfdataSource;\r
+ args.title = header.getAttribute("value");\r
+ args.maxItemsSelected = eltTxtBox.getAttribute(ximfConst._XIMF_ATT_MAX_ITEMS);\r
+ // push current selection\r
+ if (eltTxtBox.value) {\r
+ try {\r
+ var currentValue = eltTxtBox.value;\r
+ if (args.maxItemsSelected > 1 && separator !== "" ) {\r
+ var reg = new RegExp("["+separator+"]+", "g");\r
+ var arrayItems = currentValue.split(reg);\r
+ for(var idxItm=0 ; idxItm < arrayItems.length; ++idxItm){\r
+ if (arrayItems[idxItm] !== "") {\r
+ args.currentKeys.push(arrayItems[idxItm]);\r
+ }\r
+ }\r
+ } else {\r
+ args.currentKeys.push(currentValue);\r
+ if ($(eltTxtBox).attr("tooltiptext")) {\r
+ args.currentLabels.push($(eltTxtBox).attr("tooltiptext"));\r
+ }\r
+ }\r
+ }catch(ex){\r
+ gConsole.logStringMessage("[ximfmail - OpenTreeDialogBox_Svc ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ }\r
+ }\r
+ // open dialog\r
+ window.openDialog(ximfConst.CHROME_XSL_TREE_DIALOG,"showmore", "chrome,resizable,centerscreen,modal",args);\r
+ if (args.retIsCancel) {\r
+ gConsole.logStringMessage("[ximfmail - OpenTreeDialogBox_Svc ] selection has been canceled !");\r
+ return;\r
+ }\r
+ // get for user selection\r
+ if (args.retKeys.length > 1) {\r
+ var value = "";\r
+ for (var idxKey=0 ; idxKey < args.retKeys.length ; ++idxKey) {\r
+ if (value === "") {\r
+ value = args.retKeys[idxKey];\r
+ } else {\r
+ value = value + separator + args.retKeys[idxKey];\r
+ }\r
+ }\r
+ // set new list values\r
+ eltTxtBox.value = value;\r
+ $(eltTxtBox).attr("ximfvalue",value);\r
+ $(eltTxtBox).attr("tooltiptext","");\r
+ } else {\r
+ if (args.retKeys[0]) {\r
+ eltTxtBox.value = args.retKeys[0];\r
+ $(eltTxtBox).attr("ximfvalue",args.retKeys[0]); // used for mandatories headers control rules\r
+ $(eltTxtBox).attr("tooltiptext",args.retLabels[0]);\r
+ } else {\r
+ eltTxtBox.value = "";\r
+ $(eltTxtBox).attr("ximfvalue","");\r
+ $(eltTxtBox).attr("tooltiptext","");\r
+ }\r
+ }\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - addExternDatas ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+ e.lineNumber);\r
+ }\r
+}\r
+/*\r
+ * Open window to select datetime\r
+ */\r
+function OpenCalendarDialog(button) {\r
+ try {\r
+ // get informations of datas to load\r
+ var args = [];\r
+ var idBox = button.getAttribute("refBox");\r
+ var ebox = document.getElementById(idBox);\r
+ // args[0] : id de la textbox a enrichir\r
+ args.push(idBox);\r
+ // displayed date\r
+ args.push(ebox.value);\r
+ args.push($("label[id='"+ebox.getAttribute("refheader")+"']").attr("value"));\r
+ // open dialog\r
+ window.openDialog(ximfConst.CHROME_XSL_DLG_CALENDAR,"showmore", "chrome,resizable,centerscreen,modal",args);\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - openCalendarDialogBox ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+ e.lineNumber);\r
+ }\r
+}\r
+/*\r
+ * Open window text editor\r
+ */\r
+function OpenEditorDialog(button) {\r
+ try {\r
+ var args=[];\r
+ var idBox = button.getAttribute("refbox");\r
+ args.push(idBox);\r
+ var ebox = document.getElementById(idBox);\r
+ if (ebox) {\r
+ args.push(ebox.value);\r
+ args.push(ebox.getAttribute("ximfseparator"));\r
+ args.push(ebox.getAttribute("ximfmaxitems"));\r
+ args.push(ebox.getAttribute("ximfminitems"));\r
+ args.push($("label[id='"+ebox.getAttribute("refheader")+"']").attr("value"));\r
+ window.openDialog(ximfConst.CHROME_XSL_DLG_EDITOR,"showmore", "chrome,resizable,centerscreen,modal",args);\r
+ }\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - openEditorDialogBox ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+ e.lineNumber);\r
+ }\r
+}\r
+/*\r
+ * Open window with complete informations of ximf header\r
+ */\r
+function OpenInfoDialog(idBox) {\r
+ // get informations of datas to load\r
+ var args = [];\r
+ var txtBox = document.getElementById(idBox);\r
+ var hLabel = document.getElementById(txtBox.getAttribute("refheader"));\r
+ args.push(hLabel.getAttribute("value")); // args[0] : id de la textbox a enrichir\r
+ args.push(hLabel.getAttribute("ximfheader")); // args[1] : ref du catalogue a charger\r
+ args.push(txtBox.value); // args[2] : titre de la dialogbox\r
+ args.push(txtBox.getAttribute("ximfvalue")); // args[3] : description de la dialogbox\r
+ if (txtBox.hasAttribute("ximfseparator")) {\r
+ args.push(txtBox.getAttribute("ximfseparator"));\r
+ }\r
+ // open dialog\r
+ window.openDialog("chrome://ximfmail/content/dialogHdrInfo-ximfmail.xul","showmore", "chrome,resizable,centerscreen,modal",args);\r
+}\r
+/*\r
+ * EVENT MANAGER OF XIMFMAIL ELEMENTS\r
+ */\r
+function LoadXimfhdrsEventObserver () { \r
+ // animation on ximfmail panel\r
+ $("#ximfmailComposeMessageMaximize").bind("command",OnClickXimfhdrsBar);\r
+ $("#ximfmailComposeMessageMinimize").bind("command",OnClickXimfhdrsBar);\r
+ $("#ximfmailComposeMessageFocusBar").dblclick(OnClickXimfhdrsBar);\r
+ // command events on ximfmail elements\r
+ $("button[class='ximfButton']").bind("command",OnSelectButtonPopup);\r
+ $("menuitem[class='ximfOkSet']").bind("command",OnSelectCheckPopup);\r
+ $("textbox[class='XimfTextboxDisplay']").mouseover(OnHoverTextbox);\r
+ $("menuitem[class='ximfContext']").bind("command",OnSelectContextBox);\r
+ $("button[class*='ximfEraser']").bind("command",OnClickEraser);\r
+ $("button[class*='ximfTreeDialog']").bind("command",OnClickTreeDialogButton);\r
+ $("button[class*='ximfDatepicker']").bind("command",OnClickDatepicker);\r
+ $("textbox[class='ximfEditor']").click(OnXimfhdrsEditor);\r
+ $("textbox[class='ximfEditor']").bind("change",OnCheckXimfhdrsEditor);\r
+ $("button[class*='ximfEditor']").bind("command",OnClickEditorButton);\r
+ // check for mandatory ximf headers when editor texbox has changed\r
+ $("#ximfmailComposeMessageHeadersTablist textbox").bind("change", function() {\r
+ $(this).setAttribute("ximfvalue", $(this).value);\r
+ CheckXimfhdrsSelection();\r
+ });\r
+ // get complete information of ximf hdr\r
+ $("button[class*='ximfDetail']").bind("command", function() {\r
+ OpenInfoDialog($(this).attr("refLabel"));\r
+ });\r
+ // open panel under ximfmail textbox\r
+ $("button[class*='ximfPopup']").bind("command", function(evt) {\r
+ var panel = document.getElementById($(evt.currentTarget).attr("refpanel"));\r
+ $("#"+panel.id+" richlistitem").removeAttr("selected");\r
+ $("#"+panel.id+" richlistitem").removeAttr("current");\r
+ panel.openPopup(evt.currentTarget.parentNode, "after_start", 0, 0, false, false);\r
+ });\r
+ // menuitem selected for 1 entry header\r
+ $("menuitem[class*='ximfItem']").bind("command", function(evt) {\r
+ ComputeXimfhdrsMenuItem(evt.currentTarget);\r
+ var box = document.getElementById($(evt.currentTarget).attr("ximftextbox"));\r
+ document.getElementById($(box).attr("refpanel")).hidePopup();\r
+ });\r
+ // keyboard event on panel\r
+ $("panel").bind("keyup", function(evt) {\r
+ if (evt.keyCode === 13) {\r
+ var panel = evt.currentTarget;\r
+ var richlistitem = $("#" + evt.currentTarget.id + " richlistitem");\r
+ for (i=0;i<richlistitem.length;++i) {\r
+ if (richlistitem[i].selected) {\r
+ var nodes = richlistitem[i].childNodes;\r
+ for (j=0;j<nodes.length;++j) {\r
+ if(nodes[j].localName === "menuitem") {\r
+ ComputeXimfhdrsMenuItem(nodes[j]);\r
+ var box = document.getElementById($(nodes[j]).attr("ximftextbox"));\r
+ XimfailComposeCanClose();\r
+ document.getElementById($(box).attr("refpanel")).hidePopup();\r
+ return;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ document.getElementById(evt.currentTarget.id).hidePopup();\r
+ }\r
+ });\r
+ // checkbox panel is selected\r
+ $("panel checkbox").bind("command",function(evt) {\r
+ ComputePanelOfCheckboxSelection(evt.currentTarget.id);\r
+ });\r
+ // check richlistitem where ximfchild=true (ximf computestring)\r
+ $("panel").bind("popuphiding",function(evt) {\r
+ var CompstringItem = $("#" + evt.currentTarget.id + " richlistitem[ximfchild='true']");\r
+ for (i=0; i<CompstringItem.length; ++i) {\r
+ var chk1 = CompstringItem[i].firstElementChild;\r
+ if (chk1.localName === "checkbox" && chk1.checked && !IsAcceptableXimfCompstring(chk1.id)) {\r
+ chk1.checked = false;\r
+ chk1.removeAttribute("ximfchild");\r
+ ComputePanelOfCheckboxSelection(chk1.id);\r
+ }\r
+ }\r
+ });\r
+ // panel can accept more than 1 entry for header\r
+ $("panel").bind("popuphidden", function(evt) {\r
+ if (parseInt($(evt.currentTarget).attr("ximfmaxitem"), 10) > 1 ) {\r
+ // if panel has XIMF multiset implementation, don't compute it\r
+ var multisetPanel = $("#" + evt.currentTarget.id + " button[class='ximfButton']");\r
+ if (multisetPanel.length <=0) {\r
+ ComputeXimfhdrsMultivaluePanel(evt.currentTarget.id);\r
+ }\r
+ } else {\r
+ var nbChk = $("#" + evt.currentTarget.id + " checkbox");\r
+ if (nbChk.length > 0 ) {\r
+ ComputeXimfhdrsMultivaluePanel(evt.currentTarget.id);\r
+ }\r
+ }\r
+ XimfailComposeCanClose();\r
+ });\r
+ // panel - first entry must be selected before selecting composed item\r
+ $("panel").bind("popupshown",function(evt) {\r
+ if (parseInt($(evt.currentTarget).attr("ximfmaxitem"), 10) <= 1 ) {\r
+ return;\r
+ }\r
+ var richitems = $("#" + evt.currentTarget.id + " richlistbox" ).children("richlistitem");\r
+ for (var i=0 ; i<richitems.length; ++i) {\r
+ var chk1 = richitems[i].firstElementChild;\r
+ if (chk1.localName === "checkbox" && !chk1.checked){\r
+ var eltsChild = richitems[i].getElementsByTagName("checkbox");\r
+ for (j=0 ; j < eltsChild.length; ++j) {\r
+ $(eltsChild[j]).attr("disabled","true");\r
+ }\r
+ $(chk1).attr("disabled","false");\r
+ }\r
+ }\r
+ });\r
+ // remove css style from mouse item selections\r
+ $("#ximfmailComposeMessageHeadersTablist richlistitem").mouseout(function(evt) {\r
+ if (evt.currentTarget.hasAttribute("selected")) {\r
+ $(evt.currentTarget).removeAttr("selected");\r
+ }\r
+ });\r
+ // get document tab control, set focus to ximfmail tabbox\r
+ $(document).bind("keypress", function(evt) {\r
+ if (evt.keyCode === 9 && evt.target.id === "msgSubject") { // 9: tabuklation keycode\r
+ if (document.getElementById("ximfmailComposeMessageMinimize").hasAttribute("hidden")) {\r
+ $("#ximfmailComposeMessageMaximize").focus();\r
+ } else {\r
+ $("#ximfmailComposeMessageMinimize").focus();\r
+ }\r
+ }\r
+ }); \r
+}\r
+function OnClickXimfhdrsBar(evt) {\r
+ ToogleXimfhdrsPanel();\r
+}\r
+function OnSelectButtonPopup(evt) {\r
+ ComputeXimfhdrsButtonPopup(evt.currentTarget);\r
+}\r
+function OnSelectCheckPopup(evt) {\r
+ ComputeXimfhdrsCheckPopup(evt.currentTarget);\r
+}\r
+function OnClickEraser(evt) {\r
+ EraseAndComputeXimfhdrsTextbox(document.getElementById(evt.currentTarget.id).getAttribute("refValue"), false);\r
+ // valid document state\r
+ CheckXimfhdrsSelection();\r
+}\r
+function OnClickTreeDialogButton(evt) {\r
+ OpenTreeDialog(evt.currentTarget);\r
+ XimfailComposeCanClose();\r
+}\r
+function OnClickDatepicker(evt) {\r
+ OpenCalendarDialog(evt.currentTarget);\r
+ XimfailComposeCanClose();\r
+}\r
+function OnClickEditorButton(evt) {\r
+ OpenEditorDialog(evt.currentTarget);\r
+ CheckXimfhdrsSelection();\r
+ XimfailComposeCanClose();\r
+}\r
+function OnXimfhdrsEditor(evt) {\r
+ var id = evt.currentTarget.id;\r
+ var bx = document.getElementById(id);\r
+ bx.focus();\r
+}\r
+function OnHoverTextbox(evt) {\r
+ try {\r
+ elt = evt.currentTarget;\r
+ tooltext = elt.value;\r
+ if(tooltext !== ""){\r
+ elt.setAttribute("tooltiptext",tooltext);\r
+ }else{\r
+ elt.removeAttribute("tooltiptext");\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - OnHoverXimfTextbox ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+}\r
+/*\r
+ * Display context menu Ximfmail\r
+ */\r
+function OnSelectContextBox(evt) {\r
+ try{\r
+ idBox = evt.currentTarget.getAttribute("idbox");\r
+ var eltTextbox = document.getElementById(idBox);\r
+ switch (parseInt(evt.currentTarget.getAttribute("idx"), 10)) {\r
+ case 1:\r
+ // erase all selected values\r
+ EraseAndComputeXimfhdrsTextbox(eltTextbox.id, true);\r
+ break;\r
+ case 2:\r
+ // display datas of current XIMF header\r
+ if(eltTextbox.value !== ""){\r
+ OpenInfoDialog(idBox);\r
+ }\r
+ break;\r
+ default:\r
+ gConsole.logStringMessage("[ximfmail warning OnSelectXimfmailContextBox] \n unknown choice : "+eltTextbox.getAttribute("idx"));\r
+ break;\r
+ }\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - OnSelectXimfmailContextBox ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ }\r
+}\r
+function OnCheckXimfhdrsEditor(evt) {\r
+ try {\r
+ var domElt = evt.currentTarget;\r
+ var maxItems = domElt.getAttribute("ximfmaxitems");\r
+ var separatorItem = domElt.getAttribute("ximfseparator");\r
+ var labelHeader = document.getElementById(domElt.getAttribute("refheader")).getAttribute("value");\r
+ if(maxItems === "") {\r
+ return;\r
+ }\r
+ var dlgEditorXimf_maxItem_alert = maxItems + " "+ getIlkProperties("ximfmail.dialog.editor.warning.nbrows");\r
+ var arrayItem = domElt.value.split(separatorItem);\r
+ var nbItems = arrayItem.length;\r
+ if (parseInt(maxItems, 10)<arrayItem.length) {\r
+ nbItems = parseInt(maxItems, 10);\r
+ ximfAlert(labelHeader,dlgEditorXimf_maxItem_alert);\r
+ var newvalue = "";\r
+ for (var i=0 ; i<nbItems ; ++i) {\r
+ if (arrayItem[i] !== "") {\r
+ if (i===0) {\r
+ newvalue = arrayItem[i];\r
+ } else {\r
+ newvalue += separatorItem + arrayItem[i];\r
+ }\r
+ }\r
+ }\r
+ domElt.value = newvalue;\r
+ domElt.inputField = newvalue;\r
+ }\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - OnCheckXimfhdrsEditor ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ }\r
+}\r
+/*\r
+ * COMPUTE XIMFMAIL ELEMENTS AND UPDATE DOM\r
+ */\r
+function CheckXimfhdrsSelection() {\r
+ try {\r
+ var isRuleOk=true;\r
+ // apply generic rules\r
+ if (!ExecuteXimfHdrsAssociationRule()) {\r
+ isRuleOk=false;\r
+ }\r
+ if (!ExecuteXimfHdrsMandatoryRule()) {\r
+ isRuleOk=false;\r
+ }\r
+ AppendESSSecuityLabel();\r
+ HideSendMessageElements(isRuleOk);\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - IsReadyToSend ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+}\r
+/*\r
+ * Update Ximf header selected from multi choice panel\r
+ */\r
+function ComputeXimfhdrsMultivaluePanel(idPanel) {\r
+ try {\r
+ var panel = document.getElementById(idPanel);\r
+ var ximfSeparator = $(panel).attr("ximfseparator");\r
+ var ximfTecSeparator = $(panel).attr("ximftecseparator");\r
+ var selectionObject = new Object;\r
+ selectionObject.value = "";\r
+ selectionObject.ximfvalue = "";\r
+ selectionObject.ximftecvalue = "";\r
+ var listRichBox = panel.getElementsByTagName("richlistbox");\r
+ var childnodes = listRichBox[0].childNodes;\r
+ for (var i = 0 ; i < childnodes.length ; i++) {\r
+ if (childnodes[i].localName === "richlistitem") {\r
+ var selectionItem = GetXimfSelectionOfRichlistitem(childnodes[i],ximfSeparator,ximfTecSeparator);\r
+ if (selectionItem) {\r
+ if (selectionItem.value !== "") {\r
+ if (selectionObject.value === "") {\r
+ selectionObject.value = selectionItem.value;\r
+ selectionObject.ximfvalue = selectionItem.ximfvalue;\r
+ if (selectionItem.ximftecvalue !== "") {\r
+ selectionObject.ximftecvalue = selectionItem.ximftecvalue;\r
+ }\r
+ } else {\r
+ selectionObject.value += ximfSeparator + selectionItem.value;\r
+ selectionObject.ximfvalue += ximfSeparator + selectionItem.ximfvalue;\r
+ if (selectionItem.ximftecvalue !== "") {\r
+ selectionObject.ximftecvalue += ximfTecSeparator + selectionItem.ximftecvalue;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ // save selection to ximfhdr textbox\r
+ var hdrTextbox = document.getElementById($(panel).attr("ximfreftextbox"));\r
+ hdrTextbox.value = selectionObject.value;\r
+ $(hdrTextbox).attr("ximfvalue",selectionObject.ximfvalue);\r
+ $(hdrTextbox).attr("ximfseparator",ximfSeparator);\r
+ if (selectionObject.ximftecvalue !== "") {\r
+ $(hdrTextbox).attr("ximftecvalue",selectionObject.ximftecvalue);\r
+ $(hdrTextbox).attr("ximftecseparator",ximfTecSeparator);\r
+ }\r
+ } catch (e) {\r
+ gConsole.logStringMessage("[ximfmail - ComputeXimfhdrsMultivaluePanel ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+ e.lineNumber);\r
+ }\r
+}\r
+/*\r
+ * Get XIMF informations of composed element\r
+ */\r
+function GetXimfSelectionOfRichlistitem(richItem,cSeparator,cTecSeparator) {\r
+ var selectionObject = new Object;\r
+ selectionObject.value = "";\r
+ selectionObject.ximfvalue = "";\r
+ selectionObject.ximftecvalue = "";\r
+ selectionObject.separator = "";\r
+ selectionObject.tecseparator = "";\r
+ try {\r
+ var childnodes = richItem.childNodes;\r
+ // single element to decode\r
+ if (childnodes.length === 1) {\r
+ return GetXimfValuesOfRichlistItem(childnodes[0]);\r
+ }\r
+ // multi element to decode\r
+ if (!GetXimfValuesOfRichlistItem(childnodes[0])) {\r
+ return selectionObject;\r
+ }\r
+ // create array of user informations\r
+ var arrSlaveItems = new Array();\r
+ var masterItem = null;\r
+ for (var idxChilNd=0 ; idxChilNd < childnodes.length ; idxChilNd++) {\r
+ switch (childnodes[idxChilNd].localName) {\r
+ case "checkbox" :\r
+ var item = GetXimfValuesOfRichlistItem(childnodes[idxChilNd]);\r
+ if (item) {\r
+ masterItem = item;\r
+ }\r
+ break;\r
+ case "vbox":\r
+ var childnodes2 = childnodes[idxChilNd].childNodes;\r
+ for (var idxChilNd2 = 0 ; idxChilNd2 < childnodes2.length ; idxChilNd2++) {\r
+ var item = GetXimfValuesOfRichlistItem(childnodes2[idxChilNd2].firstChild);\r
+ if (item) {\r
+ arrSlaveItems.push(item);\r
+ }\r
+ }\r
+ break;\r
+ default:\r
+ var item = GetXimfValuesOfRichlistItem(childnodes[idxChilNd]);\r
+ if (item) {\r
+ arrSlaveItems.push(item);\r
+ }\r
+ }\r
+ }\r
+ // format Ximf informations\r
+ if (arrSlaveItems.length > 0 && masterItem !== null) {\r
+ var newvalue = undefined;\r
+ var newximfvalue = undefined;\r
+ var newximftecvalue = undefined;\r
+ if (masterItem.bfactorise) {\r
+ for (var idxSlvItm = 0 ; idxSlvItm < arrSlaveItems.length ; ++idxSlvItm) {\r
+ // concat linked values\r
+ if (masterItem.id === arrSlaveItems[idxSlvItm].concatid) {\r
+ if ( newvalue === undefined) {\r
+ newvalue = arrSlaveItems[idxSlvItm].value;\r
+ newximfvalue = arrSlaveItems[idxSlvItm].ximfvalue;\r
+\r
+ } else {\r
+ newvalue += masterItem.separator + arrSlaveItems[idxSlvItm].value;\r
+ newximfvalue += masterItem.separator + arrSlaveItems[idxSlvItm].ximfvalue;\r
+ }\r
+ }\r
+ // technical value formating\r
+ if (masterItem.ximftecvalue !== "" || arrSlaveItems[idxSlvItm].ximftecvalue !== "") {\r
+ newximftecvalue = masterItem.ximftecvalue + masterItem.tecseparator + arrSlaveItems[idxSlvItm].ximftecvalue;\r
+ if (newximftecvalue !== undefined) {\r
+ if (selectionObject.ximftecvalue === "" ) {\r
+ selectionObject.ximftecvalue = newximftecvalue;\r
+ } else {\r
+ selectionObject.ximftecvalue += cTecSeparator + newximftecvalue;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ // factorize master item with slaves\r
+ if (!masterItem.bpositionend) {\r
+ newvalue = masterItem.value + " " + newvalue;\r
+ newximfvalue = masterItem.ximfvalue + " " + newximfvalue;\r
+ } else {\r
+ newvalue = newvalue + " " + masterItem.value;\r
+ newximfvalue = newximfvalue + " " + masterItem.ximfvalue;\r
+ }\r
+ // set compstring items\r
+ if (selectionObject.value === "") {\r
+ selectionObject.value = newvalue;\r
+ selectionObject.ximfvalue = newximfvalue;\r
+ } else {\r
+ selectionObject.value += cSeparator + newvalue;\r
+ selectionObject.ximfvalue += cSeparator + newximfvalue;\r
+ }\r
+ } else {\r
+ for (var i = 0 ; i < arrSlaveItems.length ; ++i) {\r
+ // concat linked values and create formated information\r
+ if (masterItem.id === arrSlaveItems[i].concatid) {\r
+ if (!masterItem.bpositionend) {\r
+ newvalue = masterItem.value + masterItem.separator + arrSlaveItems[i].value;\r
+ newximfvalue = masterItem.ximfvalue + masterItem.separator + arrSlaveItems[i].ximfvalue;\r
+ } else {\r
+ newvalue = arrSlaveItems[i].value + masterItem.separator + masterItem.value;\r
+ newximfvalue = arrSlaveItems[i].ximfvalue + masterItem.separator + masterItem.ximfvalue;\r
+ }\r
+ // technical value formating\r
+ if (masterItem.ximftecvalue !== "" || arrSlaveItems[i].ximftecvalue !== "") {\r
+ newximftecvalue = masterItem.ximftecvalue + masterItem.tecseparator + arrSlaveItems[i].ximftecvalue;\r
+ }\r
+ // set compstring items\r
+ if (selectionObject.value === "") {\r
+ selectionObject.value = newvalue;\r
+ selectionObject.ximfvalue = newximfvalue;\r
+ if (newximftecvalue !== undefined) {\r
+ selectionObject.ximftecvalue = newximftecvalue;\r
+ }\r
+ } else {\r
+ selectionObject.value += cSeparator + newvalue;\r
+ selectionObject.ximfvalue += cSeparator + newximfvalue;\r
+ if (newximftecvalue !== undefined) {\r
+ selectionObject.ximftecvalue += cTecSeparator + newximftecvalue;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ } else {\r
+ // case 1 item is used in item selection\r
+ if (masterItem.value !== "") {\r
+ selectionObject.value += masterItem.value;\r
+ selectionObject.ximfvalue += masterItem.ximfvalue;\r
+ if (masterItem.ximftecvalue !== "") {\r
+ selectionObject.ximftecvalue += masterItem.ximftecvalue;\r
+ }\r
+ }\r
+ }\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - GetXimfSelectionOfRichlistitem ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ }\r
+ return selectionObject;\r
+}\r
+/*\r
+ * get iformations of element selected by user\r
+ */\r
+function GetXimfValuesOfRichlistItem(richItem){\r
+ var oItem = new Object;\r
+ oItem.id = "";\r
+ oItem.concatid = "";\r
+ oItem.value = "";\r
+ oItem.ximfvalue = "";\r
+ oItem.ximftecvalue = "";\r
+ oItem.separator = "";\r
+ oItem.tecseparator = "";\r
+ oItem.bfactorise = false;\r
+ oItem.bpositionend = false;\r
+ try{\r
+ switch (richItem.localName) {\r
+ case "checkbox" :\r
+ if (richItem.hasAttribute("checked")) {\r
+ oItem.value = richItem.getAttribute("label");\r
+ oItem.ximfvalue = richItem.getAttribute("ximfvalue");\r
+ if (richItem.hasAttribute("ximftecvalue")) {\r
+ oItem.ximftecvalue = richItem.getAttribute("ximftecvalue");\r
+ }\r
+ if (richItem.hasAttribute("ximfseparator")) {\r
+ oItem.separator = richItem.getAttribute("ximfseparator");\r
+ }\r
+ if (richItem.hasAttribute("ximftecseparator")) {\r
+ oItem.tecseparator = richItem.getAttribute("ximftecseparator");}\r
+ if (richItem.hasAttribute("id")) {\r
+ oItem.id = richItem.getAttribute("id");\r
+ }\r
+ if (richItem.hasAttribute("ximfconcatid")) {\r
+ oItem.concatid = richItem.getAttribute("ximfconcatid");\r
+ }\r
+ if (richItem.hasAttribute("ximfcompositionend")) {\r
+ oItem.bpositionend = richItem.getAttribute("ximfcompositionend") === "true" ? true : false;\r
+ }\r
+ if (richItem.hasAttribute("ximffactorise")) {\r
+ oItem.bfactorise = richItem.getAttribute("ximffactorise") === "true" ? true : false;\r
+ }\r
+ }\r
+ break;\r
+ case "textbox" :\r
+ if (richItem.value !== "") {\r
+ oItem.value = richItem.value;\r
+ oItem.ximfvalue = richItem.value;\r
+ if (richItem.hasAttribute("ximfseparator")) {\r
+ oItem.separator = richItem.getAttribute("ximfseparator");\r
+ }\r
+ if (richItem.hasAttribute("id")) {\r
+ oItem.id = richItem.getAttribute("id");\r
+ }\r
+ if (richItem.hasAttribute("ximfconcatid")) {\r
+ oItem.concatid = richItem.getAttribute("ximfconcatid");\r
+ }\r
+ }\r
+ break;\r
+ }\r
+ if (oItem.value === "") {\r
+ oItem = null;\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - GetXimfSelectionOfRichlistitem ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ return oItem;\r
+}\r
+/*\r
+ * Update Ximf header selected from single choice panel\r
+ */\r
+function ComputeXimfhdrsMenuItem(menuitem) {\r
+ try{\r
+ var iMaxItems = 0;\r
+ var sXimfseparator = ximfConst._XIMF_DEFAULT_SEPARATOR;\r
+ var eltTextbox = document.getElementById(menuitem.getAttribute("ximftextbox"));\r
+ // CheckXimfhdrsSelection for list with finished elements number\r
+ if (eltTextbox.hasAttribute(ximfConst._XIMF_ATT_MAX_ITEMS)) {\r
+ iMaxItems = parseInt(eltTextbox.getAttribute(ximfConst._XIMF_ATT_MAX_ITEMS),10);\r
+ }\r
+ // CheckXimfhdrsSelection for separator value\r
+ if (eltTextbox.hasAttribute(ximfConst._XIMF_ATT_SEPARATOR)) {\r
+ sXimfseparator = eltTextbox.getAttribute(ximfConst._XIMF_ATT_SEPARATOR);\r
+ }\r
+ // CheckXimfhdrsSelection for concated values\r
+ var sConcatVal="";\r
+ var sConcatXimfVal="";\r
+ var sConcatTecVal="";\r
+ var sContentSeparator = ximfConst._XIMF_DEFAULT_SEPARATOR;\r
+ var sContenTecSeparator = ximfConst._XIMF_DEFAULT_SEPARATOR;\r
+ if (menuitem.hasAttribute(ximfConst._XIMF_ATT_CONCAT_ID)) {\r
+ if (menuitem.hasAttribute(ximfConst._XIMF_ATT_SEPARATOR)) {\r
+ sContentSeparator = menuitem.getAttribute(ximfConst._XIMF_ATT_SEPARATOR);\r
+ } else {\r
+ if (menuitem.parentNode.hasAttribute(ximfConst._XIMF_ATT_SEPARATOR)) {\r
+ sContentSeparator = menuitem.parentNode.getAttribute(ximfConst._XIMF_ATT_SEPARATOR);\r
+ }\r
+ }\r
+ if (menuitem.hasAttribute(ximfConst._XIMF_ATT_TEC_SEPARATOR)) {\r
+ sContenTecSeparator = menuitem.getAttribute(ximfConst._XIMF_ATT_TEC_SEPARATOR);\r
+ } else {\r
+ if (menuitem.parentNode.hasAttribute(ximfConst._XIMF_ATT_TEC_SEPARATOR)) {\r
+ sContenTecSeparator = menuitem.parentNode.getAttribute(ximfConst._XIMF_ATT_TEC_SEPARATOR);\r
+ }\r
+ }\r
+ var sIds = menuitem.getAttribute(ximfConst._XIMF_ATT_CONCAT_ID);\r
+ var reg=new RegExp("[+]+", "g");\r
+ var arrayIds = sIds.split(reg);\r
+ for (var i=0; i<arrayIds.length; i++) {\r
+ try{\r
+ var cElt = document.getElementById(arrayIds[i]);\r
+ if (cElt) {\r
+ if (sConcatVal === "") {\r
+ sConcatVal = cElt.getAttribute("label");\r
+ sConcatXimfVal = cElt.getAttribute(ximfConst._XIMF_ATT_XVALUE);\r
+ sConcatTecVal = cElt.getAttribute(ximfConst._XIMF_ATT_TEC_VALUE);\r
+ } else {\r
+ sConcatVal = sConcatVal + sContentSeparator + cElt.getAttribute("label");\r
+ sConcatXimfVal = sConcatXimfVal + sContentSeparator + cElt.getAttribute(ximfConst._XIMF_ATT_XVALUE);\r
+ sConcatTecVal = sConcatTecVal + sContenTecSeparator + cElt.getAttribute(ximfConst._XIMF_ATT_TEC_VALUE);\r
+ }\r
+ }\r
+ }catch(e){}\r
+ }\r
+ }\r
+ // replace existing value if exits\r
+ var sOldximfvalue = eltTextbox.getAttribute(ximfConst._XIMF_ATT_XVALUE);\r
+ eltTextbox.value = sConcatVal + menuitem.getAttribute("label");\r
+ eltTextbox.setAttribute(ximfConst._XIMF_ATT_XVALUE, sConcatXimfVal + menuitem.getAttribute(ximfConst._XIMF_ATT_XVALUE));\r
+ // watch for technical value\r
+ if (menuitem.hasAttribute(ximfConst._XIMF_ATT_TEC_VALUE)) {\r
+ eltTextbox.setAttribute(ximfConst._XIMF_ATT_TEC_VALUE, sConcatTecVal + menuitem.getAttribute(ximfConst._XIMF_ATT_TEC_VALUE));\r
+ }\r
+ //erase old linkPopup case and new selection\r
+ if (sOldximfvalue !== "" && sOldximfvalue !== menuitem.getAttribute(ximfConst._XIMF_ATT_XVALUE)) {\r
+ var sOldlinkpopup = $("panel[id='"+ eltTextbox.getAttribute("refpanel")+"'] menuitem[ximfvalue='"+sOldximfvalue+"']").attr(ximfConst._XIMF_ATT_LINK_POPUP_BOX);\r
+ EraseAndComputeXimfhdrsTextbox($("panel[id='"+ sOldlinkpopup +"']").attr(ximfConst._XIMF_ATT_REF_BOX));\r
+ // delete popup link in textbox\r
+ $("textbox[id='" + $("panel[id='"+ sOldlinkpopup +"']").attr(ximfConst._XIMF_ATT_REF_BOX) + "']").removeAttr("refpanel");\r
+ $("textbox[id='" + $("panel[id='"+ sOldlinkpopup +"']")+ " button").removeAttr("refpanel");\r
+ }\r
+ // manage popup of link header\r
+ if (menuitem.hasAttribute(ximfConst._XIMF_ATT_LINK_POPUP_BOX)) {\r
+ var popupset = document.getElementById(menuitem.getAttribute(ximfConst._XIMF_ATT_LINK_POPUP_BOX));\r
+ var txtbox = document.getElementById(popupset.getAttribute(ximfConst._XIMF_ATT_REF_BOX));\r
+ txtbox.setAttribute("refpanel",menuitem.getAttribute(ximfConst._XIMF_ATT_LINK_POPUP_BOX));\r
+ $("textbox[id='" + txtbox.getAttribute("id") + "'] button").attr("refpanel",menuitem.getAttribute(ximfConst._XIMF_ATT_LINK_POPUP_BOX));\r
+ }\r
+ // valid document state\r
+ CheckXimfhdrsSelection();\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - OnSelectXimfItem ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+}\r
+/*\r
+ * Update Ximf header selected in menu popup with button\r
+ */\r
+function ComputeXimfhdrsButtonPopup(button){\r
+ // Add selection and associated values for header from button popup\r
+ try{\r
+ var sXimfValues="";\r
+ var sValues="";\r
+ var sXimfTechnicalValues="";\r
+ var ximfvalue = "";\r
+ var value = "";\r
+ var ximftechnicalvalue="";\r
+ var sContentSeparator = ximfConst._XIMF_DEFAULT_SEPARATOR;\r
+ var sContenTecSeparator = ximfConst._XIMF_DEFAULT_SEPARATOR;\r
+ var eltTextbox = document.getElementById(button.getAttribute("ximfreftextbox"));\r
+ sXimfValues = eltTextbox.getAttribute(ximfConst._XIMF_ATT_XVALUE);\r
+ sValues = eltTextbox.value;\r
+ sXimfTechnicalValues = eltTextbox.getAttribute(ximfConst._XIMF_ATT_TEC_VALUE);\r
+ // CheckXimfhdrsSelection for concated values\r
+ if (button.hasAttribute(ximfConst._XIMF_ATT_CONCAT_ID)) {\r
+ var sIds = button.getAttribute(ximfConst._XIMF_ATT_CONCAT_ID);\r
+ var reg=new RegExp("[+]+", "g");\r
+ var arrayIds = sIds.split(reg);\r
+ for (var i=0; i<arrayIds.length; i++){\r
+ var cElt = document.getElementById(arrayIds[i]);\r
+ if (cElt) {\r
+ if (cElt.hasAttribute(ximfConst._XIMF_ATT_SEPARATOR)) {\r
+ sContentSeparator = cElt.getAttribute(ximfConst._XIMF_ATT_SEPARATOR);\r
+ }\r
+ if (cElt.hasAttribute(ximfConst._XIMF_ATT_TEC_SEPARATOR)) {\r
+ sContenTecSeparator = cElt.getAttribute(ximfConst._XIMF_ATT_TEC_SEPARATOR);\r
+ }\r
+ if (value === "") {\r
+ value = cElt.getAttribute("label") + sContentSeparator;\r
+ ximfvalue = cElt.getAttribute(ximfConst._XIMF_ATT_XVALUE) + sContentSeparator;\r
+ ximftechnicalvalue = cElt.getAttribute(ximfConst._XIMF_ATT_TEC_VALUE) + sContenTecSeparator;\r
+ } else {\r
+ value = value + cElt.getAttribute("label") + sContentSeparator ;\r
+ ximfvalue = ximfvalue + cElt.getAttribute(ximfConst._XIMF_ATT_XVALUE) + sContentSeparator ;\r
+ ximftechnicalvalue = ximftechnicalvalue + cElt.getAttribute(ximfConst._XIMF_ATT_TEC_VALUE) + sContenTecSeparator ;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ // get default parameters\r
+ if (button.hasAttribute(ximfConst._XIMF_ATT_SEPARATOR)) {\r
+ sContentSeparator = button.getAttribute(ximfConst._XIMF_ATT_SEPARATOR);\r
+ }\r
+ if (button.hasAttribute(ximfConst._XIMF_ATT_TEC_SEPARATOR)) {\r
+ sContenTecSeparator = button.getAttribute(ximfConst._XIMF_ATT_TEC_SEPARATOR);\r
+ }\r
+ if (sValues !== "") {\r
+ sValues = sValues + sContentSeparator + value + button.getAttribute("label");\r
+ sXimfValues = sXimfValues + sContentSeparator + ximfvalue + button.getAttribute(ximfConst._XIMF_ATT_XVALUE);\r
+ sXimfTechnicalValues = sXimfTechnicalValues + sContenTecSeparator + ximftechnicalvalue + button.getAttribute(ximfConst._XIMF_ATT_TEC_VALUE);\r
+ } else {\r
+ sValues = value + button.getAttribute("label");\r
+ sXimfValues = ximfvalue + button.getAttribute(ximfConst._XIMF_ATT_XVALUE);\r
+ sXimfTechnicalValues = ximftechnicalvalue + button.getAttribute(ximfConst._XIMF_ATT_TEC_VALUE);\r
+ }\r
+ // load new values\r
+ eltTextbox.setAttribute(ximfConst._XIMF_ATT_XVALUE,sXimfValues);\r
+ eltTextbox.value=sValues;\r
+ CheckXimfhdrsSelection();\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - OnSelectXimfButton ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+}\r
+/*\r
+ * Update Ximf header selected in menu popup with CheckXimfhdrsSelection\r
+ */\r
+function ComputeXimfhdrsCheckPopup(xulElement) {\r
+ //CheckXimfhdrsSelection all selected values and add to ximf box\r
+ try {\r
+ var sXimfValues="";\r
+ var sValues="";\r
+ var sXimfTechnicalValues="";\r
+ var sContentSeparator = ximfConst._XIMF_DEFAULT_SEPARATOR;\r
+ var sContenTecSeparator = ximfConst._XIMF_DEFAULT_SEPARATOR;\r
+ var sConcatSeparator = ximfConst._XIMF_DEFAULT_SEPARATOR;\r
+ var sConcatTecSeparator = ximfConst._XIMF_DEFAULT_SEPARATOR;\r
+ var nextElt = null;\r
+ var idTextBox = "";\r
+ var parentElt = null;\r
+ nextElt = xulElement.parentNode;\r
+ var arrayCheckedbox = null;\r
+ while (nextElt) {\r
+ if (nextElt.localName === "popup") {\r
+ arrayCheckedbox = $("popup[id='"+nextElt.id+"'] checkbox[class='ximfCheckbox'][checked]" );\r
+ // id of parent node\r
+ idTextBox = nextElt.getAttribute('ximfreftextbox');\r
+ parentElt = nextElt;\r
+ // get default parameters\r
+ if (parentElt.hasAttribute(ximfConst._XIMF_ATT_SEPARATOR)) {\r
+ sContentSeparator = parentElt.getAttribute(ximfConst._XIMF_ATT_SEPARATOR);\r
+ }\r
+ if (parentElt.hasAttribute(ximfConst._XIMF_ATT_TEC_SEPARATOR)) {\r
+ sContenTecSeparator = parentElt.getAttribute(ximfConst._XIMF_ATT_TEC_SEPARATOR);\r
+ }\r
+ break;\r
+ }\r
+ nextElt = nextElt.parentNode;\r
+ }\r
+ // get value of each checkbox selected\r
+ var ximfvalue = "";\r
+ var value = "";\r
+ var ximftechnicalvalue="";\r
+ var concatvalue = "";\r
+ var ximfconcatvalue = "";\r
+ var ximfconcattechnicalvalue = "";\r
+ var sIds = "";\r
+ var arrayIds = undefined;\r
+ var cElt = undefined;\r
+ for ( var idxChkBx=0 ; idxChkBx < arrayCheckedbox.length; ++idxChkBx) {\r
+ ximfvalue = "";\r
+ value = "";\r
+ ximftechnicalvalue="";\r
+ concatvalue = "";\r
+ ximfconcatvalue = "";\r
+ ximfconcattechnicalvalue = "";\r
+ if (arrayCheckedbox[idxChkBx].hasAttribute("label")) {\r
+ value = arrayCheckedbox[idxChkBx].getAttribute("label");\r
+ }\r
+ if (arrayCheckedbox[idxChkBx].hasAttribute(ximfConst._XIMF_ATT_XVALUE)) {\r
+ ximfvalue = arrayCheckedbox[idxChkBx].getAttribute(ximfConst._XIMF_ATT_XVALUE);\r
+ }\r
+ if (arrayCheckedbox[idxChkBx].hasAttribute(ximfConst._XIMF_ATT_TEC_VALUE)) {\r
+ ximftechnicalvalue = arrayCheckedbox[idxChkBx].getAttribute(ximfConst._XIMF_ATT_TEC_VALUE);\r
+ }\r
+ // search for XIMF ComplexString\r
+ if (arrayCheckedbox[idxChkBx].hasAttribute(ximfConst._XIMF_ATT_CONCAT_ID)) {\r
+ sIds = arrayCheckedbox[idxChkBx].getAttribute(ximfConst._XIMF_ATT_CONCAT_ID);\r
+ var reg=new RegExp("[+]+", "g");\r
+ arrayIds = sIds.split(reg);\r
+ for (var idxIds=0; idxIds < arrayIds.length; ++idxIds) {\r
+ cElt = document.getElementById(arrayIds[idxIds]);\r
+ if (cElt) {\r
+ if (cElt.hasAttribute(ximfConst._XIMF_ATT_SEPARATOR)) {\r
+ sConcatSeparator = cElt.getAttribute(ximfConst._XIMF_ATT_SEPARATOR);\r
+ }\r
+ if (cElt.hasAttribute(ximfConst._XIMF_ATT_TEC_SEPARATOR)) {\r
+ sConcatTecSeparator = cElt.getAttribute(ximfConst._XIMF_ATT_TEC_SEPARATOR);\r
+ }\r
+ if (cElt.getAttribute(ximfConst._XIMF_ATT_XVALUE)) {\r
+ if (concatvalue === "") {\r
+ concatvalue = cElt.getAttribute("label") + sConcatSeparator;\r
+ ximfconcatvalue = cElt.getAttribute(ximfConst._XIMF_ATT_XVALUE) + sConcatSeparator ;\r
+ if (cElt.hasAttribute(ximfConst._XIMF_ATT_TEC_VALUE)) {\r
+ ximfconcattechnicalvalue = cElt.getAttribute(ximfConst._XIMF_ATT_TEC_VALUE) + sConcatTecSeparator;\r
+ }\r
+ } else {\r
+ concatvalue = concatvalue + cElt.getAttribute("label") + sConcatSeparator;\r
+ ximfconcatvalue = ximfconcatvalue + cElt.getAttribute(ximfConst._XIMF_ATT_XVALUE) + sConcatSeparator;\r
+ if (cElt.hasAttribute(ximfConst._XIMF_ATT_TEC_VALUE)) {\r
+ ximfconcattechnicalvalue = ximfconcattechnicalvalue + cElt.getAttribute(ximfConst._XIMF_ATT_TEC_VALUE) + sConcatTecSeparator;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ if (sValues !== "") {\r
+ sValues = sValues + sContentSeparator + concatvalue + value;\r
+ sXimfValues = sXimfValues + sContentSeparator + ximfconcatvalue + ximfvalue ;\r
+ if (ximfconcattechnicalvalue !== "" || ximftechnicalvalue !== "") {\r
+ sXimfTechnicalValues = sXimfTechnicalValues + sContenTecSeparator + ximfconcattechnicalvalue + ximftechnicalvalue ;\r
+ }\r
+ } else {\r
+ sValues = concatvalue + value;\r
+ sXimfValues = ximfconcatvalue + ximfvalue;\r
+ if(ximfconcattechnicalvalue !== "" || ximftechnicalvalue !== ""){\r
+ sXimfTechnicalValues = ximfconcattechnicalvalue + ximftechnicalvalue;\r
+ }\r
+ }\r
+ }\r
+ //CheckXimfhdrsSelection for input values\r
+ arrayTextbox = $("popup[id='"+parentElt.id+"'] textbox[class='ximfInputbox']" );\r
+ for ( var idxTxtBx=0 ; idxTxtBx < arrayTextbox.length; ++idxTxtBx) {\r
+ concatvalue = "";\r
+ ximfconcatvalue = "";\r
+ // search for XIMF ComplexString\r
+ if (arrayTextbox[idxTxtBx].hasAttribute(ximfConst._XIMF_ATT_CONCAT_ID)) {\r
+ sIds = arrayTextbox[idxTxtBx].getAttribute(ximfConst._XIMF_ATT_CONCAT_ID);\r
+ var regId=new RegExp("[+]+", "g");\r
+ arrayIds = sIds.split(regId);\r
+ for (var k=0; k<arrayIds.length; ++k) {\r
+ cElt = document.getElementById(arrayIds[k]);\r
+ if (cElt) {\r
+ if (cElt.hasAttribute(ximfConst._XIMF_ATT_SEPARATOR)) {\r
+ sConcatSeparator = cElt.getAttribute(ximfConst._XIMF_ATT_SEPARATOR);\r
+ }\r
+ if (cElt.hasAttribute(ximfConst._XIMF_ATT_TEC_SEPARATOR)) {\r
+ sConcatTecSeparator = cElt.getAttribute(ximfConst._XIMF_ATT_TEC_SEPARATOR);\r
+ }\r
+ if (cElt.getAttribute("label")) {\r
+ if (concatvalue === "") {\r
+ concatvalue = cElt.getAttribute("label") + sConcatSeparator;\r
+ ximfconcatvalue = cElt.getAttribute(ximfConst._XIMF_ATT_XVALUE) + sConcatSeparator ;\r
+ ximfconcattechnicalvalue = cElt.getAttribute(ximfConst._XIMF_ATT_TEC_VALUE);\r
+ } else {\r
+ concatvalue = concatvalue + cElt.getAttribute("label") + sConcatSeparator;\r
+ ximfconcatvalue = ximfconcatvalue + cElt.getAttribute(ximfConst._XIMF_ATT_XVALUE) + sConcatSeparator;\r
+ ximfconcattechnicalvalue = ximfconcattechnicalvalue + sConcatTecSeparator + cElt.getAttribute(ximfConst._XIMF_ATT_TEC_VALUE) ;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ // save edit entry\r
+ var sInValues = arrayTextbox[idxTxtBx].value;\r
+ var reg=new RegExp("[\n]+", "g");\r
+ var arrayValues = sInValues.split(reg);\r
+ var valuelist = "";\r
+ var valueXimflist = "";\r
+ for (var i=0; i<arrayValues.length; ++i) {\r
+ if (arrayValues[i] !== "") {\r
+ if (valuelist === "") {\r
+ valuelist = concatvalue + arrayValues[i];\r
+ valueXimflist = ximfconcatvalue + arrayValues[i];\r
+ } else {\r
+ valuelist = valuelist + sContentSeparator + concatvalue + arrayValues[i];\r
+ valueXimflist = valueXimflist + sContentSeparator + ximfconcatvalue + arrayValues[i];\r
+ }\r
+ }\r
+ }\r
+ // add new edit entry\r
+ if (valuelist !== "") {\r
+ if (sValues !== "") {\r
+ sValues = sValues + sContentSeparator + valuelist;\r
+ sXimfValues = sXimfValues + sContentSeparator + valueXimflist ;\r
+ } else {\r
+ sValues = valuelist;\r
+ sXimfValues = valueXimflist;\r
+ }\r
+ // technical values\r
+ if (ximfconcattechnicalvalue !== "") {\r
+ if (sXimfTechnicalValues !== "") {\r
+ sXimfTechnicalValues = sXimfTechnicalValues + sContenTecSeparator + ximfconcattechnicalvalue ;\r
+ } else {\r
+ sXimfTechnicalValues = ximfconcattechnicalvalue;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ // set values to textbox\r
+ var txt = document.getElementById(idTextBox);\r
+ txt.value = sValues;\r
+ txt.setAttribute("ximfvalue",sXimfValues);\r
+ txt.setAttribute(ximfConst._XIMF_ATT_TEC_VALUE,sXimfTechnicalValues);\r
+ txt.setAttribute(ximfConst._XIMF_ATT_SEPARATOR,sContentSeparator);\r
+ txt.setAttribute(ximfConst._XIMF_ATT_TEC_SEPARATOR,sContenTecSeparator);\r
+ CheckXimfhdrsSelection();\r
+ } catch (e) {\r
+ }\r
+}\r
+/*\r
+ * Check elements of panel and update accessibility of elements\r
+ */\r
+function ComputePanelOfCheckboxSelection(idCheckbox){\r
+ try {\r
+ // get informations of panel\r
+ var pnl = document.getElementById(idCheckbox);\r
+ while (pnl.localName !== "panel") {\r
+ pnl = pnl.parentNode;\r
+ }\r
+ // check for selected item number\r
+ var nbItems = $(pnl).attr("ximfmaxitem");\r
+ var richitems = $("#" + pnl.id + " richlistbox" ).children("richlistitem");\r
+ var nbchkedboxes = 0;\r
+ var chk1 = undefined;\r
+ var eltsChild = undefined;\r
+ for (idxRchItm=0; idxRchItm<richitems.length; ++idxRchItm) {\r
+ chk1 = richitems[idxRchItm].firstElementChild;\r
+ if (chk1.localName === "checkbox") {\r
+ if(chk1.checked){\r
+ eltsChild = richitems[idxRchItm].getElementsByTagName("checkbox");\r
+ var cptChk = 0;\r
+ for (var idxEltChild=0 ; idxEltChild < eltsChild.length; ++idxEltChild) {\r
+ if (eltsChild[idxEltChild].hasAttribute("checked")) {\r
+ cptChk++;\r
+ }\r
+ }\r
+ nbchkedboxes = nbchkedboxes + cptChk;\r
+ if (cptChk > 1) {\r
+ nbchkedboxes = nbchkedboxes - 1;\r
+ }\r
+ // Compstring flag, if true, child value must be filled\r
+ var ximfChild = false;\r
+ if (richitems[idxRchItm].hasAttribute("ximfchild")) {\r
+ if (richitems[idxRchItm].getAttribute("ximfchild") === "true") {\r
+ $(chk1).attr("ximfchild","true");\r
+ }\r
+ }\r
+ }else{\r
+ $(chk1).removeAttr("ximfchild");\r
+ }\r
+ }\r
+ }\r
+ var chkboxes = $("#" + pnl.id + " checkbox" );\r
+ // enable/disable items that can be selected\r
+ if (nbchkedboxes < nbItems) {\r
+ // other items can be selected\r
+ $(chkboxes).attr("disabled","false");\r
+ for (i=0 ; i<richitems.length; ++i) {\r
+ chk1 = richitems[i].firstElementChild;\r
+ if (chk1.localName === "checkbox" && !chk1.checked) {\r
+ eltsChild = richitems[i].getElementsByTagName("checkbox");\r
+ for (j = 0 ; j < eltsChild.length; ++j) {\r
+ $(eltsChild[j]).removeAttr("checked");\r
+ $(eltsChild[j]).attr("disabled","true");\r
+ }\r
+ $(chk1).attr("disabled","false");\r
+ }\r
+ }\r
+ } else {\r
+ // max selection is selected, disable others items\r
+ for (i=0 ; i<richitems.length; ++i) {\r
+ chk1 = richitems[i].firstElementChild;\r
+ if (chk1.localName === "checkbox") {\r
+ eltsChild = richitems[i].getElementsByTagName("checkbox");\r
+ if (!chk1.checked) {\r
+ $(chk1).removeAttr("ximfchild");\r
+ for (j=0 ; j < eltsChild.length; ++j) {\r
+ $(eltsChild[j]).removeAttr("checked");\r
+ $(eltsChild[j]).attr("disabled","true");\r
+ }\r
+ } else {\r
+ // disable composed items\r
+ if (eltsChild.length > 1) {\r
+ var intCpt = 0;\r
+ for (j=0; j < eltsChild.length; ++j) {\r
+ if (eltsChild[j].hasAttribute("checked")) {\r
+ intCpt++;\r
+ }\r
+ }\r
+ switch (intCpt) {\r
+ case 1:\r
+ for (j=0 ; j < eltsChild.length; ++j) {\r
+ $(eltsChild[j]).attr("disabled","false");\r
+ }\r
+ chk1.checked = true;\r
+ break;\r
+ case 2:\r
+ for (j=0 ; j < eltsChild.length; ++j) {\r
+ if(!eltsChild[j].hasAttribute("checked")) {\r
+ $(eltsChild[j]).attr("disabled","true");\r
+ }\r
+ }\r
+ break;\r
+ default:\r
+ break;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ XimfailComposeCanClose();\r
+ } catch (e) {\r
+ gConsole.logStringMessage("[ximfmail - ComputePanelOfCheckboxSelection ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ }\r
+}\r
+/*\r
+ * Check item group - more than 1 element must be selected\r
+ */\r
+function IsAcceptableXimfCompstring(idCompstring) {\r
+ try {\r
+ var isAcceptableCompstring = false;\r
+ //\r
+ var siblingElement = document.getElementById(idCompstring).nextElementSibling;\r
+ if (siblingElement) {\r
+ if (siblingElement.localName === "textbox") {\r
+ if (siblingElement.value !== "") {\r
+ isAcceptableCompstring = true;\r
+ }\r
+ } else {\r
+ // search for textboxes\r
+ var childTxtboxList = siblingElement.getElementsByTagName("textbox");\r
+ for (i=0 ; i<childTxtboxList.length ; ++i) {\r
+ if (childTxtboxList[i].value !== "") {\r
+ isAcceptableCompstring = true;\r
+ break;\r
+ }\r
+ }\r
+ if (!isAcceptableCompstring) {\r
+ // search for checkboxes\r
+ var childCheckBoxList = siblingElement.getElementsByTagName("checkbox");\r
+ for (i=0 ; i<childCheckBoxList.length ; ++i) {\r
+ if(childCheckBoxList[i].checked) {\r
+ isAcceptableCompstring = true;\r
+ break;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - IsAcceptableXimfCompstring ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ }\r
+ return isAcceptableCompstring;\r
+}\r
+/*\r
+ * Delete all values of ximfmail element\r
+ */\r
+ function EraseAndComputeXimfhdrsTextbox (idTextBox) {\r
+ try {\r
+ var eltTextbox = document.getElementById(idTextBox);\r
+ // datepicker case\r
+ if (eltTextbox.localName === "datepicker") {\r
+ eltTextbox._input.value = "";\r
+ eltTextbox.gPopup.value = null;\r
+ return;\r
+ }\r
+ eltTextbox.value = "";\r
+ eltTextbox.setAttribute(ximfConst._XIMF_ATT_XVALUE,"");\r
+ if (eltTextbox.hasAttribute(ximfConst._XIMF_ATT_TEC_VALUE)) {\r
+ eltTextbox.setAttribute(ximfConst._XIMF_ATT_TEC_VALUE,"");\r
+ }\r
+ // raz panel selections\r
+ $("panel[id='"+ eltTextbox.getAttribute("refpanel")+"'] checkbox").removeAttr("checked");\r
+ $("panel[id='"+ eltTextbox.getAttribute("refpanel")+"'] checkbox").removeAttr("disabled");\r
+ var listTxtbox = $("panel[id='"+ eltTextbox.getAttribute("refpanel")+"'] textbox");\r
+ for (i=0;i<listTxtbox.length;++i) {\r
+ listTxtbox[i].value="";\r
+ }\r
+ // delete repanel of linked values\r
+ menu_link = $("panel[id='"+ eltTextbox.getAttribute("refpanel")+"'] menuitem[linkpopupbox]");\r
+ if (menu_link.length > 0) {\r
+ for (i=0 ; i<menu_link.length ; ++i) {\r
+ try {\r
+ var popupset = document.getElementById($(menu_link[i]).attr("linkpopupbox"));\r
+ var txtbox = document.getElementById(popupset.getAttribute(ximfConst._XIMF_ATT_REF_BOX));\r
+ EraseAndComputeXimfhdrsTextbox(popupset.getAttribute(ximfConst._XIMF_ATT_REF_BOX));\r
+ txtbox.setAttribute("refpanel","");\r
+ $("textbox[id='"+popupset.getAttribute(ximfConst._XIMF_ATT_REF_BOX)+"'] button").attr("refpanel","");\r
+ } catch(e) {}\r
+ }\r
+ }\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - eraseXimfmailTextbox ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ }\r
+}\r
+/*\r
+ * Compute DOM with datas (used to load draft or template message)\r
+*/\r
+function ComputeWithForm(ximfMessage) {\r
+ if (!ximfMessage instanceof XimfmailMesssage) {\r
+ gConsole.logStringMessage("[ximfmail - ComputeWithForm ] \n parameter of refreshDatas must be a ximfMessage object");\r
+ return false;\r
+ }\r
+ // compute free text type\r
+ // compute time type\r
+ // compute menus type\r
+ try {\r
+ var current_ximfvalue = "";\r
+ var valuemsg = "";\r
+ var valueref = "";\r
+ var xheader_dom = $("label[ximfheader]");\r
+ for (var idx_xheader_dom=0; idx_xheader_dom<xheader_dom.length; ++idx_xheader_dom) {\r
+ var display_box = null;\r
+ try {\r
+ var ximfValue = ximfMessage.getHeaderValue(xheader_dom[idx_xheader_dom].getAttribute("ximfheader"));\r
+ if (ximfValue) {\r
+ // search for value and complete display box\r
+ var display_box_list = $("textbox[refheader='" + xheader_dom[idx_xheader_dom].getAttribute("id") + "']");\r
+ if (!display_box_list) {\r
+ continue;\r
+ }\r
+ for(var i = 0 ; i < display_box_list.length ; ++i){\r
+ if(display_box_list[i].nodeName === "textbox"){\r
+ display_box = display_box_list[i];\r
+ }\r
+ }\r
+ if (!display_box) {\r
+ continue;\r
+ }\r
+ // default values\r
+ $(display_box).attr("value",ximfValue);\r
+ $(display_box).attr("ximfvalue",ximfValue);\r
+ $(display_box).attr("tooltiptext",ximfValue);\r
+ // menuitem value (ilk, linkpopup...)\r
+ var menu_item = $("panel[id='"+$(display_box).attr("refpanel")+"'] menuitem");\r
+ if (menu_item.length > 0) {\r
+ for(var idx_menu_item = 0 ; idx_menu_item < menu_item.length ; ++idx_menu_item){\r
+ try{\r
+ current_ximfvalue = menu_item[idx_menu_item].getAttribute("ximfvalue");\r
+ valuemsg = String_trim(ximfValue.toLowerCase());\r
+ valueref = String_trim(current_ximfvalue.toLowerCase());\r
+ if( valuemsg.indexOf(valueref, 0) !== -1 ){\r
+ //linkpopup manager\r
+ var linkpopup = menu_item[idx_menu_item].getAttribute("linkpopupbox");\r
+ if(linkpopup){\r
+ var targetlnkpopup = $("panel[id='"+linkpopup+"']");\r
+ $("textbox[id='" + targetlnkpopup[0].getAttribute("ximfreftextbox")+"']").attr("refpanel",linkpopup);\r
+ $("textbox[id='" + targetlnkpopup[0].getAttribute("ximfreftextbox")+"'] button[class*='ximfPopup']").attr("refpanel",linkpopup);\r
+ }\r
+ //insert values in textbox\r
+ $(display_box).attr("ximfvalue",current_ximfvalue);\r
+ $(display_box).attr("tooltiptext",menu_item[idx_menu_item].getAttribute("label"));\r
+ display_box.inputField.value = menu_item[idx_menu_item].getAttribute("label");\r
+ //technical value is associated\r
+ try{\r
+ var xtcval = menu_item[idx_menu_item].getAttribute("ximftecvalue");\r
+ if(xtcval){\r
+ display_box.setAttribute("ximftecvalue",xtcval);\r
+ }\r
+ }catch(err){}\r
+ }\r
+ }catch(err){\r
+ gConsole.logStringMessage("[ximfmail - XimfMsgComposeView - refreshDatas ] \n " + err + "\nfile : " + Error().fileName+"\nline : "+err.lineNumber);\r
+ }\r
+ }\r
+ }\r
+ // checkbox value (ilk, linkpopup...)\r
+ var check_item = $("panel[id='"+$(display_box).attr("refpanel")+"'] checkbox");\r
+ if(check_item.length > 0){\r
+ var newximfvalue = "";\r
+ var newtooltiptex = "";\r
+ var newlabel = "";\r
+ var newximftecvalue = "";\r
+ var xSeparator = $("panel[id='"+$(display_box).attr("refpanel")+"']").attr("ximfseparator");\r
+ var xTecSeparator = $("panel[id='"+$(display_box).attr("refpanel")+"']").attr("ximftecseparator");\r
+ var arrayValue = [];\r
+ if(xSeparator){\r
+ var reg=new RegExp("["+xSeparator+"]+", "g");\r
+ arrayValue = ximfValue.split(reg);\r
+ }else{\r
+ arrayValue.push(ximfValue);\r
+ }\r
+ for(var idx_arrayValue=0 ; idx_arrayValue<arrayValue.length ; ++idx_arrayValue){\r
+ var isarrayValueAppend = false;\r
+ for(var idx_check_item = 0 ; idx_check_item < check_item.length ; ++idx_check_item){\r
+ try{\r
+ current_ximfvalue = check_item[idx_check_item].getAttribute("ximfvalue");\r
+ valuemsg = arrayValue[idx_arrayValue].toLowerCase();\r
+ valueref = current_ximfvalue.toLowerCase();\r
+ if( valuemsg === valueref){\r
+ isarrayValueAppend = true;\r
+ check_item[idx_check_item].setAttribute("checked",true);\r
+ //linkpopup manager\r
+ var linkpopup = check_item[idx_check_item].getAttribute("linkpopupbox");\r
+ if(linkpopup){\r
+ var targetpopup = $("panel[id='"+linkpopup+"']");\r
+ $("textbox[id='" + targetpopup[0].getAttribute("ximfreftextbox")+"']").attr("refpanel",linkpopup);\r
+ }\r
+ // save values\r
+ if(xSeparator && newlabel !== ""){\r
+ newlabel += xSeparator + check_item[idx_check_item].getAttribute("label");\r
+ }else{\r
+ newlabel = check_item[idx_check_item].getAttribute("label");\r
+ }\r
+ if(xSeparator && newximfvalue !== ""){\r
+ newximfvalue += xSeparator + current_ximfvalue;\r
+ }else{\r
+ newximfvalue = current_ximfvalue;\r
+ }\r
+ if(xSeparator && newtooltiptex !== ""){\r
+ newtooltiptex += xSeparator + check_item[idx_check_item].getAttribute("label");\r
+ }else{\r
+ newtooltiptex = check_item[idx_check_item].getAttribute("label");\r
+ }\r
+ //technical value is associated\r
+ var xtcval = check_item[idx_check_item].getAttribute("ximftecvalue");\r
+ if(xtcval){\r
+ if(xTecSeparator && newximftecvalue !== ""){\r
+ newximftecvalue += xTecSeparator + xtcval;\r
+ }else{\r
+ newximftecvalue = xtcval;\r
+ }\r
+ }\r
+ }\r
+ }catch(err){\r
+ gConsole.logStringMessage("[ximfmail - XimfMsgComposeView - refreshDatas ] \n " + err + "\nfile : " + Error().fileName+"\nline : "+err.lineNumber);\r
+ }\r
+ }\r
+ if (!isarrayValueAppend && arrayValue[idx_arrayValue] !== "") {\r
+ if (xSeparator && newlabel !== "") {\r
+ newlabel += xSeparator + arrayValue[idx_arrayValue];\r
+ } else {\r
+ newlabel = arrayValue[idx_arrayValue];\r
+ }\r
+ if (xSeparator && newximfvalue !== "") {\r
+ newximfvalue += xSeparator + arrayValue[idx_arrayValue];\r
+ } else {\r
+ newximfvalue = arrayValue[idx_arrayValue];\r
+ }\r
+ if (xSeparator && newtooltiptex !== "") {\r
+ newtooltiptex += xSeparator + arrayValue[idx_arrayValue];\r
+ } else {\r
+ newtooltiptex = arrayValue[idx_arrayValue];\r
+ }\r
+ }\r
+ }\r
+ //insert values in textbox\r
+ if (newximfvalue !== "") {\r
+ $(display_box).attr("ximfvalue",newximfvalue);\r
+ }\r
+ if (newtooltiptex !== "") {\r
+ $(display_box).attr("tooltiptext",newtooltiptex);\r
+ }\r
+ if (newlabel !== "") {\r
+ display_box.inputField.value = newlabel;\r
+ }\r
+ if (newximftecvalue !== "") {\r
+ $(display_box).attr("ximftecvalue",newximftecvalue);\r
+ }\r
+ if (xTecSeparator !== "") {\r
+ $(display_box).attr("ximftecseparator",xTecSeparator);\r
+ }\r
+ if (xSeparator !== "") {\r
+ $(display_box).attr("ximfseparator",xSeparator);\r
+ }\r
+ }\r
+ // button value (ilk, linkpopup...)\r
+ var button_item = $("panel[id='"+$(display_box).attr("refpanel")+"'] button");\r
+ if (button_item.length > 0) {\r
+ for (var idx_button_item = 0 ; idx_button_item < button_item.length ; ++idx_button_item) {\r
+ try {\r
+ current_ximfvalue = button_item[idx_button_item].getAttribute("ximfvalue");\r
+ if (current_ximfvalue !== "") {\r
+ valuemsg = String_trim(ximfValue.toLowerCase());\r
+ valueref = String_trim(current_ximfvalue.toLowerCase());\r
+ if ( valuemsg.indexOf(valueref, 0) !== -1 ) {\r
+ //linkpopup manager\r
+ var linkpopup = button_item[idx_button_item].getAttribute("linkpopupbox");\r
+ if (linkpopup) {\r
+ var targetpopup = $("panel[id='"+linkpopup+"']");\r
+ $("textbox[id='" + targetpopup[0].getAttribute("ximfreftextbox")+"']").attr("refpanel",linkpopup);\r
+ }\r
+ //insert values in textbox\r
+ $(display_box).attr("ximfvalue",current_ximfvalue);\r
+ $(display_box).attr("tooltiptext",button_item[idx_button_item].getAttribute("label"));\r
+ display_box.inputField.value = button_item[idx_button_item].getAttribute("label");\r
+ //technical value is associated\r
+ try {\r
+ var xtcval = button_item[idx_button_item].getAttribute("ximftecvalue");\r
+ if (xtcval) {\r
+ $(display_box).attr("ximftecvalue",xtcval);\r
+ }\r
+ } catch (err) {}\r
+ }\r
+ }\r
+ } catch (err) {\r
+ gConsole.logStringMessage("[ximfmail - XimfMsgComposeView - refreshDatas ] \n " + err + "\nfile : " + Error().fileName+"\nline : "+err.lineNumber);\r
+ }\r
+ }\r
+ }\r
+ }\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - XimfMsgComposeView - refreshDatas ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ }\r
+ }\r
+ // load free text values\r
+ xheader_dom = $("textbox[class='ximfEditor']");\r
+ var ximfValue = "";\r
+ for (var idxXmfEdtr=0; idxXmfEdtr<xheader_dom.length; ++idxXmfEdtr) {\r
+ try {\r
+ var oriTxtboxId = xheader_dom[idxXmfEdtr].getAttribute("ximfreftextbox");\r
+ var ximfLabelId = $("textbox[id='"+oriTxtboxId+"']").attr("refheader");\r
+ if (ximfLabelId) {\r
+ ximfValue = ximfMessage.getHeaderValue($("label[id='"+ximfLabelId+"']").attr("ximfheader"));\r
+ if (ximfValue) {\r
+ xheader_dom[idxXmfEdtr].setAttribute("value",ximfValue);\r
+ }\r
+ }\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - XimfMsgComposeView - refreshDatas] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ }\r
+ }\r
+ // load address values\r
+ xheader_dom = $("ximfaddress");\r
+ var refHeader = "";\r
+ for(var idxXmfAddr=0; idxXmfAddr<xheader_dom.length; ++idxXmfAddr){\r
+ try {\r
+ refHeader = xheader_dom[idxXmfAddr].getAttribute(ximfConst._XIMF_ATT_REF_HEADER);\r
+ if (refHeader) {\r
+ ximfValue = ximfMessage.getHeaderValue($("label[id='" + refHeader + "']").attr("ximfheader"));\r
+ if (ximfValue) {\r
+ xheader_dom[idxXmfAddr].listaddress = ximfValue;\r
+ }\r
+ }\r
+ } catch (e) {\r
+ gConsole.logStringMessage("[ximfmail - XimfMsgComposeView - refreshDatas] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ }\r
+ }\r
+ // load datetime values\r
+ xheader_dom = $("textbox[class='ximfDatetime']");\r
+ for (var idxXmfDtm=0; idxXmfDtm<xheader_dom.length; ++idxXmfDtm) {\r
+ try {\r
+ refHeader = xheader_dom[idxXmfDtm].getAttribute(ximfConst._XIMF_ATT_REF_HEADER);\r
+ if (refHeader) {\r
+ ximfValue = ximfMessage.getHeaderValue($("label[id='" + refHeader + "']").attr("ximfheader"));\r
+ if (ximfValue) {\r
+ var thisDate = ConvertZTimeToLocal(ximfValue);\r
+ if (!thisDate) {\r
+ thisDate = ximfValue;\r
+ }\r
+ // load date\r
+ xheader_dom[idxXmfDtm].setAttribute("value",thisDate );\r
+ xheader_dom[idxXmfDtm].setAttribute("ximfvalue", ximfValue);\r
+ }\r
+ }\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - XimfMsgComposeView - refreshDatas] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ }\r
+ }\r
+ CheckXimfhdrsSelection();\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - XimfMsgComposeView - refreshDatas] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ }\r
+}\r
+/*\r
+ * XIMF RULES AND DOM\r
+ */\r
+function ExecuteXimfHdrsMandatoryRule() {\r
+ var isRuleOk=true;\r
+ //color tab container\r
+ var panelHdrs = $("tabpanel[class='ximfpane']");\r
+ for(var idx_panelHdrs = 0 ; idx_panelHdrs < panelHdrs.length ; ++idx_panelHdrs){\r
+ //raz tab element\r
+ idXimfPanel = panelHdrs[idx_panelHdrs].getAttribute("id");\r
+ idXimfTap = "tab" + idXimfPanel;\r
+ var cTab = $("tab[id='"+ idXimfTap +"']");\r
+ cTab[0].removeAttribute("ismandatory");\r
+ // CheckXimfhdrsSelection for mandatory elements\r
+ var mandatoriesHdrs = $("tabpanel[id='"+ idXimfPanel + "'] label[ximfmandatory='true']");\r
+ for(var i=0; i<mandatoriesHdrs.length; ++i){\r
+ if($("textbox[refheader='"+mandatoriesHdrs[i].getAttribute("id")+"']").attr("ximfvalue") === ""){\r
+ mandatoriesHdrs[i].setAttribute("style","color:#b20000;");\r
+ cTab[0].setAttribute("ismandatory","true");\r
+ isRuleOk = false;\r
+ }else{\r
+ mandatoriesHdrs[i].setAttribute("style","color:inherit;");\r
+ }\r
+ }\r
+ }\r
+ return isRuleOk;\r
+}\r
+/*\r
+ * XIMF RULES AND DOM\r
+ */\r
+function ExecuteXimfHdrsAssociationRule() {\r
+ var isRuleOk=true;\r
+ var isAlertDisplayed=false;\r
+ var associateArray = gXimfHdrs.getXimfAssociatedHdrArray();\r
+ if (!associateArray) {\r
+ return isRuleOk;\r
+ }\r
+ // label to prompt\r
+ // internationalisation\r
+ var sAlertLabel = "";\r
+ try{\r
+ var gBundle = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Components.interfaces.nsIStringBundleService);\r
+ var stringBundle = gBundle.createBundle("chrome://ximfmail/locale/ximfmail.properties");\r
+ sAlertLabel = stringBundle.GetStringFromName("ximf-association-alert-label");\r
+ }catch(err){\r
+ sAlertLabel = "Datas will be deleted!";\r
+ }\r
+ var reg=new RegExp("[&]+", "g");\r
+ for(var i=0; i<associateArray.length; ++i){\r
+ var headerRef = $("label[ximfheader='"+associateArray[i]._headerRef+"']").attr("id");\r
+ var valueRef = $("textbox[refheader='"+headerRef+"']").attr("ximfvalue");\r
+ var headerName = $("label[ximfheader='"+associateArray[i]._headerName+"']").attr("id");\r
+ var valueName = $("textbox[refheader='"+headerName+"']").attr("ximfvalue");\r
+ var tabAssociateValueRef =associateArray[i]._valueRef.split(reg);\r
+ var tabAssociateValueName =associateArray[i]._valueName.split(reg);\r
+ var idTextbox = $("textbox[refheader='"+headerName+"']").attr("id");\r
+ // list of menuitems\r
+ var tabItems = $("panel[ximfreftextbox='"+idTextbox+"'] menuitem");\r
+ if(valueRef !== ""){\r
+ for(var j=0; j<tabAssociateValueRef.length; ++j){\r
+ if(valueRef === tabAssociateValueRef[j]){\r
+ if(tabAssociateValueName[j].lastIndexOf(valueName) === -1 ){\r
+ if(valueName !== "" && !isAlertDisplayed){\r
+ // ask for delete datas\r
+ ximfAlert(sAlertLabel);\r
+ isAlertDisplayed = true;\r
+ }\r
+ EraseAndComputeXimfhdrsTextbox($("textbox[refheader='"+headerName+"']").attr("id"));\r
+ }\r
+ for(var idx_tabItems=0; idx_tabItems<tabItems.length; ++idx_tabItems){\r
+ if(tabAssociateValueName[j].lastIndexOf(tabItems[idx_tabItems].getAttribute("ximfvalue")) === -1){\r
+ tabItems[idx_tabItems].setAttribute("disabled","true");\r
+ tabItems[idx_tabItems].parentNode.setAttribute("ximfenable","false"); // css style\r
+ }else{\r
+ tabItems[idx_tabItems].removeAttribute("disabled");\r
+ tabItems[idx_tabItems].parentNode.setAttribute("ximfenable","true"); // css style\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }else{\r
+ for(var idx_tabItems=0; idx_tabItems<tabItems.length; ++idx_tabItems){\r
+ tabItems[idx_tabItems].setAttribute("disabled","true");\r
+ tabItems[idx_tabItems].parentNode.setAttribute("ximfenable","false"); // css style\r
+\r
+ if(valueName !== "" && !isAlertDisplayed){\r
+ // ask for delete datas\r
+ ximfAlert(sAlertLabel);\r
+ isAlertDisplayed = true;\r
+ }\r
+ EraseAndComputeXimfhdrsTextbox($("textbox[refheader='"+headerName+"']").attr("id"));\r
+ }\r
+ }\r
+ }\r
+ return isRuleOk;\r
+}\r
+/*\r
+ * XIMF RULES AND DOM : manage default values\r
+ */\r
+function ExecuteXimfHdrsDefaultValuesRule() {\r
+ try{\r
+ // get default value in ximfHdr\r
+ var textboxXimfHdrs = $("textbox[class='XimfTextboxDisplay']");\r
+ for (var i=0; i<textboxXimfHdrs.length; ++i) {\r
+ try{\r
+ var refDefaultItemXimfHdr = $("panel[id='" + $(textboxXimfHdrs[i]).attr("refpanel") + "']").attr("ximfdefault");\r
+ if(refDefaultItemXimfHdr && $(textboxXimfHdrs[i]).attr("ximfvalue") === "" ){\r
+ var item = $("#"+refDefaultItemXimfHdr);\r
+ if(item.length > 0){\r
+ $(textboxXimfHdrs[i]).attr("ximfvalue",$(item[0]).attr("ximfvalue"));\r
+ textboxXimfHdrs[i].value = $(item[0]).attr("label");\r
+ var techvalue=$(item[0]).attr("ximftecvalue");\r
+ if(techvalue){\r
+ $(textboxXimfHdrs[i]).attr("ximftecvalue",techvalue);\r
+ }\r
+ }else{\r
+ $(textboxXimfHdrs[i]).attr("ximfvalue",refDefaultItemXimfHdr);\r
+ textboxXimfHdrs[i].value = refDefaultItemXimfHdr;\r
+ }\r
+ }\r
+ }catch(err){}\r
+ }\r
+ }catch(err){\r
+ gConsole.logStringMessage("[ximfmail - ExecuteXimfHdrsDefaultValuesRule ] \n " + err + "\nfile : " + Error().fileName+"\nline : "+err.lineNumber);\r
+ }\r
+}\r
+/*\r
+ * Init non generic rules\r
+ * FT 3504\r
+ */\r
+function InitSpecialXimfRules() {\r
+ try{\r
+ // load special rules\r
+ var specialRulesArray = gXimfHdrs.getSpecialRulesArray();\r
+ for(var i=0 ; i < specialRulesArray.length ; ++i){\r
+ // search for ximf value\r
+ var nameHeader = specialRulesArray[i]._headerName;\r
+ var refHeader = specialRulesArray[i]._headerRef;\r
+ var targetName = specialRulesArray[i]._targetName;\r
+ switch(targetName){\r
+ case XIMF_RULE_TARGET_NAME_MANDATORY_HEADERS:\r
+ gConsole.logStringMessage("[ximfmail - InitSpecialXimfRules ] load special rule " + targetName);\r
+ SpecialMandatoryHeaders(nameHeader,refHeader);\r
+ break;\r
+ default:\r
+ break;\r
+ }\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - InitSpecialXimfRules ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ }\r
+}\r
+/*\r
+ *\r
+ */\r
+function AppendESSSecuityLabel () {\r
+ var essArray = gXimfHdrs.getESSSecurityLabelHdrArray();\r
+ if (!essArray) {\r
+ return;\r
+ }\r
+ if (essArray.length <= 0) {\r
+ return;\r
+ }\r
+ if (!gSMFields) {\r
+ return;\r
+ }\r
+ try{\r
+ var essLabels = CreateDOMWithXimfInstance(gXimfHdrs.getXimfInstanceResource(),ximfConst.CHROME_XSL_SECURITY_LABEL);\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - AppendESSSecuityLabel ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ return false;\r
+ }\r
+ try{\r
+ var ximftexboxArray = $("#ximfmailComposeMessageHeadersTablist textbox");\r
+ var ximfhiddenlabelArray = $("#ximfmailComposeMessageHeadersTablist label[class='ximfHiddenHeader']");\r
+ var elt = null;\r
+ var sXimfValue = null;\r
+ var sXimfLabel = null;\r
+ var sXimfSeparator = null;\r
+ var sXimfTecSeparator = null;\r
+ var refHeader = null;\r
+ var refValue =null;\r
+ var nameValue = null;\r
+ var sXimfHeader = null;\r
+ var item = undefined;\r
+ for(var i=0 ; i < essArray.length ; ++i){\r
+ // search for ximf value\r
+ sXimfValue = null;\r
+ sXimfLabel = null;\r
+ sXimfSeparator = null;\r
+ sXimfTecSeparator = null;\r
+ refHeader = essArray[i]._headerRef;\r
+ refValue = essArray[i]._valueRef;\r
+ nameValue = essArray[i]._valueName;\r
+ for(var j=0 ; j < ximftexboxArray.length; ++j ){\r
+ sXimfHeader = $("label[id='" + ximftexboxArray[j].getAttribute(ximfConst._XIMF_ATT_REF_HEADER) + "']").attr("ximfheader");\r
+ if(refHeader === sXimfHeader){\r
+ sXimfValue = ximftexboxArray[j].getAttribute(ximfConst._XIMF_ATT_XVALUE);\r
+ sXimfSeparator = ximftexboxArray[j].getAttribute(ximfConst._XIMF_ATT_SEPARATOR);\r
+ break;\r
+ }\r
+ //technical header case\r
+ sXimfHeader = $("label[id='" + ximftexboxArray[j].getAttribute(ximfConst._XIMF_ATT_REF_HEADER) + "']").attr("ximftecheader");\r
+ if(refHeader === sXimfHeader){\r
+ sXimfValue = ximftexboxArray[j].getAttribute(ximfConst._XIMF_ATT_TEC_VALUE);\r
+ sXimfSeparator = ximftexboxArray[j].getAttribute(ximfConst._XIMF_ATT_SEPARATOR);\r
+ sXimfLabel = ximftexboxArray[j].getAttribute(ximfConst._XIMF_ATT_XVALUE);\r
+ sXimfTecSeparator = ximftexboxArray[j].getAttribute(ximfConst._XIMF_ATT_TEC_SEPARATOR);\r
+ break;\r
+ }\r
+ }\r
+ if(!sXimfValue){\r
+ for(var idx_ximfhiddenlabelArray=0 ; idx_ximfhiddenlabelArray < ximfhiddenlabelArray.length; ++idx_ximfhiddenlabelArray ){\r
+ sXimfHeader = ximfhiddenlabelArray[idx_ximfhiddenlabelArray].getAttribute("ximfheader");\r
+ if(refHeader === sXimfHeader){\r
+ sXimfValue = ximfhiddenlabelArray[idx_ximfhiddenlabelArray].getAttribute(ximfConst._XIMF_ATT_XVALUE);\r
+ sXimfSeparator = ximfhiddenlabelArray[idx_ximfhiddenlabelArray].getAttribute(ximfConst._XIMF_ATT_SEPARATOR);\r
+ break;\r
+ }\r
+ }\r
+ }\r
+ //search valueName if refValue defined\r
+ if (refValue) {\r
+ var regrfVal=new RegExp("[&]+", "g");\r
+ var arrayRefValue = refValue.split(regrfVal);\r
+ var arrayNameValue = nameValue.split(regrfVal);\r
+ for (var idxArrayRefValue=0; idxArrayRefValue<arrayRefValue.length; ++idxArrayRefValue) {\r
+ if (arrayRefValue[idxArrayRefValue] === sXimfValue && arrayNameValue[idxArrayRefValue]) {\r
+ sXimfValue = arrayNameValue[idxArrayRefValue];\r
+ break;\r
+ }\r
+ }\r
+ }\r
+ // add label to sign it\r
+ switch(essArray[i]._headerName) {\r
+ case "SecurityPolicyIdentifier":\r
+ //Security Policy Identifier\r
+ if (sXimfValue === "") {\r
+ gSMFields.securityClassification = -1;\r
+ gSMFields.privacyMark = "";\r
+ gSMFields.securityCategories = "";\r
+ } else {\r
+ gSMFields.securityPolicyIdentifier = sXimfValue;\r
+ if (essLabels) {\r
+ elt = essLabels.childNodes[0].getElementsByTagName("securityPolicyIdentifier");\r
+ elt[0].setAttribute("value",sXimfValue);\r
+ if(sXimfLabel){\r
+ elt[0].setAttribute("label",sXimfLabel);\r
+ }else{\r
+ elt[0].setAttribute("label",sXimfValue);\r
+ }\r
+ }\r
+ }\r
+ break;\r
+ case "SecurityClassification":\r
+ // Security Classification\r
+ // values must be 0,1,2,3,4 or 5 (RFC 2634)\r
+ if (sXimfValue === "") {\r
+ break;\r
+ }\r
+ if (sXimfValue >= 0 && sXimfValue <= 5) {\r
+ gSMFields.securityClassification = sXimfValue;\r
+ if (essLabels) {\r
+ elt = essLabels.childNodes[0].getElementsByTagName("securityClassification");\r
+ item = elt[0].getElementsByTagName("item");\r
+ for (var k=0; k<item.length; ++k) {\r
+ if (item[k].getAttribute("value") === sXimfValue){\r
+ item[k].setAttribute("ximf",sXimfLabel);\r
+ }\r
+ }\r
+ }\r
+ }else{\r
+ gSMFields.securityClassification = -1;\r
+ }\r
+ break;\r
+ case "ESSPrivacyMark": // Privacy Mark\r
+ gSMFields.privacyMark = sXimfValue;\r
+ if (essLabels) {\r
+ elt = essLabels.childNodes[0].getElementsByTagName("privacyMark");\r
+ item = elt[0].getElementsByTagName("item");\r
+ item[0].setAttribute("value",sXimfValue);\r
+ }\r
+ break;\r
+ case "SecurityCategory":\r
+ // Security Categories\r
+ // format to load : oid|type|value name e.g. 0.0.0|1|value|0.0.0.1|2|value\r
+ var categories = "";\r
+ var regtec = new RegExp("["+sXimfTecSeparator+"]+", "g");\r
+ var reg = new RegExp("["+sXimfSeparator+"]+", "g");\r
+ if (sXimfValue !== "") {\r
+ var tab_XimfValue = sXimfValue.split(regtec);\r
+ if (sXimfLabel) {\r
+ var tab_XimfLabel = sXimfLabel.split(reg);\r
+ for (var idx_tab_XimfValue=0; idx_tab_XimfValue<tab_XimfValue.length; ++idx_tab_XimfValue) {\r
+ try {\r
+ if (tab_XimfValue[idx_tab_XimfValue] !== "" && tab_XimfLabel[idx_tab_XimfValue] !== "") {\r
+ if (categories !== "") {\r
+ categories += "|";\r
+ }\r
+ //ximftecvalue = "oid,value"\r
+ var regOidValueSep = ","; // FT INT_FT4041\r
+ var tmp = tab_XimfValue[idx_tab_XimfValue];\r
+ var oid = tmp.slice(0,tmp.indexOf(regOidValueSep,0));\r
+ var value = tmp.slice(tmp.indexOf(regOidValueSep,0)+1,tmp.length);\r
+ if (value) {\r
+ var type = null;\r
+ if (essLabels) {\r
+ var elt = essLabels.childNodes[0].getElementsByTagName("securityCategories");\r
+ // get type form rules definition\r
+ type = $(elt).attr("type");\r
+ if (!type) {\r
+ // default value as integer\r
+ type = "2";\r
+ }\r
+ // add values to xml file\r
+ // <item oid="" type="" value="" label=""/>\r
+ item = document.createElement("item");\r
+ item.setAttribute("oid",oid);\r
+ item.setAttribute("type",type);\r
+ item.setAttribute("value",value);\r
+ item.setAttribute("label",tab_XimfLabel[idx_tab_XimfValue]);\r
+ $(elt).append(item);\r
+ }\r
+ categories += oid + "|" + type + "|" + value;\r
+ }\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - AppendESSSecuityLabel - SecurityCategory] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ }\r
+ }\r
+ }\r
+ }\r
+ if (categories !== "") {\r
+ gConsole.logStringMessage("SecurityCategories = " + categories);\r
+ gSMFields.securityCategories = categories;\r
+ }\r
+ break;\r
+ default:\r
+ break;\r
+ }\r
+ }\r
+ } catch (e) {\r
+ gConsole.logStringMessage("[ximfmail - AppendESSSecuityLabel ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);\r
+ }\r
+ try{\r
+ // call external trustedBird functions\r
+ securityLabelSetUIStatusBar(gSMFields.securityPolicyIdentifier, gSMFields.securityClassification);\r
+ if (!gSMFields.signMessage) {\r
+ signMessage();\r
+ }\r
+ }catch(e){}\r
+}\r
+/*\r
+ * Check for changes to document and allow saving before closing\r
+ */\r
+function XimfailComposeCanClose() {\r
+ try{\r
+ if (gContentChanged === true) {\r
+ return;\r
+ }\r
+ var charSet = null;\r
+ if(gMsgCompose){\r
+ charSet = gMsgCompose.compFields.characterSet;\r
+ if (!charSet) {\r
+ charSet === msgCompFields.defaultCharacterSet;\r
+ }\r
+ }\r
+ var ximfmailMimeSelection = ReadMimeHeadersSelection( ximfConst.XIMF_ENDLINE, charSet);\r
+ if (ximfmailMimeSelection.length > 0) {\r
+ // used xith ComposeCanClose()\r
+ gContentChanged = true;\r
+ }\r
+ } catch (e) {\r
+ gConsole.logStringMessage("[ximfmail - XimfailComposeCanClose ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+ e.lineNumber);\r
+ }\r
+}\r
+/**\r
+ * Extract Ximf headers from DOM composer and format them to MIME headers\r
+ */\r
+function ReadMimeHeadersSelection(headersSeparator, charSet) {\r
+ var sCompleteList="";\r
+ // send hidden headers elements\r
+ var arrayValues = $("label[class='ximfHiddenHeader']");\r
+ if (arrayValues) {\r
+ for (var idxHdnHdr=0; idxHdnHdr<arrayValues.length; idxHdnHdr++) {\r
+ try {\r
+ if (arrayValues[idxHdnHdr].getAttribute(ximfConst._XIMF_ATT_XVALUE)) {\r
+ sCompleteList += EncodeMimeXimfheader($(arrayValues[idxHdnHdr]).attr("ximfheader"), $(arrayValues[idxHdnHdr]).attr(ximfConst._XIMF_ATT_XVALUE), charSet) + headersSeparator;\r
+ }\r
+ } catch (e) {\r
+ gConsole.logStringMessage("[ximfmail - ximfmailOnSend ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ }\r
+ }\r
+ // send textbox elements\r
+ arrayValues = $("textbox[class='XimfTextboxDisplay']");\r
+ if(arrayValues) {\r
+ for(var idxTxtbxDspl=0; idxTxtbxDspl<arrayValues.length; idxTxtbxDspl++) {\r
+ try {\r
+ if ($(arrayValues[idxTxtbxDspl]).attr(ximfConst._XIMF_ATT_XVALUE)) {\r
+ sCompleteList += EncodeMimeXimfheader($("#"+$(arrayValues[idxTxtbxDspl]).attr(ximfConst._XIMF_ATT_REF_HEADER)).attr("ximfheader"), $(arrayValues[idxTxtbxDspl]).attr(ximfConst._XIMF_ATT_XVALUE), charSet) + headersSeparator;\r
+ if ($(arrayValues[idxTxtbxDspl]).attr(ximfConst._XIMF_ATT_TEC_VALUE)) {\r
+ sCompleteList += EncodeMimeXimfheader($("#"+$(arrayValues[idxTxtbxDspl]).attr(ximfConst._XIMF_ATT_REF_HEADER)).attr("ximftecheader"), $(arrayValues[idxTxtbxDspl]).attr(ximfConst._XIMF_ATT_TEC_VALUE), charSet) + headersSeparator;\r
+ }\r
+ }\r
+ } catch (e) {\r
+ gConsole.logStringMessage("[ximfmail - ximfmailOnSend ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ }\r
+ }\r
+ // send editor elements\r
+ try{\r
+ arrayValues = $("textbox[class='ximfEditor']");\r
+ if(arrayValues) {\r
+ for (var idxEdtr=0; idxEdtr<arrayValues.length; idxEdtr++) {\r
+ if (arrayValues[idxEdtr].value) {\r
+ try {\r
+ sCompleteList += EncodeMimeXimfheader($("#"+$(arrayValues[idxEdtr]).attr(ximfConst._XIMF_ATT_REF_HEADER)).attr("ximfheader"), arrayValues[idxEdtr].value, charSet) + headersSeparator;\r
+ } catch (e) {\r
+ gConsole.logStringMessage("[ximfmail - ximfmailOnSend ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ }\r
+ }\r
+ }\r
+ } catch(e) {\r
+ }\r
+ // send datetime elements\r
+ try {\r
+ arrayValues = $("textbox[class='ximfDatetime']");\r
+ if (arrayValues) {\r
+ for (var idxDttm=0; idxDttm < arrayValues.length; idxDttm++) {\r
+ if (arrayValues[idxDttm].value) {\r
+ try {\r
+ sCompleteList += EncodeMimeXimfheader($("#"+$(arrayValues[idxDttm]).attr(ximfConst._XIMF_ATT_REF_HEADER)).attr("ximfheader"), arrayValues[idxDttm].getAttribute(ximfConst._XIMF_ATT_XVALUE), charSet) + headersSeparator;\r
+ } catch (e) {\r
+ gConsole.logStringMessage("[ximfmail - ximfmailOnSend ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ }\r
+ }\r
+ }\r
+ } catch(e) {}\r
+ // send ximfaddress elements\r
+ try {\r
+ arrayValues = $("#ximfmailComposeMessagePanel ximfaddress");\r
+ if (arrayValues) {\r
+ for (var idxAddr=0; idxAddr<arrayValues.length; idxAddr++) {\r
+ if (arrayValues[idxAddr].listaddress !== "") {\r
+ try {\r
+ sCompleteList += EncodeMimeXimfheader($("#"+$(arrayValues[idxAddr]).attr(ximfConst._XIMF_ATT_REF_HEADER)).attr("ximfheader"), arrayValues[idxAddr].listaddress, charSet) + headersSeparator;\r
+ } catch (e) {\r
+ gConsole.logStringMessage("[ximfmail - ximfmailOnSend ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ }\r
+ }\r
+ }\r
+ } catch(e) {}\r
+ return sCompleteList;\r
+}\r
+function ReadXsmptHeadersTranslation(headerValueSeparator, headersSeparator,charSet) {\r
+ var sCompleteList = "";\r
+ var xsmtpArray = gXimfHdrs.getXsmtpHdrArray();\r
+ if (!xsmtpArray) {\r
+ return;\r
+ }\r
+ // create mandatory xsmpt headers\r
+ try {\r
+ for (var i=0 ; i < xsmtpArray.length ; ++i) {\r
+ if (!xsmtpArray[i]._headerRef) {\r
+ sCompleteList += EncodeMimeXimfheader(xsmtpArray[i]._headerName, xsmtpArray[i]._valueName, charSet) + headersSeparator;\r
+ }\r
+ }\r
+ } catch (e) {\r
+ gConsole.logStringMessage("[ximfmail - AddMandatoryXsmtpHeader ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ // Copy and convert XIMF headers to XSMTP headers\r
+ var ximftexboxArray = $("textbox[class='XimfTextboxDisplay']["+ximfConst._XIMF_ATT_XVALUE+"]");\r
+ var xvalue = "";\r
+ for (var i = 0 ; i < ximftexboxArray.length; ++i ) {\r
+ var sXimfHeader = $("label[class='ximfHeaderLabel'][id='" + ximftexboxArray[i].getAttribute(ximfConst._XIMF_ATT_REF_HEADER) + "']").attr("ximfheader");\r
+ var sXimfValue = ximftexboxArray[i].getAttribute(ximfConst._XIMF_ATT_XVALUE);\r
+ if (sXimfValue !== "") {\r
+ try {\r
+ for (var j=0 ; j < xsmtpArray.length ; ++j) {\r
+ if (xsmtpArray[j]._headerRef === sXimfHeader) {\r
+ xvalue = sXimfValue; // default, copy of XIMF value\r
+ // get for values references\r
+ var reg=new RegExp("[&]+", "g");\r
+ if (xsmtpArray[j]._valueRef) {\r
+ var arrayValRefs = xsmtpArray[j]._valueRef.split(reg);\r
+ var arrayVals = xsmtpArray[j]._valueName.split(reg);\r
+ for (var k=0; k<arrayValRefs.length; ++k) {\r
+ if (arrayValRefs[k] === sXimfValue && arrayVals[k]) {\r
+ xvalue = arrayVals[k];\r
+ break;\r
+ }\r
+ }\r
+ } else {\r
+ if (xsmtpArray[j]._valueName) {\r
+ // default, copy of XIMF value\r
+ xvalue = xsmtpArray[j]._valueName;\r
+ }\r
+ }\r
+ // append line to headers\r
+ sCompleteList += EncodeMimeXimfheader(xsmtpArray[j]._headerName, xvalue, charSet) + headersSeparator;\r
+ }\r
+ }\r
+ } catch (e) {\r
+ gConsole.logStringMessage("[ximfmail - AddXsmtpHeader ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+ e.lineNumber);\r
+ }\r
+ }\r
+ }\r
+ return sCompleteList;\r
+}\r
+/*\r
+ * Security rules are only valid for XIMFMAIL Instances\r
+ */\r
+function ReloadSecurityAccess() {\r
+ // access secure headers\r
+ gCurrentIdentity.setBoolAttribute("secureheaders.checked",false);\r
+ setNoSecureHeaderUI();\r
+ $("#secureHeaderStatus").removeAttr("disabled");\r
+ $("#menu_securitySign1").removeAttr("disabled");\r
+ $("#menu_securitySign2").removeAttr("disabled");\r
+ // access security label\r
+ $("#menu_securityLabelDialog1").removeAttr("checked");\r
+ $("#menu_securityLabelDialog2").removeAttr("checked");\r
+ $("#menu_securityLabelDialog1").removeAttr("disabled");\r
+ $("#menu_securityLabelDialog2").removeAttr("disabled");\r
+}
\ No newline at end of file
--- /dev/null
+addEventListener('load', onDialogOpenedXimf, true);\r
+function onDialogOpenedXimf(){\r
+ try{\r
+ var pkiParams = window.arguments[0].QueryInterface(Components.interfaces.nsIPKIParamBlock);\r
+ params = pkiParams.QueryInterface(Components.interfaces.nsIDialogParamBlock);\r
+ gSignatureStatus = params.GetInt(1);\r
+ if(gSignatureStatus === -1){\r
+ var gBundle = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Components.interfaces.nsIStringBundleService);\r
+ var stringBundle = gBundle.createBundle("chrome://ximfmail/locale/ximfmail.properties");\r
+ var sLabel = stringBundle.GetStringFromName("ximfmail.securityinfo.warning");\r
+ var labelItem = document.getElementById("signatureLabel");\r
+ labelItem.value = sLabel;\r
+ labelItem.setAttribute("style","color:#b20000");\r
+ }\r
+ }catch(e){}\r
+}
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!-- ***** BEGIN LICENSE BLOCK *****\r
+ - Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ - ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ -\r
+ -\r
+ - Redistribution and use, in source and binary forms, with or without modification,\r
+ - are permitted provided that the following conditons are met :\r
+ -\r
+ - 1. Redistributions of source code must retain the above copyright notice,\r
+ - 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ - in the redistribution of the source code.\r
+ - 3. Neither the names of the copyright holders nor the names of any contributors\r
+ - may be used to endorse or promote products derived from this software without specific\r
+ - prior written permission from EADS Defence and Security.\r
+ -\r
+ - Alternatively, the contents of this file may be used under the terms of\r
+ - either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ - or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ - in which case the provisions of the GPL or the LGPL are applicable instead\r
+ - of those above. If you wish to allow use of your version of this file only\r
+ - under the terms of either the GPL or the LGPL, and not to allow others to\r
+ - use your version of this file under the terms of the MPL, indicate your\r
+ - decision by deleting the provisions above and replace them with the notice\r
+ - and other provisions required by the GPL or the LGPL. If you do not delete\r
+ - the provisions above, a recipient may use your version of this file under\r
+ - the terms of any one of the MPL, the GPL or the LGPL.\r
+ -\r
+ - REMINDER :\r
+ - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ - IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ -\r
+ - EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ - ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ - \r
+ - Contributor(s):\r
+ - Copyright(c) Airbus Defence and Space 2014 - All rights reserved \r
+ - ***** END LICENSE BLOCK ***** -->\r
+\r
+<?xml-stylesheet href="chrome://ximfmail/skin" type="text/css"?>\r
+<!DOCTYPE overlay SYSTEM "chrome://ximfmail/locale/ximfmail.dtd">\r
+\r
+<overlay id="ximfmailMsgReadSecureityInfoOverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">\r
+ <script type="application/javascript" src="chrome://ximfmail/content/msgReadSecurityInfo-ov-ximfmail.js" />\r
+</overlay>
\ No newline at end of file
--- /dev/null
+/* ***** BEGIN LICENSE BLOCK *****\r
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ *\r
+ *\r
+ * Redistribution and use, in source and binary forms, with or without modification,\r
+ * are permitted provided that the following conditons are met :\r
+ *\r
+ * 1. Redistributions of source code must retain the above copyright notice,\r
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ * in the redistribution of the source code.\r
+ * 3. Neither the names of the copyright holders nor the names of any contributors\r
+ * may be used to endorse or promote products derived from this software without specific\r
+ * prior written permission from EADS Defence and Security.\r
+ *\r
+ * Alternatively, the contents of this file may be used under the terms of\r
+ * either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ * in which case the provisions of the GPL or the LGPL are applicable instead\r
+ * of those above. If you wish to allow use of your version of this file only\r
+ * under the terms of either the GPL or the LGPL, and not to allow others to\r
+ * use your version of this file under the terms of the MPL, indicate your\r
+ * decision by deleting the provisions above and replace them with the notice\r
+ * and other provisions required by the GPL or the LGPL. If you do not delete\r
+ * the provisions above, a recipient may use your version of this file under\r
+ * the terms of any one of the MPL, the GPL or the LGPL.\r
+ *\r
+ * REMINDER :\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ *\r
+ * Contributor(s):\r
+ * Copyright(c) Airbus Defence and Space 2014 - All rights reserved\r
+ * ***** END LICENSE BLOCK ***** */\r
+/**\r
+ * threaTree-ximfmail.js\r
+ * Add custom columns into message view folder with XIMF headers defined in rules of XIMF instance activated in user profile.\r
+ */\r
+var gConsole = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);\r
+var XimfThreadTreeDBViewObserver = {\r
+ // Components.interfaces.nsIObserver\r
+ observe: function(aMsgFolder, aTopic, aData){\r
+ gConsole.logStringMessage("ximfmail - XimfThreadTreeDBViewObserver:observe");\r
+ XimfThreadTree.getInstance().create();\r
+ }\r
+};\r
+/*\r
+ * Column handler template definition\r
+ */\r
+function XimfCustomColumnHandler(property){\r
+ // Properties\r
+ this.property = property;\r
+ this.isString = true;\r
+ // Functions\r
+ this.getSortStringForRow = function (hdr){\r
+ return (this.isString) ? hdr.getStringProperty(this.property) : "";\r
+ };\r
+ this.isString = function (){\r
+ return this.isString;\r
+ };\r
+ this.getCellProperties = function (row, col, props) {};\r
+ this.getRowProperties = function(row, props){};\r
+ this.getImageSrc = function (row, col){\r
+ return null;\r
+ };\r
+ this.getSortLongForRow = function(hdr) {\r
+ return (this.isString) ? 0 : new Number(hdr.getStringProperty(this.property)).value;\r
+ };\r
+ this.getCellText = function (row, col){\r
+ // get cell informations\r
+ var key = gDBView.getKeyAt(row);\r
+ var hdr = gDBView.db.GetMsgHdrForKey(key);\r
+ var value = hdr.getStringProperty(this.property);\r
+ // get ilk value if exists\r
+ var ilklabel = "";\r
+ if (value) {\r
+ try {\r
+ ilklabel = XimfThreadTree.getInstance().getIlkColumnArray()[this.property.toLowerCase()][value.toLowerCase()];\r
+ } catch(e) {\r
+ ilklabel = value;\r
+ }\r
+ if (ilklabel === undefined) {\r
+ ilklabel = value;\r
+ }\r
+ }\r
+ return ilklabel;\r
+ };\r
+};\r
+/*\r
+ * XimfThreadTree\r
+ * Custom Columns with XIMF headers\r
+ * Get XIMF headers in xml containers <ihm> of Ximfmail instances :\r
+ * <ximf:treeRcv>\r
+ * <ximf:headerRef>header-reference</ximf:headerRef>\r
+ * <ximf:headerRef>header-reference-other</ximf:headerRef>\r
+ * </ximf:treeRcv>\r
+ */\r
+var XimfThreadTree = (function(){\r
+ // private:\r
+ var instantiated;\r
+ var _chromeXslTreeRcv = "chrome://theme_ximfmail/content/threadTree-ximfmail.xsl";\r
+ var _ximfHdrArrayByID = [];\r
+ var _refAccountArray = [];\r
+ var _ximfIlilkCustomColumnArray = [];\r
+ // add DOM element to tree\r
+ function addColumn(domTreecol,idTreecol){\r
+ // istancedom_treecol is mofified by append jquery function is called\r
+ $("#threadCols").append(domTreecol);\r
+ var splitter_dom = document.createElement("splitter");\r
+ $(splitter_dom).attr("reftreecol",idTreecol);\r
+ $(splitter_dom).attr("class","tree-splitter");\r
+ $(splitter_dom).attr("ximfheadtree","1");\r
+ $("#threadCols").append(splitter_dom);\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:addColumn] add new ximf column to Dom - id = " + idTreecol);\r
+ };\r
+ // attach handler object to custom column. addColumnHandler that takes a column ID\r
+ function addColumnHandler(idTreecol){\r
+ if (gDBView){\r
+ gDBView.addColumnHandler(idTreecol, new XimfCustomColumnHandler(idTreecol.toLowerCase()));\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:addColumnHandler] load new XimfCustomColumnHandler for column " + idTreecol);\r
+ }\r
+ };\r
+ // remove DOM element from tree\r
+ function deleteColummn(idTreeCol){\r
+ for(var i = 0 ; i < _ximfHdrArrayByID.length ; ++i){\r
+ if(_ximfHdrArrayByID[i] === idTreeCol){\r
+ _ximfHdrArrayByID.splice(i,1);\r
+ $("#"+idTreeCol).remove();\r
+ $("splitter[reftreecol='"+idTreeCol+"']").remove();\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:deleteColummn] remove ximf column from Dom - id = " + idTreeCol);\r
+ }\r
+ }\r
+ };\r
+ // update Ximfmail column\r
+ function updateXimfHdrArrayByID(idToUpdate){\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:updateXimfHdrArrayByID] update Ximfmail column " + idToUpdate);\r
+ var isIdExist = false;\r
+ for(var i = 0 ; i < _ximfHdrArrayByID.length ; ++i){\r
+ if(_ximfHdrArrayByID[i] === idToUpdate){\r
+ isIdExist = true;\r
+ break;\r
+ }\r
+ }\r
+ if(!isIdExist){\r
+ _ximfHdrArrayByID.push(idToUpdate);\r
+ }\r
+ }\r
+ // set Ximf headers to display to Thunderbird to check for x-headers\r
+ function addCustomPreferences(preference){\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:updateColumnToHide] Set Ximf headers to display to Thunderbird pref : " + preference);\r
+ var xListHdr = "";\r
+ var prefList = [];\r
+ var prefBranch = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch(null);\r
+ try {\r
+ xListHdr = prefBranch.getCharPref(preference);\r
+ if((xListHdr) !== ""){\r
+ var reg=new RegExp("[ ]+", "g");\r
+ prefList=xListHdr.split(reg);\r
+ }\r
+ } catch(ex) {}\r
+ function isDataInArray(data,array){\r
+ for(var i=0; i<array.length; ++i){\r
+ if(data === array[i]){\r
+ return true;\r
+ }\r
+ }\r
+ return false;\r
+ };\r
+ // add only new headers\r
+ for (var i = 0; i < _ximfHdrArrayByID.length; i++) {\r
+ if (!isDataInArray(_ximfHdrArrayByID[i].toLowerCase(),prefList)){\r
+ if (xListHdr !== "") {\r
+ xListHdr += " ";\r
+ }\r
+ xListHdr += _ximfHdrArrayByID[i].toLowerCase();\r
+ }\r
+ }\r
+ prefBranch.setCharPref(preference, xListHdr);\r
+ };\r
+ // obsolete?\r
+ function updateColumnToHide(){\r
+ try{\r
+ if(_ximfHdrArrayByID.length <= 0 ) {\r
+ return;\r
+ }\r
+ if(gCurrentIdentity){\r
+ var prefList = gCurrentIdentity.getCharAttribute("ximfmail_context_DBHeaders");\r
+ if (prefList === undefined) {\r
+ return;\r
+ }\r
+ for(var i=0; i<_ximfHdrArrayByID.length; ++i){\r
+ if(prefList.lastIndexOf(_ximfHdrArrayByID[i]) !== -1){\r
+ $("treecol[id='"+_ximfHdrArrayByID[i]+"']").attr("hidden","true");\r
+ }\r
+ }\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:updateColumnToHide ] " + e +"\nline : " + Error().lineNumber + " : "+ e + "\nfile : "+ Error().fileName);\r
+ }\r
+ };\r
+ // get ilk values from instance\r
+ function updateXimfIlkCustomColumnArray(currentInstance) {\r
+ try{\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:updateXimfIlkCustomColumnArray ] create ilk array for Ximf values of instance : "+currentInstance);\r
+ // get xml schema for instance\r
+ XimfCatalogFactory.getIntance(function(instance){\r
+ var dir = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);\r
+ var completePath = getFilePathInProfile("extensions/"+instance.getSchemaInstance(currentInstance));\r
+ dir.initWithPath( completePath );\r
+ if(!dir.exists()){\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:updateXimfIlkCustomColumnArray] Error on loading schema file : " + completePath);\r
+ return;\r
+ }\r
+ var objXML = GetXmlDocument(completePath);\r
+ var headers = objXML.getElementsByTagName("ximf:header");\r
+ // get xml dictionary parser\r
+ var urlDictionary = getFilePathInProfile("extensions/"+instance.getDictionaryInstance(currentInstance));\r
+ dir.initWithPath( urlDictionary );\r
+ if(!dir.exists()){\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:updateXimfIlkCustomColumnArray] Error on loading dictionary file : " + completePath);\r
+ return;\r
+ }\r
+ var dicoXML = GetXmlDocument(urlDictionary);\r
+ var dicoElements = dicoXML.getElementsByTagName("ximf:locale");\r
+ // get local lang\r
+ var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);\r
+ var refLang = prefs.getCharPref("general.useragent.locale");\r
+ if (!refLang) {\r
+ refLang = "fr";\r
+ }\r
+ var ilkEntities = null;\r
+ for(var idxLang=0 ; idxLang < dicoElements.length ; ++idxLang){\r
+ if(dicoElements[idxLang].getAttribute("lang") === refLang){\r
+ ilkEntities = dicoElements[idxLang].getElementsByTagName("ximf:ilk");\r
+ break;\r
+ }\r
+ }\r
+ // parse XML and get ilk values\r
+ for(var i=0 ; i < _ximfHdrArrayByID.length ; ++i){\r
+ var currentTreeColId = _ximfHdrArrayByID[i];\r
+ for(var idxH = 0 ; idxH < headers.length; ++idxH){\r
+ var attrHeaderList = headers[idxH].attributes;\r
+ var headerName = headers[idxH].getAttribute("headerName");\r
+ if(headerName.toLowerCase() === currentTreeColId.toLowerCase()){\r
+ var stringListElt = headers[idxH].getElementsByTagName("ximf:string");\r
+ var tmparray = new Array();\r
+ for(var j=0 ; j< stringListElt.length ; j++){\r
+ try{\r
+ // get values from instance headers\r
+ var sContent = stringListElt[j].getAttribute("content");\r
+ var sIlk = stringListElt[j].getAttribute("ilk");\r
+ // get ilk entity from instance dictionay\r
+ if(ilkEntities){\r
+ for(var idxIlk = 0 ; idxIlk < ilkEntities.length ; ++idxIlk){\r
+ if(ilkEntities[idxIlk].getAttribute("entity") === sIlk){\r
+ sIlk = ilkEntities[idxIlk].textContent;\r
+ break;\r
+ }\r
+ }\r
+ }\r
+ // push array\r
+ tmparray[sContent.toLowerCase()]=sIlk;\r
+ } catch(e){\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:updateXimfIlkCustomColumnArray ] " + e +"\nline : " + e.lineNumber + " : "+ e + "\nfile : "+ Error().fileName);\r
+ }\r
+ }\r
+ // save ilk values for an ximf header\r
+ if (tmparray) {\r
+ _ximfIlilkCustomColumnArray[headerName.toLowerCase()] = tmparray;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ });\r
+ return;\r
+ var dir = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);\r
+ var completePath = getFilePathInProfile("extensions/"+gXimfCatalog.getSchemaInstance(currentInstance));\r
+ dir.initWithPath( completePath );\r
+ if (!dir.exists()) {\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:updateXimfIlkCustomColumnArray] Error on loading schema file : " + completePath);\r
+ return;\r
+ }\r
+ var objXML = GetXmlDocument(completePath);\r
+ var headers = objXML.getElementsByTagName("ximf:header");\r
+ // get xml dictionary parser\r
+ var urlDictionary = getFilePathInProfile("extensions/"+gXimfCatalog.getDictionaryInstance(currentInstance));\r
+ dir.initWithPath( urlDictionary );\r
+ if(!dir.exists()){\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:updateXimfIlkCustomColumnArray] Error on loading dictionary file : " + completePath);\r
+ return;\r
+ }\r
+ var dicoXML = GetXmlDocument(urlDictionary);\r
+ var dicoElements = dicoXML.getElementsByTagName("ximf:locale");\r
+ // get local lang\r
+ var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);\r
+ var refLang = prefs.getCharPref("general.useragent.locale");\r
+ if (!refLang) {\r
+ refLang = "fr";\r
+ }\r
+ var ilkEntities = null;\r
+ for(var idxLang=0 ; idxLang < dicoElements.length ; ++idxLang){\r
+ if(dicoElements[idxLang].getAttribute("lang") === refLang){\r
+ ilkEntities = dicoElements[idxLang].getElementsByTagName("ximf:ilk");\r
+ break;\r
+ }\r
+ }\r
+ // parse XML and get ilk values\r
+ for(var i=0 ; i < _ximfHdrArrayByID.length ; ++i){\r
+ var currentTreeColId = _ximfHdrArrayByID[i];\r
+ for(var idxH = 0 ; idxH < headers.length; ++idxH){\r
+ var attrHeaderList = headers[idxH].attributes;\r
+ var headerName = headers[idxH].getAttribute("headerName");\r
+ if(headerName.toLowerCase() === currentTreeColId.toLowerCase()){\r
+ var stringListElt = headers[idxH].getElementsByTagName("ximf:string");\r
+ var tmparray = new Array();\r
+ for(var j=0 ; j< stringListElt.length ; j++){\r
+ try{\r
+ // get values from instance headers\r
+ var sContent = stringListElt[j].getAttribute("content");\r
+ var sIlk = stringListElt[j].getAttribute("ilk");\r
+ // get ilk entity from instance dictionay\r
+ if(ilkEntities){\r
+ for(var idxIlk = 0 ; idxIlk < ilkEntities.length ; ++idxIlk){\r
+ if(ilkEntities[idxIlk].getAttribute("entity") === sIlk){\r
+ sIlk = ilkEntities[idxIlk].textContent;\r
+ break;\r
+ }\r
+ }\r
+ }\r
+ // push array\r
+ tmparray[sContent.toLowerCase()]=sIlk;\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:updateXimfIlkCustomColumnArray ] " + e +"\nline : " + e.lineNumber + " : "+ e + "\nfile : "+ Error().fileName);\r
+ }\r
+ }\r
+ // save ilk values for an ximf header\r
+ if (tmparray) {\r
+ _ximfIlilkCustomColumnArray[headerName.toLowerCase()] = tmparray;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:updateXimfIlkCustomColumnArray] " + e +"\nline : " + e.lineNumber + " : "+ e + "\nfile : "+ Error().fileName);\r
+ }\r
+ };\r
+ function init(){\r
+ // singleton here\r
+ return{\r
+ // create : create Ximf columns if don't exist and/or add handler on Ximf columns\r
+ // return true if success / false if failed\r
+ create : function(){\r
+ try{\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:create ] create begin - _ximfHdrArrayByID len : "+_ximfHdrArrayByID.length);\r
+ GetCurrentXimfUser();\r
+ if (!gCurrentIdentity){\r
+ return false;\r
+ }\r
+ var refIdentityKey = gCurrentIdentity.key;\r
+ // get existing Ximf columns\r
+ var currentlistID = $("#threadCols treecol[ximfheadtree='1']");\r
+ // check if Ximf columns of account already created\r
+ for(var i = 0 ; i < _refAccountArray.length ; ++i){\r
+ if(_refAccountArray[i] === refIdentityKey){\r
+ // account already updated for this session, don't do it again,\r
+ // handler Ximfmail columns headers must be fired\r
+ for(var idx =0 ; idx < currentlistID.length ; ++idx){\r
+ addColumnHandler(currentlistID[idx].id);\r
+ }\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:create ] account already updated for this session - handler Ximfmail columns");\r
+ return true;\r
+ }\r
+ }\r
+ _refAccountArray.push(refIdentityKey);\r
+ // get Ximfmail instance with headers to custom\r
+ var currentInstance = gCurrentIdentity.getCharAttribute("ximfmail_instance_treethread_ref");\r
+ var instancedom = CreateDOMWithXimfInstance(currentInstance,_chromeXslTreeRcv);\r
+ var istancedom_treecol = instancedom.childNodes;\r
+ // add new headers to tree\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:create ] " + istancedom_treecol.length + " elements in Ximfmail instance to custom");\r
+ for(var k = istancedom_treecol.length - 1 ; k >= 0 ; --k){\r
+ try{\r
+ var instanceId = $(istancedom_treecol[k]).attr("id");\r
+ var isCurrentIdInInstance = false;\r
+ for(var l = 0 ; l < currentlistID.length ; ++l){\r
+ if( instanceId === $(currentlistID[l]).attr("id")){\r
+ isCurrentIdInInstance = true;\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:create ] instance " + instanceId + " exists");\r
+ break;\r
+ }\r
+ }\r
+ if(!isCurrentIdInInstance){\r
+ updateXimfHdrArrayByID(instanceId);\r
+ // add DOM element to tree\r
+ addColumn(istancedom_treecol[k],instanceId);\r
+ // load handler\r
+ addColumnHandler(instanceId);\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:create ] instance " + instanceId + " created");\r
+ //updateColumnToHide(); ???\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:create ] compute error - id = " + k + " : " + e);\r
+ }\r
+ }\r
+ // used by Thunderbird to check for x-headers\r
+ addCustomPreferences('mailnews.customDBHeaders');\r
+ // load ilk array for Ximf values of tree cells\r
+ updateXimfIlkCustomColumnArray(currentInstance);\r
+ // trace ilk array\r
+ var string = "";\r
+ for(xh in _ximfIlilkCustomColumnArray){\r
+ for(ilk in _ximfIlilkCustomColumnArray[xh]){\r
+ string += "["+ xh +"]["+ ilk +"]["+ _ximfIlilkCustomColumnArray[xh][ilk] + "]\n";\r
+ }\r
+ }\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:create ] array of ilk of ximf value" + string);\r
+ return true;\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:create] " + e +"\nline : " + e.lineNumber + " : "+ e + "\nfile : "+ Error().fileName);\r
+ return false;\r
+ }\r
+ },\r
+ // delete all custom columns of XIMF headers\r
+ deleteXimfColummns : function(){\r
+ $("treecol[ximfheadtree='1']").remove();\r
+ $("splitter[ximfheadtree='1']").remove();\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:deleteXimfColummns ] delete all custom columns of XIMF headers");\r
+ },\r
+ // attach customColumnHandler for all columns of XIMF headers\r
+ addCustomColumnHandler : function(){\r
+ var currentlistID = $("#threadCols treecol[ximfheadtree='1']");\r
+ for(var i =0 ; i < currentlistID.length ; ++i){\r
+ addColumnHandler();\r
+ }\r
+ gConsole.logStringMessage("[ximfmail - XimfThreadTree:addCustomColumnHandler ] attach customColumnHandler for all columns of XIMF headers");\r
+ },\r
+ // get ilk array for Ximf values of tree cells\r
+ getIlkColumnArray : function(){\r
+ return _ximfIlilkCustomColumnArray;\r
+ },\r
+ //obsolete?\r
+ saveColumnToHide : function(){\r
+ var listID = $("#threadCols treecol[ximfheadtree='1']");\r
+ try{\r
+ if(gCurrentIdentity){\r
+ prefList = "";\r
+ for(var i=0; i<listID.length; ++i){\r
+ if(listID[i].getAttribute("hidden") === "true"){\r
+ if(prefList !== "") {\r
+ prefList +=",";\r
+ }\r
+ prefList += listID[i].id;\r
+ }\r
+ }\r
+ gCurrentIdentity.setCharAttribute("ximfmail_context_DBHeaders",prefList);\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - saveColumnToHide ] " + e +"\nline : " + Error().lineNumber + " : "+ e + "\nfile : "+ Error().fileName);\r
+ }\r
+ }\r
+ };\r
+ }\r
+ return{\r
+ getInstance : function(){\r
+ if(!instantiated){\r
+ instantiated = init();\r
+ }\r
+ return instantiated;\r
+ }\r
+ };\r
+})();
\ No newline at end of file
--- /dev/null
+/* ***** BEGIN LICENSE BLOCK *****
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.
+ *
+ *
+ * Redistribution and use, in source and binary forms, with or without modification,
+ * are permitted provided that the following conditons are met :
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached
+ * in the redistribution of the source code.
+ * 3. Neither the names of the copyright holders nor the names of any contributors
+ * may be used to endorse or promote products derived from this software without specific
+ * prior written permission from EADS Defence and Security.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either of the GNU General Public License Version 2 or later (the "GPL"),
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * REMINDER :
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * EADS Defence and Security - 1 Boulevard Jean Moulin -
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)
+ *
+ * Contributor(s):
+ * Copyright(c) Airbus Defence and Space 2014 - All rights reserved
+ * ***** END LICENSE BLOCK ***** */
+/**
+ * ximfCatalog.js
+ * Check XIMF instances of Trustedbird profile and save informations of ximfmail-profile.xml files into RDF datasource memory.
+ * RDF datas can be read with XimfCatalog class.
+ */
+var gConsole = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);
+/**
+ * XimfCatalog : instance to get RDF list of Ximfmail instances
+ * call example : var ximfCatalog = XimfCatalog().getIntance().publicmethod();
+ */
+var XimfCatalog = (function(){
+ var instantiated;
+ var _rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
+ var _dsCatalog = Components.classes["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"].createInstance(Components.interfaces.nsIRDFDataSource);
+ var _rdfCUtils = Components.classes["@mozilla.org/rdf/container-utils;1"].getService(Components.interfaces.nsIRDFContainerUtils);
+ /**
+ * Check and save for ximfmail instances definitions in Profile
+ */
+ function Create(force, acl){
+ if (force !== true && instantiated) {
+ return;
+ }
+ // Report saved resources
+ if (_dsCatalog) {
+ var counter=0;
+ var it = _dsCatalog.GetAllResources();
+ while(it.hasMoreElements()){
+ counter++;
+ it.getNext();
+ }
+ gConsole.logStringMessage("[ximfmail - XimfCatalog:Create] " + counter + " existing resources in XimfmailCatalog" );
+ }
+ var localXimfProfileFile = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
+ Components.utils.import("resource://gre/modules/AddonManager.jsm");
+ AddonManager.getAllAddons(function(aAddons) {
+ var nbAddons = aAddons.length;
+ gConsole.logStringMessage("[XimfCatalog:Create] Analyse all addons...");
+ for(var idx = 0 ; idx < nbAddons ; ++idx){
+ try{
+ // check for ximfmail instance
+ localXimfProfileFile.initWithFile(getFileFromProfile("extensions/" + aAddons[idx].id + "/chrome/content/ximfmail-profile.xml"));
+ if (localXimfProfileFile.exists()) {
+ var xmlDoc = GetXmlDocument(localXimfProfileFile.path);
+ AppendInstance(xmlDoc.documentElement,acl);
+ }
+ } catch(e) {
+ gConsole.logStringMessage("[XimfCatalog:Create] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+ }
+ // Report saved resources
+ if(_dsCatalog){
+ var counter=0;
+ var it = _dsCatalog.GetAllResources();
+ while(it.hasMoreElements()){
+ counter++;
+ it.getNext();
+ }
+ gConsole.logStringMessage("[ximfmail - XimfCatalog:Create] "+counter+" resources added to XimfmailCatalog" );
+ }
+ });
+ }
+ function AppendInstance(domProfile,aclLevel){
+ gConsole.logStringMessage("[ximfmail - XimfCatalog:AppendInstance ] Append to catalog instance (Level " + aclLevel + ")" + TRACE_DATE() );
+ try{
+ // default title of smtp message
+ var smtpXimfVersion = ximfConst.DEFAULT_XIMF_VERSION;
+ var smtpVersion = "1.0";
+ var smtpInstance = "smtp";
+ var smtpInstanceLabel = "";
+ try{
+ if(gPrefBranch){
+ var val = gPrefBranch.getCharPref("ximfmail.smtp_msg.name");
+ if (val) {
+ smtpInstance = val;
+ }
+ }
+ }catch(e){}
+ // create Seq container
+ var RDFCUtils = Components.classes["@mozilla.org/rdf/container-utils;1"].createInstance(Components.interfaces.nsIRDFContainerUtils);
+ // create RDF resources
+ var seqNode = _rdfService.GetResource("http://www.ximfmail.com/catalog");
+ var RDFC = null;
+ try{
+ RDFC = _rdfCUtils.MakeSeq(_dsCatalog, seqNode);
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - XimfCatalog:AppendInstance ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+ // add datas from xml profile to RDF file
+ // Create theme List
+ var themeTag = domProfile.getElementsByTagName("theme");
+ var theme = "";
+ var uriThemeDefinition = "http://www.ximfmail.com/catalog/" + themeTag[0].getAttribute("name");
+ if(themeTag.length > 0){
+ theme = themeTag[0].getAttribute("name");
+ var newURI = "http://www.ximfmail.com/catalog/" + theme;
+ // get acl default level
+ var defaultacl=-1;
+ if(themeTag[0].hasAttribute("defaultacl")){
+ defaultacl = themeTag[0].getAttribute("defaultacl");
+ gConsole.logStringMessage("[ximfmail - XimfCatalog:AppendInstance ] Default ACL level of profile " + newURI + " : " + defaultacl);
+ }
+ if( RDFC.IndexOf(_rdfService.GetResource(newURI)) === -1){
+ gConsole.logStringMessage("[ximfmail - XimfCatalog:AppendInstance] RDFC - AppendElement " + newURI);
+ RDFC.AppendElement(_rdfService.GetResource(newURI));
+ _dsCatalog.Assert(_rdfService.GetResource(newURI),
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#name"),
+ _rdfService.GetLiteral(theme), true);
+ _dsCatalog.Assert(_rdfService.GetResource(newURI),
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#refSeq"),
+ _rdfService.GetLiteral("http://www.ximfmail.com/catalog/instance_"+theme), true);
+ _dsCatalog.Assert(_rdfService.GetResource(newURI),
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#defaultacl"),
+ _rdfService.GetLiteral(defaultacl), true);
+ }else{
+ gConsole.logStringMessage("[ximfmail - XimfCatalog:AppendInstance] RDFC - ReplacedElement " + newURI);
+ _dsCatalog.Unassert(_rdfService.GetResource(newURI),
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#name"),
+ _rdfService.GetLiteral( getTarget(newURI,"http://www.ximfmail.com/RDF#name")));
+ _dsCatalog.Assert(_rdfService.GetResource(newURI),
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#name"),
+ _rdfService.GetLiteral(theme), true);
+ _dsCatalog.Unassert(_rdfService.GetResource(newURI),
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#refSeq"),
+ _rdfService.GetLiteral( getTarget(newURI,"http://www.ximfmail.com/RDF#refSeq")));
+ _dsCatalog.Assert(_rdfService.GetResource(newURI),
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#refSeq"),
+ _rdfService.GetLiteral("http://www.ximfmail.com/catalog/instance_"+theme), true);
+ _dsCatalog.Unassert(_rdfService.GetResource(newURI),
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#defaultacl"),
+ _rdfService.GetLiteral( getTarget(newURI,"http://www.ximfmail.com/RDF#defaultacl")));
+ _dsCatalog.Assert(_rdfService.GetResource(newURI),
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#defaultacl"),
+ _rdfService.GetLiteral(defaultacl), true);
+ }
+ }
+ // Create instance List
+ var RDFCI = RDFCUtils.MakeSeq(_dsCatalog, _rdfService.GetResource("http://www.ximfmail.com/catalog/instance_"+theme));
+ // create definitions entries
+ var instanceTag = themeTag[0].getElementsByTagName("instance");
+ var sValue="";
+ var bHasSmtpInstance=false;
+ for(var i = 0; i < instanceTag.length; i++){
+ try{
+ // default instance message, continue
+ if(instanceTag[i].getAttribute("id") === "smtp"){
+ bHasSmtpInstance = true;
+ smtpInstance = instanceTag[i].getAttribute("name");
+ smtpVersion = instanceTag[i].getAttribute("version");
+ smtpXimfVersion = instanceTag[i].getAttribute("ximfVersion");
+ try{
+ smtpInstanceLabel = instanceTag[i].getAttribute("label");
+ }catch(ex){}
+ if (!smtpInstanceLabel) {
+ smtpInstanceLabel = smtpInstance;
+ }
+ continue;
+ }
+ }catch(e){}
+ // append resource element to sequence
+ var newURI = "http://www.ximfmail.com/catalog/instance_"+theme +"/"+instanceTag[i].getAttribute("name");
+ var newResource = _rdfService.GetResource(newURI);
+ var isNewItem = false;
+ if( RDFCI.IndexOf(newResource) === -1){
+ RDFCI.AppendElement(newResource);
+ isNewItem = true;
+ }
+ // append ximfVersion of instance
+ if(isNewItem){
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#ximfVersion"),
+ _rdfService.GetLiteral(instanceTag[i].getAttribute("ximfVersion")), true);
+ }else{
+ _dsCatalog.Unassert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#ximfVersion"),
+ _rdfService.GetLiteral(getTarget(newURI,"http://www.ximfmail.com/RDF#ximfVersion")));
+
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#ximfVersion"),
+ _rdfService.GetLiteral(instanceTag[i].getAttribute("ximfVersion")), true);
+
+ }
+ // append name of instance
+ if(isNewItem){
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#instance"),
+ _rdfService.GetLiteral(instanceTag[i].getAttribute("name")), true);
+ }else{
+ _dsCatalog.Unassert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#instance"),
+ _rdfService.GetLiteral(getTarget(newURI,"http://www.ximfmail.com/RDF#instance")));
+
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#instance"),
+ _rdfService.GetLiteral(instanceTag[i].getAttribute("name")), true);
+ }
+ // append label of instance
+ try{
+ var instLabel = instanceTag[i].getAttribute("label");
+ if (!instLabel) {
+ instLabel = instanceTag[i].getAttribute("name");
+ }
+ if(isNewItem){
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#instanceLabel"),
+ _rdfService.GetLiteral(instLabel), true);
+ }else{
+ _dsCatalog.Unassert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#instanceLabel"),
+ _rdfService.GetLiteral(getTarget(newURI,"http://www.ximfmail.com/RDF#instanceLabel")));
+
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#instanceLabel"),
+ _rdfService.GetLiteral(instLabel), true);
+ }
+ }catch(ex){}
+ // append version of instance
+ if(isNewItem){
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#version"),
+ _rdfService.GetLiteral(instanceTag[i].getAttribute("version")), true);
+ }else{
+ _dsCatalog.Unassert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#version"),
+ _rdfService.GetLiteral(getTarget(newURI,"http://www.ximfmail.com/RDF#version")));
+
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#version"),
+ _rdfService.GetLiteral(instanceTag[i].getAttribute("version")), true);
+
+ }
+ // append id of instance
+ try{
+ if(isNewItem){
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#id"),
+ _rdfService.GetLiteral(instanceTag[i].getAttribute("id")), true);
+ }else{
+ _dsCatalog.Unassert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#id"),
+ _rdfService.GetLiteral(getTarget(newURI,"http://www.ximfmail.com/RDF#id")));
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#id"),
+ _rdfService.GetLiteral(instanceTag[i].getAttribute("id")), true);
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - XimfCatalog:AppendInstance] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+ // schema path value
+ try{
+ var schemaElt = instanceTag[i].getElementsByTagName("schema");
+ sValue="";
+ if(schemaElt){
+ sValue = schemaElt[0].textContent;
+ }
+ if(isNewItem){
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#pathSchema"),
+ _rdfService.GetLiteral(instanceTag[i].getAttribute("directory")+sValue), true);
+ }else{
+ _dsCatalog.Unassert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#pathSchema"),
+ _rdfService.GetLiteral(getTarget(newURI,"http://www.ximfmail.com/RDF#pathSchema")));
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#pathSchema"),
+ _rdfService.GetLiteral(instanceTag[i].getAttribute("directory")+sValue), true);
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - XimfCatalog:AppendInstance] \n " + e + "\nfile : " + e.fileName+"\nline : "+e.lineNumber);
+ }
+ try{
+ // ihm path value
+ var ihmElt = instanceTag[i].getElementsByTagName("ihm");
+ sValue="";
+ if(ihmElt){
+ sValue = ihmElt[0].textContent;
+ }
+ if(isNewItem){
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#pathIhm"),
+ _rdfService.GetLiteral(instanceTag[i].getAttribute("directory")+sValue), true);
+ }else{
+ _dsCatalog.Unassert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#pathIhm"),
+ _rdfService.GetLiteral(getTarget(newURI,"http://www.ximfmail.com/RDF#pathIhm")));
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#pathIhm"),
+ _rdfService.GetLiteral(instanceTag[i].getAttribute("directory")+sValue), true);
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - XimfCatalog:AppendInstance] \n " + e + "\nfile : " + e.fileName+"\nline : "+e.lineNumber);
+ }
+ try{
+ // rules path value
+ var rulesDico = instanceTag[i].getElementsByTagName("rule");
+ sValue="";
+ if(rulesDico){
+ sValue = rulesDico[0].textContent;
+ }
+ if(isNewItem){
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#pathRules"),
+ _rdfService.GetLiteral(instanceTag[i].getAttribute("directory")+sValue), true);
+ }else{
+ _dsCatalog.Unassert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#pathRules"),
+ _rdfService.GetLiteral(getTarget(newURI,"http://www.ximfmail.com/RDF#pathRules")));
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#pathRules"),
+ _rdfService.GetLiteral(instanceTag[i].getAttribute("directory")+sValue), true);
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - XimfCatalog:AppendInstance] \n " + e + "\nfile : " + e.fileName+"\nline : "+e.lineNumber);
+ }
+ try{
+ // dictionary path value
+ var ihmDico = instanceTag[i].getElementsByTagName("dictionary");
+ sValue="";
+ if(ihmDico){
+ sValue = ihmDico[0].textContent;
+ }
+ if(isNewItem){
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#pathDictionary"),
+ _rdfService.GetLiteral(instanceTag[i].getAttribute("directory")+sValue), true);
+ }else{
+ _dsCatalog.Unassert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#pathDictionary"),
+ _rdfService.GetLiteral(getTarget(newURI,"http://www.ximfmail.com/RDF#pathDictionary")));
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#pathDictionary"),
+ _rdfService.GetLiteral(instanceTag[i].getAttribute("directory")+sValue), true);
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - XimfCatalog:AppendInstance] \n " + e + "\nfile : " + e.fileName+"\nline : "+e.lineNumber);
+ }
+ if(isNewItem){
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#theme"),
+ _rdfService.GetLiteral(theme), true);
+ }else{
+ _dsCatalog.Unassert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#theme"),
+ _rdfService.GetLiteral(getTarget(newURI,"http://www.ximfmail.com/RDF#theme")));
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#theme"),
+ _rdfService.GetLiteral(theme), true);
+ }
+ try{
+ // aclLevel of instance to hide/unhide it on account
+ sValue="true";
+ var iAclLevel = -1;
+ var acltag = instanceTag[i].getElementsByTagName("acl");
+ if (acltag.length>0) {
+ iAclLevel = acltag[0].textContent;
+ }
+ if(aclLevel){
+ if (parseInt(iAclLevel, 10) > parseInt(aclLevel, 10)) {
+ sValue = "false";
+ }
+ }else{
+ if (parseInt(iAclLevel, 10) > parseInt(getTarget(uriThemeDefinition,"http://www.ximfmail.com/RDF#defaultacl"), 10)) {
+ sValue = "false";
+ }
+ }
+ if(isNewItem){
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#active"),
+ _rdfService.GetLiteral(sValue), true);
+ }else{
+ _dsCatalog.Unassert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#active"),
+ _rdfService.GetLiteral(getTarget(newURI,"http://www.ximfmail.com/RDF#active")));
+ _dsCatalog.Assert(newResource,
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#active"),
+ _rdfService.GetLiteral(sValue), true);
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - XimfCatalog:AppendInstance] \n " + e + "\nfile : " + e.fileName+"\nline : "+e.lineNumber);
+ }
+ }
+ // insert smtp entry
+ if(bHasSmtpInstance){
+ var smtpURI = "http://www.ximfmail.com/catalog/instance_"+theme +"/smtp";
+ var smtpResource = _rdfService.GetResource(smtpURI);
+ if( RDFCI.IndexOf(smtpResource) === -1){
+ RDFCI.AppendElement(smtpResource);
+ _dsCatalog.Assert(smtpResource,_rdfService.GetResource("http://www.ximfmail.com/RDF#ximfVersion"), _rdfService.GetLiteral(smtpXimfVersion), true);
+ _dsCatalog.Assert(smtpResource,_rdfService.GetResource("http://www.ximfmail.com/RDF#instance"),_rdfService.GetLiteral(smtpInstance), true);
+ _dsCatalog.Assert(smtpResource,_rdfService.GetResource("http://www.ximfmail.com/RDF#version"), _rdfService.GetLiteral(smtpVersion), true);
+ _dsCatalog.Assert(smtpResource,_rdfService.GetResource("http://www.ximfmail.com/RDF#pathSchema"),_rdfService.GetLiteral(smtpInstance), true);
+ _dsCatalog.Assert(smtpResource,_rdfService.GetResource("http://www.ximfmail.com/RDF#pathIhm"),_rdfService.GetLiteral(smtpInstance), true);
+ _dsCatalog.Assert(smtpResource,_rdfService.GetResource("http://www.ximfmail.com/RDF#pathRules"),_rdfService.GetLiteral(smtpInstance), true);
+ _dsCatalog.Assert(smtpResource,_rdfService.GetResource("http://www.ximfmail.com/RDF#pathDictionary"),_rdfService.GetLiteral(smtpInstance), true);
+ _dsCatalog.Assert(smtpResource,_rdfService.GetResource("http://www.ximfmail.com/RDF#theme"),_rdfService.GetLiteral(smtpInstance), true);
+ _dsCatalog.Assert(smtpResource, _rdfService.GetResource("http://www.ximfmail.com/RDF#active"), _rdfService.GetLiteral("true"), true);
+ // append label of instance
+ try{
+ _dsCatalog.Assert(smtpResource,_rdfService.GetResource("http://www.ximfmail.com/RDF#instanceLabel"),_rdfService.GetLiteral(smtpInstanceLabel), true);
+ }catch(ex){}
+ }
+ }
+ gConsole.logStringMessage("[ximfmail - XimfCatalog:AppendInstance] executed "+TRACE_DATE());
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - XimfCatalog.registerXimfmailProfileNode ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+ };
+ /*
+ * read informations from catalog
+ */
+ function getTarget(instance,predicate){
+ try{
+ var resource = _rdfService.GetResource(instance);
+ var targets = _dsCatalog.ArcLabelsOut(resource);
+ while (targets.hasMoreElements()){
+ var newpredicate = targets.getNext();
+ if (newpredicate instanceof Components.interfaces.nsIRDFResource){
+ var target = _dsCatalog.GetTarget(resource, newpredicate, true);
+ if (target instanceof Components.interfaces.nsIRDFLiteral && newpredicate.Value === predicate) {
+ return target.Value;
+ }
+ }
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - XimfCatalog ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+ e.lineNumber);
+ }
+ return null;
+ };
+ function init(){
+ // singleton pattern here
+ return{
+ addProfile : function (xmlProfile){
+ AppendInstance(xmlProfile,null);
+ },
+ publicProperty : "test",
+ //get datasource object
+ getDSCatalog : function(){
+ return _dsCatalog;
+ },
+ rebuild : function(aclLevel){
+ Create(true,aclLevel);
+ gConsole.logStringMessage("[ximfmail - XimfCatalog.rebuild ] rebuild operation executed");
+ },
+ //create catalog with profile xml informations
+ registerXimfmailProfileNode : function(domProfile,aclLevel){
+ AppendInstance(domProfile,aclLevel);
+ gConsole.logStringMessage("[ximfmail - XimfCatalog.registerXimfmailProfileNode ] registerXimfmailProfileNode operation executed");
+ },
+ RemoveSeqCatalog : function(seqNode){
+ try{
+ // create RDF resources
+ var rSeqCatalog = null;
+ try{
+ rSeqCatalog = _rdfCUtils.MakeSeq(_dsCatalog, seqNode);
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - XimfCatalog.registerXimfmailProfileNode ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);
+ }
+ if(rSeqCatalog){
+ var tseq = rSeqCatalog.GetElements();
+ var uriResource = "";
+ while (tseq.hasMoreElements()){
+ var element = tseq.getNext();
+ if (element instanceof Components.interfaces.nsIRDFResource){
+ uriResource = element.ValueUTF8;
+ var resource = _rdfService.GetResource(uriResource);
+ rSeqCatalog.RemoveElementAt(rSeqCatalog.IndexOf(resource),true);
+ }
+ }
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - XimfCatalog - RemoveSeqCatalog ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);
+ }
+ },
+ getNameInstance : function(instance){
+ return getTarget(instance,"http://www.ximfmail.com/RDF#instance");
+ },
+ getLabelInstance : function(instance){
+ return getTarget(instance,"http://www.ximfmail.com/RDF#instanceLabel");
+ },
+ getVersionInstance : function(instance){
+ return getTarget(instance,"http://www.ximfmail.com/RDF#ximfVersion");
+ },
+ getDefinitonInstance : function(instance){
+ return getTarget(instance,"http://www.ximfmail.com/RDF#theme");
+ },
+ getSchemaInstance : function(instance){
+ return getTarget(instance,"http://www.ximfmail.com/RDF#pathSchema");
+ },
+ getDictionaryInstance : function(instance){
+ return getTarget(instance,"http://www.ximfmail.com/RDF#pathDictionary");
+ },
+ getIDInstance : function(instance){
+ return getTarget(instance,"http://www.ximfmail.com/RDF#id");
+ },
+ getIhmInstance : function(instance){
+ return getTarget(instance,"http://www.ximfmail.com/RDF#pathIhm");
+ },
+ getRulesInstance : function(instance){
+ return getTarget(instance,"http://www.ximfmail.com/RDF#pathRules");
+ },
+ getInstanceUri : function(ximfDefUri,ximfName,ximfVersion){
+ try{
+ gConsole.logStringMessage("[ximfmail - XimfCatalog:getInstanceUri ] ximfDefUri = "+ximfDefUri+" - ximfName = "+ximfName+" - ximfVersion = " + ximfVersion );
+ // get container of instance resources of current definition
+ var RDFCUtils = Components.classes["@mozilla.org/rdf/container-utils;1"].createInstance(Components.interfaces.nsIRDFContainerUtils);
+ var rs_seqInstance = _rdfService.GetResource(ximfDefUri);
+ var containerInstances = RDFCUtils.MakeSeq(_dsCatalog, rs_seqInstance);
+ var children = containerInstances.GetElements();
+ while (children.hasMoreElements()){
+ // search uri instance with ximfVersion and ximfName
+ var child = children.getNext();
+ if (child instanceof Components.interfaces.nsIRDFResource){
+ var instance_resource = child.Value;
+ var thisName = getTarget(instance_resource,"http://www.ximfmail.com/RDF#instance");
+ var thisVersion = getTarget(instance_resource,"http://www.ximfmail.com/RDF#ximfVersion");
+ if(thisName && thisVersion){
+ thisName = String_trim(thisName).toLowerCase();
+ if(thisName === String_trim(ximfName).toLowerCase()){
+ return instance_resource;
+ }
+ }
+ }
+ /*
+ DEBUG loop : list of predicats
+ var resource = _rdfService.GetResource(instance_resource);
+ var targets = _dsCatalog.ArcLabelsOut(resource);
+ while (targets.hasMoreElements()){
+ var newpredicate = targets.getNext();
+ if (newpredicate instanceof Components.interfaces.nsIRDFResource){
+ alert("Resource is: " + newpredicate.Value);
+ }else if (newpredicate instanceof Components.interfaces.nsIRDFLiteral){
+ alert("Literal is: " + newpredicate.Value);
+ }
+ }*/
+ }
+
+ // search for instance in others definitions of catalog
+ var completeCatalog = _rdfService.GetResource("http://www.ximfmail.com/catalog");
+ var containerDefinitions = RDFCUtils.MakeSeq(_dsCatalog, completeCatalog);
+ var children = containerDefinitions.GetElements();
+ while (children.hasMoreElements()){
+ try{
+ // search uri instance with ximfVersion and ximfName
+ var child = children.getNext();
+ if (child instanceof Components.interfaces.nsIRDFResource){
+ var def_resource = child.ValueUTF8;
+ // get uri of definition container
+ var seqUriInstance = getTarget(def_resource,"http://www.ximfmail.com/RDF#refSeq");
+ if(seqUriInstance !== ximfDefUri){
+ var rs_seqInstance2 = _rdfService.GetResource(seqUriInstance);
+ var containerInstances2 = RDFCUtils.MakeSeq(_dsCatalog, rs_seqInstance2);
+ var children2 = containerInstances2.GetElements();
+ while (children2.hasMoreElements()){
+ // search uri instance with ximfVersion and ximfName
+ var child2 = children2.getNext();
+ if (child2 instanceof Components.interfaces.nsIRDFResource){
+ var instance_resource2 = child2.ValueUTF8;
+ var thisName2 = getTarget(instance_resource2,"http://www.ximfmail.com/RDF#instance");
+ if(thisName2){
+ thisName2 = String_trim(thisName2).toLowerCase();
+ if(thisName2 === String_trim(ximfName).toLowerCase()){
+ return instance_resource2;
+ }
+ }
+ }
+ }
+ }
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - XimfCatalog - getInstanceUri] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);
+ }
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - XimfCatalog - getInstanceUri] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);
+ }
+ return null;
+ },
+ // array of instances of one definition
+ getInstanceList : function(){
+ var arrayInstancesUri = [];
+ try{
+ // search for instance in others definitions of catalog
+ var RDFCUtils = Components.classes["@mozilla.org/rdf/container-utils;1"].createInstance(Components.interfaces.nsIRDFContainerUtils);
+ var completeCatalog = _rdfService.GetResource("http://www.ximfmail.com/catalog");
+ var containerDefinitions = RDFCUtils.MakeSeq(_dsCatalog, completeCatalog);
+ var children = containerDefinitions.GetElements();
+ while (children.hasMoreElements()){
+ try{
+ // search uri instance with ximfVersion and ximfName
+ var child = children.getNext();
+ if (child instanceof Components.interfaces.nsIRDFResource){
+ var def_resource = child.ValueUTF8;
+ // get uri of definition container
+ var seqUriInstance = getTarget(def_resource,"http://www.ximfmail.com/RDF#refSeq");
+ var rs_seqInstance2 = _rdfService.GetResource(seqUriInstance);
+ var containerInstances2 = RDFCUtils.MakeSeq(_dsCatalog, rs_seqInstance2);
+ var children2 = containerInstances2.GetElements();
+ while (children2.hasMoreElements()){
+ // search uri instance with ximfVersion and ximfName
+ var child2 = children2.getNext();
+ if (child2 instanceof Components.interfaces.nsIRDFResource){
+ var instance_resource2 = child2.ValueUTF8;
+ arrayInstancesUri.push(instance_resource2);
+ }
+ }
+
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - XimfCatalog - getInstanceUri] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - XimfCatalog ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+ return arrayInstancesUri;
+ }
+ // end init() singleton
+ };
+ };
+ return { getInstance : function() {
+ if (!instantiated) {
+ gConsole.logStringMessage("[ximfmail - XimfCatalog ] init catalog...");
+ instantiated = init();
+ }
+ return instantiated;
+ }
+ };
+})();
+/**
+ * Inspect local ximf instances extensions and create new catalog
+ */
+var XimfCatalogFactory = (function() {
+ function createCatalog(callback) {
+ var localXimfProfileFile = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
+ Components.utils.import("resource://gre/modules/AddonManager.jsm");
+ var ximfcatalog = XimfCatalog.getInstance();
+ AddonManager.getAllAddons( function(aAddons) {
+ var nbAddons = aAddons.length;
+ gConsole.logStringMessage("[XimfCatalog:Create] Analyse all addons...");
+ for(var idx = 0 ; idx < nbAddons ; ++idx){
+ try{
+ // check for ximfmail instance
+ localXimfProfileFile.initWithFile(getFileFromProfile("extensions/" + aAddons[idx].id + "/chrome/content/ximfmail-profile.xml"));
+ if (localXimfProfileFile.exists()) {
+ var xmlDoc = GetXmlDocument(localXimfProfileFile.path);
+ ximfcatalog.addProfile(xmlDoc.documentElement);
+ }
+ } catch(e) {
+ gConsole.logStringMessage("[XimfCatalog:Create] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+ }
+ if (callback) {
+ callback(ximfcatalog);
+ }
+ });
+ }
+ return {
+ getIntance : function(callback) {
+ createCatalog(callback);
+ }
+ };
+})();
+// load catalog by calling fatory
+XimfCatalogFactory.getIntance();
\ No newline at end of file
--- /dev/null
+/* ***** BEGIN LICENSE BLOCK *****\r
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ *\r
+ *\r
+ * Redistribution and use, in source and binary forms, with or without modification,\r
+ * are permitted provided that the following conditons are met :\r
+ *\r
+ * 1. Redistributions of source code must retain the above copyright notice,\r
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ * in the redistribution of the source code.\r
+ * 3. Neither the names of the copyright holders nor the names of any contributors\r
+ * may be used to endorse or promote products derived from this software without specific\r
+ * prior written permission from EADS Defence and Security.\r
+ *\r
+ * Alternatively, the contents of this file may be used under the terms of\r
+ * either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ * in which case the provisions of the GPL or the LGPL are applicable instead\r
+ * of those above. If you wish to allow use of your version of this file only\r
+ * under the terms of either the GPL or the LGPL, and not to allow others to\r
+ * use your version of this file under the terms of the MPL, indicate your\r
+ * decision by deleting the provisions above and replace them with the notice\r
+ * and other provisions required by the GPL or the LGPL. If you do not delete\r
+ * the provisions above, a recipient may use your version of this file under\r
+ * the terms of any one of the MPL, the GPL or the LGPL.\r
+ *\r
+ * REMINDER :\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ *\r
+ * Contributor(s):\r
+ * Copyright(c) Airbus Defence and Space 2014 - All rights reserved\r
+ * ***** END LICENSE BLOCK ***** */\r
+\r
+ /*\r
+ *\r
+ */\r
+function XRDFDataSource(){\r
+ this._dataSource;\r
+ this._refDataSource;\r
+}\r
+/*\r
+ * create DataSource RDF with xml file of values\r
+ * xmlDataPath of xml format recognized :\r
+ <ximf:base name="MCA_List">\r
+ <ximf:header>\r
+ <ximf:title>Saaa</ximf:title>\r
+ <description>Subject ....</description>\r
+ <ximf:column>CODE</ximf:column>\r
+ <ximf:column>Description</ximf:column>\r
+ </ximf:header>\r
+ <ximf:tree>\r
+ <ximf:description>\r
+ <ximf:data>ZZZ</ximf:data>\r
+ <ximf:data>My description for this value</ximf:data>\r
+ </ximf:description>\r
+ </ximf:tree>\r
+ </ximf:base>\r
+ */\r
+function CreateRdfDatasSource(xmlDataPath){\r
+ try{\r
+ if (!xmlDataPath) {\r
+ return;\r
+ }\r
+ var domProfile = null;\r
+ var xDataSource = new XRDFDataSource();\r
+ var xmlDoc = GetXmlDocument(xmlDataPath);\r
+ if(xmlDoc){\r
+ domProfile = xmlDoc.documentElement;\r
+ }else{\r
+ gConsole.logStringMessage("[ximfmail - ximfTreeDialog ] \n " + Error.description + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ return;\r
+ }\r
+ // is valid xml document?\r
+ var baseTag = domProfile.getElementsByTagName("ximf:base");\r
+ if (baseTag.length <= 0) {\r
+ return;\r
+ }\r
+ // init RDF XPCOM Services\r
+ var _rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);\r
+ var _dsCatalog = Components.classes["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"].createInstance(Components.interfaces.nsIRDFDataSource);\r
+ var _rdfCUtils = Components.classes["@mozilla.org/rdf/container-utils;1"].getService(Components.interfaces.nsIRDFContainerUtils);\r
+ // parse XML file and create RDF resources\r
+ var tname = baseTag[0].getAttribute("name");\r
+ var baseURI = "http://www.ximfmail.com/catalog/" + tname;\r
+ var datasUri = baseURI + "/datas";\r
+ var seqNode = _rdfService.GetResource(datasUri);\r
+ var RDFC_data = null;\r
+ try {\r
+ RDFC_data = _rdfCUtils.MakeSeq(_dsCatalog, seqNode);\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - CreateRdfDatasSource ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ var treeTag = baseTag[0].getElementsByTagName("ximf:tree");\r
+ var instanceTag = treeTag[0].getElementsByTagName("ximf:description");\r
+ for(var i = 0; i < instanceTag.length; ++i){\r
+ // append resource element to sequence\r
+ var newURI = datasUri + "/data" + i;\r
+ RDFC_data.AppendElement(_rdfService.GetResource(newURI));\r
+ var instanceTagData = instanceTag[i].getElementsByTagName("ximf:data");\r
+ for(var j = 0; j < instanceTagData.length; ++j){\r
+ // append description element\r
+ _dsCatalog.Assert(_rdfService.GetResource(newURI),\r
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#column"+j),\r
+ _rdfService.GetLiteral(instanceTagData[j].textContent), true);\r
+ }\r
+ }\r
+ //create objet result\r
+ xDataSource._dataSource = _dsCatalog;\r
+ xDataSource._refDataSource = datasUri;\r
+ return xDataSource;\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - CreateRdfDatasSource ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+}\r
+/*\r
+ * create DataSource RDF with array of values\r
+ * arrayDatas = [[col0][col1][coln], [col0][col1][coln], [col0][col1][coln], ...]\r
+ * nameSvc = title of box selection\r
+ */\r
+function CreateRdfDatasSource_array(arrayDatas, strTitle){\r
+ try{\r
+ // is valid array document?\r
+ if(arrayDatas.length <= 0){\r
+ return;\r
+ }\r
+ // init RDF XPCOM Services\r
+ var xDataSource = new XRDFDataSource();\r
+ var _rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);\r
+ var _dsCatalog = Components.classes["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"].createInstance(Components.interfaces.nsIRDFDataSource);\r
+ var _rdfCUtils = Components.classes["@mozilla.org/rdf/container-utils;1"].getService(Components.interfaces.nsIRDFContainerUtils);\r
+ // parse XML file and create RDF resources\r
+ var baseURI = "http://www.ximfmail.com/catalog/" + strTitle;\r
+ var datasUri = baseURI + "/datas";\r
+ var seqNode = _rdfService.GetResource(datasUri);\r
+ var RDFC_data = null;\r
+ try{\r
+ RDFC_data = _rdfCUtils.MakeSeq(_dsCatalog, seqNode);\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - XimfTreeData.registerXimfmailProfileNode ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ for(var i = 0; i < arrayDatas.length; ++i){\r
+ // append resource element to sequence\r
+ var newURI = datasUri + "/data" + i;\r
+ RDFC_data.AppendElement(_rdfService.GetResource(newURI));\r
+\r
+ var arrayCols = arrayDatas[i];\r
+ for(var j = 0; j < arrayCols.length; ++j){\r
+ var valData = arrayCols[j];\r
+ if (valData === "") {\r
+ valData = " ";\r
+ }\r
+ // append description element\r
+ _dsCatalog.Assert(_rdfService.GetResource(newURI),\r
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#column"+j),\r
+ _rdfService.GetLiteral(valData),\r
+ true\r
+ );\r
+ }\r
+ }\r
+ //create objet result\r
+ xDataSource._dataSource = _dsCatalog;\r
+ xDataSource._refDataSource = datasUri;\r
+ return xDataSource;\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - XimfTreeData.CreateRdfDatasSource ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+/* ***** BEGIN LICENSE BLOCK *****\r
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ *\r
+ *\r
+ * Redistribution and use, in source and binary forms, with or without modification,\r
+ * are permitted provided that the following conditons are met :\r
+ *\r
+ * 1. Redistributions of source code must retain the above copyright notice,\r
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ * in the redistribution of the source code.\r
+ * 3. Neither the names of the copyright holders nor the names of any contributors\r
+ * may be used to endorse or promote products derived from this software without specific\r
+ * prior written permission from EADS Defence and Security.\r
+ *\r
+ * Alternatively, the contents of this file may be used under the terms of\r
+ * either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ * in which case the provisions of the GPL or the LGPL are applicable instead\r
+ * of those above. If you wish to allow use of your version of this file only\r
+ * under the terms of either the GPL or the LGPL, and not to allow others to\r
+ * use your version of this file under the terms of the MPL, indicate your\r
+ * decision by deleting the provisions above and replace them with the notice\r
+ * and other provisions required by the GPL or the LGPL. If you do not delete\r
+ * the provisions above, a recipient may use your version of this file under\r
+ * the terms of any one of the MPL, the GPL or the LGPL.\r
+ *\r
+ * REMINDER :\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ *\r
+ * Contributor(s):\r
+ * Copyright(c) Airbus Defence and Space 2014 - All rights reserved\r
+ * ***** END LICENSE BLOCK ***** */\r
+var XIMF_RULE_TARGET_NAME_MANDATORY_HEADERS = "MandatoryHeaders";\r
+var gSpecialMandatoryHeaders = [];\r
+//\r
+function SpecialMandatoryHeaders(nameHeader,refHeader){\r
+ if(nameHeader && refHeader){\r
+ var o = new Object();\r
+ o.nameHeader = nameHeader;\r
+ o.refHeader = refHeader;\r
+ gSpecialMandatoryHeaders.push(o);\r
+ }\r
+ $("#addressingWidget").bind("command",SpecialXimfRule_CheckAddress);\r
+ AddEventSpecialMandatoryHeaders();\r
+}\r
+//\r
+function AddEventSpecialMandatoryHeaders(){\r
+ $("#addressingWidget textbox").bind("input",function(evt){\r
+ if(evt.currentTarget.value.length <= 1) {\r
+ SpecialXimfRule_CheckAddress();\r
+ }\r
+ });\r
+}\r
+//\r
+function SpecialXimfRule_CheckAddress(){\r
+ try{\r
+ var menulist = $("#addressingWidget menulist");\r
+ for(var idxSMH = 0 ; idxSMH < gSpecialMandatoryHeaders.length ; ++idxSMH){\r
+ var valueRef = "addr_" + gSpecialMandatoryHeaders[idxSMH].refHeader;\r
+ var nameHeader = gSpecialMandatoryHeaders[idxSMH].nameHeader;\r
+ var valueRefSelected = false;\r
+ for(var i=0;i<menulist.length;++i){\r
+ var valueMenuList = $(menulist[i]).attr("value");\r
+ if( valueMenuList === valueRef){\r
+ // "addr_cc"\r
+ try{\r
+ var id = $(menulist[i]).attr("id");\r
+ var idBox = "addressCol2#" + id.slice(id.indexOf("#")+1,id.length);\r
+ elt = document.getElementById(idBox);\r
+ if(elt.value !== ""){\r
+ // Apply specific rule SpecialXimfRule_MandatoryHeadersCC\r
+ SpecialXimfRule_MandatoryHeaders(nameHeader);\r
+ valueRefSelected = true;\r
+ }\r
+ }catch(ex){}\r
+ break;\r
+ }\r
+ }\r
+ // no rules to apply : unregister it\r
+ if(!valueRefSelected){\r
+ SpecialXimfRule_No_MandatoryHeaders(nameHeader);\r
+ }\r
+ }\r
+ // register new textboxes events\r
+ setTimeout("AddEventSpecialMandatoryHeaders()", 50);\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - SpecialXimfRule_CheckAddress ] \n " + err + "\nfile : " + Error().fileName+"\nline : "+err.lineNumber);\r
+ }\r
+}\r
+//\r
+function SpecialXimfRule_MandatoryHeaders(nameHeader){\r
+ try{\r
+ // get headers to mandatory\r
+ var hdrLabel = $("label[ximfheader='"+nameHeader+"']");\r
+ if(hdrLabel){\r
+ hdrLabel[0].setAttribute("ximfmandatory","true");\r
+ CheckXimfhdrsSelection();\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - SpecialXimfRule_MandatoryHeaders ] \n " + err + "\nfile : " + Error().fileName+"\nline : "+err.lineNumber);\r
+ }\r
+}\r
+//\r
+function SpecialXimfRule_No_MandatoryHeaders(nameHeader){\r
+ try{\r
+ //get headers to unmandatory\r
+ var hdrLabel = $("label[ximfheader='"+nameHeader+"']");\r
+ if(hdrLabel){\r
+ hdrLabel[0].setAttribute("ximfmandatory","false");\r
+ hdrLabel[0].setAttribute("style","color:inherit;");\r
+ CheckXimfhdrsSelection();\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - SpecialXimfRule_MandatoryHeaders ] \n " + err + "\nfile : " + Error().fileName+"\nline : "+err.lineNumber);\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+/* ***** BEGIN LICENSE BLOCK *****\r
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ *\r
+ *\r
+ * Redistribution and use, in source and binary forms, with or without modification,\r
+ * are permitted provided that the following conditons are met :\r
+ *\r
+ * 1. Redistributions of source code must retain the above copyright notice,\r
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ * in the redistribution of the source code.\r
+ * 3. Neither the names of the copyright holders nor the names of any contributors\r
+ * may be used to endorse or promote products derived from this software without specific\r
+ * prior written permission from EADS Defence and Security.\r
+ *\r
+ * Alternatively, the contents of this file may be used under the terms of\r
+ * either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ * in which case the provisions of the GPL or the LGPL are applicable instead\r
+ * of those above. If you wish to allow use of your version of this file only\r
+ * under the terms of either the GPL or the LGPL, and not to allow others to\r
+ * use your version of this file under the terms of the MPL, indicate your\r
+ * decision by deleting the provisions above and replace them with the notice\r
+ * and other provisions required by the GPL or the LGPL. If you do not delete\r
+ * the provisions above, a recipient may use your version of this file under\r
+ * the terms of any one of the MPL, the GPL or the LGPL.\r
+ *\r
+ * REMINDER :\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ *\r
+ * Contributor(s):\r
+ * Copyright(c) Airbus Defence and Space 2014 - All rights reserved\r
+ * ***** END LICENSE BLOCK ***** */\r
+var gConsole = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);\r
+var CHROME_XIMFMAIL_TREEDATA = "chrome://theme_ximfmail/content/ximfTreeData.rdf";\r
+var gRelativeXimfTreePath = "extensions/{A627B834-BD9F-4b3f-9AF5-347B5A570402}/chrome/content/theme/ximfTreeDataBck.rdf";\r
+/*\r
+ *\r
+ */\r
+function XimfTreeData(){\r
+ // private:\r
+ var _rdfService = null;\r
+ var _rdfCUtils = null;\r
+ var _dsCatalog = null;\r
+ var _rootNode = null;\r
+ var _urlCatalog = CHROME_XIMFMAIL_TREEDATA;\r
+ // instance counter for index RDF file\r
+ var _instanceCounter = 0;\r
+ function init(){\r
+ try{\r
+ if (!_rdfService) {\r
+ _rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);\r
+ }\r
+ if(!_dsCatalog){\r
+ _dsCatalog = Components.classes["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"].createInstance(Components.interfaces.nsIRDFDataSource);\r
+\r
+ }\r
+ if (!_rdfCUtils) {\r
+ _rdfCUtils = Components.classes["@mozilla.org/rdf/container-utils;1"].getService(Components.interfaces.nsIRDFContainerUtils);\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - XimfTreeData.init ] \n " + e + "\nfile : " + e.fileName+"\nline : "+e.lineNumber);\r
+ return false;\r
+ }\r
+ return true;\r
+ }\r
+ // public:\r
+ if (typeof XimfTreeData.initialized === "undefined") {\r
+ /*\r
+ * read infomations from catalog\r
+ */\r
+ XimfTreeData.prototype.getTarget = function(instance,predicate){\r
+ try {\r
+ init();\r
+ var resource = _rdfService.GetResource(instance);\r
+ var targets = _dsCatalog.ArcLabelsOut(resource);\r
+ while (targets.hasMoreElements()) {\r
+ var newpredicate = targets.getNext();\r
+ if (newpredicate instanceof Components.interfaces.nsIRDFResource) {\r
+ var target = _dsCatalog.GetTarget(resource, newpredicate, true);\r
+ if (target instanceof Components.interfaces.nsIRDFLiteral && newpredicate.Value === predicate) {\r
+ return target.Value;\r
+ }\r
+ }\r
+ }\r
+ } catch(e) {\r
+ gConsole.logStringMessage("[ximfmail - XimfTreeData.getTarget ] \n " + e + "\nfile : " + e.fileName+"\nline : "+e.lineNumber);\r
+ }\r
+ };\r
+ /*\r
+ * create catalog with profile xml informations\r
+ */\r
+ XimfTreeData.prototype.registerXimfmailProfileNode = function(domProfile){\r
+ try{\r
+ // create Seq container\r
+ init();\r
+ // create our root nodes\r
+ var seqCatalog = _rdfService.GetResource("http://www.ximfmail.com/catalog");\r
+ var RDFC_Cat = null;\r
+ try{\r
+ RDFC_Cat = _rdfCUtils.MakeSeq(_dsCatalog, seqCatalog);\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - XimfTreeData.registerXimfmailProfileNode ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ var baseTag = domProfile.getElementsByTagName("base");\r
+ if (baseTag.length <= 0) {\r
+ return;\r
+ }\r
+ var tname = baseTag[0].getAttribute("name");\r
+ var baseURI = "http://www.ximfmail.com/catalog/" + tname;\r
+ try{\r
+ RDFC_Cat.AppendElement(_rdfService.GetResource(baseURI));\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - XimfTreeData.registerXimfmailProfileNode ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ _dsCatalog.Assert(_rdfService.GetResource(baseURI),\r
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#name"),\r
+ _rdfService.GetLiteral(tname), true);\r
+ _dsCatalog.Assert(_rdfService.GetResource(baseURI),\r
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#dialogheader"),\r
+ _rdfService.GetLiteral(baseURI+"/dialogheader"), true);\r
+ _dsCatalog.Assert(_rdfService.GetResource(baseURI),\r
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#datas"),\r
+ _rdfService.GetLiteral(baseURI+"/datas"), true);\r
+ // Create dialogheader description\r
+ var dlgUri = baseURI + "/dialogheader";\r
+ var seqNode = _rdfService.GetResource(dlgUri);\r
+ var RDFC_Dgh = null;\r
+ RDFC_Dgh = _rdfCUtils.MakeSeq(_dsCatalog, seqNode);\r
+ RDFC_Dgh.AppendElement(_rdfService.GetResource(dlgUri));\r
+ var headerTag = baseTag[0].getElementsByTagName("header");\r
+ // append tiltle element <ximf:title>MCA</ximf:title>\r
+ var title = headerTag[0].getElementsByTagName("title");\r
+ _dsCatalog.Assert(_rdfService.GetResource(dlgUri),\r
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#title"),\r
+ _rdfService.GetLiteral(title[0].textContent), true);\r
+ // append description element <ximf:descritpion>Mentions et clés d'attribution</ximf:descritpion>\r
+ var descritpion = headerTag[0].getElementsByTagName("description");\r
+ _dsCatalog.Assert(_rdfService.GetResource(dlgUri),\r
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#description"),\r
+ _rdfService.GetLiteral(descritpion[0].textContent), true);\r
+ // append title colonne <ximf:column>clé</ximf:column>\r
+ var columnTag = headerTag[0].getElementsByTagName("column");\r
+ for(var x = 0; x < columnTag.length; ++x){\r
+ // append description element\r
+ _dsCatalog.Assert(_rdfService.GetResource(dlgUri),\r
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#column"+x),\r
+ _rdfService.GetLiteral(columnTag[x].textContent), true);\r
+ }\r
+ // Create datas descritpion\r
+ var datasUri = baseURI + "/datas";\r
+ var seqNode = _rdfService.GetResource(datasUri);\r
+ var RDFC_data = null;\r
+ try{\r
+ RDFC_data = _rdfCUtils.MakeSeq(_dsCatalog, seqNode);\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - XimfTreeData.registerXimfmailProfileNode ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ // add datas from xml profile to RDF file\r
+ var treeTag = baseTag[0].getElementsByTagName("tree");\r
+ var instanceTag = treeTag[0].getElementsByTagName("description");\r
+ for(var i = 0; i < instanceTag.length; ++i){\r
+ // append resource element to sequence\r
+ var newURI = datasUri + "/data" + i;\r
+ RDFC_data.AppendElement(_rdfService.GetResource(newURI));\r
+ var instanceTagData = instanceTag[i].getElementsByTagName("data");\r
+ for(var j = 0; j < instanceTagData.length; ++j){\r
+ // append description element\r
+ _dsCatalog.Assert(_rdfService.GetResource(newURI),\r
+ _rdfService.GetResource("http://www.ximfmail.com/RDF#column"+j),\r
+ _rdfService.GetLiteral(instanceTagData[j].textContent), true);\r
+ }\r
+ }\r
+ }catch(e){\r
+ gConsole.logStringMessage("[ximfmail - XimfTreeData.registerXimfmailProfileNode ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);\r
+ }\r
+ };\r
+ XimfTreeData.prototype.getTitleHeader = function(key){\r
+ var uri = "http://www.ximfmail.com/catalog/"+ key + "/dialogheader";\r
+ return this.getTarget(uri,"http://www.ximfmail.com/RDF#title");\r
+ };\r
+ XimfTreeData.prototype.getDescriptionHeader = function(key){\r
+ var uri = "http://www.ximfmail.com/catalog/"+ key + "/dialogheader";\r
+ return this.getTarget(uri,"http://www.ximfmail.com/RDF#description");\r
+ };\r
+ XimfTreeData.prototype.getTitleColumn = function(key,idx){\r
+ var uri = "http://www.ximfmail.com/catalog/"+ key + "/dialogheader";\r
+ return this.getTarget(uri,"http://www.ximfmail.com/RDF#column"+idx);\r
+ };\r
+ XimfTreeData.initialized = true;\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+.ximfmail-person-icon {\r
+ margin: 0 3px;\r
+ list-style-image: url("chrome://messenger/skin/addressbook/icons/abcard.png");\r
+}\r
+\r
+.addressingXimfmailCell {\r
+ border-bottom: 1px solid #CACAFF;\r
+ padding: 0px;\r
+}\r
--- /dev/null
+<?xml version="1.0"?>\r
+<!DOCTYPE bindings \r
+[\r
+ <!ENTITY % dtd1 SYSTEM "chrome://ximfmail/locale/datepicker.dtd" > %dtd1; \r
+ \r
+]>\r
+<bindings \r
+ xmlns="http://www.mozilla.org/xbl"\r
+ xmlns:html="http://www.w3.org/1999/xhtml"\r
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"\r
+ xmlns:xbl="http://www.mozilla.org/xbl">\r
+\r
+ <binding id="ximfaddress">\r
+ <resources>\r
+ <stylesheet src="chrome://ximfmail/content/ximfaddress/ximfaddress.css"/> \r
+ <script src="util.js"/>\r
+ </resources>\r
+ <content> \r
+ <xul:listbox xbl:inherits="id,readonly" rows="3" flex="1" >\r
+ <xul:listcols> \r
+ <xul:listcol id="textcol-addressingXimfmail" flex="1"/>\r
+ </xul:listcols>\r
+ <xul:listitem id="addressingXimfmailItem" allowevents="true" index="0" flex="1">\r
+ <xul:listcell class="addressingXimfmailCell">\r
+ <xul:textbox id="addressingXimfmailTextbox" class="plain textbox-addressingWidget uri-element"\r
+ type="autocomplete" flex="1" \r
+ searchSessions="addrbook" timeout="300" maxrows="4" \r
+ autoFill="true" autoFillAfterMatch="true" forceComplete="true"\r
+ minResultsForPopup="3" ignoreBlurWhileSearching="true">\r
+ <xul:image class="ximfmail-person-icon" onclick="this.parentNode.select();"/>\r
+ </xul:textbox> \r
+ </xul:listcell> \r
+ </xul:listitem> \r
+ </xul:listbox> \r
+ </content>\r
+\r
+ <implementation>\r
+ <constructor>\r
+ <![CDATA[ \r
+ this.gItemCount = 0;\r
+ this.appendListItem();\r
+ this.appendListItem(); \r
+ ]]>\r
+ </constructor> \r
+ <!-- append item cell in addresses listbox -->\r
+ <property name="listaddress">\r
+ <getter>\r
+ return this.getListAddress();\r
+ </getter>\r
+ <setter> \r
+ return this.setListAddress(val); \r
+ </setter>\r
+ </property> \r
+ <method name="appendListItem"> \r
+ <body><![CDATA[\r
+ var n = document.getAnonymousNodes(this);\r
+ var n1 = n[0].childNodes;\r
+ for(var i=0; i<n1.length; ++i){ \r
+ if(n1[i].nodeName == "xul:listitem"){\r
+ var newItem = n1[i].cloneNode(true);\r
+ ++this.gItemCount; \r
+ newItem.setAttribute("index",this.gItemCount);\r
+ n[0].appendChild(newItem); \r
+ break;\r
+ }\r
+ } \r
+ ]]>\r
+ </body>\r
+ </method>\r
+ <method name="getListAddress"> \r
+ <body><![CDATA[\r
+ var sListAddress = "";\r
+ var n = document.getAnonymousNodes(this);\r
+ var n1 = n[0].childNodes;\r
+ for(var i=0; i<n1.length; ++i){ \r
+ if(n1[i].nodeName == "xul:listitem"){\r
+ var n2 = n1[i].childNodes;\r
+ for(var j=0; j<n2.length; ++j){\r
+ if(n2[j].nodeName == "xul:listcell"){\r
+ var n3 = n2[j].childNodes;\r
+ for(var k=0; k<n3.length; ++k){\r
+ if(n3[k].nodeName == "xul:textbox"){\r
+ if(sListAddress !="" && n3[k].value!="")\r
+ sListAddress += ","; \r
+ sListAddress += n3[k].value;\r
+ }\r
+ }\r
+ \r
+ }\r
+ }\r
+ }\r
+ }\r
+ //alert("XBL Addresses : \n" + sListAddress);\r
+ return sListAddress; \r
+ ]]>\r
+ </body>\r
+ </method>\r
+ <method name="insertItem"> \r
+ <parameter name="value"/> \r
+ <body><![CDATA[\r
+ //alert("XBL insertItem " + value); \r
+ var n = document.getAnonymousNodes(this);\r
+ var n1 = n[0].childNodes;\r
+ for(var i=0; i < n1.length ; ++i){\r
+ if(n1[i].nodeName == "xul:listitem"){\r
+ var n2 = n1[i].childNodes;\r
+ for(var j=0; j < n2.length; ++j){\r
+ if(n2[j].nodeName == "xul:listcell"){\r
+ var n3 = n2[j].childNodes;\r
+ for(var k=0; k<n3.length; ++k){\r
+ if(n3[k].nodeName == "xul:textbox"){\r
+ if(n3[k].value == ""){\r
+ n3[k].value = value;\r
+ return; \r
+ }\r
+ }\r
+ } \r
+ }\r
+ }\r
+ }\r
+ } \r
+ \r
+ ]]> \r
+ </body>\r
+ </method>\r
+ <method name="setListAddress"> \r
+ <parameter name="completeList"/> \r
+ <body><![CDATA[\r
+ //alert("XBL setListAddress : \n" + completeList);\r
+ \r
+ var reg=new RegExp("[,]+", "g"); \r
+ var arrayDest = completeList.split(reg); \r
+ \r
+ // create missing cells\r
+ for(var nbCell = this.gItemCount ; nbCell <= arrayDest.length ; ++nbCell){\r
+ this.appendListItem();\r
+ }\r
+ \r
+ // insert adresses in cells\r
+ for(var idx_arrayDest = 0; idx_arrayDest < arrayDest.length; ++idx_arrayDest){ \r
+ this.insertItem(arrayDest[idx_arrayDest]);\r
+ } \r
+ ]]> \r
+ </body>\r
+ </method>\r
+ <!-- see keypress example from mozilla/toolkit/content/widgets/autocomplete.xml -->\r
+ <method name="onKeyPress">\r
+ <parameter name="aEvent"/>\r
+ <body><![CDATA[\r
+ //XXX: this is so bogus...\r
+ if (aEvent.getPreventDefault())\r
+ return false;\r
+ \r
+ switch(aEvent.keyCode) {\r
+ case KeyEvent.DOM_VK_UP:\r
+ //awArrowHit(element, -1);\r
+ break;\r
+ case KeyEvent.DOM_VK_DOWN:\r
+ //awArrowHit(element, 1);\r
+ break;\r
+ case KeyEvent.DOM_VK_RETURN:\r
+ case KeyEvent.DOM_VK_TAB:\r
+ // if the user text contains a comma or a line return, ignore \r
+ /*if (element.value.search(',') != -1){\r
+ var addresses = element.value;\r
+ element.value = ""; // clear out the current line so we don't try to autocomplete it..\r
+ //parseAndAddAddresses(addresses, awGetPopupElement(awGetRowByInputElement(element)).selectedItem.getAttribute("value"));\r
+ }else if (event.keyCode == KeyEvent.DOM_VK_TAB){}\r
+ awTabFromRecipient(element, event); */ \r
+ this.appendListItem();\r
+ break;\r
+ }\r
+ \r
+ /*\r
+ if(aEvent.keyCode || aEvent.charCode <= 32 || aEvent.altKey || \r
+ aEvent.ctrlKey || aEvent.metaKey)\r
+ return true; // No printable char pressed, not a potential accesskey\r
+\r
+ var key = aEvent.which;\r
+ var keychar = String.fromCharCode( aEvent.which );//String.fromCharCode(key);\r
+\r
+ // control keys\r
+ if ((key==null) || (key==0) || (key==8) || \r
+ (key==9) || (key==13) || (key==27) ){\r
+ return true;\r
+ }\r
+\r
+ // numbers and a single decimal\r
+ if ((("-/0123456789").indexOf(keychar) > -1)){\r
+ return true;\r
+ }\r
+ \r
+ // blocking event\r
+ aEvent.stopPropagation();\r
+ aEvent.preventDefault();\r
+ \r
+ return false;\r
+ */\r
+ ]]>\r
+ </body>\r
+ </method>\r
+\r
+ </implementation> \r
+ <handlers> \r
+ <handler event="keypress" phase="capturing" action="return this.onKeyPress(event);"/>\r
+ </handlers>\r
+ </binding>\r
+</bindings>\r
--- /dev/null
+/* ***** BEGIN LICENSE BLOCK *****
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.
+ *
+ *
+ * Redistribution and use, in source and binary forms, with or without modification,
+ * are permitted provided that the following conditons are met :
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached
+ * in the redistribution of the source code.
+ * 3. Neither the names of the copyright holders nor the names of any contributors
+ * may be used to endorse or promote products derived from this software without specific
+ * prior written permission from EADS Defence and Security.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either of the GNU General Public License Version 2 or later (the "GPL"),
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * REMINDER :
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * EADS Defence and Security - 1 Boulevard Jean Moulin -
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)
+ *
+ * Contributor(s):
+ * Copyright(c) Airbus Defence and Space 2014 - All rights reserved
+ * ***** END LICENSE BLOCK ***** */
+var gConsole = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);
+/*
+ * Load informations of ximf extensions in RDF memory
+ */
+var gXimfCatalog = null;
+/**
+ *
+ * @returns {String}
+ */
+function TRACE_DATE(){
+ var ladate=new Date();
+ var h=ladate.getHours();
+ if (h<10) {
+ h = "0" + h;
+ }
+ var m=ladate.getMinutes();
+ if (m<10) {
+ m = "0" + m;
+ }
+ var s=ladate.getSeconds();
+ if (s<10) {
+ s = "0" + s;
+ }
+ return "\nDATE > "+ladate.getDate()+"/"+(ladate.getMonth()+1)+"/"+ladate.getFullYear()+" "+h+":"+m+":"+s+":"+ladate.getMilliseconds();
+}
+/*
+ * get file / path of user profile
+ */
+ function getFileFromProfile(aRelativePath) {
+ var file = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("ProfD", Components.interfaces.nsIFile);
+ // Add relative data file
+ var path = aRelativePath.split("/");
+ for (var i = 0, sz = path.length; i < sz; i++) {
+ if (path[i] !== "") {
+ file.append(path[i]);
+ }
+ }
+ return file;
+}
+function getFilePathInProfile(aRelativePath) {
+ var file = getFileFromProfile(aRelativePath);
+ return file.path;
+}
+/*
+ * List files of 'dir' directory
+*/
+ function getListFiles(dir){
+ // Acces to system directory files
+ var dir = Components.classes["@mozilla.org/file/local;1"].
+ createInstance(Components.interfaces.nsILocalFile);
+ dir.initWithPath( bn );
+ // read files of working directory
+ var dlst = dir.directoryEntries;
+ while(dlst.hasMoreElements()) {
+ var file = dlst.getNext().QueryInterface(Components.interfaces.nsIFile);
+ if (file.isFile() && file.leafName.substring(file.leafName.lastIndexOf('.')) === '.xul') {
+ /* Create html list */
+ var html_li = document.createElementNS(HTML_NS, 'li');
+ var html_a = document.createElementNS(HTML_NS, 'a');
+ html_a.href = base_chrome + file.leafName;
+ html_a.innerHTML = file.leafName;
+ html_li.appendChild(html_a);
+ html_lst.appendChild(html_li);
+ }
+ }
+}
+/*
+ * List extensions of profile
+ */
+function getExtensionsList(){
+ try{
+ var em = Components.classes["@mozilla.org/extensions/manager;1"].getService(Components.interfaces.nsIExtensionManager);
+ var rfdSvc = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
+ var url = em.datasource.URI;
+ return em.getItemList(Components.interfaces.nsIUpdateItem.TYPE_ADDON, { });
+
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - getExtensionsList ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);
+ }
+}
+/*
+ * get XML parser from file
+ * sPath : complete path File locate on Disk
+ */
+function GetXmlDocument(sPath){
+ var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
+ file.initWithPath(sPath);
+ var stream = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);
+ stream.init(file, -1, -1, Components.interfaces.nsIFileInputStream.CLOSE_ON_EOF);
+ var parser = Components.classes["@mozilla.org/xmlextras/domparser;1"].createInstance(Components.interfaces.nsIDOMParser);
+ return parser.parseFromStream(stream, null, file.fileSize, "text/xml");
+}
+/*
+ *
+ */
+function xHeader(headerRef,headerName,valueRef,valueName,targetName){
+ if (headerRef) {
+ this._headerRef=headerRef;
+ }
+ if (headerName) {
+ this._headerName = headerName;
+ }
+ if (valueRef) {
+ this._valueRef = valueRef;
+ }
+ if (valueName) {
+ this._valueName = valueName;
+ }
+ //FT3504
+ if (targetName) {
+ this._targetName = targetName;
+ }
+}
+/*
+ * Create an array of XIMF headers and XIMF values to use for specific check rules
+ * Function returns an array of xHeader objects
+ * XIMF values are store in string and separated with '&' character
+ */
+function CreateRulesArray(instancePath, ruleType){
+ // tabHeaders[headerRef][headerName][valueRef][valueName] : headers X to add with values X
+ // tabHeaders['0'][headerName]['0'][valueName] : headers to add necessarily
+ // tabHeaders[headerRef][headerName][valueRef]['0'] : headersto add with XIMF values
+ var tabHeaders = new Array;
+ try{
+ // get xml rules
+ var dir = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
+ var urlRules = getFilePathInProfile("extensions/"+ XimfCatalog.getInstance().getRulesInstance(instancePath));
+ dir.initWithPath( urlRules );
+ if(!dir.exists()){
+ gConsole.logStringMessage("[Ximfmail - CreateRulesArray] Error loading dictionary file : " + urlRules);
+ return;
+ }
+ var xmlDoc = GetXmlDocument(urlRules);
+ var compatibleTag = xmlDoc.getElementsByTagName(ruleType);
+ var sValue="";
+ //FT3504
+ for(var idx=0; idx <compatibleTag.length; ++idx ){
+ var childNodes = compatibleTag[idx].childNodes;
+ var targetName = compatibleTag[idx].getAttribute("targetName");
+ for(var j=0; j <childNodes.length; ++j ){
+ var hname = "";
+ var href = "";
+ var vname = "";
+ var vref = "";
+ if(childNodes[j].localName === "aliasHeader"){
+ hname = childNodes[j].getAttribute("headerName");
+ href = childNodes[j].getAttribute("headerRef");
+ var childHeader = childNodes[j].childNodes;
+ for(var k=0; k <childHeader.length; ++k ){
+ //get attributes
+ if(childHeader[k].localName === "aliasValue"){
+ if (vname === ""){
+ vname = childHeader[k].getAttribute("valueName");
+ vref = childHeader[k].getAttribute("valueRef");
+ }else{
+ vname = vname + "&" + childHeader[k].getAttribute("valueName");
+ vref = vref + "&" + childHeader[k].getAttribute("valueRef");
+ }
+ }
+ }
+ // load values to array
+ tabHeaders.push(new xHeader(href, hname, vref, vname,targetName));
+ }
+ }
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - CreateRulesArray ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+e.lineNumber);
+ }
+ return tabHeaders;
+}
+/**
+ *
+ * @param instancePath
+ * @param xslUrl
+ * @returns
+ */
+function CreateDOMWithXimfInstance(instancePath, xslUrl){
+ try{
+ var xml = CreateXMLObjectWithXimfmailInstance(instancePath);
+ return ApplyXimfmailXslt(xslUrl,xml);
+ }catch(e){
+ gConsole.logStringMessage("[Ximfmail - CreateDOMWithXimfInstance] Error on creating instance...\n" + e + " [ " + Error().fileName + Error().lineNumber +"]");
+ }
+ return null;
+}
+function CreateXMLObjectWithXimfmailInstance(instancePath){
+ try{
+ // get xml schema
+ var dir = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
+ var completePath = getFilePathInProfile("extensions/"+XimfCatalog.getInstance().getSchemaInstance(instancePath));
+ dir.initWithPath( completePath );
+ if(!dir.exists()){
+ gConsole.logStringMessage("[Ximfmail - CreateXMLObjectWithXimfmailInstance] Error loading schema file : " + completePath);
+ return null;
+ }
+ var objXML = GetXmlDocument(completePath);
+ // get xml dictionary
+ var urlDictionary = getFilePathInProfile("extensions/"+XimfCatalog.getInstance().getDictionaryInstance(instancePath));
+ dir.initWithPath( urlDictionary );
+ if(dir.exists()){
+ var objDicoXML = GetXmlDocument(urlDictionary);
+ var oDicoNode = objDicoXML.getElementsByTagName("ximf:dictionary");
+ }
+ // get xml ihm
+ var urlIhm = getFilePathInProfile("extensions/"+XimfCatalog.getInstance().getIhmInstance(instancePath));
+ dir.initWithPath( urlIhm );
+ if(dir.exists()){
+ var objIhmXML = GetXmlDocument(urlIhm);
+ var oIhmNode = objIhmXML.getElementsByTagName("ximf:ihm");
+ }
+ // get xml rules
+ var urlRules = getFilePathInProfile("extensions/"+XimfCatalog.getInstance().getRulesInstance(instancePath));
+ dir.initWithPath( urlRules );
+ if(dir.exists()){
+ var objRulesXML = GetXmlDocument(urlRules);
+ var oRulesNode = objRulesXML.getElementsByTagName("ximf:rule");
+ }
+ // insert dictionary node, ihm node to instance node of xml schema
+ var oSchemaNode = objXML.getElementsByTagName("ximf:instance");
+ if(oDicoNode.length > 0){
+ oSchemaNode[0].appendChild( oDicoNode[0] );
+ }
+ if(oIhmNode.length > 0){
+ oSchemaNode[0].appendChild( oIhmNode[0] );
+ }
+ for(var i=0; i < oRulesNode.length; ++i){
+ oSchemaNode[0].appendChild( oRulesNode[i] );
+ }
+ return objXML;
+ }catch(e){
+ gConsole.logStringMessage("[Ximfmail - CreateXMLObjectWithXimfmailInstance] \nError : " + e + " \n [ " + Error().fileName + Error().lineNumber +"]");
+ }
+ return null;
+}
+/*
+ * Create DOM node with xslt transformation on xml object
+ */
+function ApplyXimfmailXslt(xsltUrl,xmlObject){
+ if(!xmlObject) {
+ return null;
+ }
+ try{
+ // import XSLT File
+ var myXMLHTTPRequest = new XMLHttpRequest();
+ myXMLHTTPRequest.open("GET", xsltUrl, false);
+ myXMLHTTPRequest.send(null);
+ var objXSL = myXMLHTTPRequest.responseXML;
+ var xslProcessor = new XSLTProcessor();
+ xslProcessor.importStylesheet(objXSL);
+ // get local lang
+ var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
+ var paramLang = prefs.getCharPref("general.useragent.locale");
+ if(paramLang){
+ xslProcessor.setParameter("","gLang", paramLang);
+ }
+ // transform document
+ var docResult = xslProcessor.transformToFragment(xmlObject, document);
+ return docResult;
+ }catch(e){
+ gConsole.logStringMessage("[Ximfmail - CreateXMLObjectWithXimfmailInstance] \nError : " + e + " \n [ " + Error().fileName + Error().lineNumber +"]");
+ }
+ return null;
+}
+/*
+ * Sat, 06 Jun 2009 16:10:00 GMT >> 09/06/2009 14:10:55
+ */
+function ConvertZTimeToLocal(thisdate){
+ var new_date = null;
+ var reg=new RegExp("[ / :]+", "g");
+ // parts[day][date][month][year][hour][minute][sec][gmt+0]
+ var parts = thisdate.split(reg);
+ if (parts.length < 8) {
+ return;
+ }
+ // get date
+ new_date = parts[1];
+ // get month
+ var month = "";
+ switch(parts[2].toLowerCase()){
+ case "jan":
+ new_date += "/01/";
+ month = "0";
+ break;
+ case "feb":
+ new_date += "/02/";
+ month = "1";
+ break;
+ case "mar":
+ new_date += "/03/";
+ month = "2";
+ break;
+ case "apr":
+ new_date += "/04/";
+ month = "3";
+ break;
+ case "may":
+ new_date += "/05/";
+ month = "4";
+ break;
+ case "jun":
+ new_date += "/06/";
+ month = "5";
+ break;
+ case "jul":
+ new_date += "/07/";
+ month = "6";
+ break;
+ case "aug":
+ new_date += "/08/";
+ month = "7";
+ break;
+ case "sep":
+ new_date += "/09/";
+ month = "8";
+ break;
+ case "oct":
+ new_date += "/10/";
+ month = "9";
+ break;
+ case "nov":
+ new_date += "/11/";
+ month = "10";
+ break;
+ case "dec":
+ new_date += "/12/";
+ month = "11";
+ break;
+ default : new_date += "/??/";
+ }
+ //get year
+ new_date += parts[3];
+ //get time, adjust time GMT and LocaleTime
+ var cdat = new Date();
+ cdat.setUTCFullYear(parseInt("20"+parts[3], 10));
+ cdat.setUTCMonth(parseInt(month, 10));
+ cdat.setUTCDate(parseInt(parts[1], 10));
+ var hour = parts[4];
+ var min = parts[5];
+ try {
+ if (parts[4][0] === "0") {
+ hour=parts[4][1];
+ }
+ } catch(e) {}
+ try{
+ if(parts[5][0] === "0") {
+ min=parts[5][1];
+ }
+ }catch(e){}
+ // get local time
+ var time = (parseInt(hour, 10)*60) + parseInt(min, 10) + (cdat.getTimezoneOffset()*-1);
+ hour = parseInt(parseInt(time, 10)/60, 10);
+ if (parseInt(hour, 10)<=9) {
+ hour = "0" + hour;
+ }
+ min = parseInt(parseInt(time, 10)%60, 10);
+ if (parseInt(min, 10)<=9) {
+ min = "0" + min;
+ }
+ new_date += " "+ hour +":"+min;
+ return new_date;
+}
+/*
+ * get international value from ximfmail propertie file
+ */
+function getIlkProperties(key){
+ var sLabel = "";
+ // internationalisation of ximfmail context popup
+ try{
+ var gBundle = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Components.interfaces.nsIStringBundleService);
+ var stringBundle = gBundle.createBundle("chrome://ximfmail/locale/ximfmail.properties");
+ sLabel = stringBundle.GetStringFromName(key);
+ }catch(err){}
+ return sLabel;
+}
+function String_trim(s) {
+ var c ="";
+ var tmp="";
+ for (var i = 0; i < s.length; i++) {
+ if(s[i] !== " " && s[i] !== "\t") {
+ c += s[i];
+ }
+ }
+ return c;
+}
+/*
+ * BUG 4689 - using folding with header
+ * realize mime format convert special character to encoded-word ASCII format (RFC 2047)
+ * rule based on RFC222 : Internet Message Format
+ */
+function EncodeMimeXimfheader(sHeader, sValue, charSet){
+ try{
+ var tmpValue = "";
+ var sValueFolding = "";
+ try{
+ // realize mime format convert special character to encoded-word ASCII format (RFC 2047)
+ var mimeEncoder = Components.classes["@mozilla.org/messenger/mimeconverter;1"].getService(Components.interfaces.nsIMimeConverter);
+ sValueFolding = mimeEncoder.encodeMimePartIIStr_UTF8(sValue, false, charSet , sHeader.length + 2, Components.interfaces.nsIMimeConverter.MIME_ENCODED_WORD_SIZE);
+ }catch (ex){
+ sValueFolding = sValue;
+ }
+ }catch(e){
+ sValueFolding = sValue;
+ }
+ return sHeader + ": " + sValueFolding;
+}
+/*
+ * Datas class of dialogTree window
+ window.arguments = [];
+ args[0] id textbox to update
+ args[1] reference of catalogue to load
+ args[2] title of dialogbox
+ args[3] description of dialogbox
+ args[4] title of column 0 of dialogbox
+ args[5] title of column 1 of dialogbox
+*/
+function XimfmailTreedialogArgs(){
+ // id textbox to update
+ this.idTargetTextbox = "";
+ // ttitle of dialogbox
+ this.title = "";
+ // description of dialogbox
+ this.description = "";
+ // datasource
+ this.dataSource = "";
+ this.titleColKey = "";
+ this.titleColLabel = "";
+ // reference of catalogue to load
+ this.refdataSource = "";
+ this.currentKeys = [];
+ this.currentLabels = [];
+ this.maxItemsSelected = 1;
+ this.retKeys=[];
+ this.retLabels=[];
+ this.retIsCancel=false;
+}
+/**
+ * update Secure Headers file definition with current user Ximf instance
+ *
+ */
+function UpdateSecureHeadersFileSettings (instancePath, identity) {
+ // create XMLFile at temp directory with rules datas
+ var secureHdrArray = [];
+ var res = false;
+ try {
+ secureHdrArray = CreateRulesArray(instancePath,"ximf:secureHeaders");
+ if (secureHdrArray.length > 0) {
+ var signHeaders = CreateDOMWithXimfInstance(instancePath, ximfConst.CHROME_XSL_SECURE_HEADERS);
+ if (signHeaders) {
+ // get profile folder
+ var file = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("ProfD", Components.interfaces.nsIFile);
+ var serializer = new XMLSerializer();
+ var foStream = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);
+ file.append(ximfConst.XIMFMAIL_SECURE_HEADERS_XML_FILE);
+ // write, create, truncate
+ foStream.init(file, 0x02 | 0x08 | 0x20, 0664, 0);
+ // rememeber, doc is the DOM tree
+ serializer.serializeToStream(signHeaders, foStream, "");
+ foStream.close();
+ // set folder datas
+ identity.setCharAttribute("secureheaders.folderdata",file.path);
+ gConsole.logStringMessage("ximfmail - UpdateSecureHeadersFileSettings] succes updating file " + file.path );
+ res = true;
+ }
+ } else {
+ gConsole.logStringMessage("[ximfmail - UpdateSecureHeadersFileSettings] no rules defined for instance " + instancePath);
+ }
+ } catch (e) {
+ gConsole.logStringMessage("[ximfmail - UpdateSecureHeadersFileSettings] Error : " + e);
+ }
+ return res;
+}
+/**
+ * Transform all instances of Ximfmail catalog in xml files
+ * Thoses files will be used to display Security Labels (RFC 2634)
+ */
+function CreateSecurityLabelXml(){
+ try{
+ var listRef = "";
+ var arrayIstances = XimfCatalog.getInstance().getInstanceList();
+ var xsltUrl = "chrome://theme_ximfmail/content/instance2SecurityLabel-ximfmail.xsl";
+ for(i=0 ; i< arrayIstances.length ; ++i){
+ try{
+ var cInstance = arrayIstances[i];
+ listRef += cInstance + " \n";
+ var resXsl = CreateDOMWithXimfInstance(arrayIstances[i] , xsltUrl);
+ if(resXsl){
+ var newFileName = XimfCatalog.getInstance().getNameInstance(arrayIstances[i])+".xml";
+ // get profile folder
+ var file = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("ProfD", Components.interfaces.nsIFile);
+ var serializer = new XMLSerializer();
+ var foStream = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);
+ file.append("securityLabel");
+ try {
+ file.create(file.DIRECTORY_TYPE,0);
+ } catch(err) {}
+ file.append(newFileName);
+ // write, create, truncate
+ foStream.init(file, 0x02 | 0x08 | 0x20, 0664, 0);
+ // rememeber, doc is the DOM tree
+ serializer.serializeToStream(resXsl, foStream, "");
+ foStream.close();
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - CreateSecurityLabelXml ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+ e.lineNumber);
+ }
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - CreateSecurityLabelXml ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+ e.lineNumber);
+ }
+}
+function ximfAlert(title,message){
+ if(!message){
+ message = title;
+ title = "";
+ }
+ var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
+ prompts.alert(window,title, message);
+}
+/*
+ * return value of array {[key][value],[key][value],...}
+ * @param key :
+ * @param array :
+ */
+function GetValueFromArrayWithInsensitiveKey(key, array){
+ var value = null;
+ try{
+ value = array[key];
+ if(value === null){
+ // try to get value of array with insensitive case key
+ for(akey in array){
+ if(akey.toLowerCase() === key.toLowerCase()){
+ value = array[akey];
+ break;
+ }
+ }
+ }
+ }catch(e){
+ gConsole.logStringMessage("[ximfmail - GetValueFromArrayWithInsensitiveKey ] \n " + e + "\nfile : " + Error().fileName+"\nline : "+Error().lineNumber);
+ value=null;
+ }
+ return value;
+}
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ximf="http://eads.org/ximf/">
+ <xsl:output method="xml" indent="yes" />
+
+<xsl:template match="ximf:instance">
+ <xsl:element name="securityLabel" namespace="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
+ <!--<xsl:attribute name="xmlns">http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul</xsl:attribute>-->
+ <xsl:attribute name="id">id0x087c8960</xsl:attribute>
+ <xsl:apply-templates select="ximf:header" />
+ </xsl:element>
+</xsl:template>
+
+<xsl:template match="ximf:header">
+ <xsl:variable name="headerPolicyIdentifier" select="contains(@id,'header-policy-identifier')" />
+ <xsl:variable name="headerClassification" select="contains(@id,'header-classification')" />
+ <xsl:variable name="headerPrivacyMark" select="contains(@id,'header-privacy-mark')" />
+ <xsl:variable name="headerCategories" select="contains(@id,'header-categories')" />
+ <xsl:choose>
+ <xsl:when test="$headerPolicyIdentifier">
+ <xsl:element name="securityPolicyIdentifier">
+ <xsl:attribute name="value">
+ <xsl:value-of select="ximf:string/@content" />
+ </xsl:attribute>
+ <xsl:attribute name="label">
+ <xsl:value-of select="ximf:string/@content" />
+ </xsl:attribute>
+ </xsl:element>
+ </xsl:when>
+ <xsl:when test="$headerClassification">
+ <xsl:element name="securityClassification">
+ <xsl:attribute name="valueDisplayed">
+ <xsl:text>true</xsl:text>
+ </xsl:attribute>
+ <xsl:apply-templates select="ximf:set" mode="securityClassification" />
+ </xsl:element>
+ </xsl:when>
+ <xsl:when test="$headerPrivacyMark">
+ <xsl:element name="privacyMark">
+ <xsl:attribute name="freetext">
+ <xsl:text>true</xsl:text>
+ </xsl:attribute>
+ <!-- Champ vide codé en dur, je ne sais pas le récupérer autrement -->
+ <xsl:element name="item">
+ <xsl:attribute name="value" />
+ <xsl:attribute name="label" />
+ </xsl:element>
+ <xsl:for-each select="ximf:set/ximf:string">
+ <xsl:element name="item">
+ <xsl:attribute name="value">
+ <xsl:value-of select="@content" />
+ </xsl:attribute>
+ <xsl:attribute name="label" />
+ </xsl:element>
+ </xsl:for-each>
+ </xsl:element>
+ </xsl:when>
+ <xsl:when test="$headerCategories">
+ <xsl:apply-templates select="ximf:set" mode="securityCategories" />
+ </xsl:when>
+ <xsl:otherwise>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="ximf:set" mode="securityClassification">
+ <xsl:apply-templates select="ximf:string" mode="securityClassification" />
+</xsl:template>
+
+<xsl:template match="ximf:set" mode="securityCategories">
+ <xsl:variable name="id"><xsl:value-of select="@id" /></xsl:variable>
+ <xsl:element name="securityCategories">
+ <xsl:attribute name="type">
+ <xsl:value-of select="../../ximf:header[@id='header-classification']/ximf:set/ximf:string/ximf:linkedValue[@ref=$id]/../@technicalContent" />
+ </xsl:attribute>
+ <xsl:apply-templates select="ximf:string" mode="securityCategories" />
+ <xsl:apply-templates select="ximf:compstring" mode="securityCategories" />
+ </xsl:element>
+</xsl:template>
+
+<xsl:template match="ximf:string" mode="securityClassification" >
+ <xsl:variable name="sCLabel">
+ <!-- Remplacer par un tableau ? -->
+ <xsl:choose>
+ <xsl:when test="@technicalContent=0">
+ <xsl:text>unmarked</xsl:text>
+ </xsl:when>
+ <xsl:when test="@technicalContent=1">
+ <xsl:text>unclassified</xsl:text>
+ </xsl:when>
+ <xsl:when test="@technicalContent=2">
+ <xsl:text>restricted</xsl:text>
+ </xsl:when>
+ <xsl:when test="@technicalContent=3">
+ <xsl:text>confidential</xsl:text>
+ </xsl:when>
+ <xsl:when test="@technicalContent=4">
+ <xsl:text>secret</xsl:text>
+ </xsl:when>
+ <xsl:when test="@technicalContent=5">
+ <xsl:text>top-secret</xsl:text>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:element name="item">
+ <xsl:attribute name="value">\r
+ <xsl:value-of select="@technicalContent" />
+ </xsl:attribute>
+ <xsl:attribute name="label">
+ <xsl:value-of select="$sCLabel" />
+ </xsl:attribute>
+ </xsl:element>
+</xsl:template>
+
+<xsl:template match="ximf:string" mode="securityCategories" >
+ <xsl:element name="item">
+ <xsl:attribute name="oid">
+ <xsl:value-of select="substring-before(@technicalContent,',')" />
+ </xsl:attribute>
+ <xsl:attribute name="type">
+ <xsl:text>2</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="substring-after(@technicalContent,',')" />
+ </xsl:attribute>
+ <xsl:attribute name="label">
+ <xsl:value-of select="@content" />
+ </xsl:attribute>
+ </xsl:element>
+</xsl:template>
+
+<xsl:template match="ximf:compstring" mode="securityCategories" >
+ <xsl:element name="item">
+ <xsl:attribute name="oid">
+ <xsl:value-of select="substring-before(@technicalContent,',')" />
+ </xsl:attribute>
+ <xsl:attribute name="type">
+ <xsl:text>2</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="substring-after(@technicalContent,',')" />
+ </xsl:attribute>
+ <xsl:attribute name="label">
+ <xsl:value-of select="@content" />
+ </xsl:attribute>
+ </xsl:element>
+</xsl:template>
+</xsl:stylesheet>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<!-- ***** BEGIN LICENSE BLOCK *****\r
+ - Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ - ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ - \r
+ -\r
+ - Redistribution and use, in source and binary forms, with or without modification, \r
+ - are permitted provided that the following conditons are met :\r
+ -\r
+ - 1. Redistributions of source code must retain the above copyright notice, \r
+ - 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached \r
+ - in the redistribution of the source code.\r
+ - 3. Neither the names of the copyright holders nor the names of any contributors \r
+ - may be used to endorse or promote products derived from this software without specific \r
+ - prior written permission from EADS Defence and Security.\r
+ - \r
+ - Alternatively, the contents of this file may be used under the terms of\r
+ - either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ - or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ - in which case the provisions of the GPL or the LGPL are applicable instead\r
+ - of those above. If you wish to allow use of your version of this file only\r
+ - under the terms of either the GPL or the LGPL, and not to allow others to\r
+ - use your version of this file under the terms of the MPL, indicate your\r
+ - decision by deleting the provisions above and replace them with the notice\r
+ - and other provisions required by the GPL or the LGPL. If you do not delete\r
+ - the provisions above, a recipient may use your version of this file under\r
+ - the terms of any one of the MPL, the GPL or the LGPL.\r
+ - \r
+ - REMINDER :\r
+ - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND \r
+ - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \r
+ - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \r
+ - IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \r
+ - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \r
+ - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \r
+ - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \r
+ - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING \r
+ - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ - \r
+ - EADS Defence and Security - 1 Boulevard Jean Moulin - \r
+ - ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000) \r
+ - ***** END LICENSE BLOCK ***** -->\r
+<xsl:stylesheet version="2.0"\r
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"\r
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
+ xmlns:ximf="http://eads.org/ximf/">\r
+ <xsl:output method="xml" encoding="UTF-8" indent="yes" version="1.0"\r
+ doctype-system="chrome://ximfmail/locale/ximfmail.dtd" />\r
+\r
+ <xsl:param name="gLang">us</xsl:param>\r
+ <xsl:param name="gIdSeparator">·</xsl:param> <!-- unicode of middle dot -->\r
+\r
+ <!-- MAIN FUNCTION -->\r
+ <xsl:template match="/"> \r
+ <xsl:choose>\r
+ <xsl:when test="/ximf:instance/ximf:ihm">\r
+ <xsl:call-template name="CustomizedIhm" /> \r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:call-template name="DefaultIhm" />\r
+ </xsl:otherwise> \r
+ </xsl:choose>\r
+ \r
+ </xsl:template>\r
+\r
+ <!-- DEFAULT PANEL -->\r
+ <xsl:template name="DefaultIhm">\r
+ <tabs>\r
+ <tab id="tabdefaultheaders" label="Headers" />\r
+ <tab id="tabpanelinformations" label="Informations" />\r
+ </tabs>\r
+ <tabpanels id="instanceXimfmail">\r
+ <xsl:for-each select="ximf:instance">\r
+ <tabpanel id="defaultheaders">\r
+ <grid>\r
+ <columns>\r
+ <column id="id_col1_{@id}" />\r
+ <column id="id_col2_{@id}" />\r
+ <column id="id_col3_{@id}" />\r
+ <column id="id_col4_{@id}" /> \r
+ </columns>\r
+ <rows id="id_rows_{@id}"> \r
+ <xsl:for-each select="ximf:header"> \r
+ <xsl:call-template name="InsertRow">\r
+ <xsl:with-param name="headerRef" select="@id" />\r
+ </xsl:call-template> \r
+ </xsl:for-each>\r
+ </rows>\r
+ </grid>\r
+ <xsl:call-template name="AddHeadersHidden" /> \r
+ </tabpanel>\r
+ <tabpanel id="panelinformations">\r
+ <grid>\r
+ <columns>\r
+ <column id="_col1" />\r
+ <column id="_col2" />\r
+ </columns>\r
+ <rows> \r
+ <row>\r
+ <label value="Instance identifier : " />\r
+ <label value="{@id}" style="color:blue; font-weight:bold;" />\r
+ </row>\r
+ <row>\r
+ <label value="Instance version : " />\r
+ <label value="{@version}" style="color:blue; font-weight:bold;" />\r
+ </row>\r
+ <row>\r
+ <label value="XIMF schema version : " />\r
+ <label value="{@ximfVersion}" style="color:blue; font-weight:bold;" />\r
+ </row>\r
+ </rows>\r
+ </grid>\r
+ </tabpanel>\r
+ </xsl:for-each>\r
+ </tabpanels> \r
+ \r
+ </xsl:template>\r
+\r
+ <!-- CUSTOM IHM -->\r
+ <xsl:template name="CustomizedIhm">\r
+ <tabs>\r
+ <xsl:for-each select="/ximf:instance/ximf:ihm/ximf:panel">\r
+ <xsl:element name="tab" id="tab{@id}" accesskey="*"> \r
+ <xsl:attribute name="id">\r
+ <xsl:value-of select="concat('tab',@id)"/> \r
+ </xsl:attribute> \r
+ <xsl:attribute name="label">\r
+ <xsl:call-template name="getInternational">\r
+ <xsl:with-param name="ilk" select="@ilk" /> \r
+ </xsl:call-template> \r
+ </xsl:attribute>\r
+ </xsl:element>\r
+ </xsl:for-each>\r
+ </tabs>\r
+ <tabpanels flex="1">\r
+ <xsl:for-each select="/ximf:instance/ximf:ihm/ximf:panel"> \r
+ <tabpanel id="{@id}" class="ximfpane" flex="1">\r
+ <xsl:for-each select="*">\r
+ <xsl:choose>\r
+ <xsl:when test="name()='ximf:groupbox'">\r
+ <groupbox flex="1">\r
+ <xsl:element name="caption">\r
+ <xsl:attribute name="label"> \r
+ <xsl:call-template name="getInternational">\r
+ <xsl:with-param name="ilk" select="@ilk" /> \r
+ </xsl:call-template> \r
+ </xsl:attribute>\r
+ </xsl:element>\r
+ <xsl:call-template name="CreateGrid">\r
+ <xsl:with-param name="headerSeq" select="." />\r
+ </xsl:call-template> \r
+ </groupbox>\r
+ </xsl:when>\r
+ <xsl:when test="name()='ximf:grid'">\r
+ <xsl:call-template name="CreateGrid">\r
+ <xsl:with-param name="headerSeq" select="." />\r
+ </xsl:call-template>\r
+ </xsl:when> \r
+ <xsl:otherwise/>\r
+ </xsl:choose>\r
+ </xsl:for-each>\r
+ <!-- no container defined : create grid-->\r
+ <vbox flex="1">\r
+ <grid flex="1">\r
+ <columns>\r
+ <column id="id_col1_{@id}" />\r
+ <column id="id_col2_{@id}" flex="1"/>\r
+ <column id="id_col3_{@id}" />\r
+ <column id="id_col4_{@id}" /> \r
+ </columns>\r
+ <rows id="id_rows_{@id}">\r
+ <xsl:for-each select="ximf:headerRef">\r
+ <xsl:call-template name="InsertRow">\r
+ <xsl:with-param name="headerRef" select="." />\r
+ </xsl:call-template>\r
+ </xsl:for-each>\r
+ </rows>\r
+ </grid > \r
+ </vbox> \r
+ <xsl:if test="position()=1">\r
+ <xsl:call-template name="AddHeadersHidden" /> \r
+ </xsl:if> \r
+ </tabpanel>\r
+ </xsl:for-each>\r
+ </tabpanels> \r
+ </xsl:template>\r
+ \r
+ <!-- ****************************************************** -->\r
+ <!-- template to append headers ximf without ihm definition -->\r
+ <xsl:template name="AddHeadersHidden">\r
+ <vbox hidden="true"> \r
+ <xsl:for-each select="/ximf:instance/ximf:header">\r
+ <xsl:choose> \r
+ <xsl:when test="string-length(@ilk) > 0">\r
+ </xsl:when>\r
+ <xsl:otherwise> \r
+ <xsl:element name="label"> \r
+ <xsl:attribute name="class">ximfHiddenHeader</xsl:attribute>\r
+ <xsl:attribute name="ximfheader"><xsl:value-of select="@headerName" /></xsl:attribute>\r
+ <xsl:attribute name="ximfvalue"><xsl:value-of select="./ximf:string/@content" /></xsl:attribute> \r
+ </xsl:element> \r
+ </xsl:otherwise> \r
+ </xsl:choose> \r
+ </xsl:for-each>\r
+ </vbox>\r
+ </xsl:template>\r
+ \r
+ \r
+ <!-- **************************** -->\r
+ <!-- template to create grid ximf -->\r
+ <xsl:template name="CreateGrid">\r
+ <xsl:param name="headerSeq" select="" />\r
+ <grid flex="1" >\r
+ <columns>\r
+ <column id="id_col1_{$headerSeq/@id}" />\r
+ <column id="id_col2_{$headerSeq/@id}" flex="1"/>\r
+ <column id="id_col3_{$headerSeq/@id}" />\r
+ <column id="id_col4_{$headerSeq/@id}" /> \r
+ </columns>\r
+ <rows id="id_rows_{$headerSeq/@id}" >\r
+ <xsl:for-each select="$headerSeq/ximf:headerRef">\r
+ <xsl:call-template name="InsertRow">\r
+ <xsl:with-param name="headerRef" select="." />\r
+ </xsl:call-template>\r
+ </xsl:for-each>\r
+ </rows>\r
+ </grid>\r
+ </xsl:template>\r
+ \r
+ <!-- ************************************* -->\r
+ <!-- template to create id of Popup element-->\r
+ <xsl:template name="GetPopupId">\r
+ <xsl:param name="_refNode"/>\r
+ <xsl:param name="_refHeader"/>\r
+ <xsl:choose>\r
+ <xsl:when test="string-length(@id) <= 0">\r
+ <xsl:value-of select="concat($_refHeader,$gIdSeparator,'ximfmailPopup')"/>\r
+ </xsl:when>\r
+ <xsl:otherwise> \r
+ <xsl:value-of select="@id"/> \r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:template> \r
+ \r
+ <!--************************************************** -->\r
+ <!-- template to row in grid with ximf header elements -->\r
+ <xsl:template name="InsertRow">\r
+ <xsl:param name="headerRef" select="" />\r
+ <xsl:for-each select="/ximf:instance/ximf:header[$headerRef=@id]">\r
+ <!-- <xsl:variable name="_headerId" select="@id" />-->\r
+ <xsl:variable name="_headerId">\r
+ <xsl:call-template name="GetUNID"> \r
+ <xsl:with-param name="_refNode" select="."/> \r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <row align="center" flex="1">\r
+ \r
+ <!-- Header name label -->\r
+ <xsl:variable name="_ilkLabel">\r
+ <xsl:call-template name='getInternational'>\r
+ <xsl:with-param name='ilk' select='@ilk' /> \r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:element name="label">\r
+ <xsl:attribute name="id"><xsl:value-of select="$_headerId"/></xsl:attribute>\r
+ <xsl:attribute name="class">ximfHeaderLabel</xsl:attribute>\r
+ <xsl:attribute name="value"> \r
+ <xsl:value-of select="concat($_ilkLabel,' : ')"/>\r
+ </xsl:attribute>\r
+ <xsl:attribute name="ximfheader"><xsl:value-of select="@headerName" /></xsl:attribute>\r
+ <xsl:if test="string-length(@technicalHeaderName)>0">\r
+ <xsl:attribute name="ximftecheader"><xsl:value-of select="@technicalHeaderName" /></xsl:attribute>\r
+ </xsl:if>\r
+ <xsl:if test="string-length(@isMandatory)>0">\r
+ <xsl:attribute name="ximfmandatory"><xsl:value-of select="@isMandatory" /></xsl:attribute>\r
+ </xsl:if>\r
+ </xsl:element>\r
+ \r
+ <!-- count how many set or multiset -->\r
+ <xsl:variable name="_counterset" select="count(./ximf:set)"/>\r
+ <xsl:variable name="_countermultiset" select="count(./ximf:multiset)"/>\r
+ \r
+ <!-- variables of IDs -->\r
+ <xsl:variable name="idBox" select="concat($_headerId,$gIdSeparator,'ximfvalue')"/> \r
+ \r
+ <!-- Value field elements --> \r
+ <xsl:for-each select="*">\r
+ <xsl:variable name="_idBox" select="concat($_headerId,$gIdSeparator,'ximfmailtextbox')"/>\r
+ <xsl:variable name="_idPopupSet"> \r
+ <xsl:call-template name="GetUNID"> \r
+ <xsl:with-param name="_refNode" select="."/> \r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:choose> \r
+ <xsl:when test="name()='ximf:string'"> \r
+ <xsl:if test="@editable='true'">\r
+ <xsl:call-template name="CreateXimfmailTextbox">\r
+ <xsl:with-param name="_refNode" select="." />\r
+ <xsl:with-param name="_refHeader" select="$_headerId" />\r
+ <xsl:with-param name="_refBox" select="$_idBox" /> \r
+ <xsl:with-param name="_refPopupBox" select="$_idPopupSet"/> \r
+ </xsl:call-template>\r
+ <popup id="{$_idPopupSet}" ximfreftextbox="{$_idBox}" position="after_start" ignorekeys="true" >\r
+ <xsl:call-template name="CreateInputBox"> \r
+ <xsl:with-param name="_refPopupBox" select="$_idPopupSet"/>\r
+ <xsl:with-param name="_refBox" select="$_idBox"/>\r
+ <xsl:with-param name="_refHeader" select="$_headerId" /> \r
+ </xsl:call-template>\r
+ </popup>\r
+ </xsl:if> \r
+ </xsl:when> \r
+ <xsl:when test="name()='ximf:set' or name()='ximf:multiset' or name()='ximf:compstring'">\r
+ <!-- if multiple set, just create 1 textbox -->\r
+ <xsl:if test="position()=1"> \r
+ <xsl:choose>\r
+ <!-- if multiple set, no default context popupset -->\r
+ <xsl:when test="$_counterset > 1 or $_countermultiset > 1"> \r
+ <xsl:call-template name="CreateXimfmailTextbox">\r
+ <xsl:with-param name="_refNode" select="." />\r
+ <xsl:with-param name="_refHeader" select="$_headerId" />\r
+ <xsl:with-param name="_refBox" select="$_idBox" /> \r
+ </xsl:call-template>\r
+ </xsl:when>\r
+ <xsl:otherwise> \r
+ <xsl:call-template name="CreateXimfmailTextbox">\r
+ <xsl:with-param name="_refNode" select="." />\r
+ <xsl:with-param name="_refHeader" select="$_headerId" />\r
+ <xsl:with-param name="_refBox" select="$_idBox" />\r
+ <xsl:with-param name="_refPopupBox" select="$_idPopupSet" />\r
+ </xsl:call-template>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:if>\r
+ \r
+ <!-- Create panel element set/multiset -->\r
+ <xsl:if test="name()='ximf:set' or name()='ximf:multiset'"> \r
+ <panel id="{$_idPopupSet}" ximfreftextbox="{$_idBox}" ximfmaxitem="1"> \r
+ <xsl:if test="@maxItem">\r
+ <xsl:attribute name="ximfmaxitem"><xsl:value-of select="@maxItem" /></xsl:attribute>\r
+ </xsl:if> \r
+ <xsl:if test="@ximfdefault">\r
+ <xsl:attribute name="ximfdefault"><xsl:value-of select="@ximfdefault" /></xsl:attribute>\r
+ </xsl:if> \r
+ <xsl:call-template name="GetFacetsAttribute">\r
+ <xsl:with-param name="_refNode" select="." />\r
+ </xsl:call-template>\r
+ <xsl:call-template name="GetXimfProperties">\r
+ <xsl:with-param name="_refNode" select="." />\r
+ <xsl:with-param name="_refHeader" select="$_headerId" />\r
+ <xsl:with-param name="_refBox" select="$_idBox" /> \r
+ </xsl:call-template>\r
+ <arrowscrollbox orient="vertical" style="max-height:400px;"> \r
+ <richlistbox> \r
+ <xsl:call-template name="AddSetAndMultisetPanel">\r
+ <xsl:with-param name="_refNode" select="." />\r
+ <xsl:with-param name="_refHeader" select="$_headerId" />\r
+ <xsl:with-param name="_refBox" select="$_idBox" />\r
+ <xsl:with-param name="_refPopupBox" select="$_idPopupSet" />\r
+ <xsl:with-param name="_positionPopup" select="'after_start'" />\r
+ </xsl:call-template>\r
+ </richlistbox>\r
+ </arrowscrollbox>\r
+ </panel>\r
+ </xsl:if>\r
+ \r
+ <!-- Create Popupset compstring -->\r
+ <xsl:if test="name()='ximf:compstring'">\r
+ <popup id="{$_idPopupSet}" ximfreftextbox="{$_idBox}" position="after_start" ignorekeys="true">\r
+ <xsl:call-template name="GetFacetsAttribute">\r
+ <xsl:with-param name="_refNode" select="." />\r
+ </xsl:call-template>\r
+ <xsl:call-template name="CreateMenu">\r
+ <xsl:with-param name="_refNode" select="*"/>\r
+ <xsl:with-param name="_refHeader" select="$_headerId" />\r
+ <xsl:with-param name="_refBox" select="$_idBox" />\r
+ <xsl:with-param name="_refPopupBox" select="$_idPopupSet" /> \r
+ </xsl:call-template>\r
+ </popup>\r
+ </xsl:if>\r
+ </xsl:when>\r
+ <xsl:otherwise/> \r
+ </xsl:choose>\r
+ </xsl:for-each> \r
+ </row>\r
+ </xsl:for-each>\r
+ </xsl:template>\r
+ \r
+ <!-- ***************************** -->\r
+ <!-- add fascets attributes of ximf schema -->\r
+ <xsl:template name="GetFacetsAttribute">\r
+ <xsl:param name="_refNode" />\r
+ <xsl:if test="@separator">\r
+ <xsl:attribute name="ximfseparator"><xsl:value-of select="@separator"/></xsl:attribute>\r
+ </xsl:if>\r
+ <xsl:if test="@technicalSeparator">\r
+ <xsl:attribute name="ximftecseparator"><xsl:value-of select="@technicalSeparator"/></xsl:attribute>\r
+ </xsl:if> \r
+ </xsl:template> \r
+ \r
+ <!-- *********************************** --> \r
+ <!-- Create IHM elements of Ximfmail row -->\r
+ <xsl:template name="CreateXimfmailTextbox"> \r
+ <xsl:param name="_refNode"/>\r
+ <xsl:param name="_refHeader"/>\r
+ <xsl:param name="_refBox"/>\r
+ <xsl:param name="_refPopupBox"/> \r
+ \r
+ <xsl:variable name="idContextBox" select="concat($_refHeader,$gIdSeparator,'ximfmailTextboxContext')"/> \r
+ <xsl:choose>\r
+ <xsl:when test="/ximf:instance/ximf:header[@id=$_refHeader][@type='date']"> \r
+ <textbox flex="1" id="{$_refBox}" refheader="{$_refHeader}" class="ximfDatetime" context="{$idContextBox}" readonly="false">\r
+ <button class="ximfmailButtonTxt ximfDatepicker" refBox="{$_refBox}"/> \r
+ </textbox> \r
+ <xsl:call-template name="AppendToolButtons">\r
+ <xsl:with-param name="refBox" select="$_refBox"/> \r
+ </xsl:call-template> \r
+ </xsl:when>\r
+ <xsl:when test="/ximf:instance/ximf:header[@id=$_refHeader][@type='address']"> \r
+ <ximfaddress id="{$_refBox}" refheader="{$_refHeader}" /> \r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <textbox flex="1" id="{$_refBox}" refheader="{$_refHeader}" class="XimfTextboxDisplay" context="{$idContextBox}" refpanel="{$_refPopupBox}" readonly="false">\r
+ <xsl:if test="string-length($_refNode/@maxItem) > 0">\r
+ <xsl:attribute name="ximfmaxitems"><xsl:value-of select="$_refNode/@maxItem"/></xsl:attribute>\r
+ </xsl:if>\r
+ <xsl:if test="string-length($_refNode/@separator) > 0">\r
+ <xsl:attribute name="ximfseparator"><xsl:value-of select="$_refNode/@separator"/></xsl:attribute>\r
+ </xsl:if> \r
+ <button class="ximfmailButtonTxt ximfPopup" refpanel="{$_refPopupBox}"/> \r
+ </textbox>\r
+ <!-- Eraser image -->\r
+ <xsl:call-template name="AppendToolButtons">\r
+ <xsl:with-param name="refBox" select="$_refBox"/> \r
+ </xsl:call-template>\r
+ </xsl:otherwise>\r
+ </xsl:choose> \r
+ <!-- Context popupset -->\r
+ <xsl:call-template name="CreateContext">\r
+ <xsl:with-param name="refBox" select="$_refBox"/>\r
+ <xsl:with-param name="idContext" select="$idContextBox"/>\r
+ </xsl:call-template>\r
+ </xsl:template>\r
+ \r
+ <!-- **************************** -->\r
+ <!-- construct or get ID for node --> \r
+ <xsl:template name="GetUNID">\r
+ <xsl:param name="_refNode"/>\r
+ <xsl:choose>\r
+ <xsl:when test="string-length($_refNode/@id)>0">\r
+ <xsl:value-of select="$_refNode/@id" /> \r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:value-of select="concat(generate-id($_refNode/ancestor::ximf:header),$gIdSeparator,generate-id($_refNode),$gIdSeparator,position())" /> \r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:template>\r
+ \r
+ <!-- ************************************** -->\r
+ <!-- create attributes with Ximf properties --> \r
+ <xsl:template name="GetXimfProperties">\r
+ <xsl:param name="_refNode"/>\r
+ <xsl:param name="_refHeader"/>\r
+ <xsl:param name="_refBox"/>\r
+ <xsl:param name="_refPopupBox"/>\r
+ \r
+ <xsl:for-each select="$_refNode">\r
+ <xsl:if test="$_refHeader">\r
+ <xsl:attribute name="ximfrefheader"><xsl:value-of select="$_refHeader"/></xsl:attribute>\r
+ </xsl:if>\r
+ <xsl:if test="$_refBox">\r
+ <xsl:attribute name="ximfreftextbox"><xsl:value-of select="$_refBox"/></xsl:attribute>\r
+ </xsl:if>\r
+ <xsl:if test=".[@maxLength]">\r
+ <xsl:attribute name="ximfmaxlength"><xsl:value-of select="@maxLength"/></xsl:attribute>\r
+ </xsl:if>\r
+ <xsl:if test=".[@minLength]"> \r
+ <xsl:attribute name="ximfminlength"><xsl:value-of select="@minLength"/></xsl:attribute>\r
+ </xsl:if>\r
+ <xsl:if test=".[@maxItem]">\r
+ <xsl:attribute name="ximfmaxitem"><xsl:value-of select="@maxItem"/></xsl:attribute>\r
+ </xsl:if>\r
+ <xsl:if test=".[@minItem]">\r
+ <xsl:attribute name="ximfminitem"><xsl:value-of select="@minItem"/></xsl:attribute>\r
+ </xsl:if>\r
+ <xsl:if test=".[@separator]">\r
+ <xsl:attribute name="ximfseparator"><xsl:value-of select="@separator"/></xsl:attribute>\r
+ </xsl:if>\r
+ <xsl:if test=".[@technicalSeparator]">\r
+ <xsl:attribute name="ximftecseparator"><xsl:value-of select="@technicalSeparator"/></xsl:attribute>\r
+ </xsl:if>\r
+ \r
+ </xsl:for-each>\r
+ </xsl:template>\r
+ \r
+ \r
+ <!-- ******************************** --> \r
+ <!-- Manage set and multiset elements -->\r
+ <xsl:template name="AddSetAndMultisetPanel">\r
+ <xsl:param name="_refNode"/>\r
+ <xsl:param name="_refHeader"/>\r
+ <xsl:param name="_refBox"/>\r
+ <xsl:param name="_refPopupBox"/>\r
+ <xsl:param name="_positionPopup" />\r
+ <xsl:param name="_refConcat" />\r
+ \r
+ <!-- <xsl:for-each select="$_setType[$refNode=@id]"> -->\r
+ <xsl:for-each select="$_refNode">\r
+ <xsl:variable name="_setType" select="name()"/> \r
+ <xsl:choose>\r
+ <!-- Reference to another set/multiset -->\r
+ <xsl:when test="string-length(@ref)>0">\r
+ <xsl:variable name="_refHead" select="@ref"/> \r
+ <xsl:choose>\r
+ <xsl:when test="count(//*[@id=$_refHead])>0"> \r
+ <xsl:for-each select="//*[@id=$_refHead]">\r
+ <xsl:call-template name="AddSetAndMultisetPanel">\r
+ <xsl:with-param name="_refNode" select="." />\r
+ <xsl:with-param name="_refHeader" select="$_refHeader" />\r
+ <xsl:with-param name="_refBox" select="$_refBox" />\r
+ <xsl:with-param name="_refPopupBox" select="$_refPopupBox" />\r
+ <xsl:with-param name="_positionPopup" select="'after_start'" /> \r
+ <xsl:with-param name="_refConcat" select="$_refConcat"/> \r
+ </xsl:call-template>\r
+ </xsl:for-each> \r
+ </xsl:when>\r
+ <xsl:otherwise> \r
+ <xsl:call-template name="ManageExternalDatas">\r
+ <xsl:with-param name="_refBox" select="$_refBox" />\r
+ <xsl:with-param name="_refExternal" select="$_refHead"/> \r
+ </xsl:call-template> \r
+ </xsl:otherwise>\r
+ </xsl:choose> \r
+ </xsl:when> \r
+ <!-- can select more than one item -->\r
+ <xsl:when test=" number(@maxItem) > 1" >\r
+ <xsl:choose>\r
+ <xsl:when test="$_setType='ximf:set' and ./*[name()='ximf:string']" >\r
+ <xsl:for-each select="*">\r
+ <xsl:if test="name()='ximf:string'">\r
+ <xsl:call-template name="CreateCheckItem"> \r
+ <xsl:with-param name="_refString" select="." /> \r
+ <xsl:with-param name="_refHeader" select="$_refHeader" />\r
+ <xsl:with-param name="_refBox" select="$_refBox" />\r
+ <xsl:with-param name="_setType" select="$_setType"/>\r
+ <xsl:with-param name="_refConcat" select="$_refConcat"/> \r
+ </xsl:call-template>\r
+ </xsl:if>\r
+ <xsl:if test="name()='ximf:compstring'">\r
+ <xsl:call-template name="CreateMenu"> \r
+ <xsl:with-param name="_refNode" select="."/>\r
+ <xsl:with-param name="_refHeader" select="$_refHeader" />\r
+ <xsl:with-param name="_refBox" select="$_refBox" />\r
+ <xsl:with-param name="_refPopupBox" select="$_refPopupBox" />\r
+ <xsl:with-param name="_refConcat" select="$_refConcat"/> \r
+ </xsl:call-template>\r
+ </xsl:if>\r
+ </xsl:for-each> \r
+ </xsl:when>\r
+ <xsl:when test="$_setType='ximf:multiset' and ./*[name()='ximf:string']" >\r
+ <xsl:for-each select="*">\r
+ <xsl:if test="name()='ximf:string'">\r
+ <xsl:call-template name="CreateButtonItem"> \r
+ <xsl:with-param name="_refString" select="." /> \r
+ <xsl:with-param name="_refHeader" select="$_refHeader" />\r
+ <xsl:with-param name="_refBox" select="$_refBox" />\r
+ <xsl:with-param name="_setType" select="$_setType"/>\r
+ <xsl:with-param name="_refConcat" select="$_refConcat"/> \r
+ </xsl:call-template>\r
+ </xsl:if>\r
+ <xsl:if test="name()='ximf:compstring'">\r
+ <xsl:call-template name="CreateMenu"> \r
+ <xsl:with-param name="_refNode" select="."/>\r
+ <xsl:with-param name="_refHeader" select="$_refHeader" />\r
+ <xsl:with-param name="_refBox" select="$_refBox" />\r
+ <xsl:with-param name="_refPopupBox" select="$_refPopupBox" />\r
+ <xsl:with-param name="_refConcat" select="$_refConcat"/> \r
+ </xsl:call-template>\r
+ </xsl:if>\r
+ </xsl:for-each>\r
+ <!-- </menupopup> --> \r
+ </xsl:when>\r
+ <xsl:when test="$_setType='ximf:multiset' and ./*[name()='ximf:compstring']"> \r
+ <!-- <menupopup id="{$_refPopupBox}" position="{$_positionPopup}" ximfreftextbox="{$_refBox}"> xp--> \r
+ <xsl:for-each select="ximf:compstring"> \r
+ <xsl:call-template name="CreateMenu">\r
+ <xsl:with-param name="_refNode" select="."/>\r
+ <xsl:with-param name="_refHeader" select="$_refHeader" />\r
+ <xsl:with-param name="_refBox" select="$_refBox" />\r
+ <xsl:with-param name="_refPopupBox" select="$_refPopupBox" />\r
+ <xsl:with-param name="_refConcat" select="$_refConcat"/> \r
+ </xsl:call-template> \r
+ </xsl:for-each> \r
+ <!-- </menupopup> -->\r
+ </xsl:when>\r
+ </xsl:choose>\r
+ </xsl:when>\r
+ <xsl:when test="*[name()='ximf:string'] or *[name()='ximf:compstring']">\r
+ <xsl:choose>\r
+ <xsl:when test="ximf:string[@editable='true']"> \r
+ <xsl:call-template name="CreateInputBox"> \r
+ <xsl:with-param name="_refPopupBox" select="$_refPopupBox"/>\r
+ <xsl:with-param name="_refBox" select="$_refBox"/>\r
+ <xsl:with-param name="_refConcat" select="$_refConcat"/> \r
+ <!-- <xsl:with-param name="_nbRows" select="@minItem" /> -->\r
+ </xsl:call-template> \r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <!-- <menupopup id="{$_refPopupBox}" position="{$_positionPopup}" ximfreftextbox="{$_refBox}"> xp--> \r
+ <xsl:for-each select="*">\r
+ <xsl:if test="name()='ximf:string'">\r
+ <xsl:call-template name="CreateMenuitem">\r
+ <xsl:with-param name="_refString" select="." /> \r
+ <xsl:with-param name="_refHeader" select="$_refHeader" />\r
+ <xsl:with-param name="_refBox" select="$_refBox" />\r
+ <xsl:with-param name="_setType" select="$_setType"/> \r
+ <xsl:with-param name="_refConcat" select="$_refConcat"/> \r
+ </xsl:call-template>\r
+ </xsl:if>\r
+ <xsl:if test="name()='ximf:compstring'">\r
+ <xsl:call-template name="CreateMenu">\r
+ <xsl:with-param name="_refNode" select="*"/>\r
+ <xsl:with-param name="_refHeader" select="$_refHeader" />\r
+ <xsl:with-param name="_refBox" select="$_refBox" />\r
+ <xsl:with-param name="_refPopupBox" select="$_refPopupBox" /> \r
+ <xsl:with-param name="_refConcat" select="$_refConcat"/> \r
+ </xsl:call-template>\r
+ </xsl:if>\r
+ </xsl:for-each>\r
+ <!-- </menupopup> -->\r
+ </xsl:otherwise>\r
+ </xsl:choose> \r
+ </xsl:when> \r
+ <xsl:otherwise>\r
+ </xsl:otherwise>\r
+ </xsl:choose> \r
+ </xsl:for-each>\r
+ </xsl:template>\r
+ \r
+ <!-- *********************************** -->\r
+ <!-- create popup box for external datas -->\r
+ <xsl:template name="ManageExternalDatas">\r
+ <xsl:param name="_refBox"/>\r
+ <xsl:param name="_refExternal"/>\r
+ <box xtern="1" isset="1" refBox="{$_refBox}" refExternal="{$_refExternal}" class="ximfTreeDialog"/> \r
+ </xsl:template>\r
+ \r
+ <!-- ***************** -->\r
+ <!-- create Input box -->\r
+ <xsl:template name="CreateInputBox"> \r
+ <xsl:param name="_refPopupBox"/>\r
+ <xsl:param name="_refBox"/>\r
+ <xsl:param name="_refConcat"/>\r
+ <xsl:param name="_nbRows" select="1"/> \r
+ \r
+ <textbox ximfreftextbox="{$_refBox}" class="ximfInputbox" rows="1" flex="1"> \r
+ <xsl:if test="number(@maxItem) > 1"> <!-- input box is in tree of menu -->\r
+ <xsl:attribute name="rows">4</xsl:attribute>\r
+ <xsl:attribute name="ximfmaxitems"><xsl:value-of select="@maxItem" /></xsl:attribute>\r
+ <xsl:attribute name="rows"><xsl:value-of select="@minItem" /></xsl:attribute>\r
+ <xsl:attribute name="multiline">true</xsl:attribute>\r
+ </xsl:if>\r
+ <xsl:if test="number(@minItem) > 1"> <!-- input box is in tree of menu -->\r
+ <xsl:attribute name="rows"><xsl:value-of select="@minItem" /></xsl:attribute> \r
+ <xsl:attribute name="multiline">true</xsl:attribute>\r
+ </xsl:if>\r
+ <xsl:if test="string-length($_refConcat) > 0"> <!-- input box is in tree of menu -->\r
+ <xsl:attribute name="ximfconcatid"><xsl:value-of select="$_refConcat" /></xsl:attribute> \r
+ </xsl:if>\r
+ <xsl:if test="@separator">\r
+ <xsl:attribute name="ximfseparator"><xsl:value-of select="@separator" /></xsl:attribute>\r
+ </xsl:if>\r
+ <button class="ximfmailButtonTxt ximfEditor"/>\r
+ </textbox>\r
+ </xsl:template>\r
+ \r
+ <!-- *********************************** -->\r
+ <!-- Manage Menu and Submenu (compstring nodes) -->\r
+ <xsl:template name="CreateMenu">\r
+ <xsl:param name="_refNode"/>\r
+ <xsl:param name="_refHeader"/>\r
+ <xsl:param name="_refBox"/>\r
+ <xsl:param name="_refPopupBox"/>\r
+ <xsl:param name="_refConcat"/>\r
+ \r
+ <xsl:variable name="_id">\r
+ <xsl:call-template name="GetUNID"> \r
+ <xsl:with-param name="_refNode" select="$_refNode"/> \r
+ </xsl:call-template>\r
+ </xsl:variable>\r
+ <xsl:variable name="_newConcat" select="$_id"/>\r
+ <!-- <xsl:variable name="_newConcat" select="concat($_refConcat,'+',$_id)"/> -->\r
+ <richlistitem align="start" ximfenable="true">\r
+ <xsl:if test=".[@ximfchild]">\r
+ <xsl:attribute name="ximfchild"><xsl:value-of select="@ximfchild" /></xsl:attribute>\r
+ </xsl:if> \r
+ <xsl:element name="checkbox">\r
+ <xsl:attribute name="id"><xsl:value-of select="$_id"/></xsl:attribute> \r
+ <xsl:attribute name="class">ximfCheckbox</xsl:attribute>\r
+ <xsl:attribute name="disabled">false</xsl:attribute>\r
+ <xsl:attribute name="ximfconcatid"><xsl:value-of select="$_newConcat"/></xsl:attribute>\r
+ <xsl:attribute name="label">\r
+ <xsl:call-template name="getInternational">\r
+ <xsl:with-param name="ilk" select="@ilk" /> \r
+ </xsl:call-template>\r
+ </xsl:attribute> \r
+ <xsl:attribute name="ximfvalue"><xsl:value-of select="@content"/></xsl:attribute>\r
+ <xsl:if test="@technicalContent">\r
+ <xsl:attribute name="ximftecvalue"><xsl:value-of select="@technicalContent" /></xsl:attribute>\r
+ </xsl:if> \r
+ <xsl:call-template name="GetFacetsAttribute">\r
+ <xsl:with-param name="_refNode" select="." />\r
+ </xsl:call-template>\r
+ <xsl:if test="@contentPositionEnd">\r
+ <xsl:attribute name="ximfcompositionend"><xsl:value-of select="@contentPositionEnd" /></xsl:attribute>\r
+ </xsl:if>\r
+ <xsl:if test="@contentFactorise">\r
+ <xsl:attribute name="ximffactorise"><xsl:value-of select="@contentFactorise" /></xsl:attribute>\r
+ </xsl:if>\r
+ </xsl:element> \r
+ <xsl:for-each select="*">\r
+ <xsl:choose>\r
+ <xsl:when test="name()='ximf:compstring'" >\r
+ <xsl:if test="position()=1"> \r
+ <xsl:call-template name="CreateMenu"> \r
+ <xsl:with-param name="_refNode" select="."/>\r
+ <xsl:with-param name="_refHeader" select="$_refHeader"/>\r
+ <xsl:with-param name="_refBox" select="$_refBox" />\r
+ <xsl:with-param name="_refConcat" select="$_newConcat"/>\r
+ </xsl:call-template> \r
+ <xsl:for-each select="./following-sibling::*">\r
+ <xsl:call-template name="CreateMenu"> \r
+ <xsl:with-param name="_refNode" select="."/>\r
+ <xsl:with-param name="_refHeader" select="$_refHeader"/>\r
+ <xsl:with-param name="_refBox" select="$_refBox" />\r
+ <xsl:with-param name="_refConcat" select="$_newConcat"/> \r
+ </xsl:call-template> \r
+ </xsl:for-each> \r
+ <!-- </xsl:element> --> \r
+ </xsl:if>\r
+ </xsl:when>\r
+ <xsl:when test="name()='ximf:set' or name()='ximf:multiset'">\r
+ <vbox>\r
+ <xsl:call-template name="AddSetAndMultisetPanel">\r
+ <xsl:with-param name="_refNode" select="." />\r
+ <xsl:with-param name="_refHeader" select="$_refHeader" />\r
+ <xsl:with-param name="_refBox" select="$_refBox" />\r
+ <xsl:with-param name="_refPopupBox" select="$_refPopupBox" />\r
+ <xsl:with-param name="_positionPopup" select="'end_before'" />\r
+ <xsl:with-param name="_refConcat" select="$_newConcat"/> \r
+ </xsl:call-template>\r
+ </vbox> \r
+ </xsl:when>\r
+ <xsl:when test="name()='ximf:string'">\r
+ <xsl:choose>\r
+ <xsl:when test="@editable='true'">\r
+ <xsl:call-template name="CreateInputBox"> \r
+ <xsl:with-param name="_refPopupBox" select="$_refPopupBox"/>\r
+ <xsl:with-param name="_refBox" select="$_refBox"/>\r
+ <xsl:with-param name="_refHeader" select="$_refHeader" />\r
+ <xsl:with-param name="_refConcat" select="$_newConcat"/> \r
+ </xsl:call-template> \r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <xsl:call-template name="CreateMenuitem"> \r
+ <xsl:with-param name="_refString" select="$_refNode" /> \r
+ <xsl:with-param name="_refHeader" select="$_refHeader" />\r
+ <xsl:with-param name="_refBox" select="$_refBox" /> \r
+ <xsl:with-param name="_refConcat" select="$_newConcat"/> \r
+ </xsl:call-template>\r
+ </xsl:otherwise> \r
+ </xsl:choose> \r
+ </xsl:when> \r
+ </xsl:choose> \r
+ </xsl:for-each> \r
+ </richlistitem>\r
+ </xsl:template>\r
+ \r
+ <!-- *********************** -->\r
+ <!-- Create menuitem element -->\r
+ <xsl:template name="CreateMenuitem">\r
+ <xsl:param name="_refString"/>\r
+ <xsl:param name="_refHeader"/>\r
+ <xsl:param name="_refBox"/>\r
+ <xsl:param name="_setType"/> \r
+ <xsl:param name="_refConcat"/> \r
+ <xsl:for-each select="$_refString">\r
+ <xsl:variable name="_idmenuitem">\r
+ <xsl:call-template name="GetUNID">\r
+ <xsl:with-param name="_refNode" select="."/>\r
+ </xsl:call-template>\r
+ </xsl:variable> \r
+ <xsl:choose>\r
+ <xsl:when test=".[@editable='true']" >\r
+ <xsl:call-template name="CreateInputBox"> \r
+ <xsl:with-param name="_refPopupBox" select="$_idmenuitem"/>\r
+ <xsl:with-param name="_refBox" select="$_refBox"/>\r
+ <xsl:with-param name="_refHeader" select="$_refHeader" />\r
+ <xsl:with-param name="_refConcat" select="$_refConcat"/>\r
+ </xsl:call-template>\r
+ </xsl:when>\r
+ <xsl:otherwise>\r
+ <richlistitem ximfenable="true">\r
+ <xsl:element name="menuitem">\r
+ <xsl:attribute name="class">ximfItem</xsl:attribute>\r
+ <xsl:attribute name="id"><xsl:value-of select="$_idmenuitem" /></xsl:attribute> \r
+ <xsl:attribute name="label">\r
+ <xsl:call-template name="getInternational">\r
+ <xsl:with-param name="ilk" select="@ilk" /> \r
+ </xsl:call-template> \r
+ </xsl:attribute>\r
+ <xsl:attribute name="ximfvalue"><xsl:value-of select="@content" /></xsl:attribute>\r
+ <xsl:attribute name="ximftextbox"><xsl:value-of select="$_refBox" /></xsl:attribute>\r
+ <xsl:if test=".[@technicalContent]">\r
+ <xsl:attribute name="ximftecvalue"><xsl:value-of select="@technicalContent" /></xsl:attribute>\r
+ </xsl:if> \r
+ <xsl:if test="string-length($_refConcat) > 0"> <!-- menuitem is in tree of menu -->\r
+ <xsl:attribute name="ximfconcatid"><xsl:value-of select="$_refConcat" /></xsl:attribute> \r
+ </xsl:if>\r
+ <!-- manage link values -->\r
+ <xsl:if test="./ximf:linkedValue">\r
+ <xsl:attribute name="linkpopupbox"><xsl:value-of select="./ximf:linkedValue/@ref"/></xsl:attribute>\r
+ </xsl:if> \r
+ </xsl:element>\r
+ </richlistitem>\r
+ </xsl:otherwise>\r
+ </xsl:choose>\r
+ </xsl:for-each>\r
+ </xsl:template>\r
+ \r
+ <!-- *********************** -->\r
+ <!-- Create checkbox element -->\r
+ <xsl:template name="CreateCheckItem">\r
+ <xsl:param name="_refString"/>\r
+ <xsl:param name="_refHeader"/>\r
+ <xsl:param name="_refBox"/>\r
+ <xsl:param name="_setType"/> \r
+ <xsl:param name="_refConcat"/> \r
+ <xsl:for-each select="$_refString"> \r
+ <richlistitem ximfenable="true"> \r
+ <xsl:element name="checkbox">\r
+ <xsl:attribute name="class">ximfCheckbox</xsl:attribute>\r
+ <xsl:attribute name="disabled">false</xsl:attribute>\r
+ <xsl:attribute name="id">\r
+ <xsl:call-template name="GetUNID">\r
+ <xsl:with-param name="_refNode" select="."/>\r
+ </xsl:call-template>\r
+ </xsl:attribute>\r
+ <xsl:attribute name="label">\r
+ <xsl:call-template name="getInternational">\r
+ <xsl:with-param name="ilk" select="@ilk" /> \r
+ </xsl:call-template> \r
+ </xsl:attribute>\r
+ \r
+ <xsl:attribute name="ximfvalue"><xsl:value-of select="@content" /></xsl:attribute>\r
+ <xsl:if test=".[@technicalContent]">\r
+ <xsl:attribute name="ximftecvalue"><xsl:value-of select="@technicalContent" /></xsl:attribute>\r
+ </xsl:if> \r
+ <xsl:if test="string-length($_refConcat) > 0"> <!-- menuitem is in tree of menu -->\r
+ <xsl:attribute name="ximfconcatid"><xsl:value-of select="$_refConcat" /></xsl:attribute> \r
+ </xsl:if>\r
+ <!-- manage link values -->\r
+ <xsl:if test="./ximf:linkedValue">\r
+ <xsl:attribute name="linkpopupbox"><xsl:value-of select="./ximf:linkedValue/@ref"/></xsl:attribute>\r
+ </xsl:if>\r
+ </xsl:element>\r
+ </richlistitem>\r
+ </xsl:for-each>\r
+ </xsl:template>\r
+ \r
+ <!-- *********************** -->\r
+ <!-- Create button element -->\r
+ <xsl:template name="CreateButtonItem">\r
+ <xsl:param name="_refString"/>\r
+ <xsl:param name="_refHeader"/>\r
+ <xsl:param name="_refBox"/>\r
+ <xsl:param name="_setType"/> \r
+ <xsl:param name="_refConcat"/> \r
+ <xsl:for-each select="$_refString"> \r
+ <xsl:element name="button">\r
+ <xsl:attribute name="class">ximfButton</xsl:attribute>\r
+ <xsl:attribute name="id">\r
+ <xsl:call-template name="GetUNID">\r
+ <xsl:with-param name="_refNode" select="."/>\r
+ </xsl:call-template>\r
+ </xsl:attribute> \r
+ <xsl:attribute name="label">\r
+ <xsl:call-template name="getInternational">\r
+ <xsl:with-param name="ilk" select="@ilk" /> \r
+ </xsl:call-template> \r
+ </xsl:attribute>\r
+ <xsl:attribute name="ximfvalue"><xsl:value-of select="@content" /></xsl:attribute>\r
+ <xsl:if test=".[@technicalContent]">\r
+ <xsl:attribute name="ximftecvalue"><xsl:value-of select="@technicalContent" /></xsl:attribute>\r
+ </xsl:if>\r
+ <xsl:attribute name="ximfreftextbox"><xsl:value-of select="$_refBox" /></xsl:attribute>\r
+ <xsl:if test="string-length($_refConcat) > 0"> <!-- menuitem is in tree of menu -->\r
+ <xsl:attribute name="ximfconcatid"><xsl:value-of select="$_refConcat" /></xsl:attribute> \r
+ </xsl:if>\r
+ <!-- manage link values -->\r
+ <xsl:if test="./ximf:linkedValue">\r
+ <xsl:attribute name="linkpopupbox"><xsl:value-of select="./ximf:linkedValue/@ref"/></xsl:attribute>\r
+ </xsl:if>\r
+ </xsl:element>\r
+ </xsl:for-each>\r
+ </xsl:template>\r
+ \r
+ <!-- ******************************* -->\r
+ <!-- create context menu for textbox -->\r
+ <xsl:template name="CreateContext">\r
+ <xsl:param name="refBox"/>\r
+ <xsl:param name="idContext"/>\r
+ <popup id="{$idContext}"> \r
+ <menuitem class="ximfContext" idx="1" idbox="{$refBox}" label="ximfmail.composer.context.eraseall"/>\r
+ <menuitem class="ximfContext" idx="2" idbox="{$refBox}" label="ximfmail.composer.context.details" /> \r
+ </popup> \r
+ </xsl:template>\r
+ \r
+ <!-- ********************** -->\r
+ <!-- insert image of eraser -->\r
+ <xsl:template name="AppendToolButtons">\r
+ <xsl:param name="refBox"/>\r
+ <button \r
+ class="ximfmailButton ximfDetail" \r
+ id="{concat($refBox,$gIdSeparator,'ximfdetail')}" \r
+ refLabel="{$refBox}"/> \r
+ <button \r
+ class="ximfmailButton ximfEraser" \r
+ id="{concat($refBox,$gIdSeparator,'ximferaser')}" \r
+ refValue="{$refBox}"/>\r
+ </xsl:template>\r
+ \r
+ <!-- *********************************************** -->\r
+ <!-- internationalisation of ilk attribute template -->\r
+ <xsl:template name="getInternational">\r
+ <xsl:param name="ilk" />\r
+ <xsl:variable name="value-ilk" select="/ximf:instance/ximf:dictionary/ximf:locale[@lang=$gLang]/ximf:ilk[$ilk=@entity]" />\r
+ <xsl:choose>\r
+ <xsl:when test="string-length($value-ilk) <= 0"><xsl:value-of select="$ilk" /></xsl:when><!-- lire a <= b --> \r
+ <xsl:otherwise><xsl:value-of select="$value-ilk" /></xsl:otherwise>\r
+ </xsl:choose> \r
+ </xsl:template>\r
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<!-- ***** BEGIN LICENSE BLOCK *****\r
+ - Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ - ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ - \r
+ -\r
+ - Redistribution and use, in source and binary forms, with or without modification, \r
+ - are permitted provided that the following conditons are met :\r
+ -\r
+ - 1. Redistributions of source code must retain the above copyright notice, \r
+ - 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached \r
+ - in the redistribution of the source code.\r
+ - 3. Neither the names of the copyright holders nor the names of any contributors \r
+ - may be used to endorse or promote products derived from this software without specific \r
+ - prior written permission from EADS Defence and Security.\r
+ - \r
+ - Alternatively, the contents of this file may be used under the terms of\r
+ - either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ - or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ - in which case the provisions of the GPL or the LGPL are applicable instead\r
+ - of those above. If you wish to allow use of your version of this file only\r
+ - under the terms of either the GPL or the LGPL, and not to allow others to\r
+ - use your version of this file under the terms of the MPL, indicate your\r
+ - decision by deleting the provisions above and replace them with the notice\r
+ - and other provisions required by the GPL or the LGPL. If you do not delete\r
+ - the provisions above, a recipient may use your version of this file under\r
+ - the terms of any one of the MPL, the GPL or the LGPL.\r
+ - \r
+ - REMINDER :\r
+ - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND \r
+ - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \r
+ - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \r
+ - IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \r
+ - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \r
+ - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \r
+ - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \r
+ - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING \r
+ - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ - \r
+ - EADS Defence and Security - 1 Boulevard Jean Moulin - \r
+ - ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000) \r
+ - ***** END LICENSE BLOCK ***** -->\r
+<xsl:stylesheet version="2.0"\r
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"\r
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
+ xmlns:ximf="http://eads.org/ximf/">\r
+ <xsl:output method="xml" encoding="UTF-8" indent="yes" version="1.0" doctype-system="chrome://ximfmail/locale/ximfmail.dtd" />\r
+ \r
+ <!-- MAIN FUNCTION -->\r
+ <xsl:template match="/"> \r
+ <xsl:for-each select="/ximf:instance/ximf:rule/ximf:secureHeaders"> \r
+ <ximf:signed_headers id="{generate-id(.)}">\r
+ <ximf:headers identity="XIMF_BASIC">\r
+ <xsl:if test="@canonalgo">\r
+ <xsl:attribute name="canonalgo"><xsl:value-of select="@canonalgo" /></xsl:attribute>\r
+ </xsl:if> \r
+ <xsl:for-each select="ximf:aliasHeader">\r
+ <ximf:header name="{@headerName}" status="{@status}" /> \r
+ </xsl:for-each> \r
+ </ximf:headers>\r
+ </ximf:signed_headers>\r
+ </xsl:for-each>\r
+ </xsl:template>\r
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<!-- ***** BEGIN LICENSE BLOCK *****\r
+ - Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ - ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ - \r
+ -\r
+ - Redistribution and use, in source and binary forms, with or without modification, \r
+ - are permitted provided that the following conditons are met :\r
+ -\r
+ - 1. Redistributions of source code must retain the above copyright notice, \r
+ - 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached \r
+ - in the redistribution of the source code.\r
+ - 3. Neither the names of the copyright holders nor the names of any contributors \r
+ - may be used to endorse or promote products derived from this software without specific \r
+ - prior written permission from EADS Defence and Security.\r
+ - \r
+ - Alternatively, the contents of this file may be used under the terms of\r
+ - either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ - or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ - in which case the provisions of the GPL or the LGPL are applicable instead\r
+ - of those above. If you wish to allow use of your version of this file only\r
+ - under the terms of either the GPL or the LGPL, and not to allow others to\r
+ - use your version of this file under the terms of the MPL, indicate your\r
+ - decision by deleting the provisions above and replace them with the notice\r
+ - and other provisions required by the GPL or the LGPL. If you do not delete\r
+ - the provisions above, a recipient may use your version of this file under\r
+ - the terms of any one of the MPL, the GPL or the LGPL.\r
+ - \r
+ - REMINDER :\r
+ - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND \r
+ - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \r
+ - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \r
+ - IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \r
+ - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \r
+ - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \r
+ - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \r
+ - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING \r
+ - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ - \r
+ - EADS Defence and Security - 1 Boulevard Jean Moulin - \r
+ - ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000) \r
+ - ***** END LICENSE BLOCK ***** -->\r
+<xsl:stylesheet version="2.0"\r
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"\r
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
+ xmlns:ximf="http://eads.org/ximf/">\r
+ <xsl:output method="xml" encoding="UTF-8" indent="yes" version="1.0" /> \r
+ <xsl:template match="/"> \r
+ <xsl:for-each select="/ximf:instance/ximf:rule/ximf:securityLabel"> \r
+ <securityLabel id="{generate-id(.)}"> \r
+ <xsl:for-each select="ximf:aliasHeader"> \r
+ <xsl:choose>\r
+ <xsl:when test="@headerName='SecurityPolicyIdentifier'">\r
+ <securityPolicyIdentifier value="" label=""/>\r
+ </xsl:when>\r
+ <xsl:when test="@headerName='SecurityClassification'">\r
+ <securityClassification valueDisplayed="true">\r
+ <item value="0" label="unmarked" />\r
+ <item value="1" label="unclassified" />\r
+ <item value="2" label="restricted" />\r
+ <item value="3" label="confidential" />\r
+ <item value="4" label="secret" />\r
+ <item value="5" label="top-secret" />\r
+ </securityClassification>\r
+ </xsl:when>\r
+ <xsl:when test="@headerName='ESSPrivacyMark'">\r
+ <privacyMark freetext="true">\r
+ <item value="" label=""/>\r
+ </privacyMark>\r
+ </xsl:when>\r
+ <xsl:when test="@headerName='SecurityCategory'" >\r
+ <securityCategories type="{@type}">\r
+ <!-- <item oid="" type="" value="" label=""/> -->\r
+ </securityCategories>\r
+ </xsl:when> \r
+ <xsl:otherwise/>\r
+ </xsl:choose> \r
+ </xsl:for-each> \r
+ </securityLabel>\r
+ </xsl:for-each>\r
+ </xsl:template>\r
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<!-- ***** BEGIN LICENSE BLOCK *****\r
+ - Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ - ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ - \r
+ -\r
+ - Redistribution and use, in source and binary forms, with or without modification, \r
+ - are permitted provided that the following conditons are met :\r
+ -\r
+ - 1. Redistributions of source code must retain the above copyright notice, \r
+ - 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached \r
+ - in the redistribution of the source code.\r
+ - 3. Neither the names of the copyright holders nor the names of any contributors \r
+ - may be used to endorse or promote products derived from this software without specific \r
+ - prior written permission from EADS Defence and Security.\r
+ - \r
+ - Alternatively, the contents of this file may be used under the terms of\r
+ - either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ - or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ - in which case the provisions of the GPL or the LGPL are applicable instead\r
+ - of those above. If you wish to allow use of your version of this file only\r
+ - under the terms of either the GPL or the LGPL, and not to allow others to\r
+ - use your version of this file under the terms of the MPL, indicate your\r
+ - decision by deleting the provisions above and replace them with the notice\r
+ - and other provisions required by the GPL or the LGPL. If you do not delete\r
+ - the provisions above, a recipient may use your version of this file under\r
+ - the terms of any one of the MPL, the GPL or the LGPL.\r
+ - \r
+ - REMINDER :\r
+ - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND \r
+ - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \r
+ - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \r
+ - IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \r
+ - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \r
+ - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \r
+ - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \r
+ - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING \r
+ - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ - \r
+ - EADS Defence and Security - 1 Boulevard Jean Moulin - \r
+ - ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000) \r
+ - ***** END LICENSE BLOCK ***** -->\r
+<xsl:stylesheet version="2.0"\r
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"\r
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
+ xmlns:ximf="http://eads.org/ximf/">\r
+ <xsl:output method="xml" encoding="UTF-8" indent="yes" version="1.0" doctype-system="chrome://ximfmail/locale/ximfmail.dtd" />\r
+\r
+ <xsl:param name="gLang">us</xsl:param>\r
+ <xsl:param name="gIdSeparator">·</xsl:param> <!-- unicode of middle dot -->\r
+\r
+ <!-- MAIN FUNCTION -->\r
+ <xsl:template match="/"> \r
+ <xsl:for-each select="/ximf:instance/ximf:ihm/ximf:treeRcv"> \r
+ <xsl:for-each select="ximf:headerRef">\r
+ <!-- <splitter class="tree-splitter" ximfheadtree="1"/> --> \r
+ <xsl:call-template name="CreateCol">\r
+ <xsl:with-param name="headerRef" select="." />\r
+ <xsl:with-param name="indexNode" select="position()" /> \r
+ </xsl:call-template>\r
+ </xsl:for-each>\r
+ </xsl:for-each> \r
+ </xsl:template>\r
+\r
+ <xsl:template name="CreateCol">\r
+ <xsl:param name="headerRef" select="" />\r
+ <xsl:param name="indexNode" select="" /> \r
+ <xsl:for-each select="/ximf:instance/ximf:header[$headerRef=@id]">\r
+ <xsl:element name="treecol"> \r
+ <xsl:attribute name="id"><xsl:value-of select="@headerName"/></xsl:attribute>\r
+ <xsl:attribute name="ordinal"><xsl:value-of select="100+$indexNode"/></xsl:attribute>\r
+ <xsl:attribute name="label">\r
+ <xsl:call-template name="getInternational">\r
+ <xsl:with-param name="ilk" select="@ilk" /> \r
+ </xsl:call-template> \r
+ </xsl:attribute>\r
+ <xsl:attribute name="tooltiptext">\r
+ <xsl:call-template name="getInternational">\r
+ <xsl:with-param name="ilk" select="@ilk" /> \r
+ </xsl:call-template> \r
+ </xsl:attribute> \r
+ <xsl:attribute name="persist">hidden ordinal width</xsl:attribute>\r
+ <xsl:attribute name="currentView">unthreaded</xsl:attribute>\r
+ <xsl:attribute name="flex">1</xsl:attribute> \r
+ <xsl:attribute name="ximfheadtree">1</xsl:attribute> \r
+ </xsl:element>\r
+ </xsl:for-each>\r
+ </xsl:template>\r
+ \r
+ <xsl:template name="getInternational">\r
+ <xsl:param name="ilk" />\r
+ <xsl:variable name="value-ilk" select="/ximf:instance/ximf:dictionary/ximf:locale[@lang=$gLang]/ximf:ilk[$ilk=@entity]" />\r
+ <xsl:choose>\r
+ <xsl:when test="string-length($value-ilk) <= 0"><xsl:value-of select="$ilk" /></xsl:when><!-- lire a <= b --> \r
+ <xsl:otherwise><xsl:value-of select="$value-ilk" /></xsl:otherwise>\r
+ </xsl:choose> \r
+ </xsl:template>\r
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Created with Liquid XML Studio 1.0.8.0 (http://www.liquid-technologies.com) -->\r
+\r
+<!-- ***** BEGIN LICENSE BLOCK *****\r
+ - Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ - ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ - \r
+ -\r
+ - Redistribution and use, in source and binary forms, with or without modification, \r
+ - are permitted provided that the following conditons are met :\r
+ -\r
+ - 1. Redistributions of source code must retain the above copyright notice, \r
+ - 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached \r
+ - in the redistribution of the source code.\r
+ - 3. Neither the names of the copyright holders nor the names of any contributors \r
+ - may be used to endorse or promote products derived from this software without specific \r
+ - prior written permission from EADS Defence and Security.\r
+ - \r
+ - Alternatively, the contents of this file may be used under the terms of\r
+ - either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ - or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ - in which case the provisions of the GPL or the LGPL are applicable instead\r
+ - of those above. If you wish to allow use of your version of this file only\r
+ - under the terms of either the GPL or the LGPL, and not to allow others to\r
+ - use your version of this file under the terms of the MPL, indicate your\r
+ - decision by deleting the provisions above and replace them with the notice\r
+ - and other provisions required by the GPL or the LGPL. If you do not delete\r
+ - the provisions above, a recipient may use your version of this file under\r
+ - the terms of any one of the MPL, the GPL or the LGPL.\r
+ - \r
+ - REMINDER :\r
+ - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND \r
+ - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \r
+ - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \r
+ - IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \r
+ - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \r
+ - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \r
+ - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \r
+ - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING \r
+ - IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ - \r
+ - EADS Defence and Security - 1 Boulevard Jean Moulin - \r
+ - ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000) \r
+ - ***** END LICENSE BLOCK ***** -->\r
+<xs:schema elementFormDefault="qualified" targetNamespace="http://eads.org/ximf/" xmlns:xs="http://www.w3.org/2001/XMLSchema">\r
+ <xs:annotation>\r
+ <xs:documentation> $Header: /data/cvs/v1/MCO2008/mozilla/extensions/ximf/ximfmail/chrome/content/theme/ximf.xsd,v 1.1 2008/11/25 18:51:12 xparis Exp $ </xs:documentation>\r
+ </xs:annotation>\r
+ <xs:element name="instance">\r
+ <xs:complexType>\r
+ <xs:complexContent mixed="false">\r
+ <xs:extension xmlns:q1="http://eads.org/ximf/" base="q1:XIMFInstanceType" />\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+ <xs:complexType name="XIMFInstanceType">\r
+ <xs:sequence minOccurs="0">\r
+ <xs:element xmlns:q1="http://eads.org/ximf/" minOccurs="0" maxOccurs="unbounded" name="header" type="q1:XIMFHeaderType" />\r
+ <xs:element xmlns:q2="http://eads.org/ximf/" minOccurs="0" maxOccurs="unbounded" name="rule" type="q2:XIMFRuleType" />\r
+ <xs:element minOccurs="0" maxOccurs="unbounded" name="dictionary" xmlns:q1="http://eads.org/ximf/" type="q1:XIMFDictionaryType" />\r
+ </xs:sequence>\r
+ <xs:attribute name="ximfVersion" use="required">\r
+ <xs:simpleType>\r
+ <xs:restriction base="xs:string">\r
+ <xs:enumeration value="2.0" />\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ </xs:attribute>\r
+ <xs:attribute name="version" type="xs:string" use="required" />\r
+ <xs:attribute name="author" type="xs:string" />\r
+ <xs:attribute name="creationDate" type="xs:date" />\r
+ <xs:attribute name="name" type="xs:string" use="required" />\r
+ </xs:complexType>\r
+ <xs:complexType name="XIMFHeaderType">\r
+ <xs:choice minOccurs="1" maxOccurs="1">\r
+ <xs:element xmlns:q1="http://eads.org/ximf/" minOccurs="1" maxOccurs="unbounded" name="set" type="q1:XIMFSetType" />\r
+ <xs:element xmlns:q1="http://eads.org/ximf/" minOccurs="1" maxOccurs="unbounded" name="multiset" type="q1:XIMFMultiSetType" />\r
+ <xs:element minOccurs="0" maxOccurs="unbounded" name="compstring" xmlns:q2="http://eads.org/ximf/" type="q2:XIMFComplexString" />\r
+ <xs:element xmlns:q7="http://eads.org/ximf/" minOccurs="1" maxOccurs="1" name="string" type="q7:XIMFPrintableStringDataType" />\r
+ </xs:choice>\r
+ <xs:attribute xmlns:q1="http://eads.org/ximf/" name="id" type="q1:XIMFHeaderID" use="required" />\r
+ <xs:attribute xmlns:q2="http://eads.org/ximf/" name="headerName" type="q2:XIMFPrintableStringType" use="required" />\r
+ <xs:attribute xmlns:q1="http://eads.org/ximf/" name="technicalHeaderName" type="q1:XIMFPrintableStringType" use="optional" />\r
+ <xs:attribute name="type" type="xs:string" use="required" />\r
+ <xs:attribute name="technicalType" type="xs:string" use="optional" />\r
+ <xs:attribute name="isMandatory" type="xs:boolean" use="required" />\r
+ <xs:attribute name="ilk" type="xs:string" use="optional" />\r
+ <xs:attribute xmlns:q2="http://eads.org/ximf/" name="description" type="xs:string" use="optional" />\r
+ </xs:complexType>\r
+ <xs:complexType name="XIMFSetType">\r
+ <xs:choice minOccurs="0" maxOccurs="unbounded">\r
+ <xs:element xmlns:q7="http://eads.org/ximf/" name="string" type="q7:XIMFPrintableStringDataType" />\r
+ <xs:element xmlns:q1="http://eads.org/ximf/" minOccurs="1" maxOccurs="1" name="compstring" type="q1:XIMFComplexString" />\r
+ </xs:choice>\r
+ <xs:attributeGroup xmlns:q2="http://eads.org/ximf/" ref="q2:XIMFFacetsGroup" />\r
+ <xs:attributeGroup xmlns:q3="http://eads.org/ximf/" ref="q3:XIMFPropertiesGroup" />\r
+ </xs:complexType>\r
+ <xs:complexType name="XIMFMultiSetType">\r
+ <xs:choice minOccurs="0" maxOccurs="unbounded">\r
+ <xs:element xmlns:q7="http://eads.org/ximf/" name="string" type="q7:XIMFPrintableStringDataType" />\r
+ <xs:element xmlns:q1="http://eads.org/ximf/" minOccurs="1" maxOccurs="1" name="compstring" type="q1:XIMFComplexString" />\r
+ </xs:choice>\r
+ <xs:attributeGroup xmlns:q4="http://eads.org/ximf/" ref="q4:XIMFFacetsGroup" />\r
+ <xs:attributeGroup xmlns:q5="http://eads.org/ximf/" ref="q5:XIMFPropertiesGroup" />\r
+ </xs:complexType>\r
+ <xs:complexType name="XIMFSequenceType">\r
+ <xs:choice minOccurs="2" maxOccurs="unbounded">\r
+ <xs:element xmlns:q6="http://eads.org/ximf/" name="set" type="q6:XIMFSetType" />\r
+ <xs:element xmlns:q7="http://eads.org/ximf/" name="multiset" type="q7:XIMFMultiSetType" />\r
+ <xs:element xmlns:q8="http://eads.org/ximf/" name="string" type="q8:XIMFPrintableStringDataType" />\r
+ </xs:choice>\r
+ <xs:attributeGroup xmlns:q9="http://eads.org/ximf/" ref="q9:XIMFFacetsGroup" />\r
+ <xs:attributeGroup xmlns:q10="http://eads.org/ximf/" ref="q10:XIMFPropertiesGroup" />\r
+ <xs:attribute default="false" name="reverse" type="xs:boolean" />\r
+ <xs:attribute default="false" name="technicalReverse" type="xs:boolean" />\r
+ </xs:complexType>\r
+ <xs:complexType name="XIMFPrintableStringDataType">\r
+ <xs:sequence>\r
+ <xs:element xmlns:q2="http://eads.org/ximf/" minOccurs="0" maxOccurs="unbounded" name="linkedValue" type="q2:XIMFLinkedValue" />\r
+ </xs:sequence>\r
+ <xs:attributeGroup xmlns:q11="http://eads.org/ximf/" ref="q11:XIMFFacetsGroup" />\r
+ <xs:attributeGroup xmlns:q12="http://eads.org/ximf/" ref="q12:XIMFPropertiesGroup" />\r
+ <xs:attribute default="false" name="editable" type="xs:boolean" use="optional" />\r
+ <xs:attributeGroup xmlns:q3="http://eads.org/ximf/" ref="q3:XIMFContentGroup" />\r
+ </xs:complexType>\r
+ <xs:complexType name="XIMFLinkedValue">\r
+ <xs:attribute name="ref" type="xs:IDREF" use="required" />\r
+ </xs:complexType>\r
+ <xs:complexType name="XIMFRuleType">\r
+ <xs:choice minOccurs="1" maxOccurs="1">\r
+ <xs:sequence minOccurs="1" maxOccurs="unbounded">\r
+ <xs:element xmlns:q3="http://eads.org/ximf/" name="constraint" type="q3:XIMFConstraintType" />\r
+ </xs:sequence>\r
+ <xs:sequence minOccurs="1" maxOccurs="unbounded">\r
+ <xs:element xmlns:q1="http://eads.org/ximf/" name="processing" type="q1:XIMFProcessingType" />\r
+ </xs:sequence>\r
+ <xs:sequence minOccurs="1" maxOccurs="unbounded">\r
+ <xs:element xmlns:q4="http://eads.org/ximf/" name="compatibility" type="q4:XIMFCompatibilityType" />\r
+ </xs:sequence>\r
+ <xs:sequence minOccurs="1" maxOccurs="unbounded">\r
+ <xs:element xmlns:q5="http://eads.org/ximf/" name="policy" type="q5:XIMFPolicyType" />\r
+ </xs:sequence>\r
+ <xs:sequence minOccurs="1" maxOccurs="unbounded">\r
+ <xs:element xmlns:q2="http://eads.org/ximf/" name="custom" type="q2:XIMFCustomType" />\r
+ </xs:sequence>\r
+ </xs:choice>\r
+ <xs:attribute name="agent" use="optional">\r
+ <xs:simpleType>\r
+ <xs:restriction base="xs:string">\r
+ <xs:enumeration value="mua" />\r
+ <xs:enumeration value="mta" />\r
+ <xs:enumeration value="mda" />\r
+ <xs:enumeration value="msa" />\r
+ <xs:enumeration value="gateway" />\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ </xs:attribute>\r
+ <xs:attribute name="id" type="xs:ID" use="required" />\r
+ <xs:attribute name="description" type="xs:string" use="optional" />\r
+ </xs:complexType>\r
+ <xs:complexType name="XIMFConstraintType">\r
+ <xs:attribute xmlns:q5="http://eads.org/ximf/" name="left" type="q5:XIMFHeaderRef" use="required" />\r
+ <xs:attribute name="operator" use="required">\r
+ <xs:simpleType>\r
+ <xs:restriction base="xs:string">\r
+ <xs:enumeration value="greaterThan" />\r
+ <xs:enumeration value="lowerThan" />\r
+ <xs:enumeration value="equalOrGreaterThan" />\r
+ <xs:enumeration value="equalOrLowerThan" />\r
+ <xs:enumeration value="equal" />\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ </xs:attribute>\r
+ <xs:attribute name="right" type="xs:IDREF" use="required" />\r
+ </xs:complexType>\r
+ <xs:complexType name="XIMFProcessingType">\r
+ <xs:sequence minOccurs="1" maxOccurs="unbounded">\r
+ <xs:element xmlns:q2="http://eads.org/ximf/" name="headerName" type="q2:XIMFPrintableStringType" />\r
+ </xs:sequence>\r
+ <xs:attribute name="type">\r
+ <xs:simpleType>\r
+ <xs:restriction base="xs:string">\r
+ <xs:enumeration value="sign-header-value" />\r
+ <xs:enumeration value="encrypt-header-value" />\r
+ <xs:enumeration value="capitalize-header-value" />\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ </xs:attribute>\r
+ </xs:complexType>\r
+ <xs:complexType name="XIMFCompatibilityType">\r
+ <xs:sequence maxOccurs="unbounded">\r
+ <xs:element xmlns:q5="http://eads.org/ximf/" minOccurs="1" maxOccurs="unbounded" name="aliasHeader">\r
+ <xs:complexType>\r
+ <xs:complexContent mixed="false">\r
+ <xs:extension base="q5:XIMFHeaderAliasType">\r
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">\r
+ <xs:element name="aliasValue">\r
+ <xs:complexType>\r
+ <xs:complexContent mixed="false">\r
+ <xs:extension base="q5:XIMFValueAliasType" />\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+ </xs:sequence>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+ </xs:sequence>\r
+ <xs:attribute name="targetName" type="xs:string" use="required" />\r
+ <xs:attribute name="targetVersion" type="xs:string" use="required" />\r
+ </xs:complexType>\r
+ <xs:complexType name="XIMFHeaderAliasType">\r
+ <xs:attribute xmlns:q3="http://eads.org/ximf/" name="headerName" type="q3:XIMFPrintableStringType" use="required" />\r
+ <xs:attribute xmlns:q4="http://eads.org/ximf/" name="headerRef" type="q4:XIMFPrintableStringType" use="optional" />\r
+ </xs:complexType>\r
+ <xs:complexType name="XIMFValueAliasType">\r
+ <xs:attribute xmlns:q5="http://eads.org/ximf/" name="valueName" type="q5:XIMFPrintableStringType" use="required" />\r
+ <xs:attribute xmlns:q6="http://eads.org/ximf/" name="valueRef" type="q6:XIMFPrintableStringType" use="optional" />\r
+ </xs:complexType>\r
+ <xs:complexType name="XIMFPolicyType">\r
+ <xs:sequence minOccurs="1" maxOccurs="unbounded">\r
+ <xs:element xmlns:q5="http://eads.org/ximf/" name="role">\r
+ <xs:complexType>\r
+ <xs:complexContent mixed="false">\r
+ <xs:extension base="q5:XIMFACLRoleType" />\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+ </xs:sequence>\r
+ </xs:complexType>\r
+ <xs:complexType name="XIMFACLRoleType">\r
+ <xs:attribute name="aclLevel" type="xs:unsignedInt" />\r
+ <xs:attribute name="id" type="xs:ID" use="optional" />\r
+ </xs:complexType>\r
+ <xs:complexType name="XIMFCustomType">\r
+ <xs:choice>\r
+ <xs:any maxOccurs="unbounded" processContents="skip" />\r
+ </xs:choice>\r
+ <xs:attribute name="id" type="xs:ID" use="required" />\r
+ <xs:attribute name="provider" type="xs:string" use="required" />\r
+ <xs:attribute name="description" type="xs:string" use="optional" />\r
+ </xs:complexType>\r
+ <xs:simpleType name="XIMFPrintableStringType">\r
+ <xs:restriction base="xs:string">\r
+ <xs:pattern value="([A-Za-z0-9]|[ ,;:=/\?'\(\)\+\-\.])+" />\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="XIMFOidType">\r
+ <xs:restriction base="xs:string">\r
+ <xs:pattern value="([0-9]|([1-9][0-9]+))(\.([0-9]|([1-9][0-9]+)))+" />\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="XIMFHeaderID">\r
+ <xs:restriction base="xs:ID">\r
+ <xs:pattern value="header\-.*" />\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="XIMFHeaderRef">\r
+ <xs:restriction base="xs:IDREF">\r
+ <xs:pattern value="header\-.*" />\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="XIMFValueID">\r
+ <xs:restriction base="xs:ID">\r
+ <xs:pattern value="value\-.*" />\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="XIMFValueRef">\r
+ <xs:restriction base="xs:IDREF">\r
+ <xs:pattern value="value\-.*" />\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <xs:complexType name="XIMFComplexString">\r
+ <xs:choice minOccurs="0">\r
+ <xs:element xmlns:q1="http://eads.org/ximf/" minOccurs="0" name="string" type="q1:XIMFPrintableStringDataType" />\r
+ <xs:element xmlns:q2="http://eads.org/ximf/" minOccurs="0" name="set" type="q2:XIMFSetType" />\r
+ <xs:element xmlns:q3="http://eads.org/ximf/" minOccurs="0" name="multiset" type="q3:XIMFMultiSetType" />\r
+ <xs:element xmlns:q4="http://eads.org/ximf/" minOccurs="0" maxOccurs="unbounded" name="compstring" type="q4:XIMFComplexString" />\r
+ </xs:choice>\r
+ <xs:attributeGroup xmlns:q5="http://eads.org/ximf/" ref="q5:XIMFPropertiesGroup" />\r
+ <xs:attributeGroup xmlns:q4="http://eads.org/ximf/" ref="q4:XIMFFacetsGroup" />\r
+ <xs:attributeGroup xmlns:q5="http://eads.org/ximf/" ref="q5:XIMFContentGroup" />\r
+ <xs:attribute name="contentPositionEnd" type="xs:boolean" />\r
+ <xs:attribute name="contentFactorise" type="xs:boolean" />\r
+ <xs:attribute name="technicalPositionEnd" type="xs:boolean" />\r
+ </xs:complexType>\r
+ <xs:complexType name="XIMFDictionaryType">\r
+ <xs:choice maxOccurs="unbounded">\r
+ <xs:element name="locale">\r
+ <xs:complexType>\r
+ <xs:complexContent mixed="false">\r
+ <xs:extension xmlns:q14="http://eads.org/ximf/" base="q14:XIMFLocaleType" />\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+ </xs:choice>\r
+ </xs:complexType>\r
+ <xs:complexType name="XIMFLocaleType">\r
+ <xs:choice maxOccurs="unbounded">\r
+ <xs:element name="locale" xmlns:q6="http://eads.org/ximf/" type="q6:XIMFIlkType" />\r
+ </xs:choice>\r
+ <xs:attribute name="lang" type="xs:string" use="required" />\r
+ <xs:attribute name="country" use="optional" />\r
+ </xs:complexType>\r
+ <xs:complexType name="XIMFIlkType">\r
+ <xs:choice maxOccurs="unbounded">\r
+ <xs:element name="ilk">\r
+ <xs:complexType>\r
+ <xs:simpleContent>\r
+ <xs:extension base="xs:string">\r
+ <xs:attribute name="entity" type="xs:string" use="required" />\r
+ </xs:extension>\r
+ </xs:simpleContent>\r
+ </xs:complexType>\r
+ </xs:element>\r
+ </xs:choice>\r
+ </xs:complexType>\r
+ <xs:attributeGroup name="XIMFContentGroup">\r
+ <xs:attribute name="content" xmlns:q7="http://eads.org/ximf/" type="q7:XIMFPrintableStringType" />\r
+ <xs:attribute xmlns:q3="http://eads.org/ximf/" name="technicalContent" type="q3:XIMFPrintableStringType" use="optional" />\r
+ </xs:attributeGroup>\r
+ <xs:attributeGroup name="XIMFPropertiesGroup">\r
+ <xs:attribute xmlns:q3="http://eads.org/ximf/" name="id" type="q3:XIMFValueID" use="optional" />\r
+ <xs:attribute xmlns:q4="http://eads.org/ximf/" name="ref" type="q4:XIMFValueRef" use="optional" />\r
+ <xs:attribute name="ilk" type="xs:string" use="optional" />\r
+ <xs:attribute name="aclLevel" type="xs:unsignedInt" use="optional" />\r
+ <xs:attribute name="index" type="xs:unsignedInt" use="optional" />\r
+ <xs:attribute xmlns:q4="http://eads.org/ximf/" name="description" type="xs:string" use="optional" />\r
+ </xs:attributeGroup>\r
+ <xs:attributeGroup name="XIMFFacetsGroup">\r
+ <xs:attribute name="maxLength" type="xs:unsignedInt" use="optional" />\r
+ <xs:attribute name="minLength" type="xs:unsignedInt" use="optional" />\r
+ <xs:attribute default="1" name="maxItem" type="xs:unsignedInt" use="optional" />\r
+ <xs:attribute name="minItem" type="xs:unsignedInt" use="optional" />\r
+ <xs:attribute xmlns:q15="http://eads.org/ximf/" name="separator" type="q15:XIMFPrintableStringType" use="optional" />\r
+ <xs:attribute xmlns:q16="http://eads.org/ximf/" name="technicalSeparator" type="q16:XIMFPrintableStringType" use="optional" />\r
+ </xs:attributeGroup>\r
+</xs:schema>
\ No newline at end of file
--- /dev/null
+# ***** BEGIN LICENSE BLOCK *****\r
+# Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+# ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+# \r
+#\r
+# Redistribution and use, in source and binary forms, with or without modification, \r
+# are permitted provided that the following conditons are met :\r
+#\r
+# 1. Redistributions of source code must retain the above copyright notice, \r
+# 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached \r
+# in the redistribution of the source code.\r
+# 3. Neither the names of the copyright holders nor the names of any contributors \r
+# may be used to endorse or promote products derived from this software without specific \r
+# prior written permission from EADS Defence and Security.\r
+# \r
+# Alternatively, the contents of this file may be used under the terms of\r
+# either of the GNU General Public License Version 2 or later (the "GPL"),\r
+# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+# in which case the provisions of the GPL or the LGPL are applicable instead\r
+# of those above. If you wish to allow use of your version of this file only\r
+# under the terms of either the GPL or the LGPL, and not to allow others to\r
+# use your version of this file under the terms of the MPL, indicate your\r
+# decision by deleting the provisions above and replace them with the notice\r
+# and other provisions required by the GPL or the LGPL. If you do not delete\r
+# the provisions above, a recipient may use your version of this file under\r
+# the terms of any one of the MPL, the GPL or the LGPL.\r
+# \r
+# REMINDER :\r
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND \r
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \r
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \r
+# IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \r
+# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \r
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \r
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \r
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING \r
+# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+# \r
+# EADS Defence and Security - 1 Boulevard Jean Moulin - \r
+# ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000) \r
+# ***** END LICENSE BLOCK *****\r
+# Strings used in the Mozill AccountManager\r
+prefPanel-ximfmail=XIMF\r
+\r
--- /dev/null
+\r
+\r
+<!ENTITY time.midnight "Midnight" >\r
+<!ENTITY time.1 "1:00 AM" >\r
+<!ENTITY time.2 "2:00 AM" >\r
+<!ENTITY time.3 "3:00 AM" >\r
+<!ENTITY time.4 "4:00 AM" >\r
+<!ENTITY time.5 "5:00 AM" >\r
+<!ENTITY time.6 "6:00 AM" >\r
+<!ENTITY time.7 "7:00 AM" >\r
+<!ENTITY time.8 "8:00 AM" >\r
+<!ENTITY time.9 "9:00 AM" >\r
+<!ENTITY time.10 "10:00 AM" >\r
+<!ENTITY time.11 "11:00 AM" >\r
+<!ENTITY time.noon "Noon" >\r
+<!ENTITY time.13 "1:00 PM" >\r
+<!ENTITY time.14 "2:00 PM" >\r
+<!ENTITY time.15 "3:00 PM" >\r
+<!ENTITY time.16 "4:00 PM" >\r
+<!ENTITY time.17 "5:00 PM" >\r
+<!ENTITY time.18 "6:00 PM" >\r
+<!ENTITY time.19 "7:00 PM" >\r
+<!ENTITY time.20 "8:00 PM" >\r
+<!ENTITY time.21 "9:00 PM" >\r
+<!ENTITY time.22 "10:00 PM" >\r
+<!ENTITY time.23 "11:00 PM" >\r
+\r
+<!ENTITY allDayEvents.label "All Day Events">\r
+\r
+<!-- Month Names -->\r
+<!ENTITY day.1.Ddd "Sun" >\r
+<!ENTITY day.2.Ddd "Mon" >\r
+<!ENTITY day.3.Ddd "Tue" >\r
+<!ENTITY day.4.Ddd "Wed" >\r
+<!ENTITY day.5.Ddd "Thu" >\r
+<!ENTITY day.6.Ddd "Fri" >\r
+<!ENTITY day.7.Ddd "Sat" >\r
+\r
+<!ENTITY day.1.DDD "SUN" >\r
+<!ENTITY day.2.DDD "MON" >\r
+<!ENTITY day.3.DDD "TUE" >\r
+<!ENTITY day.4.DDD "WED" >\r
+<!ENTITY day.5.DDD "THU" >\r
+<!ENTITY day.6.DDD "FRI" >\r
+<!ENTITY day.7.DDD "SAT" >\r
+\r
+<!ENTITY day.1.name "Sunday" >\r
+<!ENTITY day.2.name "Monday" >\r
+<!ENTITY day.3.name "Tuesday" >\r
+<!ENTITY day.4.name "Wednesday" >\r
+<!ENTITY day.5.name "Thursday" >\r
+<!ENTITY day.6.name "Friday" >\r
+<!ENTITY day.7.name "Saturday" >\r
+\r
+<!ENTITY time.am "AM" >\r
+<!ENTITY time.pm "PM" >\r
+<!ENTITY time.midnight "Midnight" >\r
+<!ENTITY time.noon "Noon" >\r
+\r
+\r
+<!ENTITY month.1.MMM "JAN" >\r
+<!ENTITY month.2.MMM "FEB" >\r
+<!ENTITY month.3.MMM "MAR" >\r
+<!ENTITY month.4.MMM "APR" >\r
+<!ENTITY month.5.MMM "MAY" >\r
+<!ENTITY month.6.MMM "JUN" >\r
+<!ENTITY month.7.MMM "JUL" >\r
+<!ENTITY month.8.MMM "AUG" >\r
+<!ENTITY month.9.MMM "SEP" >\r
+<!ENTITY month.10.MMM "OCT" >\r
+<!ENTITY month.11.MMM "NOV" >\r
+<!ENTITY month.12.MMM "DEC" >\r
+\r
+<!ENTITY time.AM "AM" >\r
+<!ENTITY time.PM "PM" >\r
+\r
+<!ENTITY more.label "MORE" >\r
+<!ENTITY less.label "LESS" >\r
+<!ENTITY calendar "calendar">\r
+\r
+<!ENTITY hour.label "Hour">\r
+<!ENTITY min.label "Minutes">
\ No newline at end of file
--- /dev/null
+<!ENTITY ximfmail.accountWizard.pageTitle "Do you want use XIMF headers?">
+<!ENTITY ximfmail.am.themeChoice "Select an instance definition for this account : ">
+<!ENTITY ximfmail.am.instanceGroup "XIMF Instances">
+<!ENTITY ximfmail.am.instanceGroup.composition "Write">
+<!ENTITY ximfmail.am.instanceComposeChoice "Compose a message with instance : ">
+<!ENTITY ximfmail.am.instanceAnswerChoice "Answer to a message with instance : ">
+<!ENTITY ximfmail.am.instanceTransferChoice "Forward a message with instance : ">
+<!ENTITY ximfmail.am.xsmtpCompatibilityCheck "Assure XSMTP compatibility with XIMF headers">
+<!ENTITY ximfmail.am.dialogTitle "XIMF : headers of messages">
+<!ENTITY ximfmail.am.description "Manage and use XIMF headers for sending messages">
+<!ENTITY ximfmail.compose.headerTab " ">
+<!ENTITY ximfmail.compose.advancedTab "Advanced">
+<!ENTITY ximfmail.am.instanceGroup.reception "Read">
+<!ENTITY ximfmail.am.instanceTreeThreadChoice "Sort headers of messages with instance : ">
+<!ENTITY ximfmail.am.instanceMailPanelChoice "Display stored messages with instance : ">
+<!ENTITY ximfmail.compose.focus "Open Alt +">
+<!ENTITY ximfmail.compose.unfocus "Close Alt -">
+<!ENTITY dlgheader.hdrInfo.descr "Current selection of XIMF header">
+<!ENTITY treedialog.buttonlabelcancel "Cancel">
+<!ENTITY treedialog.buttonlabelaccept "Select">
+<!ENTITY ximfmail.am.secureHeadersRuleCheck "Use instance rules to secure headers">
+<!ENTITY ximfmail.am.signMsgAlwaysRuleCheck "Always sign message">
+<!ENTITY ximfmail.dialogtree.title.col0 "Key word">
+<!ENTITY ximfmail.dialogtree.title.col1 "Label">
\ No newline at end of file
--- /dev/null
+# ***** BEGIN LICENSE BLOCK *****\r
+# Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+# ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+# \r
+#\r
+# Redistribution and use, in source and binary forms, with or without modification, \r
+# are permitted provided that the following conditons are met :\r
+#\r
+# 1. Redistributions of source code must retain the above copyright notice, \r
+# 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached \r
+# in the redistribution of the source code.\r
+# 3. Neither the names of the copyright holders nor the names of any contributors \r
+# may be used to endorse or promote products derived from this software without specific \r
+# prior written permission from EADS Defence and Security.\r
+# \r
+# Alternatively, the contents of this file may be used under the terms of\r
+# either of the GNU General Public License Version 2 or later (the "GPL"),\r
+# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+# in which case the provisions of the GPL or the LGPL are applicable instead\r
+# of those above. If you wish to allow use of your version of this file only\r
+# under the terms of either the GPL or the LGPL, and not to allow others to\r
+# use your version of this file under the terms of the MPL, indicate your\r
+# decision by deleting the provisions above and replace them with the notice\r
+# and other provisions required by the GPL or the LGPL. If you do not delete\r
+# the provisions above, a recipient may use your version of this file under\r
+# the terms of any one of the MPL, the GPL or the LGPL.\r
+# \r
+# REMINDER :\r
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND \r
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \r
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \r
+# IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \r
+# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \r
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \r
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \r
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING \r
+# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+# \r
+# EADS Defence and Security - 1 Boulevard Jean Moulin - \r
+# ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000) \r
+# ***** END LICENSE BLOCK *****\r
+label=value\r
+ximfmailAccountWizardDoneInstance=XIMF definition : \r
+ximfmail.composer.context.erase=Erase last value\r
+ximfmail.composer.context.eraseall=Erase all values\r
+ximfmail.composer.context.details=Detail values\r
+ximfmail.composer.context.info=Information\r
+ximfmail.composer.editor.image=Click to open editor\r
+ximfmail.composer.treedlg.image=Click to open extern data tool\r
+ximfmail.composer.calendar.image=Click to open calendar\r
+ximfmail.composer.popup.image=Click to open menu\r
+ximfmail.dialog.editor.warning.nbrows=elements will be saved\r
+ximfmail.dialog.editor.warning.nbrows.one=element will be saved\r
+ximf-association-alert-label=User datas will be removed!\r
+ximfmail.securityinfo.warning=[ximfmail information] this message should be signed :\r
+\r
+\r
--- /dev/null
+# ***** BEGIN LICENSE BLOCK *****\r
+# Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+# ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+# \r
+#\r
+# Redistribution and use, in source and binary forms, with or without modification, \r
+# are permitted provided that the following conditons are met :\r
+#\r
+# 1. Redistributions of source code must retain the above copyright notice, \r
+# 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached \r
+# in the redistribution of the source code.\r
+# 3. Neither the names of the copyright holders nor the names of any contributors \r
+# may be used to endorse or promote products derived from this software without specific \r
+# prior written permission from EADS Defence and Security.\r
+# \r
+# Alternatively, the contents of this file may be used under the terms of\r
+# either of the GNU General Public License Version 2 or later (the "GPL"),\r
+# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+# in which case the provisions of the GPL or the LGPL are applicable instead\r
+# of those above. If you wish to allow use of your version of this file only\r
+# under the terms of either the GPL or the LGPL, and not to allow others to\r
+# use your version of this file under the terms of the MPL, indicate your\r
+# decision by deleting the provisions above and replace them with the notice\r
+# and other provisions required by the GPL or the LGPL. If you do not delete\r
+# the provisions above, a recipient may use your version of this file under\r
+# the terms of any one of the MPL, the GPL or the LGPL.\r
+# \r
+# REMINDER :\r
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND \r
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \r
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \r
+# IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \r
+# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \r
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \r
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \r
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING \r
+# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+# \r
+# EADS Defence and Security - 1 Boulevard Jean Moulin - \r
+# ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000) \r
+# ***** END LICENSE BLOCK *****\r
+# Strings used in the Mozill AccountManager\r
+prefPanel-ximfmail=XIMF\r
--- /dev/null
+\r
+\r
+<!ENTITY time.midnight "Midnight" >\r
+<!ENTITY time.1 "1:00 AM" >\r
+<!ENTITY time.2 "2:00 AM" >\r
+<!ENTITY time.3 "3:00 AM" >\r
+<!ENTITY time.4 "4:00 AM" >\r
+<!ENTITY time.5 "5:00 AM" >\r
+<!ENTITY time.6 "6:00 AM" >\r
+<!ENTITY time.7 "7:00 AM" >\r
+<!ENTITY time.8 "8:00 AM" >\r
+<!ENTITY time.9 "9:00 AM" >\r
+<!ENTITY time.10 "10:00 AM" >\r
+<!ENTITY time.11 "11:00 AM" >\r
+<!ENTITY time.noon "Noon" >\r
+<!ENTITY time.13 "1:00 PM" >\r
+<!ENTITY time.14 "2:00 PM" >\r
+<!ENTITY time.15 "3:00 PM" >\r
+<!ENTITY time.16 "4:00 PM" >\r
+<!ENTITY time.17 "5:00 PM" >\r
+<!ENTITY time.18 "6:00 PM" >\r
+<!ENTITY time.19 "7:00 PM" >\r
+<!ENTITY time.20 "8:00 PM" >\r
+<!ENTITY time.21 "9:00 PM" >\r
+<!ENTITY time.22 "10:00 PM" >\r
+<!ENTITY time.23 "11:00 PM" >\r
+\r
+<!ENTITY allDayEvents.label "All Day Events">\r
+\r
+<!-- Month Names -->\r
+<!ENTITY day.1.Ddd "Dim" >\r
+<!ENTITY day.2.Ddd "Lun" >\r
+<!ENTITY day.3.Ddd "Mar" >\r
+<!ENTITY day.4.Ddd "Mer" >\r
+<!ENTITY day.5.Ddd "Jeu" >\r
+<!ENTITY day.6.Ddd "Ven" >\r
+<!ENTITY day.7.Ddd "Sam" >\r
+\r
+<!ENTITY day.1.DDD "DIM" >\r
+<!ENTITY day.2.DDD "LUN" >\r
+<!ENTITY day.3.DDD "MAR" >\r
+<!ENTITY day.4.DDD "MAR" >\r
+<!ENTITY day.5.DDD "JEU" >\r
+<!ENTITY day.6.DDD "VEN" >\r
+<!ENTITY day.7.DDD "SAM" >\r
+\r
+<!ENTITY day.1.name "Sunday" >\r
+<!ENTITY day.2.name "Monday" >\r
+<!ENTITY day.3.name "Tuesday" >\r
+<!ENTITY day.4.name "Wednesday" >\r
+<!ENTITY day.5.name "Thursday" >\r
+<!ENTITY day.6.name "Friday" >\r
+<!ENTITY day.7.name "Saturday" >\r
+\r
+<!ENTITY time.am "AM" >\r
+<!ENTITY time.pm "PM" >\r
+<!ENTITY time.midnight "Midnight" >\r
+<!ENTITY time.noon "Noon" >\r
+\r
+\r
+<!ENTITY month.1.MMM "JAN" >\r
+<!ENTITY month.2.MMM "FEV" >\r
+<!ENTITY month.3.MMM "MAR" >\r
+<!ENTITY month.4.MMM "AVR" >\r
+<!ENTITY month.5.MMM "MAI" >\r
+<!ENTITY month.6.MMM "JUN" >\r
+<!ENTITY month.7.MMM "JUL" >\r
+<!ENTITY month.8.MMM "AUT" >\r
+<!ENTITY month.9.MMM "SEP" >\r
+<!ENTITY month.10.MMM "OCT" >\r
+<!ENTITY month.11.MMM "NOV" >\r
+<!ENTITY month.12.MMM "DEC" >\r
+\r
+<!ENTITY time.AM "AM" >\r
+<!ENTITY time.PM "PM" >\r
+\r
+<!ENTITY more.label "MORE" >\r
+<!ENTITY less.label "LESS" >\r
+<!ENTITY calendar "calendrier">\r
+\r
+<!ENTITY hour.label "Heure">\r
+<!ENTITY min.label "Minutes">
\ No newline at end of file
--- /dev/null
+<!ENTITY ximfmail.accountWizard.pageTitle "Voulez-vous utiliser des en-têtes XIMF?">\r
+<!ENTITY ximfmail.am.themeChoice "Utiliser une définition d'instances XIMF pour ce compte : ">\r
+<!ENTITY ximfmail.am.instanceGroup "Instances XIMF">\r
+<!ENTITY ximfmail.am.instanceGroup.composition "Rédaction">\r
+<!ENTITY ximfmail.am.instanceGroup.message "Messages">\r
+<!ENTITY ximfmail.am.instanceComposeChoice "Créer un message avec l'instance : ">\r
+<!ENTITY ximfmail.am.instanceAnswerChoice "Répondre à un message avec l'instance : ">\r
+<!ENTITY ximfmail.am.instanceTransferChoice "Transférer un message avec l'instance : ">\r
+<!ENTITY ximfmail.am.xsmtpCompatibilityCheck "Assurer la compatibilité XSMTP des entêtes XIMF">\r
+<!ENTITY ximfmail.am.dialogTitle "XIMFMAIL : entêtes de messages">\r
+<!ENTITY ximfmail.am.description "Utilisation et gestion d'entêtes XIMF">\r
+<!ENTITY ximfmail.compose.headerTab " ">\r
+<!ENTITY ximfmail.compose.advancedTab "Avancé">\r
+<!ENTITY ximfmail.am.instanceGroup.reception "Réception">\r
+<!ENTITY ximfmail.am.instanceTreeThreadChoice "Trier les entêtes de messages avec l'instance : ">\r
+<!ENTITY ximfmail.am.instanceMailPanelChoice "Afficher les messages stockés avec l'instance : ">\r
+<!ENTITY dlgheader.hdrInfo.descr "Sélection courante d'entête XIMF">\r
+<!ENTITY ximfmail.composer.context.erase "Effacer la derniere valeur">\r
+<!ENTITY ximfmail.composer.context.eraseall "Effacer toutes les valeurs">\r
+<!ENTITY ximfmail.composer.context.details "Détailler les valeurs">\r
+<!ENTITY ximfmail.composer.context.info "Information">\r
+<!ENTITY ximfmail.compose.focus "Agrandir Alt +">\r
+<!ENTITY ximfmail.compose.unfocus "Réduire Alt -">\r
+<!ENTITY treedialog.buttonlabelcancel "Annuler"> \r
+<!ENTITY treedialog.buttonlabelaccept "Sélectionner">\r
+<!ENTITY ximfmail.am.secureHeadersRuleCheck "Signer les entêtes du message">\r
+<!ENTITY ximfmail.am.signMsgAlwaysRuleCheck "Signer systématiquement le message">\r
+<!ENTITY ximfmail.dialogtree.title.col0 "Mot clé">\r
+<!ENTITY ximfmail.dialogtree.title.col1 "Libellé">
\ No newline at end of file
--- /dev/null
+# ***** BEGIN LICENSE BLOCK *****\r
+# Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+# ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+# \r
+#\r
+# Redistribution and use, in source and binary forms, with or without modification, \r
+# are permitted provided that the following conditons are met :\r
+#\r
+# 1. Redistributions of source code must retain the above copyright notice, \r
+# 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached \r
+# in the redistribution of the source code.\r
+# 3. Neither the names of the copyright holders nor the names of any contributors \r
+# may be used to endorse or promote products derived from this software without specific \r
+# prior written permission from EADS Defence and Security.\r
+# \r
+# Alternatively, the contents of this file may be used under the terms of\r
+# either of the GNU General Public License Version 2 or later (the "GPL"),\r
+# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+# in which case the provisions of the GPL or the LGPL are applicable instead\r
+# of those above. If you wish to allow use of your version of this file only\r
+# under the terms of either the GPL or the LGPL, and not to allow others to\r
+# use your version of this file under the terms of the MPL, indicate your\r
+# decision by deleting the provisions above and replace them with the notice\r
+# and other provisions required by the GPL or the LGPL. If you do not delete\r
+# the provisions above, a recipient may use your version of this file under\r
+# the terms of any one of the MPL, the GPL or the LGPL.\r
+# \r
+# REMINDER :\r
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND \r
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \r
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \r
+# IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \r
+# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \r
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \r
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \r
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING \r
+# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+# \r
+# EADS Defence and Security - 1 Boulevard Jean Moulin - \r
+# ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000) \r
+# ***** END LICENSE BLOCK *****\r
+label=valeur\r
+ximfmailAccountWizardDoneInstance=d\u00E9finition XIMF : \r
+ximfmail.composer.context.erase=Effacer la derni\u00E8re valeur\r
+ximfmail.composer.context.eraseall=Effacer toutes les valeurs\r
+ximfmail.composer.context.details=D\u00E9tailler les valeurs\r
+ximfmail.composer.context.info=Information\r
+ximfmail.composer.editor.image=Ouvrir l\u0027\u00E9diteur\r
+ximfmail.composer.treedlg.image=Ouvrir l\u0027outil de donn\u00E9es externes\r
+ximfmail.composer.calendar.image=Ouvrir le calendrier\r
+ximfmail.composer.popup.image=Ouvrir le menu\r
+ximfmail.dialog.editor.warning.nbrows=\u00E9l\u00E9ments au plus seront enregistr\u00E9s\r
+ximfmail.dialog.editor.warning.nbrows.one=\u00E9l\u00E9ment au plus sera enregistr\u00E9\r
+ximf-association-alert-label=Des donn\u00e9es saisies vont \u00eatre effac\u00e9es!\r
+ximfmail.securityinfo.warning=[ximfmail information] le message devrait \u00eatre sign\u00e9 :\r
+\r
+\r
+\r
--- /dev/null
+@import url("chrome://global/skin");
+
+datepicker{
+-moz-binding: url("chrome://ximfmail/content/datepicker/datepicker.xml#datepicker");
+}
+
+ximfaddress{
+-moz-binding: url("chrome://ximfmail/content/ximfaddress/ximfaddress.xml#ximfaddress");
+}
+
+
+
+/* Ximfmail Panel custom*/
+#ximfmailComposeMessagePanel richlistbox{
+ -moz-appearance: none;
+ background-color: inherit;
+ border: none;
+}
+
+#ximfmailComposeMessagePanel richlistitem textbox{
+ -moz-appearance: none;
+ background-color: #ffffff;
+ color: #000000;
+ border: none;
+}
+
+richlistitem[ximfenable="true"]:hover,
+richlistitem[ximfenable="true"][selected="true"]{
+ background-color: #0a246a;
+}
+
+
+checkbox[ximfchild='true'] *
+{
+ color:#b20000;
+}
+
+richlistitem[ximfenable="true"]:hover checkbox[disabled='false'],
+richlistitem[ximfenable="true"]:hover menuitem,
+richlistitem[ximfenable="true"]:hover button,
+richlistitem[ximfenable="true"][selected="true"] checkbox[disabled='false'],
+richlistitem[ximfenable="true"][selected="true"] menuitem,
+richlistitem[ximfenable="true"][selected="true"] button{
+ color: #ffffff;
+}
+
+richlistitem[ximfenable="false"][selected="true"],
+richlistitem[ximfenable="false"][selected="true"] *
+{
+ background-color:inherit;
+ color: inherit;
+}
+
+#ximfmailComposeMessagePanel,
+#ximfmailMailPanel{
+ max-height:120px;
+ padding:5px !important;
+ background-image : url("chrome://ximfmail/content/resource/bottom_bg.jpg");
+}
+#ximfmailMailPanel tabpanels{
+ background-color : -moz-dialog;
+}
+
+.ximfmailFocusBar{
+ min-height:20px;
+ max-height:20px;
+ color: white;
+ background-image : url("chrome://ximfmail/content/resource/titleBar_bg.jpg");
+ padding-left: 3px;
+ padding-right: 5px;
+}
+
+.ximfmailButton{
+ -moz-appearance: none;
+ margin: 0px;
+ border: 0px solid white;
+ cursor: pointer;
+ background-color: transparent;
+ min-width: 20px;
+ min-height: 20px;
+ margin-right:5px;
+}
+
+.ximfmailButtonTxt{
+ -moz-appearance: none;
+ margin: 0px;
+ border: none;
+ cursor: pointer;
+ background-color: transparent;
+ min-width: 16px;
+ min-height: 16px;
+}
+
+.ximfInputbox{
+ min-width : 250px;
+ background-color:#ffffff; /*#5cacea;*/
+}
+
+#ximfmailComposeMessageMaximize{
+ list-style-image : url("chrome://ximfmail/content/resource/expand.png");
+}
+
+#ximfmailComposeMessageMaximize:hover{
+ list-style-image : url("chrome://ximfmail/content/resource/expand_over.png");
+}
+
+#ximfmailComposeMessageMinimize{
+ list-style-image : url("chrome://ximfmail/content/resource/collapse.png");
+}
+
+#ximfmailComposeMessageMinimize:hover{
+ list-style-image : url("chrome://ximfmail/content/resource/collapse_over.png");
+}
+
+#ximfmailComposeMessageHeadersTablist tab[ismandatory="true"],
+label[ximfmandatory="true"]{
+ color:#b20000;
+}
+
+#ximfmailComposeMessageHeadersTablist .textbox-input{
+ color:#000064;
+}
+#ximfmailComposeMessageHeadersTablist .textbox-input-box{
+ padding-left: 5px;
+}
+
+#ximfmailComposeMessageLogo{
+ max-height:22px;
+}
+
+#ximfmailComposeMessageTitle{
+ text-align:center;
+ font-family:"Arial";
+}
+
+
+
+#ximfmailComposeMessageHeaders{
+ overflow: auto;
+ max-height: 100px;
+
+}
+
+#ximfmailComposeMessageNote{
+ overflow:auto;
+ max-width:100px;
+ background-color:#ffffc1;
+ border-width:thin;
+ border-color:#ffffff;
+}
+
+.ximfEraser{
+ -moz-image-region: rect(0px 20px 20px 0px);
+ list-style-image : url("chrome://ximfmail/content/resource/erase_text.png");
+}
+
+.ximfEraser:hover,active{
+ list-style-image : url("chrome://ximfmail/content/resource/erase_text_over.png");
+}
+
+image.ximfmailUnacceptState{
+ list-style-image : url("chrome://ximfmail/content/resource/no_ok.png");
+ max-height: 16px;
+}
+
+image.ximfmailAcceptState{
+ list-style-image : url("chrome://ximfmail/content/resource/ok.png");
+ max-height: 16px;
+}
+
+.ximfTreeDialog{
+ list-style-image:url("chrome://ximfmail/content/resource/popup_database.png");
+}
+
+.ximfTreeDialog:hover,active{
+ list-style-image:url("chrome://ximfmail/content/resource/popup_database_over.png");
+}
+
+.ximfDatepicker{
+ list-style-image:url('chrome://ximfmail/content/resource/calendar.png');
+}
+
+.ximfDatepicker:hover,active{
+ list-style-image:url('chrome://ximfmail/content/resource/calendar_over.png');
+}
+
+.ximfEditor{
+ list-style-image:url('chrome://ximfmail/content/resource/textfield.png');
+}
+
+.ximfEditor:hover,active{
+ list-style-image:url('chrome://ximfmail/content/resource/textfield_over.png');
+}
+
+.ximfPopup{
+ list-style-image:url('chrome://ximfmail/content/resource/list.png');
+}
+
+.ximfPopup:hover,active{
+ list-style-image:url('chrome://ximfmail/content/resource/list_over.png');
+}
+
+/*
+.ximfCheckbox > image{
+ -moz-appearance: none;
+ margin: 0px;
+ border: 0px none transparent;
+ background-color: transparent;
+}
+*/
+/* display ximf headers*/
+
+#ximfmailMailHeadersTablist label.ximfDisplay,
+#ximfmailMailHeadersTablist .textbox-input{
+ color:#0000ff;
+}
+
+#ximfmailMailHeadersTablist groupbox{
+ max-width:400px;
+}
+
+.ximfDetail{
+ list-style-image : url("chrome://ximfmail/content/resource/detail_text.png");
+}
+
+.ximfDetail:hover,active{
+ list-style-image : url("chrome://ximfmail/content/resource/detail_text_over.png");
+}
+
+#ximfmail-dialog-hdrInfo{
+ min-width:500px;
+ max-width:500px;
+}
+
+#ximfheaderName{
+ font-variant:small-caps;
+ font-weight:bold;
+}
+
+#ximfheaderValue{
+ color:#b20000;
+}
+
+#signedHdrIcon[signed="ximfalert"]{
+ list-style-image : url("chrome://ximfmail/content/resource/hdr_sign_alert.png");
+ visibility: visible;
+}
+
+#ximfHeadBox{width:100%;}
+.ximfImgCategory,#ximfCategoryClassificationLabelImg,#ximfSecurityClassificationLabelImg{margin-left: 2px;margin-top: 2px;}
\ No newline at end of file
--- /dev/null
+/* ***** BEGIN LICENSE BLOCK *****\r
+ * Copyright (c) 2008-2009 EADS DEFENCE AND SECURITY - All rights reserved.\r
+ * ximfmail is under the triple license MPL 1.1/GPL 2.0/LGPL 2.1.\r
+ *\r
+ *\r
+ * Redistribution and use, in source and binary forms, with or without modification,\r
+ * are permitted provided that the following conditons are met :\r
+ *\r
+ * 1. Redistributions of source code must retain the above copyright notice,\r
+ * 2. MPL 1.1/GPL 2.0/LGPL 2.1. license agreements must be attached\r
+ * in the redistribution of the source code.\r
+ * 3. Neither the names of the copyright holders nor the names of any contributors\r
+ * may be used to endorse or promote products derived from this software without specific\r
+ * prior written permission from EADS Defence and Security.\r
+ *\r
+ * Alternatively, the contents of this file may be used under the terms of\r
+ * either of the GNU General Public License Version 2 or later (the "GPL"),\r
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),\r
+ * in which case the provisions of the GPL or the LGPL are applicable instead\r
+ * of those above. If you wish to allow use of your version of this file only\r
+ * under the terms of either the GPL or the LGPL, and not to allow others to\r
+ * use your version of this file under the terms of the MPL, indicate your\r
+ * decision by deleting the provisions above and replace them with the notice\r
+ * and other provisions required by the GPL or the LGPL. If you do not delete\r
+ * the provisions above, a recipient may use your version of this file under\r
+ * the terms of any one of the MPL, the GPL or the LGPL.\r
+ *\r
+ * REMINDER :\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\r
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * EADS Defence and Security - 1 Boulevard Jean Moulin -\r
+ * ZAC de la Clef Saint Pierre - 78990 Elancourt - FRANCE (IDDN.FR.001.480012.002.S.P.2008.000.10000)\r
+ *\r
+ * Contributor(s):\r
+ * Copyright(c) Airbus Defence and Space 2014 - All rights reserved\r
+ * ***** END LICENSE BLOCK ***** */\r
+// components defined in this file\r
+\r
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");\r
+function XimfmailAccountManagerExtension() {}\r
+\r
+XimfmailAccountManagerExtension.prototype = {\r
+ name: "ximfmail",\r
+ chromePackageName: "ximfmail",\r
+ classID: Components.ID("{4B539696-E605-4663-B9E9-CB6D44B6FFEB}"),\r
+ classDescription: "Ximfmail Account Manager Extension Service",\r
+ contractID: "@mozilla.org/accountmanager/extension;1?name=ximfmail",\r
+ _xpcom_categories: [{\r
+ category: "mailnews-accountmanager-extensions"\r
+ // entry: "Enigmail account manager extension",\r
+ // service: false\r
+ }],\r
+ QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIMsgAccountManagerExtension]),\r
+ showPanel: function (server)\r
+ {\r
+ // don't show the panel for news, rss, or local accounts\r
+ return (server.type !== "nntp" && server.type !== "rss" &&\r
+ server.type !== "im" && server.type !== "none");\r
+ }\r
+};\r
+\r
+//Create entry point for the module\r
+if (XPCOMUtils.generateNSGetFactory) {\r
+ var NSGetFactory = XPCOMUtils.generateNSGetFactory([XimfmailAccountManagerExtension]);\r
+} else {\r
+ var NSGetModule = XPCOMUtils.generateNSGetModule([XimfmailAccountManagerExtension]);\r
+}\r
+function postModuleRegisterCallback (compMgr, fileSpec, componentsArray) {\r
+ dump("Ximfmail account manager extension registered\n");\r
+}\r
--- /dev/null
+<?xml version="1.0"?>\r
+<RDF:RDF xmlns:em="http://www.mozilla.org/2004/em-rdf#"\r
+ xmlns:NC="http://home.netscape.com/NC-rdf#"\r
+ xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">\r
+ <RDF:Description RDF:about="urn:mozilla:install-manifest"\r
+ em:id="{A627B834-BD9F-4b3f-9AF5-347B5A570402}"\r
+ em:name="XIMFMail"\r
+ em:version="24.3.0.0.1.0"\r
+ em:description="Xtend Internet Message Format engine"\r
+ em:creator="Airbus Defence and Space"\r
+ em:homepageURL="http://www.airbusdefenceandspace.com"\r
+ em:iconURL="chrome://ximfmail/content/resource/icon-ximfmail.png">\r
+ <em:targetApplication>\r
+ <!-- Thunderbird -->\r
+ <Description>\r
+ <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>\r
+ <em:minVersion>24.3.0</em:minVersion>\r
+ <em:maxVersion>24.3.*</em:maxVersion>\r
+ </Description>\r
+ </em:targetApplication>\r
+ </RDF:Description> \r
+</RDF:RDF>
\ No newline at end of file
--- /dev/null
+ximfmail.jar:
+% content ximfmail %content/kernel/ xpcnativewrappers=yes
+% content theme_ximfmail chrome/content/theme/ xpcnativewrappers=yes
+% locale ximfmail fr %locale/fr-FR/
+% locale ximfmail us %locale/en-US/
+% skin ximfmail classic/1.0 %/skin/classic/
+% overlay chrome://messenger/content/messenger.xul chrome://ximfmail/content/messenger-ov-ximfmail.xul
+% overlay chrome://messenger/content/messengercompose/messengercompose.xul chrome://ximfmail/content/messengerCompose-ov-ximfmail.xul
+% overlay chrome://messenger/content/messageWindow.xul chrome://ximfmail/content/messageWindow-ov-ximfmail.xul
+% overlay chrome://messenger-smime/content/msgReadSecurityInfo.xul chrome://ximfmail/content/msgReadSecurityInfo-ov-ximfmail.xul
+ content/kernel/am-ximfmail.xul (chrome/content/kernel/am-ximfmail.xul)
+ content/kernel/dialogHdrInfo-ximfmail.xul (chrome/content/kernel/dialogHdrInfo-ximfmail.xul)
+ content/kernel/dialogTree-ximfmail.xul (chrome/content/kernel/dialogTree-ximfmail.xul)
+ content/kernel/dialogTree-rdf-ximfmail.js (chrome/content/kernel/dialogTree-rdf-ximfmail.js)
+ content/kernel/messageWindow-ov-ximfmail.xul (chrome/content/kernel/messageWindow-ov-ximfmail.xul)
+ content/kernel/messengerCompose-ov-ximfmail.xul (chrome/content/kernel/messengerCompose-ov-ximfmail.xul)
+ content/kernel/messenger-ov-ximfmail.xul (chrome/content/kernel/messenger-ov-ximfmail.xul)
+ content/kernel/am-ximfmail.js (chrome/content/kernel/am-ximfmail.js)
+ content/kernel/controler-ximfmail.js (chrome/content/kernel/controler-ximfmail.js)
+ content/kernel/dialogHdrInfo-ximfmail.js (chrome/content/kernel/dialogHdrInfo-ximfmail.js)
+ content/kernel/dialogTree-ximfmail.js (chrome/content/kernel/dialogTree-ximfmail.js)
+ content/kernel/jquery.js (chrome/content/kernel/jquery.js)
+ content/kernel/messageAnalyser-ximfmail.js (chrome/content/kernel/messageAnalyser-ximfmail.js)
+ content/kernel/messageWindow-ov-ximfmail.js (chrome/content/kernel/messageWindow-ov-ximfmail.js)
+ content/kernel/messengerCompose-ov-ximfmail.js (chrome/content/kernel/messengerCompose-ov-ximfmail.js)
+ content/kernel/messengerComposeHeaders-ximfmail.js (chrome/content/kernel/messengerComposeHeaders-ximfmail.js)
+ content/kernel/messenger-ov-ximfmail.js (chrome/content/kernel/messenger-ov-ximfmail.js)
+ content/kernel/msgReadSecurityInfo-ov-ximfmail.xul (chrome/content/kernel/msgReadSecurityInfo-ov-ximfmail.xul)
+ content/kernel/msgReadSecurityInfo-ov-ximfmail.js (chrome/content/kernel/msgReadSecurityInfo-ov-ximfmail.js)
+ content/kernel/threadTree-ximfmail.js (chrome/content/kernel/threadTree-ximfmail.js)
+ content/kernel/ximfCatalog.js (chrome/content/kernel/ximfCatalog.js)
+ content/kernel/ximfDataSource.js (chrome/content/kernel/ximfDataSource.js)
+ content/kernel/ximfmail.js (chrome/content/kernel/ximfmail.js)
+ content/kernel/ximfSpecial.js (chrome/content/kernel/ximfSpecial.js)
+ content/kernel/ximfTreeData.js (chrome/content/kernel/ximfTreeData.js)
+ content/kernel/constant-ximfmail.js (chrome/content/kernel/constant-ximfmail.js)
+ content/kernel/calendar/dialogCalendar-ximfmail.xul (chrome/content/kernel/calendar/dialogCalendar-ximfmail.xul)
+ content/kernel/calendar/dialogCalendar-ximfmail.js (chrome/content/kernel/calendar/dialogCalendar-ximfmail.js)
+ content/kernel/calendar/calendar.css (chrome/content/kernel/calendar/calendar.css)
+ content/kernel/calendar/button_cancel_hov_20x20.png (chrome/content/kernel/calendar/button_cancel_hov_20x20.png)
+ content/kernel/calendar/button_cancel_20x20.png (chrome/content/kernel/calendar/button_cancel_20x20.png)
+ content/kernel/calendar/date-n.png (chrome/content/kernel/calendar/date-n.png)
+ content/kernel/calendar/date-h.png (chrome/content/kernel/calendar/date-h.png)
+ content/kernel/calendar/right_dblarrow_hov.png (chrome/content/kernel/calendar/right_dblarrow_hov.png)
+ content/kernel/calendar/right_dblarrow.png (chrome/content/kernel/calendar/right_dblarrow.png)
+ content/kernel/calendar/right_arrow_hov.png (chrome/content/kernel/calendar/right_arrow_hov.png)
+ content/kernel/calendar/right_arrow.png (chrome/content/kernel/calendar/right_arrow.png)
+ content/kernel/calendar/ref-right_arrow_hov.png (chrome/content/kernel/calendar/ref-right_arrow_hov.png)
+ content/kernel/calendar/ref-right_arrow.png (chrome/content/kernel/calendar/ref-right_arrow.png)
+ content/kernel/calendar/ref-left_arrow_hov.png (chrome/content/kernel/calendar/ref-left_arrow_hov.png)
+ content/kernel/calendar/ref-left_arrow.png (chrome/content/kernel/calendar/ref-left_arrow.png)
+ content/kernel/calendar/ok_hov.png (chrome/content/kernel/calendar/ok_hov.png)
+ content/kernel/calendar/ok.png (chrome/content/kernel/calendar/ok.png)
+ content/kernel/calendar/left_dblarrow_hov.png (chrome/content/kernel/calendar/left_dblarrow_hov.png)
+ content/kernel/calendar/left_dblarrow.png (chrome/content/kernel/calendar/left_dblarrow.png)
+ content/kernel/calendar/left_arrow_hover.png (chrome/content/kernel/calendar/left_arrow_hover.png)
+ content/kernel/calendar/left_arrow_hov.png (chrome/content/kernel/calendar/left_arrow_hov.png)
+ content/kernel/calendar/left_arrow.png (chrome/content/kernel/calendar/left_arrow.png)
+ content/kernel/editor/dialogEditor-ximfmail.xul (chrome/content/kernel/editor/dialogEditor-ximfmail.xul)
+ content/kernel/editor/dialogEditor-ximfmail.js (chrome/content/kernel/editor/dialogEditor-ximfmail.js)
+ content/kernel/ximfaddress/ximfaddress.xml (chrome/content/kernel/ximfaddress/ximfaddress.xml)
+ content/kernel/ximfaddress/ximfaddress.css (chrome/content/kernel/ximfaddress/ximfaddress.css)
+ content/kernel/resource/arrow_left.png (chrome/content/kernel/resource/arrow_left.png)
+ content/kernel/resource/arrow_right.png (chrome/content/kernel/resource/arrow_right.png)
+ content/kernel/resource/bottom_bg.jpg (chrome/content/kernel/resource/bottom_bg.jpg)
+ content/kernel/resource/calendar.png (chrome/content/kernel/resource/calendar.png)
+ content/kernel/resource/calendar_over.png (chrome/content/kernel/resource/calendar_over.png)
+ content/kernel/resource/clear_right_list.png (chrome/content/kernel/resource/clear_right_list.png)
+ content/kernel/resource/collapse.png (chrome/content/kernel/resource/collapse.png)
+ content/kernel/resource/collapse_over.png (chrome/content/kernel/resource/collapse_over.png)
+ content/kernel/resource/erase_text.png (chrome/content/kernel/resource/erase_text.png)
+ content/kernel/resource/erase_text_over.png (chrome/content/kernel/resource/erase_text_over.png)
+ content/kernel/resource/expand.png (chrome/content/kernel/resource/expand.png)
+ content/kernel/resource/expand_over.png (chrome/content/kernel/resource/expand_over.png)
+ content/kernel/resource/hdr_sign_alert.png (chrome/content/kernel/resource/hdr_sign_alert.png)
+ content/kernel/resource/list.png (chrome/content/kernel/resource/list.png)
+ content/kernel/resource/list_over.png (chrome/content/kernel/resource/list_over.png)
+ content/kernel/resource/no_ok.png (chrome/content/kernel/resource/no_ok.png)
+ content/kernel/resource/ok.png (chrome/content/kernel/resource/ok.png)
+ content/kernel/resource/popup_database.png (chrome/content/kernel/resource/popup_database.png)
+ content/kernel/resource/popup_database_over.png (chrome/content/kernel/resource/popup_database_over.png)
+ content/kernel/resource/textfield.png (chrome/content/kernel/resource/textfield.png)
+ content/kernel/resource/textfield_over.png (chrome/content/kernel/resource/textfield_over.png)
+ content/kernel/resource/titleBar_bg.jpg (chrome/content/kernel/resource/titleBar_bg.jpg)
+ content/kernel/resource/icon-ximfmail.png (chrome/content/kernel/resource/icon-ximfmail.png)
+ content/kernel/resource/detail_text.png (chrome/content/kernel/resource/detail_text.png)
+ content/kernel/resource/detail_text_over.png (chrome/content/kernel/resource/detail_text_over.png)
+ locale/fr-FR/datepicker.dtd (chrome/locale/fr-FR/datepicker.dtd)
+ locale/en-US/datepicker.dtd (chrome/locale/en-US/datepicker.dtd)
+ locale/fr-FR/ximfmail.dtd (chrome/locale/fr-FR/ximfmail.dtd)
+ locale/fr-FR/ximfmail.properties (chrome/locale/fr-FR/ximfmail.properties)
+ locale/fr-FR/am-ximfmail.properties (chrome/locale/fr-FR/am-ximfmail.properties)
+ locale/en-US/ximfmail.dtd (chrome/locale/en-US/ximfmail.dtd)
+ locale/en-US/ximfmail.properties (chrome/locale/en-US/ximfmail.properties)
+ locale/en-US/am-ximfmail.properties (chrome/locale/en-US/am-ximfmail.properties)
+ skin/classic/ximfmail.css (chrome/skin/ximfmail.css)
+
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>\r
+\r
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\r
+xmlns:em="http://www.mozilla.org/2004/em-rdf#">\r
+\r
+<RDF:Description about="urn:mozilla:extension:${thunext.name}">\r
+ <em:updates>\r
+ <RDF:Seq>\r
+ <RDF:li resource="urn:mozilla:extension:${thunext.name}:${thunext.version}.1288082179"/>\r
+ </RDF:Seq>\r
+ </em:updates>\r
+ <em:version>${thunext.version}.1288082179</em:version>\r
+ <em:updateLink>${thunext.site}/update/fr/ximfmail/@ARCHIVE_NAME@</em:updateLink>\r
+</RDF:Description>\r
+\r
+<RDF:Description about="urn:mozilla:extension:${thunext.name}:${thunext.version}.1288082179">\r
+<em:version>${thunext.version}.1288082179</em:version>\r
+<em:targetApplication>\r
+ <!-- Thunderbird -->\r
+ <Description>\r
+ <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>\r
+ <em:minVersion>3.1</em:minVersion>\r
+ <em:maxVersion>3.1.*</em:maxVersion>\r
+ <em:updateLink>${thunext.site}/update/fr/ximfmail/@ARCHIVE_NAME@</em:updateLink>\r
+ </Description>\r
+</em:targetApplication>\r
+</RDF:Description>\r
+\r
+</RDF:RDF>\r