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
|
||||
build/
|
||||
_dist/
|
||||
# Ignore any built files if they ever turn up
|
||||
contented.db
|
||||
contented.exe
|
||||
|
||||
@@ -56,7 +56,11 @@ $.get("/about", function(ret) {
|
||||
|
||||
// Load upload widget
|
||||
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>
|
||||
</body>
|
||||
|
||||
@@ -273,17 +273,20 @@
|
||||
var $element = $(element);
|
||||
var offset = $element.offset();
|
||||
|
||||
$f.css({
|
||||
'position': 'absolute',
|
||||
'left': offset.left + "px",
|
||||
'top': offset.top + "px",
|
||||
'width': $element.width() + "px",
|
||||
'min-width': $element.width() + "px",
|
||||
'max-width': $element.width() + "px",
|
||||
'height': $element.height() + "px",
|
||||
'min-height': $element.height() + "px",
|
||||
'max-height': $element.height() + "px"
|
||||
});
|
||||
onresize = (_) => {
|
||||
$f.css({
|
||||
'position': 'absolute',
|
||||
'left': offset.left + "px",
|
||||
'top': offset.top + "px",
|
||||
'width': $element.width() + "px",
|
||||
'min-width': $element.width() + "px",
|
||||
'max-width': $element.width() + "px",
|
||||
'height': $element.height() + "px",
|
||||
'min-height': $element.height() + "px",
|
||||
'max-height': $element.height() + "px"
|
||||
});
|
||||
};
|
||||
onresize();
|
||||
|
||||
// Drag and drop support
|
||||
|
||||
|
||||
Reference in New Issue
Block a user