Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 4 files changed
  • 0 comments
  • 1 contributor
Jul 14, 2012
add comment scroll bad4a31
Jul 15, 2012
add shit' e9accfa
36  html/assets/css/tapin.css
@@ -180,9 +180,13 @@ body {
180 180
     left: 0;
181 181
     top: 40px;
182 182
     bottom: 0;
183  
-    width: 480px;
  183
+    width: 495px;
184 184
     padding: 10px 25px 10px 25px;
185 185
     background: url('../img/tire.png');
  186
+    -moz-box-shadow:  0px 2px 4px #000;
  187
+    -webkit-box-shadow: 0px 2px 4px #000;
  188
+    box-shadow:  0px 2px 4px #000;
  189
+    overflow: auto;
186 190
 }
187 191
 
188 192
 #sidebar h2 {
@@ -193,24 +197,42 @@ body {
193 197
 }
194 198
 
195 199
 #comments #more {
  200
+    height: 20px;
  201
+    width: 100%;
  202
+    bottom: 0px;
  203
+    position:absolute;
  204
+}
  205
+
  206
+#more-button {
  207
+    cursor:pointer;
  208
+    color: #999;
  209
+    width: 40px;
  210
+    padding-bottom: 20px;
  211
+    height: 4px;
196 212
     margin: 0 auto;
197  
-    margin-left: 210px;
198  
-    height: 10px;
199  
-    width: 30px;
  213
+    margin-top: -8px;
  214
+    text-align: center;
  215
+    background: #1e1e1e;
  216
+    border-radius: 5px;
  217
+    border: solid 1px black;
200 218
 }
201 219
 
202 220
 #comments {
  221
+    position:relative;
203 222
     overflow:hidden;
204 223
     width: 464px;
205 224
     background: #181818;
206  
-    height: 180px;
207  
-    padding: 8px 8px 8px 8px;
  225
+    padding: 8px 8px 24px 8px;
208 226
     border-radius: 5px;
209 227
     margin-top: -15px;
210 228
     -moz-box-shadow: inset 1px 1px 1px #000;
211 229
     -webkit-box-shadow: inset 1px 1px 1px #000;
212 230
     box-shadow: inset 1px 1px 1px #000;
213 231
     background: url('../img/commentsbg.png');
  232
+    transition: height .4s;
  233
+    -moz-transition: height .4s; /* Firefox 4 */
  234
+    -webkit-transition: height .4s; /* Safari and Chrome */
  235
+    -o-transition: height .4s; /* Opera */
214 236
 }
215 237
 
216 238
 .badge {
@@ -330,7 +352,7 @@ body {
330 352
 #map {
331 353
     position: absolute;
332 354
     top: 40px;
333  
-    left: 0;
  355
+    left: 545px;
334 356
     bottom: 0;
335 357
     right: 0;
336 358
 }
1  html/assets/js/tapin/api.js
@@ -18,7 +18,6 @@ define(['tapin/util/log', 'tapin/util/event', 'jquery', 'tapin/config', 'tapin/u
18 18
          */
19 19
         this.call = function(endpoint, params, lambda, error_lambda, type)
20 20
         {
21  
-            alert();
22 21
             if (typeof(params) === 'string') {
23 22
                 params += '&token=' + token + '&';
24 23
             } else if(typeof(params) === 'object') {
21  html/assets/js/tapin/frontend.js
@@ -235,7 +235,7 @@ define([
235 235
             });
236 236
 
237 237
             $('#comment-form').click(function(){
238  
-                document.getElementById('comment-form').style.height = '60px';
  238
+                $('#comment-form').height(60);
239 239
             });
240 240
 
241 241
             //Handles what happens when you click 'lastweek' button
@@ -298,6 +298,25 @@ define([
298 298
             $('a#stream').click(function(){
299 299
                 alert();
300 300
             });
  301
+
  302
+            $('#more').click(function(){
  303
+                var comment = $("div id='comments'><div class='comment'><div class='user-icon'></div><div class='body'>Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non!<div class='time'>about 20 minutes ago</div></div></div>");
  304
+                var comment2 = $("div id='comments'><div class='comment'><div class='user-icon'></div><div class='body'>Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non!<div class='time'>about 20 minutes ago</div></div></div>");
  305
+
  306
+                $('#comments').append(comment);
  307
+                $('#comments').append(comment2);
  308
+            });
  309
+
  310
+            //Comment submission
  311
+
  312
+            $('#submit-comment').click(function(){
  313
+                var comment = $('#comment-form').val();
  314
+                var params = 'cookie=banana&cheese=taco';
  315
+
  316
+                _this.api.update_object_by_key('comment', '23432', params, function(data) {
  317
+                    alert(data);
  318
+                });
  319
+            });
301 320
            
302 321
             // Bind to volume change events
303 322
             this.volume.onVolumeChange.register(function(newVolume)
9  html/index.html
@@ -116,8 +116,8 @@ <h2 id='currently-playing'>Currently Playing</h2>
116 116
         <h2>Comment</h2>
117 117
         <form>
118 118
             <div class='user-icon'></div>
119  
-            <textarea id='comment-form' class='span4' rows="10" cols="30"></textarea> 
120  
-            <input class="btn btn-danger" type="submit" value="Submit">
  119
+            <textarea id='comment-form' class='span4' rows="10" cols="30" placeholder='Leave a comment...'></textarea> 
  120
+            <input id='submit-comment' class="btn btn-danger" type="button" value="Submit">
121 121
         </form>
122 122
         <div id='comments'>
123 123
             <div class='comment'>
@@ -141,12 +141,9 @@ <h2 id='currently-playing'>Currently Playing</h2>
141 141
                     <div class='time'>about 20 minutes ago</div>
142 142
                 </div>
143 143
              </div>
144  
-             
145 144
 
146  
-              <div id='more'>...</div>
  145
+              <div id='more'><div id='more-button'>...</div></div>
147 146
         </div>
148  
-
149  
-
150 147
     </div>
151 148
 
152 149
     <script src="http://maps.googleapis.com/maps/api/js?key=AIzaSyCT6d3KrGPRmnP-Z1asHB6MuC9Ed0idEXg&amp;sensor=false"></script>

No commit comments for this range

Something went wrong with that request. Please try again.