CaScadeS
Bug fix in background-attachment handling
Border, background and aural dialogs for Nvu
This commit is contained in:
daniel%glazman.org 2004-03-09 09:12:42 +00:00
Родитель cddb8d174e
Коммит 96b08a5b8f
7 изменённых файлов: 241 добавлений и 5 удалений

Просмотреть файл

@ -9,9 +9,12 @@ cascades.jar:
content/cascades/compatibility.js (resources/content/compatibility.js)
content/cascades/contents.rdf (resources/content/contents.rdf)
content/cascades/tabsOverlay.xul (resources/content/tabsOverlay.xul)
content/cascades/specificCSSProps.js (resources/content/specificCSSProps.js)
content/cascades/borderProps.xul (resources/content/borderProps.xul)
content/cascades/textProps.xul (resources/content/textProps.xul)
content/cascades/specificCSSProps.js (resources/content/specificCSSProps.js)
content/cascades/backgroundProps.xul (resources/content/backgroundProps.xul)
content/cascades/boxProps.xul (resources/content/boxProps.xul)
content/cascades/auralProps.xul (resources/content/auralProps.xul)
locale/en-US/cascades/EdCssProps.dtd (resources/locale/en-US/EdCssProps.dtd)
locale/en-US/cascades/cascadesOverlay.dtd (resources/locale/en-US/cascadesOverlay.dtd)
locale/en-US/cascades/contents.rdf (resources/locale/en-US/contents.rdf)

Просмотреть файл

@ -55,8 +55,6 @@ const GENERIC_SELECTOR = 0;
const TYPE_ELEMENT_SELECTOR = 1;
const CLASS_SELECTOR = 2;
const kUrlString = "url(";
const kAsyncTimeout = 1500; // 1.5 second
var objectsArray = null;

Просмотреть файл

@ -0,0 +1,75 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is CaScadeS, a stylesheet editor for Composer.
-
- The Initial Developer of the Original Code is
- Daniel Glazman.
- Portions created by the Initial Developer are Copyright (C) 2002
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Original author: Daniel Glazman (daniel@glazman.org)
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://editor/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://cascades/content/EdCssProps.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://cascades/content/tabsOverlay.xul"?>
<!DOCTYPE dialog SYSTEM "chrome://cascades/locale/EdCssProps.dtd">
<dialog title="&Window.title;"
id="specificCssPropsWindow"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
buttons="accept,cancel,help"
onload="Startup();"
ondialogcancel="CancelChanges();"
ondialogaccept="FlushChanges();"
onclose="CancelChanges();">
<script type="application/x-javascript" src="chrome://cascades/content/specificCSSProps.js" />
<!-- Methods common to all editor dialogs -->
<script type="application/x-javascript" src="chrome://editor/content/editorUtilities.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EdDialogCommon.js"/>
<script type="application/x-javascript" src="chrome://cascades/content/commonCssProps.js"/>
<script type="application/x-javascript" src="chrome://cascades/content/EdCssProps-utils.js"/>
<script type="application/x-javascript" src="chrome://global/content/dialogOverlay.js" />
<spacer id="location" offsetY="50" persist="offsetX offsetY"/>
<spacer id="dummy" style="display:none"/>
<broadcaster id="args" value=""/>
<vbox id="auralTabPanel" />
</dialog>

Просмотреть файл

@ -0,0 +1,75 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is CaScadeS, a stylesheet editor for Composer.
-
- The Initial Developer of the Original Code is
- Daniel Glazman.
- Portions created by the Initial Developer are Copyright (C) 2002
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Original author: Daniel Glazman (daniel@glazman.org)
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://editor/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://cascades/content/EdCssProps.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://cascades/content/tabsOverlay.xul"?>
<!DOCTYPE dialog SYSTEM "chrome://cascades/locale/EdCssProps.dtd">
<dialog title="&Window.title;"
id="specificCssPropsWindow"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
buttons="accept,cancel,help"
onload="Startup();"
ondialogcancel="CancelChanges();"
ondialogaccept="FlushChanges();"
onclose="CancelChanges();">
<script type="application/x-javascript" src="chrome://cascades/content/specificCSSProps.js" />
<!-- Methods common to all editor dialogs -->
<script type="application/x-javascript" src="chrome://editor/content/editorUtilities.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EdDialogCommon.js"/>
<script type="application/x-javascript" src="chrome://cascades/content/commonCssProps.js"/>
<script type="application/x-javascript" src="chrome://cascades/content/EdCssProps-utils.js"/>
<script type="application/x-javascript" src="chrome://global/content/dialogOverlay.js" />
<spacer id="location" offsetY="50" persist="offsetX offsetY"/>
<spacer id="dummy" style="display:none"/>
<broadcaster id="args" value=""/>
<vbox id="backgroundTabPanel" />
</dialog>

Просмотреть файл

@ -0,0 +1,75 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is CaScadeS, a stylesheet editor for Composer.
-
- The Initial Developer of the Original Code is
- Daniel Glazman.
- Portions created by the Initial Developer are Copyright (C) 2002
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Original author: Daniel Glazman (daniel@glazman.org)
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://editor/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://cascades/content/EdCssProps.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://cascades/content/tabsOverlay.xul"?>
<!DOCTYPE dialog SYSTEM "chrome://cascades/locale/EdCssProps.dtd">
<dialog title="&Window.title;"
id="specificCssPropsWindow"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
buttons="accept,cancel,help"
onload="Startup();"
ondialogcancel="CancelChanges();"
ondialogaccept="FlushChanges();"
onclose="CancelChanges();">
<script type="application/x-javascript" src="chrome://cascades/content/specificCSSProps.js" />
<!-- Methods common to all editor dialogs -->
<script type="application/x-javascript" src="chrome://editor/content/editorUtilities.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EdDialogCommon.js"/>
<script type="application/x-javascript" src="chrome://cascades/content/commonCssProps.js"/>
<script type="application/x-javascript" src="chrome://cascades/content/EdCssProps-utils.js"/>
<script type="application/x-javascript" src="chrome://global/content/dialogOverlay.js" />
<spacer id="location" offsetY="50" persist="offsetX offsetY"/>
<spacer id="dummy" style="display:none"/>
<broadcaster id="args" value=""/>
<vbox id="boxTabPanel" />
</dialog>

Просмотреть файл

@ -39,6 +39,8 @@
var gTimerID;
var textColor, backgroundColor, borderColor;
var gLocalFonts = null;
const kUrlString = "url(";
// * if |value| is not empty, sets the CSS property |property| to |value|
// in |elt| element's inline styles ; otherwise removes the property
@ -404,7 +406,7 @@ function onBackgroundAttachmentChange()
if (!gDialog.selectedObject) return;
// the checkbox is checked if the background scrolls with the page
var value = gDialog.backgroundAttachmentCheckbox.checked ? "" : "fixed";
AddStyleToElement(gDialog.selectedObject, gDialog.selectedObject, value);
AddStyleToElement(gDialog.selectedObject, "background-attachment", value);
SetModifiedFlagOnStylesheet();
}

Просмотреть файл

@ -37,7 +37,6 @@
var gTimerID;
const urlString = "url(";
const styleStr = "style";
var textColor, backgroundColor;
@ -223,6 +222,15 @@ function InitDialog()
case "text":
InitTextTabPanel();
break;
case "background":
InitBackgroundTabPanel();
break;
case "box":
InitBoxTabPanel();
break;
case "aural":
InitAuralTabPanel();
break;
default:
break;
}