Skip to content

Commit

Permalink
Merge branch 'odomanov-edit-button' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
goktug97 committed Sep 26, 2020
2 parents 608fc38 + 403f686 commit 37f58f0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@
z-index: 101;
}

#edit-button {
display: block;
position: absolute;
left: 5em;
z-index: 101;
}

#view-menu {
position: absolute;
right: 0;
Expand Down Expand Up @@ -239,6 +246,7 @@
<div id="temp-network"></div>
<div class="fileframe" id="fileframe">
<button class="btn btn-link float-left" id="iframe-button">Back</button>
<button class="btn btn-link" id="edit-button">Edit</button>
<iframe src="" id="filenode"></iframe>
<iframe src="" id="backlinks"></iframe>
</div>
Expand Down Expand Up @@ -342,6 +350,12 @@
window.history.back()
});

$("#fileframe #edit-button")
.on("click", function iframeGoEdit() {
url = "org-protocol://roam-file?file=".concat(filenodePath);
window.open(url, "_self");
});

function onWindowResize () {
$("#filenode").width(($(window).width() - 50) * 0.7);
$("#backlinks").width(($(window).width() - 50) * 0.3);
Expand Down Expand Up @@ -650,6 +664,7 @@
if (select2Data[i].id === string) {
link = `org-roam-buffer?path=${select2Data[i].path}&` +
`label=${select2Data[i].text}&token=${token}`;
filenodePath = select2Data[i].path;
break
}
}
Expand Down

0 comments on commit 37f58f0

Please sign in to comment.