public static function GetPublicEditHTML($arProperty, $value, $strHTMLControlName) { if (!CModule::IncludeModule("fileman")) { return GetMessage("IBLOCK_PROP_HTML_NOFILEMAN_ERROR"); } if (!is_array($value["VALUE"])) { $value = CIBlockPropertyHTML::ConvertFromDB($arProperty, $value); } $settings = CIBlockPropertyHTML::PrepareSettings($arProperty); $id = preg_replace("/[^a-z0-9]/i", '', $strHTMLControlName['VALUE']); ob_start(); echo '<input type="hidden" name="' . $strHTMLControlName["VALUE"] . '[TYPE]" value="html">'; $LHE = new CLightHTMLEditor(); $LHE->Show(array('id' => $id, 'width' => '100%', 'height' => $settings['height'] . 'px', 'inputName' => $strHTMLControlName["VALUE"] . '[TEXT]', 'content' => $value["VALUE"]['TEXT'], 'bUseFileDialogs' => false, 'bFloatingToolbar' => false, 'bArisingToolbar' => false, 'bRecreate' => true, 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'RemoveFormat', 'CreateLink', 'DeleteLink', 'Image', 'Video', 'BackColor', 'ForeColor', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull', 'InsertOrderedList', 'InsertUnorderedList', 'Outdent', 'Indent', 'StyleList', 'HeaderList', 'FontList', 'FontSizeList'))); $s = ob_get_contents(); ob_end_clean(); return $s; }
private static function DialogEditEvent($Params) { global $APPLICATION; $id = $Params['id']; $bWideDate = strpos(FORMAT_DATETIME, 'MMMM') !== false; $arTabs = array(array('name' => GetMessage('EC_EDEV_EVENT'), 'title' => GetMessage('EC_EDEV_EVENT_TITLE'), 'id' => $id . "ed-tab-0", 'active' => true), array('name' => GetMessage('EC_T_DESC'), 'title' => GetMessage('EC_T_DESC_TITLE'), 'id' => $id . "ed-tab-1"), array('name' => GetMessage('EC_EDEV_GUESTS'), 'title' => GetMessage('EC_EDEV_GUESTS_TITLE'), 'id' => $id . "ed-tab-2", "show" => !!$Params['bSocNet']), array('name' => GetMessage('EC_EDEV_ADD_TAB'), 'title' => GetMessage('EC_EDEV_ADD_TAB_TITLE'), 'id' => $id . "ed-tab-3")); ?> <div id="bxec_edit_ed_<?php echo $id; ?> " class="bxec-popup"> <div style="width: 520px; height: 1px;"></div> <div class="bxec-d-tabs" id="<?php echo $id; ?> _edit_tabs"> <?php foreach ($arTabs as $tab) { ?> <div class="bxec-d-tab <?php if ($tab['active']) { echo 'bxec-d-tab-act'; } ?> " title="<?php echo $tab['title']; ?> " 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; ?> _edit_ed_d_tabcont"> <?php /* ####### TAB 0 : MAIN ####### */ ?> <div id="<?php echo $id; ?> ed-tab-0-cont" class="bxec-d-cont-div<?php echo $Params['bAMPM'] ? ' bxec-d-cont-div-ampm' : ''; echo $bWideDate ? ' bxec-d-cont-div-wide-date' : ''; ?> "> <div class="bxc-meeting-edit-note"><?php echo GetMessage('EC_EDIT_MEETING_NOTE'); ?> </div> <div class="bxec-popup-row bxec-popup-row-from-to"> <div style="margin-top: 16px;"> <span class="bxec-field-val-2 bxec-field-title-inner bxec-field-calendar"> <label class="bxec-from-to-lbl bxec-field-lbl-imp" for="<?php echo $id; ?> edev-from"><?php echo GetMessage('EC_EDEV_DATE_FROM'); ?> </label> <input id="<?php echo $id; ?> edev-from" type="text"/></span> <span class="bxec-field-val-2 bxec-field-title-inner bxec-field-time"><?php CClock::Show(array('inputId' => $id . 'edev_from_time', 'inputTitle' => GetMessage('EC_EDEV_TIME_FROM'))); ?> <i class="bxec-time-icon"></i></span> — <span class="bxec-field-val-2 bxec-field-title-inner bxec-field-calendar"> <label class="bxec-from-to-lbl" for="<?php echo $id; ?> edev-from"><?php echo GetMessage('EC_EDEV_DATE_TO'); ?> </label> <input id="<?php echo $id; ?> edev-to" type="text"/></span> <span class="bxec-field-val-2 bxec-field-title-inner bxec-field-time"><?php CClock::Show(array('inputId' => $id . 'edev_to_time', 'inputTitle' => GetMessage('EC_EDEV_TIME_TO'))); ?> <i class="bxec-time-icon"></i></span> <div class="bxec-cal-icon-bogus"><?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> <div class="bxec-popup-row-checkbox bxec-popup-row-full-day"> <input type="checkbox" id="<?php echo $id; ?> _full_day" value="Y" /> <label style="display: inline-block;" for="<?php echo $id; ?> _full_day"><?php echo GetMessage('EC_FULL_DAY'); ?> </label> </div> </div> <div class="bxec-popup-row"> <div class="bxec-field-label"><label class="bxec-field-lbl-imp" for="<?php echo $id; ?> _edit_ed_name"><?php echo GetMessage('EC_T_NAME'); ?> </label></div> <span class="bxec-field-val-2 bxec-field-title-inner" style="width: <?php echo $Params['bAMPM'] ? 495 : 440; ?> px;"><input type="text" id="<?php echo $id; ?> _edit_ed_name" /></span> </div> <div class="bxec-popup-row" id="<?php echo $id; ?> _location_cnt"> <span class="bxec-field-label-edev"><label for="<?php echo $id; ?> _planner_location1"><?php echo GetMessage('EC_LOCATION'); ?> :</label></span> <span class="bxec-field-val-2 bxecpl-loc-cont" > <input size="37" style="width: 246px;" id="<?php echo $id; ?> _planner_location1" type="text" title="<?php echo GetMessage('EC_LOCATION_TITLE'); ?> " value="<?php echo GetMessage('EC_PL_SEL_MEET_ROOM'); ?> " class="ec-label" /> </span> </div> <?php if ($Params['bIntranet']) { ?> <div class="bxec-popup-row bxec-ed-meeting-vis"> <span class="bxec-field-label-edev"><label for="<?php echo $id; ?> _bxec_accessibility"><?php echo GetMessage('EC_ACCESSIBILITY'); ?> :</label></span> <span class="bxec-field-val-2" > <select id="<?php echo $id; ?> _bxec_accessibility" style="width: 210px;"> <option value="busy" title="<?php echo GetMessage('EC_ACCESSIBILITY_B'); ?> "><?php echo GetMessage('EC_ACCESSIBILITY_B'); ?> </option> <option value="quest" title="<?php echo GetMessage('EC_ACCESSIBILITY_Q'); ?> "><?php echo GetMessage('EC_ACCESSIBILITY_Q'); ?> </option> <option value="free" title="<?php echo GetMessage('EC_ACCESSIBILITY_F'); ?> "><?php echo GetMessage('EC_ACCESSIBILITY_F'); ?> </option> <option value="absent" title="<?php echo GetMessage('EC_ACCESSIBILITY_A'); ?> (<?php echo GetMessage('EC_ACC_EX'); ?> )"><?php echo GetMessage('EC_ACCESSIBILITY_A'); ?> (<?php echo GetMessage('EC_ACC_EX'); ?> )</option> </select> </span> </div> <?php } ?> <div class="bxec-popup-row" id="<?php echo $id; ?> _sect_cnt"> <span class="bxec-field-label-edev"><label for="<?php echo $id; ?> _edit_ed_calend_sel"><?php echo GetMessage('EC_T_CALENDAR'); ?> :</label></span> <span class="bxec-field-val-2" > <select id="<?php echo $id; ?> _edit_ed_calend_sel"></select><span id="<?php echo $id; ?> _edit_sect_sel_warn" class="bxec-warn" style="display: none;"><?php echo GetMessage('EC_T_CALEN_DIS_WARNING'); ?> </span> </span> </div> <!-- Color --> <div class="bxec-popup-row"> <span class="bxec-field-label-edev" style="vertical-align:top;"><label for="<?php echo $id; ?> -event-color-inp"><?php echo GetMessage('EC_T_COLOR'); ?> :</label></span> <span class="bxec-field-val-2" style="width: 300px;"> <?php CCalendarSceleton::DisplayColorSelector($id, 'event', $Params['colors']); ?> </span> </div> </div> <?php /* ####### END TAB 0 ####### */ ?> <?php /* ####### TAB 1 : DESCRIPTION - LHE ####### */ ?> <div id="<?php echo $id; ?> ed-tab-1-cont" class="bxec-d-cont-div bxec-lhe"> <?php CModule::IncludeModule("fileman"); $LHE = new CLightHTMLEditor(); $LHE->Show(array('id' => 'LHEEvDesc', 'width' => '500', 'height' => '285', 'inputId' => $id . '_edit_ed_desc', 'content' => '', 'bUseFileDialogs' => false, 'bFloatingToolbar' => false, 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'RemoveFormat', 'CreateLink', 'DeleteLink', 'Image', 'BackColor', 'ForeColor', 'InsertOrderedList', 'InsertUnorderedList', 'FontSizeList', 'Source'), 'BBCode' => true, 'jsObjName' => 'pLHEEvDesc', 'bInitByJS' => true, 'bSaveOnBlur' => false)); ?> </div> <?php /* ####### END TAB 1 ####### */ ?> <?php /* ####### TAB 2 : GUESTS ####### */ if ($Params['bSocNet']) { ?> <div id="<?php echo $id; ?> ed-tab-2-cont" class="bxec-d-cont-div"> <div class="bxc-att-cont-cont"> <a id="<?php echo $id; ?> _planner_link" href="javascript:void(0);" title="<?php echo GetMessage('EC_PLANNER_TITLE'); ?> " class="bxex-planner-link"><i></i><?php echo GetMessage('EC_PLANNER2'); ?> </a> <?php $isExtranetGroup = false; if ($Params["bSocNet"] && $Params["type"] == "group" && intval($Params["ownerId"]) > 0 && CModule::IncludeModule("extranet")) { $isExtranetGroup = CExtranet::IsExtranetSocNetGroup($Params["ownerId"]); } $APPLICATION->IncludeComponent("bitrix:intranet.user.selector.new", "", array("MULTIPLE" => "Y", "NAME" => "BXCalUserSelect", "VALUE" => array(), "POPUP" => "Y", "ON_CHANGE" => "bxcUserSelectorOnchange", "NAME_TEMPLATE" => CCalendar::GetUserNameTemplate(), "SITE_ID" => SITE_ID, "SHOW_EXTRANET_USERS" => $isExtranetGroup ? "FROM_EXACT_GROUP" : "NONE", "EX_GROUP" => $isExtranetGroup ? $Params["ownerId"] : ""), null, array("HIDE_ICONS" => "Y")); ?> <span class="bxc-add-guest-link" id="<?php echo $id; ?> _user_control_link"></span> <div id="<?php echo $id; ?> _attendees_cont" class="bxc-attendees-cont"> <div class="bxc-owner-cont"> <div class="bxc-owner-cont"> <span class="bxc-owner-title"><span><?php echo GetMessage('EC_EDEV_HOST'); ?> :</span></span> <span class="bxc-owner-value"><a id="<?php echo $id; ?> edit_host_link" href="javascript:void(0);"></a></span> </div> </div> <div class="bxc-no-att-notice"> - <?php echo GetMessage('EC_NO_ATTENDEES'); ?> - </div> <div class="bxc-att-title"> <span><?php echo GetMessage('EC_EDEV_GUESTS'); ?> :</span> <div id="<?php echo $id; ?> _att_summary"></div> </div> <div class="bxc-att-cont" id="<?php echo $id; ?> _attendees_list" style="height: 200px;"></div> </div> </div> <div id="<?php echo $id; ?> _add_meeting_params"> <div class="bxec-add-meet-text"><a id="<?php echo $id; ?> _add_meet_text" href="javascript:void(0);"><?php echo GetMessage('EC_ADD_METTING_TEXT'); ?> </a></div> <div class="bxec-meet-text" id="<?php echo $id; ?> _meet_text_cont"> <div class="bxec-mt-d"><?php echo GetMessage('EC_METTING_TEXT'); ?> (<a id="<?php echo $id; ?> _hide_meet_text" href="javascript:void(0);" title="<?php echo GetMessage('EC_HIDE_METTING_TEXT_TITLE'); ?> "><?php echo GetMessage('EC_HIDE'); ?> </a>): </div><br /> <textarea class="bxec-mt-t" cols="63" id="<?php echo $id; ?> _meeting_text" rows="3"></textarea> </div> <div class="bxec-popup-row bxec-popup-row-checkbox"> <input type="checkbox" id="<?php echo $id; ?> _ed_open_meeting" value="Y" /> <label style="display: inline-block;" for="<?php echo $id; ?> _ed_open_meeting"><?php echo GetMessage('EC_OPEN_MEETING'); ?> </label> </div> <div class="bxec-popup-row bxec-popup-row-checkbox"> <input type="checkbox" id="<?php echo $id; ?> _ed_notify_status" value="Y"/> <label for="<?php echo $id; ?> _ed_notify_status"><?php echo GetMessage('EC_NOTIFY_STATUS'); ?> </label> </div> <div class="bxec-popup-row bxec-popup-row-checkbox" id="<?php echo $id; ?> _ed_reivite_cont"> <input type="checkbox" id="<?php echo $id; ?> _ed_reivite" value="Y"/> <label for="<?php echo $id; ?> _ed_reivite"><?php echo GetMessage('EC_REINVITE'); ?> </label> </div> </div> </div> <?php /* ####### END TAB 2 ####### */ ?> <?php } /* bSocNet */ ?> <?php /* ####### TAB 3 : ADDITIONAL INFO ####### */ ?> <div id="<?php echo $id; ?> ed-tab-3-cont" class="bxec-d-cont-div"> <?php if ($Params['bSocNet']) { ?> <!-- Remind cont --> <div class="bxec-popup-row bxec-ed-meeting-vis" id="<?php echo $id; ?> _remind_cnt"> <div class="bxec-popup-row-title"><?php echo GetMessage('EC_EDEV_REMINDER'); ?> </div> <div> <input id="<?php echo $id; ?> _bxec_reminder" type="checkbox" value="Y"> <label for="<?php echo $id; ?> _bxec_reminder"><?php echo GetMessage('EC_EDEV_REMIND_EVENT'); ?> </label> <span id="<?php echo $id; ?> _bxec_rem_cont" style="display: none;"> <?php echo GetMessage('EC_EDEV_FOR'); ?> <input id="<?php echo $id; ?> _bxec_rem_count" type="text" style="width: 30px" size="2"> <select id="<?php echo $id; ?> _bxec_rem_type"> <option value="min" selected="true"><?php echo GetMessage('EC_EDEV_REM_MIN'); ?> </option> <option value="hour"><?php echo GetMessage('EC_EDEV_REM_HOUR'); ?> </option> <option value="day"><?php echo GetMessage('EC_EDEV_REM_DAY'); ?> </option> </select> <?php echo GetMessage('EC_JS_DE_VORHER'); ?> </span> </div> </div> <?php } ?> <table class="bxec-reminder-table" style="width: 100%;"> <tr class="bxec-edev-ad-title"><td colSpan="2"><?php echo GetMessage('EC_T_REPEATING'); ?> </td></tr> <?php /* Repeat row start*/ ?> <tr id="<?php echo $id; ?> _edit_ed_rep_tr" class="bxec-edit-ed-rep"><td class="bxec-edit-ed-repeat"><?php echo GetMessage('EC_T_REPEAT'); ?> :</td><td class="bxec-ed-lp"> <select id="<?php echo $id; ?> _edit_ed_rep_sel"> <option value="NONE"><?php echo GetMessage('EC_T_REPEAT_NONE'); ?> </option> <option value="DAILY"><?php echo GetMessage('EC_T_REPEAT_DAILY'); ?> </option> <option value="WEEKLY"><?php echo GetMessage('EC_T_REPEAT_WEEKLY'); ?> </option> <option value="MONTHLY"><?php echo GetMessage('EC_T_REPEAT_MONTHLY'); ?> </option> <option value="YEARLY"><?php echo GetMessage('EC_T_REPEAT_YEARLY'); ?> </option> </select> <div id="<?php echo $id; ?> _edit_ed_repeat_sect" style="display: none; width: 310px;"> <span id="<?php echo $id; ?> _edit_ed_rep_phrase1"></span> <select id="<?php echo $id; ?> _edit_ed_rep_count"> <?php for ($i = 1; $i < 36; $i++) { ?> <option value="<?php echo $i; ?> "><?php echo $i; ?> </option> <?php } ?> </select> <span id="<?php echo $id; ?> _edit_ed_rep_phrase2"></span> <br> <div id="<?php echo $id; ?> _edit_ed_rep_week_days" class="bxec-rep-week-days"> <?php for ($i = 0; $i < 7; $i++) { $id_ = $id . 'bxec_week_day_' . $i; ?> <input id="<?php echo $id_; ?> " type="checkbox" value="<?php echo $Params['week_days'][$i][2]; ?> "> <label for="<?php echo $id_; ?> " title="<?php echo $Params['week_days'][$i][0]; ?> "><?php echo $Params['week_days'][$i][1]; ?> </label> <?php } ?> </div> <div> <label for="<?php echo $id_; ?> edit-ev-rep-diap-to" style="display: inline-block; margin: 3px 0 0 0; vertical-align:top;"><?php echo GetMessage('EC_T_DIALOG_STOP_REPEAT'); ?> :</label> <span class="bxec-rep2-inner"><input id="<?php echo $id; ?> edit-ev-rep-diap-to" type="text"/></span> </div> </td></tr> <?php /* Repeat row end*/ ?> <tr class="bxec-edev-ad-title"><td colSpan="2"><?php echo GetMessage('EC_EDDIV_SPECIAL_NOTES'); ?> </td></tr> <tr> <td colspan="2"> <?php echo GetMessage('EC_IMPORTANCE_TITLE'); ?> : <select id="<?php echo $id; ?> _bxec_importance"> <option value="high" style="font-weight: bold;"><?php echo GetMessage('EC_IMPORTANCE_H'); ?> </option> <option value="normal" selected="true"><?php echo GetMessage('EC_IMPORTANCE_N'); ?> </option> <option value="low" style="color: #909090;"><?php echo GetMessage('EC_IMPORTANCE_L'); ?> </option> </select> </td> </tr> <?php if ($Params['type'] == 'user') { ?> <tr> <td colspan="2"> <input id="<?php echo $id; ?> _bxec_private" type="checkbox" value="Y" title="<?php echo GetMessage('EC_PRIVATE_NOTICE'); ?> "> <label for="<?php echo $id; ?> _bxec_private" title="<?php echo GetMessage('EC_PRIVATE_NOTICE'); ?> "><?php echo GetMessage('EC_PRIVATE_EVENT'); ?> </label> <div style="font-size: 90%; color: #5D5D5D;"><?php echo GetMessage('EC_PRIVATE_NOTICE'); ?> </div> </td> </tr> <?php } ?> </table> <div id="<?php echo $id; ?> bxec_uf_group" class="bxec-popup-row" style="display: none"> <div class="bxec-popup-row-title"><?php echo GetMessage('EC_EDEV_ADD_TAB'); ?> </div> <div id="<?php echo $id; ?> bxec_uf_cont"></div> </div> </div> <?php /* ####### END TAB 3 ####### */ ?> </div> </div> <?php }
> </td> </tr> <tr id="tr_FILTER_HINT" class="adm-detail-valign-top" style="display: <?php echo $arProperty['SECTION_PROPERTY'] != 'N' ? 'table-row' : 'none'; ?> "> <td width="40%"><?php echo GetMessage("BT_ADM_IEP_PROP_FILTER_HINT"); ?> </td> <td> <?php CModule::IncludeModule("fileman"); $LHE = new CLightHTMLEditor(); $LHE->Show(array('inputName' => 'PROPERTY_FILTER_HINT', 'content' => $arProperty['FILTER_HINT'], 'height' => 200, 'width' => '100%', 'bResizable' => false, 'bUseFileDialogs' => false, 'bFloatingToolbar' => false, 'bArisingToolbar' => true, 'bAutoResize' => true, 'bSaveOnBlur' => true, 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'Strike', 'CreateLink', 'DeleteLink', 'Source', 'BackColor', 'ForeColor'))); ?> </td> </tr> <?php } elseif (isset($arPropertyFields["SET"]["SMART_FILTER"])) { ?> <input type="hidden" id="PROPERTY_SMART_FILTER_Y" name="PROPERTY_SMART_FILTER" value="<?php echo htmlspecialcharsbx($arPropertyFields["SET"]["FILTRABLE"]); ?> "> <?php } ?> <?php }
related to http://jabber.bx/view.php?id=19527 // TODO: needs good synchronization first $info = CTimeMan::GetRuntimeInfo(true); $arTasksIds = array(); if (is_array($info) && isset($info['TASKS'])) { foreach ($info['TASKS'] as $arTask) $arTasksIds[] = (int) $arTask['ID']; } */ $APPLICATION->IncludeComponent("bitrix:tasks.task.selector", ".default", array("MULTIPLE" => "N", "NAME" => "TIMEMAN_TASKS", "VALUE" => '', "POPUP" => "N", "ON_SELECT" => "TIMEMAN_ADD_TASK_" . $_REQUEST['suffix'], "PATH_TO_TASKS_TASK" => str_replace('#USER_ID#', $USER->GetID(), COption::GetOptionString('intranet', 'path_task_user_entry', '/company/personal/user/#USER_ID#/tasks/task/view/#TASK_ID#/', $_REQUEST['site_id'])), "SITE_ID" => $_REQUEST['site_id'], "FILTER" => array('DOER' => $USER->GetID(), 'STATUS' => array(-2, -1, CTasks::STATE_NEW, CTasks::STATE_PENDING, CTasks::STATE_IN_PROGRESS, CTasks::STATE_DEFERRED)), 'HIDE_ADD_REMOVE_CONTROLS' => 'Y'), null, array("HIDE_ICONS" => "Y")); } elseif ($action == "editor") { $APPLICATION->ShowAjaxHead(); CModule::IncludeModule("fileman"); $LHE = new CLightHTMLEditor(); $LHE->Show(array('id' => strlen($_REQUEST["obname"]) > 0 ? $_REQUEST["obname"] : "oReportLHE", 'content' => "", 'inputName' => "ITEM_DESCRIPTION", 'inputId' => "", 'width' => "100%", 'height' => "200px", 'bUseFileDialogs' => false, 'jsObjName' => strlen($_REQUEST["obname"]) > 0 ? $_REQUEST["obname"] : "oReportLHE", 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'Strike', 'ForeColor', 'FontList', 'FontSizeList', 'RemoveFormat', 'Image', 'Table', 'InsertOrderedList', 'InsertUnorderedList', 'Source'), 'bResizable' => false, 'bAutoResize' => false)); } elseif ($action == "upload_attachment") { $report = null; $report_id = intval($_POST["report_id"]); if ($report_id > 0) { $user_id = intval($_REQUEST['user_id']); if ($user_id <= 0) { $user_id = $USER->GetID(); } $bCanReadUser = $user_id == $USER->GetID(); if (!$bCanReadUser) { $arAccessUsers = CTimeMan::GetAccess(); $bCanReadAll = in_array('*', $arAccessUsers['READ']); $bCanReadUser = $bCanReadAll || in_array($user_id, $arAccessUsers["READ"]); } if ($bCanReadUser) {
} AddEventHandler("fileman", "OnIncludeLightEditorScript", "CustomizeLightEditorForBlog"); $arSmiles = array(); if (!empty($arResult["Smiles"])) { foreach ($arResult["Smiles"] as $arSmile) { $arSmiles[] = array('name' => $arSmile["~LANG_NAME"], 'path' => "/bitrix/images/blog/smile/" . $arSmile["IMAGE"], 'code' => str_replace("\\\\", "\\", $arSmile["TYPE"])); } } ?> <div id="edit-post-text"> <?php $bbCode = true; // Detect necessity of first convertion content from BB-code to HTML in editor. $bConvertContentFromBBCodes = !$bbCode && $_REQUEST["load_editor"] == "Y" && !isset($_REQUEST['preview']) && !isset($_REQUEST['save']) && !isset($_REQUEST['apply']) && !isset($_REQUEST['draft']); $LHE = new CLightHTMLEditor(); $LHE->Show(array('id' => 'LHEBlogId', 'height' => $arParams['EDITOR_DEFAULT_HEIGHT'], 'inputId' => 'POST_MESSAGE_HTML', 'inputName' => 'POST_MESSAGE', 'content' => $arResult["PostToShow"]["~DETAIL_TEXT"], 'bUseFileDialogs' => false, 'bUseMedialib' => false, 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'Strike', 'ForeColor', 'FontList', 'FontSizeList', 'RemoveFormat', 'Quote', 'Code', 'InsertCut', 'CreateLink', 'DeleteLink', 'Image', 'BlogImage', $arResult["allowVideo"] == "Y" ? 'BlogInputVideo' : '', 'Table', 'Justify', 'InsertOrderedList', 'InsertUnorderedList', 'SmileList', 'Source'), 'jsObjName' => 'oBlogLHE', 'arSmiles' => $arSmiles, 'smileCountInToolbar' => $arParams['SMILES_COUNT'], 'bSaveOnBlur' => false, 'BBCode' => $bbCode, 'bConvertContentFromBBCodes' => $bConvertContentFromBBCodes, 'bQuoteFromSelection' => true, 'bResizable' => $arParams['EDITOR_RESIZABLE'], 'ctrlEnterHandler' => 'blogCtrlEnterHandler', 'bSetDefaultCodeView' => $arParams['EDITOR_CODE_DEFAULT'], 'bBBParseImageSize' => true)); ?> </div><?php } if (COption::GetOptionString("blog", "use_autosave", "Y") == "Y") { ?> <script> var bShow = false; function blogCheckLHE() { if(window.oBlogLHE) { if(!bShow) bShow = true; BlogPostAutoSaveIcon(); }
'smileCountInToolbar' => $arParams['SMILES_COUNT'], 'bSaveOnBlur' => true, 'BBCode' => true, 'bConvertContentFromBBCodes' => false, 'bQuoteFromSelection' => true, // Make quote from any text in the page 'bSetDefaultCodeView' => false, // Set first view to CODE or to WYSIWYG 'bBBParseImageSize' => true, // [IMG ID=XXX WEIGHT=5 HEIGHT=6], [IMGWEIGHT=5 HEIGHT=6]/image.gif[/IMG] 'bResizable' => true, 'bAutoResize' => true, 'autoResizeOffset' => 40, 'controlButtonsHeight' => '34', 'autoResizeSaveSize' => false ), $arParams["LHE"]); if ($arParams["LHE"]['ctrlEnterHandler'] === true || !empty($arParams["LHE"]['ctrlEnterHandler'])) $res['ctrlEnterHandler'] = "__ctrlEnterHandler".$arParams["FORM_ID"]; $LHE->Show($res); $res = array(); foreach ($tmp = array( "UploadImage" => "postimage", "UploadFile" => "postfile", "InputVideo" => "postvideo", "MentionUser" => "postuser") as $key => $val): if (in_array($key, $arParams["PARSER"])) $res[] = $val; endforeach; ?></div> <script type="text/javascript"> window['<?php echo $arParams["LHE"]["id"]; ?> Settings'] = <?php echo CUtil::PhpToJSObject(array('parsers' => $res, 'arFiles' => array_keys($arParams["FILES"]["VALUE_JS"]), 'showEditor' => $arParams["TEXT"]["SHOW"] == "Y", 'formID' => $arParams["FORM_ID"], 'objName' => $arParams["JS_OBJECT_NAME"], 'buttons' => $arParams["BUTTONS"])); ?>
?> <span class="forum-required-field">*</span></div> <div class="forum-reply-fields"> <div class="forum-reply-field forum-reply-field-text"> <?php $arSmiles = array(); foreach ($arResult["SMILES"] as $arSmile) { $arSmiles[] = array('name' => $arSmile["NAME"], 'path' => $arParams["PATH_TO_SMILE"] . $arSmile["IMAGE"], 'code' => array_shift(explode(" ", str_replace("\\\\", "\\", $arSmile["TYPING"])))); } CModule::IncludeModule("fileman"); AddEventHandler("fileman", "OnIncludeLightEditorScript", "CustomizeLHEForForum"); $LHE = new CLightHTMLEditor(); $arEditorParams = array('id' => "POST_MESSAGE", 'content' => isset($arResult['POST_VALUES']["~POST_MESSAGE"]) ? $arResult['POST_VALUES']["~POST_MESSAGE"] : $arResult['POST_VALUES']["POST_MESSAGE"], 'inputName' => "POST_MESSAGE", 'inputId' => "", 'width' => "100%", 'height' => "200px", 'minHeight' => "200px", 'bUseFileDialogs' => false, 'bUseMedialib' => false, 'BBCode' => true, 'bBBParseImageSize' => true, 'jsObjName' => "oLHE", 'toolbarConfig' => array(), 'smileCountInToolbar' => 3, 'arSmiles' => $arSmiles, 'bQuoteFromSelection' => true, 'ctrlEnterHandler' => 'postformCtrlEnterHandler' . $arParams["form_index"], 'bSetDefaultCodeView' => $arParams['EDITOR_CODE_DEFAULT'] === 'Y', 'bResizable' => true, 'bAutoResize' => true); $arEditorParams['toolbarConfig'] = forumTextParser::GetEditorToolbar(array('mode' => 'full')); $LHE->Show($arEditorParams); ?> </div> <div class="forum-reply-field forum-reply-field-settings"> <div class="forum-reply-field-setting"> <input type="checkbox" name="USE_SMILES" id="USE_SMILES" <?php ?> value="Y" <?php echo $arResult["POST_VALUES"]["USE_SMILES"] == "Y" ? "checked=\"checked\"" : ""; ?> <?php ?> tabindex="<?php echo $tabIndex++; ?>
} CModule::IncludeModule("fileman"); $LHE = new CLightHTMLEditor(); ?> <div class="meeting-detail-title-wrap"> <span class="meeting-ques-inp-label"><?php echo GetMessage('MI_EDIT_TITLE'); ?> </span> <input type="text" name="ITEM_TITLE" value="<?php echo htmlspecialcharsbx($arResult['ITEM']['TITLE']); ?> " class="meeting-ques-edit-inp" /> </div> <div id="meeting-detail-description" class="meeting-detail-description"> <span class="meeting-ques-form-label"><?php echo GetMessage('MI_EDIT_DESCRIPTION'); ?> </span> <div class="meeting-detail-description-form"> <?php $LHE->Show(array('id' => "", 'content' => $arResult['ITEM']['DESCRIPTION'], 'inputName' => "ITEM_DESCRIPTION", 'inputId' => "", 'width' => "100%", 'height' => "200px", 'bUseFileDialogs' => false, 'jsObjName' => "oMeetingLHE", 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'Strike', 'ForeColor', 'FontList', 'FontSizeList', 'RemoveFormat', 'Quote', 'Code', 'Image', 'Table', 'InsertOrderedList', 'InsertUnorderedList', 'SmileList', 'Source'), 'bResizable' => true, 'bAutoResize' => true)); ?> </div> <div id="meeting-detail-files" class="meeting-detail-files meeting-detail-files-edit"> <?php $APPLICATION->IncludeComponent('bitrix:main.file.input', '', array('INPUT_NAME' => 'ITEM_FILES', 'INPUT_NAME_UNSAVED' => 'ITEM_FILES_TMP', 'INPUT_VALUE' => array_keys($arResult['ITEM']['FILES']), 'CONTROL_ID' => 'MEETING_ITEM_FILES_' . $arParams['ITEM_ID'], 'MODULE_ID' => 'meeting'), null, array('HIDE_ICONS' => 'Y')); ?> </div> </div>
case 'EMAIL_FROM': $f['type'] = 'text'; $f['params'] = array('size' => 50); break; case 'SCOPE': case 'ENTITY_TYPE_ID': $f['type'] = 'list'; $f['items'] = isset($data['ALL_VALUES']) ? $data['ALL_VALUES'] : array(); break; case 'BODY': $f['type'] = 'custom'; $f['colspan'] = true; CModule::IncludeModule('fileman'); ob_start(); $editor = new CLightHTMLEditor(); $editor->Show(array('id' => 'MailTemplateBodyEditor', 'height' => '192', 'BBCode' => true, 'bUseFileDialogs' => false, 'bFloatingToolbar' => false, 'bArisingToolbar' => false, 'bResizable' => false, 'jsObjName' => 'oLheMailTemplateBody', 'bInitByJS' => false, 'bSaveOnBlur' => false, 'content' => $f['value'], 'inputName' => $ID, 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'Strike', 'ForeColor', 'FontList', 'FontSizeList', 'RemoveFormat', 'Quote', 'Code', 'CreateLink', 'DeleteLink', 'Image', 'Table', 'Justify', 'InsertOrderedList', 'InsertUnorderedList', 'Indent', 'Outdent', 'Source'))); $f['value'] = ob_get_contents(); ob_end_clean(); break; default: $f['type'] = 'text'; } $mainTabFields[] =& $f; if ($ID === 'ENTITY_TYPE_ID') { //Add field selector control $selectorContainerID = $arResult['FORM_ID'] . '_ENTITY_FIELD_SELECTOR'; $selector = array('id' => 'ENTITY_FIELD_SELECTOR', 'name' => GetMessage('CRM_MAIL_TEMPLATE_ENTITY_FIELD_SELECTOR'), 'type' => 'custom', 'value' => '<span id="' . htmlspecialcharsbx($selectorContainerID) . '"></span>'); $mainTabFields[] =& $selector; unset($selector); ?> <script type="text/javascript">
<div class="crm-offer-editor-title"> <div class="crm-offer-editor-title-contents-wapper"> <?php if ($required) { ?> <span class="required">*</span><?php } ?> <span class="crm-offer-editor-title-contents"><?php echo htmlspecialcharsEx($field['name']); ?> </span> </div> </div> <div class="crm-offer-editor-wrap crm-offer-info-data-wrap"><?php $lhe->Show($params); ?> </div> <span class="crm-offer-edit-btn-wrap"><?php if (!$required && !$persistent) { ?> <span class="crm-offer-item-del"></span><?php } ?> <span class="crm-offer-item-edit"></span> </span> </td><!-- "crm-offer-info-right" --><?php } elseif ($field['type'] === 'address') { $params = isset($field['componentParams']) ? $field['componentParams'] : array(); $addressData = isset($params['DATA']) ? $params['DATA'] : array(); $addressServiceUrl = isset($params['SERVICE_URL']) ? $params['SERVICE_URL'] : '';
public static function RenderHtmlEditor(&$arParams) { if (!is_array($arParams)) { return; } $fieldID = isset($arParams['FIELD_ID']) ? $arParams['FIELD_ID'] : ''; $value = isset($arParams['VALUE']) ? $arParams['VALUE'] : ''; $editorID = isset($arParams['EDITOR_ID']) ? $arParams['EDITOR_ID'] : ''; if ($editorID === '') { $editorID = uniqid('LHE_'); } $editorJsName = isset($arParams['EDITOR_JS_NAME']) ? $arParams['EDITOR_JS_NAME'] : ''; if ($editorJsName === '') { $editorJsName = $editorID; } $toolbarConfig = isset($arParams['TOOLBAR_CONFIG']) ? $arParams['TOOLBAR_CONFIG'] : null; if (!is_array($toolbarConfig)) { $toolbarConfig = array('Bold', 'Italic', 'Underline', 'Strike', 'BackColor', 'ForeColor', 'CreateLink', 'DeleteLink', 'InsertOrderedList', 'InsertUnorderedList', 'Outdent', 'Indent'); } if (!self::$IS_FILEMAN_INCLUDED) { CModule::IncludeModule('fileman'); self::$IS_FILEMAN_INCLUDED = true; } ob_start(); $editor = new CLightHTMLEditor(); $editor->Show(array('id' => $editorID, 'height' => '150', 'bUseFileDialogs' => false, 'bFloatingToolbar' => false, 'bArisingToolbar' => false, 'bResizable' => false, 'jsObjName' => $editorJsName, 'bInitByJS' => false, 'bSaveOnBlur' => true, 'toolbarConfig' => $toolbarConfig)); $lheHtml = ob_get_contents(); ob_end_clean(); $wrapperID = isset($arParams['WRAPPER_ID']) ? $arParams['WRAPPER_ID'] : ''; if ($wrapperID === '') { $wrapperID = $editorID . '_WRAPPER'; } echo str_replace(array('#TEXT#', '#VALUE#', '#NAME#', '#SETTINGS#', '#WRAPPER_ID#', '#HTML#'), array($value, htmlspecialcharsbx($value), $fieldID, htmlspecialcharsbx('{ "id":"' . CUtil::JSEscape($editorID) . '", "wrapperId":"' . CUtil::JSEscape($wrapperID) . '", "jsName":"' . CUtil::JSEscape($editorJsName) . '" }'), $wrapperID, $lheHtml), self::$TEMPLATES['LHE']); }
function __ShowTextFieldTmp($name, $multiple, $key, $value, $isInSecurity) { if (!$isInSecurity) { echo '<textarea name="' . $name . ($multiple ? '[' . $key . ']' : '') . '" style="width:98%" rows="10">' . $value . '</textarea>'; } else { CModule::IncludeModule("fileman"); if ($name == "DETAIL_TEXT") { ?> <script> window.LHE_TC = { butTitle: '<?php echo GetMessage("INTET_VE_INS_SUBTASK"); ?> ', dialogTitle: '<?php echo GetMessage("INTET_VE_INS_SUBTASK1"); ?> ', subTaskLabel: '<?php echo GetMessage("INTET_VE_INS_SUBTASK2"); ?> ' }; window.subTaskStyles = "\n" + "ul.bx-subtasklist {list-style-image: url(/bitrix/images/fileman/light_htmledit/check_off.gif);}" + "ul.bx-subtasklist li{padding-left: 5px;}" + "ul.bx-subtasklist li.checked{ list-style-image: url(/bitrix/images/fileman/light_htmledit/check_on.gif);}" + "\n"; </script> <?php AddEventHandler("fileman", "OnBeforeLightEditorScriptsGet", "lhe_add_js"); function lhe_add_js($LheId) { if ($LheId == 'LHETaskId') { return array("JS" => array('/bitrix/js/fileman/light_editor/task_checkbox.js')); } } $ar = array('id' => 'LHETaskId', 'height' => '200px', 'inputName' => $name . ($multiple ? '[' . $key . ']' : ''), 'inputId' => $name . '_id', 'content' => $value, 'bUseFileDialogs' => false, 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'Strike', 'RemoveFormat', 'CreateLink', 'DeleteLink', 'Image', 'Video', 'ForeColor', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull', 'InsertOrderedList', 'InsertUnorderedList', 'Outdent', 'Indent', 'StyleList', 'HeaderList', 'FontList', 'FontSizeList', 'TaskCheckbox'), 'jsObjName' => 'oLHE', 'bResizable' => true); } else { $ar = array('height' => '200px', 'inputName' => $name . ($multiple ? '[' . $key . ']' : ''), 'inputId' => $name . '_id', 'content' => $value, 'bUseFileDialogs' => false, 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'Strike', 'RemoveFormat', 'CreateLink', 'DeleteLink', 'Image', 'Video', 'ForeColor', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull', 'InsertOrderedList', 'InsertUnorderedList', 'Outdent', 'Indent', 'StyleList', 'HeaderList', 'FontList', 'FontSizeList'), 'bResizable' => true); } $LHE = new CLightHTMLEditor(); $LHE->Show($ar); } }
if (!empty($arResult["Smiles"])) { foreach ($arResult["Smiles"] as $arSmile) { $arSmiles[] = array('name' => $arSmile["~LANG_NAME"], 'path' => "/bitrix/images/blog/smile/" . $arSmile["IMAGE"], 'code' => str_replace("\\\\", "\\", $arSmile["TYPE"])); } } ?> <div id="edit-post-text"> <?php $bbCode = true; if ($arResult["allow_html"] == "Y" && ($arResult["PostToShow"]["DETAIL_TEXT_TYPE"] == "html" && $_REQUEST["load_editor"] != "N" || $_REQUEST["load_editor"] == "Y")) { $bbCode = false; } // Detect necessity of first convertion content from BB-code to HTML in editor. $bConvertContentFromBBCodes = !$bbCode && $_REQUEST["load_editor"] == "Y" && !isset($_REQUEST['preview']) && !isset($_REQUEST['save']) && !isset($_REQUEST['apply']) && !isset($_REQUEST['draft']); $LHE = new CLightHTMLEditor(); $LHE->Show(array('id' => 'LHEBlogId', 'width' => '100%', 'height' => '120px', 'inputId' => 'POST_MESSAGE_HTML', 'inputName' => 'POST_MESSAGE', 'content' => $arResult["PostToShow"]["~DETAIL_TEXT"], 'bUseFileDialogs' => false, 'bUseMedialib' => false, 'toolbarConfig' => array('BlogImage', 'CreateLink', $arResult["allowVideo"] == "Y" ? 'BlogInputVideo' : ''), 'jsObjName' => 'oBlogLHE', 'arSmiles' => $arSmiles, 'smileCountInToolbar' => 1, 'bSaveOnBlur' => false, 'BBCode' => $bbCode, 'bConvertContentFromBBCodes' => $bConvertContentFromBBCodes, 'bQuoteFromSelection' => true, 'bResizable' => true, 'bAutoResize' => true, 'autoResizeOffset' => 40, 'autoResizeMaxHeight' => 300, 'controlButtonsHeight' => 0, 'autoResizeSaveSize' => false, 'ctrlEnterHandler' => 'blogCtrlEnterHandler', 'bSetDefaultCodeView' => false, 'bBBParseImageSize' => true)); ?> </div><?php } ?> <script> var bShow = false; function blogCheckLength() { if(window.oBlogLHE) { if(!bShow) { var el = BX.findChild(BX("bxlhe_frame_LHEBlogId"), {className: "lhe-stat-toolbar-cont"}, true); elTr = BX.findParent(BX.findParent(el)); elTr.style.display = "none";
public static function RenderInstantEditorField($arParams) { $fieldID = isset($arParams['FIELD_ID']) ? $arParams['FIELD_ID'] : ''; $type = isset($arParams['TYPE']) ? $arParams['TYPE'] : ''; if ($type === 'TEXT') { $value = isset($arParams['VALUE']) ? $arParams['VALUE'] : ''; $suffixHtml = isset($arParams['SUFFIX_HTML']) ? $arParams['SUFFIX_HTML'] : ''; if ($suffixHtml === '') { $suffix = isset($arParams['SUFFIX']) ? $arParams['SUFFIX'] : ''; if ($suffix !== '') { $suffixHtml = htmlspecialcharsbx($suffix); } } $inputWidth = isset($arParams['INPUT_WIDTH']) ? intval($arParams['INPUT_WIDTH']) : 0; echo '<span class="crm-instant-editor-fld crm-instant-editor-fld-input">', '<span class="crm-instant-editor-fld-text">', htmlspecialcharsbx($value), '</span>'; echo '<input class="crm-instant-editor-data-input" type="text" value="', htmlspecialcharsbx($value), '" style="display:none;', $inputWidth > 0 ? "width:{$inputWidth}px;" : '', '" />', '<input class="crm-instant-editor-data-name" type="hidden" value="', htmlspecialcharsbx($fieldID), '" />'; if ($suffixHtml !== '') { echo '<span class="crm-instant-editor-fld-suffix">', $suffixHtml, '</span>'; } echo '</span><span class="crm-instant-editor-fld-btn crm-instant-editor-fld-btn-input"></span>'; } elseif ($type === 'LHE') { $editorID = isset($arParams['EDITOR_ID']) ? $arParams['EDITOR_ID'] : ''; if ($editorID === '') { $editorID = uniqid('LHE_'); } $editorJsName = isset($arParams['EDITOR_JS_NAME']) ? $arParams['EDITOR_JS_NAME'] : ''; if ($editorJsName === '') { $editorJsName = $editorID; } $value = isset($arParams['VALUE']) ? $arParams['VALUE'] : ''; /*if($value === '<br />') { $value = ''; }*/ echo '<span class="crm-instant-editor-fld-text">'; echo $value; echo '</span>'; echo '<div class="crm-instant-editor-fld-btn crm-instant-editor-fld-btn-lhe"></div>'; echo '<input class="crm-instant-editor-data-name" type="hidden" value="', htmlspecialcharsbx($fieldID), '" />'; echo '<input class="crm-instant-editor-data-value" type="hidden" value="', htmlspecialcharsbx($value), '" />'; $wrapperID = isset($arParams['WRAPPER_ID']) ? $arParams['WRAPPER_ID'] : ''; if ($wrapperID === '') { $wrapperID = $editorID . '_WRAPPER'; } $toolbarConfig = is_array($arParams['TOOLBAR_CONFIG']) ? $arParams['TOOLBAR_CONFIG'] : ''; if ($toolbarConfig === '') { $toolbarConfig = array('Bold', 'Italic', 'Underline', 'Strike', 'BackColor', 'ForeColor', 'CreateLink', 'DeleteLink', 'InsertOrderedList', 'InsertUnorderedList', 'Outdent', 'Indent'); } echo '<input class="crm-instant-editor-lhe-data" type="hidden" value="', htmlspecialcharsbx('{ "id":"' . CUtil::JSEscape($editorID) . '", "wrapperId":"' . CUtil::JSEscape($wrapperID) . '", "jsName":"' . CUtil::JSEscape($editorJsName) . '" }'), '" />'; echo '<div id="', htmlspecialcharsbx($wrapperID), '" style="display:none;">'; CModule::IncludeModule('fileman'); $editor = new CLightHTMLEditor(); $editor->Show(array('id' => $editorID, 'width' => '600', 'height' => '200', 'bUseFileDialogs' => false, 'bFloatingToolbar' => false, 'bArisingToolbar' => false, 'bResizable' => false, 'jsObjName' => $editorJsName, 'bInitByJS' => false, 'bSaveOnBlur' => true, 'bHandleOnPaste' => false, 'toolbarConfig' => $toolbarConfig)); echo '</div>'; } }
function BDS_EditEvent($arParams) { global $APPLICATION; $id = $arParams['id']; ?> <div id="bxec_edit_ed_<?php echo $id; ?> " class="bxec-edit-ed bxec-dialog"><form name="bxec_edit_ed_form_<?php echo $id; ?> "><table class="bxec-edit-ed-frame"> <tr><td class="bxec-title-cell"> <table onmousedown="jsFloatDiv.StartDrag(arguments[0], document.getElementById('bxec_edit_ed_<?php echo $id; ?> '));"><tr><td style="width: 10px; padding-left: 3px;"><img class="bxec-iconkit bxec-dd-dot" src="/bitrix/images/1.gif" /></td><td class="bxec-edit-ed-title"><div id="<?php echo $id; ?> _edit_ed_d_title"><?php echo GetMessage('EC_T_EDIT_EVENT'); ?> </div></td><td id="<?php echo $id; ?> _edit_ed_close" class="bxec-close" title="<?php echo GetMessage('EC_T_CLOSE'); ?> "><img class="bxec-iconkit" src="/bitrix/images/1.gif"></td></tr></table> </td> <tr><td class="bxec-edit-ed-cont"> <div class="bxec-d-tabset" id="<?php echo $id; ?> _edit_ed_d_tabset"> <div class="bxec-d-tabs"> <div class="bxec-d-tab bxec-d-tab-act" title="<?php echo GetMessage('EC_EDEV_EVENT_TITLE'); ?> " id="<?php echo $id; ?> _ed_tab_0"> <div class="bxec-l"></div> <div class="bxec-c" style="width: 85px;"><span><?php echo GetMessage('EC_EDEV_EVENT'); ?> </span></div> <div class="bxec-r"></div> </div> <div class="bxec-d-tab bxec-d-tab-act" title="<?php echo GetMessage('EC_T_DESC_TITLE'); ?> " id="<?php echo $id; ?> _ed_tab_1"> <div class="bxec-l"></div> <div class="bxec-c" style="width: 95px;"><span><?php echo GetMessage('EC_T_DESC'); ?> </span></div> <div class="bxec-r"></div> </div> <?php if ($arParams['bSocNet']) { ?> <div class="bxec-d-tab" title="<?php echo GetMessage('EC_EDEV_GUESTS_TITLE'); ?> " id="<?php echo $id; ?> _ed_tab_2"> <div class="bxec-l"></div> <div class="bxec-c" style="width: 95px;"><span><?php echo GetMessage('EC_EDEV_GUESTS'); ?> </span></div> <div class="bxec-r"></div> </div> <?php } ?> <div class="bxec-d-tab" title="<?php echo GetMessage('EC_EDEV_ADD_TAB_TITLE'); ?> " id="<?php echo $id; ?> _ed_tab_3"> <div class="bxec-l"></div> <div class="bxec-c"><span><?php echo GetMessage('EC_EDEV_ADD_TAB'); ?> </span></div> <div class="bxec-r"></div> </div> </div> <div class="bxec-d-cont" id="<?php echo $id; ?> _edit_ed_d_tabcont"> <?php /* ####### TAB 0 : MAIN####### */ ?> <div id="<?php echo $id; ?> _ed_tab_cont_0" class="bxec-d-cont-div"> <table> <tr><td class="dialog-par-name"><b><?php echo GetMessage('EC_EDEV_DATE_FROM'); ?> :</b></td><td class="bxec-ed-lp" style="width: 310px;"> <input name="edit_event_from" /> <?php $APPLICATION->IncludeComponent("bitrix:main.calendar", "", array("FORM_NAME" => "bxec_edit_ed_form_" . $id, "INPUT_NAME" => "edit_event_from", "INPUT_VALUE" => "", "SHOW_TIME" => "N", "HIDE_TIMEBAR" => "Y"), false, array("HIDE_ICONS" => "Y")); ?> <?php CClock::Show(array('inputId' => $id . '_edev_time_from', 'inputTitle' => GetMessage('EC_EDEV_TIME_FROM'))); ?> </td></tr> <tr><td class="dialog-par-name"><?php echo GetMessage('EC_EDEV_DATE_TO'); ?> :</td><td class="bxec-ed-lp"> <input name="edit_event_to" /> <?php $APPLICATION->IncludeComponent("bitrix:main.calendar", "", array("FORM_NAME" => "bxec_edit_ed_form_" . $id, "INPUT_NAME" => "edit_event_to", "INPUT_VALUE" => "", "SHOW_TIME" => "N", "HIDE_TIMEBAR" => "Y"), false, array("HIDE_ICONS" => "Y")); ?> <?php CClock::Show(array('inputId' => $id . '_edev_time_to', 'inputTitle' => GetMessage('EC_EDEV_TIME_TO'))); ?> </td></tr> <tr><td class="dialog-par-name"><b><?php echo GetMessage('EC_T_NAME'); ?> :</b></td><td class="bxec-ed-lp"><input type="text" size="37" id="<?php echo $id; ?> _edit_ed_name" style="width: 260px;"/></td></tr> <tr><td class="dialog-par-name"><label for="<?php echo $id; ?> _planner_location1"><?php echo GetMessage('EC_LOCATION'); ?> :</label></td><td class="bxec-ed-lp"> <div class="bxecpl-loc-cont"> <input size="37" style="width: 246px;" id="<?php echo $id; ?> _planner_location1" type="text" title="<?php echo GetMessage('EC_LOCATION_TITLE'); ?> " value="<?php echo GetMessage('EC_PL_SEL_MEET_ROOM'); ?> " class="ec-label" /> </div> </td></tr> <?php if ($arParams['ownerType'] == 'USER') { ?> <tr title="<?php echo GetMessage('EC_ACCESSIBILITY_TITLE'); ?> "> <td class="dialog-par-name"><label for="<?php echo $id; ?> _bxec_accessibility"><?php echo GetMessage('EC_ACCESSIBILITY'); ?> :</label></td> <td class="bxec-ed-lp"> <select id="<?php echo $id; ?> _bxec_accessibility" style="width: 210px;"> <option value="busy" title="<?php echo GetMessage('EC_ACCESSIBILITY_B'); ?> "><?php echo GetMessage('EC_ACCESSIBILITY_B'); ?> </option> <option value="quest" title="<?php echo GetMessage('EC_ACCESSIBILITY_Q'); ?> "><?php echo GetMessage('EC_ACCESSIBILITY_Q'); ?> </option> <option value="free" title="<?php echo GetMessage('EC_ACCESSIBILITY_F'); ?> "><?php echo GetMessage('EC_ACCESSIBILITY_F'); ?> </option> <option value="absent" title="<?php echo GetMessage('EC_ACCESSIBILITY_A'); ?> (<?php echo GetMessage('EC_ACC_EX'); ?> )"><?php echo GetMessage('EC_ACCESSIBILITY_A'); ?> (<?php echo GetMessage('EC_ACC_EX'); ?> )</option> </select> </td> </tr> <?php } ?> <tr><td class="dialog-par-name" style="height: 23px"><?php echo GetMessage('EC_T_CALENDAR'); ?> :</td><td class="bxec-cal-sel-cel"><span><?php echo GetMessage('EC_T_CREATE_DEF'); ?> </span><select id="<?php echo $id; ?> _edit_ed_calend_sel"></select><span style="display: none;"><?php echo GetMessage('EC_T_CALEN_DIS_WARNING'); ?> </span> </td></tr> </table> </div> <?php /* ####### TAB 1 : DESCRIPTION ####### */ ?> <div id="<?php echo $id; ?> _ed_tab_cont_1" class="bxec-d-cont-div bxec-lhe"> <?php CModule::IncludeModule("fileman"); $LHE = new CLightHTMLEditor(); $LHE->Show(array('id' => 'LHEEvDesc', 'width' => '455', 'height' => '285', 'inputId' => $id . '_edit_ed_desc', 'content' => '', 'bUseFileDialogs' => false, 'bFloatingToolbar' => false, 'bArisingToolbar' => true, 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'RemoveFormat', 'CreateLink', 'DeleteLink', 'Image', 'BackColor', 'ForeColor', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'InsertOrderedList', 'InsertUnorderedList', 'Outdent', 'Indent', 'FontSizeList', 'HeaderList'), 'jsObjName' => 'pLHEEvDesc', 'bInitByJS' => true, 'bSaveOnBlur' => false)); ?> </div> <?php if ($arParams['bSocNet']) { ?> <?php /* ####### TAB 2 : GUESTS ####### */ ?> <div id="<?php echo $id; ?> _ed_tab_cont_2" class="bxec-d-cont-div" style="padding: 5px 8px;"> <div style="padding: 0 0 6px 6px;"> <a id="<?php echo $id; ?> _planner_link" href="javascript:void(0);" title="<?php echo GetMessage('EC_PLANNER_TITLE'); ?> " class="bxex-planner-link"><img src="/bitrix/images/1.gif" /><?php echo GetMessage('EC_PLANNER2'); ?> </a> </div> <?php echo GetMessage('EC_ADD_GUEST'); ?> : <?php if ($arParams['bExtranet']) { $ExtraMode = 'E'; } elseif (CModule::IncludeModule('extranet')) { $ExtraMode = 'I'; } else { $ExtraMode = ''; } $APPLICATION->IncludeComponent("bitrix:socialnetwork.user_search_input", ".default", array("NAME" => "guest_search", "TEXT" => "size='25'", "EXTRANET" => $ExtraMode, "FUNCTION" => "EdEventAddGuest_" . $id), false, array("HIDE_ICONS" => "Y")); // $APPLICATION->IncludeComponent( // "bitrix:intranet.user.selector", // ".default", // array( // "INPUT_NAME" => "guest_search", // //"TEXT" => "size='25'", // "EXTRANET" => $ExtraMode, // "SHOW_INPUT" => "Y", // "MULTIPLE" => "N", // "ONSELECT" => "EdEventAddGuest_".$id // ), false, array("HIDE_ICONS" => "Y")); ?> <div id="<?php echo $id; ?> _edev_add_ex" class="bxec-add-ex"> <?php if (!$arParams['bExtranet']) { ?> <?php if ($arParams['ownerType'] == 'GROUP') { ?> <a id="<?php echo $id; ?> _add_from_group" href="javascript:void(0);" title="<?php echo GetMessage('EC_ADD_GROUP_MEMBER_TITLE'); ?> " class="bxex-add-ex-link"><img src="/bitrix/images/1.gif" /><?php echo GetMessage('EC_ADD_GROUP_MEMBER'); ?> </a> <?php } ?> <a id="<?php echo $id; ?> _add_from_struc" href="javascript:void(0);" title="<?php echo GetMessage('EC_ADD_MEMBERS_FROM_STR_TITLE'); ?> " class="bxex-add-ex-link"><img src="/bitrix/images/1.gif" /><?php echo GetMessage('EC_ADD_MEMBERS_FROM_STR'); ?> </a> <?php } ?> </div> <div id="<?php echo $id; ?> _edev_uc_notice" class="bxec-eeuc-notice"></div> <div class="bxec-g-title"><?php echo GetMessage('EC_GUEST_LIST'); ?> <a id="<?php echo $id; ?> _edev_del_all_guests" href="javascript:void(0)" title="<?php echo GetMessage('EC_DEL_ALL_GUESTS_TITLE'); ?> "><?php echo GetMessage('EC_DEL_ALL_GUESTS'); ?> </a></div> <div class="bxec-g-table-cont"> <table id="<?php echo $id; ?> _edev_guests_table" class="bxec-edev-guests"> <tr class="bxec-g-empty"><td colSpan="3"> - <?php echo GetMessage('EC_EMPTY_LIST'); ?> - </td></tr> </table> </div> <div class="bxec-add-meet-text"><a id="<?php echo $id; ?> _add_meet_text" href="javascript:void(0);"><?php echo GetMessage('EC_ADD_METTING_TEXT'); ?> </a></div> <div class="bxec-meet-text" id="<?php echo $id; ?> _meet_text_cont"> <div class="bxec-mt-d"><?php echo GetMessage('EC_METTING_TEXT'); ?> (<a id="<?php echo $id; ?> _hide_meet_text" href="javascript:void(0);" title="<?php echo GetMessage('EC_HIDE_METTING_TEXT_TITLE'); ?> "><?php echo GetMessage('EC_HIDE'); ?> </a>): </div><br /> <textarea class="bxec-mt-t" cols="63" id="<?php echo $id; ?> _meeting_text" rows="3"></textarea> </div> </div> <?php } ?> <?php /* ####### TAB 3 ####### */ ?> <div id="<?php echo $id; ?> _ed_tab_cont_3" class="bxec-d-cont-div" style="padding: 5px 8px;"> <table class="bxec-reminder-table"> <tr class="bxec-edev-ad-title"><td colSpan="2"><?php echo GetMessage('EC_T_REPEATING'); ?> </td></tr> <?php /* Repeat row start*/ ?> <tr id="<?php echo $id; ?> _edit_ed_rep_tr" class="bxec-edit-ed-rep"><td class="bxec-edit-ed-repeat"><?php echo GetMessage('EC_T_REPEAT'); ?> :</td><td class="bxec-ed-lp"> <select id="<?php echo $id; ?> _edit_ed_rep_sel"> <option value="none"><?php echo GetMessage('EC_T_REPEAT_NONE'); ?> </option> <option value="daily"><?php echo GetMessage('EC_T_REPEAT_DAILY'); ?> </option> <option value="weekly"><?php echo GetMessage('EC_T_REPEAT_WEEKLY'); ?> </option> <option value="monthly"><?php echo GetMessage('EC_T_REPEAT_MONTHLY'); ?> </option> <option value="yearly"><?php echo GetMessage('EC_T_REPEAT_YEARLY'); ?> </option> </select> <div id="<?php echo $id; ?> _edit_ed_repeat_sect" style="display: none; width: 310px;"> <span id="<?php echo $id; ?> _edit_ed_rep_phrase1"></span> <select id="<?php echo $id; ?> _edit_ed_rep_count"> <?php for ($i = 1; $i < 36; $i++) { ?> <option value="<?php echo $i; ?> "><?php echo $i; ?> </option> <?php } ?> </select> <span id="<?php echo $id; ?> _edit_ed_rep_phrase2"></span> <br> <div id="<?php echo $id; ?> _edit_ed_rep_week_days" class="bxec-rep-week-days"> <?php for ($i = 0; $i < 7; $i++) { $id_ = $id . 'bxec_week_day_' . $i; ?> <input id="<?php echo $id_; ?> " type="checkbox" value="Y"> <label for="<?php echo $id_; ?> " title="<?php echo $arParams['week_days'][$i][0]; ?> "><?php echo $arParams['week_days'][$i][1]; ?> </label> <?php } ?> </div> <?php echo GetMessage('EC_T_DIALOG_STOP_REPEAT'); ?> : <input name="date_calendar" size="19" /> <?php $APPLICATION->IncludeComponent("bitrix:main.calendar", "", array("FORM_NAME" => "bxec_edit_ed_form_" . $id, "INPUT_NAME" => "date_calendar", "INPUT_VALUE" => "", "SHOW_TIME" => "N", "HIDE_TIMEBAR" => "Y"), false, array("HIDE_ICONS" => "Y")); ?> <div> </td></tr> <?php /* Repeat row end*/ ?> <?php if ($arParams['bSocNet']) { ?> <tr class="bxec-edev-ad-title"><td colSpan="2"><?php echo GetMessage('EC_EDEV_REMINDER'); ?> </td></tr> <tr> <td colspan="2"> <input id="<?php echo $id; ?> _bxec_reminder" type="checkbox" value="Y"> <label for="<?php echo $id; ?> _bxec_reminder"><?php echo GetMessage('EC_EDEV_REMIND_EVENT'); ?> </label> <span id="<?php echo $id; ?> _bxec_rem_cont" style="display: none;"> <?php echo GetMessage('EC_EDEV_FOR'); ?> <input id="<?php echo $id; ?> _bxec_rem_count" type="text" style="width: 30px" size="2"> <select id="<?php echo $id; ?> _bxec_rem_type"> <option value="min" selected="true"><?php echo GetMessage('EC_EDEV_REM_MIN'); ?> </option> <option value="hour"><?php echo GetMessage('EC_EDEV_REM_HOUR'); ?> </option> <option value="day"><?php echo GetMessage('EC_EDEV_REM_DAY'); ?> </option> </select> <?php echo GetMessage('EC_JS_DE_VORHER'); ?> </span> <a id="<?php echo $id; ?> _bxec_rem_save" title="<?php echo GetMessage('EC_EDEV_REM_SAVE_TITLE'); ?> " href="javascript:void(0);" class="bxec-rem-save"><?php echo GetMessage('EC_EDEV_REM_SAVE'); ?> </a> </td> </tr> <?php } ?> <tr class="bxec-edev-ad-title"><td colSpan="2"><?php echo GetMessage('EC_EDDIV_SPECIAL_NOTES'); ?> </td></tr> <tr> <td colspan="2"> <?php echo GetMessage('EC_IMPORTANCE_TITLE'); ?> : <select id="<?php echo $id; ?> _bxec_importance"> <option value="high" style="font-weight: bold;"><?php echo GetMessage('EC_IMPORTANCE_H'); ?> </option> <option value="normal" selected="true"><?php echo GetMessage('EC_IMPORTANCE_N'); ?> </option> <option value="low" style="color: #909090;"><?php echo GetMessage('EC_IMPORTANCE_L'); ?> </option> </select> </td> </tr> <?php if ($arParams['ownerType'] == 'USER') { ?> <tr> <td colspan="2"> <input id="<?php echo $id; ?> _bxec_private" type="checkbox" value="Y" title="<?php echo GetMessage('EC_PRIVATE_TITLE'); ?> "> <label for="<?php echo $id; ?> _bxec_private" title="<?php echo GetMessage('EC_PRIVATE_TITLE'); ?> "><?php echo GetMessage('EC_PRIVATE_EVENT'); ?> </label> </td> </tr> <?php } ?> </table> </div> </div> </div> </div> </td></tr> <tr><td class="bxec-edit-ed-buttons"> <a id="<?php echo $id; ?> _edit_ed_delete" href="javascript:void(0);" title="<?php echo GetMessage('EC_T_DELETE_EVENT'); ?> "><img class="bxec-iconkit bxec-delevent" src="/bitrix/images/1.gif" /><?php echo GetMessage('EC_T_DELETE'); ?> </a> <input id="<?php echo $id; ?> _edit_ed_save" type="button" value="<?php echo GetMessage('EC_T_SAVE'); ?> "> <input id="<?php echo $id; ?> _edit_ed_cancel" type="button" value="<?php echo GetMessage('EC_T_CLOSE'); ?> "> </td></tr> </table> </form> </div> <?php }
function wrapDescrLHE($inputName, $content = '', $divId = false) { ob_start(); $ar = array('inputName' => $inputName, 'height' => '160', 'width' => '100%', 'content' => $content, 'bResizable' => true, 'bManualResize' => true, 'bUseFileDialogs' => false, 'bFloatingToolbar' => false, 'bArisingToolbar' => false, 'bAutoResize' => true, 'bSaveOnBlur' => true, 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'Strike', 'CreateLink', 'DeleteLink', 'Source', 'BackColor', 'ForeColor')); if ($divId) { $ar['id'] = $divId; } $LHE = new CLightHTMLEditor(); $LHE->Show($ar); $sVal = ob_get_contents(); ob_end_clean(); return $sVal; }
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } if (!CModule::IncludeModule("fileman")) { return ShowError(GetMessage("EC_FILEMAN_MODULE_NOT_INSTALLED")); } $toolbarConfig = array('Bold', 'Italic', 'Underline', 'Strike', 'RemoveFormat', 'CreateLink', 'DeleteLink', 'Image', 'Video', 'BackColor', 'ForeColor', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull', 'InsertOrderedList', 'InsertUnorderedList', 'Outdent', 'Indent', 'StyleList', 'HeaderList', 'FontList', 'FontSizeList'); if (is_array($arParams['TOOLBAR_CONFIG'])) { $toolbarConfig = $arParams['TOOLBAR_CONFIG']; } if ($arParams['VIDEO_ALLOW_VIDEO'] != 'N') { $videoSettings = array('maxWidth' => $arParams['VIDEO_MAX_WIDTH'], 'maxHeight' => $arParams['VIDEO_MAX_HEIGHT'], 'WMode' => $arParams['VIDEO_WMODE'], 'windowless' => $arParams['VIDEO_WINDOWLESS'] != 'N', 'bufferLength' => intVal($arParams['VIDEO_BUFFER']), 'skin' => $arParams['VIDEO_SKIN'], 'logo' => $arParams['VIDEO_LOGO']); } else { $ind = array_search('Video', $toolbarConfig); if ($ind !== false) { unset($toolbarConfig[$ind]); $toolbarConfig = array_values($toolbarConfig); } $videoSettings = false; } $LHE = new CLightHTMLEditor(); $LHE->Show(array('id' => $arParams['ID'], 'content' => $arParams['~CONTENT'], 'inputName' => $arParams['INPUT_NAME'], 'inputId' => $arParams['INPUT_ID'], 'width' => $arParams['WIDTH'], 'height' => $arParams['HEIGHT'], 'bUseFileDialogs' => $arParams['USE_FILE_DIALOGS'] == 'Y', 'jsObjName' => $arParams['JS_OBJ_NAME'], 'toolbarConfig' => $toolbarConfig, 'videoSettings' => $videoSettings, 'bResizable' => $arParams['RESIZABLE'] == 'Y', 'bAutoResize' => $arParams['AUTO_RESIZE'] != 'N'));
window.__bxst_result.stickers = <?php echo CUtil::PhpToJSObject($Stickers); ?> ; <?php } ?> window.__bxst_result.show = <?php echo CSticker::GetBShowStickers() ? 'true' : 'false'; ?> ; </script> <?php } elseif ($action == 'load_lhe') { $LHE = new CLightHTMLEditor(); $LHE->Show(array('id' => 'LHEBxStickers', 'width' => '230', 'height' => '100', 'inputId' => 'stickers_ed', 'content' => 'Text', 'bUseFileDialogs' => false, 'bUseMedialib' => false, 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'Strike', 'RemoveFormat', 'ForeColor', 'InsertOrderedList', 'InsertUnorderedList', 'CreateLink'), 'jsObjName' => 'oLHESticker', 'bInitByJS' => true, 'BBCode' => true, 'bSaveOnBlur' => false, 'documentCSS' => "\nbody{padding:0 5px 0 20px !important; font-family:Verdana !important; font-size:12px !important;}\n.bxst-title{font-family:Verdana!important; font-size:11px !important; margin:0 0 0 -7px !important;line-height:18px!important; color: #727272!important;}\nbody.bxst-yellow{background: #FFFCB3!important;}\nbody.bxst-green{background: #DBFCCD!important;}\nbody.bxst-blue{background: #DCE7F7!important;}\nbody.bxst-red{background: #FCDFDF!important;}\nbody.bxst-purple{background: #F6DAF8!important;}\nbody.bxst-gray{background: #F5F5F5!important;}\nbody.bxst-yellow .bxst-title{color: #7F7E59!important;}\nbody.bxst-green .bxst-title{color: #6D7E66!important;}\nbody.bxst-blue .bxst-title{color: #6E737B!important;}\nbody.bxst-red .bxst-title{color: #7E6F6F!important;}\nbody.bxst-purple .bxst-title{color: #7B6D7C!important;}\nbody.bxst-gray .bxst-title{color: #7A7A7A!important;}")); } elseif ($action == 'get_cur_date') { echo FormatDate("j F G:i", time() + CTimeZone::GetOffset()); } elseif ($action == 'save_sticker') { if (isset($_POST['marker']['adjust'])) { $markerAdjust = serialize($_POST['marker']['adjust']); } else { $markerAdjust = ""; } $ID = CSticker::Edit(array('arFields' => array('ID' => intVal($_POST['id']), 'PAGE_URL' => $_POST['page_url'], 'PAGE_TITLE' => $_POST['page_title'], 'SITE_ID' => $_REQUEST['site_id'], 'PERSONAL' => $_POST['personal'] == 'Y' ? 'Y' : 'N', 'CONTENT' => $_POST['content'], 'POS_TOP' => intVal($_POST['top']), 'POS_LEFT' => intVal($_POST['left']), 'WIDTH' => intVal($_POST['width']), 'HEIGHT' => intVal($_POST['height']), 'COLOR' => intVal($_POST['color']), 'COLLAPSED' => $_POST['collapsed'] == 'Y' ? 'Y' : 'N', 'COMPLETED' => $_POST['completed'] == 'Y' ? 'Y' : 'N', 'CLOSED' => $_POST['closed'] == 'Y' ? 'Y' : 'N', 'DELETED' => $_POST['deleted'] == 'Y' ? 'Y' : 'N', 'MARKER_TOP' => isset($_POST['marker']['top']) ? intVal($_POST['marker']['top']) : 0, 'MARKER_LEFT' => isset($_POST['marker']['left']) ? intVal($_POST['marker']['left']) : 0, 'MARKER_WIDTH' => isset($_POST['marker']['width']) ? intVal($_POST['marker']['width']) : 0, 'MARKER_HEIGHT' => isset($_POST['marker']['height']) ? intVal($_POST['marker']['height']) : 0, 'MARKER_ADJUST' => $markerAdjust))); CUserOptions::SetOption('fileman', "stickers_last_color", intVal($_POST['color'])); if ($ID > 0) { ?> <script> window.__bxst_result['<?php echo intVal($_POST['reqid']);
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } // Light Visual BB Editor if (CModule::IncludeModule("fileman")) { ?> <script> // Submit form by ctrl+enter window.blogCommentCtrlEnterHandler = function(e) { submitComment(); }; </script> <?php $LHE = new CLightHTMLEditor(); $LHE->Show(array('id' => 'LHEPhotoBlogCom', 'width' => $arParams['EDITOR_WIDTH'], 'height' => $arParams['EDITOR_DEFAULT_HEIGHT'], 'inputId' => 'comment', 'inputName' => 'comment', 'content' => "", 'bUseFileDialogs' => false, 'bUseMedialib' => false, 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'Strike', 'Quote'), 'jsObjName' => 'oBlogComLHE', 'bSaveOnBlur' => false, 'BBCode' => true, 'bResizable' => false, 'bQuoteFromSelection' => true, 'ctrlEnterHandler' => 'blogCommentCtrlEnterHandler', 'bSetDefaultCodeView' => false, 'bBBParseImageSize' => true)); }
<?php } else { ?> <form action="?gdhtml=<?php echo $id; ?> " method="post" id="gdf<?php echo $id; ?> "> <?php CModule::IncludeModule("fileman"); $LHE = new CLightHTMLEditor(); $LHE->Show(array('jsObjName' => 'oGadgetLHE', 'inputName' => 'html_content', 'content' => $content, 'width' => '100%', 'height' => '200px', 'bResizable' => true, 'bUseFileDialogs' => false, 'bUseMedialib' => false, 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'Strike', 'RemoveFormat', 'CreateLink', 'DeleteLink', 'Image', 'ForeColor', 'InsertOrderedList', 'InsertUnorderedList', 'Outdent', 'Indent', 'FontList', 'FontSizeList', 'Source'), 'bSaveOnBlur' => false, 'BBCode' => true, 'bBBParseImageSize' => true, 'ctrlEnterHandler' => 'gdhtmlsave')); ?> <input type="hidden" name="gdhtmlform" value="Y"> <?php if ($arParams["MULTIPLE"] == "Y") { ?> <input type="hidden" name="dt_page" value="<?php echo $arParams["DESKTOP_PAGE"]; ?> "> <?php } ?> <?php echo bitrix_sessid_post(); ?>
ob_end_clean(); $arResult['FIELDS']['tab_1'][] = array('id' => 'WEB', 'name' => GetMessage('CRM_FIELD_WEB'), 'type' => 'custom', 'value' => $sVal); ob_start(); $APPLICATION->IncludeComponent('bitrix:crm.field_multi.edit', 'new', array('FM_MNEMONIC' => 'CONFM', 'ENTITY_ID' => 'CONTACT', 'ELEMENT_ID' => $arResult['ELEMENT']['ID'], 'TYPE_ID' => 'IM', 'VALUES' => isset($arResult['ELEMENT']['FM']) ? $arResult['ELEMENT']['FM'] : ''), null, array('HIDE_ICONS' => 'Y')); $sVal = ob_get_contents(); ob_end_clean(); $arResult['FIELDS']['tab_1'][] = array('id' => 'IM', 'name' => GetMessage('CRM_FIELD_MESSENGER'), 'type' => 'custom', 'value' => $sVal); if (CCrmCompany::CheckReadPermission()) { $arResult['FIELDS']['tab_1'][] = array('id' => 'COMPANY_ID', 'name' => GetMessage('CRM_FIELD_COMPANY_ID'), 'type' => 'crm_entity_selector', 'componentParams' => array('ENTITY_TYPE' => 'COMPANY', 'INPUT_NAME' => 'COMPANY_ID', 'NEW_INPUT_NAME' => CCrmCompany::CheckCreatePermission() ? 'NEW_COMPANY_ID' : '', 'INPUT_VALUE' => isset($arResult['ELEMENT']['COMPANY_ID']) ? $arResult['ELEMENT']['COMPANY_ID'] : '', 'FORM_NAME' => $arResult['FORM_ID'], 'MULTIPLE' => 'N', 'NAME_TEMPLATE' => \Bitrix\Crm\Format\PersonNameFormatter::getFormat())); } $arResult['FIELDS']['tab_1'][] = array('id' => 'POST', 'name' => GetMessage('CRM_FIELD_POST'), 'params' => array('size' => 50), 'type' => 'text', 'value' => isset($arResult['ELEMENT']['~POST']) ? $arResult['ELEMENT']['~POST'] : ''); $arResult['FIELDS']['tab_1'][] = array('id' => 'ADDRESS', 'name' => GetMessage('CRM_FIELD_ADDRESS'), 'type' => 'address', 'componentParams' => array('SERVICE_URL' => '/bitrix/components/bitrix/crm.contact.edit/ajax.php?siteID=' . SITE_ID . '&' . bitrix_sessid_get(), 'DATA' => array('ADDRESS' => array('NAME' => 'ADDRESS', 'IS_MULTILINE' => true, 'VALUE' => isset($arResult['ELEMENT']['~ADDRESS']) ? $arResult['ELEMENT']['~ADDRESS'] : ''), 'ADDRESS_2' => array('NAME' => 'ADDRESS_2', 'VALUE' => isset($arResult['ELEMENT']['~ADDRESS_2']) ? $arResult['ELEMENT']['~ADDRESS_2'] : ''), 'CITY' => array('NAME' => 'ADDRESS_CITY', 'VALUE' => isset($arResult['ELEMENT']['~ADDRESS_CITY']) ? $arResult['ELEMENT']['~ADDRESS_CITY'] : ''), 'REGION' => array('NAME' => 'ADDRESS_REGION', 'VALUE' => isset($arResult['ELEMENT']['~ADDRESS_REGION']) ? $arResult['ELEMENT']['~ADDRESS_REGION'] : ''), 'PROVINCE' => array('NAME' => 'ADDRESS_PROVINCE', 'VALUE' => isset($arResult['ELEMENT']['~ADDRESS_PROVINCE']) ? $arResult['ELEMENT']['~ADDRESS_PROVINCE'] : ''), 'POSTAL_CODE' => array('NAME' => 'ADDRESS_POSTAL_CODE', 'VALUE' => isset($arResult['ELEMENT']['~ADDRESS_POSTAL_CODE']) ? $arResult['ELEMENT']['~ADDRESS_POSTAL_CODE'] : ''), 'COUNTRY' => array('NAME' => 'ADDRESS_COUNTRY', 'VALUE' => isset($arResult['ELEMENT']['~ADDRESS_COUNTRY']) ? $arResult['ELEMENT']['~ADDRESS_COUNTRY'] : '', 'LOCALITY' => array('TYPE' => 'COUNTRY', 'NAME' => 'ADDRESS_COUNTRY_CODE', 'VALUE' => isset($arResult['ELEMENT']['~ADDRESS_COUNTRY_CODE']) ? $arResult['ELEMENT']['~ADDRESS_COUNTRY_CODE'] : ''))))); ob_start(); $ar = array('inputName' => 'COMMENTS', 'inputId' => 'COMMENTS', 'height' => '180', 'content' => isset($arResult['ELEMENT']['~COMMENTS']) ? $arResult['ELEMENT']['~COMMENTS'] : '', 'bUseFileDialogs' => false, 'bFloatingToolbar' => false, 'bArisingToolbar' => false, 'bResizable' => true, 'bSaveOnBlur' => true, 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'Strike', 'BackColor', 'ForeColor', 'CreateLink', 'DeleteLink', 'InsertOrderedList', 'InsertUnorderedList', 'Outdent', 'Indent')); $LHE = new CLightHTMLEditor(); $LHE->Show($ar); $sVal = ob_get_contents(); ob_end_clean(); $arResult['FIELDS']['tab_1'][] = array('id' => 'COMMENTS', 'name' => GetMessage('CRM_FIELD_COMMENTS'), 'params' => array(), 'type' => 'vertical_container', 'value' => $sVal); $arResult['FIELDS']['tab_1'][] = array('id' => 'OPENED', 'name' => GetMessage('CRM_FIELD_OPENED'), 'type' => 'vertical_checkbox', 'params' => array(), 'value' => isset($arResult['ELEMENT']['OPENED']) ? $arResult['ELEMENT']['OPENED'] : true, 'title' => GetMessage('CRM_FIELD_OPENED_TITLE')); $arResult['FIELDS']['tab_1'][] = array('id' => 'EXPORT', 'name' => GetMessage('CRM_FIELD_EXPORT'), 'type' => 'vertical_checkbox', 'params' => array(), 'value' => isset($arResult['ELEMENT']['EXPORT']) ? $arResult['ELEMENT']['EXPORT'] : 'Y'); $arResult['FIELDS']['tab_1'][] = array('id' => 'section_additional', 'name' => GetMessage('CRM_SECTION_ADDITIONAL'), 'type' => 'section'); $arResult['FIELDS']['tab_1'][] = array('id' => 'TYPE_ID', 'name' => GetMessage('CRM_FIELD_TYPE_ID'), 'type' => 'list', 'items' => $arResult['TYPE_LIST'], 'value' => isset($arResult['ELEMENT']['TYPE_ID']) ? $arResult['ELEMENT']['TYPE_ID'] : ''); $arResult['FIELDS']['tab_1'][] = array('id' => 'ASSIGNED_BY_ID', 'componentParams' => array('NAME' => 'crm_contact_edit_resonsible', 'INPUT_NAME' => 'ASSIGNED_BY_ID', 'SEARCH_INPUT_NAME' => 'ASSIGNED_BY_NAME', 'NAME_TEMPLATE' => $arParams['NAME_TEMPLATE']), 'name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID'), 'type' => 'intranet_user_search', 'value' => isset($arResult['ELEMENT']['ASSIGNED_BY_ID']) ? $arResult['ELEMENT']['ASSIGNED_BY_ID'] : $USER->GetID()); $arResult['FIELDS']['tab_1'][] = array('id' => 'SOURCE_ID', 'name' => GetMessage('CRM_FIELD_SOURCE_ID'), 'type' => 'list', 'items' => $arResult['SOURCE_LIST'], 'value' => isset($arResult['ELEMENT']['~SOURCE_ID']) ? $arResult['ELEMENT']['~SOURCE_ID'] : ''); $arResult['FIELDS']['tab_1'][] = array('id' => 'SOURCE_DESCRIPTION', 'name' => GetMessage('CRM_FIELD_SOURCE_DESCRIPTION'), 'type' => 'textarea', 'params' => array(), 'value' => isset($arResult['ELEMENT']['SOURCE_DESCRIPTION']) ? $arResult['ELEMENT']['SOURCE_DESCRIPTION'] : ''); $CCrmUserType->AddFields($arResult['FIELDS']['tab_1'], $arResult['ELEMENT']['ID'], $arResult['FORM_ID'], $bConvert ? isset($arParams['~VARS_FROM_FORM']) && $arParams['~VARS_FROM_FORM'] === true : $varsFromForm, false, false, array('FILE_URL_TEMPLATE' => "/bitrix/components/bitrix/crm.contact.show/show_file.php?ownerId=#owner_id#&fieldName=#field_name#&fileId=#file_id#")); if (IsModuleInstalled('bizproc')) { CBPDocument::AddShowParameterInit('crm', 'only_users', 'CONTACT'); $bizProcIndex = 0; if (!isset($arDocumentStates)) {
function initLHEForIdea($id, $arResult, $arParams) { customizeLHEForIdea($id, $id); $arSmiles = array(); if (!empty($arResult["Smiles"])) { foreach ($arResult["Smiles"] as $arSmile) { $arSmiles[] = array('name' => $arSmile["~LANG_NAME"], 'path' => "/bitrix/images/blog/smile/" . $arSmile["IMAGE"], 'code' => str_replace("\\\\", "\\", $arSmile["TYPE"])); } } $bbCode = true; if ($arResult["allow_html"] == "Y" && ($arResult["PostToShow"]["DETAIL_TEXT_TYPE"] == "html" && $_REQUEST["load_editor"] != "N" || $_REQUEST["load_editor"] == "Y")) { $bbCode = false; } // Detect necessity of first convertion content from BB-code to HTML in editor. $bConvertContentFromBBCodes = !$bbCode && $_REQUEST["load_editor"] == "Y" && !isset($_REQUEST['preview']) && !isset($_REQUEST['save']) && !isset($_REQUEST['apply']) && !isset($_REQUEST['draft']); $LHE = new CLightHTMLEditor(); ?> <script> BX.Idea.obj['<?php echo $id; ?> '] = true; BX.Idea['<?php echo $id; ?> Images'] = []; <?php foreach ($arResult["Images"] as $aImg) { ?> BX.Idea['<?php echo $id; ?> Images'].push('<?php echo $aImg["ID"]; ?> ');<?php } ?> BX.Idea['<?php echo $id; ?> Settings'] = { IMAGE_MAX_WIDTH : <?php echo intval($arParams['IMAGE_MAX_WIDTH']); ?> , FORM_NAME : '<?php echo $arResult["FORM_NAME"]; ?> ' }; </script> <div id="edit-post-text"> <?php $LHE->Show(array('id' => $id, 'height' => $arParams['EDITOR_DEFAULT_HEIGHT'], 'inputId' => 'POST_MESSAGE_HTML', 'inputName' => 'POST_MESSAGE', 'content' => $arResult["PostToShow"]["~DETAIL_TEXT"], 'bUseFileDialogs' => false, 'bUseMedialib' => false, 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'Strike', 'ForeColor', 'FontList', 'FontSizeList', 'RemoveFormat', 'Quote', 'Code', 'InsertCut', 'CreateLink', 'DeleteLink', 'Image', 'BlogImage', $arResult["allowVideo"] == "Y" ? 'BlogInputVideo' : '', 'Table', 'InsertOrderedList', 'InsertUnorderedList', 'SmileList', 'Source'), 'jsObjName' => 'o' . $id, 'arSmiles' => $arSmiles, 'smileCountInToolbar' => $arParams['SMILES_COUNT'], 'bSaveOnBlur' => false, 'BBCode' => $bbCode, 'bConvertContentFromBBCodes' => $bConvertContentFromBBCodes, 'bQuoteFromSelection' => true, 'bResizable' => $arParams['EDITOR_RESIZABLE'], 'bSetDefaultCodeView' => $arParams['EDITOR_CODE_DEFAULT'], 'bBBParseImageSize' => true)); ?> </div><?php }
function getControlHtml($name, $value, $maxLength = 255) { global $APPLICATION; $result = ''; if (!$this->initHtml) { $this->initHtml = true; $APPLICATION->AddHeadScript('/bitrix/js/iblock/iblock_edit.js'); $result .= '<div id="popup_editor_start" style="display: none">'; ob_start(); $LHE = new CLightHTMLEditor(); $LHE->Show(array('height' => $height - 40, 'width' => '100%', 'content' => '', 'bResizable' => true, 'bUseFileDialogs' => false, 'bFloatingToolbar' => false, 'bArisingToolbar' => true, 'bAutoResize' => true, 'bSaveOnBlur' => true, 'bInitByJS' => true, 'jsObjName' => 'popup_editor', 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'Strike', 'CreateLink', 'DeleteLink', 'Source', 'BackColor', 'ForeColor'), 'id' => 'popup_editor_id')); $result .= ob_get_contents(); ob_end_clean(); $result .= '</div>'; $result .= '<script> var popup_editor_dialog; var popup_editor_manager = new JCPopupEditor(' . $this->width . ', ' . $this->height . '); </script>'; } $value = trim($value); if ($value) { $value = CTextParser::closeTags($value); } $hiddenId = preg_replace('/[^a-zA-Z0-9_-]/', '-', $name); $demoId = $hiddenId . '-DEMO'; $result .= '<input type="hidden" value="' . htmlspecialcharsbx($value) . '" name="' . htmlspecialcharsbx($name) . '" id="' . htmlspecialcharsbx($hiddenId) . '" onchange="' . htmlspecialcharsbx("BX('" . CUtil::JSEscape($demoId) . "').innerHTML = this.value") . '" >'; $result .= '<div id="' . htmlspecialcharsbx($demoId) . '">' . $value . '</div>'; $jsLink = 'javascript:popup_editor_manager.openEditor(\'' . CUtil::JSEscape($hiddenId) . '\', ' . intval($maxLength) . ')'; $result .= '<a class="bx-action-href" href="' . htmlspecialcharsbx($jsLink) . '">' . GetMessage('IBLOCK_AT_POPUP_EDIT') . '</a>'; return $result; }
} elseif ($i == 0) { $value = intval($propertyID) <= 0 ? "" : $arResult["PROPERTY_LIST_FULL"][$propertyID]["DEFAULT_VALUE"]; $description = ""; } else { $value = ""; $description = ""; } echo call_user_func_array($arResult["PROPERTY_LIST_FULL"][$propertyID]["GetPublicEditHTML"], array($arResult["PROPERTY_LIST_FULL"][$propertyID], array("VALUE" => $value, "DESCRIPTION" => $description), array("VALUE" => "PROPERTY[" . $propertyID . "][" . $i . "][VALUE]", "DESCRIPTION" => "PROPERTY[" . $propertyID . "][" . $i . "][DESCRIPTION]", "FORM_NAME" => "iblock_add"))); } break; case "TAGS": $APPLICATION->IncludeComponent("bitrix:search.tags.input", "", array("VALUE" => $arResult["ELEMENT"][$propertyID], "NAME" => "PROPERTY[" . $propertyID . "][0]", "TEXT" => 'size="' . $arResult["PROPERTY_LIST_FULL"][$propertyID]["COL_COUNT"] . '"'), null, array("HIDE_ICONS" => "Y")); break; case "HTML": $LHE = new CLightHTMLEditor(); $LHE->Show(array('id' => preg_replace("/[^a-z0-9]/i", '', "PROPERTY[" . $propertyID . "][0]"), 'width' => '100%', 'height' => '200px', 'inputName' => "PROPERTY[" . $propertyID . "][0]", 'content' => $arResult["ELEMENT"][$propertyID], 'bUseFileDialogs' => false, 'bFloatingToolbar' => false, 'bArisingToolbar' => false, 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'RemoveFormat', 'CreateLink', 'DeleteLink', 'Image', 'Video', 'BackColor', 'ForeColor', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull', 'InsertOrderedList', 'InsertUnorderedList', 'Outdent', 'Indent', 'StyleList', 'HeaderList', 'FontList', 'FontSizeList'))); break; case "T": for ($i = 0; $i < $inputNum; $i++) { if ($arParams["ID"] > 0 || count($arResult["ERRORS"]) > 0) { $value = intval($propertyID) > 0 ? $arResult["ELEMENT_PROPERTIES"][$propertyID][$i]["VALUE"] : $arResult["ELEMENT"][$propertyID]; } elseif ($i == 0) { $value = intval($propertyID) > 0 ? "" : $arResult["PROPERTY_LIST_FULL"][$propertyID]["DEFAULT_VALUE"]; } else { $value = ""; } ?> <div class="row"> <textarea <?php if (in_array($propertyID, $arResult["PROPERTY_REQUIRED"])) {
function DrawPropertyFormElement( $propertyID, $arResult, $arParams = array() ){ $once = false; ob_start(); if (intval($propertyID) > 0) { if ( $arResult["PROPERTY_LIST_FULL"][$propertyID]["PROPERTY_TYPE"] == "T" && $arResult["PROPERTY_LIST_FULL"][$propertyID]["ROW_COUNT"] == "1" ) $arResult["PROPERTY_LIST_FULL"][$propertyID]["PROPERTY_TYPE"] = "S"; elseif ( ( $arResult["PROPERTY_LIST_FULL"][$propertyID]["PROPERTY_TYPE"] == "S" || $arResult["PROPERTY_LIST_FULL"][$propertyID]["PROPERTY_TYPE"] == "N" ) && $arResult["PROPERTY_LIST_FULL"][$propertyID]["ROW_COUNT"] > "1" ) $arResult["PROPERTY_LIST_FULL"][$propertyID]["PROPERTY_TYPE"] = "T"; } elseif (($propertyID == "TAGS") && CModule::IncludeModule('search')) $arResult["PROPERTY_LIST_FULL"][$propertyID]["PROPERTY_TYPE"] = "TAGS"; if ($arResult["PROPERTY_LIST_FULL"][$propertyID]["MULTIPLE"] == "Y") { $inputNum = ($arParams["ID"] > 0 || count($arResult["ERRORS"]) > 0) ? count($arResult["ELEMENT_PROPERTIES"][$propertyID]) : 0; $inputNum += $arResult["PROPERTY_LIST_FULL"][$propertyID]["MULTIPLE_CNT"]; } else { $inputNum = 1; } if($arResult["PROPERTY_LIST_FULL"][$propertyID]["GetPublicEditHTML"]) $INPUT_TYPE = "USER_TYPE"; else $INPUT_TYPE = $arResult["PROPERTY_LIST_FULL"][$propertyID]["PROPERTY_TYPE"]; switch ($INPUT_TYPE): case "USER_TYPE": for ($i = 0; $i<$inputNum; $i++) { if ($arParams["ID"] > 0 || count($arResult["ERRORS"]) > 0) { $value = intval($propertyID) > 0 ? $arResult["ELEMENT_PROPERTIES"][$propertyID][$i]["~VALUE"] : $arResult["ELEMENT"][$propertyID]; $description = intval($propertyID) > 0 ? $arResult["ELEMENT_PROPERTIES"][$propertyID][$i]["DESCRIPTION"] : ""; } elseif ($i == 0) { $value = intval($propertyID) <= 0 ? "" : $arResult["PROPERTY_LIST_FULL"][$propertyID]["DEFAULT_VALUE"]; $description = ""; } else { $value = ""; $description = ""; } echo call_user_func_array($arResult["PROPERTY_LIST_FULL"][$propertyID]["GetPublicEditHTML"], array( $arResult["PROPERTY_LIST_FULL"][$propertyID], array( "VALUE" => $value, "DESCRIPTION" => $description, ), array( "VALUE" => "PROPERTY[".$propertyID."][".$i."][VALUE]", "DESCRIPTION" => "PROPERTY[".$propertyID."][".$i."][DESCRIPTION]", "FORM_NAME"=>"iblock_add", ), )); ?><? } break; case "TAGS": $APPLICATION->IncludeComponent( "bitrix:search.tags.input", "", array( "VALUE" => $arResult["ELEMENT"][$propertyID], "NAME" => "PROPERTY[".$propertyID."][0]", "TEXT" => 'size="'.$arResult["PROPERTY_LIST_FULL"][$propertyID]["COL_COUNT"].'"', ), null, array("HIDE_ICONS"=>"Y") ); break; case "HTML": $LHE = new CLightHTMLEditor; $LHE->Show(array( 'id' => preg_replace("/[^a-z0-9]/i", '', "PROPERTY[".$propertyID."][0]"), 'width' => '100%', 'height' => '200px', 'inputName' => "PROPERTY[".$propertyID."][0]", 'content' => $arResult["ELEMENT"][$propertyID], 'bUseFileDialogs' => false, 'bFloatingToolbar' => false, 'bArisingToolbar' => false, 'toolbarConfig' => array( 'Bold', 'Italic', 'Underline', 'RemoveFormat', 'CreateLink', 'DeleteLink', 'Image', 'Video', 'BackColor', 'ForeColor', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull', 'InsertOrderedList', 'InsertUnorderedList', 'Outdent', 'Indent', 'StyleList', 'HeaderList', 'FontList', 'FontSizeList', ), )); break; case "T": for ($i = 0; $i<$inputNum; $i++) { if ($arParams["ID"] > 0 || count($arResult["ERRORS"]) > 0) { $value = intval($propertyID) > 0 ? $arResult["ELEMENT_PROPERTIES"][$propertyID][$i]["VALUE"] : $arResult["ELEMENT"][$propertyID]; } elseif ($i == 0) { $value = intval($propertyID) > 0 ? "" : $arResult["PROPERTY_LIST_FULL"][$propertyID]["DEFAULT_VALUE"]; } else { $value = ""; } ?> <textarea id="ib_prop_<?php echo $propertyID; ?> " cols="<?php echo $arResult["PROPERTY_LIST_FULL"][$propertyID]["COL_COUNT"]; ?> " rows="<?php echo $arResult["PROPERTY_LIST_FULL"][$propertyID]["ROW_COUNT"]; ?> " name="PROPERTY[<?php echo $propertyID; ?> ][<?php echo $i; ?> ]"><?php echo $value; ?> </textarea> <? } break; case "S": case "N": for ($i = 0; $i<$inputNum; $i++) { if ($arParams["ID"] > 0 || count($arResult["ERRORS"]) > 0) { $value = intval($propertyID) > 0 ? $arResult["ELEMENT_PROPERTIES"][$propertyID][$i]["VALUE"] : $arResult["ELEMENT"][$propertyID]; } elseif ($i == 0) { $value = intval($propertyID) <= 0 ? "" : $arResult["PROPERTY_LIST_FULL"][$propertyID]["DEFAULT_VALUE"]; } else { $value = ""; } ?> <input type="text" name="PROPERTY[<?php echo $propertyID; ?> ][<?php echo $i; ?> ]" size="25" value="<?php echo $value; ?> " <?if(!empty ($arResult["PROPERTY_LIST_FULL"][$propertyID]["HINT"])){ ?> title="<?php echo $arResult["PROPERTY_LIST_FULL"][$propertyID]["HINT"]; ?> "<? } ?> class="form-hint" /><? if($arResult["PROPERTY_LIST_FULL"][$propertyID]["USER_TYPE"] == "DateTime"):?><? $APPLICATION->IncludeComponent( 'bitrix:main.calendar', '', array( 'FORM_NAME' => 'iblock_add', 'INPUT_NAME' => "PROPERTY[".$propertyID."][".$i."]", 'INPUT_VALUE' => $value, ), null, array('HIDE_ICONS' => 'Y') ); ?><small><?php echo GetMessage("IBLOCK_FORM_DATE_FORMAT"); echo FORMAT_DATETIME; ?> </small><? endif; ?><? if(!empty ($arResult["PROPERTY_LIST_FULL"][$propertyID]["HINT"])){?> <span title="<?php echo $arResult["PROPERTY_LIST_FULL"][$propertyID]["HINT"]; ?> " class="form-hint"></span> <?} } break; case "F": for ($i = 0; $i<$inputNum; $i++) { $value = intval($propertyID) > 0 ? $arResult["ELEMENT_PROPERTIES"][$propertyID][$i]["VALUE"] : $arResult["ELEMENT"][$propertyID]; ?> <input type="hidden" name="PROPERTY[<?php echo $propertyID; ?> ][<?php echo $arResult["ELEMENT_PROPERTIES"][$propertyID][$i]["VALUE_ID"] ? $arResult["ELEMENT_PROPERTIES"][$propertyID][$i]["VALUE_ID"] : $i; ?> ]" value="<?php echo $value; ?> " /> <input type="file" size="<?php echo $arResult["PROPERTY_LIST_FULL"][$propertyID]["COL_COUNT"]; ?> " name="PROPERTY_FILE_<?php echo $propertyID; ?> _<?php echo $arResult["ELEMENT_PROPERTIES"][$propertyID][$i]["VALUE_ID"] ? $arResult["ELEMENT_PROPERTIES"][$propertyID][$i]["VALUE_ID"] : $i; ?> " /><br /> <? if (!empty($value) && is_array($arResult["ELEMENT_FILES"][$value])) { ?> <input type="checkbox" name="DELETE_FILE[<?php echo $propertyID; ?> ][<?php echo $arResult["ELEMENT_PROPERTIES"][$propertyID][$i]["VALUE_ID"] ? $arResult["ELEMENT_PROPERTIES"][$propertyID][$i]["VALUE_ID"] : $i; ?> ]" id="file_delete_<?php echo $propertyID; ?> _<?php echo $i; ?> " value="Y" /><label for="file_delete_<?php echo $propertyID; ?> _<?php echo $i; ?> "><?php echo GetMessage("IBLOCK_FORM_FILE_DELETE"); ?> </label> <? if ($arResult["ELEMENT_FILES"][$value]["IS_IMAGE"]) { ?> <img src="<?php echo $arResult["ELEMENT_FILES"][$value]["SRC"]; ?> " height="<?php echo $arResult["ELEMENT_FILES"][$value]["HEIGHT"]; ?> " width="<?php echo $arResult["ELEMENT_FILES"][$value]["WIDTH"]; ?> " border="0" /><br /> <? } else { ?> <?php echo GetMessage("IBLOCK_FORM_FILE_NAME"); ?> : <?php echo $arResult["ELEMENT_FILES"][$value]["ORIGINAL_NAME"]; ?> <br /> <?php echo GetMessage("IBLOCK_FORM_FILE_SIZE"); ?> : <?php echo $arResult["ELEMENT_FILES"][$value]["FILE_SIZE"]; ?> b<br /> [<a href="<?php echo $arResult["ELEMENT_FILES"][$value]["SRC"]; ?> "><?php echo GetMessage("IBLOCK_FORM_FILE_DOWNLOAD"); ?> </a>]<br /> <? } } } break; case "L": if ($arResult["PROPERTY_LIST_FULL"][$propertyID]["LIST_TYPE"] == "C") $type = $arResult["PROPERTY_LIST_FULL"][$propertyID]["MULTIPLE"] == "Y" ? "checkbox" : "radio"; else $type = $arResult["PROPERTY_LIST_FULL"][$propertyID]["MULTIPLE"] == "Y" ? "multiselect" : "dropdown"; switch ($type): case "checkbox": case "radio": foreach ($arResult["PROPERTY_LIST_FULL"][$propertyID]["ENUM"] as $key => $arEnum) { $checked = false; if ($arParams["ID"] > 0 || count($arResult["ERRORS"]) > 0) { if (is_array($arResult["ELEMENT_PROPERTIES"][$propertyID])) { foreach ($arResult["ELEMENT_PROPERTIES"][$propertyID] as $arElEnum) { if ($arElEnum["VALUE"] == $key) { $checked = true; break; } } } } else { if ($arEnum["DEF"] == "Y") $checked = true; } ?> <input id="ib_prop_<?php echo $propertyID; ?> " type="<?php echo $type; ?> " name="PROPERTY[<?php echo $propertyID; ?> ]<?php echo $type == "checkbox" ? "[" . $key . "]" : ""; ?> " value="<?php echo $key; ?> " id="property_<?php echo $key; ?> "<?php echo $checked ? " checked=\"checked\"" : ""; ?> /><label for="property_<?php echo $key; ?> "><?php echo $arEnum["VALUE"]; ?> </label> <? } break; case "dropdown": case "multiselect": ?> <select id="ib_prop_<?php echo $propertyID; ?> " name="PROPERTY[<?php echo $propertyID; ?> ]<?php echo $type == "multiselect" ? "[]\" size=\"" . $arResult["PROPERTY_LIST_FULL"][$propertyID]["ROW_COUNT"] . "\" multiple=\"multiple" : ""; ?> "> <option value=""><?echo GetMessage("CT_BIEAF_PROPERTY_VALUE_NA")?></option> <? if (intval($propertyID) > 0) $sKey = "ELEMENT_PROPERTIES"; else $sKey = "ELEMENT"; foreach ($arResult["PROPERTY_LIST_FULL"][$propertyID]["ENUM"] as $key => $arEnum) { $checked = false; if ($arParams["ID"] > 0 || count($arResult["ERRORS"]) > 0) { foreach ($arResult[$sKey][$propertyID] as $elKey => $arElEnum) { if ($key == $arElEnum["VALUE"]) { $checked = true; break; } } } else { if ($arEnum["DEF"] == "Y") $checked = true; } ?> <option value="<?php echo $key; ?> " <?php echo $checked ? " selected=\"selected\"" : ""; ?> ><?php echo $arEnum["VALUE"]; ?> </option> <? } ?> </select> <? break; endswitch; break; case "E": $disable=""; if ($arParams["SET_VALUE"][$propertyID]["DISABLE"]=="Y"){?> <input type="hidden" value="<?php echo $arParams["SET_VALUE"][$propertyID]["VALUE"]; ?> " name="PROPERTY[<?php echo $propertyID; ?> ][0]" /><span><?php echo $arResult["PRELOAD_VALUES"][$propertyID][$arParams["SET_VALUE"][$propertyID]["VALUE"]]["NAME"]; ?> </span> <? }else{ ?> <select id="ib_prop_<?php echo $propertyID; ?> " name="PROPERTY[<?php echo $propertyID; ?> ][0]<?php echo $type == "multiselect" ? "[]\" size=\"" . $arResult["PROPERTY_LIST_FULL"][$propertyID]["ROW_COUNT"] . "\" multiple=\"multiple" : ""; ?> "> <option value=""><?echo GetMessage("CT_BIEAF_PROPERTY_VALUE_NA")?></option> <? foreach ($arResult["PRELOAD_VALUES"][$propertyID] as $key => $arData ){ ?> <? $checked = false; if ($arParams["SET_VALUE"][$propertyID]["VALUE"] == $key) $checked=true; foreach($arResult["ELEMENT_PROPERTIES"][$propertyID] as $result ) if ( $result["VALUE"] == $key ) $checked = true; $attributes = specialAttributes( $propertyID, $key, $arResult["PRELOAD_VALUES"][$propertyID], $arParams ); ?> <option value="<?php echo $key; ?> " <?php echo $checked ? " selected=\"selected\"" : ""; ?> <?php echo $attributes; ?> ><?php echo $arData["NAME"]; ?> </option> <? }?> </select> <? } break; endswitch; $result = ob_get_contents(); ob_end_clean(); return $result; }
$LHE->Show(array( 'id' => 'LHEBlogCom', 'height' => $arParams['EDITOR_DEFAULT_HEIGHT'], 'inputId' => 'comment', 'inputName' => 'comment', 'content' => "", 'bUseFileDialogs' => false, 'bUseMedialib' => false, 'toolbarConfig' => array( 'Bold', 'Italic', 'Underline', 'RemoveFormat', 'Quote', ((!$arResult["NoCommentUrl"]) ? 'CreateLink' : 'CreateLinkNC'), ((!$arResult["NoCommentUrl"]) ? 'DeleteLink' : ''), 'Image', (($arResult["allowImageUpload"] == "Y") ? 'BlogImage' : ''), (($arResult["allowVideo"] == "Y") ? 'BlogInputVideo' : ''), 'Table', 'Justify', 'InsertOrderedList', 'InsertUnorderedList', 'SmileList', ), 'jsObjName' => 'oBlogComLHE', 'arSmiles' => $arSmiles, 'smileCountInToolbar' => $arParams['SMILES_COUNT'], 'bSaveOnBlur' => false, 'BBCode' => true, 'bResizable' => $arParams['EDITOR_RESIZABLE'], 'bAutoResize' => true, 'autoResizeOffset' => 40, 'autoResizeMaxHeight' => 300, 'autoResizeSaveSize' => false, 'bQuoteFromSelection' => true, 'ctrlEnterHandler' => 'blogCommentCtrlEnterHandler', // Ctrl+Enter handler name in global namespace 'bSetDefaultCodeView' => $arParams['EDITOR_CODE_DEFAULT'], // Set first view to CODE or to WYSIWYG 'bBBParseImageSize' => true // [IMG ID=XXX WEIGHT=5 HEIGHT=6], [IMGWEIGHT=5 HEIGHT=6]/image.gif[/IMG] ));
$GLOBALS['APPLICATION']->RestartBuffer(); Header('Content-Type: text/html; charset=' . LANG_CHARSET); $APPLICATION->IncludeComponent('bitrix:intranet.user.selector.new', '.default', array('MULTIPLE' => 'N', 'NAME' => $name, 'POPUP' => 'Y', 'SITE_ID' => SITE_ID), null, array('HIDE_ICONS' => 'Y')); __CrmCompanyShowEndHtmlResonse(); } if ($mode === 'GET_VISUAL_EDITOR') { if (!CCrmCompany::CheckUpdatePermission(0, $currentUserPermissions)) { __CrmCompanyShowEndHtmlResonse(); } $lheEditorID = isset($_POST['EDITOR_ID']) ? $_POST['EDITOR_ID'] : ''; $lheEditorName = isset($_POST['EDITOR_NAME']) ? $_POST['EDITOR_NAME'] : ''; CModule::IncludeModule('fileman'); $GLOBALS['APPLICATION']->RestartBuffer(); Header('Content-Type: text/html; charset=' . LANG_CHARSET); $emailEditor = new CLightHTMLEditor(); $emailEditor->Show(array('id' => $lheEditorID, 'height' => '250', 'BBCode' => false, 'bUseFileDialogs' => false, 'bFloatingToolbar' => false, 'bArisingToolbar' => false, 'bResizable' => false, 'autoResizeOffset' => 20, 'jsObjName' => $lheEditorName, 'bInitByJS' => false, 'bSaveOnBlur' => false, 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'Strike', 'BackColor', 'ForeColor', 'CreateLink', 'DeleteLink', 'InsertOrderedList', 'InsertUnorderedList', 'Outdent', 'Indent'))); __CrmCompanyShowEndHtmlResonse(); } if ($mode === 'GET_ENTITY_SIP_INFO') { $entityType = isset($_POST['ENITY_TYPE']) ? $_POST['ENITY_TYPE'] : ''; $m = null; if ($entityType === '' || preg_match('/^CRM_([A-Z]+)$/i', $entityType, $m) !== 1) { echo CUtil::PhpToJSObject(array('ERROR' => 'ENITY TYPE IS NOT DEFINED!')); die; } $entityTypeName = isset($m[1]) ? strtoupper($m[1]) : ''; if ($entityTypeName !== CCrmOwnerType::CompanyName) { echo CUtil::PhpToJSObject(array('ERROR' => 'ENITY TYPE IS NOT DEFINED IS NOT SUPPORTED IN CURRENT CONTEXT!')); die; } $entityID = isset($_POST['ENITY_ID']) ? intval($_POST['ENITY_ID']) : 0;
OnSave: function() {} }; }; // Submit form by ctrl+enter window.blogCommentCtrlEnterHandler = function(e) { oBlogComLHE.SaveContent(); if (document.forms.form_comment) document.forms.form_comment.submit(); }; document.forms.form_comment.onsubmit = function() { oBlogComLHE.SaveContent(); }; </script> <?php } AddEventHandler("fileman", "OnIncludeLightEditorScript", "CustomizeLHEForBlogComments"); } $arSmiles = array(); if (!empty($arResult["Smiles"])) { foreach ($arResult["Smiles"] as $arSmile) { $arSmiles[] = array('name' => $arSmile["~LANG_NAME"], 'path' => "/bitrix/images/blog/smile/" . $arSmile["IMAGE"], 'code' => str_replace("\\\\", "\\", $arSmile["TYPE"])); } } rsort($arSmiles); $LHE = new CLightHTMLEditor(); $LHE->Show(array('id' => 'LHEBlogCom', 'height' => $arParams['EDITOR_DEFAULT_HEIGHT'], 'inputId' => 'comment', 'inputName' => 'comment', 'content' => "", 'bUseFileDialogs' => false, 'bUseMedialib' => false, 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'Strike', 'ForeColor', 'FontList', 'FontSizeList', 'RemoveFormat', 'Quote', 'Code', !$arResult["NoCommentUrl"] ? 'CreateLink' : 'CreateLinkNC', !$arResult["NoCommentUrl"] ? 'DeleteLink' : '', 'Image', $arResult["allowVideo"] == "Y" ? 'BlogInputVideo' : '', 'Table', 'InsertOrderedList', 'InsertUnorderedList', 'SmileList', 'Source'), 'jsObjName' => 'oBlogComLHE', 'arSmiles' => $arSmiles, 'smileCountInToolbar' => $arParams['SMILES_COUNT'], 'bSaveOnBlur' => false, 'BBCode' => true, 'bResizable' => $arParams['EDITOR_RESIZABLE'], 'bQuoteFromSelection' => true, 'ctrlEnterHandler' => 'blogCommentCtrlEnterHandler', 'bSetDefaultCodeView' => $arParams['EDITOR_CODE_DEFAULT'], 'bBBParseImageSize' => true));
<input type="hidden" name="remove_comment" value="N" /> <?php echo bitrix_sessid_post(); ?> <div id="task-comments-form" class="task-comments-form"> <?php $arSmiles = array(); if (!empty($arResult["SMILES"])) { foreach ($arResult["SMILES"] as $arSmile) { $arSmiles[] = array('name' => $arSmile["NAME"], 'path' => $arSmile["IMAGE"], 'code' => str_replace("\\\\", "\\", $arSmile["TYPING"])); } } CModule::IncludeModule("fileman"); $LHE = new CLightHTMLEditor(); $LHE->Show(array('id' => "REVIEW_TEXT", 'content' => isset($arResult["~REVIEW_TEXT"]) ? $arResult["~REVIEW_TEXT"] : "", 'inputName' => "REVIEW_TEXT", 'inputId' => "", 'width' => "100%", 'height' => "200px", 'bUseFileDialogs' => false, 'BBCode' => true, 'bBBParseImageSize' => true, 'jsObjName' => "oLHE", 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'Strike', 'ForeColor', 'FontList', 'FontSizeList', 'RemoveFormat', 'Quote', 'Code', 'Image', 'CreateLink', 'DeleteLink', 'Table', 'InsertOrderedList', 'InsertUnorderedList', 'SmileList', 'Source'), 'smileCountInToolbar' => 1, 'arSmiles' => $arSmiles, 'ctrlEnterHandler' => 'tasksCommentCtrlEnterHandler', 'bResizable' => true, 'bAutoResize' => false, 'bQuoteFromSelection' => true, 'bBBParseImageSize' => true, 'documentCSS' => ' body blockquote.bx-quote { width: 90%; padding: 10px 17px !important; background:url("/bitrix/js/tasks/css/images/quote-gray.png") no-repeat left top #F7F7F7; color:#7D7D7D !important; margin:0 !important; } body pre.lhe-code { width: 90%; background-color:#F7F7F7 !important; color:#7D7D7D !important; font-family:"Courier New" !important; font-size:12px !important; padding:10px 17px !important; } ')); ?> </div> <span id="task-add_file" class="task-add_file"></span> <?php if ($arResult["SHOW_PANEL_ATTACH_IMG"] == "Y") { ?> <div class="reviews-reply-field reviews-reply-field-upload"> <?php $iCount = 0; if (!empty($arResult["REVIEW_FILES"])) { foreach ($arResult["REVIEW_FILES"] as $key => $val) { $iCount++; $iFileSize = intVal($val["FILE_SIZE"]); $size = array("B" => $iFileSize, "KB" => round($iFileSize / 1024, 2), "MB" => round($iFileSize / 1048576, 2));