-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#827 removed the datatable.net CSS and JavaScript files from the JAR,…
… using the CDN instead
- Loading branch information
1 parent
80a61e4
commit 290e0c1
Showing
18 changed files
with
503 additions
and
1,326 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
122 changes: 0 additions & 122 deletions
122
gradleResources/staticResources/css/ext/datatables.min.css
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
mavenResources/META-INF/resources/bsf/css/datatables.min.css
This file was deleted.
Oops, something went wrong.
569 changes: 0 additions & 569 deletions
569
mavenResources/META-INF/resources/bsf/js/datatables.min.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...in/java/net/bootsfaces/component/internalCssScriptResource/InternalCssScriptResource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/** | ||
* Copyright 2014-17 by Riccardo Massera (TheCoder4.Eu) and Stephan Rauh (http://www.beyondjava.net). | ||
* | ||
* This file is part of BootsFaces. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package net.bootsfaces.component.internalCssScriptResource; | ||
|
||
import javax.el.ValueExpression; | ||
import javax.faces.application.ResourceDependencies; | ||
import javax.faces.application.ResourceDependency; | ||
import javax.faces.component.*; | ||
import net.bootsfaces.utils.BsfUtils; | ||
|
||
/** This class holds the attributes of <b:internalCssScriptResource />. */ | ||
@FacesComponent("net.bootsfaces.component.internalCssScriptResource.InternalCssScriptResource") | ||
public class InternalCssScriptResource extends InternalCssScriptResourceCore { | ||
|
||
public static final String COMPONENT_TYPE = "net.bootsfaces.component.internalCssScriptResource.InternalCssScriptResource"; | ||
|
||
public static final String COMPONENT_FAMILY = "net.bootsfaces.component"; | ||
|
||
public static final String DEFAULT_RENDERER = "net.bootsfaces.component.internalCssScriptResource.InternalCssScriptResource"; | ||
|
||
public InternalCssScriptResource() { | ||
setRendererType(DEFAULT_RENDERER); | ||
} | ||
|
||
public String getFamily() { | ||
return COMPONENT_FAMILY; | ||
} | ||
|
||
/** | ||
* Manage EL-expression for snake-case attributes | ||
*/ | ||
public void setValueExpression(String name, ValueExpression binding) { | ||
name = BsfUtils.snakeCaseToCamelCase(name); | ||
super.setValueExpression(name, binding); | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
...net/bootsfaces/component/internalCssScriptResource/InternalCssScriptResourceBeanInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* Copyright 2014 - 17 by Riccardo Massera (TheCoder4.Eu) and Stephan Rauh (http://www.beyondjava.net). | ||
* | ||
* This file is part of BootsFaces. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package net.bootsfaces.component.internalCssScriptResource; | ||
|
||
import net.bootsfaces.beans.BsfBeanInfo; | ||
|
||
/** | ||
* BeanInfo class to provide mapping | ||
* of snake-case attributes to camelCase ones | ||
* | ||
* @author Dario D'Urzo | ||
*/ | ||
public class InternalCssScriptResourceBeanInfo extends BsfBeanInfo { | ||
|
||
/** | ||
* Get the reference decorated class | ||
*/ | ||
@Override | ||
public Class<?> getDecoratedClass() { | ||
return InternalCssScriptResource.class; | ||
} | ||
} | ||
|
58 changes: 58 additions & 0 deletions
58
...ava/net/bootsfaces/component/internalCssScriptResource/InternalCssScriptResourceCore.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/** | ||
* Copyright 2014 - 17 by Riccardo Massera (TheCoder4.Eu) and Stephan Rauh (http://www.beyondjava.net). | ||
* | ||
* This file is part of BootsFaces. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package net.bootsfaces.component.internalCssScriptResource; | ||
|
||
import javax.faces.component.UIOutput; | ||
|
||
/** This class holds the attributes of <b:internalCssScriptResource />. */ | ||
public abstract class InternalCssScriptResourceCore extends UIOutput { | ||
|
||
protected enum PropertyKeys { | ||
url; | ||
String toString; | ||
|
||
PropertyKeys(String toString) { | ||
this.toString = toString; | ||
} | ||
|
||
PropertyKeys() { | ||
} | ||
|
||
public String toString() { | ||
return ((this.toString != null) ? this.toString : super.toString()); | ||
} | ||
} | ||
|
||
/** | ||
* URL of the CSS file to include. <P> | ||
* @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. | ||
*/ | ||
public String getUrl() { | ||
return (String) getStateHelper().eval(PropertyKeys.url); | ||
} | ||
|
||
/** | ||
* URL of the CSS file to include. <P> | ||
* Usually this method is called internally by the JSF engine. | ||
*/ | ||
public void setUrl(String _url) { | ||
getStateHelper().put(PropertyKeys.url, _url); | ||
} | ||
|
||
} |
56 changes: 56 additions & 0 deletions
56
...net/bootsfaces/component/internalCssScriptResource/InternalCssScriptResourceRenderer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/** | ||
* Copyright 2014 - 17 by Riccardo Massera (TheCoder4.Eu) and Stephan Rauh (http://www.beyondjava.net). | ||
* | ||
* This file is part of BootsFaces. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package net.bootsfaces.component.internalCssScriptResource; | ||
|
||
import java.io.IOException; | ||
|
||
import javax.faces.component.UIComponent; | ||
import javax.faces.context.FacesContext; | ||
import javax.faces.context.ResponseWriter; | ||
import javax.faces.render.FacesRenderer; | ||
|
||
import net.bootsfaces.render.CoreRenderer; | ||
|
||
/** This class generates the HTML code of <b:internalCssScriptResource />. */ | ||
@FacesRenderer(componentFamily = "net.bootsfaces.component", rendererType = "net.bootsfaces.component.internalCssScriptResource.InternalCssScriptResource") | ||
public class InternalCssScriptResourceRenderer extends CoreRenderer { | ||
|
||
/** | ||
* This methods generates the HTML code of the current b:internalCssScriptResource. | ||
* @param context the FacesContext. | ||
* @param component the current b:internalCssScriptResource. | ||
* @throws IOException thrown if something goes wrong when writing the HTML code. | ||
*/ | ||
@Override | ||
public void encodeBegin(FacesContext context, UIComponent component) throws IOException { | ||
if (!component.isRendered()) { | ||
return; | ||
} | ||
InternalCssScriptResource internalCssScriptResource = (InternalCssScriptResource) component; | ||
ResponseWriter rw = context.getResponseWriter(); | ||
|
||
rw.startElement("link", internalCssScriptResource); | ||
rw.writeAttribute("type", "text/css", null); | ||
rw.writeAttribute("rel", "stylesheet", null); | ||
rw.writeAttribute("href", internalCssScriptResource.getUrl(), null); | ||
|
||
rw.endElement("link"); | ||
|
||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
.../java/net/bootsfaces/component/internalJavaScriptResource/InternalJavaScriptResource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/** | ||
* Copyright 2014-17 by Riccardo Massera (TheCoder4.Eu) and Stephan Rauh (http://www.beyondjava.net). | ||
* | ||
* This file is part of BootsFaces. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package net.bootsfaces.component.internalJavaScriptResource; | ||
|
||
import javax.el.ValueExpression; | ||
import javax.faces.application.ResourceDependencies; | ||
import javax.faces.application.ResourceDependency; | ||
import javax.faces.component.*; | ||
import net.bootsfaces.utils.BsfUtils; | ||
|
||
/** This class holds the attributes of <b:internalJavaScriptResource />. */ | ||
@FacesComponent("net.bootsfaces.component.internalJavaScriptResource.InternalJavaScriptResource") | ||
public class InternalJavaScriptResource extends InternalJavaScriptResourceCore { | ||
|
||
public static final String COMPONENT_TYPE = "net.bootsfaces.component.internalJavaScriptResource.InternalJavaScriptResource"; | ||
|
||
public static final String COMPONENT_FAMILY = "net.bootsfaces.component"; | ||
|
||
public static final String DEFAULT_RENDERER = "net.bootsfaces.component.internalJavaScriptResource.InternalJavaScriptResource"; | ||
|
||
public InternalJavaScriptResource() { | ||
setRendererType(DEFAULT_RENDERER); | ||
} | ||
|
||
public String getFamily() { | ||
return COMPONENT_FAMILY; | ||
} | ||
|
||
/** | ||
* Manage EL-expression for snake-case attributes | ||
*/ | ||
public void setValueExpression(String name, ValueExpression binding) { | ||
name = BsfUtils.snakeCaseToCamelCase(name); | ||
super.setValueExpression(name, binding); | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
...t/bootsfaces/component/internalJavaScriptResource/InternalJavaScriptResourceBeanInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* Copyright 2014 - 17 by Riccardo Massera (TheCoder4.Eu) and Stephan Rauh (http://www.beyondjava.net). | ||
* | ||
* This file is part of BootsFaces. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package net.bootsfaces.component.internalJavaScriptResource; | ||
|
||
import net.bootsfaces.beans.BsfBeanInfo; | ||
|
||
/** | ||
* BeanInfo class to provide mapping | ||
* of snake-case attributes to camelCase ones | ||
* | ||
* @author Dario D'Urzo | ||
*/ | ||
public class InternalJavaScriptResourceBeanInfo extends BsfBeanInfo { | ||
|
||
/** | ||
* Get the reference decorated class | ||
*/ | ||
@Override | ||
public Class<?> getDecoratedClass() { | ||
return InternalJavaScriptResource.class; | ||
} | ||
} | ||
|
Oops, something went wrong.