From b304c61318e8862f91f632e79dfd1618c23788d3 Mon Sep 17 00:00:00 2001 From: Johann-S Date: Sun, 7 Oct 2018 12:58:51 +0200 Subject: [PATCH] remove drag/drop for customizer --- docs/assets/js/src/customizer.js | 18 +----------------- docs/customize.html | 2 +- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/docs/assets/js/src/customizer.js b/docs/assets/js/src/customizer.js index 0909b85461..1b59a4425e 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 7380a1eafb..70f9347536 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

Have an existing configuration? Upload your config.json to import it.

-

Drag and drop here, or .

+

.


Don't have one? That's okay—just start customizing the fields below.