Permalink
Browse files

collections dropdown

  • Loading branch information...
1 parent 5f66768 commit 6f8ba5758a1e9738e0be608f893bf4b0c2d07fca @contra committed Apr 27, 2012
View
@@ -3281,9 +3281,9 @@ input[type="submit"].btn.btn-mini {
width: 405px;
margin: -200px 0 0 -200px;
background-color: #ffffff;
- border: 1px solid #999;
- border: 1px solid rgba(0, 0, 0, 0.3);
- *border: 1px solid #999;
+ /*border: 1px solid #999;*/
+ /*border: 1px solid rgba(0, 0, 0, 0.3);*/
+ /*border: 1px solid #999;*/
/* IE6-7 */
-webkit-border-radius: 6px;
View
@@ -38,13 +38,8 @@
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
- <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </a>
<a class="brand" href="#">Smog</a>
- <div class="nav-collapse">
+ <div id="navigation" class="nav-collapse">
<ul class="nav">
<li>
<a id="login-link" href="#/login">Login</a>
View
@@ -0,0 +1,7 @@
+define ["smog/server", "templates/navigation", "smog/notify"], (server, templ, notify) ->
+ ->
+ server.getCollections (err, coll) ->
+ return notify.error "Error grabbing collections: #{err}" if err?
+ coll = (it.name.substring(it.name.indexOf('.')+1) for it in coll)
+ $('#navigation').html templ collections: coll
+ $('#content').html ''
View
@@ -11,4 +11,5 @@ define ["smog/server", "templates/login", "smog/notify"], (server, templ, notify
if err?
notify.error "Connection error: #{err}"
else
- notify.success 'Connection established!'
+ notify.success 'Connection established!'
+ window.location.hash = '#/home'
View
@@ -1,2 +1,3 @@
-define ["smog/login"], (login) ->
- '/login': login
+define ["smog/login", "smog/home"], (login, home) ->
+ '/login': login
+ '/home': home
No changes.
@@ -0,0 +1,8 @@
+ul.nav
+ li.dropdown
+ a(href="", class="dropdown-toggle", data-toggle="dropdown") Collections
+ b.caret
+ ul.dropdown-menu
+ each collection in collections
+ li
+ a(href="#/collection/#{collection}") #{collection}
@@ -3,4 +3,4 @@
module.exports = (reply, socket) ->
return reply "Not connected" unless socket.mongo?
- socket.mongo.database.collectionsInfo().toArray reply
+ socket.mongo.database.collectionNames reply
View
@@ -3281,9 +3281,9 @@ input[type="submit"].btn.btn-mini {
width: 405px;
margin: -200px 0 0 -200px;
background-color: #ffffff;
- border: 1px solid #999;
- border: 1px solid rgba(0, 0, 0, 0.3);
- *border: 1px solid #999;
+ /*border: 1px solid #999;*/
+ /*border: 1px solid rgba(0, 0, 0, 0.3);*/
+ /*border: 1px solid #999;*/
/* IE6-7 */
-webkit-border-radius: 6px;
View
@@ -38,13 +38,8 @@
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
- <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </a>
<a class="brand" href="#">Smog</a>
- <div class="nav-collapse">
+ <div id="navigation" class="nav-collapse">
<ul class="nav">
<li>
<a id="login-link" href="#/login">Login</a>
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 6f8ba57

Please sign in to comment.