JBoss Rich Faces SVN: r10448 - trunk/sandbox/ui/editorOld.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-09-16 08:38:11 -0400 (Tue, 16 Sep 2008)
New Revision: 10448
Modified:
trunk/sandbox/ui/editorOld/pom.xml
Log:
rename old editor project to editorOld in pom file
Modified: trunk/sandbox/ui/editorOld/pom.xml
===================================================================
--- trunk/sandbox/ui/editorOld/pom.xml 2008-09-16 12:16:38 UTC (rev 10447)
+++ trunk/sandbox/ui/editorOld/pom.xml 2008-09-16 12:38:11 UTC (rev 10448)
@@ -6,8 +6,8 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.sandbox.ui</groupId>
- <artifactId>editor</artifactId>
- <name>Editor</name>
+ <artifactId>editorOld</artifactId>
+ <name>Editor Old</name>
<build>
<plugins>
<plugin>
16 years, 3 months
JBoss Rich Faces SVN: r10447 - in trunk: sandbox/ui/editor and 17 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-09-16 08:16:38 -0400 (Tue, 16 Sep 2008)
New Revision: 10447
Added:
trunk/sandbox/ui/editor/
trunk/sandbox/ui/editor/pom.xml
trunk/sandbox/ui/editor/src/
trunk/sandbox/ui/editor/src/main/
trunk/sandbox/ui/editor/src/main/config/
trunk/sandbox/ui/editor/src/main/config/component/
trunk/sandbox/ui/editor/src/main/config/resources/
trunk/sandbox/ui/editor/src/main/java/
trunk/sandbox/ui/editor/src/main/java/META-INF/
trunk/sandbox/ui/editor/src/main/java/META-INF/MANIFEST.MF
trunk/sandbox/ui/editor/src/main/java/org/
trunk/sandbox/ui/editor/src/main/java/org/richfaces/
trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/
trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/
trunk/sandbox/ui/editor/src/main/resources/
trunk/sandbox/ui/editor/src/main/resources/org/
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/css/
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/
trunk/sandbox/ui/editor/src/main/templates/
trunk/sandbox/ui/editor/src/test/
trunk/sandbox/ui/editor/src/test/java/
trunk/sandbox/ui/editor/src/test/java/org/
trunk/sandbox/ui/editor/src/test/java/org/richfaces/
trunk/sandbox/ui/editor/src/test/java/org/richfaces/component/
trunk/sandbox/ui/editor/src/test/java/org/richfaces/rendekit/
Removed:
trunk/ui/editor/
Log:
move editor project to sandbox
Added: trunk/sandbox/ui/editor/pom.xml
===================================================================
--- trunk/sandbox/ui/editor/pom.xml (rev 0)
+++ trunk/sandbox/ui/editor/pom.xml 2008-09-16 12:16:38 UTC (rev 10447)
@@ -0,0 +1,67 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>ui</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.3.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>editor</artifactId>
+ <name>editor</name>
+ <version>3.3.0-SNAPSHOT</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>generate-test-sources</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>generate-tests</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <library>
+ <prefix>org.richfaces.ui</prefix>
+ <taglib>
+ <shortName>editor</shortName>
+ </taglib>
+ </library>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>richfaces-impl</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>combobox</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>core</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Property changes on: trunk/sandbox/ui/editor/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/sandbox/ui/editor/src/main/java/META-INF/MANIFEST.MF
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/META-INF/MANIFEST.MF (rev 0)
+++ trunk/sandbox/ui/editor/src/main/java/META-INF/MANIFEST.MF 2008-09-16 12:16:38 UTC (rev 10447)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on: trunk/sandbox/ui/editor/src/main/java/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
16 years, 3 months
JBoss Rich Faces SVN: r10446 - in trunk/sandbox/ui: editorOld and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-09-16 08:03:23 -0400 (Tue, 16 Sep 2008)
New Revision: 10446
Added:
trunk/sandbox/ui/editorOld/
trunk/sandbox/ui/editorOld/pom.xml
trunk/sandbox/ui/editorOld/src/
Removed:
trunk/sandbox/ui/editor/
trunk/sandbox/ui/editorOld/pom.xml
trunk/sandbox/ui/editorOld/src/
Log:
rename old editor project to editorOld
Copied: trunk/sandbox/ui/editorOld (from rev 10444, trunk/sandbox/ui/editor)
Deleted: trunk/sandbox/ui/editorOld/pom.xml
===================================================================
--- trunk/sandbox/ui/editor/pom.xml 2008-09-15 22:55:22 UTC (rev 10444)
+++ trunk/sandbox/ui/editorOld/pom.xml 2008-09-16 12:03:23 UTC (rev 10446)
@@ -1,51 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <artifactId>ui</artifactId>
- <groupId>org.richfaces.sandbox</groupId>
- <version>3.3.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces.sandbox.ui</groupId>
- <artifactId>editor</artifactId>
- <name>Editor</name>
- <build>
- <plugins>
- <plugin>
- <groupId>org.richfaces.cdk</groupId>
- <artifactId>maven-cdk-plugin</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- <executions>
- <execution>
- <id>generate-sources</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- <execution>
- <id>generate-test-sources</id>
- <phase>generate-test-sources</phase>
- <goals>
- <goal>generate-tests</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <library>
- <prefix>org.richfaces</prefix>
- <taglib>
- <shortName>editor</shortName>
- </taglib>
- </library>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.richfaces.framework</groupId>
- <artifactId>richfaces-impl</artifactId>
- <version>3.3.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
Copied: trunk/sandbox/ui/editorOld/pom.xml (from rev 10445, trunk/sandbox/ui/editor/pom.xml)
===================================================================
--- trunk/sandbox/ui/editorOld/pom.xml (rev 0)
+++ trunk/sandbox/ui/editorOld/pom.xml 2008-09-16 12:03:23 UTC (rev 10446)
@@ -0,0 +1,51 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>ui</artifactId>
+ <groupId>org.richfaces.sandbox</groupId>
+ <version>3.3.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.sandbox.ui</groupId>
+ <artifactId>editor</artifactId>
+ <name>Editor</name>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <id>generate-sources</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>generate-test-sources</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>generate-tests</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <library>
+ <prefix>org.richfaces</prefix>
+ <taglib>
+ <shortName>editor</shortName>
+ </taglib>
+ </library>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>richfaces-impl</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Copied: trunk/sandbox/ui/editorOld/src (from rev 10445, trunk/sandbox/ui/editor/src)
16 years, 3 months
JBoss Rich Faces SVN: r10445 - trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-09-16 05:58:39 -0400 (Tue, 16 Sep 2008)
New Revision: 10445
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
RF-4480
Modified: trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-09-15 22:55:22 UTC (rev 10444)
+++ trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-09-16 09:58:39 UTC (rev 10445)
@@ -480,12 +480,10 @@
if (p.getWidth() != 0) {
o.parentNode.style.width = p.getWidth() + "px";
o.parentNode.style.height = p.getHeight() + "px";
- if (p._onmouseover) {
- p.onmouseover = p._onmouseover;
- }
+ Event.stopObserving(p,'mouseover', this.inputHandler);
}else {
- p._onmouseover = p.onmouseover;
- p.onmouseover = function () {this.initFileInput(); p._onmouseover(); }.bind(this);
+ this.inputHandler = this.initFileInput.bindAsEventListener(this);
+ Event.observe(p,'mouseover', this.inputHandler);
}
},
16 years, 3 months
JBoss Rich Faces SVN: r10444 - in branches/3.2.x/ui/extendedDataTable/src/main: java/org/richfaces/renderkit/html and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-09-15 18:55:22 -0400 (Mon, 15 Sep 2008)
New Revision: 10444
Modified:
branches/3.2.x/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
branches/3.2.x/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDraggableRendererContributor.java
branches/3.2.x/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDropzoneRendererContributor.java
branches/3.2.x/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js
branches/3.2.x/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js
branches/3.2.x/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js
branches/3.2.x/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css/extendedDataTable.xcss
branches/3.2.x/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx
Log:
Latest changes for extendedDataTable merged from trunk
Modified: branches/3.2.x/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
===================================================================
--- branches/3.2.x/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-09-15 16:27:56 UTC (rev 10443)
+++ branches/3.2.x/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-09-15 22:55:22 UTC (rev 10444)
@@ -151,20 +151,22 @@
String headerClass = (String) table.getAttributes().get(
"headerClass");
// String menuId = (String) table.getAttributes().get(MENU_ID);
+
+ writer.startElement("tr", header);
+ encodeStyleClass(writer, null,
+ "extdt-header rich-extdt-header", headerClass, null);
+ writer.writeAttribute(HTML.id_ATTRIBUTE, table
+ .getBaseClientId(context)
+ + ":fakeIeRow", null);
+ for (int i = 0; i < numberOfColumns; i++) {
+ writer.startElement("th", header);
+ encodeStyleClass(writer, null,
+ "extdt-headercell extdt-fakeierow rich-extdt-headercell",
+ headerClass, null);
+ writer.endElement("th");
+ }
+
if (header != null) {
- writer.startElement("tr", header);
- encodeStyleClass(writer, null,
- "extdt-header rich-extdt-header", headerClass, null);
- writer.writeAttribute(HTML.id_ATTRIBUTE, table
- .getBaseClientId(context)
- + ":fakeIeRow", null);
- for (int i = 0; i < numberOfColumns; i++) {
- writer.startElement("th", header);
- encodeStyleClass(writer, null,
- "extdt-headercell extdt-fakeierow rich-extdt-headercell",
- headerClass, null);
- writer.endElement("th");
- }
writer.endElement("tr");
encodeTableHeaderFacet(context, numberOfColumns, writer,
@@ -589,10 +591,10 @@
boolean first = true;
int currentColumn = 0;
UIColumn column = null;
+ if (holder.isFirstRow()) {
+ encodeFakeIeRow(context, table, holder);
+ }
if (holder.isGroupingOn() && (rowGroupChanged(context, holder))) {
- if (holder.isFirstRow()) {
- encodeFakeIeRow(context, table, holder);
- }
encodeGroupRow(context, table, holder);
}
holder.setFirstRow(false);
Modified: branches/3.2.x/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDraggableRendererContributor.java
===================================================================
--- branches/3.2.x/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDraggableRendererContributor.java 2008-09-15 16:27:56 UTC (rev 10443)
+++ branches/3.2.x/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDraggableRendererContributor.java 2008-09-15 22:55:22 UTC (rev 10444)
@@ -10,6 +10,7 @@
import javax.faces.context.FacesContext;
import org.richfaces.renderkit.CompositeRenderer;
+import org.richfaces.renderkit.DraggableRendererContributor;
import org.richfaces.renderkit.RendererContributor;
import org.richfaces.renderkit.ScriptOptions;
@@ -39,7 +40,7 @@
public static synchronized ExtDraggableRendererContributor getInstance() {
if (instance == null) {
instance = new ExtDraggableRendererContributor();
- wrappedContributor = org.richfaces.renderkit.DraggableRendererContributor.getInstance();
+ wrappedContributor = DraggableRendererContributor.getInstance();
}
return instance;
}
@@ -96,7 +97,7 @@
Map<String, Object> parameters = new HashMap<String, Object>();
parameters
.put(
- org.richfaces.renderkit.DraggableRendererContributor.DRAG_SOURCE_ID,
+ DraggableRendererContributor.DRAG_SOURCE_ID,
dragSourceScriptId);
parameters.put(dragSourceScriptId, dragSourceScriptId);
options.addOption("parameters", parameters);
Modified: branches/3.2.x/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDropzoneRendererContributor.java
===================================================================
--- branches/3.2.x/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDropzoneRendererContributor.java 2008-09-15 16:27:56 UTC (rev 10443)
+++ branches/3.2.x/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDropzoneRendererContributor.java 2008-09-15 22:55:22 UTC (rev 10444)
@@ -14,6 +14,8 @@
import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.richfaces.renderkit.CompositeRenderer;
+import org.richfaces.renderkit.DraggableRendererContributor;
+import org.richfaces.renderkit.DropzoneRendererContributor;
import org.richfaces.renderkit.RendererContributor;
import org.richfaces.renderkit.ScriptOptions;
@@ -41,7 +43,7 @@
public static synchronized ExtDropzoneRendererContributor getInstance() {
if (instance == null) {
instance = new ExtDropzoneRendererContributor();
- wrappedContributor = org.richfaces.renderkit.DropzoneRendererContributor.getInstance();
+ wrappedContributor = DropzoneRendererContributor.getInstance();
}
return instance;
@@ -88,22 +90,31 @@
}
}
- if (preSendAjaxRequestFunction != null){
- definition.addToBody(preSendAjaxRequestFunction.toScript()).addToBody(";");
- }
+ definition.addToBody("var dragParams = drag.getParameters();");
+
+ String dragSourceScriptId = column.getClientId(context) + ":"+ TableDragDropRenderer.DRAG_SOURCE_SCRIPT_ID;
+ definition.addToBody(
+ "var source = dragParams['"+ DraggableRendererContributor.DRAG_SOURCE_ID +"'];" +
+ "if (source != \"" + dragSourceScriptId + "\"){"//send request only if drag column in not equals to drop column
+ );
definition.addToBody("var options = ").addToBody(ScriptUtils.toScript(requestOpts)).addToBody(";");
- definition.addToBody("options.parameters['" + org.richfaces.renderkit.DropzoneRendererContributor.DROP_TARGET_ID + "'] = '" + dropTargetScriptId + "';");
-
+ definition.addToBody("options.parameters['" + DropzoneRendererContributor.DROP_TARGET_ID + "'] = '" + dropTargetScriptId + "';");
if (onAjaxCompleteFunction != null)
definition.addToBody("options['" + AjaxRendererUtils.ONCOMPLETE_ATTR_NAME + "'] = " + onAjaxCompleteFunction.toScript() + ";");
//TODO remove as legacy
- definition.addToBody("Object.extend(options.parameters,drag.getParameters());");
+ definition.addToBody("Object.extend(options.parameters, dragParams);");
+ if (preSendAjaxRequestFunction != null){
+ definition.addToBody(preSendAjaxRequestFunction.toScript()).addToBody(";");
+ }
definition.addToBody("var dzOptions = this.getDropzoneOptions(); if (dzOptions.ondrop) { if (!dzOptions.ondrop.call(this, event)) return; };");
JSFunction dropFunction = AjaxRendererUtils.buildAjaxFunction(column, context);
dropFunction.addParameter(new JSReference("options"));
definition.addToBody(dropFunction.toScript()).addToBody(";");
+
+ definition.addToBody("};");
+
definition.appendScript(result);
result.append(";");
Modified: branches/3.2.x/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js
===================================================================
--- branches/3.2.x/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js 2008-09-15 16:27:56 UTC (rev 10443)
+++ branches/3.2.x/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js 2008-09-15 22:55:22 UTC (rev 10444)
@@ -31,7 +31,7 @@
function(){
grid.update(true);
},
- Utils.Condition.ElementPresent(id+':od'), 5);
+ Utils.Condition.ElementPresent(id+':od'), 100);
},
destroy: function() {
@@ -43,19 +43,20 @@
//remove listeners
this.selectionManager.removeListeners();
- this.header.removeListeners();
-
- var l = this.groupRows.length;
- for(var i = 0; i < l; i++) {
- Utils.DOM.Event.removeListeners(this.groupRows[i]);
- }
-
- var headerChildren = this.header.getColumnCells();
- l = headerChildren.length;
- for (var i=0; i<l-1; i++) {
- Utils.DOM.Event.removeListeners(headerChildren[i]);
- };
-
+ if (this.header) {
+ this.header.removeListeners();
+ var headerChildren = this.header.getColumnCells();
+ l = headerChildren.length;
+ for (var i=0; i<l-1; i++) {
+ Utils.DOM.Event.removeListeners(headerChildren[i]);
+ };
+ }
+ if (this.groupRows) {
+ var l = this.groupRows.length;
+ for(var i = 0; i < l; i++) {
+ Utils.DOM.Event.removeListeners(this.groupRows[i]);
+ }
+ }
//null all references to DOM elements
delete this.selectionManager;
delete this.header;
@@ -149,18 +150,26 @@
},
showSplashScreen: function(){
+ /**
+ Opera 95 is not drawing additional
+ element, and so I am commenting this out.
if (ClientUILib.isOpera) {
this.mainDiv.setStyle({display:'none'});
}
+ */
this.table.setStyle({visibility:'hidden'});
var splshscr = this.splashScreen;
splshscr.className = 'extdt-ss-vsbl';
},
hideSplashScreen: function(){
+ /**
+ Opera 95 is not drawing additional
+ element, and so I am commenting this out.
if (ClientUILib.isOpera) {
this.mainDiv.setStyle({display:''});
}
+ */
this.table.setStyle({visibility:'visible'});
this.splashScreen.className = 'extdt-ss-hdn';
},
@@ -287,14 +296,14 @@
var sd = this.scrollingDiv.getElement();
return sd.offsetWidth - sd.clientWidth;
},
- validateColumnsWidth: function(columns,excessWidth) {
+ validateColumnsWidth: function(columns,excessWidth) {
var i=1;
var endIndex = columns.length-1;
while ((i < endIndex) && (excessWidth > 0)) {
if (ClientUILib.isIE) {
var colWidth = parseInt(this.getColumns()[i].width) - 1;
}else{
- var colWidth = this.getColumnWidth(i);
+ var colWidth = this.header.getColumnWidth(i);
}
var spareWidth = colWidth - this.minColumnWidth;
var dW;
@@ -354,15 +363,6 @@
if (excessWidth > 0) {
this.validateColumnsWidth(cols,excessWidth);
};
- if (ClientUILib.isOpera) {
- var _stl = 2;
- var cols = this.header.getColumns();
- var columnsNumber = this.header.getColumnsNumber();
- for (var i=0; i<columnsNumber-1; i++) {
- ClientUILib.log(ClientUILogger.INFO, "this.getColumnWidth(i) "+this.getColumnWidth(i));
- cols[i].width = this.getColumnWidth(i) - _stl;
- }
- };
cols[columnsNumber-1].width = null;
cols[cols.length-1].width = null;
var newHeight = mainDivHeight - header.getHeight() - footerHeight - 2;
@@ -386,14 +386,14 @@
this.createControls();
if ( !ClientUILib.isIE ) {
if (this.fakeIeRow) {
- this.table.getElement().deleteRow(this.fakeIeRow);
+ this.table.getElement().deleteRow(this.fakeIeRow.rowIndex);
this.fakeIeRow = null;
}
if (this.fakeIeBodyRow) {
- this.tableB.deleteRow(this.fakeIeBodyRow);
+ this.tableB.deleteRow(this.fakeIeBodyRow.rowIndex);
this.fakeIeBodyRow = null;
}
- }
+ };
this.selectionManager.refreshEvents();
this.updateLayout();
this.selectionManager.restoreState();
Modified: branches/3.2.x/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js
===================================================================
--- branches/3.2.x/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js 2008-09-15 16:27:56 UTC (rev 10443)
+++ branches/3.2.x/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js 2008-09-15 22:55:22 UTC (rev 10444)
@@ -161,16 +161,15 @@
adjustSeparators: function() {
var columnCells = this.getColumnCells();
- this._redrawTable(this.extDt.table.getElement());
- this._redrawTable(this.extDt.tableB);
var l = columnCells.length;
+ this._redrawTable(this.extDt.table.getElement());
for (var i=0; i<l-1; i++) {
var headerChild = columnCells[i];
var headerNextChild = columnCells[i+1];
var headerChildChildren = headerChild.childElements();
var sepSpan = headerChildChildren[2];
var headerRowHeight = this.headerRow.getHeight();
- var headerRowY = this.getCaptionHeight();
+ var headerRowY = this.headerRow.getY();
sepSpan.columnIndex = i;
var sd = sepSpan.getWidth()/2 + 1;
var dropSpanLeft = headerChildChildren[3];
@@ -207,7 +206,8 @@
this.lastColWidth = this.extDt.getColumnWidth(this.getColumnsNumber()-1);
if (ClientUILib.isIE){
this.lastColWidth -= 15;
- }
+ }
+ this._redrawTable(this.extDt.tableB);
},
OnSepClick: function(event) {
@@ -221,7 +221,7 @@
srcElement: Event.element(event),
dragStarted: false,
mouseDown: true,
- startX: Event.pointerX(event) - this.extDt.outerDiv.getX(),
+ startX: Event.pointerX(event),
originalX: 0
};
var srcElement = this.dragColumnInfo.srcElement;
@@ -240,7 +240,7 @@
this._createSplitter();
}
- var pos = this.dragColumnInfo.startX;
+ var pos = this.dragColumnInfo.srcElement.offsetLeft;
pos += 6; //6 stands for width of the separatorSpan
this.dragColumnInfo.originalX = pos;
this.columnSplitter.show();
@@ -270,17 +270,12 @@
this.dragColumnInfo.mouseDown = false;
var delta = Event.pointerX(event) -
- this.dragColumnInfo.startX -
- this.extDt.outerDiv.getX();
+ this.dragColumnInfo.startX;
if (delta < this.minDelta) {
delta = this.minDelta;
}
if (delta > this.maxDelta) {
delta = this.maxDelta;
- }
- if (ClientUILib.isIE) {
- // sep span width
- delta -= 6;
}
var columnIndex = this.dragColumnInfo.srcElement.columnIndex;
var newWidth = this.getColumnWidth(columnIndex) + delta;
@@ -307,8 +302,7 @@
this._showSplitter(this.dragColumnInfo.srcElement.columnIndex);
}
var delta = Event.pointerX(event) -
- this.dragColumnInfo.startX -
- this.extDt.outerDiv.getX();
+ this.dragColumnInfo.startX
if (delta < this.minDelta) {
delta = this.minDelta;
}
@@ -322,12 +316,12 @@
}
},
_redrawTable: function(table) {
- table.hide();
+ table.hide(); //this is for opera < 9.5
var tr = table.insertRow(0);
var td = tr.insertCell(0);
td.setAttribute("colspan", 5);
td.innerHTML = "safari-must-have-something-inserted-to-redraw-table";
- table.deleteRow(tr);
+ table.deleteRow(tr.rowIndex);
table.show();
}
});
\ No newline at end of file
Modified: branches/3.2.x/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js
===================================================================
--- branches/3.2.x/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js 2008-09-15 16:27:56 UTC (rev 10443)
+++ branches/3.2.x/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js 2008-09-15 22:55:22 UTC (rev 10444)
@@ -284,7 +284,8 @@
if(!groupingExists) { //simple listener binding
if(this.options.selectionMode != "none") {
for(var i = 0; i < this.rowCount; i++) {
- rowIndex = Number(nrows[i].id.split(this.prefix)[1].split(":")[2]);
+ var arr = nrows[i].id.split(this.prefix)[1].split(":");
+ rowIndex = Number(arr[arr.length-1]);
this.addListener(nrows[i], rowIndex);
}
}
@@ -322,8 +323,9 @@
lastGroupId = groupId;
} else {
if(this.options.selectionMode != "none") {
- rowIndex = Number(nrows[i].id.split(this.prefix)[1].split(":")[2]);
- this.addListener(nrows[i], rowIndex);
+ var arr = nrows[i].id.split(this.prefix)[1].split(":");
+ rowIndex = Number(arr[arr.length-1]);
+ this.addListener(nrows[i], rowIndex);
}
groupItems[groupItem++] = nrows[i];
if ( (i==0) && (bHideFirstRow) ) {
@@ -581,8 +583,12 @@
this.removeRowFromSelection(j);
}
}
+ if(range[0] == range[1]) {
+ this.addRowToSelection(range[0]);
+ return;
+ }
var i = range[0];
- range[1] = (range[1] + 1) % this.rowCount;
+ range[1] = (range[1] + 1) % this.rowCount;
while (i != range[1]) {
this.addRowToSelection(i);
i = (i + 1) % this.rowCount;
Modified: branches/3.2.x/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css/extendedDataTable.xcss
===================================================================
--- branches/3.2.x/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css/extendedDataTable.xcss 2008-09-15 16:27:56 UTC (rev 10443)
+++ branches/3.2.x/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css/extendedDataTable.xcss 2008-09-15 22:55:22 UTC (rev 10444)
@@ -10,6 +10,7 @@
.extdt-table-layout {
table-layout: fixed;
+ border-spacing: 0;
}
.extdt-table-filterrow {
@@ -32,6 +33,7 @@
}
.extdt-fakeierow {
+ display: none;
}
.extdt-thead {
Modified: branches/3.2.x/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx
===================================================================
--- branches/3.2.x/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx 2008-09-15 16:27:56 UTC (rev 10443)
+++ branches/3.2.x/ui/extendedDataTable/src/main/templates/org/richfaces/htmlExtendedDataTable.jspx 2008-09-15 22:55:22 UTC (rev 10444)
@@ -83,7 +83,9 @@
<div id="#{clientId}:cs" class="extdt-hsplit" style="display: none;"/>
<table id="#{clientId}:tu"
class="extdt-table-layout rich-table #{component.attributes['styleClass']}"
- style="visibility:hidden;"
+ style="visibility:hidden;"
+ cellpadding="0"
+ cellspacing="0"
width="100%"
>
<colgroup id="#{clientId}:colgroup:header">
@@ -96,8 +98,10 @@
<td colspan="#{columnsCount}" style="padding: 0px;">
<div id="#{clientId}:sd" class="extdt-content" style="height:50px;width:100%;">
<table id="#{clientId}:n" width="100%"
- class="extdt-table-layout rich-table #{component.attributes['styleClass']}"
- style="#{component.attributes['style']}"
+ class="extdt-table-layout rich-table #{component.attributes['styleClass']}"
+ style="#{component.attributes['style']}"
+ cellpadding="0"
+ cellspacing="0"
>
<f:call name="utils.encodePassThruWithExclusions">
<f:parameter value="height,value,name,type,id,class,rows,style,width" />
16 years, 3 months
JBoss Rich Faces SVN: r10443 - trunk/test-applications/facelets/src/main/webapp/ScrollableDataTable.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-09-15 12:27:56 -0400 (Mon, 15 Sep 2008)
New Revision: 10443
Modified:
trunk/test-applications/facelets/src/main/webapp/ScrollableDataTable/ScrollableDataTableProperty.xhtml
Log:
-findComponent for Konstantin Mishin test.
Modified: trunk/test-applications/facelets/src/main/webapp/ScrollableDataTable/ScrollableDataTableProperty.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/ScrollableDataTable/ScrollableDataTableProperty.xhtml 2008-09-15 15:46:31 UTC (rev 10442)
+++ trunk/test-applications/facelets/src/main/webapp/ScrollableDataTable/ScrollableDataTableProperty.xhtml 2008-09-15 16:27:56 UTC (rev 10443)
@@ -58,13 +58,5 @@
<f:selectItem itemLabel="multi" itemValue="multi" />
</h:selectOneRadio>
</h:panelGrid>
- <br />
- <br />
- <div style="FONT-WEIGHT: bold;">rich:findComponent</div>
- <h:panelGrid columns="2">
- <a4j:commandLink value="getSelection" reRender="findID"></a4j:commandLink>
-
- <h:outputText id="findID" value="#{rich:findComponent('sdt').selection}" />
- </h:panelGrid>
<a4j:commandButton value="reRender" reRender="sdt"></a4j:commandButton>
</f:subview>
\ No newline at end of file
16 years, 3 months
JBoss Rich Faces SVN: r10442 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-09-15 11:46:31 -0400 (Mon, 15 Sep 2008)
New Revision: 10442
Modified:
trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.xml
Log:
https://jira.jboss.org/jira/browse/RF-3136
The additional info about ajaxKeys is added
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.xml 2008-09-15 14:00:03 UTC (rev 10441)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataDefinitionList.xml 2008-09-15 15:46:31 UTC (rev 10442)
@@ -126,8 +126,8 @@
<para>The component was created basing on the <emphasis role="bold">
<property><a4j:repeat></property>
</emphasis> component and as a result it could be partially updated with Ajax. <emphasis>
- <property>"ajaxKeys"</property>
- </emphasis> attribute allows to define row keys that are updated after an Ajax request.</para>
+ <property>The "ajaxKeys"</property>
+ </emphasis> attribute allows to define row keys that are updated after an Ajax request, you need to pass an array with key (lines) of the list that you want to be updated after the Ajax request is executed.</para>
<para>Here is an example:</para>
<para>
16 years, 3 months
JBoss Rich Faces SVN: r10441 - in trunk/ui: editor and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-09-15 10:00:03 -0400 (Mon, 15 Sep 2008)
New Revision: 10441
Added:
trunk/ui/editor/
Removed:
trunk/ui/xhrmlEditor/
Modified:
trunk/ui/editor/pom.xml
Log:
Copied: trunk/ui/editor (from rev 10440, trunk/ui/xhrmlEditor)
Modified: trunk/ui/editor/pom.xml
===================================================================
--- trunk/ui/xhrmlEditor/pom.xml 2008-09-15 13:43:26 UTC (rev 10440)
+++ trunk/ui/editor/pom.xml 2008-09-15 14:00:03 UTC (rev 10441)
@@ -6,8 +6,8 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
- <artifactId>xhrmlEditor</artifactId>
- <name>xhrmlEditor</name>
+ <artifactId>editor</artifactId>
+ <name>editor</name>
<version>3.3.0-SNAPSHOT</version>
<build>
<plugins>
@@ -34,7 +34,7 @@
<library>
<prefix>org.richfaces.ui</prefix>
<taglib>
- <shortName>xhrmlEditor</shortName>
+ <shortName>editor</shortName>
</taglib>
</library>
</configuration>
16 years, 3 months
JBoss Rich Faces SVN: r10440 - in trunk/ui: xhrmlEditor and 16 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-09-15 09:43:26 -0400 (Mon, 15 Sep 2008)
New Revision: 10440
Added:
trunk/ui/xhrmlEditor/
trunk/ui/xhrmlEditor/pom.xml
trunk/ui/xhrmlEditor/src/
trunk/ui/xhrmlEditor/src/main/
trunk/ui/xhrmlEditor/src/main/config/
trunk/ui/xhrmlEditor/src/main/config/component/
trunk/ui/xhrmlEditor/src/main/config/resources/
trunk/ui/xhrmlEditor/src/main/java/
trunk/ui/xhrmlEditor/src/main/java/META-INF/
trunk/ui/xhrmlEditor/src/main/java/META-INF/MANIFEST.MF
trunk/ui/xhrmlEditor/src/main/java/org/
trunk/ui/xhrmlEditor/src/main/java/org/richfaces/
trunk/ui/xhrmlEditor/src/main/java/org/richfaces/component/
trunk/ui/xhrmlEditor/src/main/java/org/richfaces/renderkit/
trunk/ui/xhrmlEditor/src/main/resources/
trunk/ui/xhrmlEditor/src/main/resources/org/
trunk/ui/xhrmlEditor/src/main/resources/org/richfaces/
trunk/ui/xhrmlEditor/src/main/resources/org/richfaces/renderkit/
trunk/ui/xhrmlEditor/src/main/resources/org/richfaces/renderkit/html/
trunk/ui/xhrmlEditor/src/main/resources/org/richfaces/renderkit/html/css/
trunk/ui/xhrmlEditor/src/main/resources/org/richfaces/renderkit/html/scripts/
trunk/ui/xhrmlEditor/src/main/templates/
trunk/ui/xhrmlEditor/src/test/
trunk/ui/xhrmlEditor/src/test/java/
trunk/ui/xhrmlEditor/src/test/java/org/
trunk/ui/xhrmlEditor/src/test/java/org/richfaces/
trunk/ui/xhrmlEditor/src/test/java/org/richfaces/component/
trunk/ui/xhrmlEditor/src/test/java/org/richfaces/rendekit/
Log:
Add xhrmlEditor project
Added: trunk/ui/xhrmlEditor/pom.xml
===================================================================
--- trunk/ui/xhrmlEditor/pom.xml (rev 0)
+++ trunk/ui/xhrmlEditor/pom.xml 2008-09-15 13:43:26 UTC (rev 10440)
@@ -0,0 +1,67 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>ui</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.3.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>xhrmlEditor</artifactId>
+ <name>xhrmlEditor</name>
+ <version>3.3.0-SNAPSHOT</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>generate-test-sources</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>generate-tests</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <library>
+ <prefix>org.richfaces.ui</prefix>
+ <taglib>
+ <shortName>xhrmlEditor</shortName>
+ </taglib>
+ </library>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>richfaces-impl</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>combobox</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>core</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Property changes on: trunk/ui/xhrmlEditor/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/ui/xhrmlEditor/src/main/java/META-INF/MANIFEST.MF
===================================================================
--- trunk/ui/xhrmlEditor/src/main/java/META-INF/MANIFEST.MF (rev 0)
+++ trunk/ui/xhrmlEditor/src/main/java/META-INF/MANIFEST.MF 2008-09-15 13:43:26 UTC (rev 10440)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on: trunk/ui/xhrmlEditor/src/main/java/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
16 years, 3 months
JBoss Rich Faces SVN: r10439 - trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: pgolawski
Date: 2008-09-15 05:45:26 -0400 (Mon, 15 Sep 2008)
New Revision: 10439
Modified:
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDraggableRendererContributor.java
trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDropzoneRendererContributor.java
Log:
organize imports +
send request only if drag column in not equals to drop column
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDraggableRendererContributor.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDraggableRendererContributor.java 2008-09-12 15:30:13 UTC (rev 10438)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDraggableRendererContributor.java 2008-09-15 09:45:26 UTC (rev 10439)
@@ -10,6 +10,7 @@
import javax.faces.context.FacesContext;
import org.richfaces.renderkit.CompositeRenderer;
+import org.richfaces.renderkit.DraggableRendererContributor;
import org.richfaces.renderkit.RendererContributor;
import org.richfaces.renderkit.ScriptOptions;
@@ -39,7 +40,7 @@
public static synchronized ExtDraggableRendererContributor getInstance() {
if (instance == null) {
instance = new ExtDraggableRendererContributor();
- wrappedContributor = org.richfaces.renderkit.DraggableRendererContributor.getInstance();
+ wrappedContributor = DraggableRendererContributor.getInstance();
}
return instance;
}
@@ -96,7 +97,7 @@
Map<String, Object> parameters = new HashMap<String, Object>();
parameters
.put(
- org.richfaces.renderkit.DraggableRendererContributor.DRAG_SOURCE_ID,
+ DraggableRendererContributor.DRAG_SOURCE_ID,
dragSourceScriptId);
parameters.put(dragSourceScriptId, dragSourceScriptId);
options.addOption("parameters", parameters);
Modified: trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDropzoneRendererContributor.java
===================================================================
--- trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDropzoneRendererContributor.java 2008-09-12 15:30:13 UTC (rev 10438)
+++ trunk/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/html/ExtDropzoneRendererContributor.java 2008-09-15 09:45:26 UTC (rev 10439)
@@ -14,6 +14,8 @@
import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.richfaces.renderkit.CompositeRenderer;
+import org.richfaces.renderkit.DraggableRendererContributor;
+import org.richfaces.renderkit.DropzoneRendererContributor;
import org.richfaces.renderkit.RendererContributor;
import org.richfaces.renderkit.ScriptOptions;
@@ -41,7 +43,7 @@
public static synchronized ExtDropzoneRendererContributor getInstance() {
if (instance == null) {
instance = new ExtDropzoneRendererContributor();
- wrappedContributor = org.richfaces.renderkit.DropzoneRendererContributor.getInstance();
+ wrappedContributor = DropzoneRendererContributor.getInstance();
}
return instance;
@@ -88,22 +90,31 @@
}
}
- if (preSendAjaxRequestFunction != null){
- definition.addToBody(preSendAjaxRequestFunction.toScript()).addToBody(";");
- }
+ definition.addToBody("var dragParams = drag.getParameters();");
+
+ String dragSourceScriptId = column.getClientId(context) + ":"+ TableDragDropRenderer.DRAG_SOURCE_SCRIPT_ID;
+ definition.addToBody(
+ "var source = dragParams['"+ DraggableRendererContributor.DRAG_SOURCE_ID +"'];" +
+ "if (source != \"" + dragSourceScriptId + "\"){"//send request only if drag column in not equals to drop column
+ );
definition.addToBody("var options = ").addToBody(ScriptUtils.toScript(requestOpts)).addToBody(";");
- definition.addToBody("options.parameters['" + org.richfaces.renderkit.DropzoneRendererContributor.DROP_TARGET_ID + "'] = '" + dropTargetScriptId + "';");
-
+ definition.addToBody("options.parameters['" + DropzoneRendererContributor.DROP_TARGET_ID + "'] = '" + dropTargetScriptId + "';");
if (onAjaxCompleteFunction != null)
definition.addToBody("options['" + AjaxRendererUtils.ONCOMPLETE_ATTR_NAME + "'] = " + onAjaxCompleteFunction.toScript() + ";");
//TODO remove as legacy
- definition.addToBody("Object.extend(options.parameters,drag.getParameters());");
+ definition.addToBody("Object.extend(options.parameters, dragParams);");
+ if (preSendAjaxRequestFunction != null){
+ definition.addToBody(preSendAjaxRequestFunction.toScript()).addToBody(";");
+ }
definition.addToBody("var dzOptions = this.getDropzoneOptions(); if (dzOptions.ondrop) { if (!dzOptions.ondrop.call(this, event)) return; };");
JSFunction dropFunction = AjaxRendererUtils.buildAjaxFunction(column, context);
dropFunction.addParameter(new JSReference("options"));
definition.addToBody(dropFunction.toScript()).addToBody(";");
+
+ definition.addToBody("};");
+
definition.appendScript(result);
result.append(";");
16 years, 3 months