mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
Progresses on #76
This commit is contained in:
parent
ef04101eee
commit
a397e89d20
2
assets/dist/templates/frontmatter.tmpl
vendored
2
assets/dist/templates/frontmatter.tmpl
vendored
@ -4,7 +4,7 @@
|
||||
{{ if or (eq $value.Type "object") (eq $value.Type "array") }}
|
||||
<fieldset id="{{ $value.Name }}" data-type="{{ $value.Type }}">
|
||||
<h3>{{ SplitCapitalize $value.Title }}</h3>
|
||||
<button class="delete">remove</button>
|
||||
<button class="delete" data-delete="{{ $value.Name }}">remove</button>
|
||||
{{ if (eq $value.Type "array") }}<div class="itens">{{ end }}{{ template "frontmatter" $value.Content }}{{ if (eq $value.Type "array") }}<button class="add">+</button></div>{{ end }}
|
||||
</fieldset>
|
||||
{{ else }}
|
||||
|
@ -254,11 +254,7 @@ $(document).on('page:editor', function() {
|
||||
|
||||
$("#content").on('click', '.delete', function(event) {
|
||||
event.preventDefault();
|
||||
button = $(this);
|
||||
|
||||
name = button.parent().parent().attr("for") || button.parent().parent().attr("id") || button.parent().parent().parent().attr("id");
|
||||
name = name.replace(/\[/, '\\[');
|
||||
name = name.replace(/\]/, '\\]');
|
||||
name = $(this).data("delete");
|
||||
|
||||
$('label[for="' + name + '"]').fadeOut().remove();
|
||||
$('#' + name).fadeOut().remove();
|
||||
|
Loading…
Reference in New Issue
Block a user