Exemple #1
0
	public function Init($admin = true)
	{
		if (!$GLOBALS['USER']->IsAuthorized())
			return false;

		if (!$this->bInited)
		{
			$bSkipRestore = false;
			$DISABLE_STANDARD_NOTIFY = ($admin ? 'false' : 'true');

			if (defined('BX_PUBLIC_MODE') && BX_PUBLIC_MODE == 1)
				echo CJSCore::GetHTML(array('autosave'));
?>
<input type="hidden" name="autosave_id" id="autosave_marker_<?php 
echo $this->GetID();
?>
" value="<?php 
echo $this->GetID();
?>
" />
<script type="text/javascript">window.autosave_<?php 
echo $this->GetID();
?>
 = new top.BX.CAutoSave({
	form_marker: 'autosave_marker_<?php 
echo $this->GetID();
?>
',
	form_id: '<?php 
echo $this->GetID();
?>
',
	DISABLE_STANDARD_NOTIFY: <?php 
echo $DISABLE_STANDARD_NOTIFY;
?>
});
</script>
<?
			$this->bInited = true;
		}
	}
Exemple #2
0
			{
				$DB->commit();
				$response = array('status' => 'success');
			}
			$APPLICATION->RestartBuffer();
			echo json_encode($response);
		}
		else
		{
			$opt = array('getContent' => true);
			$status = $ob->GET($opt);
			$response = publicDoc(array('name' => $APPLICATION->ConvertCharset($ob->arParams['element_name'], SITE_CHARSET, 'UTF-8'), 'content' => $opt['content']), $oauthCredentials);
			$googleIdDoc = CUtil::JSEscape($response['id']);
			$uriToDoc = CUtil::JSEscape($ob->uri . '?' . bitrix_sessid_get() . '&editInGoogle=1&start=1');
			$APPLICATION->RestartBuffer();
			echo CJSCore::GetHTML(array('ajax'));
					echo <<<HTML
			<script type="text/javascript">
				BX.ready(function(){
					window.onunload = function(){
						BX.ajax.loadJSON('{$uriToDoc}', {commit: 1, id: '{$googleIdDoc}'}, function(result){
							//todo catch error
							if(window.opener)
							{
								if(window.elementViewer)
								{
									window.elementViewer.show(window.elementViewer.getCurrent(), true);
								}
							}
						});
					};
Exemple #3
0
?>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
	<meta charset="windows-1251">
	<title><?php 
echo GetMessage("WD_EXT_LINK_COMP_LINK");
?>
</title>
	<!-- <link rel="stylesheet" href="https://cp.bitrix.ru/bitrix/templates/bitrix24/interface.css?1353493044"/> -->
	<link rel="stylesheet" href="<?php 
echo $tempPatch;
?>
/style.css"/>
	<?php 
echo CJSCore::GetHTML(array('viewer'));
?>
</head>
<body>
	<div class="sharing-link-page<?php 
if (substr_count($sType, "b24") <= 0) {
    echo " old-design";
}
?>
">
		<div id="header">
			<div class="header-logo-block">
				<a href="<?php 
echo SITE_DIR;
?>
" title="<?php 
Exemple #4
0
    public function Init($admin = true)
    {
        global $USER;
        if (!$USER->IsAuthorized()) {
            return false;
        }
        if (!$this->bInited) {
            $DISABLE_STANDARD_NOTIFY = $admin ? 'false' : 'true';
            if (defined('BX_PUBLIC_MODE') && BX_PUBLIC_MODE == 1) {
                echo CJSCore::GetHTML(array('autosave'));
            }
            ?>
<input type="hidden" name="autosave_id" id="autosave_marker_<?php 
            echo $this->GetID();
            ?>
" value="<?php 
            echo $this->GetID();
            ?>
" />
<script type="text/javascript">window.autosave_<?php 
            echo $this->GetID();
            ?>
 = new top.BX.CAutoSave({
	form_marker: 'autosave_marker_<?php 
            echo $this->GetID();
            ?>
',
	form_id: '<?php 
            echo $this->GetID();
            ?>
',
	DISABLE_STANDARD_NOTIFY: <?php 
            echo $DISABLE_STANDARD_NOTIFY;
            ?>
});
</script>
<?php 
            $this->checkRestore();
            $this->bInited = true;
        }
        return true;
    }
Exemple #5
0
<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
/** @var CAllMain $APPLICATION */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<?php 
echo CJSCore::GetHTML(array('ajax', 'viewer'));
?>
		<?php 
//$APPLICATION->ShowHead();
?>
		<style>
		</style>
	</head>
	<body style="height: 100%;margin: 0;padding: 0;">
		<script type="text/javascript">
			function closeConfirm()
			{
				if (typeof(BX.PULL) != 'undefined' && typeof(BX.PULL.tryConnectDelay) == 'function') // TODO change to right code in near future (e.shelenkov)
				{
					BX.PULL.tryConnectDelay();
				}
				if(window.opener)
				{
					if((BX.browser.IsIE() || BX.browser.IsIE11()) && window.opener._ie_elementViewer && (window.opener._ie_elementViewer.bVisible || window.opener._ie_elementViewer.createDoc))