<commit_before>angular.module('BlueCube.directives', [])

.directive('uicolorpicker', function() {
	console.log("Called");
		return {
			restrict: 'E',
			require: 'ngModel',
			scope: false,
			replace: true,
			template: "<span><input type='text' id='colourpicker'/></span>",
			link: function(scope, element, attrs, ngModel) {
							var input = element.find('input');
							var options = angular.extend({
								color: ngModel.$viewValue,
								flat: true,
								showInput: false,
								showButtons: false,
								move: function(color) {
												scope.$apply(function() {
													ngModel.$setViewValue(color.toHexString());
												});
											}
							}, scope.$eval(attrs.options));

							ngModel.$render = function() {
								input.spectrum('set', ngModel.$viewValue || '');
							};

							input.spectrum(options);
						}
		};
});<commit_msg>Show the old and new colour on the colour picker.<commit_after>angular.module('BlueCube.directives', [])

.directive('uicolorpicker', function() {
	console.log("Called");
		return {
			restrict: 'E',
			require: 'ngModel',
			scope: false,
			replace: true,
			template: "<span><input type='text' id='colourpicker'/></span>",
			link: function(scope, element, attrs, ngModel) {
							var input = element.find('input');
							var options = angular.extend({
								color: ngModel.$viewValue,
								flat: true,
								showInput: false,
								showButtons: false,
								showInitial: true,
								move: function(color) {
												scope.$apply(function() {
													ngModel.$setViewValue(color.toHexString());
												});
											}
							}, scope.$eval(attrs.options));

							ngModel.$render = function() {
								input.spectrum('set', ngModel.$viewValue || '');
							};

							input.spectrum(options);
						}
		};
});
{'fraction_non_alphanumeric': 0.16273972602739725, 'fraction_numerical': 0.0, 'mean_word_length': 2.478095238095238, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '6919787', 'n_tokens_mistral': 831, 'n_tokens_neox': 547, 'n_words': 103}