Skip to content
Browse files

Change from table-based to div-based message list.

  • Loading branch information...
1 parent 615fb71 commit bbefefe27d7c7fd281f1fcc62965e2b9c3c4ef69 @akavlie committed Oct 4, 2010
Showing with 26 additions and 24 deletions.
  1. +12 −8 sms/static/style.css
  2. +14 −16 sms/templates/index.html
  3. BIN sms/views.pyc
View
20 sms/static/style.css
@@ -16,15 +16,19 @@ h1 {
border: 1px solid #AACBE2;
}
-#sent_messages {
- border-collapse: collapse;
- border: 1px solid #AACBE2;
+/* SENT MESSAGES */
+
+#sent_message_list {
}
- #sent_messages tr:first-child {
- background: #CEE5F5;
+.sent_message {
+ position: relative;
+}
+ .sent_message .status {
}
-
- #sent_messages th, #sent_messages td {
- padding: 4px 20px;
+ .sent_message .phone {
+ }
+ .sent_message .time {
+ }
+ .sent_message .message_text {
}
View
30 sms/templates/index.html
@@ -7,9 +7,15 @@
$(function() {
$("#sms_form").submit(function() {
- $.post("/sms", $("#sms_form").serialize());
+ //$.post("/sms", $("#sms_form").serialize());
+ //$("#sent_messages td").animate({top: '+=50'}, 'slow');
+ $("#sent_messages td").slideOut();
+ return false;
+ });
+
+ $('#go').click(function() {
+ $("#play").animate({top: '+=50'}, 'slow');
});
- return false;
});
</script>
@@ -23,22 +29,14 @@
</form>
{% if sent_messages %}
- <table id="sent_messages">
- <tr>
- <th>Time</th>
- <th>Phone Number</th>
- <th>Message</th>
- <th>Status</th>
- </tr>
{% for message in sent_messages %}
- <tr>
- <td>{{ message.date }}</td>
- <td>{{ message.phone }}</td>
- <td>{{ message.message }}</td>
- <td>{{ message.status }}</td>
- </tr>
+ <div class="sent_message">
+ <div class="status">{{ message.status }}</div>
+ <div class="phone">{{ message.phone }}</div>
+ <div class="time">{{ message.date }}</div>
+ <div class="message_text">{{ message.message }}</div>
+ </div>
{% endfor %}
- </table>
{% else %}
No messages yet!
{% endif %}
View
BIN sms/views.pyc
Binary file not shown.

0 comments on commit bbefefe

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