Skip to content

Commit

Permalink
Master (#7)
Browse files Browse the repository at this point in the history
* Add sessionId field to list screen for debugging

* Changed header color to make it more obviously not production

* Added Page Size to Log Viewer

* In WebrootVue.qvt.css, updated rule for drawer background to only come into effect in non-mobile layouts.

* In DefaultScreenMacros for vuet and qvt add paginate support to section-include when included section is a section-iterate with paginate=true; in qvt js don't show pagination widget if there is only one result

* In WebrootVue.qvt.js add qLayoutMinHeight method to calculate a full height, useful for certain types of screens with particular or bottom instead of top focused layouts

* In qvt macros for form-list fix issue with first/second/last row and hidden parameters

* In qvt screen macros first pass on working support for first, second, and last row forms

* In vuet and qvt widgetTextValue macro handle case with drop-down that has dynamic-options plus list-options for pre-loaded values

* Update vue to 2.7.14, quasar to 1.22.10; all seems to work well in partial tests of existing screens, minor version updates are hopefully backward compatible but worth keeping an eye out for issues

* In qvt default screen macros add support for text-area.@autogrow attribute

* Small updates to webroot build.gradle: update gradle-versions and gradle-minify plugins

* Currency (moqui#217)

* Add currency-hide-symbol attribute as a comlement to currency-unit-field, displaying the value without the currency symbol

* Update AUTHORS file

* Update ElFinder client to 2.1.62 and jqueryui to 1.13.2, there is a security notice for ElFinder for versions 2.1.61 and earlier, but it appears to only for the server-side PHP code which is not used in moqui; also updated jquery to 3.7.1 while at it

* Fix submit on select drop down where there is one result (moqui#219)

* Fix submit on select drop down where there is one result

* Changes required for new Moqui SSO component (moqui#222)

* In Login.ftl, added SSO tab and forms. This will only appear if SSO is configured.

* In webroot-layout.css, increased the width of the forms from 340 to 380 so SSO tab doesn't overflow to new line.

* In Qapps mode, add a expansion button to the ContainerBox (moqui#216)

* In Qapps mode, add a expansion button to the ContainerBox

* sign the AUTHORS file

* Enable accordion in form field-groups using qvt rendering (moqui#221)

* In qvt render mode fix m-form-column-config find parameter handling so they are passed through

---------

Co-authored-by: Acetousk <acetousk@gmail.com>
Co-authored-by: David E. Jones <dej@dejc.com>
Co-authored-by: pandor4u <103976470+pandor4u@users.noreply.github.com>
Co-authored-by: aabiabdallah <aabiabdallah@gmail.com>
Co-authored-by: Jens Hardings <jhp@moit.cl>
Co-authored-by: acetousk <acetousk@users.noreply.github.com>
Co-authored-by: newmann <huxinsheng88@hotmail.com>
  • Loading branch information
8 people authored Nov 6, 2023
1 parent 2551f44 commit b2e5199
Show file tree
Hide file tree
Showing 13 changed files with 161 additions and 88 deletions.
6 changes: 4 additions & 2 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,15 @@ Written in 2015-2016 by Sam Hamilton - samhamilton
Written in 2015 by Leonardo Carvalho - CarvalhoLeonardo
Written in 2015 by Swapnil M Mane - swapnilmmane
Written in 2015 by Anton Akhiar - akhiar
Writter in 2015-2016 by Jens Hardings - jenshp
Writter in 2015-2023 by Jens Hardings - jenshp
Written in 2016 by Mark Haney - mphaney
Written in 2018 by Nirendra Singh Panwar - nirendra10695
Written in 2018 by Zhang Wei - zhangwei1979
Written in 2019 by Arlen McDonell - jmcdl
Written in 2019 by Jacob Barnes - Tellan
Written in 2019 by Arzang Kasiri - akasiri
Written in 2021 by Amir Anjomshoaa - amiranjom
Written in 2023 by Newmann Hu - newmann

===========================================================================

Expand Down Expand Up @@ -86,13 +87,14 @@ Written in 2015 by Jimmy Shen - shendepu
Written in 2015 by Sam Hamilton - samhamilton
Written in 2015 by Leonardo Carvalho - CarvalhoLeonardo
Written in 2015 by Anton Akhiar - akhiar
Writter in 2015-2016 by Jens Hardings - jenshp
Writter in 2015-2023 by Jens Hardings - jenshp
Written in 2016 by Mark Haney - mphaney
Written in 2018 by Nirendra Singh Panwar - nirendra10695
Written in 2018 by Zhang Wei - zhangwei1979
Written in 2019 by Arlen McDonell - jmcdl
Written in 2019 by Jacob Barnes - Tellan
Written in 2019 by Arzang Kasiri - akasiri
Written in 2021 by Amir Anjomshoaa - amiranjom
Written in 2023 by Newmann Hu - newmann

===========================================================================
12 changes: 6 additions & 6 deletions base-component/tools/screen/System/Resource/ElFinder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ along with this software (see the LICENSE.md file). If not, see
</form-single>
<render-mode><text type="html,vuet,qvt"><![CDATA[
<div id="elfinder"></div>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.min.css" type="text/css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/theme.min.css" type="text/css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/elfinder/2.1.56/css/elfinder.min.css" type="text/css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/elfinder/2.1.56/css/theme.min.css" type="text/css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/elfinder/2.1.56/js/elfinder.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.2/themes/smoothness/jquery-ui.min.css" type="text/css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.2/themes/smoothness/theme.min.css" type="text/css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.2/jquery-ui.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/elfinder/2.1.62/css/elfinder.min.css" type="text/css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/elfinder/2.1.62/css/theme.min.css" type="text/css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/elfinder/2.1.62/js/elfinder.min.js" type="text/javascript"></script>
<script>
$('#elfinder').elfinder({ url:'${sri.buildUrl('command').url}', customData:{ moquiSessionToken:'${ec.web.sessionToken}', resourceRoot:'${resourceRoot}' },
lang:'en', defaultView:'list', requestType:'post', rememberLastDir:false, height:700,
Expand Down
12 changes: 6 additions & 6 deletions base-component/webroot/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ buildscript {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.github.ben-manes:gradle-versions-plugin:0.42.0'
classpath "org.gradle-webtools.minify:gradle-minify-plugin:1.3.1"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.47.0'
classpath "org.gradle-webtools.minify:gradle-minify-plugin:1.3.2"
}
}
apply plugin: "org.gradlewebtools.minify"
Expand Down Expand Up @@ -61,7 +61,7 @@ def fileMap = [

"jeditable.js/1.7.3/jeditable.min.js":"",

"jquery/3.4.1/jquery.min.js":"",
"jquery/3.7.1/jquery.min.js":"",

"jquery.form/4.2.1/jquery.form.min.js":"",
"jquery.inputmask/3.3.4/jquery.inputmask.bundle.min.js":"",
Expand All @@ -88,12 +88,12 @@ def fileMap = [

"typeahead.js/0.11.1/typeahead.jquery.min.js":"",

"vue/2.6.10/vue.js":"",
"vue/2.6.10/vue.min.js":""
"vue/2.7.14/vue.js":"",
"vue/2.7.14/vue.min.js":""
]

def jsdelivrBase = "https://cdn.jsdelivr.net/npm/"
def jsdelivrList = ["quasar@1.15.20/dist/quasar.min.css", "quasar@1.15.20/dist/quasar.umd.min.js"]
def jsdelivrList = ["quasar@1.22.10/dist/quasar.min.css", "quasar@1.22.10/dist/quasar.umd.min.js"]

String getTargetPath(String sourcePath, String targetPath) {
if (!targetPath) {
Expand Down
11 changes: 11 additions & 0 deletions base-component/webroot/screen/webroot/Login.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<div class="text-center form-signin">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation"><a href="#login" aria-controls="login" role="tab" data-toggle="tab">${ec.l10n.localize("Login")}</a></li>
<#if authFlowList?has_content && !authFlowList.isEmpty()><li role="presentation"><a href="#sso" aria-controls="sso" role="tab" data-toggle="tab">${ec.l10n.localize("SSO")}</a></li></#if>
<li role="presentation"><a href="#reset" aria-controls="reset" role="tab" data-toggle="tab">${ec.l10n.localize("Reset Password")}</a></li>
<li role="presentation"><a href="#change" aria-controls="change" role="tab" data-toggle="tab">${ec.l10n.localize("Change Password")}</a></li>
</ul>
Expand Down Expand Up @@ -57,6 +58,16 @@
<#if passwordChangeRequired><p class="text-warning text-center">WARNING: Password change required</p></#if>
</form>
</div>
<#if authFlowList?has_content && !authFlowList.isEmpty()>
<div id="sso" class="tab-pane">
<#list authFlowList as authFlow>
<form method="post" action="/sso/login" class="form-signin">
<input type="hidden" name="authFlowId" value="${authFlow.authFlowId}">
<button class="btn btn-lg btn-primary btn-block" type="submit">${authFlow.description}</button>
</form>
</#list>
</div>
</#if>
<div id="reset" class="tab-pane">
<form method="post" action="${sri.buildUrl("resetPassword").url}" class="form-signin" id="reset_form">
<p class="text-muted text-center">${ec.l10n.localize("Enter your username to email a reset password")}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ a.jstree-anchor { white-space: normal; }

.ScreenTreeNested { margin: 4px 0 4px 12px; padding: 0 0 0 12px; border-left: 1px dashed lightgrey; }

.Login .form-signin { display: block; width: 340px; padding: 10px; margin: 0 auto; border-radius: 3px; }
.Login .form-signin { display: block; width: 380px; padding: 10px; margin: 0 auto; border-radius: 3px; }
.Login .form-signin input { width: 100%; height: auto; font-size: 1.2em; }
.Login .form-signin input.top { margin-bottom: -1px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.Login .form-signin input.middle { margin-bottom: -1px; border-radius: 0; }
Expand Down
16 changes: 12 additions & 4 deletions base-component/webroot/screen/webroot/js/WebrootVue.qvt.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,11 @@ Vue.component('m-container-box', {
'<slot name="header"></slot>' +
'<q-space></q-space>' +
'<slot name="toolbar"></slot>' +
' <q-btn color="grey" round flat dense :icon="isBodyOpen ? \'keyboard_arrow_up\' : \'keyboard_arrow_down\'" @click="toggleBody" />' +
'</q-card-actions>' +
' <div v-show="isBodyOpen">' +
'<q-card-section :class="{in:isBodyOpen}"><slot></slot></q-card-section>' +
' </div>' +
'</q-card>',
methods: { toggleBody: function() { this.isBodyOpen = !this.isBodyOpen; } }
});
Expand Down Expand Up @@ -1138,8 +1141,13 @@ Vue.component('m-form-column-config', {
generalFormFields: function() {
var fields = this.$refs.mForm.fields;
fields.formLocation = this.formLocation;
if (this.findParameters) for (var curKey in Object.keys(this.findParameters))
fields[curKey] = this.findParameters[curKey];
if (this.findParameters) {
var findParmKeys = Object.keys(this.findParameters);
for (var keyIdx = 0; keyIdx < findParmKeys.length; keyIdx++) {
var curKey = findParmKeys[keyIdx];
fields[curKey] = this.findParameters[curKey];
}
}
console.log("Save column config " + this.formLocation + " Window Width " + window.innerWidth + " Quasar Platform: " + JSON.stringify(Quasar.Platform.is));
if (window.innerWidth <= 600 || Quasar.Platform.is.mobile) fields._uiType = 'mobile';
}
Expand Down Expand Up @@ -1685,7 +1693,7 @@ Vue.component('m-drop-down', {

// console.warn("curOptions updated " + this.name + " allowEmpty " + this.allowEmpty + " value '" + this.value + "' " + " isInNewOptions " + isInNewOptions + ": " + JSON.stringify(options));
if (!isInNewOptions) {
if (!this.allowEmpty && !this.multiple && options && options.length && options[0].value && (!this.requiredManualSelect || options.length === 1)) {
if (!this.allowEmpty && !this.multiple && options && options.length && options[0].value && (!this.requiredManualSelect || (!this.submitOnSelect && options.length === 1))) {
// simulate normal select behavior with no empty option (not allowEmpty) where first value is selected by default
// console.warn("checkCurrentValue setting " + this.name + " to " + options[0].value + " options " + options.length);
this.$emit('input', options[0].value);
Expand Down Expand Up @@ -1755,7 +1763,7 @@ Vue.component('m-drop-down', {
}
}
// simulate normal select behavior with no empty option (not allowEmpty) where first value is selected by default - but only do for 1 option to force user to think and choose from multiple
if (!this.multiple && !this.allowEmpty && (!this.value || !this.value.length) && this.options && this.options.length && (!this.requiredManualSelect || this.options.length === 1)) {
if (!this.multiple && !this.allowEmpty && (!this.value || !this.value.length) && this.options && this.options.length && (!this.requiredManualSelect || (!this.submitOnSelect && options.length === 1))) {
this.$emit('input', this.options[0].value);
}
}
Expand Down
12 changes: 10 additions & 2 deletions template/screen-macro/DefaultScreenMacros.csv.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,18 @@ on the same screen to increase reusability of those screens -->
<#assign fieldValue = ec.getResource().expand(.node["@text"], "")>
</#if>
<#if .node["@currency-unit-field"]?has_content>
<#assign fieldValue = ec.getL10n().formatCurrency(fieldValue, ec.getResource().expression(.node["@currency-unit-field"], ""))>
<#if .node["@currency-hide-symbol"]! == "true">
<#assign fieldValue = ec.getL10n().formatCurrencyNoSymbol(fieldValue, ec.getResource().expression(.node["@currency-unit-field"], ""))>
<#else>
<#assign fieldValue = ec.getL10n().formatCurrency(fieldValue, ec.getResource().expression(.node["@currency-unit-field"], ""))>
</#if>
</#if>
<#elseif .node["@currency-unit-field"]?has_content>
<#assign fieldValue = ec.getL10n().formatCurrency(sri.getFieldValue(dispFieldNode, ""), ec.getResource().expression(.node["@currency-unit-field"], ""))>
<#if .node["@currency-hide-symbol"]! == "true">
<#assign fieldValue = ec.getL10n().formatCurrencyNoSymbol(sri.getFieldValue(dispFieldNode, ""), ec.getResource().expression(.node["@currency-unit-field"], ""))>
<#else>
<#assign fieldValue = ec.getL10n().formatCurrency(sri.getFieldValue(dispFieldNode, ""), ec.getResource().expression(.node["@currency-unit-field"], ""))>
</#if>
<#else>
<#assign fieldValue = sri.getFieldValueString(.node)>
</#if>
Expand Down
12 changes: 10 additions & 2 deletions template/screen-macro/DefaultScreenMacros.html.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -1941,10 +1941,18 @@ a => A, d => D, y => Y
<#assign fieldValue = ec.getResource().expand(.node["@text"], "")>
</#if>
<#if .node["@currency-unit-field"]?has_content>
<#assign fieldValue = ec.getL10n().formatCurrency(fieldValue, ec.getResource().expression(.node["@currency-unit-field"], ""))>
<#if .node["@currency-hide-symbol"]! == "true">
<#assign fieldValue = ec.getL10n().formatCurrencyNoSymbol(fieldValue, ec.getResource().expression(.node["@currency-unit-field"], ""))>
<#else>
<#assign fieldValue = ec.getL10n().formatCurrency(fieldValue, ec.getResource().expression(.node["@currency-unit-field"], ""))>
</#if>
</#if>
<#elseif .node["@currency-unit-field"]?has_content>
<#assign fieldValue = ec.getL10n().formatCurrency(sri.getFieldValue(dispFieldNode, ""), ec.getResource().expression(.node["@currency-unit-field"], ""))>
<#if .node["@currency-hide-symbol"]! == "true">
<#assign fieldValue = ec.getL10n().formatCurrencyNoSymbol(sri.getFieldValue(dispFieldNode, ""), ec.getResource().expression(.node["@currency-unit-field"], ""))>
<#else>
<#assign fieldValue = ec.getL10n().formatCurrency(sri.getFieldValue(dispFieldNode, ""), ec.getResource().expression(.node["@currency-unit-field"], ""))>
</#if>
<#else>
<#assign fieldValue = sri.getFieldValueString(.node)>
</#if>
Expand Down
Loading

0 comments on commit b2e5199

Please sign in to comment.