useless js, css clear

This commit is contained in:
life
2014-10-26 11:19:27 +08:00
parent 5d559da2a6
commit 2f81a529fc
143 changed files with 91 additions and 30023 deletions

View File

@ -1,44 +0,0 @@
package controllers
import (
"github.com/revel/revel"
// "github.com/leanote/leanote/app/info"
)
// 首页
type Mobile struct {
BaseController
}
// leanote展示页, 没有登录的, 或已登录明确要进该页的
func (c Mobile) Index() revel.Result {
c.SetLocale()
userInfo := c.GetUserInfo()
userId := userInfo.UserId.Hex()
// 没有登录
if userId == "" {
return c.RenderTemplate("mobile/login.html")
}
/*
// 已登录了, 那么得到所有信息
notebooks := notebookService.GetNotebooks(userId)
shareNotebooks, sharedUserInfos := shareService.GetShareNotebooks(userId)
c.RenderArgs["userInfo"] = userInfo
c.RenderArgs["userInfoJson"] = c.Json(userInfo)
c.RenderArgs["notebooks"] = c.Json(notebooks)
c.RenderArgs["shareNotebooks"] = c.Json(shareNotebooks)
c.RenderArgs["sharedUserInfos"] = c.Json(sharedUserInfos)
c.RenderArgs["tagsJson"] = c.Json(tagService.GetTags(c.GetUserId()))
*/
return c.RenderTemplate("mobile/angular.html");
}
func (c Mobile) Logout() revel.Result {
c.ClearSession()
return c.RenderTemplate("mobile/login.html");
}

View File

@ -10,7 +10,7 @@
<title>{{.title}}</title>
<link href="/css/bootstrap.css" rel="stylesheet">
<link href="/css/font-awesome-4.0.3/css/font-awesome.css" rel="stylesheet">
<link href="/css/font-awesome-4.2.0/css/font-awesome.css" rel="stylesheet">
<link href="/public/admin/css/admin.css" rel="stylesheet">
<style>
</style>

View File

@ -7,7 +7,7 @@
</title>
<meta name="description" content="leanote admin"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<link href="/css/font-awesome-4.0.3/css/font-awesome.css" rel="stylesheet">
<link href="/css/font-awesome-4.2.0/css/font-awesome.css" rel="stylesheet">
<link href="/public/admin/css/bootstrap.3.2.0.min.css" rel="stylesheet">
<link href="/public/admin/css/admin.css" rel="stylesheet">
<!--[if lt IE 9]>

View File

@ -10,7 +10,7 @@
<title>{{.title}}</title>
<link href="/css/bootstrap.css" rel="stylesheet">
<link href="/css/font-awesome-4.0.3/css/font-awesome.css" rel="stylesheet">
<link href="/css/font-awesome-4.2.0/css/font-awesome.css" rel="stylesheet">
<link href="/css/index.css" rel="stylesheet">
<style>
</style>

View File

@ -10,7 +10,7 @@
<title>{{.title}}</title>
<link href="/css/bootstrap.css" rel="stylesheet">
<link href="/css/font-awesome-4.0.3/css/font-awesome.css" rel="stylesheet">
<link href="/css/font-awesome-4.2.0/css/font-awesome.css" rel="stylesheet">
<link href="/css/index.css" rel="stylesheet">
<style>
html, body {

View File

@ -1,49 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link href="/public/mobile2/topcoat/css/topcoat-mobile-light.min.css" rel="stylesheet">
<link href="/public/mobile2/css/styles.css" rel="stylesheet">
<link href="/public/css/font-awesome-4.0.3/css/font-awesome.css" rel="stylesheet">
</head>
<body ng-controller="MainCtrl">
<div id="sidebar" class="page-sidebar">
<h1>leanote</h1>
<ul id="nav">
<li ng-click="go('/notes/all')"><a>[[msg.all]]</a></li>
<li ng-click="go('/notebooks')"><a>[[msg.notebook]]</a></li>
<li><a href="#">[[msg.tag]]</a></li>
</ul>
<footer>
<a href="/mobile/logout">[[msg.logout]]</a>
</footer>
</div>
<div id="content" class="page-content">
<div ng-view ng-class="slide" >
</div>
</div>
<script src="/js/jquery-1.9.0.min.js"></script>
<script src="/js/i18n/msg.{{.locale}}.js"></script>
<script src="/js/common.js"></script>
<script src="/public/js/angular/angular.min.js"></script>
<script src="/public/js/angular/angular-touch.min.js"></script>
<script src="/public/js/angular/angular-resource.min.js"></script>
<script src="/public/js/angular/angular-animate.min.js"></script>
<script src="/public/js/angular/angular-route.min.js"></script>
<script src="/public/mobile2/js/app.js"></script>
<script src="/public/mobile2/js/controllers.js"></script>
<script src="/public/mobile2/js/services.js"></script>
<script src="/public/mobile2/js/snap.js"></script>
<script>
angular.element(document).ready(function() {
angular.bootstrap(document, ['myApp']);
});
</script>
</body>
</html>

View File

@ -1,178 +0,0 @@
<!DOCTYPE HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title>leanote</title>
<link href="/public/css/font-awesome-4.0.3/css/font-awesome.css" rel="stylesheet">
<link href="/public/mobile/css/base.css" rel="stylesheet" type="text/css">
<link href="/public/css/bootstrap.css" rel="stylesheet" />
<link href="/public/mobile/css/leanote.css" rel="stylesheet" type="text/css">
<script>
function log(o) {
// console.log(o);
}
</script>
</head>
<body>
<div id="preloader">
<div id="status">
<p class="center-text">
</p>
</div>
</div>
<div class="all-elements" style="height: 100%">
<div id="sidebar" class="page-sidebar sidebar-content-background">
<div class="page-sidebar-scroll">
<div>
<div class="sidebar-section">
<a href="#" class="sidebar-close"></a>
<em>leanote</em>
</div>
<div class="sidebar-decoration"></div>
<div id="userInfo">
{{.userInfo.Username}}
</div>
<div class="sidebar-decoration"></div>
<div class="sidebar-navigation">
<div class="nav-item">
<a href="#" class="nav-newest">最新笔记</a>
</div>
<div class="nav-item">
<a href="#" class="nav-myNotebooks">我的笔记本</a>
</div>
<div class="nav-item">
<a href="#" class="nav-myTags">我的标签</a>
</div>
</div>
<div class="sidebar-decoration"></div>
<div class="sidebar-navigation">
<div class="nav-item">
<a href="#" class="nav-logout">退出</a>
</div>
</div>
</div>
</div>
</div>
<div id="content" class="page-content" style="position: absolute; background-color: #fff;width: 100%;">
<!-- notebooks -->
<div id="notebooks">
<!-- 头部 -->
<div class="content-controls clearfix">
<div class="pull-left">
<i class="fa fa-angle-left back"></i>
</div>
<div class="pull-left">
<span class="g-title">
我的笔记本
</span>
</div>
<!-- 其它按钮 -->
<div class="pull-right btns">
</div>
</div>
<div class="each-container">
<div class="each-content" style="bottom: 0">
<ul id="notebookList">
</ul>
</div>
<!--
<div class="each-footer">
添加笔记本
</div>
-->
</div>
</div>
<!-- note -->
<div id="notes">
<!-- 头部 -->
<div class="content-controls clearfix">
<div class="pull-left">
<i class="fa fa-angle-left back"></i>
</div>
<div class="pull-left">
<span class="g-title">
XX的笔记
</span>
</div>
<!-- 其它按钮 -->
<div class="pull-right btns">
</div>
</div>
<div class="each-container">
<div class="each-content" style="bottom:0">
<div id="noteItemList">
</div>
</div>
<!--
<div class="each-footer">
添加笔记
</div>
-->
</div>
</div>
<!-- view -->
<div id="view">
<div class="content-controls clearfix">
<div class="pull-left">
<i class="fa fa-angle-left back"></i>
</div>
<div class="pull-left">
<span class="g-title">
笔记标题
</span>
</div>
<!-- 其它按钮 -->
<div class="pull-right btns">
<i class="fa fa-pencil" id="editBtn"></i>
</div>
</div>
<div class="each-container">
<div class="each-content" style="bottom:0">
<img id="loading" style="width: 30px; margin: auto; margin-top: 100px; height: 30px; display: none" src="/public/mobile/images/status.gif" />
<div id="noteContent"></div>
</div>
<!--
<div class="each-footer">
</div>
-->
</div>
</div>
</div>
</div>
<script src="/js/jquery-1.9.0.min.js"></script>
<script src="/public/mobile/js/snap.js"></script>
<script src="/public/js/i18n/msg.{{.locale}}.js"></script>
<script src="/public/mobile/js/app/mobile-common.js"></script>
<script>
var UserInfo = json({{.userInfoJson}});
var notebooks = json({{.notebooks}});
</script>
<!--
// var shareNotebooks = json({{.shareNotebooks}});
// var sharedUserInfos = json({{.sharedUserInfos}});
// var tagsJson = json({{.tagsJson}});
-->
<script src="/public/mobile/js/app/mobile-notebook.js"></script>
<script src="/public/mobile/js/app/mobile-tag.js"></script>
<script src="/public/mobile/js/app/mobile-note.js"></script>
<script src="/public/mobile/js/app/mobile-page.js"></script>
<script>
Notebook.RenderNotebooks(notebooks);
// Share.RenderShareNotebooks(sharedUserInfos, shareNotebooks);
// Tag.renderTagNav(tagsJson);
</script>
</body>
</html>

View File

@ -1,96 +0,0 @@
<!DOCTYPE HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title>leanote sign in</title>
<link href="/public/css/font-awesome-4.0.3/css/font-awesome.css" rel="mobile/csssheet">
<link href="/public/css/bootstrap.css" rel="stylesheet" />
<style>
.alert {
padding: 10px;
margin-bottom: 10px;
border-radius: 3px;
}
.form-control {
border-radius: 0;
-webkit-box-shadow: none;
box-shadow: none;
-webkit-transition: nonoe;
transition: none;
}
</style>
</head>
<body>
<div style="text-align: center">
<img src="/public/mobile/images/blog01.jpg" style="width: 100%"/>
<form id="loginForm" style="width: 90%; margin: auto;">
<div class="form-group">
<h2 style="margin-top:10px">leanote {{msg . "login"}}</h2>
</div>
<div class="alert alert-danger" id="loginMsg" style="display: none"></div>
<div class="form-group">
<input class="form-control" id="email" name="email" placeholder="{{msg . "usernameOrEmail"}}" value="">
</div>
<div class="form-group">
<input type="password" class="form-control" id="pwd" name="pwd" placeholder="{{msg . "password"}}">
</div>
<button id="loginBtn" class="btn btn-success" style="width: 100%">{{msg . "login"}}</button>
</form>
</div>
<script type="text/javascript" src="/public/js/jquery-1.9.0.min.js"></script>
<script>
$(function() {
$("#status").fadeOut(); // will first fade out the loading animation
$("#preloader").delay(350).fadeOut("slow"); // will fade out the white DIV that covers the website.
function showMsg(msg, id) {
$("#loginMsg").html(msg).show();
if(id) {
$("#" + id).focus();
}
}
function hideMsg() {
$("#loginMsg").hide();
}
$("#loginBtn").click(function(e){
e.preventDefault();
var email = $("#email").val();
var pwd = $("#pwd").val();
if(!email) {
showMsg("{{msg . "inputUsername"}}", "email");
return;
}
if(!pwd) {
showMsg("{{msg . "inputPassword"}}", "pwd");
return;
} else {
if(pwd.length < 6) {
showMsg("{{msg . "wrongPassword"}}", "pwd");
return;
}
}
$("#loginBtn").html("{{msg . "logining"}}...").addClass("disabled");
// hideMsg();
$.post("/doLogin", {email: email, pwd: pwd}, function(e) {
$("#loginBtn").html("{{msg . "login"}}").removeClass("disabled");
if(e.Ok) {
$("#loginBtn").html("{{msg . "loginSuccess"}}...");
location.href = '/mobile/index';
} else {
showMsg(e.Msg, "pwd");
}
});
});
});
</script>
</body>
</html>