+++ /dev/null
-/*
- * noVNC black CSS
- * Copyright (C) 2012 Joel Martin
- * Copyright (C) 2013 Samuel Mannehed for Cendio AB
- * noVNC is licensed under the MPL 2.0 (see LICENSE.txt)
- * This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
- */
-
-.noVNC_panel {
- border:2px solid #fff;
- background:#000;
- color:#fff;
-}
-
-#noVNC_control_bar, #noVNC_control_bar_handle, .noVNC_panel .noVNC_heading {
- background: #4c4c4c;
-}
-
-.noVNC_button.noVNC_selected {
- background: #9dd53a;
-}
+++ /dev/null
-/*
- * noVNC blue CSS
- * Copyright (C) 2012 Joel Martin
- * Copyright (C) 2013 Samuel Mannehed for Cendio AB
- * noVNC is licensed under the MPL 2.0 (see LICENSE.txt)
- * This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
- */
-
-.noVNC_panel {
- border:2px solid #fff;
- background:#04073d;
- color:#fff;
-}
-
-#noVNC_control_bar, #noVNC_control_bar_handle, .noVNC_panel .noVNC_heading {
- background: #080F80;
-}
},
initSettings: function() {
- // Stylesheet selection dropdown
- var sheet = WebUtil.selectStylesheet();
- var sheets = WebUtil.getStylesheets();
var i;
- for (i = 0; i < sheets.length; i += 1) {
- UI.addOption(document.getElementById('noVNC_setting_stylesheet'),sheets[i].title, sheets[i].title);
- }
// Logging selection dropdown
var llevels = ['error', 'warn', 'info', 'debug'];
UI.initSetting('logging', 'warn');
WebUtil.init_logging(UI.getSetting('logging'));
- UI.initSetting('stylesheet', 'default');
- WebUtil.selectStylesheet(null);
- // call twice to get around webkit bug
- WebUtil.selectStylesheet(UI.getSetting('stylesheet'));
-
// if port == 80 (or 443) then it won't be present and should be
// set manually
var port = window.location.port;
UI.saveSetting('view_only');
UI.saveSetting('path');
UI.saveSetting('repeaterID');
- UI.saveSetting('stylesheet');
UI.saveSetting('logging');
// Settings with immediate (non-connected related) effect
- WebUtil.selectStylesheet(UI.getSetting('stylesheet'));
WebUtil.init_logging(UI.getSetting('logging'));
UI.updateViewClip();
UI.updateViewDrag();
UI.updateSetting('view_only');
UI.updateSetting('path');
UI.updateSetting('repeaterID');
- UI.updateSetting('stylesheet');
UI.updateSetting('logging');
document.getElementById('noVNC_settings')
}
};
-/*
- * Alternate stylesheet selection
- */
-WebUtil.getStylesheets = function () {
- "use strict";
- var links = document.getElementsByTagName("link");
- var sheets = [];
-
- for (var i = 0; i < links.length; i += 1) {
- if (links[i].title &&
- links[i].rel.toUpperCase().indexOf("STYLESHEET") > -1) {
- sheets.push(links[i]);
- }
- }
- return sheets;
-};
-
-// No sheet means try and use value from cookie, null sheet used to
-// clear all alternates.
-WebUtil.selectStylesheet = function (sheet) {
- "use strict";
- if (typeof sheet === 'undefined') {
- sheet = 'default';
- }
-
- var sheets = WebUtil.getStylesheets();
- for (var i = 0; i < sheets.length; i += 1) {
- var link = sheets[i];
- if (link.title === sheet) {
- Util.Debug("Using stylesheet " + sheet);
- link.disabled = false;
- } else {
- //Util.Debug("Skipping stylesheet " + link.title);
- link.disabled = true;
- }
- }
- return sheet;
-};
-
WebUtil.injectParamIfMissing = function (path, param, value) {
// force pretend that we're dealing with a relative path
// (assume that we wanted an extra if we pass one in)
<!-- Stylesheets -->
<link rel="stylesheet" href="app/styles/base.css" />
- <link rel="alternate stylesheet" href="app/styles/black.css" TITLE="Black" />
- <link rel="alternate stylesheet" href="app/styles/blue.css" TITLE="Blue" />
<!--
<script type='text/javascript'
<input id="noVNC_setting_repeaterID" type="input" value="" />
</li>
<li><hr></li>
- <!-- Stylesheet selection dropdown -->
- <li>
- <label>Style:
- <select id="noVNC_setting_stylesheet" name="vncStyle">
- <option value="default">default</option>
- </select>
- </label>
- </li>
<!-- Logging selection dropdown -->
<li>
<label>Logging: