<commit_before>jQuery(function($) {
	
	var composer = $('#composer');
	
	if (composer.length) {
		var main = composer.find('#composerContents'),
			txtConfirm = composer.data('confirm'),
			txtCancel = composer.data('cancel'),
			hasChanged = false,
			getIcon = function(name) {
				return composer.data('icon').replace(/TPL/g, name);
			},
			tools = composer.children('#composerTools'),
			themeDemo = tools.find('#themeDemo'),
			saveButton = composer.children('button').attr('disabled', 'disabled').prop('disabled', 'disabled'),
			cont = main.children('#composerCont'),
			tinymceurl = composer.data('tinymceurl'),
			htmlOptions = composer.myTinymceDataSearch(),
			simpleOptions = composer.myTinymceDataSearch('tinymcesimple_'),
			pluploadOptions = {
				showCancelAll: false,
				addFormVars: false,
				multi_selection: false,
				hideDelay: 750,
				filters: composer.data('plupload_filters'),
				flash_swf_url: composer.data('plupload_swf'),
				silverlight_xap_url: composer.data('plupload_xap'),
				texts: {
					browse: composer.data('plupload_browse'),
					waiting: composer.data('plupload_waiting'),
					error: composer.data('plupload_error'),
					cancel: composer.data('plupload_cancel'),
					complete: composer.data('plupload_complete'),
					cancelAll: composer.data('plupload_cancelall')
				},
				events: {
					BeforeUpload: function(up, file) {
						var compImg = $(up.settings.drop_element).closest('.composableImgCont');
						console.log(compImg.data('cfg'));
						up.settings.file_data_name = 'image',
						up.settings.multipart_params = {
							imageUpload: 1,
							cfg: compImg.data('cfg')
						};
						if (compImg.data('more'))
							up.settings.multipart_params.more = compImg.data('more');
					},
					FileUploaded: function(up, file, data) {
						var $data = $.parseJSON(data.response),
							compImg = $(up.settings.drop_element).closest('.composableImgCont'),
							textarea = compImg.find('textarea'),
							block = compImg.closest('.composerBlock');
						if (compImg.is('.composableImgBig')) {
							block.css('background-image', 'url('+$data.resized+')');
						} else if (!compImg.is('.composableImgMobile')) {
							compImg.find('img').attr('src', $data.resized);
						}
						if ($data.datas) {
							$.each($data.datas, function(k, v) {
								block.data(k, v);
							});
							block.trigger('composerImgChange');
						}
						compImg.addClass('composableImgExists');
						textarea.val(textarea.val()+"\n"+$data.file);
						changed();
					}
				}
			},
			changed = function() {
				if (!hasChanged) {
					hasChanged = true;
					saveButton.removeAttr('disabled').removeProp('disabled');
				}
			},
			initComposable = function(parent) {
				parent
					.find('.block_handler [required]').removeAttr('required').removeProp('required').end()<commit_msg>Update composer.js to use nyroPluploadDataSearch<commit_after>jQuery(function($) {
	
	var composer = $('#composer');
	
	if (composer.length) {
		var main = composer.find('#composerContents'),
			txtConfirm = composer.data('confirm'),
			txtCancel = composer.data('cancel'),
			hasChanged = false,
			getIcon = function(name) {
				return composer.data('icon').replace(/TPL/g, name);
			},
			tools = composer.children('#composerTools'),
			themeDemo = tools.find('#themeDemo'),
			saveButton = composer.children('button').attr('disabled', 'disabled').prop('disabled', 'disabled'),
			cont = main.children('#composerCont'),
			tinymceurl = composer.data('tinymceurl'),
			htmlOptions = composer.myTinymceDataSearch(),
			simpleOptions = composer.myTinymceDataSearch('tinymcesimple_'),
			pluploadOptions = composer.me.nyroPluploadDataSearch({
				showCancelAll: false,
				addFormVars: false,
				multi_selection: false,
				events: {
					BeforeUpload: function(up, file) {
						var compImg = $(up.settings.drop_element).closest('.composableImgCont');
						console.log(compImg.data('cfg'));
						up.settings.file_data_name = 'image',
						up.settings.multipart_params = {
							imageUpload: 1,
							cfg: compImg.data('cfg')
						};
						if (compImg.data('more'))
							up.settings.multipart_params.more = compImg.data('more');
					},
					FileUploaded: function(up, file, data) {
						var $data = $.parseJSON(data.response),
							compImg = $(up.settings.drop_element).closest('.composableImgCont'),
							textarea = compImg.find('textarea'),
							block = compImg.closest('.composerBlock');
						if (compImg.is('.composableImgBig')) {
							block.css('background-image', 'url('+$data.resized+')');
						} else if (!compImg.is('.composableImgMobile')) {
							compImg.find('img').attr('src', $data.resized);
						}
						if ($data.datas) {
							$.each($data.datas, function(k, v) {
								block.data(k, v);
							});
							block.trigger('composerImgChange');
						}
						compImg.addClass('composableImgExists');
						textarea.val(textarea.val()+"\n"+$data.file);
						changed();
					}
				}
			}),
			changed = function() {
				if (!hasChanged) {
					hasChanged = true;
					saveButton.removeAttr('disabled').removeProp('disabled');
				}
			},
			initComposable = function(parent) {
				parent
					.find('.block_handler [required]').removeAttr('required').removeProp('required').end()
{'fraction_non_alphanumeric': 0.1682545731707317, 'fraction_numerical': 0.0009527439024390244, 'mean_word_length': 3.5328151986183074, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '962547', 'n_tokens_mistral': 2172, 'n_tokens_neox': 1602, 'n_words': 239}