diff options
Diffstat (limited to 'share/frontend')
| -rw-r--r-- | share/frontend/imconcat/index.html | 60 |
1 files changed, 59 insertions, 1 deletions
diff --git a/share/frontend/imconcat/index.html b/share/frontend/imconcat/index.html index a22b8c5..bdc676b 100644 --- a/share/frontend/imconcat/index.html +++ b/share/frontend/imconcat/index.html @@ -61,6 +61,7 @@ .modal-body > img{ margin-left:5px; width: 100%; + height: 100%; border: 1px solid gray; } #final_image > a > img{ @@ -75,6 +76,17 @@ #error_message{ color: red; } + .switcheroo { + width: 19px; + height:38px; + display: inline-block; + position: absolute; + background-image: url(http://i.asdf.us/im/7e/user_convo_1353562627_1355449919.png); + //background-image: url( http://i.asdf.us/im/7b/user_convo_1353562627.png); + background-repeat:no-repeat; + background-position: 3px 10px; + cursor: pointer; + } </style> </head> <body> @@ -207,7 +219,12 @@ $('#final_height > .final_value').html(data.height) $('#final_size > .final_value').html(data.size.toString() + " bytes") $('#final_url > .final_value').val(data.url) - $('#final_width, #final_height, #final_size, #final_url, #final_image').removeClass('dontshowme') + $('#final_width, #final_height, #final_size, #final_url, #final_image, #send_to_input').removeClass('dontshowme') + $('#send_to_input').click(function(){ + $('#jsonform-0-elt-img_url1').val(data.url) + generatingOff() + $('#myModal').modal('hide') + }); $('.modal').modal() } function showFailure(data){ @@ -256,6 +273,47 @@ $('#myModal').on('hidden.bs.modal', function () { generatingOff() }) + var switcheroo = ('<div class="switcheroo"></div>') + $('#jsonform-0-elt-img_url1, #jsonform-0-elt-frames_match, ' + + '#jsonform-0-elt-merge_direction, #jsonform-0-elt-dimensions_match').each( + function(el){ + var that = this + $(switcheroo).insertAfter( + this + ) + var my_switcheroo = $(this).next() + if ($(that).attr("id") == 'jsonform-0-elt-img_url1'){ + $(my_switcheroo).css({ + 'position': 'relative', + 'top': '50px' + }) + } + $(my_switcheroo).click(function(el){ + switch($(that).attr("id")){ + case 'jsonform-0-elt-img_url1': + var url2 = $(that).val() + var url1 = $('#jsonform-0-elt-img_url2').val() + $(that).val(url1) + $('#jsonform-0-elt-img_url2').val(url2) + break; + case 'jsonform-0-elt-dimensions_match': + var dimensions = $('#jsonform-0-elt-dimensions_match').val() == 'smaller' ? 'larger' : 'smaller'; + $('#jsonform-0-elt-dimensions_match').val(dimensions) + break; + case 'jsonform-0-elt-frames_match': + var dimensions = $('#jsonform-0-elt-frames_match').val() == 'shorter' ? 'longer' : 'shorter'; + $('#jsonform-0-elt-frames_match').val(dimensions) + break; + case 'jsonform-0-elt-merge_direction': + var dimensions = $('#jsonform-0-elt-merge_direction').val() == 'right' ? 'down' : 'right'; + $('#jsonform-0-elt-merge_direction').val(dimensions) + break; + default: + msg = "Request was unable to reach the server. Try Again?" + } + }) + } + ) }) </script> |
