Skip to content
Browse files

adding initial view switch for click data

  • Loading branch information...
1 parent 297fc2a commit 56f56f4f14874d0779caf3923585a6af44625bd2 @addyosmani committed Apr 25, 2011
Showing with 17 additions and 7 deletions.
  1. +4 −0 css/application.css
  2. +13 −7 index.html
View
4 css/application.css
@@ -94,6 +94,10 @@ body {
#tasks .item.editing .edit { display: block; }
#tasks .item.editing .view { display: none; }
#tasks .item .original { clear:both; font-size:11px;}
+#tasks .item .clicks { font-size: 10px; display: none;position: absolute; right: 35px; top: 16px; cursor:pointer; background-color:#ffcccc;}
+#tasks .item:hover .clicks{
+ display:block;
+}
#tasks footer {
display: block;
View
20 index.html
@@ -16,11 +16,11 @@
<script type="text/javascript" charset="utf-8">
var Users = Spine.Controller.create({
init: function(){
- this.navigate("/step", '1');
+ this.navigate("/ui", 'dashboard');
},
- active: function(number){
- console.log("active", number)
+ active: function(viewName){
+ console.log("active", viewName)
}
});
@@ -32,11 +32,10 @@
init: function(){
this.users = Users.init();
this.routes({
- "/step/:number": function(num){
- this.users.active(num);
+ "/ui/:viewName": function(viewName){
+ this.users.active(viewName);
},
"/step/*glob": function(any){
- console.log('any', any);
}
});
}
@@ -94,7 +93,8 @@
"click .destroy": "destroy",
"dblclick .view": "edit",
"keypress input[type=text]": "blurOnEnter",
- "blur input[type=text]": "close"
+ "blur input[type=text]": "close",
+ "click .clicks": "viewclicks"
},
elements: {
@@ -122,6 +122,11 @@
destroy: function(){
this.item.destroy();
},
+
+ viewclicks: function(){
+ this.navigate("/ui", 'dashboard/' + this.el.index());
+ //then follow render
+ },
edit: function(){
this.wrapper.addClass("editing");
@@ -219,6 +224,7 @@
<span>${name}</span>
<span class="original">${original}</span>
+ <a class="clicks">Clicks data</a>
<a class="destroy"></a>
</div>

0 comments on commit 56f56f4

Please sign in to comment.
Something went wrong with that request. Please try again.