JBoss Rich Faces SVN: r13516 - in trunk/ui/colorPicker/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-04-12 11:36:48 -0400 (Sun, 12 Apr 2009)
New Revision: 13516
Modified:
trunk/ui/colorPicker/src/main/resources/org/richfaces/renderkit/html/scripts/ui.colorpicker.js
trunk/ui/colorPicker/src/main/templates/org/richfaces/htmlColorPicker.jspx
Log:
https://jira.jboss.org/jira/browse/RF-6595
Modified: trunk/ui/colorPicker/src/main/resources/org/richfaces/renderkit/html/scripts/ui.colorpicker.js
===================================================================
--- trunk/ui/colorPicker/src/main/resources/org/richfaces/renderkit/html/scripts/ui.colorpicker.js 2009-04-11 18:24:51 UTC (rev 13515)
+++ trunk/ui/colorPicker/src/main/resources/org/richfaces/renderkit/html/scripts/ui.colorpicker.js 2009-04-12 15:36:48 UTC (rev 13516)
@@ -1,17 +1,117 @@
if (!window.Richfaces) window.Richfaces = {};
(function ($) {
+
+ var RGBColor = function(colors) {
+ this.r = Math.min(255, Math.max(0, colors[0]));
+ this.g = Math.min(255, Math.max(0, colors[1]));
+ this.b = Math.min(255, Math.max(0, colors[2]));
+ };
+
+ RGBColor.prototype.toHSB = function() {
+ if (!this.hsb) {
+ var r = this.r, g = this.g, b = this.b;
+ var low = Math.min(r, Math.min(g,b));
+ var high = Math.max(r, Math.max(g,b));
+
+ this.hsb = {b: high*100/255};
+
+ var diff = high-low;
+ if (diff) {
+ this.hsb.s = Math.round(100*(diff/high));
+ if (r == high) {
+ this.hsb.h = Math.round(((g-b)/diff)*60);
+ } else if (g == high) {
+ this.hsb.h = Math.round((2 + (b-r)/diff)*60);
+ } else {
+ this.hsb.h = Math.round((4 + (r-g)/diff)*60);
+ }
+
+ if (this.hsb.h > 360) {
+ this.hsb.h -= 360;
+ } else if (this.hsb.h < 0) {
+ this.hsb.h += 360;
+ }
+ } else {
+ this.hsb.h = this.hsb.s = 0;
+ }
+
+ this.hsb.b = Math.round(this.hsb.b);
+ }
+
+ return this.hsb;
+ };
+
+ RGBColor.prototype.toRGB = function() {
+ return this;
+ };
+
+ var HSBColor = function(colors) {
+ this.h = Math.min(360, Math.max(0, colors[0]));
+ this.s = Math.min(100, Math.max(0, colors[1]));
+ this.b = Math.min(100, Math.max(0, colors[2]));
+ };
+
+ HSBColor.prototype.toHSB = function() {
+ return this;
+ };
+
+ HSBColor.prototype.toRGB = function() {
+ if (!this.rgb) {
+ this.rgb = {};
+ var h = Math.round(this.h);
+ var s = Math.round(this.s*255/100);
+ var v = Math.round(this.b*255/100);
+
+ if (s == 0) {
+ this.rgb.r = this.rgb.g = this.rgb.b = v;
+ } else {
+ var t1 = v;
+ var t2 = (255-s) * v / 255;
+ var t3 = (t1-t2) * (h%60) / 60;
+ if (h == 360) {
+ h = 0;
+ }
+ if (h < 60) {
+ this.rgb.r = t1; this.rgb.b = t2; this.rgb.g = t2 + t3;
+ } else if (h < 120) {
+ this.rgb.g = t1; this.rgb.b = t2; this.rgb.r = t1-t3;
+ } else if (h < 180) {
+ this.rgb.g=t1; this.rgb.r=t2; this.rgb.b=t2+t3;
+ } else if (h < 240) {
+ this.rgb.b=t1; this.rgb.r=t2; this.rgb.g=t1-t3;
+ } else if (h < 300) {
+ this.rgb.b=t1; this.rgb.g=t2; this.rgb.r=t2+t3;
+ } else if (h < 360) {
+ this.rgb.r=t1; this.rgb.g=t2; this.rgb.b=t1-t3;
+ } else {
+ this.rgb.r=0; this.rgb.g=0; this.rgb.b=0;
+ }
+ }
+
+ this.rgb.r = Math.round(this.rgb.r);
+ this.rgb.g = Math.round(this.rgb.g);
+ this.rgb.b = Math.round(this.rgb.b);
+ }
+
+ return this.rgb;
+ };
+
+
$.widget("ui.colorPicker", {
_fixColors: function(cff, mode) {
- cff.toLowerCase();
+ cff = cff.toLowerCase();
var pattern = /[0-9]+/g;
- cff = cff.match(pattern);
- if(mode == 'hsb'){
- result = {h:cff[0], s: cff[1], b: cff[2]};
- return result;
- } else if(mode == 'rgb'){
- result = {r:cff[0], g: cff[1], b: cff[2]};
- return result;
+
+ var colors = cff.match(pattern);
+
+ if (mode == 'hsb') {
+ return new HSBColor(colors);
+ } else if (mode == 'rgb') {
+ return new RGBColor(colors);
+ } else if (mode == 'hex') {
+ var hex = parseInt(((cff.indexOf('#') > -1) ? cff.substring(1) : cff), 16);
+ return new RGBColor([hex >> 16, (hex & 0x00FF00) >> 8, (hex & 0x0000FF)]);
}
},
@@ -24,22 +124,17 @@
var o = this.options, self = this,
tpl = $(o.clientId.toString()+"-colorPicker-popup");
- if(o.color.indexOf('hsb') > -1){
- this.color = this._fixHSB(this._fixColors(o.color, 'hsb'));
-
- } else if(o.color.indexOf('rgb') > -1){
- this.color = this._RGBToHSB(this._fixColors(o.color, 'rgb'));
-
- } else if(o.color.indexOf('#') > -1){
- this.color = this._HexToHSB(o.color);
-
+ if (o.color.indexOf('hsb') > -1) {
+ this.color = this._fixColors(o.color, 'hsb');// this._fixHSB(this._fixColors(o.color, 'hsb'));
+ } else if (o.color.indexOf('rgb') > -1) {
+ this.color = this._fixColors(o.color, 'rgb');//this._RGBToHSB(this._fixColors(o.color, 'rgb'));
+ } else if (o.color.indexOf('#') > -1) {
+ this.color = this._fixColors(o.color, 'hex');
} else{
return this;
-
}
this.showEvent = o.showEvent;
- this.origColor = this.color;
this.picker = $(tpl);
this.picker[0].component = this;
@@ -100,42 +195,52 @@
},
- _fillRGBFields: function(hsb) {
- var rgb = this._HSBToRGB(hsb);
+ _fillRGBFields: function(color) {
+ var rgb = color.toRGB();
this.fields
.eq(1).val(rgb.r).end()
.eq(2).val(rgb.g).end()
.eq(3).val(rgb.b).end();
},
- _fillHSBFields: function(hsb) {
+
+ _fillHSBFields: function(color) {
+ var hsb = color.toHSB();
+
this.fields
.eq(4).val(hsb.h).end()
.eq(5).val(hsb.s).end()
.eq(6).val(hsb.b).end();
},
- _fillHexFields: function (hsb) {
+
+ _fillHexFields: function (color) {
+ var rgb = color.toRGB();
+
this.fields
- .eq(0).val(this._HSBToHex(hsb)).end();
+ .eq(0).val(this._RGBToHex(rgb)).end();
},
- _setSelector: function(hsb) {
- this.selector.css('backgroundColor', '#' + this._HSBToHex({h: hsb.h, s: 100, b: 100}));
+
+ _setSelector: function(color) {
+ var rgb = color.toRGB();
+ var hsb = color.toHSB();
+ this.selector.css('backgroundColor', '#' + this._RGBToHex(rgb));
this.selectorIndic.css({
left: parseInt(150 * hsb.s/100, 10),
top: parseInt(150 * (100-hsb.b)/100, 10)
});
},
- _setHue: function(hsb) {
+ _setHue: function(color) {
+ var hsb = color.toHSB();
this.hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
},
- _setCurrentColor: function(hsb) {
- this.currentColor.css('backgroundColor', '#' + this._HSBToHex(hsb));
+ _setCurrentColor: function(color) {
+ this.currentColor.css('backgroundColor', '#' + this._RGBToHex(color.toRGB()));
},
- _setIconColor: function(hsb) {
- this.iconColor.css('backgroundColor', '#' + this._HSBToHex(hsb));
+ _setIconColor: function(color) {
+ this.iconColor.css('backgroundColor', '#' + this._RGBToHex(color.toRGB()));
},
- _setNewColor: function(hsb) {
- this.newColor.css('backgroundColor', '#' + this._HSBToHex(hsb));
+ _setNewColor: function(color) {
+ this.newColor.css('backgroundColor', '#' + this._RGBToHex(color.toRGB()));
},
_keyDown: function(e) {
@@ -144,6 +249,15 @@
return false;
}
},
+
+ _createEventArgument: function(color) {
+ return { options: this.options,
+ hsb: color.toHSB(),
+ hex: this._RGBToHex(color.toRGB()),
+ rgb: color.toRGB()
+ };
+ },
+
_change: function(e, target) {
var col;
@@ -167,29 +281,25 @@
if (target.parentNode.className.indexOf('-hex') > 0) {
- col = this._HexToHSB(this.fields.eq(0).val());
-
- this.color = col;
+ this.color = col = this._fixColors(this.fields.eq(0).val(), 'hex');
this._fillHexFields(col);
this._fillRGBFields(col);
this._fillHSBFields(col);
} else if (target.parentNode.className.indexOf('-hsb') > 0) {
- col = this._fixHSB({
- h: parseInt(this.fields.eq(4).val(), 10),
- s: parseInt(this.fields.eq(5).val(), 10),
- b: parseInt(this.fields.eq(6).val(), 10)
- });
- this.color = col;
+ this.color = col = new HSBColor([
+ parseInt(this.fields.eq(4).val(), 10),
+ parseInt(this.fields.eq(5).val(), 10),
+ parseInt(this.fields.eq(6).val(), 10)]);
+
this._fillHSBFields(col);
this._fillRGBFields(col);
this._fillHexFields(col);
} else {
- col = this._RGBToHSB(this._fixRGB({
- r: parseInt(this.fields.eq(1).val(), 10),
- g: parseInt(this.fields.eq(2).val(), 10),
- b: parseInt(this.fields.eq(3).val(), 10)
- }));
- this.color = col;
+ this.color = col = new RGBColor([
+ parseInt(this.fields.eq(1).val(), 10),
+ parseInt(this.fields.eq(2).val(), 10),
+ parseInt(this.fields.eq(3).val(), 10)]);
+
this._fillRGBFields(col);
this._fillHexFields(col);
this._fillHSBFields(col);
@@ -197,7 +307,7 @@
this._setSelector(col);
this._setHue(col);
this._setNewColor(col);
- this._trigger('change', e, { options: this.options, hsb: col, hex: this._HSBToHex(col), rgb: this._HSBToRGB(col) });
+ this._trigger('change', e, this._createEventArgument(col));
},
_blur: function(e) {
this.fields.parent().removeClass('rich-colorPicker-focus');
@@ -299,11 +409,9 @@
_clickSubmit: function(e) {
var col = this.color;
- this.origColor = col;
this._setCurrentColor(col);
this._setIconColor(col);
- var RGBCol = this._HSBToRGB(col);
- this._trigger("submit", e, { options: this.options, hex: '#'+this._HSBToHex(col), rgb: 'rgb('+RGBCol.r+', '+RGBCol.g+', '+RGBCol.b+')' });
+ this._trigger("submit", e, this._createEventArgument(col));
this.picker.hide();
$(document).unbind('mousedown.colorPicker');
return false;
@@ -315,7 +423,7 @@
},
_show: function(e) {
- this._trigger("beforeShow", e, { options: this.options, hsb: this.color, hex: this._HSBToHex(this.color), rgb: this._HSBToRGB(this.color) });
+ this._trigger("beforeShow", e, this._createEventArgument(this.color));
var top = 0;
var left = 0;
@@ -329,7 +437,7 @@
this.picker.css('visibility', 'visible');
- if (this._trigger("show", e, { options: this.options, hsb: this.color, hex: this._HSBToHex(this.color), rgb: this._HSBToRGB(this.color) }) != false) {
+ if (this._trigger("show", e, this._createEventArgument(this.color)) != false) {
this.picker.show();
}
@@ -342,7 +450,7 @@
_hide: function(e) {
if (!this._isChildOf(this.picker[0], e.target, this.picker[0])) {
- if (this._trigger("hide", e, { options: this.options, hsb: this.color, hex: this._HSBToHex(this.color), rgb: this._HSBToRGB(this.color) }) != false) {
+ if (this._trigger("hide", e, this._createEventArgument(this.color)) != false) {
this.picker.hide();
}
$(document).unbind('mousedown.colorPicker');
@@ -368,66 +476,6 @@
return false;
},
- _fixHSB: function(hsb) {
- return {
- h: Math.min(360, Math.max(0, hsb.h)),
- s: Math.min(100, Math.max(0, hsb.s)),
- b: Math.min(100, Math.max(0, hsb.b))
- };
- },
- _fixRGB: function(rgb) {
- return {
- r: Math.min(255, Math.max(0, rgb.r)),
- g: Math.min(255, Math.max(0, rgb.g)),
- b: Math.min(255, Math.max(0, rgb.b))
- };
- },
- _HexToRGB: function (hex) {
- var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
- return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
- },
- _HexToHSB: function(hex) {
- return this._RGBToHSB(this._HexToRGB(hex));
- },
- _RGBToHSB: function(rgb) {
- var r = rgb.r, g = rgb.g, b = rgb.b;
- var low = Math.min(r,Math.min(g,b));
- var high = Math.max(r,Math.max(g,b));
- var hsb = {b: high*100/255};
- var diff = high-low;
- if (diff){
- hsb.s = Math.round(100*(diff/high));
- if(r == high) hsb.h = Math.round(((g-b)/diff)*60);
- else if(g == high) hsb.h = Math.round((2 + (b-r)/diff)*60);
- else hsb.h = Math.round((4 + (r-g)/diff)*60);
- if (hsb.h > 360) hsb.h -= 360;
- else if (hsb.h < 0) hsb.h += 360;
- }else hsb.h = hsb.s = 0;
- hsb.b = Math.round(hsb.b);
- return hsb;
- },
- _HSBToRGB: function(hsb) {
- var rgb = {};
- var h = Math.round(hsb.h);
- var s = Math.round(hsb.s*255/100);
- var v = Math.round(hsb.b*255/100);
- if(s == 0) {
- rgb.r = rgb.g = rgb.b = v;
- } else {
- var t1 = v;
- var t2 = (255-s)*v/255;
- var t3 = (t1-t2)*(h%60)/60;
- if(h==360) h = 0;
- if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3;}
- else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3;}
- else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3;}
- else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3;}
- else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3;}
- else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3;}
- else {rgb.r=0; rgb.g=0; rgb.b=0;}
- }
- return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};
- },
_RGBToHex: function(rgb) {
var hex = [
rgb.r.toString(16),
@@ -441,22 +489,18 @@
});
return hex.join('');
},
- _HSBToHex: function(hsb) {
- return this._RGBToHex(this._HSBToRGB(hsb));
- },
setColor: function(col) {
if (typeof col == 'string') {
- col = this._HexToHSB(col);
+ col = this._fixColors(col, 'hex');
} else if (col.r != undefined && col.g != undefined && col.b != undefined) {
- col = this._RGBToHSB(col);
+ col = new RGBColor([col.r, col.g, col.b]);
} else if (col.h != undefined && col.s != undefined && col.b != undefined) {
- col = this._fixHSB(col);
+ col = new HSBColor([col.h, col.s, col.b]);
} else {
return this;
}
this.color = col;
- this.origColor = col;
this._fillRGBFields(col);
this._fillHSBFields(col);
this._fillHexFields(col);
Modified: trunk/ui/colorPicker/src/main/templates/org/richfaces/htmlColorPicker.jspx
===================================================================
--- trunk/ui/colorPicker/src/main/templates/org/richfaces/htmlColorPicker.jspx 2009-04-11 18:24:51 UTC (rev 13515)
+++ trunk/ui/colorPicker/src/main/templates/org/richfaces/htmlColorPicker.jspx 2009-04-12 15:36:48 UTC (rev 13516)
@@ -134,13 +134,13 @@
submit: function(e, ui) {
switch("#{colorMode}"){
case "hex":
- jQuery('\##{clientIdJquery} input').val(ui.hex);
+ jQuery('\##{clientIdJquery} input').val('#' + ui.hex);
break;
case "rgb":
- jQuery('\##{clientIdJquery} input').val(ui.rgb);
+ jQuery('\##{clientIdJquery} input').val('rgb('+ui.rgb.r+', '+ui.rgb.g+', '+ui.rgb.b+')');
break;
default:
- jQuery('\##{clientIdJquery} input').val(ui.hex);
+ jQuery('\##{clientIdJquery} input').val('#' + ui.hex);
}
}
});
15 years, 9 months
JBoss Rich Faces SVN: r13515 - in trunk/ui/extendedDataTable/src/main: java/org/richfaces/renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pkawiak
Date: 2009-04-11 14:24:51 -0400 (Sat, 11 Apr 2009)
New Revision: 13515
Modified:
trunk/ui/extendedDataTable/src/main/config/component/ExtendedDataTable.xml
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
Log:
RF-6510: reRender attribute added, doDecode now uses AjaxRendererUtils to addRegionsFromComponent table to rerender
Modified: trunk/ui/extendedDataTable/src/main/config/component/ExtendedDataTable.xml
===================================================================
--- trunk/ui/extendedDataTable/src/main/config/component/ExtendedDataTable.xml 2009-04-11 17:15:17 UTC (rev 13514)
+++ trunk/ui/extendedDataTable/src/main/config/component/ExtendedDataTable.xml 2009-04-11 18:24:51 UTC (rev 13515)
@@ -248,6 +248,11 @@
<name>summary</name>
<classname>java.lang.Object</classname>
</property>
+ <property >
+ <name>reRender</name>
+ <classname>java.lang.Object</classname>
+ <description>Id['s] (in format of call UIComponent.findComponent()) of components, rendered in case of AjaxRequest caused by this component. Can be single id, comma-separated list of Id's, or EL Expression with array or Collection</description>
+ </property>
<property elonly="true">
<name>tableState</name>
<classname>java.lang.String</classname>
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2009-04-11 17:15:17 UTC (rev 13514)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2009-04-11 18:24:51 UTC (rev 13515)
@@ -1222,7 +1222,9 @@
filtering = (filtering || filterChanged);
}
}
-
+ if (AjaxRendererUtils.isAjaxRequest(context)) {
+ AjaxRendererUtils.addRegionsFromComponent(table, context);
+ }
// AjaxContext.getCurrentInstance().addComponentToAjaxRender(component);
if (sorting){
new ExtTableSortEvent(component).queue();
15 years, 9 months
JBoss Rich Faces SVN: r13514 - trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable.
by richfaces-svn-commits@lists.jboss.org
Author: pkawiak
Date: 2009-04-11 13:15:17 -0400 (Sat, 11 Apr 2009)
New Revision: 13514
Modified:
trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js
Log:
RF-6623: incorrect ctrl+a handling on extDt
Modified: trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js
===================================================================
--- trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js 2009-04-11 13:10:49 UTC (rev 13513)
+++ trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js 2009-04-11 17:15:17 UTC (rev 13514)
@@ -492,7 +492,7 @@
}
break;
case 65: case 97: // Ctrl-A
- if (this.inFocus && event.ctrlKey) {
+ if (this.inFocus && event.ctrlKey && !event.altKey) {
this.selectionFlag = "a";
for (var i = 0; i < this.rowCount; i++) {
this.addRowToSelection(i);
15 years, 9 months
JBoss Rich Faces SVN: r13513 - trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-04-11 09:10:49 -0400 (Sat, 11 Apr 2009)
New Revision: 13513
Modified:
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
Log:
https://jira.jboss.org/jira/browse/RF-5735
Modified: trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
--- trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2009-04-11 00:50:33 UTC (rev 13512)
+++ trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2009-04-11 13:10:49 UTC (rev 13513)
@@ -187,11 +187,14 @@
endEditableState : function() {
//this.inplaceInput.style.position = "";
+
if (this.bar) {
this.bar.hide();
}
this.tempValueKeeper.style.clip = 'rect(0px 0px 0px 0px)';
+ this.skipBlur = true;
+ this.tempValueKeeper.blur();
},
/*endChangedState : function() {
15 years, 9 months
JBoss Rich Faces SVN: r13512 - in trunk: samples/themes/src/main/java/org/richfaces/theme/images and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2009-04-10 20:50:33 -0400 (Fri, 10 Apr 2009)
New Revision: 13512
Removed:
trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseSkinImage.java
Modified:
trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java
trunk/samples/themes/src/main/java/org/richfaces/theme/images/FooterBackground.java
trunk/samples/themes/src/main/java/org/richfaces/theme/images/HeaderBackground.java
trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme2.xcss
trunk/samples/themes/src/main/templates/org/richfaces/theme2.jspx
Log:
Theme 2 images done
Modified: trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java 2009-04-10 17:39:37 UTC (rev 13511)
+++ trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseGradient.java 2009-04-11 00:50:33 UTC (rev 13512)
@@ -50,12 +50,12 @@
*/
public class BaseGradient extends Java2Dresource {
- private int width;
- private int height;
- private int gradientHeight;
- private String baseColor;
- private String gradientColor;
- private boolean horizontal = false;
+ private final int width;
+ private final int height;
+ private final int gradientHeight;
+ private final String baseColor;
+ private final String gradientColor;
+ private final boolean horizontal;
public BaseGradient(int width, int height, int gradientHeight, String baseColor, String gradientColor, boolean horizontal) {
super();
@@ -115,14 +115,42 @@
}
public Dimension getDimensions(FacesContext facesContext, Object data) {
- return new Dimension(width, height);
+ return new Dimension(width, height);
}
protected Dimension getDimensions(ResourceContext resourceContext) {
- return getDimensions(null, restoreData(resourceContext));
+ return new Dimension(width, height);
}
- private void drawGradient(Graphics2D g2d, Rectangle2D rectangle, BiColor colors, int height) {
+ /**
+ * @return the gradientHeight
+ */
+ protected int getGradientHeight() {
+ return gradientHeight;
+ }
+
+ /**
+ * @return the baseColor
+ */
+ protected String getBaseColor() {
+ return baseColor;
+ }
+
+ /**
+ * @return the gradientColor
+ */
+ protected String getGradientColor() {
+ return gradientColor;
+ }
+
+ /**
+ * @return the horizontal
+ */
+ protected boolean isHorizontal() {
+ return horizontal;
+ }
+
+ protected void drawGradient(Graphics2D g2d, Rectangle2D rectangle, BiColor colors, int height) {
if (colors != null) {
GradientPaint gragient = new GradientPaint(0, 0, colors.getTopColor(), 0, height, colors.getBottomColor());
g2d.setPaint(gragient);
@@ -138,19 +166,28 @@
g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
- Data dataToStore = (Data) restoreData(resourceContext);
- if (dataToStore != null) {
- Integer headerBackgroundColor = dataToStore.getHeaderBackgroundColor();
- Integer headerGradientColor = dataToStore.getHeaderGradientColor();
+ Data data = (Data) restoreData(resourceContext);
+ if (data != null) {
+ paintGradient(g2d, data);
+ }
+ }
+ /**
+ * @param g2d
+ * @param data
+ */
+ protected void paintGradient(Graphics2D g2d, Data data) {
+ Integer headerBackgroundColor = data.getHeaderBackgroundColor();
+ Integer headerGradientColor = data.getHeaderGradientColor();
+
if (headerBackgroundColor != null && headerGradientColor != null) {
BiColor biColor = new GradientType.BiColor(headerBackgroundColor, headerGradientColor);
- GradientType type = dataToStore.getGradientType();
+ GradientType type = data.getGradientType();
BiColor firstLayer = type.getFirstLayerColors(biColor);
BiColor secondLayer = type.getSecondLayerColors(biColor);
- Dimension dim = getDimensions(null, dataToStore);
+ Dimension dim = getDimensions(null, data);
if (horizontal) {
//x -> y, y -> x
@@ -182,7 +219,6 @@
drawGradient(g2d, rect, secondLayer, smallGradientHeight);
}
}
- }
protected void restoreData(Data data, Zipper2 zipper2) {
if (zipper2.hasMore()) {
Deleted: trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseSkinImage.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseSkinImage.java 2009-04-10 17:39:37 UTC (rev 13511)
+++ trunk/framework/impl/src/main/java/org/richfaces/renderkit/html/BaseSkinImage.java 2009-04-11 00:50:33 UTC (rev 13512)
@@ -1,184 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html;
-
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.GradientPaint;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.Rectangle2D;
-import java.io.Serializable;
-import java.nio.ByteBuffer;
-import java.nio.IntBuffer;
-import java.util.Date;
-import java.util.Map;
-
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.resource.InternetResourceBuilder;
-import org.ajax4jsf.resource.Java2Dresource;
-import org.ajax4jsf.resource.PngRenderer;
-import org.ajax4jsf.resource.ResourceContext;
-import org.ajax4jsf.util.HtmlColor;
-import org.ajax4jsf.util.HtmlDimensions;
-import org.ajax4jsf.util.Zipper2;
-import org.richfaces.renderkit.html.images.GradientAlignment;
-import org.richfaces.renderkit.html.images.GradientType;
-import org.richfaces.renderkit.html.images.GradientType.BiColor;
-import org.richfaces.skin.Skin;
-import org.richfaces.skin.SkinFactory;
-
-/**
- * @author asmirnov
- *
- */
-public abstract class BaseSkinImage extends Java2Dresource {
-
-
- public BaseSkinImage() {
- super();
- setRenderer(new PngRenderer());
- }
-
- public Dimension getDimensions(FacesContext facesContext, Object data) {
- return getDimension();
- }
-
- /**
- * Hook method to define constant dimension.
- *
- * @return
- */
- protected abstract Dimension getDimension();
-
- protected Dimension getDimensions(ResourceContext resourceContext) {
- return getDimension();
- }
-
- protected void drawRectangle(Graphics2D g2d, Rectangle2D rect,
- BiColor biColor, boolean useTop) {
- if (biColor != null) {
- Color color = useTop ? biColor.getTopColor() : biColor
- .getBottomColor();
- g2d.setColor(color);
- g2d.fill(rect);
- }
- }
-
- protected void drawGradient(Graphics2D g2d, Rectangle2D rectangle,
- BiColor colors, int height) {
- if (colors != null) {
- GradientPaint gragient = new GradientPaint(0, 0, colors
- .getTopColor(), 0, height, colors.getBottomColor());
- g2d.setPaint(gragient);
- g2d.fill(rectangle);
- }
- }
-
- protected void paint(ResourceContext resourceContext, Graphics2D g2d) {
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
- RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_DITHERING,
- RenderingHints.VALUE_DITHER_ENABLE);
-
- g2d.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION,
- RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING,
- RenderingHints.VALUE_COLOR_RENDER_QUALITY);
- g2d.setRenderingHint(RenderingHints.KEY_RENDERING,
- RenderingHints.VALUE_RENDER_QUALITY);
- paintImage(resourceContext,g2d);
- }
-
- /**
- * @param resourceContext
- * @param g2d
- */
- protected abstract void paintImage(ResourceContext resourceContext, Graphics2D g2d);
-
- private Integer decodeColor(String value) {
- if (value != null && value.length() != 0) {
- return Integer.valueOf(HtmlColor.decode(value).getRGB());
- } else {
- return null;
- }
- }
-
- private Integer decodeHeight(String value) {
- if (value != null && value.length() != 0) {
- return HtmlDimensions.decode(value).intValue();
- } else {
- return null;
- }
- }
-
- protected static String safeTrim(String s) {
- return s != null ? s.trim() : null;
- }
-
- protected Object getDataToStore(FacesContext context, Object parameterData) {
- SkinFactory skinFactory = SkinFactory.getInstance();
-
- Skin skin = skinFactory.getSkin(context);
-
- int hashCode = skin.hashCode(context);
- byte[] data = new byte[4];
- ByteBuffer.wrap(data).asIntBuffer().put(hashCode);
- return data;
- }
-
- public boolean isCacheable() {
- return true;
- }
-
- @Override
- public boolean requireFacesContext() {
- return true;
- }
-
- protected Integer getSkinColor(String name) {
- return decodeColor(getSkinParameter(name));
- }
-
- protected Integer getSkinSize(String name) {
- return decodeHeight(getSkinParameter(name));
- }
- protected String getSkinParameter(String name) {
- String value = null;
- FacesContext context = FacesContext.getCurrentInstance();
- if (null != context) {
- SkinFactory skinFactory = SkinFactory.getInstance();
- Skin skin = skinFactory.getSkin(context);
- value = (String) skin.getParameter(context, name);
-
- if (value == null || value.length() == 0) {
- skin = skinFactory.getDefaultSkin(context);
- value = (String) skin.getParameter(context, name);
- }
-
- }
- return value;
- }
-
-}
Modified: trunk/samples/themes/src/main/java/org/richfaces/theme/images/FooterBackground.java
===================================================================
--- trunk/samples/themes/src/main/java/org/richfaces/theme/images/FooterBackground.java 2009-04-10 17:39:37 UTC (rev 13511)
+++ trunk/samples/themes/src/main/java/org/richfaces/theme/images/FooterBackground.java 2009-04-11 00:50:33 UTC (rev 13512)
@@ -3,7 +3,16 @@
*/
package org.richfaces.theme.images;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.GradientPaint;
+import java.awt.Graphics2D;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Rectangle2D;
+
import org.richfaces.renderkit.html.BaseGradient;
+import org.richfaces.renderkit.html.images.GradientType;
+import org.richfaces.renderkit.html.images.GradientType.BiColor;
/**
* @author asmirnov
@@ -14,4 +23,75 @@
public FooterBackground() {
super(1, 95, 47,"panelBorderColor","generalBackgroundColor", false);
}
+
+ protected void drawBackGradient(Graphics2D g2d, Rectangle2D rectangle, BiColor colors, int height) {
+ if (colors != null) {
+ GradientPaint gragient = new GradientPaint(0, (float)(rectangle.getHeight()-height), colors.getBottomColor(), 0, (float) rectangle.getHeight(), colors.getTopColor());
+ g2d.setPaint(gragient);
+ g2d.fill(rectangle);
+ }
+ }
+
+
+ @Override
+ protected void paintGradient(Graphics2D g2d, Data data) {
+ Integer headerBackgroundColor = data.getHeaderBackgroundColor();
+ Integer headerGradientColor = data.getHeaderGradientColor();
+
+ if (headerBackgroundColor != null && headerGradientColor != null) {
+ BiColor biColor = new GradientType.BiColor(headerBackgroundColor, headerGradientColor);
+
+ GradientType type = data.getGradientType();
+ BiColor firstLayer = type.getFirstLayerColors(biColor);
+ BiColor secondLayer = type.getSecondLayerColors(biColor);
+
+ Dimension dim = getDimensions(null, data);
+
+ if (isHorizontal()) {
+ //x -> y, y -> x
+ g2d.transform(new AffineTransform(0, 1, 1, 0, 0, 0));
+ dim.setSize(dim.height, dim.width);
+ }
+
+ int localGradientHeight = getGradientHeight();
+ if (localGradientHeight < 0) {
+ localGradientHeight = dim.height/2;
+ }
+
+ Rectangle2D rect = new Rectangle2D.Float(
+ 0,
+ 0,
+ dim.width,
+ localGradientHeight);
+
+ drawGradient(g2d, rect, firstLayer, localGradientHeight);
+
+ rect = new Rectangle2D.Float(
+ 0,
+ localGradientHeight,
+ dim.width,
+ dim.height);
+
+ drawBackGradient(g2d, rect, firstLayer, localGradientHeight);
+
+ int smallGradientHeight = localGradientHeight / 2;
+
+ rect = new Rectangle2D.Float(
+ 0,
+ 0,
+ dim.width,
+ smallGradientHeight);
+
+ drawGradient(g2d, rect, secondLayer, smallGradientHeight);
+
+ rect = new Rectangle2D.Float(
+ 0,
+ dim.height-smallGradientHeight,
+ dim.width,
+ dim.height);
+
+ drawBackGradient(g2d, rect, secondLayer, smallGradientHeight);
+ }
+ }
+
}
Modified: trunk/samples/themes/src/main/java/org/richfaces/theme/images/HeaderBackground.java
===================================================================
--- trunk/samples/themes/src/main/java/org/richfaces/theme/images/HeaderBackground.java 2009-04-10 17:39:37 UTC (rev 13511)
+++ trunk/samples/themes/src/main/java/org/richfaces/theme/images/HeaderBackground.java 2009-04-11 00:50:33 UTC (rev 13512)
@@ -3,6 +3,10 @@
*/
package org.richfaces.theme.images;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics2D;
+
import org.richfaces.renderkit.html.BaseGradient;
/**
@@ -14,4 +18,19 @@
public HeaderBackground() {
super(1, 95, 47,"headerBackgroundColor","headerGradientColor", false);
}
+
+ @Override
+ protected void paintGradient(Graphics2D g2d, Data data) {
+ // Paint gradient itself
+ super.paintGradient(g2d, data);
+ // Paint lower bar
+ Dimension dim = getDimensions(null, data);
+ Integer headerBackgroundColor = data.getHeaderBackgroundColor();
+
+ if(headerBackgroundColor != null && dim.height > getGradientHeight() && getGradientHeight() >=0){
+ g2d.setPaint(null);
+ g2d.setColor(new Color(headerBackgroundColor));
+ g2d.fillRect(0,getGradientHeight(),dim.width,dim.height);
+ }
+ }
}
Modified: trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme2.xcss
===================================================================
--- trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme2.xcss 2009-04-10 17:39:37 UTC (rev 13511)
+++ trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/theme2.xcss 2009-04-11 00:50:33 UTC (rev 13512)
@@ -29,7 +29,7 @@
<u:style name="border-top-color" skin="generalBackgroundColor" />
<u:style name="background-color" skin="panelBorderColor"/>
<u:style name="background-repeat" value="repeat-x"/>
- <u:style name="background-position" value="top left"/>
+ <u:style name="background-position" value="center left"/>
</u:selector>
<u:selector name=".menu_col">
Modified: trunk/samples/themes/src/main/templates/org/richfaces/theme2.jspx
===================================================================
--- trunk/samples/themes/src/main/templates/org/richfaces/theme2.jspx 2009-04-10 17:39:37 UTC (rev 13511)
+++ trunk/samples/themes/src/main/templates/org/richfaces/theme2.jspx 2009-04-11 00:50:33 UTC (rev 13512)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<f:root
- xmlns:f="http://ajax4jsf.org/cdk/template"
+ xmlns:f="http://ajax4jsf.org/cdk/template"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c=" http://java.sun.com/jsf/core"
xmlns:ui=" http://ajax4jsf.org/cdk/ui"
xmlns:u=" http://ajax4jsf.org/cdk/u"
@@ -8,18 +9,18 @@
xmlns:h="http://jsf.exadel.com/header"
xmlns:vcp="http://ajax4jsf.org/cdk/vcp"
class="org.richfaces.renderkit.html.Theme2Renderer"
- baseclass="org.richfaces.theme.AbstractThemeRenderer"
+ baseclass="org.richfaces.renderkit.AbstractPageRenderer"
component="org.richfaces.component.UIPage"
>
<c:set var="namespace" value="#{this:prolog(context,component)}"/>
- <html x:xmlns="#{namespace}" x:lang="#{context.viewRoot.locale}"
- >
+ <html x:xmlns="#{namespace}" x:lang="#{context.viewRoot.locale}">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>#{component.attributes['pageTitle']}</title>
<f:call name="themeStyle"/>
<f:call name="themeScript"/>
- <f:call name="pageStyle"/>
+ <jsp:scriptlet>
+ </jsp:scriptlet>
<u:insertFacet name="pageHeader"/>
</head>
15 years, 9 months
JBoss Rich Faces SVN: r13511 - trunk/docs/common-resources/en/src/main/xslt.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2009-04-10 13:39:37 -0400 (Fri, 10 Apr 2009)
New Revision: 13511
Modified:
trunk/docs/common-resources/en/src/main/xslt/xhtml-common-reldiffmk.xsl
trunk/docs/common-resources/en/src/main/xslt/xhtml-common.xsl
trunk/docs/common-resources/en/src/main/xslt/xhtml-diffmk.xsl
trunk/docs/common-resources/en/src/main/xslt/xhtml-release.xsl
trunk/docs/common-resources/en/src/main/xslt/xhtml-single-diffmk.xsl
trunk/docs/common-resources/en/src/main/xslt/xhtml-single-release.xsl
trunk/docs/common-resources/en/src/main/xslt/xhtml-single.xsl
trunk/docs/common-resources/en/src/main/xslt/xhtml.xsl
Log:
https://jira.jboss.org/jira/browse/RF-5655 - xsl refactoring
Modified: trunk/docs/common-resources/en/src/main/xslt/xhtml-common-reldiffmk.xsl
===================================================================
--- trunk/docs/common-resources/en/src/main/xslt/xhtml-common-reldiffmk.xsl 2009-04-10 17:21:12 UTC (rev 13510)
+++ trunk/docs/common-resources/en/src/main/xslt/xhtml-common-reldiffmk.xsl 2009-04-10 17:39:37 UTC (rev 13511)
@@ -9,72 +9,17 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:diffmk="http://diffmk.sf.net/ns/diff" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date">
<xsl:import href="collapsing-navigation.xsl"/>
+ <xsl:import href="xhtml-common.xsl"/>
<xsl:param name="generate.toc" select="'book toc'"/>
<xsl:param name="toc.section.depth" select="5"/>
- <!--
+
+<!--
From: xhtml/docbook.xsl
Reason: Remove inline style for draft mode
Version: 1.72.0
-->
-<xsl:template name="head.content">
- <xsl:param name="node" select="."/>
- <xsl:param name="title">
- <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/>
- </xsl:param>
- <title xmlns="http://www.w3.org/1999/xhtml" >
- <xsl:copy-of select="$title"/>
- </title>
-
- <xsl:if test="$html.stylesheet != ''">
- <xsl:call-template name="output.html.stylesheets">
- <xsl:with-param name="stylesheets" select="normalize-space($html.stylesheet)"/>
- </xsl:call-template>
- </xsl:if>
-
- <xsl:if test="$link.mailto.url != ''">
- <link rev="made" href="{$link.mailto.url}"/>
- </xsl:if>
-
- <xsl:if test="$html.base != ''">
- <base href="{$html.base}"/>
- </xsl:if>
-
- <meta xmlns="http://www.w3.org/1999/xhtml" name="generator" content="DocBook {$DistroTitle} V{$VERSION}"/>
-
- <xsl:if test="$generate.meta.abstract != 0">
- <xsl:variable name="info" select="(articleinfo |bookinfo |prefaceinfo |chapterinfo |appendixinfo |sectioninfo |sect1info |sect2info |sect3info |sect4info |sect5info |referenceinfo |refentryinfo |partinfo |info |docinfo)[1]"/>
- <xsl:if test="$info and $info/abstract">
- <meta xmlns="http://www.w3.org/1999/xhtml" name="description">
- <xsl:attribute name="content">
- <xsl:for-each select="$info/abstract[1]/*">
- <xsl:value-of select="normalize-space(.)"/>
- <xsl:if test="position() < last()">
- <xsl:text> </xsl:text>
- </xsl:if>
- </xsl:for-each>
- </xsl:attribute>
- </meta>
- </xsl:if>
- </xsl:if>
-
- <link rel="shortcut icon" type="image/vnd.microsoft.icon" href="images/favicon.ico" />
-
- <xsl:apply-templates select="." mode="head.keywords.content"/>
- <script type="text/javascript" src="script/prototype-1.6.0.2.js"><xsl:comment>If you see this message, your web browser doesn't support JavaScript or JavaScript is disabled.</xsl:comment></script>
- <script type="text/javascript" src="script/effects.js"><xsl:comment>If you see this message, your web browser doesn't support JavaScript or JavaScript is disabled.</xsl:comment></script>
- <script type="text/javascript" src="script/scriptaculous.js"><xsl:comment>If you see this message, your web browser doesn't support JavaScript or JavaScript is disabled.</xsl:comment></script>
-
-</xsl:template>
-
-<xsl:template match="abstract" mode="titlepage.mode">
- <div>
- <xsl:apply-templates select="." mode="class.attribute"/>
- <xsl:apply-templates mode="titlepage.mode"/>
- </div>
-</xsl:template>
-
<!-- Overriding toc.line -->
<xsl:template name="toc.line">
<xsl:param name="toc-context" select="."/>
@@ -139,7 +84,8 @@
</a>
</span>
</xsl:template>
- <!-- XHTML and PDF -->
+
+ <!-- XHTML -->
<xsl:template match="//diffmk:wrapper">
<xsl:choose>
Modified: trunk/docs/common-resources/en/src/main/xslt/xhtml-common.xsl
===================================================================
--- trunk/docs/common-resources/en/src/main/xslt/xhtml-common.xsl 2009-04-10 17:21:12 UTC (rev 13510)
+++ trunk/docs/common-resources/en/src/main/xslt/xhtml-common.xsl 2009-04-10 17:39:37 UTC (rev 13511)
@@ -62,14 +62,8 @@
</meta>
</xsl:if>
</xsl:if>
-
<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="images/favicon.ico" />
-
<xsl:apply-templates select="." mode="head.keywords.content"/>
- <!--script type="text/javascript" src="script/prototype-1.6.0.2.js"><xsl:comment>If you see this message, your web browser doesn't support JavaScript or JavaScript is disabled.</xsl:comment></script>
- <script type="text/javascript" src="script/effects.js"><xsl:comment>If you see this message, your web browser doesn't support JavaScript or JavaScript is disabled.</xsl:comment></script>
- <script type="text/javascript" src="script/scriptaculous.js"><xsl:comment>If you see this message, your web browser doesn't support JavaScript or JavaScript is disabled.</xsl:comment></script-->
-
</xsl:template>
<xsl:template match="abstract" mode="titlepage.mode">
@@ -161,4 +155,306 @@
</a>
</div-->
</xsl:template>
+
+<xsl:template name="navig.content">
+ <xsl:param name="direction" select="next"/>
+ <xsl:variable name="navtext">
+ <xsl:choose>
+ <xsl:when test="$direction = 'prev'">
+ <xsl:call-template name="gentext.nav.prev"/>
+ </xsl:when>
+ <xsl:when test="$direction = 'next'">
+ <xsl:call-template name="gentext.nav.next"/>
+ </xsl:when>
+ <xsl:when test="$direction = 'up'">
+ <xsl:call-template name="gentext.nav.up"/>
+ </xsl:when>
+ <xsl:when test="$direction = 'home'">
+ <xsl:call-template name="gentext.nav.home"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>xxx</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$navig.graphics != 0">
+ <img>
+ <xsl:attribute name="src">
+ <xsl:value-of select="$navig.graphics.path"/>
+ <xsl:value-of select="$direction"/>
+ <xsl:value-of select="$navig.graphics.extension"/>
+ </xsl:attribute>
+ <xsl:attribute name="alt">
+ <xsl:value-of select="$navtext"/>
+ </xsl:attribute>
+ </img>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$navtext"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="header.navigation.multiPage">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+ <xsl:param name="nav.context"/>
+ <xsl:param name="nightly" select="0"/>
+ <xsl:variable name="home" select="/*[1]"/>
+ <xsl:variable name="up" select="parent::*"/>
+ <xsl:variable name="row1" select="$navig.showtitles != 0"/>
+ <xsl:variable name="row2" select="count($prev) > 0 or (count($up) > 0 and generate-id($up) != generate-id($home) and $navig.showtitles != 0) or count($next) > 0"/>
+ <xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0'">
+ <xsl:if test="$row1 or $row2">
+ <xsl:if test="$row1">
+ <xsl:if test="$nightly > 0">
+ <div id="overlay">
+ <xsl:text> </xsl:text>
+ </div>
+ </xsl:if>
+ <!-- FEEDBACK -->
+ <xsl:call-template name="feedback" />
+
+ <p xmlns="http://www.w3.org/1999/xhtml">
+ <xsl:attribute name="id">
+ <xsl:text>title</xsl:text>
+ </xsl:attribute>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$siteHref" />
+ </xsl:attribute>
+ <xsl:attribute name="class">
+ <xsl:text>site_href</xsl:text>
+ </xsl:attribute>
+ <strong>
+ <xsl:value-of select="$siteLinkText"/>
+ </strong>
+ </a>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$docHref" />
+ </xsl:attribute>
+ <xsl:attribute name="class">
+ <xsl:text>doc_href</xsl:text>
+ </xsl:attribute>
+ <strong>
+ <xsl:value-of select="$docLinkText"/>
+ </strong>
+ </a>
+ </p>
+ </xsl:if>
+ <xsl:if test="$row2">
+ <ul class="docnav" xmlns="http://www.w3.org/1999/xhtml">
+ <li class="previous">
+ <xsl:if test="count($prev)>0">
+ <a accesskey="p">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$prev"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <strong>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'prev'"/>
+ </xsl:call-template>
+ </strong>
+ </a>
+ </xsl:if>
+ </li>
+ <li class="next">
+ <xsl:if test="count($next)>0">
+ <a accesskey="n">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$next"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <strong>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'next'"/>
+ </xsl:call-template>
+ </strong>
+ </a>
+ </xsl:if>
+ </li>
+ </ul>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$header.rule != 0">
+ <hr/>
+ </xsl:if>
+ </xsl:if>
+</xsl:template>
+
+ <xsl:template name="book.titlepage.recto.singlePage">
+ <xsl:param name="nightly" select="0"/>
+ <xsl:if test="$nightly > 0">
+ <div id="overlay">
+ <xsl:text> </xsl:text>
+ </div>
+ </xsl:if>
+ <!-- FEEDBACK -->
+ <xsl:call-template name="feedback" />
+ <p xmlns="http://www.w3.org/1999/xhtml">
+ <xsl:attribute name="id">
+ <xsl:text>title</xsl:text>
+ </xsl:attribute>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$siteHref" />
+ </xsl:attribute>
+ <xsl:attribute name="class">
+ <xsl:text>site_href</xsl:text>
+ </xsl:attribute>
+ <strong>
+ <xsl:value-of select="$siteLinkText"/>
+ </strong>
+ </a>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="$docHref" />
+ </xsl:attribute>
+ <xsl:attribute name="class">
+ <xsl:text>doc_href</xsl:text>
+ </xsl:attribute>
+ <strong>
+ <xsl:value-of select="$docLinkText"/>
+ </strong>
+ </a>
+ </p>
+ <xsl:choose>
+ <xsl:when test="bookinfo/title">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
+ </xsl:when>
+ <xsl:when test="info/title">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
+ </xsl:when>
+ <xsl:when test="title">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="bookinfo/subtitle">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/othercredit"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/othercredit"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/releaseinfo"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/copyright"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/copyright"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/legalnotice"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/legalnotice"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/pubdate"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/pubdate"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revision"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revision"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revhistory"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revhistory"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/abstract"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/abstract"/>
+
+ </xsl:template>
+ <xsl:template name="chunkerdoc">
+ <xsl:param name="node" select="."/>
+
+ <xsl:choose>
+ <xsl:when test="not($node/parent::*)">1</xsl:when>
+ <xsl:when test="$node/parent::node()/processing-instruction('forseChanks') and local-name($node)!='title' and local-name($node)!='para' and local-name($node)='section'" >1</xsl:when>
+ <xsl:when test="local-name($node) = 'sect1'
+ and $chunk.section.depth >= 1
+ and ($chunk.first.sections != 0
+ or count($node/preceding-sibling::sect1) > 0)">
+ <xsl:text>1</xsl:text>
+ </xsl:when>
+ <xsl:when test="local-name($node) = 'sect2'
+ and $chunk.section.depth >= 2
+ and ($chunk.first.sections != 0
+ or count($node/preceding-sibling::sect2) > 0)">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="$node/parent::*"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="local-name($node) = 'sect3'
+ and $chunk.section.depth >= 3
+ and ($chunk.first.sections != 0
+ or count($node/preceding-sibling::sect3) > 0)">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="$node/parent::*"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="local-name($node) = 'sect4'
+ and $chunk.section.depth >= 4
+ and ($chunk.first.sections != 0
+ or count($node/preceding-sibling::sect4) > 0)">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="$node/parent::*"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="local-name($node) = 'sect5'
+ and $chunk.section.depth >= 5
+ and ($chunk.first.sections != 0
+ or count($node/preceding-sibling::sect5) > 0)">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="$node/parent::*"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="local-name($node) = 'section'
+ and $chunk.section.depth >= count($node/ancestor::section)+1
+ and ($chunk.first.sections != 0
+ or count($node/preceding-sibling::section) > 0)">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="$node/parent::*"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="local-name($node)='preface'">1</xsl:when>
+ <xsl:when test="local-name($node)='chapter'">1</xsl:when>
+ <xsl:when test="local-name($node)='appendix'">1</xsl:when>
+ <xsl:when test="local-name($node)='article'">1</xsl:when>
+ <xsl:when test="local-name($node)='part'">1</xsl:when>
+ <xsl:when test="local-name($node)='reference'">1</xsl:when>
+ <xsl:when test="local-name($node)='refentry'">1</xsl:when>
+ <xsl:when test="local-name($node)='index' and ($generate.index != 0 or count($node/*) > 0)
+ and (local-name($node/parent::*) = 'article'
+ or local-name($node/parent::*) = 'book'
+ or local-name($node/parent::*) = 'part'
+ )">1</xsl:when>
+ <xsl:when test="local-name($node)='bibliography'
+ and (local-name($node/parent::*) = 'article'
+ or local-name($node/parent::*) = 'book'
+ or local-name($node/parent::*) = 'part'
+ )">1</xsl:when>
+ <xsl:when test="local-name($node)='glossary'
+ and (local-name($node/parent::*) = 'article'
+ or local-name($node/parent::*) = 'book'
+ or local-name($node/parent::*) = 'part'
+ )">1</xsl:when>
+ <xsl:when test="local-name($node)='colophon'">1</xsl:when>
+ <xsl:when test="local-name($node)='book'">1</xsl:when>
+ <xsl:when test="local-name($node)='set'">1</xsl:when>
+ <xsl:when test="local-name($node)='setindex'">1</xsl:when>
+ <xsl:when test="local-name($node)='legalnotice'
+ and $generate.legalnotice.link != 0">1</xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
</xsl:stylesheet>
Modified: trunk/docs/common-resources/en/src/main/xslt/xhtml-diffmk.xsl
===================================================================
--- trunk/docs/common-resources/en/src/main/xslt/xhtml-diffmk.xsl 2009-04-10 17:21:12 UTC (rev 13510)
+++ trunk/docs/common-resources/en/src/main/xslt/xhtml-diffmk.xsl 2009-04-10 17:39:37 UTC (rev 13511)
@@ -8,182 +8,17 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:import href="classpath:/xslt/org/jboss/xhtml.xsl"/>
- <xsl:import href="xhtml-common-reldiffmk.xsl"/>
-
-<xsl:param name="chunk.fast" select="1"/>
- <xsl:param name="html.stylesheet" select="'css/html-release.css'"/>
-
-<xsl:template name="header.navigation">
- <xsl:param name="prev" select="/foo"/>
- <xsl:param name="next" select="/foo"/>
- <xsl:param name="nav.context"/>
- <xsl:variable name="home" select="/*[1]"/>
- <xsl:variable name="up" select="parent::*"/>
- <xsl:variable name="row1" select="$navig.showtitles != 0"/>
- <xsl:variable name="row2" select="count($prev) > 0 or (count($up) > 0 and generate-id($up) != generate-id($home) and $navig.showtitles != 0) or count($next) > 0"/>
- <xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0'">
- <xsl:if test="$row1 or $row2">
- <xsl:if test="$row1">
- <div id="overlay">
- <xsl:text> </xsl:text>
- </div>
- <!-- FEEDBACK -->
- <xsl:call-template name="feedback" />
+ <xsl:import href="classpath:/xslt/org/jboss/xhtml.xsl"/>
+ <xsl:import href="xhtml-common-reldiffmk.xsl"/>
+
+ <xsl:param name="chunk.fast" select="1"/>
+ <xsl:param name="html.stylesheet" select="'css/html-release.css'"/>
+
+ <xsl:template name="header.navigation">
+ <xsl:call-template name="header.navigation.multiPage" />
+ </xsl:template>
+ <xsl:template name="chunk">
+ <xsl:call-template name="chunkerdoc" />
+ </xsl:template>
- <p xmlns="http://www.w3.org/1999/xhtml">
- <xsl:attribute name="id">
- <xsl:text>title</xsl:text>
- </xsl:attribute>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="$siteHref" />
- </xsl:attribute>
- <xsl:attribute name="class">
- <xsl:text>site_href</xsl:text>
- </xsl:attribute>
- <strong>
- <xsl:value-of select="$siteLinkText"/>
- </strong>
- </a>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="$docHref" />
- </xsl:attribute>
- <xsl:attribute name="class">
- <xsl:text>doc_href</xsl:text>
- </xsl:attribute>
- <strong>
- <xsl:value-of select="$docLinkText"/>
- </strong>
- </a>
- </p>
- </xsl:if>
- <xsl:if test="$row2">
- <ul class="docnav" xmlns="http://www.w3.org/1999/xhtml">
- <li class="previous">
- <xsl:if test="count($prev)>0">
- <a accesskey="p">
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="$prev"/>
- </xsl:call-template>
- </xsl:attribute>
- <strong>
- <xsl:call-template name="navig.content">
- <xsl:with-param name="direction" select="'prev'"/>
- </xsl:call-template>
- </strong>
- </a>
- </xsl:if>
- </li>
- <li class="next">
- <xsl:if test="count($next)>0">
- <a accesskey="n">
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="$next"/>
- </xsl:call-template>
- </xsl:attribute>
- <strong>
- <xsl:call-template name="navig.content">
- <xsl:with-param name="direction" select="'next'"/>
- </xsl:call-template>
- </strong>
- </a>
- </xsl:if>
- </li>
- </ul>
- </xsl:if>
- </xsl:if>
- <xsl:if test="$header.rule != 0">
- <hr/>
- </xsl:if>
- </xsl:if>
-</xsl:template>
-
-<xsl:template name="chunk">
- <xsl:param name="node" select="."/>
-
- <xsl:choose>
- <xsl:when test="not($node/parent::*)">1</xsl:when>
- <xsl:when test="$node/parent::node()/processing-instruction('forseChanks') and local-name($node)!='title' and local-name($node)!='para' and local-name($node)='section'" >1</xsl:when>
- <xsl:when test="local-name($node) = 'sect1'
- and $chunk.section.depth >= 1
- and ($chunk.first.sections != 0
- or count($node/preceding-sibling::sect1) > 0)">
- <xsl:text>1</xsl:text>
- </xsl:when>
- <xsl:when test="local-name($node) = 'sect2'
- and $chunk.section.depth >= 2
- and ($chunk.first.sections != 0
- or count($node/preceding-sibling::sect2) > 0)">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="$node/parent::*"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="local-name($node) = 'sect3'
- and $chunk.section.depth >= 3
- and ($chunk.first.sections != 0
- or count($node/preceding-sibling::sect3) > 0)">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="$node/parent::*"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="local-name($node) = 'sect4'
- and $chunk.section.depth >= 4
- and ($chunk.first.sections != 0
- or count($node/preceding-sibling::sect4) > 0)">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="$node/parent::*"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="local-name($node) = 'sect5'
- and $chunk.section.depth >= 5
- and ($chunk.first.sections != 0
- or count($node/preceding-sibling::sect5) > 0)">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="$node/parent::*"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="local-name($node) = 'section'
- and $chunk.section.depth >= count($node/ancestor::section)+1
- and ($chunk.first.sections != 0
- or count($node/preceding-sibling::section) > 0)">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="$node/parent::*"/>
- </xsl:call-template>
- </xsl:when>
-
- <xsl:when test="local-name($node)='preface'">1</xsl:when>
- <xsl:when test="local-name($node)='chapter'">1</xsl:when>
- <xsl:when test="local-name($node)='appendix'">1</xsl:when>
- <xsl:when test="local-name($node)='article'">1</xsl:when>
- <xsl:when test="local-name($node)='part'">1</xsl:when>
- <xsl:when test="local-name($node)='reference'">1</xsl:when>
- <xsl:when test="local-name($node)='refentry'">1</xsl:when>
- <xsl:when test="local-name($node)='index' and ($generate.index != 0 or count($node/*) > 0)
- and (local-name($node/parent::*) = 'article'
- or local-name($node/parent::*) = 'book'
- or local-name($node/parent::*) = 'part'
- )">1</xsl:when>
- <xsl:when test="local-name($node)='bibliography'
- and (local-name($node/parent::*) = 'article'
- or local-name($node/parent::*) = 'book'
- or local-name($node/parent::*) = 'part'
- )">1</xsl:when>
- <xsl:when test="local-name($node)='glossary'
- and (local-name($node/parent::*) = 'article'
- or local-name($node/parent::*) = 'book'
- or local-name($node/parent::*) = 'part'
- )">1</xsl:when>
- <xsl:when test="local-name($node)='colophon'">1</xsl:when>
- <xsl:when test="local-name($node)='book'">1</xsl:when>
- <xsl:when test="local-name($node)='set'">1</xsl:when>
- <xsl:when test="local-name($node)='setindex'">1</xsl:when>
- <xsl:when test="local-name($node)='legalnotice'
- and $generate.legalnotice.link != 0">1</xsl:when>
- <xsl:otherwise>0</xsl:otherwise>
- </xsl:choose>
-</xsl:template>
</xsl:stylesheet>
Modified: trunk/docs/common-resources/en/src/main/xslt/xhtml-release.xsl
===================================================================
--- trunk/docs/common-resources/en/src/main/xslt/xhtml-release.xsl 2009-04-10 17:21:12 UTC (rev 13510)
+++ trunk/docs/common-resources/en/src/main/xslt/xhtml-release.xsl 2009-04-10 17:39:37 UTC (rev 13511)
@@ -8,179 +8,17 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:import href="classpath:/xslt/org/jboss/xhtml.xsl"/>
- <xsl:import href="xhtml-common-reldiffmk.xsl"/>
-
-<xsl:param name="chunk.fast" select="1"/>
- <xsl:param name="html.stylesheet" select="'css/html-release.css'"/>
-
-<xsl:template name="header.navigation">
- <xsl:param name="prev" select="/foo"/>
- <xsl:param name="next" select="/foo"/>
- <xsl:param name="nav.context"/>
- <xsl:variable name="home" select="/*[1]"/>
- <xsl:variable name="up" select="parent::*"/>
- <xsl:variable name="row1" select="$navig.showtitles != 0"/>
- <xsl:variable name="row2" select="count($prev) > 0 or (count($up) > 0 and generate-id($up) != generate-id($home) and $navig.showtitles != 0) or count($next) > 0"/>
- <xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0'">
- <xsl:if test="$row1 or $row2">
- <xsl:if test="$row1">
- <!-- FEEDBACK -->
- <xsl:call-template name="feedback" />
+ <xsl:import href="classpath:/xslt/org/jboss/xhtml.xsl"/>
+ <xsl:import href="xhtml-common-reldiffmk.xsl"/>
+
+ <xsl:param name="chunk.fast" select="1"/>
+ <xsl:param name="html.stylesheet" select="'css/html-release.css'"/>
- <p xmlns="http://www.w3.org/1999/xhtml">
- <xsl:attribute name="id">
- <xsl:text>title</xsl:text>
- </xsl:attribute>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="$siteHref" />
- </xsl:attribute>
- <xsl:attribute name="class">
- <xsl:text>site_href</xsl:text>
- </xsl:attribute>
- <strong>
- <xsl:value-of select="$siteLinkText"/>
- </strong>
- </a>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="$docHref" />
- </xsl:attribute>
- <xsl:attribute name="class">
- <xsl:text>doc_href</xsl:text>
- </xsl:attribute>
- <strong>
- <xsl:value-of select="$docLinkText"/>
- </strong>
- </a>
- </p>
- </xsl:if>
- <xsl:if test="$row2">
- <ul class="docnav" xmlns="http://www.w3.org/1999/xhtml">
- <li class="previous">
- <xsl:if test="count($prev)>0">
- <a accesskey="p">
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="$prev"/>
- </xsl:call-template>
- </xsl:attribute>
- <strong>
- <xsl:call-template name="navig.content">
- <xsl:with-param name="direction" select="'prev'"/>
- </xsl:call-template>
- </strong>
- </a>
- </xsl:if>
- </li>
- <li class="next">
- <xsl:if test="count($next)>0">
- <a accesskey="n">
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="$next"/>
- </xsl:call-template>
- </xsl:attribute>
- <strong>
- <xsl:call-template name="navig.content">
- <xsl:with-param name="direction" select="'next'"/>
- </xsl:call-template>
- </strong>
- </a>
- </xsl:if>
- </li>
- </ul>
- </xsl:if>
- </xsl:if>
- <xsl:if test="$header.rule != 0">
- <hr/>
- </xsl:if>
- </xsl:if>
-</xsl:template>
+ <xsl:template name="header.navigation">
+ <xsl:call-template name="header.navigation.multiPage" />
+ </xsl:template>
+ <xsl:template name="chunk">
+ <xsl:call-template name="chunkerdoc" />
+ </xsl:template>
-<xsl:template name="chunk">
- <xsl:param name="node" select="."/>
-
- <xsl:choose>
- <xsl:when test="not($node/parent::*)">1</xsl:when>
- <xsl:when test="$node/parent::node()/processing-instruction('forseChanks') and local-name($node)!='title' and local-name($node)!='para' and local-name($node)='section'" >1</xsl:when>
- <xsl:when test="local-name($node) = 'sect1'
- and $chunk.section.depth >= 1
- and ($chunk.first.sections != 0
- or count($node/preceding-sibling::sect1) > 0)">
- <xsl:text>1</xsl:text>
- </xsl:when>
- <xsl:when test="local-name($node) = 'sect2'
- and $chunk.section.depth >= 2
- and ($chunk.first.sections != 0
- or count($node/preceding-sibling::sect2) > 0)">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="$node/parent::*"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="local-name($node) = 'sect3'
- and $chunk.section.depth >= 3
- and ($chunk.first.sections != 0
- or count($node/preceding-sibling::sect3) > 0)">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="$node/parent::*"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="local-name($node) = 'sect4'
- and $chunk.section.depth >= 4
- and ($chunk.first.sections != 0
- or count($node/preceding-sibling::sect4) > 0)">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="$node/parent::*"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="local-name($node) = 'sect5'
- and $chunk.section.depth >= 5
- and ($chunk.first.sections != 0
- or count($node/preceding-sibling::sect5) > 0)">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="$node/parent::*"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="local-name($node) = 'section'
- and $chunk.section.depth >= count($node/ancestor::section)+1
- and ($chunk.first.sections != 0
- or count($node/preceding-sibling::section) > 0)">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="$node/parent::*"/>
- </xsl:call-template>
- </xsl:when>
-
- <xsl:when test="local-name($node)='preface'">1</xsl:when>
- <xsl:when test="local-name($node)='chapter'">1</xsl:when>
- <xsl:when test="local-name($node)='appendix'">1</xsl:when>
- <xsl:when test="local-name($node)='article'">1</xsl:when>
- <xsl:when test="local-name($node)='part'">1</xsl:when>
- <xsl:when test="local-name($node)='reference'">1</xsl:when>
- <xsl:when test="local-name($node)='refentry'">1</xsl:when>
- <xsl:when test="local-name($node)='index' and ($generate.index != 0 or count($node/*) > 0)
- and (local-name($node/parent::*) = 'article'
- or local-name($node/parent::*) = 'book'
- or local-name($node/parent::*) = 'part'
- )">1</xsl:when>
- <xsl:when test="local-name($node)='bibliography'
- and (local-name($node/parent::*) = 'article'
- or local-name($node/parent::*) = 'book'
- or local-name($node/parent::*) = 'part'
- )">1</xsl:when>
- <xsl:when test="local-name($node)='glossary'
- and (local-name($node/parent::*) = 'article'
- or local-name($node/parent::*) = 'book'
- or local-name($node/parent::*) = 'part'
- )">1</xsl:when>
- <xsl:when test="local-name($node)='colophon'">1</xsl:when>
- <xsl:when test="local-name($node)='book'">1</xsl:when>
- <xsl:when test="local-name($node)='set'">1</xsl:when>
- <xsl:when test="local-name($node)='setindex'">1</xsl:when>
- <xsl:when test="local-name($node)='legalnotice'
- and $generate.legalnotice.link != 0">1</xsl:when>
- <xsl:otherwise>0</xsl:otherwise>
- </xsl:choose>
-</xsl:template>
</xsl:stylesheet>
Modified: trunk/docs/common-resources/en/src/main/xslt/xhtml-single-diffmk.xsl
===================================================================
--- trunk/docs/common-resources/en/src/main/xslt/xhtml-single-diffmk.xsl 2009-04-10 17:21:12 UTC (rev 13510)
+++ trunk/docs/common-resources/en/src/main/xslt/xhtml-single-diffmk.xsl 2009-04-10 17:39:37 UTC (rev 13511)
@@ -7,89 +7,11 @@
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
- <xsl:import href="classpath:/xslt/org/jboss/xhtml-single.xsl"/>
- <xsl:import href="xhtml-common-reldiffmk.xsl"/>
- <xsl:param name="html.stylesheet" select="'css/html-release.css'"/>
- <xsl:template name="book.titlepage.recto">
- <div id="overlay">
- <xsl:text> </xsl:text>
- </div>
- <!-- FEEDBACK -->
- <xsl:call-template name="feedback" />
- <p xmlns="http://www.w3.org/1999/xhtml">
- <xsl:attribute name="id">
- <xsl:text>title</xsl:text>
- </xsl:attribute>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="$siteHref" />
- </xsl:attribute>
- <xsl:attribute name="class">
- <xsl:text>site_href</xsl:text>
- </xsl:attribute>
- <strong>
- <xsl:value-of select="$siteLinkText"/>
- </strong>
- </a>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="$docHref" />
- </xsl:attribute>
- <xsl:attribute name="class">
- <xsl:text>doc_href</xsl:text>
- </xsl:attribute>
- <strong>
- <xsl:value-of select="$docLinkText"/>
- </strong>
- </a>
- </p>
- <xsl:choose>
- <xsl:when test="bookinfo/title">
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
- </xsl:when>
- <xsl:when test="info/title">
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
- </xsl:when>
- </xsl:choose>
-
- <xsl:choose>
- <xsl:when test="bookinfo/subtitle">
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
- </xsl:when>
- <xsl:when test="info/subtitle">
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
- </xsl:when>
- <xsl:when test="subtitle">
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
- </xsl:when>
- </xsl:choose>
-
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/othercredit"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/othercredit"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/releaseinfo"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/releaseinfo"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/copyright"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/copyright"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/legalnotice"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/legalnotice"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/pubdate"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/pubdate"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revision"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revision"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revhistory"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revhistory"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/abstract"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
+ <xsl:import href="classpath:/xslt/org/jboss/xhtml-single.xsl"/>
+ <xsl:import href="xhtml-common-reldiffmk.xsl"/>
+ <xsl:param name="html.stylesheet" select="'css/html-release.css'"/>
+
+ <xsl:template name="book.titlepage.recto">
+ <xsl:call-template name="book.titlepage.recto.singlePage" />
+ </xsl:template>
</xsl:stylesheet>
Modified: trunk/docs/common-resources/en/src/main/xslt/xhtml-single-release.xsl
===================================================================
--- trunk/docs/common-resources/en/src/main/xslt/xhtml-single-release.xsl 2009-04-10 17:21:12 UTC (rev 13510)
+++ trunk/docs/common-resources/en/src/main/xslt/xhtml-single-release.xsl 2009-04-10 17:39:37 UTC (rev 13511)
@@ -8,85 +8,13 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:import href="classpath:/xslt/org/jboss/xhtml-single.xsl"/>
- <xsl:import href="xhtml-common-reldiffmk.xsl"/>
- <xsl:param name="html.stylesheet" select="'css/html-release.css'"/>
- <xsl:template name="book.titlepage.recto">
- <!-- FEEDBACK -->
- <xsl:call-template name="feedback" />
- <p xmlns="http://www.w3.org/1999/xhtml">
- <xsl:attribute name="id">
- <xsl:text>title</xsl:text>
- </xsl:attribute>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="$siteHref" />
- </xsl:attribute>
- <xsl:attribute name="class">
- <xsl:text>site_href</xsl:text>
- </xsl:attribute>
- <strong>
- <xsl:value-of select="$siteLinkText"/>
- </strong>
- </a>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="$docHref" />
- </xsl:attribute>
- <xsl:attribute name="class">
- <xsl:text>doc_href</xsl:text>
- </xsl:attribute>
- <strong>
- <xsl:value-of select="$docLinkText"/>
- </strong>
- </a>
- </p>
- <xsl:choose>
- <xsl:when test="bookinfo/title">
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
- </xsl:when>
- <xsl:when test="info/title">
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
- </xsl:when>
- </xsl:choose>
+ <xsl:import href="classpath:/xslt/org/jboss/xhtml-single.xsl"/>
+ <xsl:import href="xhtml-common-reldiffmk.xsl"/>
- <xsl:choose>
- <xsl:when test="bookinfo/subtitle">
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
- </xsl:when>
- <xsl:when test="info/subtitle">
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
- </xsl:when>
- <xsl:when test="subtitle">
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
- </xsl:when>
- </xsl:choose>
+ <xsl:param name="html.stylesheet" select="'css/html-release.css'"/>
+
+ <xsl:template name="book.titlepage.recto">
+ <xsl:call-template name="book.titlepage.recto.singlePage" />
+ </xsl:template>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/othercredit"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/othercredit"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/releaseinfo"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/releaseinfo"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/copyright"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/copyright"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/legalnotice"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/legalnotice"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/pubdate"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/pubdate"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revision"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revision"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revhistory"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revhistory"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/abstract"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/abstract"/>
-</xsl:template>
-
</xsl:stylesheet>
Modified: trunk/docs/common-resources/en/src/main/xslt/xhtml-single.xsl
===================================================================
--- trunk/docs/common-resources/en/src/main/xslt/xhtml-single.xsl 2009-04-10 17:21:12 UTC (rev 13510)
+++ trunk/docs/common-resources/en/src/main/xslt/xhtml-single.xsl 2009-04-10 17:39:37 UTC (rev 13511)
@@ -13,84 +13,9 @@
<xsl:param name="html.stylesheet" select="'css/html.css'"/>
<xsl:template name="book.titlepage.recto">
- <div id="overlay">
- <xsl:text> </xsl:text>
- </div>
- <!-- FEEDBACK -->
- <xsl:call-template name="feedback" />
- <p xmlns="http://www.w3.org/1999/xhtml">
- <xsl:attribute name="id">
- <xsl:text>title</xsl:text>
- </xsl:attribute>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="$siteHref" />
- </xsl:attribute>
- <xsl:attribute name="class">
- <xsl:text>site_href</xsl:text>
- </xsl:attribute>
- <strong>
- <xsl:value-of select="$siteLinkText"/>
- </strong>
- </a>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="$docHref" />
- </xsl:attribute>
- <xsl:attribute name="class">
- <xsl:text>doc_href</xsl:text>
- </xsl:attribute>
- <strong>
- <xsl:value-of select="$docLinkText"/>
- </strong>
- </a>
- </p>
- <xsl:choose>
- <xsl:when test="bookinfo/title">
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
- </xsl:when>
- <xsl:when test="info/title">
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
- </xsl:when>
- </xsl:choose>
-
- <xsl:choose>
- <xsl:when test="bookinfo/subtitle">
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
- </xsl:when>
- <xsl:when test="info/subtitle">
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
- </xsl:when>
- <xsl:when test="subtitle">
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
- </xsl:when>
- </xsl:choose>
-
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/othercredit"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/othercredit"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/releaseinfo"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/releaseinfo"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/copyright"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/copyright"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/legalnotice"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/legalnotice"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/pubdate"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/pubdate"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revision"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revision"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revhistory"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revhistory"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/abstract"/>
- <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/abstract"/>
+ <xsl:call-template name="book.titlepage.recto.singlePage">
+ <xsl:with-param name="nightly" select="1" />
+ </xsl:call-template>
</xsl:template>
</xsl:stylesheet>
Modified: trunk/docs/common-resources/en/src/main/xslt/xhtml.xsl
===================================================================
--- trunk/docs/common-resources/en/src/main/xslt/xhtml.xsl 2009-04-10 17:21:12 UTC (rev 13510)
+++ trunk/docs/common-resources/en/src/main/xslt/xhtml.xsl 2009-04-10 17:39:37 UTC (rev 13511)
@@ -8,182 +8,19 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:import href="classpath:/xslt/org/jboss/xhtml.xsl"/>
- <xsl:import href="xhtml-common.xsl"/>
-
-<xsl:param name="chunk.fast" select="1"/>
-<xsl:param name="html.stylesheet" select="'css/html.css'"/>
-
-<xsl:template name="header.navigation">
- <xsl:param name="prev" select="/foo"/>
- <xsl:param name="next" select="/foo"/>
- <xsl:param name="nav.context"/>
- <xsl:variable name="home" select="/*[1]"/>
- <xsl:variable name="up" select="parent::*"/>
- <xsl:variable name="row1" select="$navig.showtitles != 0"/>
- <xsl:variable name="row2" select="count($prev) > 0 or (count($up) > 0 and generate-id($up) != generate-id($home) and $navig.showtitles != 0) or count($next) > 0"/>
- <xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0'">
- <xsl:if test="$row1 or $row2">
- <xsl:if test="$row1">
- <div id="overlay">
- <xsl:text> </xsl:text>
- </div>
- <!-- FEEDBACK -->
- <xsl:call-template name="feedback" />
+ <xsl:import href="classpath:/xslt/org/jboss/xhtml.xsl"/>
+ <xsl:import href="xhtml-common.xsl"/>
+
+ <xsl:param name="chunk.fast" select="1"/>
+ <xsl:param name="html.stylesheet" select="'css/html.css'"/>
+
+ <xsl:template name="header.navigation">
+ <xsl:call-template name="header.navigation.multiPage">
+ <xsl:with-param name="nightly" select="1" />
+ </xsl:call-template>
+ </xsl:template>
+ <xsl:template name="chunk">
+ <xsl:call-template name="chunkerdoc" />
+ </xsl:template>
- <p xmlns="http://www.w3.org/1999/xhtml">
- <xsl:attribute name="id">
- <xsl:text>title</xsl:text>
- </xsl:attribute>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="$siteHref" />
- </xsl:attribute>
- <xsl:attribute name="class">
- <xsl:text>site_href</xsl:text>
- </xsl:attribute>
- <strong>
- <xsl:value-of select="$siteLinkText"/>
- </strong>
- </a>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="$docHref" />
- </xsl:attribute>
- <xsl:attribute name="class">
- <xsl:text>doc_href</xsl:text>
- </xsl:attribute>
- <strong>
- <xsl:value-of select="$docLinkText"/>
- </strong>
- </a>
- </p>
- </xsl:if>
- <xsl:if test="$row2">
- <ul class="docnav" xmlns="http://www.w3.org/1999/xhtml">
- <li class="previous">
- <xsl:if test="count($prev)>0">
- <a accesskey="p">
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="$prev"/>
- </xsl:call-template>
- </xsl:attribute>
- <strong>
- <xsl:call-template name="navig.content">
- <xsl:with-param name="direction" select="'prev'"/>
- </xsl:call-template>
- </strong>
- </a>
- </xsl:if>
- </li>
- <li class="next">
- <xsl:if test="count($next)>0">
- <a accesskey="n">
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="object" select="$next"/>
- </xsl:call-template>
- </xsl:attribute>
- <strong>
- <xsl:call-template name="navig.content">
- <xsl:with-param name="direction" select="'next'"/>
- </xsl:call-template>
- </strong>
- </a>
- </xsl:if>
- </li>
- </ul>
- </xsl:if>
- </xsl:if>
- <xsl:if test="$header.rule != 0">
- <hr/>
- </xsl:if>
- </xsl:if>
-</xsl:template>
-
-<xsl:template name="chunk">
- <xsl:param name="node" select="."/>
-
- <xsl:choose>
- <xsl:when test="not($node/parent::*)">1</xsl:when>
- <xsl:when test="$node/parent::node()/processing-instruction('forseChanks') and local-name($node)!='title' and local-name($node)!='para' and local-name($node)='section'" >1</xsl:when>
- <xsl:when test="local-name($node) = 'sect1'
- and $chunk.section.depth >= 1
- and ($chunk.first.sections != 0
- or count($node/preceding-sibling::sect1) > 0)">
- <xsl:text>1</xsl:text>
- </xsl:when>
- <xsl:when test="local-name($node) = 'sect2'
- and $chunk.section.depth >= 2
- and ($chunk.first.sections != 0
- or count($node/preceding-sibling::sect2) > 0)">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="$node/parent::*"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="local-name($node) = 'sect3'
- and $chunk.section.depth >= 3
- and ($chunk.first.sections != 0
- or count($node/preceding-sibling::sect3) > 0)">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="$node/parent::*"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="local-name($node) = 'sect4'
- and $chunk.section.depth >= 4
- and ($chunk.first.sections != 0
- or count($node/preceding-sibling::sect4) > 0)">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="$node/parent::*"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="local-name($node) = 'sect5'
- and $chunk.section.depth >= 5
- and ($chunk.first.sections != 0
- or count($node/preceding-sibling::sect5) > 0)">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="$node/parent::*"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="local-name($node) = 'section'
- and $chunk.section.depth >= count($node/ancestor::section)+1
- and ($chunk.first.sections != 0
- or count($node/preceding-sibling::section) > 0)">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="$node/parent::*"/>
- </xsl:call-template>
- </xsl:when>
-
- <xsl:when test="local-name($node)='preface'">1</xsl:when>
- <xsl:when test="local-name($node)='chapter'">1</xsl:when>
- <xsl:when test="local-name($node)='appendix'">1</xsl:when>
- <xsl:when test="local-name($node)='article'">1</xsl:when>
- <xsl:when test="local-name($node)='part'">1</xsl:when>
- <xsl:when test="local-name($node)='reference'">1</xsl:when>
- <xsl:when test="local-name($node)='refentry'">1</xsl:when>
- <xsl:when test="local-name($node)='index' and ($generate.index != 0 or count($node/*) > 0)
- and (local-name($node/parent::*) = 'article'
- or local-name($node/parent::*) = 'book'
- or local-name($node/parent::*) = 'part'
- )">1</xsl:when>
- <xsl:when test="local-name($node)='bibliography'
- and (local-name($node/parent::*) = 'article'
- or local-name($node/parent::*) = 'book'
- or local-name($node/parent::*) = 'part'
- )">1</xsl:when>
- <xsl:when test="local-name($node)='glossary'
- and (local-name($node/parent::*) = 'article'
- or local-name($node/parent::*) = 'book'
- or local-name($node/parent::*) = 'part'
- )">1</xsl:when>
- <xsl:when test="local-name($node)='colophon'">1</xsl:when>
- <xsl:when test="local-name($node)='book'">1</xsl:when>
- <xsl:when test="local-name($node)='set'">1</xsl:when>
- <xsl:when test="local-name($node)='setindex'">1</xsl:when>
- <xsl:when test="local-name($node)='legalnotice'
- and $generate.legalnotice.link != 0">1</xsl:when>
- <xsl:otherwise>0</xsl:otherwise>
- </xsl:choose>
-</xsl:template>
</xsl:stylesheet>
15 years, 9 months
JBoss Rich Faces SVN: r13510 - in trunk/test-applications/realworld2/web/src/main: webapp/includes/fileUpload and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-04-10 13:21:12 -0400 (Fri, 10 Apr 2009)
New Revision: 13510
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/FileUploadManager.java
trunk/test-applications/realworld2/web/src/main/webapp/includes/fileUpload/fileUploader.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/fileUpload/uploadResult.xhtml
Log:
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java 2009-04-10 17:21:04 UTC (rev 13509)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java 2009-04-10 17:21:12 UTC (rev 13510)
@@ -87,6 +87,10 @@
model.resetModel(NavigationEnum.ALBUM_PREVIEW, album.getOwner(), album.getShelf(), album, null, album.getImages());
}
+ public void resetFileUpload(){
+ pushEvent(Constants.CLEAR_FILE_UPLOAD_EVENT);
+ }
+
public void showImage(Image image){
if(!canViewImage(image)){
pushEvent(Constants.ADD_ERROR_EVENT, Constants.HAVENT_ACCESS);
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/FileUploadManager.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/FileUploadManager.java 2009-04-10 17:21:04 UTC (rev 13509)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/FileUploadManager.java 2009-04-10 17:21:12 UTC (rev 13510)
@@ -78,11 +78,14 @@
return;
}
image.setAlbum(model.getSelectedAlbum());
- if(model.getSelectedAlbum() == null){
+ if(image.getAlbum() == null){
addError(item, image, Constants.NO_ALBUM_TO_DOWNLOAD_ERROR);
return;
}
try{
+ if(imageAction.isImageWithThisPathExist(image)){
+ image.setPath(generateNewPath(image.getPath()));
+ }
imageAction.addImage(image);
}catch(Exception e){
addError(item, image, Constants.IMAGE_SAVING_ERROR);
@@ -97,6 +100,10 @@
item.getFile().delete();
}
+ private String generateNewPath(String path) {
+ return fileManager.transformPath(path, "_1");
+ }
+
private void addError(UploadItem item, Image image, String error) {
fileWrapper.onFileUploadError(image, error);
item.getFile().delete();
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/fileUpload/fileUploader.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/fileUpload/uploadResult.xhtml
===================================================================
(Binary files differ)
15 years, 9 months
JBoss Rich Faces SVN: r13509 - in trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld: service and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-04-10 13:21:04 -0400 (Fri, 10 Apr 2009)
New Revision: 13509
Added:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/RealworldException.java
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java
Log:
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java 2009-04-10 16:55:00 UTC (rev 13508)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java 2009-04-10 17:21:04 UTC (rev 13509)
@@ -47,6 +47,7 @@
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
+import javax.persistence.UniqueConstraint;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotEmpty;
@@ -69,8 +70,12 @@
@NamedQuery(
name = "user-shelves",
query = "select distinct s from Shelf s where (s.shared = true and s.preDefined = true) or s.owner = :user order by s.name"
- ),
+ ),
@NamedQuery(
+ name = "image-exist",
+ query = "from Image i where i.path = :path and i.album = :album"
+ ),
+ @NamedQuery(
name = "tag-suggest",
query = "select m from MetaTag m where lower(m.tag) like :tag"
)
@@ -85,7 +90,9 @@
@Entity
@Name("image")
-@Table(name = "Images")
+@Table(name = "Images", uniqueConstraints = {
+ @UniqueConstraint(columnNames = "path"),
+ })
@Scope(ScopeType.CONVERSATION)
@AutoCreate
public class Image implements Serializable {
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java 2009-04-10 16:55:00 UTC (rev 13508)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java 2009-04-10 17:21:04 UTC (rev 13509)
@@ -50,10 +50,15 @@
* @param album - album to add
*/
public void addAlbum(Album album) {
+ try{
em.persist(album);
//Add to shelf
album.getShelf().addAlbum(album);
em.flush();
+ }
+ catch(Exception e){
+ throw new RealworldException(e.getMessage());
+ }
}
/**
@@ -61,6 +66,7 @@
* @param album - album to delete
*/
public void deleteAlbum(Album album){
+ try{
if(album.getShelf() == null){
return;
}
@@ -68,6 +74,10 @@
album.getShelf().removeAlbum(album);
em.remove(album);
em.flush();
+ }
+ catch(Exception e){
+ throw new RealworldException(e.getMessage());
+ }
}
/**
@@ -75,6 +85,11 @@
* @param album - album to Synchronize
*/
public void editAlbum(Album album){
+ try{
em.flush();
+ }
+ catch(Exception e){
+ throw new RealworldException(e.getMessage());
+ }
}
}
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java 2009-04-10 16:55:00 UTC (rev 13508)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java 2009-04-10 17:21:04 UTC (rev 13509)
@@ -160,6 +160,8 @@
public static final String SEARCH_ALBUM_QUERY = "from Album a where lower(a.name) like :name or lower(a.description) like :name";
public static final String USER_SHELVES_QUERY = "user-shelves";
public static final String SHELF_PARAMETER = "shelf";
+ public static final String PATH_PARAMETER = "path";
+ public static final String IMAGE_PATH_EXIST_QUERY = "image-exist";
private Constants(){
}
}
\ No newline at end of file
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java 2009-04-10 16:55:00 UTC (rev 13508)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java 2009-04-10 17:21:04 UTC (rev 13509)
@@ -53,4 +53,6 @@
public List<MetaTag> getTagsLikeString(String suggest);
+ public boolean isImageWithThisPathExist(Image image);
+
}
\ No newline at end of file
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2009-04-10 16:55:00 UTC (rev 13508)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2009-04-10 17:21:04 UTC (rev 13509)
@@ -54,12 +54,17 @@
* @param image - image to delete
*/
public void deleteImage(Image image) {
+ try{
if(image.getAlbum().getCoveringImage().equals(image)){
image.getAlbum().setCoveringImage(null);
}
image.getAlbum().removeImage(image);
em.remove(image);
em.flush();
+ }
+ catch(Exception e){
+ throw new RealworldException(e.getMessage());
+ }
}
/**
@@ -68,6 +73,7 @@
* @param metatagsChanged - boolean value, that indicates is metatags of this image were changed(add new or delete older)
*/
public void editImage(Image image, boolean metatagsChanged) {
+ try{
if(metatagsChanged){
//Create cash of metatags early associated with image
List<MetaTag> removals = new ArrayList<MetaTag>(image.getImageTags());
@@ -116,6 +122,10 @@
}
}
em.flush();
+ }
+ catch(Exception e){
+ throw new RealworldException(e.getMessage());
+ }
}
/**
@@ -123,9 +133,14 @@
* @param image - image to add
*/
public void addImage(Image image) {
- em.persist(image);
- image.getAlbum().addImage(image);
- em.flush();
+ try{
+ em.persist(image);
+ image.getAlbum().addImage(image);
+ em.flush();
+ }
+ catch(Exception e){
+ throw new RealworldException(e.getMessage());
+ }
}
/**
@@ -133,8 +148,13 @@
* @param comment - comment to remove
*/
public void deleteComment(Comment comment) {
- comment.getImage().removeComment(comment);
- em.flush();
+ try{
+ comment.getImage().removeComment(comment);
+ em.flush();
+ }
+ catch(Exception e){
+ throw new RealworldException(e.getMessage());
+ }
}
/**
@@ -142,8 +162,13 @@
* @param comment - comment to add
*/
public void addComment(Comment comment) {
- comment.getImage().addComment(comment);
- em.flush();
+ try{
+ comment.getImage().addComment(comment);
+ em.flush();
+ }
+ catch(Exception e){
+ throw new RealworldException(e.getMessage());
+ }
}
/**
@@ -180,4 +205,15 @@
public List<MetaTag> getTagsLikeString(String suggest) {
return (List<MetaTag>) em.createNamedQuery(Constants.TAG_SUGGEST_QUERY).setParameter(Constants.TAG_PARAMETER, suggest + Constants.PERCENT).getResultList();
}
+
+ /**
+ * Check if image with specified path already exist
+ * @return is image with specified path already exist
+ */
+ public boolean isImageWithThisPathExist(Image image) {
+ return em.createNamedQuery(Constants.IMAGE_PATH_EXIST_QUERY)
+ .setParameter(Constants.PATH_PARAMETER, image.getPath())
+ .setParameter(Constants.ALBUM_PARAMETER, image.getAlbum())
+ .getResultList().size() != 0;
+ }
}
Added: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/RealworldException.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/RealworldException.java (rev 0)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/RealworldException.java 2009-04-10 17:21:04 UTC (rev 13509)
@@ -0,0 +1,23 @@
+package org.richfaces.realworld.service;
+
+import org.jboss.seam.annotations.ApplicationException;
+
+@ApplicationException(rollback=false)
+public class RealworldException extends RuntimeException {
+
+ public RealworldException()
+ {
+ super();
+ }
+
+ public RealworldException(String message)
+ {
+ super(message);
+ }
+
+ public RealworldException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+}
+
Property changes on: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/RealworldException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java 2009-04-10 16:55:00 UTC (rev 13508)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java 2009-04-10 17:21:04 UTC (rev 13509)
@@ -56,10 +56,15 @@
* @param shelf - shelf to add
*/
public void addShelf(Shelf shelf) {
+ try{
em.persist(shelf);
//Add reference to user
user.addShelf(shelf);
em.flush();
+ }
+ catch(Exception e){
+ throw new RealworldException(e.getMessage());
+ }
}
/**
@@ -68,9 +73,14 @@
*/
public void deleteShelf(Shelf shelf) {
//Remove reference from user
+ try{
user.removeShelf(shelf);
em.remove(shelf);
em.flush();
+ }
+ catch(Exception e){
+ throw new RealworldException(e.getMessage());
+ }
}
/**
@@ -78,7 +88,12 @@
* @param shelf - shelf to Synchronize
*/
public void editShelf(Shelf shelf) {
+ try{
em.flush();
+ }
+ catch(Exception e){
+ throw new RealworldException(e.getMessage());
+ }
}
/**
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java 2009-04-10 16:55:00 UTC (rev 13508)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java 2009-04-10 17:21:04 UTC (rev 13509)
@@ -63,8 +63,13 @@
* @param user - user to register
*/
public void register(User user) {
+ try{
em.persist(user);
em.flush();
+ }
+ catch(Exception e){
+ throw new RealworldException(e.getMessage());
+ }
}
/**
@@ -72,7 +77,12 @@
* @return user if success
*/
public User updateUser() {
+ try{
em.flush();
+ }
+ catch(Exception e){
+ throw new RealworldException(e.getMessage());
+ }
return user;
}
15 years, 9 months
JBoss Rich Faces SVN: r13508 - in trunk/ui/editor/src: main/resources/org/richfaces and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-04-10 12:55:00 -0400 (Fri, 10 Apr 2009)
New Revision: 13508
Added:
trunk/ui/editor/src/main/resources/org/richfaces/convert/
trunk/ui/editor/src/main/resources/org/richfaces/convert/seamtext/
trunk/ui/editor/src/main/resources/org/richfaces/convert/seamtext/xhtml-entities-11.dtd
trunk/ui/editor/src/main/resources/org/richfaces/convert/seamtext/xhtml-lat1.ent
trunk/ui/editor/src/main/resources/org/richfaces/convert/seamtext/xhtml-special.ent
trunk/ui/editor/src/main/resources/org/richfaces/convert/seamtext/xhtml-symbol.ent
Modified:
trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/HtmlToSeamSAXParser.java
trunk/ui/editor/src/test/java/org/richfaces/seamparser/HtmlSeamParserTest.java
Log:
https://jira.jboss.org/jira/browse/RF-6725
Modified: trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/HtmlToSeamSAXParser.java
===================================================================
--- trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/HtmlToSeamSAXParser.java 2009-04-10 16:51:14 UTC (rev 13507)
+++ trunk/ui/editor/src/main/java/org/richfaces/convert/seamtext/HtmlToSeamSAXParser.java 2009-04-10 16:55:00 UTC (rev 13508)
@@ -1,7 +1,13 @@
package org.richfaces.convert.seamtext;
-import antlr.SemanticException;
-import antlr.Token;
+import java.io.IOException;
+import java.io.StringReader;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Stack;
+
+import org.ajax4jsf.resource.util.URLToStreamHelper;
import org.jboss.seam.text.SeamTextParser;
import org.richfaces.convert.seamtext.tags.HtmlTag;
import org.richfaces.convert.seamtext.tags.TagFactory;
@@ -12,11 +18,8 @@
import org.xml.sax.helpers.DefaultHandler;
import org.xml.sax.helpers.XMLReaderFactory;
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Stack;
+import antlr.SemanticException;
+import antlr.Token;
/**
@@ -49,6 +52,8 @@
final HtmlToSeamSAXParser parser = new HtmlToSeamSAXParser();
final XMLReader p = XMLReaderFactory.createXMLReader();
p.setContentHandler(parser);
+ p.setEntityResolver(parser);
+
try {
p.setFeature("http://xml.org/sax/features/namespaces", false);
p.setFeature("http://xml.org/sax/features/namespace-prefixes", false);
@@ -56,13 +61,60 @@
e.printStackTrace(); // TODO
}
final StringBuilder str = new StringBuilder(html.length() + 2*ROOT_TAG_NAME.length() + 5);
- str.append('<').append(ROOT_TAG_NAME).append('>').append(html).append("</").append(ROOT_TAG_NAME).append('>');
+ str.append("<!DOCTYPE " + ROOT_TAG_NAME + " PUBLIC \"RichFaces W3C xHTML 1.1 Entities\" \"xhtml-entities-11.dtd\"><").append(ROOT_TAG_NAME).append('>').append(html).append("</").append(ROOT_TAG_NAME).append('>');
+
p.parse(new InputSource(new StringReader(str.toString())));
return parser.getRootTag().toString();
}
+ private InputSource resolveClassloaderResource(String name) throws IOException {
+ URL result = null;
+
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+ if (classLoader != null) {
+ result = classLoader.getResource(name);
+ }
+
+ if (result == null) {
+ classLoader = getClass().getClassLoader();
+ if (classLoader != null) {
+ result = classLoader.getResource(name);
+ }
+ }
+
+ if (result != null) {
+ return new InputSource(URLToStreamHelper.urlToStream(result));
+ } else {
+ return null;
+ }
+ }
+
+ private static final String PACKAGE_NAME = "org/richfaces/convert/seamtext/";
+
+ private static final String XHTML_ENTITIES11_NAME = PACKAGE_NAME + "xhtml-entities-11.dtd";
+
+ private static final String W3ORG_ADDRESS = "http://www.w3.org/TR/xhtml1/DTD/";
+
+ public InputSource resolveEntity(String publicId, String systemId)
+ throws SAXException, IOException {
+
+ InputSource result = null;
+
+ if ("RichFaces W3C xHTML 1.1 Entities".equals(publicId)) {
+ result = resolveClassloaderResource(XHTML_ENTITIES11_NAME);
+ } else if (systemId.startsWith(W3ORG_ADDRESS)) {
+ result = resolveClassloaderResource(PACKAGE_NAME + systemId.substring(W3ORG_ADDRESS.length()));
+ }
+
+ if (result == null) {
+ result = super.resolveEntity(publicId, systemId);
+ }
+
+ return result;
+ }
+
@Override
public void startElement(String uri, String localName, String qName, Attributes attributes) {
if (!tagStack.isEmpty()){
@@ -234,4 +286,5 @@
public void setTransformer(HtmlToSeamTransformer transformer) {
this.transformer = transformer;
}
+
}
Added: trunk/ui/editor/src/main/resources/org/richfaces/convert/seamtext/xhtml-entities-11.dtd
===================================================================
--- trunk/ui/editor/src/main/resources/org/richfaces/convert/seamtext/xhtml-entities-11.dtd (rev 0)
+++ trunk/ui/editor/src/main/resources/org/richfaces/convert/seamtext/xhtml-entities-11.dtd 2009-04-10 16:55:00 UTC (rev 13508)
@@ -0,0 +1,14 @@
+<!ENTITY % HTMLlat1 PUBLIC
+ "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
+%HTMLlat1;
+
+<!ENTITY % HTMLsymbol PUBLIC
+ "-//W3C//ENTITIES Symbols for XHTML//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">
+%HTMLsymbol;
+
+<!ENTITY % HTMLspecial PUBLIC
+ "-//W3C//ENTITIES Special for XHTML//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
+%HTMLspecial;
Added: trunk/ui/editor/src/main/resources/org/richfaces/convert/seamtext/xhtml-lat1.ent
===================================================================
--- trunk/ui/editor/src/main/resources/org/richfaces/convert/seamtext/xhtml-lat1.ent (rev 0)
+++ trunk/ui/editor/src/main/resources/org/richfaces/convert/seamtext/xhtml-lat1.ent 2009-04-10 16:55:00 UTC (rev 13508)
@@ -0,0 +1,196 @@
+<!-- Portions (C) International Organization for Standardization 1986
+ Permission to copy in any form is granted for use with
+ conforming SGML systems and applications as defined in
+ ISO 8879, provided this notice is included in all copies.
+-->
+<!-- Character entity set. Typical invocation:
+ <!ENTITY % HTMLlat1 PUBLIC
+ "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
+ %HTMLlat1;
+-->
+
+<!ENTITY nbsp " "> <!-- no-break space = non-breaking space,
+ U+00A0 ISOnum -->
+<!ENTITY iexcl "¡"> <!-- inverted exclamation mark, U+00A1 ISOnum -->
+<!ENTITY cent "¢"> <!-- cent sign, U+00A2 ISOnum -->
+<!ENTITY pound "£"> <!-- pound sign, U+00A3 ISOnum -->
+<!ENTITY curren "¤"> <!-- currency sign, U+00A4 ISOnum -->
+<!ENTITY yen "¥"> <!-- yen sign = yuan sign, U+00A5 ISOnum -->
+<!ENTITY brvbar "¦"> <!-- broken bar = broken vertical bar,
+ U+00A6 ISOnum -->
+<!ENTITY sect "§"> <!-- section sign, U+00A7 ISOnum -->
+<!ENTITY uml "¨"> <!-- diaeresis = spacing diaeresis,
+ U+00A8 ISOdia -->
+<!ENTITY copy "©"> <!-- copyright sign, U+00A9 ISOnum -->
+<!ENTITY ordf "ª"> <!-- feminine ordinal indicator, U+00AA ISOnum -->
+<!ENTITY laquo "«"> <!-- left-pointing double angle quotation mark
+ = left pointing guillemet, U+00AB ISOnum -->
+<!ENTITY not "¬"> <!-- not sign = angled dash,
+ U+00AC ISOnum -->
+<!ENTITY shy "­"> <!-- soft hyphen = discretionary hyphen,
+ U+00AD ISOnum -->
+<!ENTITY reg "®"> <!-- registered sign = registered trade mark sign,
+ U+00AE ISOnum -->
+<!ENTITY macr "¯"> <!-- macron = spacing macron = overline
+ = APL overbar, U+00AF ISOdia -->
+<!ENTITY deg "°"> <!-- degree sign, U+00B0 ISOnum -->
+<!ENTITY plusmn "±"> <!-- plus-minus sign = plus-or-minus sign,
+ U+00B1 ISOnum -->
+<!ENTITY sup2 "²"> <!-- superscript two = superscript digit two
+ = squared, U+00B2 ISOnum -->
+<!ENTITY sup3 "³"> <!-- superscript three = superscript digit three
+ = cubed, U+00B3 ISOnum -->
+<!ENTITY acute "´"> <!-- acute accent = spacing acute,
+ U+00B4 ISOdia -->
+<!ENTITY micro "µ"> <!-- micro sign, U+00B5 ISOnum -->
+<!ENTITY para "¶"> <!-- pilcrow sign = paragraph sign,
+ U+00B6 ISOnum -->
+<!ENTITY middot "·"> <!-- middle dot = Georgian comma
+ = Greek middle dot, U+00B7 ISOnum -->
+<!ENTITY cedil "¸"> <!-- cedilla = spacing cedilla, U+00B8 ISOdia -->
+<!ENTITY sup1 "¹"> <!-- superscript one = superscript digit one,
+ U+00B9 ISOnum -->
+<!ENTITY ordm "º"> <!-- masculine ordinal indicator,
+ U+00BA ISOnum -->
+<!ENTITY raquo "»"> <!-- right-pointing double angle quotation mark
+ = right pointing guillemet, U+00BB ISOnum -->
+<!ENTITY frac14 "¼"> <!-- vulgar fraction one quarter
+ = fraction one quarter, U+00BC ISOnum -->
+<!ENTITY frac12 "½"> <!-- vulgar fraction one half
+ = fraction one half, U+00BD ISOnum -->
+<!ENTITY frac34 "¾"> <!-- vulgar fraction three quarters
+ = fraction three quarters, U+00BE ISOnum -->
+<!ENTITY iquest "¿"> <!-- inverted question mark
+ = turned question mark, U+00BF ISOnum -->
+<!ENTITY Agrave "À"> <!-- latin capital letter A with grave
+ = latin capital letter A grave,
+ U+00C0 ISOlat1 -->
+<!ENTITY Aacute "Á"> <!-- latin capital letter A with acute,
+ U+00C1 ISOlat1 -->
+<!ENTITY Acirc "Â"> <!-- latin capital letter A with circumflex,
+ U+00C2 ISOlat1 -->
+<!ENTITY Atilde "Ã"> <!-- latin capital letter A with tilde,
+ U+00C3 ISOlat1 -->
+<!ENTITY Auml "Ä"> <!-- latin capital letter A with diaeresis,
+ U+00C4 ISOlat1 -->
+<!ENTITY Aring "Å"> <!-- latin capital letter A with ring above
+ = latin capital letter A ring,
+ U+00C5 ISOlat1 -->
+<!ENTITY AElig "Æ"> <!-- latin capital letter AE
+ = latin capital ligature AE,
+ U+00C6 ISOlat1 -->
+<!ENTITY Ccedil "Ç"> <!-- latin capital letter C with cedilla,
+ U+00C7 ISOlat1 -->
+<!ENTITY Egrave "È"> <!-- latin capital letter E with grave,
+ U+00C8 ISOlat1 -->
+<!ENTITY Eacute "É"> <!-- latin capital letter E with acute,
+ U+00C9 ISOlat1 -->
+<!ENTITY Ecirc "Ê"> <!-- latin capital letter E with circumflex,
+ U+00CA ISOlat1 -->
+<!ENTITY Euml "Ë"> <!-- latin capital letter E with diaeresis,
+ U+00CB ISOlat1 -->
+<!ENTITY Igrave "Ì"> <!-- latin capital letter I with grave,
+ U+00CC ISOlat1 -->
+<!ENTITY Iacute "Í"> <!-- latin capital letter I with acute,
+ U+00CD ISOlat1 -->
+<!ENTITY Icirc "Î"> <!-- latin capital letter I with circumflex,
+ U+00CE ISOlat1 -->
+<!ENTITY Iuml "Ï"> <!-- latin capital letter I with diaeresis,
+ U+00CF ISOlat1 -->
+<!ENTITY ETH "Ð"> <!-- latin capital letter ETH, U+00D0 ISOlat1 -->
+<!ENTITY Ntilde "Ñ"> <!-- latin capital letter N with tilde,
+ U+00D1 ISOlat1 -->
+<!ENTITY Ograve "Ò"> <!-- latin capital letter O with grave,
+ U+00D2 ISOlat1 -->
+<!ENTITY Oacute "Ó"> <!-- latin capital letter O with acute,
+ U+00D3 ISOlat1 -->
+<!ENTITY Ocirc "Ô"> <!-- latin capital letter O with circumflex,
+ U+00D4 ISOlat1 -->
+<!ENTITY Otilde "Õ"> <!-- latin capital letter O with tilde,
+ U+00D5 ISOlat1 -->
+<!ENTITY Ouml "Ö"> <!-- latin capital letter O with diaeresis,
+ U+00D6 ISOlat1 -->
+<!ENTITY times "×"> <!-- multiplication sign, U+00D7 ISOnum -->
+<!ENTITY Oslash "Ø"> <!-- latin capital letter O with stroke
+ = latin capital letter O slash,
+ U+00D8 ISOlat1 -->
+<!ENTITY Ugrave "Ù"> <!-- latin capital letter U with grave,
+ U+00D9 ISOlat1 -->
+<!ENTITY Uacute "Ú"> <!-- latin capital letter U with acute,
+ U+00DA ISOlat1 -->
+<!ENTITY Ucirc "Û"> <!-- latin capital letter U with circumflex,
+ U+00DB ISOlat1 -->
+<!ENTITY Uuml "Ü"> <!-- latin capital letter U with diaeresis,
+ U+00DC ISOlat1 -->
+<!ENTITY Yacute "Ý"> <!-- latin capital letter Y with acute,
+ U+00DD ISOlat1 -->
+<!ENTITY THORN "Þ"> <!-- latin capital letter THORN,
+ U+00DE ISOlat1 -->
+<!ENTITY szlig "ß"> <!-- latin small letter sharp s = ess-zed,
+ U+00DF ISOlat1 -->
+<!ENTITY agrave "à"> <!-- latin small letter a with grave
+ = latin small letter a grave,
+ U+00E0 ISOlat1 -->
+<!ENTITY aacute "á"> <!-- latin small letter a with acute,
+ U+00E1 ISOlat1 -->
+<!ENTITY acirc "â"> <!-- latin small letter a with circumflex,
+ U+00E2 ISOlat1 -->
+<!ENTITY atilde "ã"> <!-- latin small letter a with tilde,
+ U+00E3 ISOlat1 -->
+<!ENTITY auml "ä"> <!-- latin small letter a with diaeresis,
+ U+00E4 ISOlat1 -->
+<!ENTITY aring "å"> <!-- latin small letter a with ring above
+ = latin small letter a ring,
+ U+00E5 ISOlat1 -->
+<!ENTITY aelig "æ"> <!-- latin small letter ae
+ = latin small ligature ae, U+00E6 ISOlat1 -->
+<!ENTITY ccedil "ç"> <!-- latin small letter c with cedilla,
+ U+00E7 ISOlat1 -->
+<!ENTITY egrave "è"> <!-- latin small letter e with grave,
+ U+00E8 ISOlat1 -->
+<!ENTITY eacute "é"> <!-- latin small letter e with acute,
+ U+00E9 ISOlat1 -->
+<!ENTITY ecirc "ê"> <!-- latin small letter e with circumflex,
+ U+00EA ISOlat1 -->
+<!ENTITY euml "ë"> <!-- latin small letter e with diaeresis,
+ U+00EB ISOlat1 -->
+<!ENTITY igrave "ì"> <!-- latin small letter i with grave,
+ U+00EC ISOlat1 -->
+<!ENTITY iacute "í"> <!-- latin small letter i with acute,
+ U+00ED ISOlat1 -->
+<!ENTITY icirc "î"> <!-- latin small letter i with circumflex,
+ U+00EE ISOlat1 -->
+<!ENTITY iuml "ï"> <!-- latin small letter i with diaeresis,
+ U+00EF ISOlat1 -->
+<!ENTITY eth "ð"> <!-- latin small letter eth, U+00F0 ISOlat1 -->
+<!ENTITY ntilde "ñ"> <!-- latin small letter n with tilde,
+ U+00F1 ISOlat1 -->
+<!ENTITY ograve "ò"> <!-- latin small letter o with grave,
+ U+00F2 ISOlat1 -->
+<!ENTITY oacute "ó"> <!-- latin small letter o with acute,
+ U+00F3 ISOlat1 -->
+<!ENTITY ocirc "ô"> <!-- latin small letter o with circumflex,
+ U+00F4 ISOlat1 -->
+<!ENTITY otilde "õ"> <!-- latin small letter o with tilde,
+ U+00F5 ISOlat1 -->
+<!ENTITY ouml "ö"> <!-- latin small letter o with diaeresis,
+ U+00F6 ISOlat1 -->
+<!ENTITY divide "÷"> <!-- division sign, U+00F7 ISOnum -->
+<!ENTITY oslash "ø"> <!-- latin small letter o with stroke,
+ = latin small letter o slash,
+ U+00F8 ISOlat1 -->
+<!ENTITY ugrave "ù"> <!-- latin small letter u with grave,
+ U+00F9 ISOlat1 -->
+<!ENTITY uacute "ú"> <!-- latin small letter u with acute,
+ U+00FA ISOlat1 -->
+<!ENTITY ucirc "û"> <!-- latin small letter u with circumflex,
+ U+00FB ISOlat1 -->
+<!ENTITY uuml "ü"> <!-- latin small letter u with diaeresis,
+ U+00FC ISOlat1 -->
+<!ENTITY yacute "ý"> <!-- latin small letter y with acute,
+ U+00FD ISOlat1 -->
+<!ENTITY thorn "þ"> <!-- latin small letter thorn,
+ U+00FE ISOlat1 -->
+<!ENTITY yuml "ÿ"> <!-- latin small letter y with diaeresis,
+ U+00FF ISOlat1 -->
Added: trunk/ui/editor/src/main/resources/org/richfaces/convert/seamtext/xhtml-special.ent
===================================================================
--- trunk/ui/editor/src/main/resources/org/richfaces/convert/seamtext/xhtml-special.ent (rev 0)
+++ trunk/ui/editor/src/main/resources/org/richfaces/convert/seamtext/xhtml-special.ent 2009-04-10 16:55:00 UTC (rev 13508)
@@ -0,0 +1,80 @@
+<!-- Special characters for XHTML -->
+
+<!-- Character entity set. Typical invocation:
+ <!ENTITY % HTMLspecial PUBLIC
+ "-//W3C//ENTITIES Special for XHTML//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
+ %HTMLspecial;
+-->
+
+<!-- Portions (C) International Organization for Standardization 1986:
+ Permission to copy in any form is granted for use with
+ conforming SGML systems and applications as defined in
+ ISO 8879, provided this notice is included in all copies.
+-->
+
+<!-- Relevant ISO entity set is given unless names are newly introduced.
+ New names (i.e., not in ISO 8879 list) do not clash with any
+ existing ISO 8879 entity names. ISO 10646 character numbers
+ are given for each character, in hex. values are decimal
+ conversions of the ISO 10646 values and refer to the document
+ character set. Names are Unicode names.
+-->
+
+<!-- C0 Controls and Basic Latin -->
+<!ENTITY quot """> <!-- quotation mark, U+0022 ISOnum -->
+<!ENTITY amp "&#38;"> <!-- ampersand, U+0026 ISOnum -->
+<!ENTITY lt "&#60;"> <!-- less-than sign, U+003C ISOnum -->
+<!ENTITY gt ">"> <!-- greater-than sign, U+003E ISOnum -->
+<!ENTITY apos "'"> <!-- apostrophe = APL quote, U+0027 ISOnum -->
+
+<!-- Latin Extended-A -->
+<!ENTITY OElig "Œ"> <!-- latin capital ligature OE,
+ U+0152 ISOlat2 -->
+<!ENTITY oelig "œ"> <!-- latin small ligature oe, U+0153 ISOlat2 -->
+<!-- ligature is a misnomer, this is a separate character in some languages -->
+<!ENTITY Scaron "Š"> <!-- latin capital letter S with caron,
+ U+0160 ISOlat2 -->
+<!ENTITY scaron "š"> <!-- latin small letter s with caron,
+ U+0161 ISOlat2 -->
+<!ENTITY Yuml "Ÿ"> <!-- latin capital letter Y with diaeresis,
+ U+0178 ISOlat2 -->
+
+<!-- Spacing Modifier Letters -->
+<!ENTITY circ "ˆ"> <!-- modifier letter circumflex accent,
+ U+02C6 ISOpub -->
+<!ENTITY tilde "˜"> <!-- small tilde, U+02DC ISOdia -->
+
+<!-- General Punctuation -->
+<!ENTITY ensp " "> <!-- en space, U+2002 ISOpub -->
+<!ENTITY emsp " "> <!-- em space, U+2003 ISOpub -->
+<!ENTITY thinsp " "> <!-- thin space, U+2009 ISOpub -->
+<!ENTITY zwnj "‌"> <!-- zero width non-joiner,
+ U+200C NEW RFC 2070 -->
+<!ENTITY zwj "‍"> <!-- zero width joiner, U+200D NEW RFC 2070 -->
+<!ENTITY lrm "‎"> <!-- left-to-right mark, U+200E NEW RFC 2070 -->
+<!ENTITY rlm "‏"> <!-- right-to-left mark, U+200F NEW RFC 2070 -->
+<!ENTITY ndash "–"> <!-- en dash, U+2013 ISOpub -->
+<!ENTITY mdash "—"> <!-- em dash, U+2014 ISOpub -->
+<!ENTITY lsquo "‘"> <!-- left single quotation mark,
+ U+2018 ISOnum -->
+<!ENTITY rsquo "’"> <!-- right single quotation mark,
+ U+2019 ISOnum -->
+<!ENTITY sbquo "‚"> <!-- single low-9 quotation mark, U+201A NEW -->
+<!ENTITY ldquo "“"> <!-- left double quotation mark,
+ U+201C ISOnum -->
+<!ENTITY rdquo "”"> <!-- right double quotation mark,
+ U+201D ISOnum -->
+<!ENTITY bdquo "„"> <!-- double low-9 quotation mark, U+201E NEW -->
+<!ENTITY dagger "†"> <!-- dagger, U+2020 ISOpub -->
+<!ENTITY Dagger "‡"> <!-- double dagger, U+2021 ISOpub -->
+<!ENTITY permil "‰"> <!-- per mille sign, U+2030 ISOtech -->
+<!ENTITY lsaquo "‹"> <!-- single left-pointing angle quotation mark,
+ U+2039 ISO proposed -->
+<!-- lsaquo is proposed but not yet ISO standardized -->
+<!ENTITY rsaquo "›"> <!-- single right-pointing angle quotation mark,
+ U+203A ISO proposed -->
+<!-- rsaquo is proposed but not yet ISO standardized -->
+
+<!-- Currency Symbols -->
+<!ENTITY euro "€"> <!-- euro sign, U+20AC NEW -->
Added: trunk/ui/editor/src/main/resources/org/richfaces/convert/seamtext/xhtml-symbol.ent
===================================================================
--- trunk/ui/editor/src/main/resources/org/richfaces/convert/seamtext/xhtml-symbol.ent (rev 0)
+++ trunk/ui/editor/src/main/resources/org/richfaces/convert/seamtext/xhtml-symbol.ent 2009-04-10 16:55:00 UTC (rev 13508)
@@ -0,0 +1,237 @@
+<!-- Mathematical, Greek and Symbolic characters for XHTML -->
+
+<!-- Character entity set. Typical invocation:
+ <!ENTITY % HTMLsymbol PUBLIC
+ "-//W3C//ENTITIES Symbols for XHTML//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">
+ %HTMLsymbol;
+-->
+
+<!-- Portions (C) International Organization for Standardization 1986:
+ Permission to copy in any form is granted for use with
+ conforming SGML systems and applications as defined in
+ ISO 8879, provided this notice is included in all copies.
+-->
+
+<!-- Relevant ISO entity set is given unless names are newly introduced.
+ New names (i.e., not in ISO 8879 list) do not clash with any
+ existing ISO 8879 entity names. ISO 10646 character numbers
+ are given for each character, in hex. values are decimal
+ conversions of the ISO 10646 values and refer to the document
+ character set. Names are Unicode names.
+-->
+
+<!-- Latin Extended-B -->
+<!ENTITY fnof "ƒ"> <!-- latin small letter f with hook = function
+ = florin, U+0192 ISOtech -->
+
+<!-- Greek -->
+<!ENTITY Alpha "Α"> <!-- greek capital letter alpha, U+0391 -->
+<!ENTITY Beta "Β"> <!-- greek capital letter beta, U+0392 -->
+<!ENTITY Gamma "Γ"> <!-- greek capital letter gamma,
+ U+0393 ISOgrk3 -->
+<!ENTITY Delta "Δ"> <!-- greek capital letter delta,
+ U+0394 ISOgrk3 -->
+<!ENTITY Epsilon "Ε"> <!-- greek capital letter epsilon, U+0395 -->
+<!ENTITY Zeta "Ζ"> <!-- greek capital letter zeta, U+0396 -->
+<!ENTITY Eta "Η"> <!-- greek capital letter eta, U+0397 -->
+<!ENTITY Theta "Θ"> <!-- greek capital letter theta,
+ U+0398 ISOgrk3 -->
+<!ENTITY Iota "Ι"> <!-- greek capital letter iota, U+0399 -->
+<!ENTITY Kappa "Κ"> <!-- greek capital letter kappa, U+039A -->
+<!ENTITY Lambda "Λ"> <!-- greek capital letter lamda,
+ U+039B ISOgrk3 -->
+<!ENTITY Mu "Μ"> <!-- greek capital letter mu, U+039C -->
+<!ENTITY Nu "Ν"> <!-- greek capital letter nu, U+039D -->
+<!ENTITY Xi "Ξ"> <!-- greek capital letter xi, U+039E ISOgrk3 -->
+<!ENTITY Omicron "Ο"> <!-- greek capital letter omicron, U+039F -->
+<!ENTITY Pi "Π"> <!-- greek capital letter pi, U+03A0 ISOgrk3 -->
+<!ENTITY Rho "Ρ"> <!-- greek capital letter rho, U+03A1 -->
+<!-- there is no Sigmaf, and no U+03A2 character either -->
+<!ENTITY Sigma "Σ"> <!-- greek capital letter sigma,
+ U+03A3 ISOgrk3 -->
+<!ENTITY Tau "Τ"> <!-- greek capital letter tau, U+03A4 -->
+<!ENTITY Upsilon "Υ"> <!-- greek capital letter upsilon,
+ U+03A5 ISOgrk3 -->
+<!ENTITY Phi "Φ"> <!-- greek capital letter phi,
+ U+03A6 ISOgrk3 -->
+<!ENTITY Chi "Χ"> <!-- greek capital letter chi, U+03A7 -->
+<!ENTITY Psi "Ψ"> <!-- greek capital letter psi,
+ U+03A8 ISOgrk3 -->
+<!ENTITY Omega "Ω"> <!-- greek capital letter omega,
+ U+03A9 ISOgrk3 -->
+
+<!ENTITY alpha "α"> <!-- greek small letter alpha,
+ U+03B1 ISOgrk3 -->
+<!ENTITY beta "β"> <!-- greek small letter beta, U+03B2 ISOgrk3 -->
+<!ENTITY gamma "γ"> <!-- greek small letter gamma,
+ U+03B3 ISOgrk3 -->
+<!ENTITY delta "δ"> <!-- greek small letter delta,
+ U+03B4 ISOgrk3 -->
+<!ENTITY epsilon "ε"> <!-- greek small letter epsilon,
+ U+03B5 ISOgrk3 -->
+<!ENTITY zeta "ζ"> <!-- greek small letter zeta, U+03B6 ISOgrk3 -->
+<!ENTITY eta "η"> <!-- greek small letter eta, U+03B7 ISOgrk3 -->
+<!ENTITY theta "θ"> <!-- greek small letter theta,
+ U+03B8 ISOgrk3 -->
+<!ENTITY iota "ι"> <!-- greek small letter iota, U+03B9 ISOgrk3 -->
+<!ENTITY kappa "κ"> <!-- greek small letter kappa,
+ U+03BA ISOgrk3 -->
+<!ENTITY lambda "λ"> <!-- greek small letter lamda,
+ U+03BB ISOgrk3 -->
+<!ENTITY mu "μ"> <!-- greek small letter mu, U+03BC ISOgrk3 -->
+<!ENTITY nu "ν"> <!-- greek small letter nu, U+03BD ISOgrk3 -->
+<!ENTITY xi "ξ"> <!-- greek small letter xi, U+03BE ISOgrk3 -->
+<!ENTITY omicron "ο"> <!-- greek small letter omicron, U+03BF NEW -->
+<!ENTITY pi "π"> <!-- greek small letter pi, U+03C0 ISOgrk3 -->
+<!ENTITY rho "ρ"> <!-- greek small letter rho, U+03C1 ISOgrk3 -->
+<!ENTITY sigmaf "ς"> <!-- greek small letter final sigma,
+ U+03C2 ISOgrk3 -->
+<!ENTITY sigma "σ"> <!-- greek small letter sigma,
+ U+03C3 ISOgrk3 -->
+<!ENTITY tau "τ"> <!-- greek small letter tau, U+03C4 ISOgrk3 -->
+<!ENTITY upsilon "υ"> <!-- greek small letter upsilon,
+ U+03C5 ISOgrk3 -->
+<!ENTITY phi "φ"> <!-- greek small letter phi, U+03C6 ISOgrk3 -->
+<!ENTITY chi "χ"> <!-- greek small letter chi, U+03C7 ISOgrk3 -->
+<!ENTITY psi "ψ"> <!-- greek small letter psi, U+03C8 ISOgrk3 -->
+<!ENTITY omega "ω"> <!-- greek small letter omega,
+ U+03C9 ISOgrk3 -->
+<!ENTITY thetasym "ϑ"> <!-- greek theta symbol,
+ U+03D1 NEW -->
+<!ENTITY upsih "ϒ"> <!-- greek upsilon with hook symbol,
+ U+03D2 NEW -->
+<!ENTITY piv "ϖ"> <!-- greek pi symbol, U+03D6 ISOgrk3 -->
+
+<!-- General Punctuation -->
+<!ENTITY bull "•"> <!-- bullet = black small circle,
+ U+2022 ISOpub -->
+<!-- bullet is NOT the same as bullet operator, U+2219 -->
+<!ENTITY hellip "…"> <!-- horizontal ellipsis = three dot leader,
+ U+2026 ISOpub -->
+<!ENTITY prime "′"> <!-- prime = minutes = feet, U+2032 ISOtech -->
+<!ENTITY Prime "″"> <!-- double prime = seconds = inches,
+ U+2033 ISOtech -->
+<!ENTITY oline "‾"> <!-- overline = spacing overscore,
+ U+203E NEW -->
+<!ENTITY frasl "⁄"> <!-- fraction slash, U+2044 NEW -->
+
+<!-- Letterlike Symbols -->
+<!ENTITY weierp "℘"> <!-- script capital P = power set
+ = Weierstrass p, U+2118 ISOamso -->
+<!ENTITY image "ℑ"> <!-- black-letter capital I = imaginary part,
+ U+2111 ISOamso -->
+<!ENTITY real "ℜ"> <!-- black-letter capital R = real part symbol,
+ U+211C ISOamso -->
+<!ENTITY trade "™"> <!-- trade mark sign, U+2122 ISOnum -->
+<!ENTITY alefsym "ℵ"> <!-- alef symbol = first transfinite cardinal,
+ U+2135 NEW -->
+<!-- alef symbol is NOT the same as hebrew letter alef,
+ U+05D0 although the same glyph could be used to depict both characters -->
+
+<!-- Arrows -->
+<!ENTITY larr "←"> <!-- leftwards arrow, U+2190 ISOnum -->
+<!ENTITY uarr "↑"> <!-- upwards arrow, U+2191 ISOnum-->
+<!ENTITY rarr "→"> <!-- rightwards arrow, U+2192 ISOnum -->
+<!ENTITY darr "↓"> <!-- downwards arrow, U+2193 ISOnum -->
+<!ENTITY harr "↔"> <!-- left right arrow, U+2194 ISOamsa -->
+<!ENTITY crarr "↵"> <!-- downwards arrow with corner leftwards
+ = carriage return, U+21B5 NEW -->
+<!ENTITY lArr "⇐"> <!-- leftwards double arrow, U+21D0 ISOtech -->
+<!-- Unicode does not say that lArr is the same as the 'is implied by' arrow
+ but also does not have any other character for that function. So lArr can
+ be used for 'is implied by' as ISOtech suggests -->
+<!ENTITY uArr "⇑"> <!-- upwards double arrow, U+21D1 ISOamsa -->
+<!ENTITY rArr "⇒"> <!-- rightwards double arrow,
+ U+21D2 ISOtech -->
+<!-- Unicode does not say this is the 'implies' character but does not have
+ another character with this function so rArr can be used for 'implies'
+ as ISOtech suggests -->
+<!ENTITY dArr "⇓"> <!-- downwards double arrow, U+21D3 ISOamsa -->
+<!ENTITY hArr "⇔"> <!-- left right double arrow,
+ U+21D4 ISOamsa -->
+
+<!-- Mathematical Operators -->
+<!ENTITY forall "∀"> <!-- for all, U+2200 ISOtech -->
+<!ENTITY part "∂"> <!-- partial differential, U+2202 ISOtech -->
+<!ENTITY exist "∃"> <!-- there exists, U+2203 ISOtech -->
+<!ENTITY empty "∅"> <!-- empty set = null set, U+2205 ISOamso -->
+<!ENTITY nabla "∇"> <!-- nabla = backward difference,
+ U+2207 ISOtech -->
+<!ENTITY isin "∈"> <!-- element of, U+2208 ISOtech -->
+<!ENTITY notin "∉"> <!-- not an element of, U+2209 ISOtech -->
+<!ENTITY ni "∋"> <!-- contains as member, U+220B ISOtech -->
+<!ENTITY prod "∏"> <!-- n-ary product = product sign,
+ U+220F ISOamsb -->
+<!-- prod is NOT the same character as U+03A0 'greek capital letter pi' though
+ the same glyph might be used for both -->
+<!ENTITY sum "∑"> <!-- n-ary summation, U+2211 ISOamsb -->
+<!-- sum is NOT the same character as U+03A3 'greek capital letter sigma'
+ though the same glyph might be used for both -->
+<!ENTITY minus "−"> <!-- minus sign, U+2212 ISOtech -->
+<!ENTITY lowast "∗"> <!-- asterisk operator, U+2217 ISOtech -->
+<!ENTITY radic "√"> <!-- square root = radical sign,
+ U+221A ISOtech -->
+<!ENTITY prop "∝"> <!-- proportional to, U+221D ISOtech -->
+<!ENTITY infin "∞"> <!-- infinity, U+221E ISOtech -->
+<!ENTITY ang "∠"> <!-- angle, U+2220 ISOamso -->
+<!ENTITY and "∧"> <!-- logical and = wedge, U+2227 ISOtech -->
+<!ENTITY or "∨"> <!-- logical or = vee, U+2228 ISOtech -->
+<!ENTITY cap "∩"> <!-- intersection = cap, U+2229 ISOtech -->
+<!ENTITY cup "∪"> <!-- union = cup, U+222A ISOtech -->
+<!ENTITY int "∫"> <!-- integral, U+222B ISOtech -->
+<!ENTITY there4 "∴"> <!-- therefore, U+2234 ISOtech -->
+<!ENTITY sim "∼"> <!-- tilde operator = varies with = similar to,
+ U+223C ISOtech -->
+<!-- tilde operator is NOT the same character as the tilde, U+007E,
+ although the same glyph might be used to represent both -->
+<!ENTITY cong "≅"> <!-- approximately equal to, U+2245 ISOtech -->
+<!ENTITY asymp "≈"> <!-- almost equal to = asymptotic to,
+ U+2248 ISOamsr -->
+<!ENTITY ne "≠"> <!-- not equal to, U+2260 ISOtech -->
+<!ENTITY equiv "≡"> <!-- identical to, U+2261 ISOtech -->
+<!ENTITY le "≤"> <!-- less-than or equal to, U+2264 ISOtech -->
+<!ENTITY ge "≥"> <!-- greater-than or equal to,
+ U+2265 ISOtech -->
+<!ENTITY sub "⊂"> <!-- subset of, U+2282 ISOtech -->
+<!ENTITY sup "⊃"> <!-- superset of, U+2283 ISOtech -->
+<!ENTITY nsub "⊄"> <!-- not a subset of, U+2284 ISOamsn -->
+<!ENTITY sube "⊆"> <!-- subset of or equal to, U+2286 ISOtech -->
+<!ENTITY supe "⊇"> <!-- superset of or equal to,
+ U+2287 ISOtech -->
+<!ENTITY oplus "⊕"> <!-- circled plus = direct sum,
+ U+2295 ISOamsb -->
+<!ENTITY otimes "⊗"> <!-- circled times = vector product,
+ U+2297 ISOamsb -->
+<!ENTITY perp "⊥"> <!-- up tack = orthogonal to = perpendicular,
+ U+22A5 ISOtech -->
+<!ENTITY sdot "⋅"> <!-- dot operator, U+22C5 ISOamsb -->
+<!-- dot operator is NOT the same character as U+00B7 middle dot -->
+
+<!-- Miscellaneous Technical -->
+<!ENTITY lceil "⌈"> <!-- left ceiling = APL upstile,
+ U+2308 ISOamsc -->
+<!ENTITY rceil "⌉"> <!-- right ceiling, U+2309 ISOamsc -->
+<!ENTITY lfloor "⌊"> <!-- left floor = APL downstile,
+ U+230A ISOamsc -->
+<!ENTITY rfloor "⌋"> <!-- right floor, U+230B ISOamsc -->
+<!ENTITY lang "〈"> <!-- left-pointing angle bracket = bra,
+ U+2329 ISOtech -->
+<!-- lang is NOT the same character as U+003C 'less than sign'
+ or U+2039 'single left-pointing angle quotation mark' -->
+<!ENTITY rang "〉"> <!-- right-pointing angle bracket = ket,
+ U+232A ISOtech -->
+<!-- rang is NOT the same character as U+003E 'greater than sign'
+ or U+203A 'single right-pointing angle quotation mark' -->
+
+<!-- Geometric Shapes -->
+<!ENTITY loz "◊"> <!-- lozenge, U+25CA ISOpub -->
+
+<!-- Miscellaneous Symbols -->
+<!ENTITY spades "♠"> <!-- black spade suit, U+2660 ISOpub -->
+<!-- black here seems to mean filled as opposed to hollow -->
+<!ENTITY clubs "♣"> <!-- black club suit = shamrock,
+ U+2663 ISOpub -->
+<!ENTITY hearts "♥"> <!-- black heart suit = valentine,
+ U+2665 ISOpub -->
+<!ENTITY diams "♦"> <!-- black diamond suit, U+2666 ISOpub -->
Modified: trunk/ui/editor/src/test/java/org/richfaces/seamparser/HtmlSeamParserTest.java
===================================================================
--- trunk/ui/editor/src/test/java/org/richfaces/seamparser/HtmlSeamParserTest.java 2009-04-10 16:51:14 UTC (rev 13507)
+++ trunk/ui/editor/src/test/java/org/richfaces/seamparser/HtmlSeamParserTest.java 2009-04-10 16:55:00 UTC (rev 13508)
@@ -227,6 +227,10 @@
assertHtml2SeamConverting("<p>a<b a&b</p>");
}
+ public void testRF6725() throws Exception {
+ assertHtml2SeamConverting("√ € ¢");
+ }
+
public void testNestingFormating() throws Exception {
assertHtml2SeamConverting("<p><b>aaaaaaaaa <u><i class=\"seamTextEmphasis\">sssssssss</i> dddddddddddddddd</u></b></p>");
}
15 years, 9 months
JBoss Rich Faces SVN: r13507 - in trunk/test-applications/realworld2/web/src/main/webapp/includes: shelf and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-04-10 12:51:14 -0400 (Fri, 10 Apr 2009)
New Revision: 13507
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/index/login.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfEditInfo.xhtml
Log:
fix modalpanel layouts
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/index/login.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfEditInfo.xhtml
===================================================================
--- trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfEditInfo.xhtml 2009-04-10 16:46:11 UTC (rev 13506)
+++ trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfEditInfo.xhtml 2009-04-10 16:51:14 UTC (rev 13507)
@@ -41,7 +41,7 @@
</td>
- <td width="100%" valign="top" align="right" colspan="2" style="padding : 10px;">
+ <td valign="top" align="right" colspan="2" style="padding : 10px;">
<richx:commandButton id="cancelButton" value="Cancel" style="float: left" immediate="true" actionListener="#{controller.cancelEditShelf()}" reRender="mainArea" />
<richx:commandButton id="saveButton" value="Save" actionListener="#{shelfManager.editShelf(shelf)}" reRender="mainArea" />
</td>
15 years, 9 months