Skip to content

Commit

Permalink
Merge pull request #49 from ondras/master
Browse files Browse the repository at this point in the history
explicit filename for DAV, links opening in new tab
  • Loading branch information
ondras committed Jul 23, 2014
2 parents 29191b9 + a73be45 commit 49e6a8e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
5 changes: 3 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
<link rel="stylesheet" href="css/font.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/print.css" media="print" />
<base target="_blank" />
</head>
<body>
<ul id="port">
<div id="tip">Press ‘Tab’ to Insert Child, ‘Enter’ to Insert Sibling Node. For more tips/news, follow <a href="https://twitter.com/my_mind_app" target="_blank">@my_mind_app</a>.</div>
<div id="tip">Press ‘Tab’ to Insert Child, ‘Enter’ to Insert Sibling Node. For more tips/news, follow <a href="https://twitter.com/my_mind_app">@my_mind_app</a>.</div>
</ul>

<div class="ui">
Expand Down Expand Up @@ -75,7 +76,7 @@ <h3>My Mind</h3>
</span>
</p>

<a id="github" target="_blank" href="https://github.com/ondras/my-mind" title="GitHub project page"><img src="github.png" alt="GitHub project page" /></a>
<a id="github" href="https://github.com/ondras/my-mind" title="GitHub project page"><img src="github.png" alt="GitHub project page" /></a>
<button id="toggle" title="Toggle UI"></button>
<button data-command="Help" title="Help"><img src="icons/help.png" alt="Help" /></button>

Expand Down
7 changes: 5 additions & 2 deletions my-mind.js
Original file line number Diff line number Diff line change
Expand Up @@ -4131,8 +4131,11 @@ MM.UI.Backend.WebDAV.save = function() {
var url = this._url.value;
localStorage.setItem(this._prefix + "url", url);

if (url.charAt(url.length-1) != "/") { url += "/"; }
url += map.getName() + "." + MM.Format.JSON.extension;
if (url.match(/\.mymind$/)) { /* complete file name */
} else { /* just a path */
if (url.charAt(url.length-1) != "/") { url += "/"; }
url += map.getName() + "." + MM.Format.JSON.extension;
}

this._current = url;
var json = map.toJSON();
Expand Down
7 changes: 5 additions & 2 deletions src/ui.backend.webdav.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ MM.UI.Backend.WebDAV.save = function() {
var url = this._url.value;
localStorage.setItem(this._prefix + "url", url);

if (url.charAt(url.length-1) != "/") { url += "/"; }
url += map.getName() + "." + MM.Format.JSON.extension;
if (url.match(/\.mymind$/)) { /* complete file name */
} else { /* just a path */
if (url.charAt(url.length-1) != "/") { url += "/"; }
url += map.getName() + "." + MM.Format.JSON.extension;
}

this._current = url;
var json = map.toJSON();
Expand Down

0 comments on commit 49e6a8e

Please sign in to comment.