-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] bootstrapify #3393
[WIP] bootstrapify #3393
Changes from all commits
2f8f8b4
6adb9f5
e14ee7b
b88c841
69b99ab
1b9fe34
7bc0eff
cd4af66
de5cd00
4761f8e
7740665
f8e87bb
6f86ba4
0aeca46
c648d83
19c3997
0abbd0e
3589385
a200045
04d068c
1beae23
173853a
52652dc
3519f28
ec0f6c8
853c4c1
67e3e66
f633042
f5b8701
b148dd6
ce49fa5
c74fd65
871f6b9
7d1e9b4
28f1de1
138a5cf
92b6154
32813e5
7eb4a1b
1fd03b8
417a87b
c2b5798
fb2bed4
91ae4d7
090ba2d
4555371
dce0929
0777e66
7333b2b
29237be
bbf21d1
9cd23a6
61176fb
3d07434
d114724
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
// Custom styles for login.html | ||
// Custom styles for login.html | ||
.center-nav { | ||
display: inline-block; | ||
// pull the lower margin back | ||
margin-bottom: -4px; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
//---------------------------------------------------------------------------- | ||
// Copyright (C) 2013 The IPython Development Team | ||
// | ||
// Distributed under the terms of the BSD License. The full license is in | ||
// the file COPYING, distributed as part of this software. | ||
//---------------------------------------------------------------------------- | ||
|
||
//============================================================================ | ||
// Utility for modal dialogs with bootstrap | ||
//============================================================================ | ||
|
||
IPython.namespace('IPython.dialog'); | ||
|
||
IPython.dialog = (function (IPython) { | ||
|
||
var modal = function (options) { | ||
var dialog = $("<div/>").addClass("modal").attr("role", "dialog"); | ||
dialog.append( | ||
$("<div/>") | ||
.addClass("modal-header") | ||
.append($("<button>") | ||
.addClass("close") | ||
.attr("data-dismiss", "modal") | ||
.html("×") | ||
).append( | ||
$("<h3/>").text(options.title || "") | ||
) | ||
).append( | ||
$("<div/>").addClass("modal-body").append( | ||
options.body || $("<p/>") | ||
) | ||
); | ||
|
||
var footer = $("<div/>").addClass("modal-footer"); | ||
|
||
for (var label in options.buttons) { | ||
var btn_opts = options.buttons[label]; | ||
var button = $("<button/>") | ||
.addClass("btn") | ||
.attr("data-dismiss", "modal") | ||
.text(label); | ||
if (btn_opts.click) { | ||
button.click($.proxy(btn_opts.click, dialog)); | ||
} | ||
if (btn_opts.class) { | ||
button.addClass(btn_opts.class); | ||
} | ||
footer.append(button); | ||
} | ||
dialog.append(footer); | ||
// hook up on-open event | ||
dialog.on("shown", function() { | ||
setTimeout(function() { | ||
footer.find("button").last().focus(); | ||
if (options.open) { | ||
$.proxy(options.open, dialog)(); | ||
} | ||
}, 0); | ||
}); | ||
|
||
// destroy dialog on hide, unless explicitly asked not to | ||
if (options.destroy == undefined || options.destroy) { | ||
dialog.on("hidden", function () { | ||
dialog.remove(); | ||
}); | ||
} | ||
|
||
return dialog.modal(options); | ||
} | ||
|
||
return { | ||
modal : modal, | ||
}; | ||
|
||
}(IPython)); |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ This is only required when different pages style the same element differently. T | |
a hack to deal with our current css styles and no new styling should be added in this file.*/ | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we get rid of these override files now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can get rid of them, but I didn't do the cleanup required to do so. All we would have to do is give the main-app a class for each page. Should I do that here, or let it be another PR? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's not do that here if there is still coding to do... |
||
#ipython-main-app { | ||
width: 100%; | ||
position: relative; | ||
font-size: 110%; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean we are moving away from this line height as a global? Is there a reason for this? What is used instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were never using it as a global, that's the problem. We only used it in code text areas, but we used a generic Bootstrap variable to do it. As soon as I started adding bootstrap elements, it got all messed up. We still use the variable in the same way, it just has a more accurate name (
code_line_height
below).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, this makes sense.