Skip to content

Commit

Permalink
Style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Mar 26, 2017
1 parent 80ad896 commit cf6a9a1
Showing 1 changed file with 47 additions and 43 deletions.
Expand Up @@ -78,6 +78,7 @@
var cover = $('#dragarea');
body.on('dragenter', function(e) {
e.preventDefault();
e.stopPropagation();
cover.fadeIn();
Expand All @@ -87,79 +88,82 @@
// Notify user when file is over the drop area
body.on('dragover', function(e) {
e.preventDefault();
e.stopPropagation();
cover.fadeIn();
return false;
});
cover.on('dragleave', function(e) {
e.preventDefault();
e.stopPropagation();
cover.fadeOut();
return false;
});
body.on('drop', function(event) {
event.preventDefault();
body.on('drop', function(e) {
e.preventDefault();
e.stopPropagation();
cover.fadeOut();
var files = event.originalEvent.target.files || event.originalEvent.dataTransfer.files;
var files = e.originalEvent.target.files || e.originalEvent.dataTransfer.files;
if (!files.length) {
return;
}
var file = files[0];
var data = new FormData();
data.append('install_package', file);
data.append('installtype', 'upload');
data.append('{$token}', 1);
jQuery("#loading").css("display", "block");
$.ajax({
url: 'index.php?option=com_installer&task=install.ajax_upload',
data: data,
type: 'post',
processData: false,
cache: false,
$.ajax({
url: 'index.php?option=com_installer&task=install.ajax_upload',
data: data,
type: 'post',
processData: false,
cache: false,
contentType: false
}).done(function (res) {
if (res.success) {
if (res.data.redirect) {
location.href = res.data.redirect;
} else {
location.href = 'index.php?option=com_installer&view=install';
}
} else {
jQuery("#loading").css("display", "none");
alert(res.message);
}
}).error (function (error) {
jQuery("#loading").css("display", "none");
alert(error.statusText);
});
}).done(function (res) {
if (res.success) {
if (res.data.redirect) {
location.href = res.data.redirect;
} else {
location.href = 'index.php?option=com_installer&view=install';
}
} else {
jQuery("#loading").css("display", "none");
alert(res.message);
}
}).error (function (error) {
jQuery("#loading").css("display", "none");
alert(error.statusText);
});
});
});
JS
);

JFactory::getDocument()->addStyleDeclaration(
<<<CSS
#dragarea {
display: block;
background: rgba(255, 255, 255, .8);
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: 0.8;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity = 80);
filter: alpha(opacity = 80);
overflow: hidden;
}
#dragarea {
display: block;
background: rgba(255, 255, 255, .8);
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: 0.8;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity = 80);
filter: alpha(opacity = 80);
overflow: hidden;
}
#dragarea::before {
content: "{$text}";
Expand Down

0 comments on commit cf6a9a1

Please sign in to comment.