зеркало из https://github.com/mozilla/kitsune.git
remove dialogSet from global scope
move function into seperate file to avoid circular import
This commit is contained in:
Родитель
125da2df38
Коммит
dc6c36855b
|
@ -9,6 +9,7 @@
|
|||
* if you want to avoid that).
|
||||
*/
|
||||
|
||||
import dialogSet from "sumo/js/upload-dialog";
|
||||
|
||||
/**
|
||||
* Wrap an input in its own form and bind delete handlers.
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
export default function dialogSet(inner, title) {
|
||||
var kbox = new KBox($('<p/>').text(inner), {
|
||||
title: title,
|
||||
destroy: true,
|
||||
closeOnOutClick: true,
|
||||
modal: true,
|
||||
id: 'upload-dialog',
|
||||
container: $('body')
|
||||
});
|
||||
kbox.open();
|
||||
}
|
|
@ -1,16 +1,5 @@
|
|||
import "sumo/js/libs/jquery.ajaxupload";
|
||||
|
||||
function dialogSet(inner, title) {
|
||||
var kbox = new KBox($('<p/>').text(inner), {
|
||||
title: title,
|
||||
destroy: true,
|
||||
closeOnOutClick: true,
|
||||
modal: true,
|
||||
id: 'upload-dialog',
|
||||
container: $('body')
|
||||
});
|
||||
kbox.open();
|
||||
}
|
||||
import dialogSet from "sumo/js/upload-dialog";
|
||||
|
||||
$(document).ready(function () {
|
||||
var UPLOAD = {
|
||||
|
|
|
@ -30,7 +30,6 @@ module.exports = {
|
|||
"detailsInit": "readonly",
|
||||
"tabsInit": "readonly",
|
||||
"trackEvent": "readonly",
|
||||
"dialogSet": "readonly",
|
||||
"$": "readonly",
|
||||
"jQuery": "readonly",
|
||||
"diff_match_patch": "readonly",
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
// in webpack, unless a file explicitly places a variable under `window.`,
|
||||
// we have to expose each of these variables manually:
|
||||
module.exports = [
|
||||
// wrap these files to make them behave like an es6 module, exporting the named variable, and expose that globally:
|
||||
exportAndExpose("../kitsune/sumo/static/sumo/js/upload.js", "dialogSet"),
|
||||
// we copy these libraries from external sources, so define their exports here,
|
||||
// rather than having to modify them, making updating them more difficult:
|
||||
exports(
|
||||
|
|
Загрузка…
Ссылка в новой задаче