Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
photos
Commits
1172f3b5
Commit
1172f3b5
authored
Aug 16, 2014
by
Tobias Reich
Browse files
Close upload when clicking the close button
parent
cf6ea753
Changes
1
Hide whitespace changes
Inline
Side-by-side
assets/js/init.js
View file @
1172f3b5
...
@@ -164,9 +164,6 @@ $(document).ready(function(){
...
@@ -164,9 +164,6 @@ $(document).ready(function(){
/* Add Dialog */
/* Add Dialog */
.
on
(
event_name
,
"
.button_add
"
,
function
(
e
)
{
contextMenu
.
add
(
e
)
})
.
on
(
event_name
,
"
.button_add
"
,
function
(
e
)
{
contextMenu
.
add
(
e
)
})
/* Upload */
.
on
(
"
change
"
,
"
#upload_files
"
,
function
()
{
modal
.
close
();
upload
.
start
.
local
(
this
.
files
)
})
/* Context Menu */
/* Context Menu */
.
on
(
"
contextmenu
"
,
"
.photo
"
,
function
(
e
)
{
contextMenu
.
photo
(
photo
.
getID
(),
e
)
})
.
on
(
"
contextmenu
"
,
"
.photo
"
,
function
(
e
)
{
contextMenu
.
photo
(
photo
.
getID
(),
e
)
})
.
on
(
"
contextmenu
"
,
"
.album
"
,
function
(
e
)
{
contextMenu
.
album
(
album
.
getID
(),
e
)
})
.
on
(
"
contextmenu
"
,
"
.album
"
,
function
(
e
)
{
contextMenu
.
album
(
album
.
getID
(),
e
)
})
...
@@ -177,12 +174,14 @@ $(document).ready(function(){
...
@@ -177,12 +174,14 @@ $(document).ready(function(){
.
on
(
event_name
,
"
#infobox_overlay
"
,
view
.
infobox
.
hide
)
.
on
(
event_name
,
"
#infobox_overlay
"
,
view
.
infobox
.
hide
)
/* Upload */
/* Upload */
.
on
(
"
change
"
,
"
#upload_files
"
,
function
()
{
modal
.
close
();
upload
.
start
.
local
(
this
.
files
)
})
.
on
(
event_name
,
"
.upload_message a.close
"
,
upload
.
close
)
.
on
(
"
dragover
"
,
function
(
e
)
{
e
.
preventDefault
();
},
false
)
.
on
(
"
dragover
"
,
function
(
e
)
{
e
.
preventDefault
();
},
false
)
.
on
(
"
drop
"
,
function
(
e
)
{
.
on
(
"
drop
"
,
function
(
e
)
{
e
.
stopPropagation
();
e
.
stopPropagation
();
e
.
preventDefault
();
e
.
preventDefault
();
if
(
e
.
originalEvent
.
dataTransfer
.
files
.
length
>
0
)
upload
.
start
.
local
(
e
.
originalEvent
.
dataTransfer
.
files
);
if
(
e
.
originalEvent
.
dataTransfer
.
files
.
length
>
0
)
upload
.
start
.
local
(
e
.
originalEvent
.
dataTransfer
.
files
);
else
if
(
e
.
originalEvent
.
dataTransfer
.
getData
(
'
Text
'
).
length
>
3
)
upload
.
start
.
url
(
e
.
originalEvent
.
dataTransfer
.
getData
(
'
Text
'
));
else
if
(
e
.
originalEvent
.
dataTransfer
.
getData
(
'
Text
'
).
length
>
3
)
upload
.
start
.
url
(
e
.
originalEvent
.
dataTransfer
.
getData
(
'
Text
'
));
return
true
;
return
true
;
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment