mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-05-08 11:22:10 +00:00
update handlers to #content
This commit is contained in:
parent
781a760048
commit
f8e8a3fcc0
2
assets/js/app.min.js
vendored
2
assets/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
@ -5,7 +5,7 @@ $(document).on('page:editor', function() {
|
|||||||
|
|
||||||
if (container.hasClass('complete')) {
|
if (container.hasClass('complete')) {
|
||||||
// Change title field when editing the header
|
// Change title field when editing the header
|
||||||
$('#site-title').keyup(function() {
|
$('#content').on('keyup', '#site-title', function() {
|
||||||
$('.frontmatter #title').val($(this).val());
|
$('.frontmatter #title').val($(this).val());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -28,7 +28,7 @@ $(document).on('page:editor', function() {
|
|||||||
fontSize: "1em"
|
fontSize: "1em"
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#see-source").off('click').click(function(event) {
|
$('#content').on('click', '#see-source', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
preview.hide();
|
preview.hide();
|
||||||
editor.fadeIn();
|
editor.fadeIn();
|
||||||
@ -36,7 +36,7 @@ $(document).on('page:editor', function() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Toggles between preview and editing mode
|
// Toggles between preview and editing mode
|
||||||
$("#see-preview").off('click').click(function(event) {
|
$('#content').on('click', '#see-preview', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
// If it currently in the preview mode, hide the preview
|
// If it currently in the preview mode, hide the preview
|
||||||
@ -62,7 +62,7 @@ $(document).on('page:editor', function() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$('body').off('keypress', 'input').on('keypress', 'input', function(event) {
|
$('#content').on('keypress', 'input', function(event) {
|
||||||
if (event.keyCode == 13) {
|
if (event.keyCode == 13) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
$('input[value="Save"]').focus().click();
|
$('input[value="Save"]').focus().click();
|
||||||
@ -71,7 +71,7 @@ $(document).on('page:editor', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Submites any form in the page in JSON format
|
// Submites any form in the page in JSON format
|
||||||
$('form').submit(function(event) {
|
$('#content').on('submit', 'form', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
if (!container.hasClass('frontmatter-only')) {
|
if (!container.hasClass('frontmatter-only')) {
|
||||||
@ -115,7 +115,7 @@ $(document).on('page:editor', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Adds one more field to the current group
|
// Adds one more field to the current group
|
||||||
$("body").on('click', '.add', function(event) {
|
$("#content").on('click', '.add', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
defaultID = "lorem-ipsum-sin-dolor-amet";
|
defaultID = "lorem-ipsum-sin-dolor-amet";
|
||||||
|
|
||||||
@ -236,7 +236,7 @@ $(document).on('page:editor', function() {
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$("body").on('click', '.delete', function(event) {
|
$("#content").on('click', '.delete', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
button = $(this);
|
button = $(this);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user