Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/projects/detail/components/EditProjectForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,24 @@ class EditProjectForm extends Component {
window.addEventListener('beforeunload', this.onLeave)
}

autoResize() {
if (self.autoResizeSet === true) { return }
self.autoResizeSet = true
setTimeout(() => {
window.dispatchEvent(new Event('resize'))
}, 1000)
}

componentWillUnmount() {
this.props.fireProjectDirtyUndo()
window.removeEventListener('beforeunload', this.onLeave)
}

// Notify user if they navigate away while the form is modified.
onLeave(e = {}) {
this.autoResize()
if (this.isChanged()) {
// TODO: remove this block - it disables unsaved changes popup
// TODO: remove this block - it disables unsaved changes popup
// for app screens changes
if (this.refs.form){
const pristine = this.refs.form.getPristineValues()
Expand Down Expand Up @@ -237,7 +246,7 @@ class EditProjectForm extends Component {
value={ _.get(project, 'details.appDefinition.features', {})}
/>
</Formsy.Form>

</div>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
text-align: left;
text-indent: 0;
margin-bottom: 0;
line-height: 25px;
line-height: 24.5px;
}

.radio-group-input,
Expand Down
2 changes: 1 addition & 1 deletion src/projects/detail/components/SpecSection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const SpecSection = props => {
!subSection.hideTitle &&
<div className="sub-title">
<h4 className="title">
{typeof subSection.title === 'function' ? subSection.title(project): subSection.title }
{typeof subSection.title === 'function' ? subSection.title(project): subSection.title }
<span>{((typeof subSection.required === 'function') ? subSection.required(project, subSections) : subSection.required) ? '*' : ''}</span>
</h4>
</div>
Expand Down