Show More
@@ -37,37 +37,39 var IPython = (function (IPython) { | |||||
37 | this.inner_element = $('<div/>').addClass('celltoolbar') |
|
37 | this.inner_element = $('<div/>').addClass('celltoolbar') | |
38 | this.element = $('<div/>').addClass('ctb_hideshow') |
|
38 | this.element = $('<div/>').addClass('ctb_hideshow') | |
39 | .append(this.inner_element); |
|
39 | .append(this.inner_element); | |
|
40 | this.show(); | |||
40 | }; |
|
41 | }; | |
41 |
|
42 | |||
42 |
|
43 | |||
43 | // The default css style for the outer celltoolbar div |
|
44 | // The default css style for the outer celltoolbar div | |
44 |
// (ctb_hideshow) is display: none. |
|
45 | // (ctb_hideshow) is display: none. | |
45 | // class to either 1) the body to show all cell's toolbars |
|
46 | // To show the cell toolbar, *both* of the following conditions must be met: | |
46 | // or 2) to the individual celltoolbar divs to show just one |
|
47 | // - A parent container has class `ctb_global_show` | |
47 | // cell's toolbar. |
|
48 | // - The celltoolbar has the class `ctb_show` | |
|
49 | // This allows global show/hide, as well as per-cell show/hide. | |||
48 |
|
50 | |||
49 | CellToolbar.global_hide = function () { |
|
51 | CellToolbar.global_hide = function () { | |
50 | $('body').removeClass('ctb_show'); |
|
52 | $('body').removeClass('ctb_global_show'); | |
51 | } |
|
53 | }; | |
52 |
|
54 | |||
53 |
|
55 | |||
54 | CellToolbar.global_show = function () { |
|
56 | CellToolbar.global_show = function () { | |
55 | $('body').addClass('ctb_show'); |
|
57 | $('body').addClass('ctb_global_show'); | |
56 | } |
|
58 | }; | |
57 |
|
59 | |||
58 |
|
60 | |||
59 | CellToolbar.prototype.hide = function () { |
|
61 | CellToolbar.prototype.hide = function () { | |
60 | this.element.removeClass('ctb_show'); |
|
62 | this.element.removeClass('ctb_show'); | |
61 | } |
|
63 | }; | |
62 |
|
64 | |||
63 |
|
65 | |||
64 | CellToolbar.prototype.show = function () { |
|
66 | CellToolbar.prototype.show = function () { | |
65 | this.element.addClass('ctb_show'); |
|
67 | this.element.addClass('ctb_show'); | |
66 | } |
|
68 | }; | |
67 |
|
69 | |||
68 |
|
70 | |||
69 | /** |
|
71 | /** | |
70 |
* Class variable that should contain a dict of all avail |
|
72 | * Class variable that should contain a dict of all available callback | |
71 | * we need to think of wether or not we allow nested namespace |
|
73 | * we need to think of wether or not we allow nested namespace | |
72 | * @property _callback_dict |
|
74 | * @property _callback_dict | |
73 | * @private |
|
75 | * @private |
@@ -1,12 +1,10 | |||||
1 |
/* C |
|
1 | /* CSS for the cell toolbar */ | |
2 |
|
||||
3 |
|
2 | |||
4 | .celltoolbar { |
|
3 | .celltoolbar { | |
5 | border: thin solid #CFCFCF; |
|
4 | border: thin solid #CFCFCF; | |
6 | border-bottom: none; |
|
5 | border-bottom: none; | |
7 | background : #EEE; |
|
6 | background : #EEE; | |
8 |
border- |
|
7 | border-radius : 3px 3px 0px 0px; | |
9 | border-top-left-radius: 3px; |
|
|||
10 | width:100%; |
|
8 | width:100%; | |
11 | -webkit-box-pack: end; |
|
9 | -webkit-box-pack: end; | |
12 | height:22px; |
|
10 | height:22px; | |
@@ -14,20 +12,6 | |||||
14 | .reverse(); |
|
12 | .reverse(); | |
15 | } |
|
13 | } | |
16 |
|
14 | |||
17 |
|
||||
18 | .no_input_radius { |
|
|||
19 | border-top-right-radius: 0px; |
|
|||
20 | border-top-left-radius: 0px; |
|
|||
21 | } |
|
|||
22 |
|
||||
23 | .text_cell .ctb_prompt { |
|
|||
24 | display: none; |
|
|||
25 | } |
|
|||
26 |
|
||||
27 | .code_cell .ctb_prompt { |
|
|||
28 | display: block; |
|
|||
29 | } |
|
|||
30 |
|
||||
31 | .ctb_hideshow { |
|
15 | .ctb_hideshow { | |
32 | display:none; |
|
16 | display:none; | |
33 | vertical-align:bottom; |
|
17 | vertical-align:bottom; | |
@@ -38,41 +22,21 | |||||
38 | padding-top: 0px; |
|
22 | padding-top: 0px; | |
39 | } |
|
23 | } | |
40 |
|
24 | |||
41 | .ctb_area { |
|
|||
42 | margin:0; |
|
|||
43 | padding:0; |
|
|||
44 | width:100%; |
|
|||
45 |
|
25 | |||
46 | } |
|
26 | /* ctb_show is added to the ctb_hideshow div to show the cell toolbar. | |
47 |
|
27 | Cell toolbars are only shown when the ctb_global_show class is also set. | ||
48 |
|
||||
49 | /*ctb_show is added to either body or the ctb_hideshow div to show |
|
|||
50 | all or one cell's toolbars. |
|
|||
51 | */ |
|
28 | */ | |
52 | .ctb_show.ctb_hideshow, .ctb_show .ctb_hideshow { |
|
29 | .ctb_global_show .ctb_show.ctb_hideshow { | |
53 | display:block; |
|
30 | display: block; | |
54 | } |
|
31 | } | |
55 |
|
32 | |||
56 | .ctb_show .input_area, |
|
33 | .ctb_global_show .ctb_show + .input_area, | |
57 |
.ctb_show .ctb_ |
|
34 | .ctb_global_show .ctb_show + div.text_cell_input | |
|
35 | { | |||
58 | border-top-right-radius: 0px; |
|
36 | border-top-right-radius: 0px; | |
59 | border-top-left-radius: 0px; |
|
37 | border-top-left-radius: 0px; | |
60 | } |
|
38 | } | |
61 |
|
39 | |||
62 | .ctb_show > .celltoolbar { |
|
|||
63 | border-bottom-right-radius: 0px; |
|
|||
64 | border-bottom-left-radius: 0px; |
|
|||
65 | } |
|
|||
66 |
|
||||
67 | .button_container { |
|
|||
68 | margin-top:0; |
|
|||
69 | margin-bottom:0; |
|
|||
70 | } |
|
|||
71 |
|
||||
72 |
|
||||
73 | .ui-button { |
|
|||
74 | min-width:30px; |
|
|||
75 | } |
|
|||
76 | .celltoolbar .button_container select { |
|
40 | .celltoolbar .button_container select { | |
77 | margin: 10px; |
|
41 | margin: 10px; | |
78 | margin-top: 1px; |
|
42 | margin-top: 1px; | |
@@ -108,4 +72,5 all or one cell's toolbars. | |||||
108 | border: none; |
|
72 | border: none; | |
109 | vertical-align:top; |
|
73 | vertical-align:top; | |
110 | height:20px; |
|
74 | height:20px; | |
|
75 | min-width:30px; | |||
111 | } |
|
76 | } |
@@ -1537,23 +1537,16 pre,code,kbd,samp{white-space:pre-wrap;} | |||||
1537 | #fonttest{font-family:monospace;} |
|
1537 | #fonttest{font-family:monospace;} | |
1538 | p{margin-bottom:0;} |
|
1538 | p{margin-bottom:0;} | |
1539 | .end_space{height:200px;} |
|
1539 | .end_space{height:200px;} | |
1540 |
.celltoolbar{border:thin solid #CFCFCF;border-bottom:none;background:#EEE;border- |
|
1540 | .celltoolbar{border:thin solid #CFCFCF;border-bottom:none;background:#EEE;border-radius:3px 3px 0px 0px;width:100%;-webkit-box-pack:end;height:22px;display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;-webkit-box-direction:reverse;-moz-box-direction:reverse;box-direction:reverse;} | |
1541 | .no_input_radius{border-top-right-radius:0px;border-top-left-radius:0px;} |
|
|||
1542 | .text_cell .ctb_prompt{display:none;} |
|
|||
1543 | .code_cell .ctb_prompt{display:block;} |
|
|||
1544 | .ctb_hideshow{display:none;vertical-align:bottom;padding-right:2px;} |
|
1541 | .ctb_hideshow{display:none;vertical-align:bottom;padding-right:2px;} | |
1545 | .celltoolbar>div{padding-top:0px;} |
|
1542 | .celltoolbar>div{padding-top:0px;} | |
1546 | .ctb_area{margin:0;padding:0;width:100%;} |
|
1543 | .ctb_global_show .ctb_show.ctb_hideshow{display:block;} | |
1547 | .ctb_show.ctb_hideshow,.ctb_show .ctb_hideshow{display:block;} |
|
1544 | .ctb_global_show .ctb_show+.input_area,.ctb_global_show .ctb_show+div.text_cell_input{border-top-right-radius:0px;border-top-left-radius:0px;} | |
1548 | .ctb_show .input_area,.ctb_show .ctb_hideshow+div.text_cell_input{border-top-right-radius:0px;border-top-left-radius:0px;} |
|
|||
1549 | .ctb_show>.celltoolbar{border-bottom-right-radius:0px;border-bottom-left-radius:0px;} |
|
|||
1550 | .button_container{margin-top:0;margin-bottom:0;} |
|
|||
1551 | .ui-button{min-width:30px;} |
|
|||
1552 | .celltoolbar .button_container select{margin:10px;margin-top:1px;margin-bottom:0px;padding:0;font-size:87%;width:auto;display:inline-block;height:18px;line-height:18px;vertical-align:top;} |
|
1545 | .celltoolbar .button_container select{margin:10px;margin-top:1px;margin-bottom:0px;padding:0;font-size:87%;width:auto;display:inline-block;height:18px;line-height:18px;vertical-align:top;} | |
1553 | .celltoolbar label{display:inline-block;height:15px;line-height:15px;vertical-align:top;} |
|
1546 | .celltoolbar label{display:inline-block;height:15px;line-height:15px;vertical-align:top;} | |
1554 | .celltoolbar label span{font-size:85%;} |
|
1547 | .celltoolbar label span{font-size:85%;} | |
1555 | .celltoolbar input[type=checkbox]{margin:0px;margin-left:4px;margin-right:4px;} |
|
1548 | .celltoolbar input[type=checkbox]{margin:0px;margin-left:4px;margin-right:4px;} | |
1556 | .celltoolbar .ui-button{border:none;vertical-align:top;height:20px;} |
|
1549 | .celltoolbar .ui-button{border:none;vertical-align:top;height:20px;min-width:30px;} | |
1557 | .completions{position:absolute;z-index:10;overflow:hidden;border:1px solid #ababab;border-radius:4px;-webkit-box-shadow:0px 6px 10px -1px #adadad;-moz-box-shadow:0px 6px 10px -1px #adadad;box-shadow:0px 6px 10px -1px #adadad;} |
|
1550 | .completions{position:absolute;z-index:10;overflow:hidden;border:1px solid #ababab;border-radius:4px;-webkit-box-shadow:0px 6px 10px -1px #adadad;-moz-box-shadow:0px 6px 10px -1px #adadad;box-shadow:0px 6px 10px -1px #adadad;} | |
1558 | .completions select{background:white;outline:none;border:none;padding:0px;margin:0px;overflow:auto;font-family:monospace;font-size:110%;color:#000000;} |
|
1551 | .completions select{background:white;outline:none;border:none;padding:0px;margin:0px;overflow:auto;font-family:monospace;font-size:110%;color:#000000;} | |
1559 | .completions select option.context{color:#0064cd;} |
|
1552 | .completions select option.context{color:#0064cd;} |
General Comments 0
You need to be logged in to leave comments.
Login now