Skip to content

Commit 6415996

Browse files
committed
Fix for deleting notes in groups
1 parent 2767533 commit 6415996

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

js/script.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,12 @@
2929
return newurl;
3030
}
3131

32-
function ocVar(val) {
33-
var newval = encodeURIComponent(val);
34-
return newval;
35-
}
36-
3732
function resizeFont(s) {
3833
$('#editable_ifr').contents().find("head").append($("<style type='text/css'> body{font-size:"+s+"px;} </style>"));
3934
}
4035

4136
function deleteNote(id) {
42-
var n = ocVar($(this).attr('id'));
37+
var n = $(this).attr('id');
4338
$.post(ocUrl("api/v0.2/ownnote/del"), { note: n }, function (data) {
4439
loadListing();
4540
});
@@ -234,7 +229,7 @@
234229
html += " <div class='"+fileclass+"'>"+listing[i].timestring+" ago</div>";
235230
else
236231
html += " <div class='"+fileclass+"'>Just now</div>";
237-
html += " <div id='"+listing[i].filename+"' class='buttons delete delete-note pointer'><br></div>";
232+
html += " <div id='"+listing[i].file.replace('.htm','')+"' class='buttons delete delete-note pointer'><br></div>";
238233
html += " </div>";
239234
html += "</div>";
240235
}

0 commit comments

Comments
 (0)