Skip to content

Commit

Permalink
Merge branch 'refactoring'
Browse files Browse the repository at this point in the history
  • Loading branch information
lealife committed Apr 12, 2015
2 parents 67e6273 + c8bbea2 commit 8a2fc88
Show file tree
Hide file tree
Showing 153 changed files with 4,569 additions and 6,091 deletions.
2 changes: 1 addition & 1 deletion src/data/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"0.3.4.1","updatedTime":"2015-03-24T07:11:51.505Z"}
{"version":"0.4","updatedTime":"2015-03-24T07:11:51.505Z"}
31 changes: 18 additions & 13 deletions src/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<meta name="keywords" content="leanote,leanote.com">
<meta name="description" content="leanote, Not Just A Notebook!">
<meta name="author" content="leanote">
<title>Leanote login</title>
<title class="lang">Leanote login</title>
<link href="public/css/bootstrap.css" rel="stylesheet">
<link href="public/css/font-awesome-4.2.0/css/font-awesome.css" rel="stylesheet">
<link href="public/css/index.css" rel="stylesheet">
Expand All @@ -25,7 +25,7 @@
<div id="winTool" class="win-tool clearfix">
<a class="tool-close-blur"></a>
</div>
<div class="server"><a id="customServer">Custom server</a></div>
<div class="server"><a id="customServer" class="lang">Custom server</a></div>
<section id="box" class="animated fadeInUp">
<div class="drag"></div>
<div>
Expand All @@ -40,30 +40,31 @@ <h1 id="logo">

<div id="formContainer">
<div class="form-group form-group-1 hide" id="hostGroup">
<input type="text" placeholder="Host, http://leanote.com" class="form-control" id="host" name="host">
<input type="text" placeholder="Host, http://leanote.com" class="form-control lang-placeholder" id="host" name="host">
</div>

<div class="form-group form-group-1">
<input type="text" placeholder="Username or Email" class="form-control" id="email" name="email" value="">
<input type="text" placeholder="Username or Email" class="form-control lang-placeholder" id="email" name="email" value="">
</div>

<div class="form-group pwd-group">
<input type="password" placeholder="Password" class="form-control" id="pwd" name="pwd">
<input type="password" placeholder="Password" class="form-control lang-placeholder" id="pwd" name="pwd">
<button id="loginBtn" disabled><i class="fa fa-arrow-right"></i></button>
</div>
</div>

<div class="clearfix btns">
<a onclick="openExternal('http://leanote.com/findPassword')" class="pull-right m-t-xs"><small>Forget password?</small></a>
<a onclick="openExternal('http://leanote.com/register')" class="pull-right m-t-xs" style="margin-right: 10px"><small>Sign up</small></a>
<a onclick="openExternal('http://leanote.com/findPassword')" class="pull-right m-t-xs"><small class="lang">Forget password?</small></a>
<a onclick="openExternal('http://leanote.com/register')" class="pull-right m-t-xs" style="margin-right: 10px"><small class="lang">Sign up</small></a>

</div>
</form>
</div>
</div>
</section>

<script src="public/config.js"></script>
<script src="public/js/jquery-1.9.0.min.js"></script>
<script src="public/js/lang.js"></script>
<script src="public/js/bootstrap.js"></script>
<script src="public/js/app/service.js"></script>
<!-- <script src="public/js/app/native.js"></script> -->
Expand All @@ -81,6 +82,10 @@ <h1 id="logo">
console.log(e);
}

function getMsg(key) {
return langData[key] || key;
}

$(function() {
$('.tool-close, .tool-close-blur').click(function() {
// mac下关闭才是隐藏
Expand Down Expand Up @@ -115,20 +120,20 @@ <h1 id="logo">
var host = $('#host').val();

if(!email) {
showMsg("Email is required", "email");
showMsg(getMsg("Email is required"), "email");
return;
}
if(!pwd) {
showMsg("Password is required", "pwd");
showMsg(getMsg("Password is required"), "pwd");
return;
} else {
if(pwd.length < 6) {
showMsg("Email or Password Error", "pwd");
showMsg(getMsg("Email or Password Error"), "pwd");
return;
}
}
if(hasHost && (!host || !isValidUrl(host))) {
showMsg('Invalid host', 'host');
showMsg(getMsg('Invalid host'), 'host');
return;
}
$('#loadingLogo').addClass('loading');
Expand All @@ -148,7 +153,7 @@ <h1 id="logo">
gui.Window.open('note.html', getMainWinParams());
win.close();
} else {
showMsg("Email or Password Error");
showMsg(getMsg("Email or Password Error"));
}
});
});
Expand Down
21 changes: 21 additions & 0 deletions src/node_modules/common.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions src/node_modules/evt.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions src/node_modules/file.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions src/node_modules/note.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions src/node_modules/user.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8a2fc88

Please sign in to comment.