mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Require jquery-ui-sortable and -draggable in the general config panel.
This commit has a hack to make window.jQuery available during the duration of the requiring of jquery-ui. Once we're done requiring jQuery, the global is removed from window once again. Issue #494 has an alternative idea of enhancing require to allow the requiring script to specify the value of global variables in the script being required.
This commit is contained in:
committed by
Corey Johnson & Kevin Sawicki
parent
46acb6da2c
commit
0620d19f26
@@ -18,7 +18,8 @@
|
||||
"pathwatcher": "0.3.0",
|
||||
"plist": "git://github.com/nathansobo/node-plist.git",
|
||||
"space-pen": "git://github.com/nathansobo/space-pen.git",
|
||||
"less": "git://github.com/nathansobo/less.js.git"
|
||||
"less": "git://github.com/nathansobo/less.js.git",
|
||||
"jqueryui-browser": "1.10.2"
|
||||
},
|
||||
|
||||
"devDependencies" : {
|
||||
|
||||
@@ -3,6 +3,14 @@ ConfigPanel = require 'config-panel'
|
||||
$ = require 'jquery'
|
||||
_ = require 'underscore'
|
||||
|
||||
window.jQuery = $
|
||||
require 'jqueryui-browser/ui/jquery.ui.core'
|
||||
require 'jqueryui-browser/ui/jquery.ui.widget'
|
||||
require 'jqueryui-browser/ui/jquery.ui.mouse'
|
||||
require 'jqueryui-browser/ui/jquery.ui.sortable'
|
||||
require 'jqueryui-browser/ui/jquery.ui.draggable'
|
||||
delete window.jQuery
|
||||
|
||||
module.exports =
|
||||
class GeneralConfigPanel extends ConfigPanel
|
||||
@content: ->
|
||||
|
||||
Reference in New Issue
Block a user