Browse Source

[COMM] Add the basic UI for the eula component

custom-2020
Matt A. Tobin 3 years ago committed by Roy Tam
parent
commit
95c635b94f
  1. 20
      communicator/components/eula/content/eula.js
  2. 37
      communicator/components/eula/content/eula.xul
  3. 19
      communicator/components/eula/jar.mn
  4. 8
      communicator/components/eula/locale/eula.dtd
  5. 6
      communicator/components/eula/moz.build
  6. 11
      communicator/components/eula/skin/classic/eula.css
  7. 8
      communicator/components/eula/skin/modern/eula.css
  8. 8
      communicator/components/moz.build
  9. 5
      communicator/moz.build

20
communicator/components/eula/content/eula.js

@ -0,0 +1,20 @@
Components.utils.import("resource://gre/modules/Communicator.jsm");
function Startup() {
main = document.getElementById("main");
let textbox = document.createElement("textbox");
textbox.setAttribute("id", "eula");
textbox.setAttribute("readonly", "true");
textbox.setAttribute("multiline", "true");
textbox.setAttribute("cols", "80");
textbox.setAttribute("rows", "20");
textbox.setAttribute("style", "resize: none; font-family: -moz-fixed;");
textbox.setAttribute("value",
Communicator.readfile("GreD", "license.txt"));
main.appendChild(textbox);
}
function onAccept() {
}

37
communicator/components/eula/content/eula.xul

@ -0,0 +1,37 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/eula/eula.css" type="text/css"?>
<!DOCTYPE dialog [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
%brandDTD;
<!ENTITY % eulaDTD SYSTEM "chrome://communicator/locale/eula/eula.dtd">
%eulaDTD;
<!ENTITY % profileDTD SYSTEM "chrome://communicator/locale/profile/profileSelection.dtd">
%profileDTD;
]>
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
id="comm-eula"
title="&brandFullName;"
buttons="accept"
buttonlabelaccept="&eula.accept.label;"
ondialogaccept="return onAccept();"
onload="Startup();">
<script type="application/javascript" src="chrome://communicator/content/eula/eula.js"/>
<dialogheader id="eula-header" class="header-large" title="&eula.header.title;" description="&eula.header.description;"/>
<vbox id="main">
<label value=""/>
</vbox>
<separator class="groove-thin"/>
<hbox>
<spacer flex="1"/>
<button dlgtype="accept"/>
</hbox>
</dialog>

19
communicator/components/eula/jar.mn

@ -0,0 +1,19 @@
#filter substitution
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
comm.jar:
content/communicator/eula/eula.js (content/eula.js)
content/communicator/eula/eula.xul (content/eula.xul)
en-US.jar:
locale/en-US/communicator/eula/eula.dtd (locale/eula.dtd)
classic.jar:
skin/communicator/eula/eula.js (skin/classic/eula.css)
#ifdef BINOC_BOREALIS
modern.jar:
skin/communicator/eula/eula.js (skin/modern/eula.css)
#endif

8
communicator/components/eula/locale/eula.dtd

@ -0,0 +1,8 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!ENTITY eula.title "&brandFullName;">
<!ENTITY eula.accept.label "Agree">
<!ENTITY eula.header.title "License Agreement">
<!ENTITY eula.header.description "Please review the license terms before using &brandFullName;">

6
communicator/components/eula/moz.build

@ -0,0 +1,6 @@
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
JAR_MANIFESTS += ['jar.mn']

11
communicator/components/eula/skin/classic/eula.css

@ -0,0 +1,11 @@
#eula {
-moz-appearance: none;
color: -moz-FieldText;
background-color: -moz-Field;
margin: 1em;
border: 1px solid;
-moz-border-top-colors: ActiveBorder;
-moz-border-right-colors: ActiveBorder;
-moz-border-bottom-colors: ActiveBorder;
-moz-border-left-colors: ActiveBorder;
}

8
communicator/components/eula/skin/modern/eula.css

@ -0,0 +1,8 @@
#eula {
-moz-appearance: none;
color: #000000;
background-color: #FFFFFF;
margin: 1em;
border: 1px solid;
border-colors: #6E7378 #EEF0F3 #EEF0F3 #6E7378;
}

8
communicator/components/moz.build

@ -0,0 +1,8 @@
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += [
'eula',
]

5
communicator/moz.build

@ -3,4 +3,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += ['modules']
DIRS += [
'components',
'modules'
]
Loading…
Cancel
Save