Permalink
Browse files

sample images added

  • Loading branch information...
1 parent adc232a commit 6dde3efffbd981a926e1c708e0424635c08a710b @jamland jamland committed Mar 16, 2012
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -50,11 +50,16 @@
<h3>Or add url to pic in form below</h3>
<form action="/mq/postMessage.php" id="sendMessageForm">
<input id = "pic_url" type="text" name="url" placeholder="Search..."/>
- <input type="submit" value="Add picture"/>
+ <input type="submit" value="Push to Queue"/>
</form>
- <small id="lib-toggler">Or even simply choose one from our set</small>
- <div>
- <img src="" alt="">
+ <small id="sample-toggler">Or even simply choose one from our set</small>
+ <div id="samples">
+ <img src="images/samples/irondog.png" alt="">
+ <img src="images/samples/transformer.png" alt="">
+ <img src="images/samples/android.png" alt="">
+ <img src="images/samples/walle.png" alt="">
+ <img src="images/samples/r2d2.png" alt="">
+ <img src="images/samples/calculon.png" alt="">
</div><!-- / -->
<div id="result">Message posted</div>
</div>
@@ -165,6 +170,16 @@ function queue_worker(data) {
return task_id;
}
$(document).ready(function () {
+
+ $('#sample-toggler').click(function(){
+ $('#samples').slideToggle(300);
+ });
+ $('#samples img').click(function(){
+ $(this).parent().children('img').removeClass('selected');
+ $(this).addClass('selected');
+ $('#pic_url').val($(this).attr('src'));
+ });
+
setInterval(function () {
$.get('/mq/getMessage.php?queue_name=input_queue', null, function (data) {
if (data) {
View
@@ -472,3 +472,26 @@ code {
from { transform:rotate(0deg); }
to { transform:rotate(360deg); }
}
+
+#samples {
+ padding: 30px 0 20px;
+ display: none;
+}
+
+#samples img {
+ width: 100px;
+ cursor: default;
+ border-radius: 10px;
+}
+
+#samples img.selected {
+ background: rgba(65, 95, 113, .3);
+}
+
+#samples img:hover {
+ box-shadow: 0 0px 5px hsl(200, 60%, 40%);
+}
+
+#sample-toggler {
+ cursor: pointer;
+}

0 comments on commit 6dde3ef

Please sign in to comment.