Permalink
Browse files

Don't show message content by default.

  • Loading branch information...
1 parent 277a7ae commit d5b2c1b067dace7994ab0fc33f5cd375b5759928 @dustin committed Sep 7, 2011
View
8 _attachments/js/readme.js
@@ -126,6 +126,14 @@ function rm_init_update_links(app) {
return false;
});
});
+
+ $(".more").each(function(a, el) {
+ var parts = el.id.split('-');
+ $(el).click(function() {
+ $('#message-' + parts[1]).toggle('fast');
+ return false;
+ });
+ });
}
function rm_init_list_links(app) {
View
4 _attachments/style/main.css
@@ -43,6 +43,10 @@ div.avatar .name {
list-style: none;
}
+#items li div.message {
+ display: none;
+}
+
#history {
list-style: none;
font-size: smaller;
View
19 evently/items/_changes/after.js
@@ -1,22 +1,5 @@
function(me, args) {
var app = $$(this).app;
- var baseUri = app.db.uri;
- var ddoc = app.ddoc._id;
-
- $(".statechange").each(function(a, el) {
- var parts = el.id.split('-');
- $(el).click(function() {
- $.ajax({type: 'POST',
- url: baseUri + ddoc + "/_update/set_state/" + parts[1],
- data: 'new_state=' + encodeURIComponent(parts[0]),
- dataType: "json",
- complete: function(res) {
- console.log("Result", res);
- }});
-
- return false;
- });
- });
-
+ rm_init_update_links(app);
rm_refreshTimestamps();
}
View
3 evently/items/_changes/mustache.html
@@ -14,8 +14,9 @@
<span class="name">{{author}}</span>
<a href="{{link}}" class="title">{{title}}</a>
<span class="timestamp" title="{{updated}}">{{updated}}</span>
+ <a href="#" class="more" id="more-{{_id}}">&raquo;</a>
</div>
- <div id="message">{{{summary}}}</div>
+ <div class="message" id="message-{{_id}}">{{{summary}}}</div>
<div style="clear:left;"></div>
</li>
{{/items}}
View
3 templates/item.html
@@ -12,7 +12,8 @@
<span class="name">{{author}}</span>
- <a href="{{link}}" class="title">{{title}}</a>
<span class="timestamp" title="{{updated}}">{{updated}}</span>
+ <a href="#" class="more" id="more-{{_id}}">&raquo;</a>
</div>
- <div id="message">{{{summary}}}</div>
+ <div class="message" id="message-{{_id}}">{{{summary}}}</div>
<div style="clear:left;"></div>
</li>

0 comments on commit d5b2c1b

Please sign in to comment.