1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 23:07:59 +01:00

move commandline styling to the CSS file and remove white border around error

messages
This commit is contained in:
Doug Kearns
2007-09-28 13:31:11 +00:00
parent 378c8fcf20
commit 01418fe122
2 changed files with 24 additions and 10 deletions

View File

@@ -153,7 +153,7 @@ fieldset.paypal {
} }
#vimperator-statusline { #vimperator-statusline {
font-family: monospace; font-family: monospace;
margin: 0 margin: 0px;
} }
#vimperator-statusline > label { #vimperator-statusline > label {
padding: 0px 0px 0px 8px; padding: 0px 0px 0px 8px;
@@ -196,6 +196,20 @@ fieldset.paypal {
color: black; color: black;
padding: 1px; padding: 1px;
} }
#vimperator-commandline-prompt, #vimperator-commandline-command {
background-color: inherit;
color: inherit;
}
#vimperator-commandline.error {
background-color: red;
color: white;
font-weight: bold;
}
#vimperator-commandline.message > #vimperator-commandline-prompt {
background-color: white;
color: magenta;
font-weight: bold;
}
#vimperator-multiline-output { #vimperator-multiline-output {
overflow: hidden; overflow: hidden;

View File

@@ -99,12 +99,14 @@ function CommandLine() //{{{
var wild_index = 0; // keep track how often we press <Tab> in a row var wild_index = 0; // keep track how often we press <Tab> in a row
var completion_index = UNINITIALIZED; var completion_index = UNINITIALIZED;
// The prompt for the current command, for example : or /. Can be blank // the containing box for the prompt_widget and command_widget
var commandline_widget = document.getElementById('vimperator-commandline');
// the prompt for the current command, for example : or /. Can be blank
var prompt_widget = document.getElementById('vimperator-commandline-prompt'); var prompt_widget = document.getElementById('vimperator-commandline-prompt');
// The command bar which contains the current command // the command bar which contains the current command
var command_widget = document.getElementById('vimperator-commandline-command'); var command_widget = document.getElementById('vimperator-commandline-command');
// The widget used for multiline output // the widget used for multiline output
var multiline_output_widget = document.getElementById("vimperator-multiline-output"); var multiline_output_widget = document.getElementById("vimperator-multiline-output");
multiline_output_widget.contentDocument.body.setAttribute("style", "margin: 0px; font-family: -moz-fixed;"); // get rid of the default border multiline_output_widget.contentDocument.body.setAttribute("style", "margin: 0px; font-family: -moz-fixed;"); // get rid of the default border
multiline_output_widget.contentDocument.body.innerHTML = ""; multiline_output_widget.contentDocument.body.innerHTML = "";
@@ -115,7 +117,7 @@ function CommandLine() //{{{
multiline_output_widget.collapsed = true; multiline_output_widget.collapsed = true;
}, 100); }, 100);
// The widget used for multiline intput // the widget used for multiline intput
var multiline_input_widget = document.getElementById("vimperator-multiline-input"); var multiline_input_widget = document.getElementById("vimperator-multiline-input");
// we need to save the mode which were in before opening the command line // we need to save the mode which were in before opening the command line
@@ -131,19 +133,17 @@ function CommandLine() //{{{
var multiline_regexp = null; var multiline_regexp = null;
var multiline_callback = null; var multiline_callback = null;
// TODO: these styles should be moved to the .css file
function setNormalStyle() function setNormalStyle()
{ {
command_widget.inputField.setAttribute("style","font-family: monospace;"); commandline_widget.setAttribute("class", "normal");
} }
function setMessageStyle() function setMessageStyle()
{ {
prompt_widget.setAttribute("style", "font-family: monospace; color:magenta; font-weight: bold"); commandline_widget.setAttribute("class", "message");
command_widget.inputField.setAttribute("style", "font-family: monospace;");
} }
function setErrorStyle() function setErrorStyle()
{ {
command_widget.inputField.setAttribute("style", "font-family: monospace; color:white; background-color:red; font-weight: bold"); commandline_widget.setAttribute("class", "error");
} }
// Sets the prompt - for example, : or / // Sets the prompt - for example, : or /