edit-event: register page leave handler later
This commit is contained in:
@@ -287,7 +287,7 @@ function checkFields(){
|
|||||||
|
|
||||||
function copyEventToClipboard(){
|
function copyEventToClipboard(){
|
||||||
var text = $('textarea[name="excerpt"]').val()+"\n";
|
var text = $('textarea[name="excerpt"]').val()+"\n";
|
||||||
text += $('textarea[name="user_excerpt"]').val()+"\n";
|
if ($('textarea[name="user_excerpt"]').val()) text += $('textarea[name="user_excerpt"]').val()+"\n";
|
||||||
text += $('textarea[name="topic"]').val()+"\n\n";
|
text += $('textarea[name="topic"]').val()+"\n\n";
|
||||||
text += $('textarea[name="content"]').val()+"\n";
|
text += $('textarea[name="content"]').val()+"\n";
|
||||||
|
|
||||||
@@ -319,8 +319,6 @@ $(document).ready(
|
|||||||
}
|
}
|
||||||
onDateModified();
|
onDateModified();
|
||||||
|
|
||||||
pageLeaveHandler();
|
|
||||||
|
|
||||||
checkFields();
|
checkFields();
|
||||||
|
|
||||||
$('textarea').autosize();
|
$('textarea').autosize();
|
||||||
@@ -335,11 +333,10 @@ $(document).ready(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
jQuery.getJSON("help-texts.cgi?project_id="+getProjectId()+"&studio_id="+getStudioId()+"&action=get",
|
jQuery.getJSON("help-texts.cgi?project_id="+getProjectId()+"&studio_id="+getStudioId()+"&action=get")
|
||||||
function(data){
|
.done( function(data) {
|
||||||
for (col in data){
|
for (col in data){
|
||||||
let value = data[col];
|
let value = data[col];
|
||||||
console.log(col+" "+value)
|
|
||||||
$(`input[name="${col}"]`).hover(function() {
|
$(`input[name="${col}"]`).hover(function() {
|
||||||
$(this).attr("title",value)
|
$(this).attr("title",value)
|
||||||
});
|
});
|
||||||
@@ -347,6 +344,10 @@ $(document).ready(
|
|||||||
$(this).attr("title",value)
|
$(this).attr("title",value)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.always( function() {
|
||||||
|
console.log("register page leave handler");
|
||||||
|
pageLeaveHandler();
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("done")
|
console.log("done")
|
||||||
|
|||||||
Reference in New Issue
Block a user