Пример #1
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 
    }
Пример #2
0
</div>
<?
	}

	public static function DialogMobileCon($Params)
	{
		$id = $Params['id'];
?>
<div id="bxec_mobile_<?=$id?>" class="bxec-popup" style="width: 560px;">
	<div class="bxec-mobile-cont">
		<div class="bxec-mobile-header"><?= GetMessage('EC_MOBILE_HELP_HEADER');?></div>
		<a id="bxec_mob_link_iphone_<?=$id?>" class="bxec-mobile-link bxec-link-hidden" href="javascript: void(0)"><div class="bxec-iconkit bxec-arrow"></div><?= GetMessage('EC_MOBILE_APPLE');?></a>
		<div id="bxec_mobile_iphone_all<?=$id?>" style="display: none;"><?= GetMessage('EC_MOBILE_HELP_IPHONE_ALL_HELP', array('#POINT_SET_PORT#' => GetMessage(CCalendar::IsBitrix24() ? 'EC_SET_PORT_BX24' : 'EC_SET_PORT')))?></div>
		<div id="bxec_mobile_iphone_one<?=$id?>" style="display: none;"><?= GetMessage('EC_MOBILE_HELP_IPHONE_ONE_HELP', array('#POINT_SET_PORT#' => GetMessage(CCalendar::IsBitrix24() ? 'EC_SET_PORT_BX24' : 'EC_SET_PORT')))?></div>
		<a id="bxec_mob_link_mac_<?=$id?>" class="bxec-mobile-link bxec-link-hidden" href="javascript: void(0)"><div class="bxec-iconkit bxec-arrow"></div><?= GetMessage('EC_MOBILE_MAC_OS');?></a>
		<div id="bxec_mobile_mac_cont<?=$id?>" style="display: none;"><?= GetMessage('EC_MOBILE_HELP_MAC_1', array('#POINT_SET_PORT#' => GetMessage(CCalendar::IsBitrix24() ? 'EC_SET_PORT_BX24' : 'EC_SET_PORT')))?></div>
		<a id="bxec_mob_link_bird_<?=$id?>" class="bxec-mobile-link bxec-link-hidden" href="javascript: void(0)"><div class="bxec-iconkit bxec-arrow"></div><?= GetMessage('EC_MOBILE_SUNBIRD');?></a>
		<div id="bxec_mobile_sunbird_all<?=$id?>" style="display: none;"><?= GetMessage("EC_MOBILE_HELP_SUNBIRD_ALL_HELP")?></div>
		<div id="bxec_mobile_sunbird_one<?=$id?>" style="display: none;"><?= GetMessage("EC_MOBILE_HELP_SUNBIRD_ONE_HELP")?></div>
	</div>
</div>
<?
	}

	public static function GetWeekDays()
	{
		return array(
			array(GetMessage('EC_MO_F'), GetMessage('EC_MO'), 'MO'),
			array(GetMessage('EC_TU_F'), GetMessage('EC_TU'), 'TU'),
			array(GetMessage('EC_WE_F'), GetMessage('EC_WE'), 'WE'),
			array(GetMessage('EC_TH_F'), GetMessage('EC_TH'), 'TH'),
    public static function DialogMobileCon($Params)
    {
        $id = $Params['id'];
        ?>
<div id="bxec_mobile_<?php 
        echo $id;
        ?>
" class="bxec-popup" style="width: 560px;">
	<div class="bxec-mobile-cont">
		<div class="bxec-mobile-header"><?php 
        echo GetMessage('EC_MOBILE_HELP_HEADER');
        ?>
</div>
		<a id="bxec_mob_link_iphone_<?php 
        echo $id;
        ?>
" class="bxec-mobile-link bxec-link-hidden" href="javascript: void(0)"><div class="bxec-iconkit bxec-arrow"></div><?php 
        echo GetMessage('EC_MOBILE_APPLE');
        ?>
</a>
		<div id="bxec_mobile_iphone_all<?php 
        echo $id;
        ?>
" style="display: none;"><?php 
        echo GetMessage('EC_MOBILE_HELP_IPHONE_ALL_HELP', array('#POINT_SET_PORT#' => GetMessage(CCalendar::IsBitrix24() ? 'EC_SET_PORT_BX24' : 'EC_SET_PORT')));
        ?>
</div>
		<div id="bxec_mobile_iphone_one<?php 
        echo $id;
        ?>
" style="display: none;"><?php 
        echo GetMessage('EC_MOBILE_HELP_IPHONE_ONE_HELP', array('#POINT_SET_PORT#' => GetMessage(CCalendar::IsBitrix24() ? 'EC_SET_PORT_BX24' : 'EC_SET_PORT')));
        ?>
</div>
		<a id="bxec_mob_link_mac_<?php 
        echo $id;
        ?>
" class="bxec-mobile-link bxec-link-hidden" href="javascript: void(0)"><div class="bxec-iconkit bxec-arrow"></div><?php 
        echo GetMessage('EC_MOBILE_MAC_OS');
        ?>
</a>
		<div id="bxec_mobile_mac_cont<?php 
        echo $id;
        ?>
" style="display: none;"><?php 
        echo GetMessage('EC_MOBILE_HELP_MAC', array('#POINT_SET_PORT#' => GetMessage(CCalendar::IsBitrix24() ? 'EC_SET_PORT_BX24' : 'EC_SET_PORT')));
        ?>
</div>
		<a id="bxec_mob_link_bird_<?php 
        echo $id;
        ?>
" class="bxec-mobile-link bxec-link-hidden" href="javascript: void(0)"><div class="bxec-iconkit bxec-arrow"></div><?php 
        echo GetMessage('EC_MOBILE_SUNBIRD');
        ?>
</a>
		<div id="bxec_mobile_sunbird_all<?php 
        echo $id;
        ?>
" style="display: none;"><?php 
        echo GetMessage("EC_MOBILE_HELP_SUNBIRD_ALL_HELP");
        ?>
</div>
		<div id="bxec_mobile_sunbird_one<?php 
        echo $id;
        ?>
" style="display: none;"><?php 
        echo GetMessage("EC_MOBILE_HELP_SUNBIRD_ONE_HELP");
        ?>
</div>
	</div>
</div>
<?php 
    }
Пример #4
0
 private static function InitCalDavParams(&$JSConfig)
 {
     global $USER;
     $JSConfig['bCalDAV'] = true;
     $JSConfig['caldav_link_all'] = CCalendar::GetServerPath();
     $login = '';
     if (self::$type == 'user') {
         if (self::$ownerId == self::$userId) {
             $login = $USER->GetLogin();
         } else {
             $rsUser = CUser::GetByID(self::$ownerId);
             if ($arUser = $rsUser->Fetch()) {
                 $login = $arUser['LOGIN'];
             }
         }
         if (CCalendar::IsBitrix24()) {
             $JSConfig['caldav_link_one'] = "https://" . CCalendar::GetServerName() . ":1443/bitrix/groupdav.php/" . SITE_ID . "/" . $login . "/calendar/#CALENDAR_ID#/";
         } else {
             $JSConfig['caldav_link_one'] = CCalendar::GetServerPath() . "/bitrix/groupdav.php/" . SITE_ID . "/" . $login . "/calendar/#CALENDAR_ID#/";
         }
     } else {
         if (self::$type == 'group') {
             if (CCalendar::IsBitrix24()) {
                 $JSConfig['caldav_link_one'] = "https://" . CCalendar::GetServerName() . ":1443/bitrix/groupdav.php/" . SITE_ID . "/group-" . self::$ownerId . "/calendar/#CALENDAR_ID#/";
             } else {
                 $JSConfig['caldav_link_one'] = CCalendar::GetServerPath() . "/bitrix/groupdav.php/" . SITE_ID . "/group-" . self::$ownerId . "/calendar/#CALENDAR_ID#/";
             }
         }
     }
     if (self::$type == 'user') {
         $res = CDavConnection::GetList(array("ID" => "DESC"), array("ENTITY_TYPE" => "user", "ENTITY_ID" => self::$ownerId, "ACCOUNT_TYPE" => 'caldav'), false, false);
         $arConnections = array();
         while ($arCon = $res->Fetch()) {
             $arConnections[] = array('id' => $arCon['ID'], 'name' => $arCon['NAME'], 'link' => $arCon['SERVER'], 'user_name' => $arCon['SERVER_USERNAME'], 'last_result' => $arCon['LAST_RESULT'], 'sync_date' => $arCon['SYNCHRONIZED']);
         }
         $JSConfig['connections'] = $arConnections;
     }
 }
" style="display: none;"><?php 
echo GetMessage('EC_MOBILE_HELP_IPHONE_ONE_HELP', array('#POINT_SET_PORT#' => GetMessage(CCalendar::IsBitrix24() ? 'EC_SET_PORT_BX24' : 'EC_SET_PORT')));
?>
</div>
		<a id="bxec_mob_link_mac_<?php 
echo $id;
?>
" class="bxec-mobile-link bxec-link-hidden" href="javascript: void(0)"><div class="bxec-iconkit bxec-arrow"></div><?php 
echo GetMessage('EC_MOBILE_MAC_OS');
?>
</a>
		<div id="bxec_mobile_mac_cont<?php 
echo $id;
?>
" style="display: none;"><?php 
echo GetMessage('EC_MOBILE_HELP_MAC_1', array('#POINT_SET_PORT#' => GetMessage(CCalendar::IsBitrix24() ? 'EC_SET_PORT_BX24' : 'EC_SET_PORT')));
?>
</div>
		<a id="bxec_mob_link_bird_<?php 
echo $id;
?>
" class="bxec-mobile-link bxec-link-hidden" href="javascript: void(0)"><div class="bxec-iconkit bxec-arrow"></div><?php 
echo GetMessage('EC_MOBILE_SUNBIRD');
?>
</a>
		<div id="bxec_mobile_sunbird_all<?php 
echo $id;
?>
" style="display: none;"><?php 
echo GetMessage("EC_MOBILE_HELP_SUNBIRD_ALL_HELP");
?>