|
13 | 13 | <script src="js/jquery-1.2.6.js" type="text/javascript"></script> |
14 | 14 | <script src="js/ui.core.js?REV_SE-REV_MC" type="text/javascript"></script> |
15 | 15 | <script src="js/ui.tabs.js?REV_SE-REV_MC" type="text/javascript"></script> |
16 | | - <script src="js/mc-const.js?REV_SE-REV_MC" type="text/javascript"></script> |
| 16 | + <script src="js/mc-palette.js?REV_SE-REV_MC" type="text/javascript"></script> |
17 | 17 | <script src="js/mc-css-generator.js?REV_SE-REV_MC" type="text/javascript"></script> |
18 | 18 | <script src="js/mc-tpl.js?REV_SE-REV_MC" type="text/javascript"></script> |
19 | 19 | <script src="js/mc-templates.js?REV_SE-REV_MC" type="text/javascript"></script> |
20 | 20 | <script src="js/mc-utils.js?REV_SE-REV_MC" type="text/javascript"></script> |
21 | | - <script src="js/cmp-colors.js?REV_SE-REV_MC" type="text/javascript"></script> |
| 21 | + <script src="js/mc-cmp-colors.js?REV_SE-REV_MC" type="text/javascript"></script> |
22 | 22 |
|
23 | 23 | <script type="text/javascript"> |
24 | 24 | $(function () { |
|
67 | 67 |
|
68 | 68 | $("select#skins").change(); |
69 | 69 |
|
70 | | - |
71 | 70 | $(window).keydown(function (e) { |
72 | 71 | // Ctrl-Enter pressed |
73 | 72 | if (e.ctrlKey && e.keyCode === 13) { |
74 | 73 | $('#btn-apply').click(); |
75 | 74 | } |
76 | 75 | }); |
77 | 76 |
|
78 | | - // Insert ColorsComponent |
79 | | - $('.cmp-colors').html(new ColorsComponent().render()); |
| 77 | + McPalette.basic_palettes.forEach(function(element, index) { |
| 78 | + $('#terminal-palettes').append($('<option />').val(index).text(element.name)); |
| 79 | + }); |
| 80 | + |
| 81 | + $('#terminal-palettes').change(function() { |
| 82 | + $('#btn-apply').click(); |
| 83 | + // Re-render the palette |
| 84 | + $('.cmp-colors').html(new McColorsComponent().render()); |
| 85 | + }); |
| 86 | + |
| 87 | + $('#terminal-light').change(function() { |
| 88 | + $('#btn-apply').click(); |
| 89 | + }); |
| 90 | + |
| 91 | + $('#terminal-bgimage').change(function() { |
| 92 | + $('#btn-apply').click(); |
| 93 | + }); |
| 94 | + |
| 95 | + $('#terminal-boldbright').change(function() { |
| 96 | + $('#btn-apply').click(); |
| 97 | + }); |
| 98 | + |
| 99 | + // Render the palette |
| 100 | + $('.cmp-colors').html(new McColorsComponent().render()); |
80 | 101 |
|
81 | 102 | $.get('skins.json?REV_SE-REV_MC', {}, function (data) { |
82 | 103 | $.each(data, function (key, value) { |
|
123 | 144 | <div class="skin-view-container" id="fragment-skin-6"></div> |
124 | 145 | </div> |
125 | 146 | <div class="mt-2 ml-2" style="width: 810px"> |
126 | | - colors hint<br><br> |
| 147 | + Terminal's color settings |
| 148 | + <br><br> |
| 149 | + Palette: |
| 150 | + <select id="terminal-palettes"></select> |
| 151 | + |
| 152 | + <label><input type="checkbox" id="terminal-light">Light mode</label> |
| 153 | + |
| 154 | + <label><input type="checkbox" id="terminal-bgimage">Background image</label> |
| 155 | + |
| 156 | + <label><input type="checkbox" id="terminal-boldbright">First 8 colors bright when bold</label> |
| 157 | + <br><br> |
127 | 158 | <div class="cmp-colors"> |
128 | 159 | <!-- colors will be displayed here --> |
129 | 160 | </div> |
|
0 commit comments