Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updates mostly to speed up animation

  • Loading branch information...
commit a1099019504216ae675fe03738600bd4095b6794 1 parent 9162b6a
@daleharvey authored
View
32 _attachments/css/main.css
@@ -112,9 +112,12 @@ input[type=submit], input[type=button], .button {
/* LAYOUT */
#content {
+ top:50px;
position:relative;
- -webkit-transition: all 0.5s ease-in-out;
- -moz-transition: all 0.5s ease-in-out;
+ -webkit-transition: -webkit-transform 0.5s ease-in-out;
+ -moz-transition: -moz-transform 0.5s ease-in-out;
+ -webkit-backface-visibility: hidden;
+ -webkit-perspective:1000;
}
.pane {
@@ -125,12 +128,8 @@ input[type=submit], input[type=button], .button {
padding-bottom:10px;
}
-.slidepane {
- -webkit-transition: all 0.5s ease-in-out;
- -moz-transition: all 0.5s ease-in-out;
-}
-
#header {
+ z-index:4;
width:100%;
display:block;
background:#222;
@@ -145,12 +144,12 @@ input[type=submit], input[type=button], .button {
ul {
margin:10px;
- -webkit-box-shadow:0px 1px 2px #666;
- box-shadow:0px 1px 2px #666;
- -moz-box-shadow: 1px 1px 1px #FFF;
+ /* -webkit-box-shadow:0px 1px 2px #666; */
+ /* box-shadow:0px 1px 2px #666; */
+ /* -moz-box-shadow: 1px 1px 1px #FFF; */
background-clip: padding-box;
border-radius: 0.6em 0.6em 0.6em 0.6em;
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
+ /* box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); */
padding:0px;
}
@@ -231,6 +230,9 @@ li a, li > span {
.plain_btn {
position:absolute;
}
+#header {
+ position:fixed;
+}
#header h1 {
color:white;
text-align:center;
@@ -304,8 +306,8 @@ option {
text-align:center;
padding:10px;
border-radius:5px;
- -moz-box-shadow:0px 1px 2px #666;
- -webkit-box-shadow:0px 1px 2px #666;
+ /* -moz-box-shadow:0px 1px 2px #666; */
+ /* -webkit-box-shadow:0px 1px 2px #666; */
background: -moz-linear-gradient(center top,
#F9F9F9, #E3E3E3) repeat scroll 0 0 transparent;
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0,#F9F9F9),color-stop(1,#E3E3E3));
@@ -332,8 +334,8 @@ select {
width:100%;
/* padding:10px 10px 10px 10px; */
border-radius:5px;
- -moz-box-shadow:0px 1px 2px #666;
- -webkit-box-shadow:0px 1px 2px #666;
+ /* -moz-box-shadow:0px 1px 2px #666; */
+ /* -webkit-box-shadow:0px 1px 2px #666; */
background: -moz-linear-gradient(center top,
#F9F9F9, #E3E3E3) repeat scroll 0 0 transparent;
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0,#F9F9F9),color-stop(1,#E3E3E3));
View
4 _attachments/index.html
@@ -5,7 +5,9 @@
<meta charset="utf-8" />
<meta name="viewport"
content="width=device-width,minimum-scale=1,maximum-scale=1" />
+ <meta name="apple-mobile-web-app-capable" content="yes">
<title>Mobile Futon</title>
+
<link rel="stylesheet" href="css/main.css">
</head>
@@ -13,7 +15,7 @@
<body>
<div id="header">
- <a href="#" class="home">couch</a>
+ <a href="#/" class="home">couch</a>
<h1 id="title">Mobile Futon</h1>
<div id="user" class="plain_btn">&nbsp;</div>
</div>
View
48 _attachments/js/mobile.futon.js
@@ -71,19 +71,18 @@ var MobileFuton = (function () {
var docs = {};
var replications = localData.get('replications', []);
var clearRefresh = function() { clearInterval(interval); };
+ var version;
-
- router.get(/^(#)?$/, function (rtr) {
+ router.get(/^#(\/)?$/, function (rtr) {
setTitle('Mobile Futon');
- $.couch.info().then(function(info) {
- var tpldata =
- { ip: router.params.ip || location.hostname
- , port: location.port || 80
- , version: (info.version)
- , adminparty: isAdminParty() }
- renderer.render('home_tpl', tpldata, rtr);
- });
- }).opts({"foo":"bar"});
+ var tpldata ={
+ ip: router.params.ip || location.hostname,
+ port: location.port || 80,
+ version: version.version,
+ adminparty: isAdminParty()
+ };
+ renderer.render('home_tpl', tpldata, rtr);
+ });
router.get('#/couchapps/', function(rtr) {
@@ -99,7 +98,7 @@ var MobileFuton = (function () {
function isCouchApp(ddoc, max) {
- var url = '/' + ddoc.database + '/' + ddoc.ddoc + '/index.hml';
+ var url = '/' + ddoc.database + '/' + ddoc.ddoc + '/index.html';
var complete = function(xhr) {
completed++;
@@ -134,10 +133,10 @@ var MobileFuton = (function () {
router.get('#/db/:database/', function (rtr, database) {
- var dbname = decodeURIComponent(database)
- , views = []
- , $db = $.couch.db(dbname)
- , allDocs = $db.allDesignDocs({include_docs:true});
+ var dbname = decodeURIComponent(database);
+ var views = [];
+ var $db = $.couch.db(dbname);
+ var allDocs = $db.allDesignDocs({include_docs:true});
setTitle(dbname);
@@ -151,11 +150,13 @@ var MobileFuton = (function () {
});
});
- var data = { views: views
- , db: database
- , doc_count: info.doc_count
- , update_seq: info.update_seq
- , disk_size: Utils.formatSize(info.disk_size) };
+ var data = {
+ views: views,
+ db: database,
+ doc_count: info.doc_count,
+ update_seq: info.update_seq,
+ disk_size: Utils.formatSize(info.disk_size)
+ };
renderer.render('database_tpl', data, rtr);
});
@@ -778,7 +779,10 @@ var MobileFuton = (function () {
updateSession(function() {
makeLinksFast(document);
- router.init(window);
+ $.couch.info().then(function(data) {
+ version = data;
+ router.init(window);
+ });
});
})();
View
2  _attachments/js/renderer.js
@@ -33,6 +33,8 @@ var Renderer = (function() {
function render(tpl, data, opts, callback) {
+ window.scrollTo(0, 0);
+
opts = opts || {};
data = data || {};
Please sign in to comment.
Something went wrong with that request. Please try again.