<?xml version="1.0" encoding="UTF-8"?>
<!-- ***** 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 Calendar Preferences
   -
   - The Initial Developer of the Original Code is
   - Mike Potter
   - Portions created by the Initial Developer are Copyright (C) 2002
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -   Mike Potter <mikep@oeone.com>
   -   ArentJan Banck <ajbanck@planet.nl>
   -   Eric Belhaire <belhaire@ief.u-psud.fr>
   -   Matthew Willis <mattwillis@gmail.com>
   -   Cédric Corazza <cedric.corazza@wanadoo.fr>
   -   Stefan Sitter <ssitter@googlemail.com>
   -
   - Alternatively, the contents of this file may be used under the terms of
   - either 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 LGPL or the GPL. 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 ***** -->

<!DOCTYPE overlay [
    <!ENTITY % viewsDTD SYSTEM "chrome://calendar/locale/preferences/views.dtd">
    <!ENTITY % globalDTD SYSTEM "chrome://calendar/locale/global.dtd">
    %viewsDTD;
    %globalDTD;
]>

<overlay id="ViewsPaneOverlay"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

    <vbox id="calPreferencesBoxViews">
        <script type="application/javascript"
                src="chrome://calendar/content/preferences/views.js"/>
        <script type="application/javascript"
                src="chrome://calendar/content/calendar-ui-utils.js"/>

        <preferences>
            <preference id="calendar.week.start"
                        name="calendar.week.start"
                        type="int"/>
            <preference id="calendar.week.d0sundaysoff"
                        name="calendar.week.d0sundaysoff"
                        type="bool"
                        inverted="true"/>
            <preference id="calendar.week.d1mondaysoff"
                        name="calendar.week.d1mondaysoff"
                        type="bool"
                        inverted="true"/>
            <preference id="calendar.week.d2tuesdaysoff"
                        name="calendar.week.d2tuesdaysoff"
                        type="bool"
                        inverted="true"/>
            <preference id="calendar.week.d3wednesdaysoff"
                        name="calendar.week.d3wednesdaysoff"
                        type="bool"
                        inverted="true"/>
            <preference id="calendar.week.d4thursdaysoff"
                        name="calendar.week.d4thursdaysoff"
                        type="bool"
                        inverted="true"/>
            <preference id="calendar.week.d5fridaysoff"
                        name="calendar.week.d5fridaysoff"
                        type="bool"
                        inverted="true"/>
            <preference id="calendar.week.d6saturdaysoff"
                        name="calendar.week.d6saturdaysoff"
                        type="bool"
                        inverted="true"/>
            <preference id="calendar.view.daystarthour"
                        name="calendar.view.daystarthour"
                        type="int"/>
            <preference id="calendar.view.dayendhour"
                        name="calendar.view.dayendhour"
                        type="int"/>
            <preference id="calendar.view.visiblehours"
                        name="calendar.view.visiblehours"
                        type="int"/>
            <preference id="calendar.weeks.inview"
                        name="calendar.weeks.inview"
                        type="int"/>
            <preference id="calendar.previousweeks.inview"
                        name="calendar.previousweeks.inview"
                        type="int"/>
        </preferences>

        <groupbox>
            <caption label="&pref.calendar.view.allview.caption;"/>
            <hbox align="center">
                <label value="&pref.weekstarts.label;"
                       accesskey="&pref.weekstarts.accesskey;"
                       control="weekstarts"/>
                <menulist id="weekstarts"
                          preference="calendar.week.start"
                          oncommand="gViewsPane.updateViewWorkDayCheckboxes(this.value)">
                    <menupopup id="weekstartspopup">
                        <menuitem label="&day.1.name;" value="0"/>
                        <menuitem label="&day.2.name;" value="1"/>
                        <menuitem label="&day.3.name;" value="2"/>
                        <menuitem label="&day.4.name;" value="3"/>
                        <menuitem label="&day.5.name;" value="4"/>
                        <menuitem label="&day.6.name;" value="5"/>
                        <menuitem label="&day.7.name;" value="6"/>
                    </menupopup>
                </menulist>
            </hbox>
        </groupbox>

        <groupbox>
            <caption label="&pref.calendar.view.workweek.caption;"/>
            <label value="&pref.daysoff.label;"/>
            <hbox>
                <checkbox id="dayoff0"
                          class="dayOffCheckbox"
                          label="&day.1.Ddd;"
                          accesskey="&day.1.Ddd.accesskey;"
                          orient="vertical"
                          preference="calendar.week.d0sundaysoff"/>
                <checkbox id="dayoff1"
                          class="dayOffCheckbox"
                          label="&day.2.Ddd;"
                          accesskey="&day.2.Ddd.accesskey;"
                          orient="vertical"
                          preference="calendar.week.d1mondaysoff"/>
                <checkbox id="dayoff2"
                          class="dayOffCheckbox"
                          label="&day.3.Ddd;"
                          accesskey="&day.3.Ddd.accesskey;"
                          orient="vertical"
                          preference="calendar.week.d2tuesdaysoff"/>
                <checkbox id="dayoff3"
                          class="dayOffCheckbox"
                          label="&day.4.Ddd;"
                          accesskey="&day.4.Ddd.accesskey;"
                          orient="vertical"
                          preference="calendar.week.d3wednesdaysoff"/>
                <checkbox id="dayoff4"
                          class="dayOffCheckbox"
                          label="&day.5.Ddd;"
                          accesskey="&day.5.Ddd.accesskey;"
                          orient="vertical"
                          preference="calendar.week.d4thursdaysoff"/>
                <checkbox id="dayoff5"
                          class="dayOffCheckbox"
                          label="&day.6.Ddd;"
                          accesskey="&day.6.Ddd.accesskey;"
                          orient="vertical"
                          preference="calendar.week.d5fridaysoff"/>
                <checkbox id="dayoff6"
                          class="dayOffCheckbox"
                          label="&day.7.Ddd;"
                          accesskey="&day.7.Ddd.accesskey;"
                          orient="vertical"
                          preference="calendar.week.d6saturdaysoff"/>
            </hbox>
        </groupbox>

        <groupbox>
            <caption label="&pref.calendar.view.dayandweekviews.caption;"/>
            <grid>
                <columns>
                    <column/>
                    <column/>
                    <column flex="1"/>
                </columns>
                <rows>
                    <row align="center">
                        <label value="&pref.calendar.view.daystart.label;"
                               accesskey="&pref.calendar.view.daystart.accesskey;"
                               control="daystarthour"/>
                        <menulist id="daystarthour"
                                  oncommand="gViewsPane.updateViewEndMenu(this.value);"
                                  preference="calendar.view.daystarthour">
                            <menupopup id="daystarthourpopup">
                                <menuitem id="timeStart0" label="&time.midnight;" value="0"/>
                                <menuitem id="timeStart1"                         value="1"/>
                                <menuitem id="timeStart2"                         value="2"/>
                                <menuitem id="timeStart3"                         value="3"/>
                                <menuitem id="timeStart4"                         value="4"/>
                                <menuitem id="timeStart5"                         value="5"/>
                                <menuitem id="timeStart6"                         value="6"/>
                                <menuitem id="timeStart7"                         value="7"/>
                                <menuitem id="timeStart8"                         value="8"/>
                                <menuitem id="timeStart9"                         value="9"/>
                                <menuitem id="timeStart10"                        value="10"/>
                                <menuitem id="timeStart11"                        value="11"/>
                                <menuitem id="timeStart12" label="&time.noon;"    value="12"/>
                                <menuitem id="timeStart13"                        value="13"/>
                                <menuitem id="timeStart14"                        value="14"/>
                                <menuitem id="timeStart15"                        value="15"/>
                                <menuitem id="timeStart16"                        value="16"/>
                                <menuitem id="timeStart17"                        value="17"/>
                                <menuitem id="timeStart18"                        value="18"/>
                                <menuitem id="timeStart19"                        value="19"/>
                                <menuitem id="timeStart20"                        value="20"/>
                                <menuitem id="timeStart21"                        value="21"/>
                                <menuitem id="timeStart22"                        value="22"/>
                                <menuitem id="timeStart23"                        value="23"/>
                            </menupopup>
                        </menulist>
                        <hbox align="center" pack="center">
                            <label value="&pref.calendar.view.visiblehours.label;"
                                   accesskey="&pref.calendar.view.visiblehours.accesskey;"
                                   control="visiblehours"/>
                            <menulist id="visiblehours"
                                      preference="calendar.view.visiblehours">
                                <menupopup id="visiblehourspopup">
                                    <menuitem label="1"  value="1"/>
                                    <menuitem label="2"  value="2"/>
                                    <menuitem label="3"  value="3"/>
                                    <menuitem label="4"  value="4"/>
                                    <menuitem label="5"  value="5"/>
                                    <menuitem label="6"  value="6"/>
                                    <menuitem label="7"  value="7"/>
                                    <menuitem label="8"  value="8"/>
                                    <menuitem label="9"  value="9"/>
                                    <menuitem label="10" value="10"/>
                                    <menuitem label="11" value="11"/>
                                    <menuitem label="12" value="12"/>
                                    <menuitem label="13" value="13"/>
                                    <menuitem label="14" value="14"/>
                                    <menuitem label="15" value="15"/>
                                    <menuitem label="16" value="16"/>
                                    <menuitem label="17" value="17"/>
                                    <menuitem label="18" value="18"/>
                                    <menuitem label="19" value="19"/>
                                    <menuitem label="20" value="20"/>
                                    <menuitem label="21" value="21"/>
                                    <menuitem label="22" value="22"/>
                                    <menuitem label="23" value="23"/>
                                    <menuitem label="24" value="24"/>
                                </menupopup>
                            </menulist>
                            <label value="&pref.calendar.view.visiblehoursend.label;"/>
                        </hbox>
                    </row>
                    <row align="center">
                        <label value="&pref.calendar.view.dayend.label;"
                               accesskey="&pref.calendar.view.dayend.accesskey;"
                               control="dayendhour"/>
                        <menulist id="dayendhour"
                                  oncommand="gViewsPane.updateViewStartMenu(this.value);"
                                  preference="calendar.view.dayendhour">
                            <menupopup id="dayendhourpopup">
                                <menuitem id="timeEnd1"                          value="1"/>
                                <menuitem id="timeEnd2"                          value="2"/>
                                <menuitem id="timeEnd3"                          value="3"/>
                                <menuitem id="timeEnd4"                          value="4"/>
                                <menuitem id="timeEnd5"                          value="5"/>
                                <menuitem id="timeEnd6"                          value="6"/>
                                <menuitem id="timeEnd7"                          value="7"/>
                                <menuitem id="timeEnd8"                          value="8"/>
                                <menuitem id="timeEnd9"                          value="9"/>
                                <menuitem id="timeEnd10"                         value="10"/>
                                <menuitem id="timeEnd11"                         value="11"/>
                                <menuitem id="timeEnd12" label="&time.noon;"     value="12"/>
                                <menuitem id="timeEnd13"                         value="13"/>
                                <menuitem id="timeEnd14"                         value="14"/>
                                <menuitem id="timeEnd15"                         value="15"/>
                                <menuitem id="timeEnd16"                         value="16"/>
                                <menuitem id="timeEnd17"                         value="17"/>
                                <menuitem id="timeEnd18"                         value="18"/>
                                <menuitem id="timeEnd19"                         value="19"/>
                                <menuitem id="timeEnd20"                         value="20"/>
                                <menuitem id="timeEnd21"                         value="21"/>
                                <menuitem id="timeEnd22"                         value="22"/>
                                <menuitem id="timeEnd23"                         value="23"/>
                                <menuitem id="timeEnd24" label="&time.midnight;" value="24"/>
                            </menupopup>
                        </menulist>
                    </row>
                </rows>
            </grid>
        </groupbox>

        <groupbox id="viewsMultiweekGroupbox">
            <caption label="&pref.calendar.view.multiweekview.caption;"/>
            <hbox align="center">
                <label value="&pref.numberofweeks.label;"
                       accesskey="&pref.numberofweeks.accesskey;"
                       control="viewsMultiweekTotalWeeks"/>
                <menulist id="viewsMultiweekTotalWeeks"
                          preference="calendar.weeks.inview">
                    <menupopup>
                        <menuitem label="&pref.numberofweeks.1;" value="1"/>
                        <menuitem label="&pref.numberofweeks.2;" value="2"/>
                        <menuitem label="&pref.numberofweeks.3;" value="3"/>
                        <menuitem label="&pref.numberofweeks.4;" value="4"/>
                        <menuitem label="&pref.numberofweeks.5;" value="5"/>
                        <menuitem label="&pref.numberofweeks.6;" value="6"/>
                    </menupopup>
                </menulist>
            </hbox>
            <hbox align="center" id="previousWeeksBox">
                <label value="&pref.numberofpreviousweeks.label;"
                       accesskey="&pref.numberofpreviousweeks.accesskey;"
                       control="viewsMultiweekPreviousWeeks"/>
                <menulist id="viewsMultiweekPreviousWeeks"
                          preference="calendar.previousweeks.inview">
                    <menupopup>
                        <menuitem label="&pref.numberofweeks.0;" value="0"/>
                        <menuitem label="&pref.numberofweeks.1;" value="1"/>
                        <menuitem label="&pref.numberofweeks.2;" value="2"/>
                    </menupopup>
                </menulist>
            </hbox>
        </groupbox>

    </vbox>
</overlay>
