You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2016/09/02 19:17:44 UTC
[6/7] incubator-ponymail git commit: start work on basic scaffolding
for listview
start work on basic scaffolding for listview
Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/ff2ab2f2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/ff2ab2f2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/ff2ab2f2
Branch: refs/heads/coffee-and-cake
Commit: ff2ab2f294bdb0a8dcee88f528d7144ca6466684
Parents: f344750
Author: Daniel Gruno <hu...@apache.org>
Authored: Fri Sep 2 21:17:13 2016 +0200
Committer: Daniel Gruno <hu...@apache.org>
Committed: Fri Sep 2 21:17:13 2016 +0200
----------------------------------------------------------------------
site/css/ponymail2.css | 17 +++++++++
site/js/coffee/scaffolding.coffee | 67 ++++++++++++++++++++++++++++++++++
site/list2.html | 6 +--
3 files changed, 86 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/ff2ab2f2/site/css/ponymail2.css
----------------------------------------------------------------------
diff --git a/site/css/ponymail2.css b/site/css/ponymail2.css
index 846f4b2..eec12d4 100644
--- a/site/css/ponymail2.css
+++ b/site/css/ponymail2.css
@@ -113,3 +113,20 @@ body, html {
}
+
+
+#header {
+ text-align: center;
+ font-family: sans-serif;
+ font-size: 15pt;
+}
+
+#calendar {
+ width: 140px;
+ float: left;
+}
+
+#listview {
+ width: calc(95% - 160px);
+ float: left;
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/ff2ab2f2/site/js/coffee/scaffolding.coffee
----------------------------------------------------------------------
diff --git a/site/js/coffee/scaffolding.coffee b/site/js/coffee/scaffolding.coffee
new file mode 100644
index 0000000..07af4e7
--- /dev/null
+++ b/site/js/coffee/scaffolding.coffee
@@ -0,0 +1,67 @@
+###
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+###
+
+### This is the basic scaffolding for all pages ###
+
+listviewScaffolding = () ->
+ ### Start off by making the top menu ###
+ menu = new HTML('div', { id: "topMenu"})
+ document.body.inject(menu)
+
+ # Add menu points
+ ul = new HTML('ul')
+
+ # Add logo first
+ logo = new HTML('li', {
+ class: 'logo'
+ }, new HTML('a', {
+ href: "./"
+ }, new HTML('img', {
+ src: "images/logo.png",
+ style: {
+ paddingRight: "10px",
+ height: "38px",
+ width: "auto"
+ }
+ })))
+ ul.inject(logo)
+
+ # Menu points
+ for item in ['Home', 'Lists', 'Third item']
+ li = new HTML('li', {}, item)
+ ul.inject(li)
+ menu.inject(ul)
+
+ ### Now, make the base div ###
+ mainDiv = new HTML('div', { id: "contents"})
+ document.body.inject(mainDiv)
+
+ ### Make the title ###
+ header = new HTML('h2', {id: "header"}, "Loading list data...")
+ mainDiv.inject(header)
+
+ ### Then make the calendar placeholder ###
+ calHolder = new HTML('div', { id: "calendar"})
+ mainDiv.inject(calHolder)
+
+ ### TEST: Insert fake calendar ###
+ cal = new Calendar(2010)
+ calHolder.inject(cal)
+
+ ### Finally, make the list view placeholder ###
+ listDiv = new HTML('div', { id: "listview", class: "sbox"})
+ mainDiv.inject(listDiv)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/ff2ab2f2/site/list2.html
----------------------------------------------------------------------
diff --git a/site/list2.html b/site/list2.html
index deba3c5..15854b1 100644
--- a/site/list2.html
+++ b/site/list2.html
@@ -20,10 +20,8 @@ the License. -->
<link rel="stylesheet" href="css/ponymail2.css"/>
<title>Pony Mail!</title>
</head>
- <body onLoad="testCoffee();">
- <div id="testdiv">
-
- </div>
+ <body onLoad="listviewScaffolding();">
+ <script type="text/javascript" src="js/config.js"></script>
<script type="text/javascript" src="js/ponymail-coffee.js"></script>
</body>
</html>
\ No newline at end of file