Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
876d5a66
Commit
876d5a66
authored
May 10, 2016
by
Rafael Ostertag
Browse files
Added feature as per request in
https://project/issues/1966
parent
e4984da4
Changes
3
Hide whitespace changes
Inline
Side-by-side
javascript/src/QfqForm.js
View file @
876d5a66
...
...
@@ -733,4 +733,11 @@ var QfqNS = QfqNS || {};
return
$
(
'
#
'
+
this
.
formId
+
'
input[name=s]
'
).
val
();
};
/**
* @public
*/
n
.
QfqForm
.
prototype
.
isFormChanged
=
function
()
{
return
this
.
form
.
formChanged
;
};
})(
QfqNS
);
\ No newline at end of file
javascript/src/QfqPage.js
View file @
876d5a66
...
...
@@ -53,12 +53,26 @@ var QfqNS = QfqNS || {};
this
.
settings
.
fileDeleteUrl
);
this
.
qfqForm
.
setBsTabs
(
this
.
bsTabs
);
this
.
qfqForm
.
on
(
'
qfqform.destroyed
'
,
this
.
destroyFormHandler
.
bind
(
this
));
window
.
addEventListener
(
"
beforeunload
"
,
this
.
beforeUnloadHandler
.
bind
(
this
));
}
catch
(
e
)
{
n
.
Log
.
error
(
e
.
message
);
this
.
qfqForm
=
null
;
}
};
/**
* @private
*/
n
.
QfqPage
.
prototype
.
beforeUnloadHandler
=
function
(
event
)
{
var
message
=
"
\
0/
"
;
if
(
this
.
qfqForm
.
isFormChanged
())
{
event
.
returnValue
=
message
;
return
message
;
}
};
/**
* @private
*/
...
...
mockup/personmock.html
View file @
876d5a66
...
...
@@ -793,6 +793,7 @@
</div>
</form>
<a
href=
"www.google.ch"
>
away
</a>
</div>
<script
src=
"../js/jquery.min.js"
></script>
...
...
@@ -1051,6 +1052,7 @@
});
QfqNS
.
Log
.
level
=
0
;
});
</script>
</body>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment