diff --git a/index.html b/index.html index e66b124..ddd2b10 100755 --- a/index.html +++ b/index.html @@ -563,7 +563,9 @@ textarea {
Untitled ASCII Diagram
Edit file permissions in Google Drive.

-
+
+ +
diff --git a/js-compiled.js b/js-compiled.js index 49e6745..9a4e767 100644 --- a/js-compiled.js +++ b/js-compiled.js @@ -619,7 +619,14 @@ function pa(a) { a = a.items; for (var c in a) { var d = document.createElement("li"); - d.innerHTML = '' + a[c].title + ""; + d.id = "drive-file-list-item"; + var e = document.createElement("a"); + d.appendChild(e); + e.href = "#" + a[c].id; + $(e).click(function() { + $("#drive-dialog").removeClass("visible"); + }); + e.innerHTML = a[c].title; $("#drive-file-list").append(d); } }.bind(a)); diff --git a/js-lib/drive-controller.js b/js-lib/drive-controller.js index daf6b7a..d877f5c 100644 --- a/js-lib/drive-controller.js +++ b/js-lib/drive-controller.js @@ -127,7 +127,12 @@ ascii.DriveController.prototype.loadFileList = function() { var items = result['items']; for (var i in items) { var entry = document.createElement('li'); - entry.innerHTML = '' + items[i]['title'] + ''; + entry.id = "drive-file-list-item"; + var title = document.createElement('a'); + entry.appendChild(title); + title.href = '#' + items[i]['id']; + $(title).click(function() { $('#drive-dialog').removeClass('visible'); }); + title.innerHTML = items[i]['title']; $('#drive-file-list').append(entry); } }.bind(this));