Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

sample images added

  • Loading branch information...
commit 6dde3efffbd981a926e1c708e0424635c08a710b 1 parent adc232a
@jamland jamland authored
View
BIN  images/samples/__walle.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/samples/android.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/samples/calculon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/samples/irondog.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/samples/r2d2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/samples/transformer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/samples/walle.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
23 index.php
@@ -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
23 style.css
@@ -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;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.