Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/396-field-types' into 397-lhi-co…
Browse files Browse the repository at this point in the history
…ntract
  • Loading branch information
tobiasnteireho committed Sep 14, 2024
2 parents 3730740 + 0a54cd4 commit 2cf96ba
Show file tree
Hide file tree
Showing 31 changed files with 10,615 additions and 3,510 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
window.less = {async: true, fileSync: true};
</script>

<script src=node_modules/steal/steal.production.js?v=1697490197354" cache-key="v" cache-version="1697490197354" main="a2jauthor/app"></script>
<script src="node_modules/steal/steal.js" cache-key="v" cache-version="1697490197354" main="a2jauthor/app"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion index.dev.html → index.production.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
window.less = {async: true, fileSync: true};
</script>

<script src=node_modules/steal/steal.production.js?v=1696363232026" cache-key="v" cache-version="1696363232026" main="a2jauthor/app"></script>
<script src="node_modules/steal/steal.production.js?v=1696363232026" cache-key="v" cache-version="1696363232026" main="a2jauthor/app"></script>
</body>
</html>
19 changes: 19 additions & 0 deletions legacy/A2J_Pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,23 @@ var handleNullButtonTargets = function (buttons) {
return buttons
}

// this clears vars and problem messages before save in QDE
function checkPageHealth (page) {
var fields = page && page.fields
for (var field of fields) {
// no var assigned, clear any problem message
if (field.name === '') {
field.problem = ''
return
}
// bad var assigned, clear var name and problem message
if (field && field.problem && field.problem.length !== 0) {
field.name = ''
field.problem = ''
}
}
}

// Bring page edit window forward with page content
function gotoPageEdit (pageName) {
$pageEditDialog = window.$('.page-edit-form')
Expand Down Expand Up @@ -487,6 +504,8 @@ function gotoPageEdit (pageName) {
close: function () {
// cleanup QDE resize eventListener
window.removeEventListener('resize', debouncedSetQDEmaxHeight)
// check for mismatched field/variable types and clear assignments if `health problem`
checkPageHealth(page)
// callback from open below
this.removeOverlay()
// Update view and save any time edit dialog closes
Expand Down
Loading

0 comments on commit 2cf96ba

Please sign in to comment.