Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed May 3, 2022
2 parents 89b0923 + 2b89ec6 commit f10ffde
Show file tree
Hide file tree
Showing 48 changed files with 138 additions and 2,612 deletions.
77 changes: 77 additions & 0 deletions gui/admin-gui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions gui/admin-gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"author": "",
"license": "Apache License 2.0 and European Union Public License",
"devDependencies": {
"@fontsource/source-sans-pro": "^4.5.9",
"ace-builds": "^1.4.14",
"admin-lte": "3.1.0",
"babel-loader": "^8.2.4",
Expand All @@ -19,6 +20,7 @@
"css-minimizer-webpack-plugin": "^3.4.1",
"expose-loader": "^3.1.0",
"famfamfam-flags": "^1.0.0",
"file-loader": "^6.2.0",
"knockout": "^3.5.1",
"mini-css-extract-plugin": "^2.6.0",
"postcss-loader": "^6.2.1",
Expand Down
77 changes: 20 additions & 57 deletions gui/admin-gui/src/frontend/js/ace-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

var ACE_EDITOR_POSTFIX = "_editor";
// var DISABLED_CLASS = "disabled";
var DISABLED_CLASS = "disabled";
$.aceEditors = {};

export default class MidPointAceEditor {
Expand All @@ -25,74 +25,39 @@ export default class MidPointAceEditor {
$(jqEditor).text($(jqTextArea).val());
$(jqTextArea).hide();

// var langTools = ace.require("ace/ext/language_tools");
//todo implement completer based
// var completer = {
//
// getCompletions: function(editor, session, pos, prefix, callback) {
// //example
// var completions = [];
// completions.push({ name:"testing1", value:"testing1", meta: "code1" });
// completions.push({ name:"testing2", value:"testing2", meta: "code2" });
// callback(null, completions);
// }
// }
// langTools.addCompleter(completer);
ace.require("ace/ext/language_tools");

var editor = ace.edit(editorId,{
mode: "ace/mode/xml",
theme: 'ace/theme/eclipse',
mode: 'ace/mode/xml',
highlightActiveLine : true,
highlightSelectedWord: true,
autoScrollEditorIntoView: true,
minLines: 10,
enableBasicAutocompletion: true,
enableLiveAutocompletion: true,
selectionStyle: "text"
selectionStyle: "text",
useSoftTabs: true,
tabSize: 3,
showPrintMargin: false,
fadeFoldWidgets: false,
});

// editor.setOptions({
// enableBasicAutocompletion: true
// });
this.setReadonly(jqEditor, editor, readonly);

// editor.setMode('ace/mode/xml');
// editor.session.setMode(mode_xml);
// editor.getSession().setTabSize(3);
editor.on('blur', function () {
$(jqTextArea).val(editor.getSession().getValue());
$(jqTextArea).trigger('blur');
});
editor.on('change', function () {
$(jqTextArea).val(editor.getSession().getValue());
$(jqTextArea).trigger('change');
});

editor.setTheme('ace/theme/eclipse');
// if (mode != null) {
//
// }
// editor.setShowPrintMargin(false);
// editor.setFadeFoldWidgets(false);
// setReadonly(jqEditor, editor, readonly);
// editor.on('blur', function () {
// $(jqTextArea).val(editor.getSession().getValue());
// $(jqTextArea).trigger('blur');
// });
// editor.on('change', function () {
// $(jqTextArea).val(editor.getSession().getValue());
// $(jqTextArea).trigger('change');
// });
//
// //add editor to global map, so we can find it later
// add editor to global map, so we can find it later
$.aceEditors[editorId] = editor;
//
// //todo handle readonly for text area [lazyman] add "disabled" class to .ace_scroller

// $(document).ready(function () {
//
// var self = this;
//
// if (height < minHeight) {
// height = minHeight;
// }
//
// if (resize) {
// self.resizeToMaxHeight(editorId, minHeight);
// } else {
// self.resizeToFixedHeight(editorId, height);
// }
// });
// //todo handle readonly for text area [lazyman] add "disabled" class to .ace_scroller
}

resizeToMaxHeight(editorId, minHeight) {
Expand Down Expand Up @@ -162,6 +127,4 @@ export default class MidPointAceEditor {
$(jqEditor).removeClass(DISABLED_CLASS);
}
}

}

14 changes: 10 additions & 4 deletions gui/admin-gui/src/frontend/js/vendors.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@ import '../../../node_modules/admin-lte/dist/js/adminlte';
import '../../../node_modules/bootstrap-select';
// import '../../../node_modules/bootstrap-multiselect'; // todo enable, used in DropDownMultiChoice (ListMultipleChoicePanel)

import '../../../node_modules/ace-builds/src-noconflict/ace';

import '../../../node_modules/ace-builds/src-noconflict/ace'
ace.config.setModuleUrl('ace/theme/eclipse',
require('../../../node_modules/ace-builds/src-noconflict/theme-eclipse.js'));
ace.config.setModuleUrl('ace/mode/xml',
require('../../../node_modules/ace-builds/src-noconflict/mode-xml.js'));
ace.config.setModuleUrl('ace/ext/language_tools',
require('../../../node_modules/ace-builds/src-noconflict/ext-language_tools.js'));

require('../../../node_modules/ace-builds/src-noconflict/theme-eclipse')
require('../../../node_modules/ace-builds/src-noconflict/mode-xml')
require('../../../node_modules/ace-builds/src-noconflict/ext-language_tools')
// ace.config.setModuleUrl('ace/mode/xml_worker', require('../../../node_modules/ace-builds/src-noconflict/worker-xml.js'));
ace.config.setModuleUrl('ace/mode/xml_worker',
require('file-loader?publicPath=../../static/&name=[name].[ext]&esModule=false!../../../node_modules/ace-builds/src-noconflict/worker-xml.js'));
3 changes: 3 additions & 0 deletions gui/admin-gui/src/frontend/scss/midpoint-theme-variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
*/

@import "../../../node_modules/admin-lte/node_modules/bootstrap/scss/functions.scss";

@import "../../../node_modules/admin-lte/build/scss/bootstrap-variables";

@import "../../../node_modules/admin-lte/node_modules/bootstrap/scss/variables.scss";
@import "../../../node_modules/admin-lte/node_modules/bootstrap/scss/mixins/breakpoints.scss";

Expand Down
5 changes: 5 additions & 0 deletions gui/admin-gui/src/frontend/scss/vendors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@
*/

@import "../../../node_modules/famfamfam-flags/dist/sprite/famfamfam-flags.css";

@import "../../../node_modules/@fontsource/source-sans-pro/300.css";
@import "../../../node_modules/@fontsource/source-sans-pro/400.css";
@import "../../../node_modules/@fontsource/source-sans-pro/400-italic.css";
@import "../../../node_modules/@fontsource/source-sans-pro/700.css";
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@
</title>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>

<link href="css/fonts.css" type="text/css" rel="stylesheet"/>
<link href="css/font-evosome.css" type="text/css" rel="stylesheet"/>

<link type="text/css" rel="stylesheet" href="static/vendors-theme.css"/>
<link type="text/css" rel="stylesheet" href="static/midpoint-theme.css"/>
<link type="text/css" rel="stylesheet" href="static/vendors.css"/>
<link type="text/css" rel="stylesheet" href="static/midpoint.css"/>

<wicket:link>
<script src="../../../../../../webjars/password-score/689ddae/dist/js/password-score.js" type="text/javascript" ></script>
Expand All @@ -38,7 +37,7 @@
</div>
<div wicket:id="debugPanel" style="z-index: 10000;"/>

<script type="text/javascript" src="static/vendors.bundle.js"></script>
<script type="text/javascript" src="static/midpoint.bundle.js"></script>
<script type="text/javascript" src="static/vendors.js"></script>
<script type="text/javascript" src="static/midpoint.js"></script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ protected void createBreadcrumb() {
super.createBreadcrumb();

Breadcrumb bc = getLastBreadcrumb();
bc.setIcon(new Model<>("fa fa-dashboard"));
bc.setIcon(new Model<>("fa fa-tachometer-alt"));
}

private void initLayout() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public enum ObjectTypeGuiDescriptor {

ARCHETYPE(ObjectTypes.ARCHETYPE, "ObjectTypeGuiDescriptor.archetype", "", ""), // TODO icons

DASHBOARD(ObjectTypes.DASHBOARD, "ObjectTypeGuiDescriptor.dashboard", "fa fa-dashboard", "fa fa-dashboard"),
DASHBOARD(ObjectTypes.DASHBOARD, "ObjectTypeGuiDescriptor.dashboard", GuiStyleConstants.CLASS_DASHBOARD_ICON, GuiStyleConstants.CLASS_DASHBOARD_ICON),

MESSAGE_TEMPLATE(ObjectTypes.MESSAGE_TEMPLATE, "ObjectTypeGuiDescriptor.messageTemplate", "", ""), //TODO icons

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</translation>
</pluralLabel>
<icon>
<cssClass>fa fa-dashboard</cssClass>
<cssClass>fa fa-tachometer-alt</cssClass>
<color>#001F3F</color>
</icon>
</display>
Expand Down

0 comments on commit f10ffde

Please sign in to comment.