]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Remove alternative style sheets
authorPierre Ossman <ossman@cendio.se>
Sun, 30 Oct 2016 20:36:54 +0000 (21:36 +0100)
committerPierre Ossman <ossman@cendio.se>
Wed, 4 Jan 2017 14:05:01 +0000 (15:05 +0100)
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.

app/styles/black.css [deleted file]
app/styles/blue.css [deleted file]
app/ui.js
app/webutil.js
vnc.html

diff --git a/app/styles/black.css b/app/styles/black.css
deleted file mode 100644 (file)
index 178fa10..0000000
+++ /dev/null
@@ -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;
-}
diff --git a/app/styles/blue.css b/app/styles/blue.css
deleted file mode 100644 (file)
index a38ede1..0000000
+++ /dev/null
@@ -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;
-}
index 28e2148f340db55ffc79ad2f9f6bb4a648d7283b..9ff24068124d41c93faa8f288e20fc72a51d2cd2 100644 (file)
--- a/app/ui.js
+++ b/app/ui.js
@@ -167,13 +167,7 @@ var UI;
         },
 
         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'];
@@ -185,11 +179,6 @@ var UI;
             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;
@@ -838,11 +827,9 @@ var UI;
             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();
@@ -887,7 +874,6 @@ var UI;
             UI.updateSetting('view_only');
             UI.updateSetting('path');
             UI.updateSetting('repeaterID');
-            UI.updateSetting('stylesheet');
             UI.updateSetting('logging');
 
             document.getElementById('noVNC_settings')
index 90a0a530440fd12b374fae87493466b20000b268..6cacb93b5494548197c18fa3c70eb2f1eaf74ca1 100644 (file)
@@ -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) {
     // force pretend that we're dealing with a relative path
     // (assume that we wanted an extra if we pass one in)
index 5d9331e080c1b1188418194db55c88cb2c1a7c1a..9d2240ebf067c450296114af3f3928259f3d74db 100644 (file)
--- a/vnc.html
+++ b/vnc.html
@@ -54,8 +54,6 @@
 
     <!-- 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: