Exemple #1
0
function wdPrintAccessTab(array $arResult, $printButtons = true)
{
    return '
	<div class="bx-webdav-invite-access">
		<form onsubmit="BX.PreventDefault();" action="' . $arResult['URL_TO_SHARE_FOLDER'] . '" name="webdav-invite-share" id="webdav-invite-share" method="POST">
		<div class="bx-webdav-invite-access-title">' . GetMessage('DISK_FOLDER_LIST_INVITE_MODAL_TITLE_SHARING') . ' "' . $arResult['OBJECT']['NAME'] . '"</div>
		<div class="bx-webdav-invite-cont">
			<div class="bx-webdav-invite-whom">
				<div class="bx-webdav-invite-whom-l">' . GetMessage('DISK_FOLDER_LIST_INVITE_MODAL_DESTINATION') . '</div>
				<div id="feed-add-post-destination-container-post" class="bx-webdav-invite-whom-r">
					<span id="feed-add-post-destination-item"></span>
					<span class="feed-add-destination-input-box" id="feed-add-post-destination-input-box">
						<input autocomplete="off" type="text" value="" class="feed-add-destination-inp" id="feed-add-post-destination-input"/>
					</span>
					<a href="#" class="feed-add-destination-link" id="bx-destination-tag">' . GetMessageJS("DISK_FOLDER_LIST_INVITE_MODAL_DESTINATION_1") . '</a>
				</div>
			</div>
			<textarea name="invite_description" id="inviteDescription" class="bx-webdav-invite-textar" placeholder="' . GetMessage('DISK_FOLDER_LIST_INVITE_MODAL_PLACEHOLDER') . '"></textarea>
			<div class="bx-webdav-invite-checkbox-wrap">
				<input name="can_edit" type="checkbox" class="bx-webdav-invite-checkbox" id="canEdit" checked="checked"/><label for="canEdit" class="bx-webdav-invite-label">' . GetMessage('DISK_FOLDER_LIST_INVITE_MODAL_CAN_EDIT') . '</label>
			</div>
		</div>
		' . ($printButtons ? wdPrintAccessTabButtons($arResult) : '') . '
	</div>
';
}
Exemple #2
0
    function MULChangeOnlineStatus($USER_ID = false, $HTML_ID = false)
    {
        static $arUserList, $arUserListID, $arUserListHTML_ID;
        static $bNotFirstCall;
        if (!$bNotFirstCall) {
            $GLOBALS["APPLICATION"]->AddBufferContent("MULChangeOnlineStatus");
            $bNotFirstCall = true;
        }
        if (intval($USER_ID) > 0) {
            if (!$HTML_ID) {
                $HTML_ID = "main_" . $USER_ID;
            }
            $arUserListID[] = $USER_ID;
            $arUserListHTML_ID[] = "'" . $HTML_ID . "'";
            $arUserList[] = array("USER_ID" => $USER_ID, "HTML_ID" => $HTML_ID);
        } else {
            $arUserListIDUnique = array_unique($arUserListID);
            $strUserListID = implode("|", $arUserListIDUnique);
            $rsUser = CUser::GetList($by = "id", $order = "desc", array("ID" => $strUserListID));
            $arUserListOnlineHTML_ID = array();
            while ($arUser = $rsUser->Fetch()) {
                if (time() - intval(MakeTimeStamp($arUser["LAST_ACTIVITY_DATE"], "YYYY-MM-DD HH-MI-SS")) < 120) {
                    foreach ($arUserList as $arTmp) {
                        if ($arUser["ID"] == $arTmp["USER_ID"]) {
                            $arUserListOnlineHTML_ID[] = "'" . $arTmp["HTML_ID"] . "'";
                        }
                    }
                }
            }
            return '<script type="text/javascript">

			BX.ready(function() {
				var arMULUserList = [' . implode(",", $arUserListHTML_ID) . '];
				var arMULUserListOnline = [' . implode(",", $arUserListOnlineHTML_ID) . '];

				for(var i=0; i<arMULUserList.length; i++)
				{
					var elOnline = document.getElementById(arMULUserList[i]);
					if(elOnline)
					{
						if (BX.util.in_array(arMULUserList[i], arMULUserListOnline))
						{
							elOnline.className = "bx-user-info-online";
							elOnline.title = "' . GetMessageJS("MAIN_UL_ONLINE") . '";
						}
						else
						{
							elOnline.className = "bx-user-info-offline";
							elOnline.title = "";
						}

					}

				}
			});
			</script>';
        }
    }
Exemple #3
0
",
		createBlankFileUrl: "<?php 
    echo CUtil::JSUrlEscape($arResult['CLOUD_DOCUMENT']['CREATE_BLANK_FILE_URL']);
    ?>
",
		renameBlankFileUrl: "<?php 
    echo CUtil::JSUrlEscape($arResult['CLOUD_DOCUMENT']['RENAME_BLANK_FILE_URL']);
    ?>
",
		<?php 
}
?>
		targetFolderId: "<?php 
echo $arParams['FOLDER_ID'];
?>
"
	});

	BX.message({
		'BX_FPD_LINK_1':'<?php 
echo GetMessageJS("EC_DESTINATION_1");
?>
',
		'BX_FPD_LINK_2':'<?php 
echo GetMessageJS("EC_DESTINATION_2");
?>
'
	});
});
</script>
Exemple #4
0
                            }
                        }
                        if ($bContinue) {
                            continue;
                        }
                    }
                    $arReports[] = array("TEXT" => $rep_title, "ONCLICK" => "window.open('/bitrix/admin/sale_order_print_new.php?&ORDER_ID=" . $ID . "&doc=" . substr($file, 0, strlen($file) - 4) . "&" . bitrix_sessid_get() . "', '_blank');");
                }
            }
        }
        closedir($handle);
    }
}
$aMenu[] = array("TEXT" => Loc::getMessage("SALE_OVIEW_TO_PRINT"), "TITLE" => Loc::getMessage("SALE_OVIEW_TO_PRINT_TITLE"), "LINK" => "/bitrix/admin/sale_order_print.php?ID=" . $ID . "&lang=" . LANGUAGE_ID . GetFilterParams("filter_"), "MENU" => $arReports);
$aMenu[] = array("TEXT" => Loc::getMessage("SALE_OVIEW_ORDER_COPY"), "TITLE" => Loc::getMessage("SALE_OVIEW_ORDER_COPY_TITLE"), "LINK" => '/bitrix/admin/sale_order_create.php?lang=' . LANGUAGE_ID . "&SITE_ID=" . $saleOrder->getSiteId() . "&ID=" . $ID . "&" . bitrix_sessid_get() . GetFilterParams("filter_"));
$aMenu[] = array("TEXT" => Loc::getMessage("SALE_OVIEW_DELETE"), "TITLE" => Loc::getMessage("SALE_OVIEW_DELETE_TITLE"), "LINK" => "javascript:if(confirm('" . GetMessageJS("SALE_OVIEW_DEL_MESSAGE") . "')) window.location='sale_order.php?ID=" . $ID . "&action=delete&lang=" . LANGUAGE_ID . "&" . bitrix_sessid_get() . urlencode(GetFilterParams("filter_")) . "'", "WARNING" => "Y");
$context = new CAdminContextMenu($aMenu);
$context->Show();
//prepare blocks order
$defaultBlocksOrder = array("statusorder", "buyer", "delivery", "financeinfo", "payment", "additional", "basket");
$formId = "sale_order_view";
$orderBasket = new Admin\Blocks\OrderBasket($saleOrder, "BX.Sale.Admin.OrderBasketObj", "sale_order_basket", true, Admin\Blocks\OrderBasket::VIEW_MODE);
echo Admin\OrderEdit::getScripts($saleOrder, $formId);
echo Admin\Blocks\OrderInfo::getScripts();
echo Admin\Blocks\OrderBuyer::getScripts();
echo Admin\Blocks\OrderPayment::getScripts();
echo Admin\Blocks\OrderStatus::getScripts($saleOrder, $USER->GetID());
echo Admin\Blocks\OrderAdditional::getScripts();
echo Admin\Blocks\OrderFinanceInfo::getScripts();
echo Admin\Blocks\OrderShipment::getScripts();
echo Admin\Blocks\OrderAnalysis::getScripts();
Exemple #5
0
<script type="text/javascript">
	BX.ready(
		function()
		{
			BX.CrmWidget.messages =
			{
				"legend" : "<?php 
echo GetMessageJS("CRM_WGT_RATING_LEGEND");
?>
",
				"nomineeRatingPosition" : "<?php 
echo GetMessageJS("CRM_WGT_RATING_NOMINEE_POSITION");
?>
",
				"ratingPosition" : "<?php 
echo GetMessageJS("CRM_WGT_RATING_POSITION");
?>
"
			};<?php 
$width = 100;
if ($layout === '70/30') {
    $width = 70;
} elseif ($layout === '50/50') {
    $width = 50;
} elseif ($layout === '30/70') {
    $width = 30;
}
$qty = count($settings);
for ($i = 0; $i < $qty; $i++) {
    $setting = $settings[$i];
    $id = "{$quid}_{$i}";
Exemple #6
0
    ?>
',
		SGMSubscribeButtonHintOn: '<?php 
    echo GetMessageJS("SONET_SGM_T_NOTIFY_HINT_ON");
    ?>
',
		SGMSubscribeButtonHintOff: '<?php 
    echo GetMessageJS("SONET_SGM_T_NOTIFY_HINT_OFF");
    ?>
',
		SGMSubscribeButtonTitleOn: '<?php 
    echo GetMessageJS("SONET_SGM_T_NOTIFY_TITLE_ON");
    ?>
',
		SGMSubscribeButtonTitleOff: '<?php 
    echo GetMessageJS("SONET_SGM_T_NOTIFY_TITLE_OFF");
    ?>
'
	});
	</script><?php 
    CUtil::InitJSCore(array("ajax", "popup"));
    $GLOBALS["APPLICATION"]->AddHeadScript("/bitrix/components/bitrix/socialnetwork.group_menu/templates/.default/script.js");
    $GLOBALS["APPLICATION"]->SetAdditionalCSS("/bitrix/components/bitrix/socialnetwork.group_menu/templates/.default/style.css");
    if (strpos(SITE_TEMPLATE_ID, "stretchy") === 0 || strpos(SITE_TEMPLATE_ID, "taby") === 0) {
        $this->SetViewTarget("sidebar", 5);
        ?>
<style>
			#sidebar { position: relative; }
			#sidebar .content-title { padding-right: 23px; }
		</style>
		<a id="group_menu_subscribe_button" class="profile-menu-notify-btn<?php 
Exemple #7
0
echo CUtil::JSEscape($template);
?>
',
	"JERROR_NO_MESSAGE" : '<?php 
echo GetMessageJS("JERROR_NO_MESSAGE");
?>
',
	"BLOG_C_HIDE" : '<?php 
echo GetMessageJS("BLOG_C_HIDE");
?>
',
	JQOUTE_AUTHOR_WRITES : '<?php 
echo GetMessageJS("JQOUTE_AUTHOR_WRITES");
?>
',
	FC_ERROR : '<?php 
echo GetMessageJS("B_B_PC_COM_ERROR");
?>
'
	<?php 
if (IsModuleInstalled("socialnetwork")) {
    ?>
			, "MPL_WORKGROUPS_PATH" : '<?php 
    echo CUtil::JSEscape(COption::GetOptionString("socialnetwork", "workgroups_page", SITE_DIR . "workgroups/", SITE_ID));
    ?>
'
			<?php 
}
?>
	});
</script>
Exemple #8
0
',
		extranetUser : <?php 
    echo $arParams["DESTINATION"]["EXTRANET_USER"] == 'Y' ? 'true' : 'false';
    ?>
,
		initDestination : <?php 
    echo $arParams["DESTINATION_SHOW"] == "Y" ? "true" : "false";
    ?>
,
		items : {
			users : <?php 
    echo empty($arParams["DESTINATION"]['USERS']) ? '{}' : CUtil::PhpToJSObject($arParams["DESTINATION"]['USERS']);
    ?>
,
			groups : <?php 
    echo $arParams["DESTINATION"]["EXTRANET_USER"] == 'Y' || array_key_exists("DENY_TOALL", $arParams["DESTINATION"]) && $arParams["DESTINATION"]["DENY_TOALL"] ? '{}' : "{'UA' : {'id':'UA','name': '" . (!empty($arParams["DESTINATION"]['DEPARTMENT']) ? GetMessageJS("MPF_DESTINATION_3") : GetMessageJS("MPF_DESTINATION_4")) . "'}}";
    ?>
,
			sonetgroups : <?php 
    echo empty($arParams["DESTINATION"]['SONETGROUPS']) ? '{}' : CUtil::PhpToJSObject($arParams["DESTINATION"]['SONETGROUPS']);
    ?>
,
			department : <?php 
    echo empty($arParams["DESTINATION"]['DEPARTMENT']) ? '{}' : CUtil::PhpToJSObject($arParams["DESTINATION"]['DEPARTMENT']);
    ?>
,
			departmentRelation : <?php 
    echo empty($arParams["DESTINATION"]['DEPARTMENT_RELATION']) ? "false" : CUtil::PhpToJSObject($arParams["DESTINATION"]['DEPARTMENT_RELATION']);
    ?>
,
			contacts : <?php 
Exemple #9
0
                ?>
" <?php 
                ?>
class="<?php 
                echo $className;
                echo $isActive ? " " . $className . "-active" : "";
                ?>
" style="white-space:nowrap;"><?php 
                echo $arPresetFilter["NAME"];
                ?>
 <sup id="sonet_log_counter_preset"><?php 
                echo intval($arResult["LOG_COUNTER"]) > 0 ? $arResult["LOG_COUNTER"] : "";
                ?>
</sup><?php 
                ?>
</a><?php 
                $cnt++;
            }
        }
    }
    ?>
</span><?php 
    ?>
<span class="crm-feed-filter-btn" id="lenta-sort-button" onclick="return showLentaMenuBody(this);"><?php 
    echo $buttonName !== false ? $buttonName : "";
    echo $isFiltered ? $buttonName ? " (" . GetMessageJS("SONET_C30_T_FILTER_TITLE") . ")" : GetMessageJS("SONET_C30_T_FILTER_TITLE") : "";
    ?>
</span><?php 
    ?>
</span><?php 
}
Exemple #10
0
?>
',
	"MPL_IS_EXTRANET_SITE": '<?php 
echo CModule::IncludeModule("extranet") && CExtranet::IsExtranetSite() ? 'Y' : 'N';
?>
',	
	JQOUTE_AUTHOR_WRITES : '<?php 
echo GetMessageJS("JQOUTE_AUTHOR_WRITES");
?>
',
	FC_ERROR : '<?php 
echo GetMessageJS("B_B_PC_COM_ERROR");
?>
',
	MPL_SAFE_EDIT : '<?php 
echo GetMessageJS('MPL_SAFE_EDIT');
?>
'
	<?
		if (IsModuleInstalled("socialnetwork"))
		{
			?>
			, "MPL_WORKGROUPS_PATH" : '<?php 
echo CUtil::JSEscape(COption::GetOptionString("socialnetwork", "workgroups_page", SITE_DIR . "workgroups/", SITE_ID));
?>
'
			<?
		}
	?>
	});
</script>
Exemple #11
0
        if ($STAT_RIGHT < "W") {
            echo "disabled";
        }
        ?>
 name="cleanup" value="<?php 
        echo GetMessage("STAT_OPT_OPTIMIZE_BUTTON");
        ?>
" OnClick="javascript: OptimizeSubmit();"><input type="hidden" name="optimize" value="Y"><input type="hidden" name="lang" value="<?php 
        echo LANGUAGE_ID;
        ?>
">
				<SCRIPT LANGUAGE="JavaScript">
					function OptimizeSubmit()
					{
						if(confirm('<?php 
        echo GetMessageJS("STAT_OPT_OPTIMIZE_CONFIRMATION");
        ?>
'))	document.optimizeform.submit();
					}
				</SCRIPT>
			</td>
		</tr>
		<?php 
        $tabControl2->EndTab();
        ?>
		<?php 
        if (strlen($_REQUEST["back_url_settings"]) > 0) {
            ?>
			<input type="hidden" name="back_url_settings" value="<?php 
            echo htmlspecialcharsbx($_REQUEST["back_url_settings"]);
            ?>
Exemple #12
0
        ?>
',
				sonetLCounterType: '<?php 
        echo CUtil::JSEscape($arResult["COUNTER_TYPE"]);
        ?>
',
				sonetLIsB24: '<?php 
        echo SITE_TEMPLATE_ID == "bitrix24" ? "Y" : "N";
        ?>
',
				sonetRatingType : '<?php 
        echo CUtil::JSEscape($arParams["RATING_TYPE"]);
        ?>
',
				sonetLErrorSessid : '<?php 
        echo GetMessageJS("SONET_ERROR_SESSION");
        ?>
',
				sonetLIsCRM : '<?php 
        echo CUtil::JSEscape($arParams["IS_CRM"]);
        ?>
',
				sonetLCanDelete : '<?php 
        echo $arResult["CAN_DELETE"] ? 'Y' : 'N';
        ?>
',
				sonetLForumID : <?php 
        echo intval($arParams["FORUM_ID"]);
        ?>
,
				sonetLFirstPageLastTS : <?php 
Exemple #13
0
    ?>
');
				jsSelectUtils.addNewOption(activeCheckbox, '300', '<?php 
    echo GetMessageJS("PERFMON_OPT_INTERVAL_300_SEC");
    ?>
');
				jsSelectUtils.addNewOption(activeCheckbox, '600', '<?php 
    echo GetMessageJS("PERFMON_OPT_INTERVAL_600_SEC");
    ?>
');
				jsSelectUtils.addNewOption(activeCheckbox, '1800', '<?php 
    echo GetMessageJS("PERFMON_OPT_INTERVAL_1800_SEC");
    ?>
');
				jsSelectUtils.addNewOption(activeCheckbox, '3600', '<?php 
    echo GetMessageJS("PERFMON_OPT_INTERVAL_3600_SEC");
    ?>
');
			}
		}
	}
	BX.ready(function(){
		BX.bind(BX('slow_sql_log'), 'click', slow_sql_log_check);
		slow_sql_log_check();
	});
</script>
<?php 
    if (!empty($arNotes)) {
        echo BeginNote();
        foreach ($arNotes as $i => $str) {
            ?>
Exemple #14
0
				arTrBarCode[i].style.display = "table-row";
			}
		}
	}
}

function editBarCode()
{
	var obEditBarCode = BX('CAT_BARCODE_EDIT_Y');
	var obBarCode = BX('CAT_BARCODE');
	if (!bReadOnly && !!obEditBarCode && !!obBarCode)
	{
		if (obEditBarCode.checked)
		{
			if (confirm('<?php 
    echo GetMessageJS("CAT_BARCODE_EDIT_CONFIRM");
    ?>
'))
			{
				obBarCode.disabled = false;
			}
			else
			{
				obEditBarCode.checked = false;
				obBarCode.disabled = true;
			}
		}
		else
		{
			obBarCode.disabled = true;
		}
Exemple #15
0
								window.location = BX('popup-params-product').value;
							}
							else
							{
								var res = eval( '('+BX('popup-params-product').value+')' );
								fAddToBasketMoreProduct(res['type'], res['id']);
							}

							wind.close();
						}
					}
				}
			}),
			new BX.PopupWindowButton({
				text : '<?php 
echo GetMessageJS('NEWO_POPUP_CLOSE');
?>
',
				id : "popup_sku_cancel",
				events : {
					click : function() {
						wind.close();
					}
				}
			})
		]
	});

	function fAddToBasketMoreProductSku(arSKU, arProperties, type, message)
	{
		BX.message(message);
Exemple #16
0
	}

	filesForm = BX.findChild(BX('blog-comment-user-fields-UF_BLOG_COMMENT_DOC'), {'className': 'file-selectdialog' }, true, false);
	if(filesForm !== null && typeof filesForm != 'undefined')
	{
		BX.hide(BX.findChild(BX('blog-comment-user-fields-UF_BLOG_COMMENT_DOC'), {'className': 'file-selectdialog' }, true, false));
		BX.show(BX('blog-upload-file'));
	}

	onLightEditorShow(comment);

	document.form_comment.parentId.value = '';
	document.form_comment.edit_id.value = key;
	document.form_comment.act.value = 'edit';
	document.form_comment.post.value = '<?php 
echo GetMessageJS("B_B_MS_SAVE");
?>
';
	document.form_comment.action = document.form_comment.action + "#" + key;

	if(subject && subject.length > 0 && document.form_comment.subject)
	{
		subject = subject.replace(/\/</gi, '<');
		subject = subject.replace(/\/>/gi, '>');
		document.form_comment.subject.value = subject;
	}
	return false;
}

function waitResult(id)
{
Exemple #17
0
',
    TITLE_ERROR: '<?php 
    echo GetMessageJS('CT_BCS_CATALOG_TITLE_ERROR');
    ?>
',
    TITLE_BASKET_PROPS: '<?php 
    echo GetMessageJS('CT_BCS_CATALOG_TITLE_BASKET_PROPS');
    ?>
',
    TITLE_SUCCESSFUL: '<?php 
    echo GetMessageJS('ADD_TO_BASKET_OK');
    ?>
',
    BASKET_UNKNOWN_ERROR: '<?php 
    echo GetMessageJS('CT_BCS_CATALOG_BASKET_UNKNOWN_ERROR');
    ?>
',
    BTN_MESSAGE_SEND_PROPS: '<?php 
    echo GetMessageJS('CT_BCS_CATALOG_BTN_MESSAGE_SEND_PROPS');
    ?>
',
    BTN_MESSAGE_CLOSE: '<?php 
    echo GetMessageJS('CT_BCS_CATALOG_BTN_MESSAGE_CLOSE');
    ?>
'
});
</script>
<br/><br/>
    <?php 
    echo $arResult["NAV_STRING"];
}
Exemple #18
0
			complete:complete_func
		});
		easing.animate()
	}
};

var pulse_popup = {

	wrapper : BX('intranet-activity-container'),

	toggle_links_text:['<?php 
echo GetMessageJS('INTRANET_USTAT_RATING_COMMON_TAB');
?>
', '<?php 
echo GetMessageJS('INTRANET_USTAT_RATING_INVOLVE_TAB');
?>
'],

	toggle_links : [],

	is_create:false,

	popup_frame : null,

	toggle_cont:function(cont_block_list, btn)
	{
		var _this = this;

		if(_this.toggle_links.length == cont_block_list.length){
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("LEARNING_ADMIN_RESULTS")));
// list header
$lAdmin->AddHeaders(array(array("id" => "ID", "content" => "ID", "sort" => "id", "default" => true), array("id" => "ACTIVE", "content" => GetMessage('LEARNING_ADMIN_GROUPS_ACTIVE'), "sort" => "active", "default" => true), array("id" => "TITLE", "content" => GetMessage('LEARNING_ADMIN_GROUPS_TITLE'), "sort" => "title", "default" => true), array("id" => "CODE", "content" => GetMessage('LEARNING_ADMIN_GROUPS_CODE'), "sort" => "code", "default" => true), array("id" => "SORT", "content" => GetMessage('LEARNING_ADMIN_GROUPS_SORT'), "sort" => "sort", "default" => true), array("id" => "ACTIVE_FROM", "content" => GetMessage('LEARNING_ADMIN_GROUPS_ACTIVE_FROM'), "sort" => "active_from", "default" => true), array("id" => "ACTIVE_TO", "content" => GetMessage('LEARNING_ADMIN_GROUPS_ACTIVE_TO'), "sort" => "active_to", "default" => true), array("id" => "COURSE_LESSON_ID", "content" => GetMessage('LEARNING_ADMIN_GROUPS_COURSE_LESSON_ID'), "sort" => "course_lesson_id", "default" => true), array("id" => "COURSE_TITLE", "content" => GetMessage('LEARNING_ADMIN_GROUPS_COURSE_TITLE'), "sort" => "course_title", "default" => true)));
// building list
while ($arRes = $rsData->NavNext(true, "f_")) {
    $row =& $lAdmin->AddRow($f_ID, $arRes);
    $row->AddViewField("COURSE_TITLE", '<a href="learn_unilesson_admin.php?lang=' . LANG . '&PARENT_LESSON_ID=' . (int) $arRes['COURSE_LESSON_ID'] . '&LESSON_PATH=' . (int) $arRes['COURSE_LESSON_ID'] . '">' . $arRes['COURSE_TITLE'] . ' [' . $arRes['COURSE_LESSON_ID'] . ']' . '</a>');
    $row->AddField("ID", '<a href="/bitrix/admin/learn_group_edit.php?ID=' . $f_ID . '&lang=' . LANGUAGE_ID . '" title="' . GetMessage("MAIN_ADMIN_MENU_EDIT") . '">' . $f_ID . '</a>');
    $row->AddCheckField("ACTIVE");
    $row->AddInputField("TITLE", array("size" => "20"));
    $row->AddInputField("CODE", array("size" => "10"));
    $row->AddInputField("SORT", array("size" => "3"));
    $arActions = array();
    $arActions[] = array("ICON" => "edit", "DEFAULT" => "Y", "TEXT" => GetMessage("MAIN_ADMIN_MENU_EDIT"), "ACTION" => $lAdmin->ActionRedirect("learn_group_edit.php?lang=" . LANG . "&ID=" . $f_ID . GetFilterParams("filter_")));
    $arActions[] = array("SEPARATOR" => true);
    $arActions[] = array("ICON" => "delete", "TEXT" => GetMessage("MAIN_ADMIN_MENU_DELETE"), "ACTION" => "if(confirm('" . GetMessageJS('LEARNING_CONFIRM_DEL_MESSAGE') . "')) " . $lAdmin->ActionDoGroup($f_ID, "delete", ""));
    $row->AddActions($arActions);
}
// list footer
$lAdmin->AddFooter(array(array("title" => GetMessage("MAIN_ADMIN_LIST_SELECTED"), "value" => $rsData->SelectedRowsCount()), array("counter" => true, "title" => GetMessage("MAIN_ADMIN_LIST_CHECKED"), "value" => "0")));
$lAdmin->AddGroupActionTable(array("delete" => GetMessage("MAIN_ADMIN_LIST_DELETE")));
$adminChain->AddItem(array("TEXT" => GetMessage("LEARNING_ADMIN_RESULTS"), "LINK" => ""));
$lAdmin->AddAdminContextMenu(array(array('ICON' => 'btn_new', 'TEXT' => GetMessage('LEARNING_ADD'), 'LINK' => 'learn_group_edit.php?lang=' . LANG . GetFilterParams('filter_'), 'TITLE' => GetMessage('LEARNING_ADD_ALT'))));
$lAdmin->CheckListMode();
$APPLICATION->SetTitle(GetMessage("LEARNING_ADMIN_TITLE") . ($arGroup ? ": " . $arGroup["~TEST_NAME"] . ": " . $arGroup["~USER_NAME"] : ""));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
if (defined("LEARNING_ADMIN_ACCESS_DENIED")) {
    $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"), false);
}
?>
Exemple #20
0
		MPF_FILE: '<?php 
echo GetMessageJS("MPF_INSERT_FILE");
?>
',
		MPF_FILE_INSERT_IN_TEXT: '<?php 
echo GetMessageJS("MPF_FILE_INSERT_IN_TEXT");
?>
',
		MPF_FILE_IN_TEXT: '<?php 
echo GetMessageJS("MPF_FILE_IN_TEXT");
?>
',
		MPF_SMILE_SET : '<?php 
echo GetMessageJS("MPF_SMILE_SET");
?>
',
		MPF_TEMPLATE_FOLDER: '<?php 
echo CUtil::JSEscape($templateFolder);
?>
',
		MPF_NAME_TEMPLATE : '<?php 
echo $arParams['NAME_TEMPLATE'];
?>
',
		spoilerText: '<?php 
echo GetMessageJS("MPF_SPOILER");
?>
'
	});
</script>
Exemple #21
0
	BX.ready(function(){
		BX.message({
			'loading' : "<?php 
echo GetMessageJS('BFDND_FILE_LOADING');
?>
",
			'file_exists':"<?php 
echo GetMessageJS('BFDND_FILE_EXISTS');
?>
",
			'upload_error':"<?php 
echo GetMessageJS('BFDND_UPLOAD_ERROR');
?>
",
			'access_denied':"<p style='margin-top:0;'><?php 
echo GetMessageJS('BFDND_ACCESS_DENIED');
?>
</p>"
		});
		BX.addCustomEvent(<?php 
echo $controller;
?>
.parentNode, "BFileDLoadFormController", function(status) {
			MFIDD({
					uid : '<?php 
echo $uid;
?>
',
					appCode: '<?php 
echo $arParams['APP_CODE'];
?>
Exemple #22
0
echo GetMessageJS("MAIN_DUMP_EMPTY_PASS");
?>
';
	else if (!/^[\040-\176]*$/.test(key))
		strError = '<?php 
echo GetMessageJS('DUMP_ERR_NON_ASCII');
?>
';
	else if (l < 6)
		strError = '<?php 
echo GetMessageJS("MAIN_DUMP_ENC_PASS_DESC");
?>
';
	else if (key != BX('dump_encrypt_key_confirm').value)
		strError = '<?php 
echo GetMessageJS("DUMP_MAIN_ERR_PASS_CONFIRM");
?>
';

	if (strError)
	{
		BX('password_error').innerHTML = strError;
		BX('dump_encrypt_key').focus();
	}
	else
	{
		BX('password_error').innerHTML = '';
		dump_encrypt_key = key;
		BX.WindowManager.Get().Close();
		DoDump();
	}
Exemple #23
0
    function GetLayout()
    {
        $wizard = $this->GetWizard();
        $formName = htmlspecialcharsbx($wizard->GetFormName());
        CUtil::InitJSCore(array("ajax"));
        $adminScript = CAdminPage::ShowScript();
        $charset = LANG_CHARSET;
        $wizardName = htmlspecialcharsEx($wizard->GetWizardName());
        $nextButtonID = htmlspecialcharsbx($wizard->GetNextButtonID());
        $prevButtonID = htmlspecialcharsbx($wizard->GetPrevButtonID());
        $cancelButtonID = htmlspecialcharsbx($wizard->GetCancelButtonID());
        $finishButtonID = htmlspecialcharsbx($wizard->GetFinishButtonID());
        IncludeAJAX();
        $ajaxScripts = $GLOBALS["APPLICATION"]->GetHeadStrings();
        $ajaxScripts .= $GLOBALS["APPLICATION"]->GetHeadScripts();
        $obStep = $wizard->GetCurrentStep();
        $arErrors = $obStep->GetErrors();
        $strError = $strJsError = "";
        if (count($arErrors) > 0) {
            foreach ($arErrors as $arError) {
                $strError .= $arError[0] . "<br />";
                if ($arError[1] !== false) {
                    $strJsError .= ($strJsError != "" ? ", " : "") . "{'name':'" . CUtil::addslashes($wizard->GetRealName($arError[1])) . "', 'title':'" . CUtil::addslashes(htmlspecialcharsback($arError[0])) . "'}";
                }
            }
            if (strlen($strError) > 0) {
                $strError = '<div id="step_error">' . $strError . "</div>";
            }
            $strJsError = '
			<script type="text/javascript">
				ShowWarnings([' . $strJsError . ']);
			</script>';
        }
        $stepTitle = $obStep->GetTitle();
        $stepSubTitle = $obStep->GetSubTitle();
        $autoSubmit = "";
        if ($obStep->IsAutoSubmit()) {
            $autoSubmit = 'setTimeout("AutoSubmit();", 500);';
        }
        $alertText = GetMessageJS("MAIN_WIZARD_WANT_TO_CANCEL");
        $loadingText = GetMessageJS("MAIN_WIZARD_WAIT_WINDOW_TEXT");
        $package = $wizard->GetPackage();
        return <<<HTML
<!DOCTYPE html>
<html id="bx-admin-prefix">
<head>
\t<head>
\t\t<title>{$wizardName}</title>
\t\t<meta http-equiv="X-UA-Compatible" content="IE=edge">
\t\t<meta http-equiv="Content-Type" content="text/html; charset={$charset}">
\t\t{$ajaxScripts}
\t\t<style type="text/css">
\t\t\tbody
\t\t\t{
\t\t\t\tmargin:0;
\t\t\t\tpadding:0;
\t\t\t\tfont-size: 13px;
\t\t\t\tfont-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
\t\t\t}
\t\t\ttable {font-size:100%;}
\t\t\tform {margin:0; padding:0; }

\t\t\ta {
\t\t\t\tcolor: #2675D7;
\t\t\t\ttext-decoration: underline;
\t\t\t}


\t\t\t.step-content {
\t\t\t\tborder: solid 1px #DCE7ED;
\t\t\t\tbackground-color: #F5F9F9;
\t\t\t\theight: 347px;
\t\t\t\toverflow: auto;
\t\t\t}

\t\t\t.step-header {
\t\t\t\tborder-bottom: 1px solid #DCE7ED;
\t\t\t\tfont-size: 12px;
\t\t\t\tpadding: 6px 30px 9px 9px;
\t\t\t\tmargin-bottom: 12px;
\t\t\t}

\t\t\t.step-title { font-size: 16px; }
\t\t\t.step-subtitle { font-size: 13px; }

\t\t\t.step-body {
\t\t\t\tpadding: 0 10px;
\t\t\t}

\t\t\t.step-buttons
\t\t\t{
\t\t\t\tpadding-top: 12px;
\t\t\t\tpadding-left: 2px;
\t\t\t}

\t\t\t.step-buttons input {
\t\t\t\t-webkit-border-radius: 4px;
\t\t\t\tborder-radius: 4px;
\t\t\t\tborder:none;
\t\t\t\tborder-top:1px solid #fff;
\t\t\t\t-webkit-box-shadow: 0 0 1px rgba(0,0,0,.11), 0 1px 1px rgba(0,0,0,.3), inset 0 1px #fff, inset 0 0 1px rgba(255,255,255,.5);
\t\t\t\tbox-shadow: 0 0 1px rgba(0,0,0,.3), 0 1px 1px rgba(0,0,0,.3), inset 0 1px #fff, inset 0 0 1px rgba(255,255,255,.5);
\t\t\t\tbackground-image: -webkit-linear-gradient(bottom, #d7e3e7, #fff)!important;
\t\t\t\tbackground-image: -moz-linear-gradient(bottom, #d7e3e7, #fff)!important;
\t\t\t\tbackground-image: -ms-linear-gradient(bottom, #d7e3e7, #fff)!important;
\t\t\t\tbackground-image: -o-linear-gradient(bottom, #d7e3e7, #fff)!important;
\t\t\t\tbackground-image: linear-gradient(bottom, #d7e3e7, #fff)!important;
\t\t\t\tcolor:#3f4b54;
\t\t\t\tcursor:pointer;
\t\t\t\tdisplay:inline-block;
\t\t\t\tfont-family:"Helvetica Neue",Helvetica,Arial,sans-serif;
\t\t\t\tfont-weight:bold;
\t\t\t\tfont-size:13px;
\t\t\t\theight: 29px;
\t\t\t\ttext-shadow:0 1px rgba(255,255,255,0.7);
\t\t\t\ttext-decoration:none;
\t\t\t\tposition:relative;
\t\t\t\tvertical-align:middle;
\t\t\t\t-webkit-font-smoothing: antialiased;
\t\t\t\tpadding: 0 13px 2px;
\t\t\t\tmargin-right: 3px;
\t\t\t}

\t\t\t.step-buttons input:hover {
\t\t\t\ttext-decoration: none;
\t\t\t\tbackground:#f3f6f7!important;
\t\t\t\tbackground-image: -webkit-linear-gradient(top, #f8f8f9, #f2f6f8)!important;
\t\t\t\tbackground-image: -moz-linear-gradient(top, #f8f8f9, #f2f6f8)!important;
\t\t\t\tbackground-image: -ms-linear-gradient(top, #f8f8f9, #f2f6f8)!important;
\t\t\t\tbackground-image: -o-linear-gradient(top, #f8f8f9, #f2f6f8)!important;
\t\t\t\tbackground-image: linear-gradient(top, #f8f8f9, #f2f6f8)!important;
\t\t\t}

\t\t\t.step-buttons input:active {
\t\t\t\t-webkit-border-radius: 4px;
\t\t\t\tborder-radius: 4px;
\t\t\t\tbackground-color: #b7c4c9!important;
\t\t\t\t-webkit-box-shadow: inset 0 1px 1px 1px rgba(103,109,123,.78);
\t\t\t\tbox-shadow: inset 0 1px 1px 1px rgba(103,109,123,.78);
\t\t\t\tbackground-image: -webkit-linear-gradient(top, rgba(179,194,200,.96), rgba(202,215,219,.96))!important;
\t\t\t\tbackground-image: -moz-linear-gradient(top, rgba(179,194,200,.96), rgba(202,215,219,.96))!important;
\t\t\t\tbackground-image: -ms-linear-gradient(top, rgba(179,194,200,.96), rgba(202,215,219,.96))!important;
\t\t\t\tbackground-image: -o-linear-gradient(top, rgba(179,194,200,.96), rgba(202,215,219,.96))!important;
\t\t\t\tbackground-image: linear-gradient(top, rgba(179,194,200,.96), rgba(202,215,219,.96))!important;
\t\t\t\tborder-top:transparent;
\t\t\t\theight: 29px;
\t\t\t\toutline:none;
\t\t\t\tpadding:2px 13px 1px;
\t\t\t}

\t\t\t.bx-ie8 .step-buttons input,
\t\t\t.bx-ie9 .step-buttons input {
\t\t\t\tborder-radius:4px;
\t\t\t\tbackground:url("/bitrix/panel/main/images/bx-admin-sprite-small-1.png") repeat-x 0 -3554px;
\t\t\t\tbox-shadow:0 0 0 1px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.5), 0 1px 0 #FFFFFF inset, 0 0 1px rgba(255, 255, 255, 0.5) inset !important;
\t\t\t\tline-height:16px;
\t\t\t\theight:31px!important;
\t\t\t\tpadding-top:6px!important;
\t\t\t\tpadding-bottom:6px!important;
\t\t\t\tmargin-right: 3px !important;
\t\t\t}

\t\t\t.bx-ie8 .step-buttons input {border:1px solid #959c9d !important;}

\t\t\t#step_error
\t\t\t{
\t\t\t\tcolor:red;
\t\t\t\tpadding:0 0 12px 0;
\t\t\t}

\t\t\t#hidden-layer
\t\t\t{
\t\t\t\tbackground:#F8F9FC none repeat scroll 0%;
\t\t\t\theight:100%;
\t\t\t\tleft:0pt;
\t\t\t\topacity:0.01;
\t\t\t\tfilter:alpha(opacity=1);
\t\t\t\t-moz-opacity:0.01;
\t\t\t\tposition:absolute;
\t\t\t\ttop:0pt;
\t\t\t\twidth:100%;
\t\t\t\tz-index:10001;
\t\t\t}

\t\t\t/*Data table*/
\t\t\ttable.wizard-data-table { border:1px solid #B2C4DD; border-collapse:collapse;}
\t\t\ttable.wizard-data-table td { border:1px solid #B2C4DD; background-color:#FFFFFF; padding:3px 5px; }
\t\t\ttable.wizard-data-table thead td, table.wizard-data-table th {
\t\t\t\tbackground-color:#E4EDF5;
\t\t\t\tfont-weight:normal;
\t\t\t\tbackground-image:none;
\t\t\t\tborder:1px solid #B2C4DD;
\t\t\t\tpadding:4px;
\t\t\t}
\t\t\ttable.wizard-data-table tbody td { background-color:#FFF; background-image:none; }
\t\t\ttable.wizard-data-table tfoot td { background-color:#F2F5F9; padding:4px; }

\t\t\t.wizard-note-box { background:#FEFDEA; padding:7px; border:1px solid #D7D6BA; }
\t\t\t.wizard-required { color:red; }

\t\t\t.bx-session-message { display: none !important;}

\t\t</style>

\t\t{$adminScript}

\t\t<script type="text/javascript">

\t\t\ttop.BX.message({"ADMIN_WIZARD_EXIT_ALERT" : "{$alertText}"});

\t\t\tfunction OnLoad()
\t\t\t{
\t\t\t\tvar dialog = top.BX.WindowManager.Get();
\t\t\t\tif (dialog)
\t\t\t\t\tdialog.SetTitle('{$wizardName}');

\t\t\t\tvar form = document.forms["{$formName}"];

\t\t\t\tif (form)
\t\t\t\t\tform.onsubmit = OnFormSubmit;

\t\t\t\tvar cancelButton = document.forms["{$formName}"].elements["{$cancelButtonID}"];
\t\t\t\tvar nextButton = document.forms["{$formName}"].elements["{$nextButtonID}"];
\t\t\t\tvar prevButton = document.forms["{$formName}"].elements["{$prevButtonID}"];
\t\t\t\tvar finishButton = document.forms["{$formName}"].elements["{$finishButtonID}"];

\t\t\t\tif (cancelButton && !nextButton && !prevButton && !finishButton)
\t\t\t\t{
\t\t\t\t\ttop.WizardWindow.isClosed = true;
\t\t\t\t\tcancelButton.onclick = CloseWindow;
\t\t\t\t}
\t\t\t\telse if(cancelButton)
\t\t\t\t{
\t\t\t\t\tcancelButton.onclick = ConfirmCancel;
\t\t\t\t}

\t\t\t\t{$autoSubmit}
\t\t\t}

\t\t\tfunction OnFormSubmit()
\t\t\t{
\t\t\t\tvar div = document.body.appendChild(document.createElement("DIV"));
\t\t\t\tdiv.id = "hidden-layer";
\t\t\t}

\t\t\tfunction AutoSubmit()
\t\t\t{
\t\t\t\tvar nextButton = document.forms["{$formName}"].elements["{$nextButtonID}"];
\t\t\t\tif (nextButton)
\t\t\t\t{
\t\t\t\t\tvar wizard = top.WizardWindow;
\t\t\t\t\tif (wizard)
\t\t\t\t\t{
\t\t\t\t\t\twizard.messLoading = "{$loadingText}";
\t\t\t\t\t\twizard.ShowWaitWindow();
\t\t\t\t\t}

\t\t\t\t\tnextButton.click();
\t\t\t\t\tnextButton.disabled=true;
\t\t\t\t}
\t\t\t}

\t\t\tfunction ConfirmCancel()
\t\t\t{
\t\t\t\treturn (confirm("{$alertText}"));
\t\t\t}

\t\t\tfunction ShowWarnings(warnings)
\t\t\t{
\t\t\t\tvar form = document.forms["{$formName}"];
\t\t\t\tif(!form)
\t\t\t\t\treturn;

\t\t\t\tfor(var i in warnings)
\t\t\t\t{
\t\t\t\t\tvar e = form.elements[warnings[i]["name"]];
\t\t\t\t\tif(!e)
\t\t\t\t\t\tcontinue;

\t\t\t\t\tvar type = (e.type? e.type.toLowerCase():"");
\t\t\t\t\tvar bBefore = false;
\t\t\t\t\tif(e.length > 1 && type != "select-one" && type != "select-multiple")
\t\t\t\t\t{
\t\t\t\t\t\te = e[0];
\t\t\t\t\t\tbBefore = true;
\t\t\t\t\t}
\t\t\t\t\tif(type == "textarea" || type == "select-multiple")
\t\t\t\t\t\tbBefore = true;

\t\t\t\t\tvar td = e.parentNode;
\t\t\t\t\tvar img;
\t\t\t\t\tif(bBefore)
\t\t\t\t\t{
\t\t\t\t\t\timg = td.insertBefore(new Image(), e);
\t\t\t\t\t\ttd.insertBefore(document.createElement("BR"), e);
\t\t\t\t\t}
\t\t\t\t\telse
\t\t\t\t\t{
\t\t\t\t\t\timg = td.insertBefore(new Image(), e.nextSibling);
\t\t\t\t\t\timg.hspace = 2;
\t\t\t\t\t\timg.vspace = 2;
\t\t\t\t\t\timg.style.verticalAlign = "bottom";
\t\t\t\t\t}
\t\t\t\t\timg.src = "/bitrix/themes/"+phpVars.ADMIN_THEME_ID+"/images/icon_warn.gif";
\t\t\t\t\timg.title = warnings[i]["title"];
\t\t\t\t}
\t\t\t}

\t\t\tdocument.onkeydown = EnterKeyPress;

\t\t\tfunction EnterKeyPress(event)
\t\t\t{

\t\t\t\tevent = event || window.event;

\t\t\t\tif (!event.ctrlKey)
\t\t\t\t\treturn;

\t\t\t\tvar key = (event.keyCode ? event.keyCode : (event.which ? event.which : null) );

\t\t\t\tif (!key)
\t\t\t\t\treturn;

\t\t\t\tif (key == 13 || key == 39)
\t\t\t\t{
\t\t\t\t\tvar nextButton = document.forms["{$formName}"].elements["{$nextButtonID}"];
\t\t\t\t\tif (nextButton)
\t\t\t\t\t\tnextButton.click();
\t\t\t\t}
\t\t\t\telse if (key == 37)
\t\t\t\t{
\t\t\t\t\tvar prevButton = document.forms["{$formName}"].elements["{$prevButtonID}"];
\t\t\t\t\tif (prevButton)
\t\t\t\t\t\tprevButton.click();
\t\t\t\t}
\t\t\t}

\t\t\tfunction CloseWindow()
\t\t\t{
\t\t\t\tif (self.parent.window.WizardWindow)
\t\t\t\t\tself.parent.window.WizardWindow.Close();
\t\t\t}

\t\t</script>

\t</head>

\t<body onload="OnLoad();">

\t\t{#FORM_START#}
\t\t<div class="step-content">
\t\t\t<div class="step-header">
\t\t\t\t<div class="step-title">{$stepTitle}</div>
\t\t\t\t<div class="step-subtitle">{$stepSubTitle}</div>
\t\t\t</div>
\t\t\t<div class="step-body">
\t\t\t\t{$strError}
\t\t\t\t{#CONTENT#}
\t\t\t</div>

\t\t</div>
\t\t<div class="step-buttons">{#BUTTONS#}</div>
\t\t{#FORM_END#}
\t\t{$strJsError}

\t</body>
</html>
HTML;
    }
Exemple #24
0
	function CustomizeLHEForBlogComments()
	{
		?>
		<script>
		LHEButtons['BlogImage'] ={
			id : 'Image', // Standart image icon from editor-s CSS
			name : BX.message.Image,
			handler: function(pBut)
			{
				//pBut.pLEditor.OpenDialog({id : 'BlogImage', obj: false});
				blogShowFile();
			},
			OnBeforeCreate: function(pLEditor, pBut)
				{
					// Disable in non BBCode mode in html
					pBut.disableOnCodeView = !pLEditor.bBBCode || pLEditor.arConfig.bConvertContentFromBBCodes;
					return pBut;
				},
			parser: {
				name: 'blogimage',
				obj: {
					Parse: function(sName, sContent, pLEditor)
					{
						var i, cnt = arImages.length, j;
						if (!pLEditor.arBlogImages)
							pLEditor.arBlogImages = {};

						for(i = 0; i < cnt; i++)
						{
							if (!pLEditor.arBlogImages[arImagesId[i]])
							{
								pLEditor.arBlogImages[arImagesId[i]] = {
									src : arImages[i],
									pTitle: ''
								};
							}
						}

						sContent = sContent.replace(/\[IMG ID=((?:\s|\S)*?)(?:\s*?WIDTH=(\d+)\s*?HEIGHT=(\d+))?\]/ig, function(str, id, width, height)
						{
							if (!pLEditor.arBlogImages[id])
								return str;

							width = parseInt(width);
							height = parseInt(height);

							var
								strSize = "",
								imageSrc = pLEditor.arBlogImages[id].src,
								imageTitle = "";

							if (width && height && pLEditor.bBBParseImageSize)
								strSize = " width=\"" + width + "\" height=\"" + height + "\"";

							return '<img id="' + pLEditor.SetBxTag(false, {tag: "blogimage", params: {value : id}}) + '" src="' + imageSrc + '" title="' + imageTitle + '" ' + strSize +'>';
						});
						return sContent;
					},
					UnParse: function(bxTag, pNode, pLEditor)
					{
						if (bxTag.tag == 'blogimage')
						{
							var
								width = parseInt(pNode.arAttributes['width']),
								height = parseInt(pNode.arAttributes['height']),
								strSize = "";

							if (width && height  && pLEditor.bBBParseImageSize)
								strSize = ' WIDTH=' + width + ' HEIGHT=' + height;

							return '[IMG ID=' + bxTag.params.value + strSize + ']';
						}
						return "";
					}
				}
			}
		};


		window.LHEDailogs['BlogImage'] = function(pObj)
		{
			var str =
				'<span class="errortext" id="lhed_blog_image_error" style="display:none;"></span>' +
				'<table width="100%"><tr>' +
				'<td class="lhe-dialog-label lhe-label-imp"><?php 
echo GetMessageJS('BLOG_IMAGE');
?>
:</td>' +
				'<td class="lhe-dialog-param">' +
				'<'+'form id="' + pObj.pLEditor.id + 'img_upload_form" action="<?php 
echo CUtil::JSEscape(POST_FORM_ACTION_URI);
?>
" method="post" enctype="multipart/form-data" style="margin: 0!important; padding: 0!important;">' +
				'<?php 
echo freetrix_sessid_post();
?>
' +
				'<input type="file" size="30" name="BLOG_UPLOAD_FILE" id="bx_lhed_blog_img_input" />' +
				'<input type="hidden" value="Y" name="blog_upload_image"/>' +
				'<input type="hidden" name="post" value="Y">' +
				'</form>'+
				'</td>' +
				'</tr><tr id="' + pObj.pLEditor.id + 'lhed_blog_notice">' +
				'<td colSpan="2" style="padding: 0 0 20px 25px !important; font-size: 11px!important;"><?php 
echo GetMessageJS('BPC_IMAGE_SIZE_NOTICE', array('#SIZE#' => DoubleVal(COption::GetOptionString("blog", "image_max_size", 1000000) / 1000000)));
?>
</td>' +
			'</tr></table>';

			return {
				title: "<?php 
echo GetMessageJS('BLOG_P_IMAGE_UPLOAD');
?>
",
				innerHTML : str,
				width: 500,
				OnLoad: function()
				{
					pObj.pForm = false;
					pObj.pInput = false;

					pObj.pInput = BX('bx_lhed_blog_img_input');
					pObj.pForm = BX(pObj.pLEditor.id + 'img_upload_form');
					pObj.pLEditor.focus(pObj.pInput);

					window.obLHEDialog.adjustSizeEx();
				},
				OnSave: function()
				{
					if (pObj.pInput && pObj.pForm && pObj.pInput.value != "")
					{
						BX.showWait('bx_lhed_blog_img_input');
						BX('lhed_blog_image_error').style.display = 'none';
						BX('lhed_blog_image_error').innerHTML = '';
						BX.ajax.submit(pObj.pForm, function(){
							BX.closeWait();
							if (window.bxBlogImageId)
							{
								window.InsertBlogImage(window.bxBlogImageId, window.bxBlogImageIdWidth);
								window.obLHEDialog.Close();
								window.bxBlogImageId = false;
								window.bxBlogImageIdWidth = false;
							}
							else if(window.bxBlogImageError)
							{
								BX('lhed_blog_image_error').innerHTML = window.bxBlogImageError;
								BX('lhed_blog_image_error').style.display = 'block';
								window.obLHEDialog.adjustSizeEx();
							}
						});

						return false;
					}
				}
			};
		};

		window.InsertBlogImage = function(imageId, width)
		{
			pLEditor = window.oBlogComLHE;
			var strSize = '';

			if (!pLEditor.arBlogImages[imageId])
			{
				var imgId = window.arImagesId[imageId-1];

				var src  = window.arImages[imageId-1];
				imageId = imgId;

				if(width > 0)
				{
					if(pLEditor.arConfig.width && pLEditor.arConfig.width.indexOf('%') <= 0)
						widthC = parseInt(pLEditor.arConfig.width)*0.8;
					else
						widthC = 500;
					if(width > widthC)
						strSize = ' width="80%"';
				}

				pLEditor.arBlogImages[imageId] = {
					src : src,
					pTitle: ''
				};
			}

			if (pLEditor.sEditorMode == 'code' && pLEditor.bBBCode) // BB Codes
				pLEditor.WrapWith("", "", "[IMG ID=" + imageId + "]");
			else if(pLEditor.sEditorMode == 'html') // WYSIWYG
			{
				pLEditor.InsertHTML('<img id="' + pLEditor.SetBxTag(false, {tag: "blogImage", params: {value : imageId}}) + '" src="' + pLEditor.arBlogImages[imageId].src + '" title="' + (pLEditor.arBlogImages[imageId].pTitle.value || "") + '"' + strSize + '>');
				setTimeout('pLEditor.AutoResize();', 500);
			}
		}


		// Rename image button and change Icon
		LHEButtons['Image'].id = 'ImageLink';
		LHEButtons['Image'].src = '/freetrix/components/freetrix/blog/templates/.default/images/bbcode/font_image_upload.gif';
		LHEButtons['Image'].name = '<?php 
echo GetMessageJS("BLOG_P_IMAGE_LINK");
?>
';

		LHEButtons['BlogInputVideo'] = {
			id : 'BlogInputVideo',
			src : '/freetrix/components/freetrix/blog/templates/.default/images/bbcode/font_video.gif',
			name : '<?php 
echo GetMessageJS("FPF_VIDEO");
?>
',
			title : '<?php 
echo GetMessageJS("FPF_VIDEO");
?>
',
			handler: function(pBut)
			{
				pBut.pLEditor.OpenDialog({id : 'BlogVideo', obj: false});
			},
			parser: {
				name: 'blogvideo',
				obj: {
					Parse: function(sName, sContent, pLEditor)
					{
						sContent = sContent.replace(/\[VIDEO\s*?width=(\d+)\s*?height=(\d+)\s*\]((?:\s|\S)*?)\[\/VIDEO\]/ig, function(str, w, h, src)
						{
							var
								w = parseInt(w) || 400,
								h = parseInt(h) || 300,
								src = BX.util.trim(src);

							return '<img id="' + pLEditor.SetBxTag(false, {tag: "blogvideo", params: {value : src}}) + '" src="/freetrix/images/1.gif" class="bxed-video" width=' + w + ' height=' + h + ' title="' + BX.message.Video + ": " + src + '" />';
						});
						return sContent;
					},
					UnParse: function(bxTag, pNode, pLEditor)
					{
						if (bxTag.tag == 'blogvideo')
						{
							return "[VIDEO WIDTH=" + pNode.arAttributes["width"] + " HEIGHT=" + pNode.arAttributes["height"] + "]" + bxTag.params.value + "[/VIDEO]";
						}
						return "";
					}
				}
			}
		};

		window.LHEDailogs['BlogVideo'] = function(pObj)
		{
			var str = '<table width="100%"><tr>' +
				'<td class="lhe-dialog-label lhe-label-imp"><label for="' + pObj.pLEditor.id + 'lhed_blog_video_path"><b><?php 
echo GetMessageJS('BPC_VIDEO_P');
?>
:</b></label></td>' +
				'<td class="lhe-dialog-param">' +
				'<input id="' + pObj.pLEditor.id + 'lhed_blog_video_path" value="" size="30"/>' +
				'</td>' +
			'</tr><tr>' +
				'<td></td>' +
				'<td style="padding: 0!important; font-size: 11px!important;"><?php 
echo GetMessageJS('BPC_VIDEO_PATH_EXAMPLE');
?>
</td>' +
			'</tr><tr>' +
				'<td class="lhe-dialog-label lhe-label-imp"><label for="' + pObj.pLEditor.id + 'lhed_blog_video_width">' + BX.message.ImageSizing + ':</label></td>' +
				'<td class="lhe-dialog-param">' +
					'<input id="' + pObj.pLEditor.id + 'lhed_blog_video_width" value="" size="4"/>' +
					' x ' +
					'<input id="' + pObj.pLEditor.id + 'lhed_blog_video_height" value="" size="4" />' +
				'</td>' +
			'</tr></table>';

			return {
				title: "<?php 
echo GetMessageJS('FPF_VIDEO');
?>
",
				innerHTML : str,
				width: 480,
				OnLoad: function()
				{
					pObj.pPath = BX(pObj.pLEditor.id + "lhed_blog_video_path");
					pObj.pWidth = BX(pObj.pLEditor.id + "lhed_blog_video_width");
					pObj.pHeight = BX(pObj.pLEditor.id + "lhed_blog_video_height");

					pObj.pLEditor.focus(pObj.pPath);
				},
				OnSave: function()
				{
					pLEditor = window.oBlogComLHE;

					var
						src = BX.util.trim(pObj.pPath.value),
						w = parseInt(pObj.pWidth.value) || 400,
						h = parseInt(pObj.pHeight.value) || 300;

					if (src == "")
						return;

					if (pLEditor.sEditorMode == 'code' && pLEditor.bBBCode) // BB Codes
					{
						pLEditor.WrapWith("", "", "[VIDEO WIDTH=" + w + " HEIGHT=" + h + "]" + src + "[/VIDEO]");
					}
					else if(pLEditor.sEditorMode == 'html') // WYSIWYG
					{
						pLEditor.InsertHTML('<img id="' + pLEditor.SetBxTag(false, {tag: "blogvideo", params: {value : src}}) + '" src="/freetrix/images/1.gif" class="bxed-video" width=' + w + ' height=' + h + ' title="' + BX.message.Video + ": " + src + '" />');
						setTimeout('pLEditor.AutoResize();', 500);
					}
				}
			};
		};


		LHEButtons['CreateLinkNC'] = {
			id : 'CreateLinkNC',
			src : '/freetrix/components/freetrix/blog/templates/.default/images/bbcode/font_link.gif',
			name : '<?php 
echo GetMessageJS("BPC_LINK");
?>
',
			title : '<?php 
echo GetMessageJS("BPC_LINK");
?>
',
			handler: function(pBut)
			{
				pBut.pLEditor.OpenDialog({id : 'CreateLinkNCDialog', obj: false});
			}
		};

		window.LHEDailogs['CreateLinkNCDialog'] = function(pObj)
		{
			var str = "";
			if(document.getElementById('nocommentreason'))
				str = document.getElementById('nocommentreason').innerHTML;

			return {
				title: "<?php 
echo GetMessageJS('BPC_LINK');
?>
",
				innerHTML : str,
				width: 480,
				OnLoad: function() {},
				OnSave: function() {}
			};
		};

		// Submit form by ctrl+enter
		window.blogCommentCtrlEnterHandler = function(e)
		{
			submitComment();
		};
		</script>
		<?
	}
    }
    $arResult["GROUPS_FORUMS"] = __array_stretch($arGroups);
}
?>
<script type="text/javascript">
//<![CDATA[
	if (phpVars == null || typeof(phpVars) != "object")
	{
		var phpVars = {
			'ADMIN_THEME_ID': '.default',
			'titlePrefix': '<?php 
echo CUtil::JSEscape(COption::GetOptionString("main", "site_name", $_SERVER["SERVER_NAME"]));
?>
 - '};
	}
	phpVars['isAuthorized'] = '<?php 
echo $GLOBALS['USER']->IsAuthorized() ? "Y" : "N";
?>
';
	if (typeof oText != "object")
	{
		var oText = {};
	}
	oText['wait_window'] = '<?php 
echo GetMessageJS("F_LOAD");
?>
';
//]]>
window.oForumForm = {};
</script>
Exemple #26
0
oErrors['max_len'] = "<?php 
echo GetMessageJS("JERROR_MAX_LEN");
?>
";
if (typeof oText != "object")
	var oText = {};
oText['author'] = " <?php 
echo GetMessageJS("JQOUTE_AUTHOR_WRITES");
?>
:\n";
oText['vote_drop_answer_confirm'] = "<?php 
echo GetMessageJS("F_VOTE_DROP_ANSWER_CONFIRM");
?>
";
oText['vote_drop_question_confirm'] = "<?php 
echo GetMessageJS("F_VOTE_DROP_QUESTION_CONFIRM");
?>
";

function __ctrl_enter_<?php 
echo $arParams["FORM_ID"];
?>
(e, bNeedSubmit)
{
	if (!ValidateForm(document.forms['<?php 
echo $arParams["FORM_ID"];
?>
'], '<?php 
echo $arParams["AJAX_TYPE"];
?>
',  '<?php 
Exemple #27
0
?>
',
		'<?php 
echo CUtil::JSEscape($arResult['VOTE_AVAILABLE']);
?>
',
		'<?php 
echo $USER->GetId();
?>
',
		{'PLUS' : '<?php 
echo GetMessageJS("RATING_COMPONENT_PLUS");
?>
', 'MINUS' : '<?php 
echo GetMessageJS("RATING_COMPONENT_MINUS");
?>
', 'CANCEL' : '<?php 
echo GetMessageJS("RATING_COMPONENT_CANCEL");
?>
'},
		'standart',
		'<?php 
echo CUtil::JSEscape($arResult['PATH_TO_USER_PROFILE']);
?>
'
	);
<?if ($arResult['AJAX_MODE'] == 'Y'):?>
	});
<?endif;?>
});
</script>
		BX.defer(window.oLHE.SetFocus, window.oLHE)();
	}
	return false;
}
<?php 
if ($GLOBALS["USER"]->IsAuthorized() && $bShowedHeader) {
    ?>
function ShowFirstPost(oA)
{
	var div = oA.parentNode.parentNode.parentNode.nextSibling.firstChild;
	div.style.display = (div.style.display == 'none' ? '' : 'none');
	oA.innerHTML = (div.style.display == 'none' ? '<?php 
    echo GetMessageJS("F_COLLAPSE");
    ?>
' : '<?php 
    echo GetMessageJS("F_SHOW");
    ?>
');
	BX.ajax.get(
			'/bitrix/components/bitrix/forum/templates/.default/user_settings.php',
			{'save': 'first_post', 'value' :(div.style.display == 'none' ? 'hide' : 'show'), 'sessid': '<?php 
    echo bitrix_sessid();
    ?>
'}
	);
	return false;
}
<?php 
}
?>
</script>
Exemple #29
0
        ?>
'
							},
							onsuccess: function(json)
							{
								BX.closeWait();
								if (json.error)
								{
									if(this.popupWindow)
									{
										this.popupWindow.close();
									}

									var DeleteErrorPopup = BX.PopupWindowManager.create('delete_error'+number, button, {
										content: "<p><?php 
        echo GetMessageJS("INTR_ISP_DELETE_ERROR");
        ?>
</p>",
										offsetLeft:-10,
										offsetTop:7,
										autoHide:true
									});

									DeleteErrorPopup.show();
								}
								else
								{
									window.location.reload();
								}
							}
						});
Exemple #30
0
			context.createButtons(
				{
					back:
					{
						type: 'right_text',
						style: 'custom',
						position: 'left',
						name: '<?php 
echo GetMessageJS('M_CRM_COMPANY_EDIT_CANCEL_BTN');
?>
',
						callback: context.createCloseHandler()
					},
					save:
					{
						type: 'right_text',
						style: 'custom',
						position: 'right',
						name: '<?php 
echo GetMessageJS("M_CRM_COMPANY_EDIT_{$mode}_BTN");
?>
',
						callback: editor.createSaveHandler()
					}
				}
			);
		}
	);
</script>