diff options
author | Cheng-Han, Wu | 2016-01-31 15:42:26 -0600 |
---|---|---|
committer | Cheng-Han, Wu | 2016-01-31 15:42:26 -0600 |
commit | ff2fc76491c11fad33ae6c62c4d5b5c47b431597 (patch) | |
tree | e7eb990eacfb8361d9ab319a87dfc272f7f9cd98 /public | |
parent | 0f87fd4493e68b6cd17ba5b1b097d11d11add83d (diff) |
Supported export to gist
Diffstat (limited to 'public')
-rw-r--r-- | public/js/index.js | 5 | ||||
-rw-r--r-- | public/views/header.ejs | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/public/js/index.js b/public/js/index.js index bc3ee793..f4b6904e 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -311,7 +311,8 @@ var ui = { html: $(".ui-download-html") }, export: { - dropbox: $(".ui-save-dropbox") + dropbox: $(".ui-save-dropbox"), + gist: $(".ui-save-gist") }, import: { dropbox: $(".ui-import-dropbox"), @@ -857,6 +858,8 @@ ui.toolbar.export.dropbox.click(function () { }; Dropbox.save(options); }); +//export to gist +ui.toolbar.export.gist.attr("href", url + "/gist"); //import from dropbox ui.toolbar.import.dropbox.click(function () { var options = { diff --git a/public/views/header.ejs b/public/views/header.ejs index c98202c0..4e3a9938 100644 --- a/public/views/header.ejs +++ b/public/views/header.ejs @@ -36,6 +36,8 @@ <li class="dropdown-header">Export</li> <li role="presentation"><a role="menuitem" class="ui-save-dropbox" tabindex="-1" href="#" target="_self"><i class="fa fa-dropbox fa-fw"></i> Dropbox</a> </li> + <li role="presentation"><a role="menuitem" class="ui-save-gist" tabindex="-1" href="#" target="_blank"><i class="fa fa-github fa-fw"></i> Gist</a> + </li> <li class="divider"></li> <li class="dropdown-header">Import</li> <li role="presentation"><a role="menuitem" class="ui-import-dropbox" tabindex="-1" href="#" target="_self"><i class="fa fa-dropbox fa-fw"></i> Dropbox</a> @@ -111,6 +113,8 @@ <li class="dropdown-header">Export</li> <li role="presentation"><a role="menuitem" class="ui-save-dropbox" tabindex="-1" href="#" target="_self"><i class="fa fa-dropbox fa-fw"></i> Dropbox</a> </li> + <li role="presentation"><a role="menuitem" class="ui-save-gist" tabindex="-1" href="#" target="_blank"><i class="fa fa-github fa-fw"></i> Gist</a> + </li> <li class="divider"></li> <li class="dropdown-header">Import</li> <li role="presentation"><a role="menuitem" class="ui-import-dropbox" tabindex="-1" href="#" target="_self"><i class="fa fa-dropbox fa-fw"></i> Dropbox</a> |