forked from code.ivysaur.me/contented
Compare commits
2 Commits
a83a34a047
...
806ee9edd2
| Author | SHA1 | Date | |
|---|---|---|---|
| 806ee9edd2 | |||
| 862f562a83 |
7
.gitignore
vendored
7
.gitignore
vendored
@@ -1,5 +1,10 @@
|
|||||||
cmd/contented/contented
|
# Ignore all files when running locally
|
||||||
|
cmd/contented/*
|
||||||
|
# But add back the actual main file
|
||||||
|
!cmd/contented/main.go
|
||||||
cmd/contented-multi/contented-multi
|
cmd/contented-multi/contented-multi
|
||||||
build/
|
build/
|
||||||
_dist/
|
_dist/
|
||||||
|
# Ignore any built files if they ever turn up
|
||||||
contented.db
|
contented.db
|
||||||
|
contented.exe
|
||||||
|
|||||||
@@ -56,7 +56,11 @@ $.get("/about", function(ret) {
|
|||||||
|
|
||||||
// Load upload widget
|
// Load upload widget
|
||||||
contented.init("#surrogate-area", function(items) {
|
contented.init("#surrogate-area", function(items) {
|
||||||
window.location.href = contented.getMultiPreviewURL(items);
|
if (items.length == 1) {
|
||||||
|
window.location.href = contented.getDownloadURL(items[0]);
|
||||||
|
} else {
|
||||||
|
window.location.href = contented.getMultiPreviewURL(items);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -273,17 +273,20 @@
|
|||||||
var $element = $(element);
|
var $element = $(element);
|
||||||
var offset = $element.offset();
|
var offset = $element.offset();
|
||||||
|
|
||||||
$f.css({
|
onresize = (_) => {
|
||||||
'position': 'absolute',
|
$f.css({
|
||||||
'left': offset.left + "px",
|
'position': 'absolute',
|
||||||
'top': offset.top + "px",
|
'left': offset.left + "px",
|
||||||
'width': $element.width() + "px",
|
'top': offset.top + "px",
|
||||||
'min-width': $element.width() + "px",
|
'width': $element.width() + "px",
|
||||||
'max-width': $element.width() + "px",
|
'min-width': $element.width() + "px",
|
||||||
'height': $element.height() + "px",
|
'max-width': $element.width() + "px",
|
||||||
'min-height': $element.height() + "px",
|
'height': $element.height() + "px",
|
||||||
'max-height': $element.height() + "px"
|
'min-height': $element.height() + "px",
|
||||||
});
|
'max-height': $element.height() + "px"
|
||||||
|
});
|
||||||
|
};
|
||||||
|
onresize();
|
||||||
|
|
||||||
// Drag and drop support
|
// Drag and drop support
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user