Initial commit: CloudOps infrastructure platform

This commit is contained in:
root
2026-04-09 19:58:57 +02:00
commit 1166a52f26
7762 changed files with 839452 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
diff --git a/node_modules/at.js/dist/js/jquery.atwho.js b/node_modules/at.js/dist/js/jquery.atwho.js
index 09ca40c..dfed389 100644
--- a/node_modules/at.js/dist/js/jquery.atwho.js
+++ b/node_modules/at.js/dist/js/jquery.atwho.js
@@ -835,13 +835,13 @@ EditableController = (function(superClass) {
}
suffix = (suffix = this.getOpt('suffix')) === "" ? suffix : suffix || "\u00A0";
data = $li.data('item-data');
- this.query.el.removeClass('atwho-query').addClass('atwho-inserted').html(content).attr('data-atwho-at-query', "" + data['atwho-at'] + this.query.text).attr('contenteditable', "false");
+ this.query.el.removeClass('atwho-query').addClass('atwho-inserted').html(content).attr('data-atwho-at-query', "" + data['atwho-at'] + this.query.text);
if (range = this._getRange()) {
if (this.query.el.length) {
range.setEndAfter(this.query.el[0]);
}
range.collapse(false);
- range.insertNode(suffixNode = this.app.document.createTextNode("" + suffix));
+ range.insertNode(suffixNode = this.app.document.createTextNode("\u200D" + suffix));
this._setRange('after', suffixNode, range);
}
if (!this.$inputor.is(':focus')) {
diff --git a/node_modules/at.js/src/editableController.coffee b/node_modules/at.js/src/editableController.coffee
index d6fcaeb..5f76987 100644
--- a/node_modules/at.js/src/editableController.coffee
+++ b/node_modules/at.js/src/editableController.coffee
@@ -163,12 +163,11 @@ class EditableController extends Controller
.addClass 'atwho-inserted'
.html content
.attr 'data-atwho-at-query', "" + data['atwho-at'] + @query.text
- .attr 'contenteditable', "false"
if range = @_getRange()
if @query.el.length
range.setEndAfter @query.el[0]
range.collapse false
- range.insertNode suffixNode = @app.document.createTextNode "" + suffix
+ range.insertNode suffixNode = @app.document.createTextNode "\u200D" + suffix
@_setRange 'after', suffixNode, range
@$inputor.focus() unless @$inputor.is ':focus'
@$inputor.change()

View File

@@ -0,0 +1,76 @@
diff --git a/node_modules/chosen-js/chosen.jquery.js b/node_modules/chosen-js/chosen.jquery.js
index dbc3a25..3a1e473 100644
--- a/node_modules/chosen-js/chosen.jquery.js
+++ b/node_modules/chosen-js/chosen.jquery.js
@@ -382,15 +382,38 @@
}
}
this.result_clear_highlight();
- if (results < 1 && query.length) {
+
+ // Mautic hack to allow adding new options - start
+
+ var resultsCount = this.results_data.length,
+ selectedCount = 0;
+
+ for (_i = 0, _len = this.results_data.length; _i < _len; _i++) {
+ if (!this.results_data[_i].group && this.results_data[_i].selected) {
+ selectedCount++;
+ }
+ }
+
+ if ((results < 1 || (resultsCount > 0 && resultsCount === selectedCount && $(this.form_field).data('allow-add'))) && query.length) {
this.update_results_content("");
return this.no_results(query);
} else {
this.update_results_content(this.results_option_build());
- if (!(options != null ? options.skip_highlight : void 0)) {
- return this.winnow_results_set_highlight();
- }
+ return this.winnow_results_set_highlight();
}
+
+ // Mautic hack to allow adding new options - end
+
+ // Original:
+ // if (results < 1 && query.length) {
+ // this.update_results_content("");
+ // return this.no_results(query);
+ // } else {
+ // this.update_results_content(this.results_option_build());
+ // if (!(options != null ? options.skip_highlight : void 0)) {
+ // return this.winnow_results_set_highlight();
+ // }
+ // }
};
AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
@@ -456,6 +479,23 @@
case 13:
if (this.results_showing) {
evt.preventDefault();
+
+ // Mautic hack to allow adding new entries if applicable - start
+ if (!$(this.form_field).data('allow-add') || !this.is_multiple || this.result_highlight) {
+ return this.result_select(evt);
+ }
+
+ var newTag = $(evt.target).val();
+
+ if ($(this.form_field).find('option').filter(function(){ return $(this).text() === newTag}).length === 0) {
+ $(this.form_field).append($('<option></option>').text(newTag));
+ $(this.form_field).trigger('chosen:updated');
+ this.result_highlight = this.search_results.find('li.active-result').last();
+
+ return this.result_select(evt);
+ }
+ // Mautic hack to allow adding new entries if applicable - end
+
}
break;
case 27:
@@ -1345,3 +1385,4 @@
})(AbstractChosen);
}).call(this);
+