<commit_before>(function () {

	"use strict";

	function changeEditorWebsitePage ($rootScope, REST, Breadcrumb, structureEditorService) {

		return {
			restrict    : 'C',
			templateUrl : 'Rbs/Website/StaticPage/editor.twig',
			replace     : false,
			require     : 'rbsDocumentEditor',

			link: function (scope, element, attrs, editorCtrl) {

				scope.onReady = function () {
					scope.editableContentInfo = structureEditorService.getContentInfo(scope.document.editableContent);
					if (!scope.document.section && Breadcrumb.getCurrentNode()) {
						scope.document.section = Breadcrumb.getCurrentNode();
					}
				};

				scope.initSection = function (sectionName) {
					if (sectionName === 'content') {
						if (scope.document.pageTemplate)
						{
							REST.resource(scope.document.pageTemplate).then(function (template)
							{
								scope.pageTemplate = { "html" : template.htmlForBackoffice, "data" : template.editableContent };
							});
						}
					}
				};

				editorCtrl.init('Rbs_Website_FunctionalPage');

				// This is for the "undo" dropdown menu:
				// Each item automatically activates its previous siblings.
				$('[data-role=undo-menu]').on('mouseenter', 'li', function ()
				{
					$(this).siblings().removeClass('active');
					$(this).prevAll().addClass('active');
				});

				$rootScope.$watch('website', function (website) {
					if (scope.document && ! scope.document.website) {
						scope.document.website = website;
					}
				}, true);

			}
		};

	}

	var app = angular.module('RbsChange');
<commit_msg>Fixed Editor for Website/StaticPage.<commit_after>(function () {

	"use strict";

	function changeEditorWebsitePage ($rootScope, REST, Breadcrumb, structureEditorService) {

		return {
			restrict    : 'C',
			templateUrl : 'Rbs/Website/StaticPage/editor.twig',
			replace     : false,
			require     : 'rbsDocumentEditor',

			link: function (scope, element, attrs, editorCtrl) {

				scope.onReady = function () {
					scope.editableContentInfo = structureEditorService.getContentInfo(scope.document.editableContent);
					if (!scope.document.section && Breadcrumb.getCurrentNode()) {
						scope.document.section = Breadcrumb.getCurrentNode();
					}
				};

				scope.initSection = function (sectionName) {
					if (sectionName === 'content') {
						if (scope.document.pageTemplate)
						{
							REST.resource(scope.document.pageTemplate).then(function (template)
							{
								scope.pageTemplate = { "html" : template.htmlForBackoffice, "data" : template.editableContent };
							});
						}
					}
				};

				editorCtrl.init('Rbs_Website_StaticPage');

				// This is for the "undo" dropdown menu:
				// Each item automatically activates its previous siblings.
				$('[data-role=undo-menu]').on('mouseenter', 'li', function ()
				{
					$(this).siblings().removeClass('active');
					$(this).prevAll().addClass('active');
				});

				$rootScope.$watch('website', function (website) {
					if (scope.document && ! scope.document.website) {
						scope.document.website = website;
					}
				}, true);

			}
		};

	}

	var app = angular.module('RbsChange');

{'fraction_non_alphanumeric': 0.14582667093060442, 'fraction_numerical': 0.0, 'mean_word_length': 3.1375661375661377, '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': '7319386', 'n_tokens_mistral': 1226, 'n_tokens_neox': 907, 'n_words': 163}