Show More
@@ -1,12 +1,12 b'' | |||||
1 | // Copyright (c) IPython Development Team. |
|
1 | // Copyright (c) IPython Development Team. | |
2 | // Distributed under the terms of the Modified BSD License. |
|
2 | // Distributed under the terms of the Modified BSD License. | |
3 |
|
3 | |||
4 | define([ |
|
4 | define(function(require) { | |
5 | 'base/js/namespace', |
|
|||
6 | 'jquery', |
|
|||
7 | 'codemirror/lib/codemirror', |
|
|||
8 | ], function(IPython, $, CodeMirror) { |
|
|||
9 | "use strict"; |
|
5 | "use strict"; | |
|
6 | ||||
|
7 | var CodeMirror = require('codemirror/lib/codemirror'); | |||
|
8 | var IPython = require('base/js/namespace'); | |||
|
9 | var $ = require('jquery'); | |||
10 |
|
10 | |||
11 | var modal = function (options) { |
|
11 | var modal = function (options) { | |
12 |
|
12 | |||
@@ -20,6 +20,9 b' define([' | |||||
20 | var dialog_content = $("<div/>") |
|
20 | var dialog_content = $("<div/>") | |
21 | .addClass("modal-content") |
|
21 | .addClass("modal-content") | |
22 | .appendTo(dialog); |
|
22 | .appendTo(dialog); | |
|
23 | if(typeof(options.body) === 'string'){ | |||
|
24 | options.body = $("<p/>").text(options.body) | |||
|
25 | } | |||
23 | dialog_content.append( |
|
26 | dialog_content.append( | |
24 | $("<div/>") |
|
27 | $("<div/>") | |
25 | .addClass("modal-header") |
|
28 | .addClass("modal-header") | |
@@ -32,7 +35,7 b' define([' | |||||
32 | ).append( |
|
35 | ).append( | |
33 | $("<h4/>") |
|
36 | $("<h4/>") | |
34 | .addClass('modal-title') |
|
37 | .addClass('modal-title') | |
35 | .text(options.title || "") |
|
38 | .text(options.title || "No Title") | |
36 | ) |
|
39 | ) | |
37 | ).append( |
|
40 | ).append( | |
38 | $("<div/>").addClass("modal-body").append( |
|
41 | $("<div/>").addClass("modal-body").append( |
General Comments 0
You need to be logged in to leave comments.
Login now