Remove alternative style sheets
Anyone with basic knowledge of CSS will easily figure out how to customise the appearance of the UI, so remove the burden of having to maintain these extra style sheets.
This commit is contained in:
parent
58fc267b2b
commit
340d9d66cc
|
@ -1,21 +0,0 @@
|
||||||
/*
|
|
||||||
* 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;
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
/*
|
|
||||||
* 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;
|
|
||||||
}
|
|
14
app/ui.js
14
app/ui.js
|
@ -167,13 +167,7 @@ var UI;
|
||||||
},
|
},
|
||||||
|
|
||||||
initSettings: function() {
|
initSettings: function() {
|
||||||
// Stylesheet selection dropdown
|
|
||||||
var sheet = WebUtil.selectStylesheet();
|
|
||||||
var sheets = WebUtil.getStylesheets();
|
|
||||||
var i;
|
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
|
// Logging selection dropdown
|
||||||
var llevels = ['error', 'warn', 'info', 'debug'];
|
var llevels = ['error', 'warn', 'info', 'debug'];
|
||||||
|
@ -185,11 +179,6 @@ var UI;
|
||||||
UI.initSetting('logging', 'warn');
|
UI.initSetting('logging', 'warn');
|
||||||
WebUtil.init_logging(UI.getSetting('logging'));
|
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
|
// if port == 80 (or 443) then it won't be present and should be
|
||||||
// set manually
|
// set manually
|
||||||
var port = window.location.port;
|
var port = window.location.port;
|
||||||
|
@ -838,11 +827,9 @@ var UI;
|
||||||
UI.saveSetting('view_only');
|
UI.saveSetting('view_only');
|
||||||
UI.saveSetting('path');
|
UI.saveSetting('path');
|
||||||
UI.saveSetting('repeaterID');
|
UI.saveSetting('repeaterID');
|
||||||
UI.saveSetting('stylesheet');
|
|
||||||
UI.saveSetting('logging');
|
UI.saveSetting('logging');
|
||||||
|
|
||||||
// Settings with immediate (non-connected related) effect
|
// Settings with immediate (non-connected related) effect
|
||||||
WebUtil.selectStylesheet(UI.getSetting('stylesheet'));
|
|
||||||
WebUtil.init_logging(UI.getSetting('logging'));
|
WebUtil.init_logging(UI.getSetting('logging'));
|
||||||
UI.updateViewClip();
|
UI.updateViewClip();
|
||||||
UI.updateViewDrag();
|
UI.updateViewDrag();
|
||||||
|
@ -887,7 +874,6 @@ var UI;
|
||||||
UI.updateSetting('view_only');
|
UI.updateSetting('view_only');
|
||||||
UI.updateSetting('path');
|
UI.updateSetting('path');
|
||||||
UI.updateSetting('repeaterID');
|
UI.updateSetting('repeaterID');
|
||||||
UI.updateSetting('stylesheet');
|
|
||||||
UI.updateSetting('logging');
|
UI.updateSetting('logging');
|
||||||
|
|
||||||
document.getElementById('noVNC_settings')
|
document.getElementById('noVNC_settings')
|
||||||
|
|
|
@ -209,45 +209,6 @@ WebUtil.eraseSetting = function (name) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
* 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) {
|
WebUtil.injectParamIfMissing = function (path, param, value) {
|
||||||
// force pretend that we're dealing with a relative path
|
// force pretend that we're dealing with a relative path
|
||||||
// (assume that we wanted an extra if we pass one in)
|
// (assume that we wanted an extra if we pass one in)
|
||||||
|
|
10
vnc.html
10
vnc.html
|
@ -54,8 +54,6 @@
|
||||||
|
|
||||||
<!-- Stylesheets -->
|
<!-- Stylesheets -->
|
||||||
<link rel="stylesheet" href="app/styles/base.css" />
|
<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'
|
<script type='text/javascript'
|
||||||
|
@ -215,14 +213,6 @@
|
||||||
<input id="noVNC_setting_repeaterID" type="input" value="" />
|
<input id="noVNC_setting_repeaterID" type="input" value="" />
|
||||||
</li>
|
</li>
|
||||||
<li><hr></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 -->
|
<!-- Logging selection dropdown -->
|
||||||
<li>
|
<li>
|
||||||
<label>Logging:
|
<label>Logging:
|
||||||
|
|
Loading…
Reference in New Issue