aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann-S <[email protected]>2018-10-07 12:58:51 +0200
committerXhmikosR <[email protected]>2018-10-18 12:09:17 +0300
commitb304c61318e8862f91f632e79dfd1618c23788d3 (patch)
treec4775bbdd46c3aa2357f203e6ea3bcabb2361d43
parentd7ab2fbd5b2368f4b3e93df0c2a39a4fed59bc6f (diff)
downloadbootstrap-b304c61318e8862f91f632e79dfd1618c23788d3.tar.xz
bootstrap-b304c61318e8862f91f632e79dfd1618c23788d3.zip
remove drag/drop for customizer
-rw-r--r--docs/assets/js/src/customizer.js18
-rw-r--r--docs/customize.html2
2 files changed, 2 insertions, 18 deletions
diff --git a/docs/assets/js/src/customizer.js b/docs/assets/js/src/customizer.js
index 0909b8546..1b59a4425 100644
--- a/docs/assets/js/src/customizer.js
+++ b/docs/assets/js/src/customizer.js
@@ -17,7 +17,6 @@ window.onload = function () { // wait for load in a dumb way because B-0
' * Licensed under the MIT license\n' +
' */\n\n'
- var supportsFile = window.File && window.FileReader && window.FileList && window.Blob
var $importDropTarget = $('#import-drop-target')
function showError(msg, err) {
@@ -310,8 +309,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
e.stopPropagation()
e.preventDefault()
- var file = e.originalEvent.hasOwnProperty('dataTransfer') ? e.originalEvent.dataTransfer.files[0] : e.originalEvent.target.files[0]
-
+ var file = e.originalEvent.target.files[0]
var reader = new FileReader()
reader.onload = function (e) {
@@ -334,20 +332,6 @@ window.onload = function () { // wait for load in a dumb way because B-0
reader.readAsText(file, 'utf-8')
}
- function handleConfigDragOver(e) {
- e.stopPropagation()
- e.preventDefault()
- e.originalEvent.dataTransfer.dropEffect = 'copy'
-
- removeImportAlerts()
- }
-
- if (supportsFile) {
- $importDropTarget
- .on('dragover', handleConfigDragOver)
- .on('drop', handleConfigFileSelect)
- }
-
$('#import-file-select').on('change', handleConfigFileSelect)
$('#import-manual-trigger').on('click', removeImportAlerts)
diff --git a/docs/customize.html b/docs/customize.html
index 7380a1eaf..70f934753 100644
--- a/docs/customize.html
+++ b/docs/customize.html
@@ -31,7 +31,7 @@ lead: Customize Bootstrap's components, Less variables, and jQuery plugins to ge
<span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span>
</div>
<p class="lead">Have an existing configuration? Upload your <code>config.json</code> to import it.</p>
- <p>Drag and drop here, or <label id="import-manual-trigger" class="btn-link">manually upload<input type="file" id="import-file-select" class="hidden"></label>.</p>
+ <p><label id="import-manual-trigger" class="btn-link">Upload<input type="file" id="import-file-select" class="hidden"></label>.</p>
<hr>
<p><strong>Don't have one?</strong> That's okay—just start customizing the fields below.</p>
</div>