This commit is contained in:
Henrique Dias
2015-09-19 19:53:01 +01:00
parent 8f3d50512c
commit 9a99b39c73
7 changed files with 28 additions and 8 deletions

View File

@@ -175,6 +175,20 @@ $(document).on('ready pjax:success', function() {
return false;
});
$(".delete").click(function(event) {
event.preventDefault();
name = $(this).parent().parent().attr("for");
if (name == "undefined") {
name = $(this).parent().parent().attr("id");
}
console.log(name)
$('#' + name).remove();
$('label[for="' + name + '"]').remove();
});
$('body').on('keypress', 'input', function(event) {
if (event.keyCode == 13) {
event.preventDefault();

View File

@@ -136,6 +136,12 @@
font-size: 1.5em;
}
.frontmatter-only h1,
.frontmatter-only h3,
.frontmatter-only label {
position: relative !important;
}
input::-webkit-input-placeholder,
input:-moz-placeholder,
input::-moz-placeholder,

View File

@@ -89,7 +89,7 @@ button.delete {
border-radius : 50%;
height : 1.5em;
width : 1.5em;
font-size : .7em;
font-size : .7rem;
padding : 0;
}
@@ -109,5 +109,5 @@ button.delete {
label:hover > .actions,
h1:hover > .actions,
h3:hover > .actions {
opacity: 1;
opacity: .7;
}