mirror of
https://github.com/pinry/pinry.git
synced 2026-01-15 11:42:07 +01:00
Improve bookmarklet form
This commit is contained in:
@@ -116,6 +116,10 @@ textarea {
|
||||
.qq-upload-spinner {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
overflow: hidden;
|
||||
}
|
||||
/* End Forms */
|
||||
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ $(document).ready(function() {
|
||||
$(pinryBar).css({
|
||||
'background': 'black',
|
||||
'padding': '15px',
|
||||
'position': 'fixed',
|
||||
'position': 'absolute',
|
||||
'z-index': '9002',
|
||||
'width': '100%',
|
||||
'top': 0,
|
||||
@@ -91,7 +91,7 @@ $(document).ready(function() {
|
||||
});
|
||||
$(image).click(function() {
|
||||
var popUrl = getFormUrl()+imageUrl;
|
||||
window.open(popUrl, '', 'width=590,height=439,toolbar=0,menubar=0');
|
||||
window.open(popUrl);
|
||||
$('#pinry-images').remove();
|
||||
});
|
||||
return $('#pinry-images').append(image);
|
||||
|
||||
@@ -34,9 +34,17 @@ $(window).load(function() {
|
||||
preview.find('.pin').width(200);
|
||||
preview.find('.pin .text').width(140);
|
||||
preview.find('.pin').fadeIn(300);
|
||||
if (getFormData().url == "")
|
||||
preview.find('.image-wrapper').height(278);
|
||||
preview.find('.image-wrapper img').fadeIn(300);
|
||||
if (preview.find('.pin').height() > 305)
|
||||
$('#pin-form .modal-body').height(preview.find('.pin').height());
|
||||
console.log(preview.find('.pin').height());
|
||||
setTimeout(function() {
|
||||
if (preview.find('.pin').height() > 305) {
|
||||
$('#pin-form .modal-body').animate({
|
||||
'height': preview.find('.pin').height()
|
||||
}, 300);
|
||||
}
|
||||
}, 300);
|
||||
}
|
||||
|
||||
function dismissModal(modal) {
|
||||
@@ -57,9 +65,13 @@ $(window).load(function() {
|
||||
pinFromUrl = getUrlParameter('pin-image-url');
|
||||
modal.modal('show');
|
||||
// Auto update preview on field changes
|
||||
var timer;
|
||||
for (var i in formFields) {
|
||||
formFields[i].bind('propertychange keyup input paste', function() {
|
||||
createPinPreviewFromForm();
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout(function() {
|
||||
createPinPreviewFromForm()
|
||||
}, 700);
|
||||
if (!uploadedImage)
|
||||
$('#pin-form-image-upload').parent().parent().fadeOut(300);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user