Exemplo n.º 1
0
<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
$arResult['TIMEZONE_LIST'] = CCalendar::GetTimezoneList();
$this->IncludeComponentTemplate();
Exemplo n.º 2
0
    public static function DialogSettings($Params)
    {
        $id = $Params['id'];
        $arTabs = array(array('name' => GetMessage('EC_SET_TAB_PERSONAL'), 'title' => GetMessage('EC_SET_TAB_PERSONAL_TITLE'), 'id' => $id . "set-tab-0"), array('name' => GetMessage('EC_SET_TAB_BASE'), 'title' => GetMessage('EC_SET_TAB_BASE_TITLE'), 'id' => $id . "set-tab-1", 'show' => CCalendarType::CanDo('calendar_type_access', $Params['type'])), array('name' => GetMessage('EC_SECT_ACCESS_TAB'), 'title' => GetMessage('EC_SECT_ACCESS_TAB'), 'id' => $id . "set-tab-2", 'show' => CCalendarType::CanDo('calendar_type_access', $Params['type'])));
        $arDays = self::GetWeekDays();
        $arWorTimeList = array();
        for ($i = 0; $i < 24; $i++) {
            $arWorTimeList[strval($i)] = CCalendar::FormatTime($i, 0);
            $arWorTimeList[strval($i) . '.30'] = CCalendar::FormatTime($i, 30);
        }
        $timezoneList = CCalendar::GetTimezoneList();
        $bInPersonal = $Params['inPersonalCalendar'];
        ?>
<div id="bxec_uset_<?php 
        echo $id;
        ?>
" class="bxec-popup">
	<div style="width: 500px; height: 1px;"></div>
	<div class="bxec-d-tabs" id="<?php 
        echo $id;
        ?>
_set_tabs">
		<?php 
        foreach ($arTabs as $tab) {
            ?>
			<div class="bxec-d-tab <?php 
            if ($tab['active']) {
                echo 'bxec-d-tab-act';
            }
            ?>
" title="<?php 
            echo isset($tab['title']) ? $tab['title'] : $tab['name'];
            ?>
" id="<?php 
            echo $tab['id'];
            ?>
" <?php 
            if ($tab['show'] === false) {
                echo 'style="display:none;"';
            }
            ?>
>
				<b></b><div><span><?php 
            echo $tab['name'];
            ?>
</span></div><i></i>
			</div>
		<?php 
        }
        ?>
	</div>
	<div class="bxec-d-cont"  id="<?php 
        echo $id;
        ?>
_set_tabcont">
<?php 
        /* ####### TAB 0 : PERSONAL ####### */
        ?>
<div id="<?php 
        echo $id;
        ?>
set-tab-0-cont" class="bxec-d-cont-div" style="display: block;">

	<!-- default meeting calendar -->
	<?php 
        if ($bInPersonal) {
            ?>
	<div class="bxec-popup-row">
		<span class="bxec-field-label-3"><label for="<?php 
            echo $id;
            ?>
_set_tz_sel"><?php 
            echo GetMessage('EC_TIMEZONE');
            ?>
:</label></span>
		<span  class="bxec-field-val-2">
			<select id="<?php 
            echo $id;
            ?>
_set_tz_sel" style="max-width: 235px;">
				<option value=""> - </option>
				<?php 
            foreach ($timezoneList as $tz) {
                ?>
					<option value="<?php 
                echo $tz['timezone_id'];
                ?>
"><?php 
                echo htmlspecialcharsEx($tz['title']);
                ?>
</option>
				<?php 
            }
            ?>
			</select>
		</span>
	</div>
	<div class="bxec-popup-row">
		<span class="bxec-field-label-3"><label for="<?php 
            echo $id;
            ?>
_uset_calend_sel"><?php 
            echo GetMessage('EC_ADV_MEETING_CAL');
            ?>
:</label></span>
		<span  class="bxec-field-val-2">
			<select id="<?php 
            echo $id;
            ?>
_set_sect_sel"></select>
		</span>
	</div>

	<!-- blinking option -->
	<div class="bxec-popup-row">
		<span class="bxec-field-label-1"><input id="<?php 
            echo $id;
            ?>
_uset_blink" type="checkbox" /></span>
		<span  class="bxec-field-val-2">
			<label for="<?php 
            echo $id;
            ?>
_uset_blink"><?php 
            echo GetMessage('EC_BLINK_SET');
            ?>
</label>
		</span>
	</div>

	<!-- show banner -->
	<div class="bxec-popup-row">
		<span class="bxec-field-label-1"><input id="<?php 
            echo $id;
            ?>
_show_banner" type="checkbox" /></span>
		<span  class="bxec-field-val-2">
			<label for="<?php 
            echo $id;
            ?>
_show_banner"><?php 
            echo GetMessage('EC_SHOW_BANNER', array('#DAV_EXAMPLE#' => CCalendar::IsBitrix24() ? 'CalDAV, MS Outlook' : 'Exchange, CalDAV, MS Outlook'));
            ?>
</label>
		</span>
	</div>
	<!-- show declined -->
	<div class="bxec-popup-row">
		<span class="bxec-field-label-1"><input id="<?php 
            echo $id;
            ?>
_show_declined" type="checkbox" /></span>
		<span  class="bxec-field-val-2">
			<label for="<?php 
            echo $id;
            ?>
_show_declined"><?php 
            echo GetMessage('EC_OPTION_SHOW_DECLINED');
            ?>
</label>
		</span>
	</div>
	<?php 
        }
        /*if($bInPersonal)*/
        ?>

	<!-- show declined -->
	<div class="bxec-popup-row">
		<span class="bxec-field-label-1"><input id="<?php 
        echo $id;
        ?>
_show_muted" type="checkbox" /></span>
		<span  class="bxec-field-val-2">
			<label for="<?php 
        echo $id;
        ?>
_show_muted"><?php 
        echo GetMessage('EC_OPTION_SHOW_MUTED');
        ?>
</label>
		</span>
	</div>

	<?php 
        if ($Params['bShowSuperpose']) {
            ?>
	<div class="bxec-popup-row">
		<a id="<?php 
            echo $id;
            ?>
-set-manage-sp" href="javascript:void(0);" title="<?php 
            echo GetMessage('EC_MANAGE_SP_CALENDARS_TITLE');
            ?>
"><?php 
            echo GetMessage('EC_MANAGE_SP_CALENDARS');
            ?>
</a>
	</div>
	<?php 
        }
        ?>

	<?php 
        if ($Params['bCalDAV'] && $bInPersonal) {
            ?>
	<div class="bxec-popup-row">
		<a id="<?php 
            echo $id;
            ?>
_manage_caldav" href="javascript:void(0);" title="<?php 
            echo GetMessage('EC_MANAGE_CALDAV_TITLE');
            ?>
"><?php 
            echo GetMessage('EC_MANAGE_CALDAV');
            ?>
</a>
	</div>
	<?php 
        }
        ?>

	<div class="bxec-popup-row">
		<a id="<?php 
        echo $id;
        ?>
_uset_clear" href="javascript:void(0);"><?php 
        echo GetMessage('EC_CLEAR_PERS_SETTINGS');
        ?>
</a>
	</div>
</div>
<?php 
        /* ####### END TAB 0 ####### */
        ?>

<?php 
        /* ####### TAB 1 : CALENDAR SETTINGS ####### */
        ?>
<div id="<?php 
        echo $id;
        ?>
set-tab-1-cont" class="bxec-d-cont-div">

	<!-- Work time -->
	<div class="bxec-popup-row">
		<span class="bxec-field-label-3"><label for="<?php 
        echo $id;
        ?>
work_time_start"><?php 
        echo GetMessage("EC_WORK_TIME");
        ?>
:</label></span>
		<span  class="bxec-field-val-2">
			<select id="<?php 
        echo $id;
        ?>
work_time_start">
					<?php 
        foreach ($arWorTimeList as $key => $val) {
            ?>
						<option value="<?php 
            echo $key;
            ?>
"><?php 
            echo $val;
            ?>
</option>
					<?php 
        }
        ?>
				</select>
				&mdash;
				<select id="<?php 
        echo $id;
        ?>
work_time_end">
					<?php 
        foreach ($arWorTimeList as $key => $val) {
            ?>
						<option value="<?php 
            echo $key;
            ?>
"><?php 
            echo $val;
            ?>
</option>
					<?php 
        }
        ?>
				</select>
		</span>
	</div>

<!-- Week holidays -->
<div class="bxec-popup-row">
	<span class="bxec-field-label-3"><label for="<?php 
        echo $id;
        ?>
week_holidays"><?php 
        echo GetMessage('EC_WEEK_HOLIDAYS');
        ?>
:</label></span>
	<span  class="bxec-field-val-2">
		<select size="7" multiple=true id="<?php 
        echo $id;
        ?>
week_holidays">
			<?php 
        foreach ($arDays as $day) {
            ?>
				<option value="<?php 
            echo $day[2];
            ?>
" ><?php 
            echo $day[0];
            ?>
</option>
			<?php 
        }
        ?>
		</select>
	</span>
</div>
<!-- year holidays -->
<div class="bxec-popup-row">
	<span class="bxec-field-label-3"><label for="<?php 
        echo $id;
        ?>
year_holidays"><?php 
        echo GetMessage('EC_YEAR_HOLIDAYS');
        ?>
:</label></span>
	<span  class="bxec-field-val-2"><input type="text" id="<?php 
        echo $id;
        ?>
year_holidays" value=""/></span>
</div>
<!-- year workdays -->
<div class="bxec-popup-row">
	<span class="bxec-field-label-3"><label for="<?php 
        echo $id;
        ?>
year_workdays"><?php 
        echo GetMessage('EC_YEAR_WORKDAYS');
        ?>
:</label></span>
	<span  class="bxec-field-val-2"><input type="text" id="<?php 
        echo $id;
        ?>
year_workdays" value=""/></span>
</div>

<!-- week start -->
<div class="bxec-popup-row" style="display: none;">
	<span class="bxec-field-label-3"><label for="<?php 
        echo $id;
        ?>
week_start"><?php 
        echo GetMessage('EC_WEEK_START');
        ?>
:</label></span>
	<span  class="bxec-field-val-2">
		<select id="<?php 
        echo $id;
        ?>
week_start">
			<?php 
        foreach ($arDays as $day) {
            ?>
				<option value="<?php 
            echo $day[2];
            ?>
" ><?php 
            echo $day[0];
            ?>
</option>
			<?php 
        }
        ?>
		</select>
	</span>
</div>

<?php 
        if (!CCalendar::IsBitrix24()) {
            ?>
<div class="bxec-popup-row">
	<a href="/bitrix/admin/settings.php?mid=calendar&tabControl_active_tab=edit2" title="<?php 
            echo GetMessage('EC_MANAGE_CALENDAR_TYPES_TITLE');
            ?>
" target="_blank"><?php 
            echo GetMessage('EC_MANAGE_CALENDAR_TYPES');
            ?>
</a>
</div>
<div class="bxec-popup-row">
	<a href="/bitrix/admin/settings.php?mid=calendar&tabControl_active_tab=edit1" title="<?php 
            echo GetMessage('EC_MANAGE_SETTING_TITLE');
            ?>
" target="_blank"><?php 
            echo GetMessage('EC_MANAGE_SETTING');
            ?>
</a>
</div>
<?php 
        }
        ?>

</div>
<?php 
        /* ####### END TAB 1 ####### */
        ?>

<?php 
        /* ####### TAB 2 : PERMISSIONS ####### */
        ?>
<div id="<?php 
        echo $id;
        ?>
set-tab-2-cont" class="bxec-d-cont-div">

	<div class="bxec-popup-row">
		<div class="bxec-popup-row-title"><?php 
        echo GetMessage('EC_SECT_ACCESS_TAB');
        ?>
</div>
		<div class="bxec-access-cont-row">
			<div id="<?php 
        echo $id;
        ?>
type-access-values-cont" class="bxec-access-cont"></div>
			<?php 
        self::GetAccessHTML('calendar_type');
        ?>
			<div class="bxec-access-link-cont"><a href="javascript:void(0);" id="<?php 
        echo $id;
        ?>
type-access-link" class="bxec-access-link"><?php 
        echo GetMessage('EC_T_ADD');
        ?>
</a></div>
		</div>
	</div>

</div>
<?php 
        /* ####### END TAB 2 ####### */
        ?>
	</div>
</div>
<?php 
    }
Exemplo n.º 3
0
    public static function BuildDialog($Params)
    {
        global $APPLICATION;
        $id = $Params['id'];
        $timezoneList = CCalendar::GetTimezoneList();
        $addWidthStyle = IsAmPmMode() ? ' ampm-width' : '';
        ?>
<div id="bx-planner-popup<?php 
        echo $id;
        ?>
" class="bxc-planner bxec-popup">
	<div id="<?php 
        echo $id;
        ?>
_plan_cont" class="bxec-plan-cont bxecpl-empty">
		<div id="<?php 
        echo $id;
        ?>
_plan_top_cont"  class="bxec-plan-top-cont">
			<div style="width: 700px; height: 1px;"></div>

			<div class="bxec-plan-from-to">
				<span style="display: inline-block;">
					<span class="bxec-date">
						<label class="bxec-date-label" for="<?php 
        echo $id;
        ?>
planner-from"><?php 
        echo GetMessage('EC_EDEV_FROM_DATE_TIME');
        ?>
</label>
						<input id="<?php 
        echo $id;
        ?>
planner-from" type="text" class="calendar-inp calendar-inp-cal"/>
					</span>
					<span class="bxec-time<?php 
        echo $addWidthStyle;
        ?>
"><?php 
        CClock::Show(array('inputId' => $id . 'planner_from_time', 'inputTitle' => GetMessage('EC_EDEV_TIME_FROM'), 'showIcon' => false));
        ?>
</span>
					<span class="bxec-mdash">&mdash;</span>
					<span class="bxec-date">
						<label class="bxec-date-label" for="<?php 
        echo $id;
        ?>
planner-to"><?php 
        echo GetMessage('EC_EDEV_TO_DATE_TIME');
        ?>
</label>
						<input id="<?php 
        echo $id;
        ?>
planner-to" type="text" class="calendar-inp calendar-inp-cal"/>
					</span>
					<span class="bxec-time<?php 
        echo $addWidthStyle;
        ?>
"><?php 
        CClock::Show(array('inputId' => $id . 'planner_to_time', 'inputTitle' => GetMessage('EC_EDEV_TIME_TO'), 'showIcon' => false));
        ?>
</span>

					<div style="display:none;"><?php 
        $APPLICATION->IncludeComponent("bitrix:main.calendar", "", array("FORM_NAME" => "", "INPUT_NAME" => "", "INPUT_VALUE" => "", "SHOW_TIME" => "N", "HIDE_TIMEBAR" => "Y", "SHOW_INPUT" => "N"), false, array("HIDE_ICONS" => "Y"));
        ?>
</div>


					<div id="planner-tz-cont-outer<?php 
        echo $id;
        ?>
" class="bxec-timezone-outer-wrap bxec-tz-wrap">
						<span class="bxec-timezone-link bxec-tz-wrap" id="planner-tz-switch<?php 
        echo $id;
        ?>
">
							<span class="bxec-tz-open"><?php 
        echo GetMessage('EC_EVENT_TZ_BUT_OPEN');
        ?>
</span>
							<span class="bxec-tz-close"><?php 
        echo GetMessage('EC_EVENT_TZ_BUT_CLOSE');
        ?>
</span>
						</span>
						<div id="planner-tz-cont<?php 
        echo $id;
        ?>
" class="bxec-timezone-hidden-wrap bxec-tz-wrap">
							<div id="planner-tz-inner-cont<?php 
        echo $id;
        ?>
" class="bxec-timezone-hidden">
								<div class="bxec-timezone-hidden-item">
									<select id="planner-tz-from<?php 
        echo $id;
        ?>
" class="calendar-select calendar-tz-select" name="tz_from">
										<option value=""> - </option>
										<?php 
        foreach ($timezoneList as $tz) {
            ?>
											<option value="<?php 
            echo $tz['timezone_id'];
            ?>
"><?php 
            echo htmlspecialcharsEx($tz['title']);
            ?>
</option>
										<?php 
        }
        ?>
									</select>
									<span class="bxec-mdash">&mdash;</span>
									<select id="planner-tz-to<?php 
        echo $id;
        ?>
" class="calendar-select calendar-tz-select" name="tz_to">
										<option value=""> - </option>
										<?php 
        foreach ($timezoneList as $tz) {
            ?>
											<option value="<?php 
            echo $tz['timezone_id'];
            ?>
"><?php 
            echo htmlspecialcharsEx($tz['title']);
            ?>
</option>
										<?php 
        }
        ?>
									</select>
									<span id="planner-tz-tip<?php 
        echo $id;
        ?>
" class="bxec-popup-tip-btn"></span>
								</div>
							</div>
						</div>
					</div>
				</span>

				<span class="bxec-val-cnt" style="padding-right: 24px;">
					<label class="bxec-val-cnt-label" for="<?php 
        echo $id;
        ?>
_pl_dur"><?php 
        echo GetMessage('EC_EVENT_DURATION');
        ?>
</label>
					<input class="calendar-inp" style="width: 30px;" id="<?php 
        echo $id;
        ?>
_pl_dur" type="text"/>
					<select id="<?php 
        echo $id;
        ?>
_pl_dur_type" style="width: 80px;" class="calendar-select">
						<option value="min"><?php 
        echo GetMessage('EC_EDEV_REM_MIN');
        ?>
</option>
						<option value="hour" selected="true"><?php 
        echo GetMessage('EC_EDEV_REM_HOUR');
        ?>
</option>
						<option value="day"><?php 
        echo GetMessage('EC_EDEV_REM_DAY');
        ?>
</option>
					</select>
					<i class="bxecpl-lock-dur" id="<?php 
        echo $id;
        ?>
_pl_dur_lock" title="<?php 
        echo GetMessage('EC_EVENT_DUR_LOCK');
        ?>
"></i>
				</span>

				<!-- Location -->
				<span class="bxec-val-cnt" style="width: 230px;">
					<label class="bxec-val-cnt-label" for="<?php 
        echo $id;
        ?>
_planner_location2"><?php 
        echo GetMessage('EC_LOCATION');
        ?>
</label>
					<input class="calendar-inp calendar-inp-time" style="width: 180px;" id="<?php 
        echo $id;
        ?>
_planner_location2" type="text" value="<?php 
        echo GetMessage('EC_PL_SEL_MEET_ROOM');
        ?>
" />
				</span>
			</div>

			<div id="planner-tz-def-wrap<?php 
        echo $id;
        ?>
" class="bxec-popup-timezone bxec-tz-wrap" style="display: none;">
					<span class="bxec-field-label-edev">
						<label><?php 
        echo GetMessage('EC_EVENT_ASK_TZ');
        ?>
</label>
					</span>
				<select id="planner-tz-def<?php 
        echo $id;
        ?>
" class="calendar-select calendar-tz-select" name="default_tz" style="width: 280px;">
					<option value=""> - </option>
					<?php 
        foreach ($timezoneList as $tz) {
            ?>
						<option value="<?php 
            echo $tz['timezone_id'];
            ?>
"><?php 
            echo htmlspecialcharsEx($tz['title']);
            ?>
</option>
					<?php 
        }
        ?>
				</select>
				<span id="planner-tz-def-tip<?php 
        echo $id;
        ?>
" class="bxec-popup-tip-btn"></span>
			</div>
			<div class="bxec-plan-field-dest">
				<?php 
        self::__ShowAttendeesDestinationHtml($Params);
        ?>
			</div>
		</div>

		<div id="<?php 
        echo $id;
        ?>
_plan_grid_cont" class="bxec-plan-grid-cont">
			<table id="<?php 
        echo $id;
        ?>
_plan_grid_tbl" class="bxec-plan-grid-tbl">
				<tr class="bxec-header">
					<td class="bxec-scale-cont"><label for="<?php 
        echo $id;
        ?>
_plan_scale_sel"><?php 
        echo GetMessage('EC_SCALE');
        ?>
:</label>
						<select id="<?php 
        echo $id;
        ?>
_plan_scale_sel">
							<option value="0">30 <?php 
        echo GetMessage('EC_EDEV_REM_MIN');
        ?>
</option>
							<option value="1">1 <?php 
        echo GetMessage('EC_PL_DUR_HOUR1');
        ?>
</option>
							<option value="2">2 <?php 
        echo GetMessage('EC_PL_DUR_HOUR2');
        ?>
</option>
							<option value="3">1 <?php 
        echo GetMessage('EC_JS_DAY_P');
        ?>
</option>
						</select>
					</td>
					<td class="bxec-separator-gr" rowSpan="2"></td>
					<td rowSpan="2"><div class="bxec-grid-cont-title"></div></td>
				</tr>
				<tr class="bxec-header">
					<td class="bxec-user">
						<div><?php 
        echo GetMessage('EC_EDEV_GUESTS');
        ?>
							<span id="<?php 
        echo $id;
        ?>
pl-count"></span>
						</div>
					</td>
				</tr>
				<tr>
					<td><div class="bxec-user-list-div"><div class="bxec-empty-list"> <?php 
        echo GetMessage('EC_NO_ATTENDEES');
        ?>
</div></div></td>
					<td class="bxec-separator"></td>
					<td><div class="bxec-grid-cont"><div class="bxec-gacc-cont"></div>
							<div class="bxecp-selection" id="<?php 
        echo $id;
        ?>
_plan_selection"  title="<?php 
        echo GetMessage('EC_PL_EVENT');
        ?>
"><img src="/bitrix/images/1.gif" class="bxecp-sel-left" title="<?php 
        echo GetMessage('EC_PL_EVENT_MOVE_LEFT');
        ?>
" /><img src="/bitrix/images/1.gif" class="bxecp-sel-right" title="<?php 
        echo GetMessage('EC_PL_EVENT_MOVE_RIGHT');
        ?>
" /><img src="/bitrix/images/1.gif" class="bxecp-sel-mover" title="<?php 
        echo GetMessage('EC_PL_EVENT_MOVE');
        ?>
" /></div>
						</div>
						<div class="bxec-empty-list2"><?php 
        echo GetMessage('EC_NO_GUEST_MESS');
        ?>
</div>
					</td>
				</tr>
			</table>
		</div>
	</div>
</div>
<?php 
    }