Add cover photo submitter, cover photo votes, and portal details to large portal display dialog.

This commit is contained in:
Gabriel Sjöberg
2013-07-09 17:03:19 -05:00
parent a1cfa9b8d6
commit 9cf2dd391e
4 changed files with 103 additions and 9 deletions

View File

@ -10,15 +10,23 @@ window.showLayerChooser = true;
window.setupLargeImagePreview = function() {
$('#portaldetails').on('click', '.imgpreview', function() {
var img = $(this).find('img')[0];
var details = $(this).find('div.portalDetails')[0];
//dialogs have 12px padding around the content
var dlgWidth = Math.max(img.naturalWidth+24,400);
dialog({
html: '<div style="text-align: center">' + img.outerHTML + '</div>',
title: $(this).parent().find('h3.title').text(),
width: dlgWidth,
});
});
var dlgWidth = Math.max(img.naturalWidth+24,500);
if (details) {
dialog({
html: '<div style="text-align: center">' + img.outerHTML + '</div>' + details.outerHTML,
title: $(this).parent().find('h3.title').text(),
width: dlgWidth,
});
} else {
dialog({
html: '<div style="text-align: center">' + img.outerHTML + '</div>',
title: $(this).parent().find('h3.title').text(),
width: dlgWidth,
});
}
});
}
// adds listeners to the layer chooser such that a long press hides