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