Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work/xthiba/changes #32

Merged
merged 11 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ org.eclipse.jdt.apt.core.prefs
org.eclipse.m2e.core.prefs
org.eclipse.pde.core.prefs

.idea

wiquery-*.i*
rebel.xml
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# WiQuery for Apache Wicket 8.x
# WiQuery for Apache Wicket

WiQuery is a project to simply Wicket integration with jQuery and jQuery UI.

This branch follows the development of Apache Wicket 8.x (the master branch of Apache Wicket)
This branch follows the development of Apache Wicket

WiQuery consists of 3 subprojects:
- core - the core library
Expand Down
29 changes: 18 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<groupId>org.wicketstuff.wiquery</groupId>
<artifactId>wiquery-parent</artifactId>
<packaging>pom</packaging>
<version>9.0.0-SNAPSHOT</version>
<version>9.1.0-SNAPSHOT</version>
<name>WiQuery Parent</name>

<licenses>
Expand Down Expand Up @@ -61,11 +61,12 @@
<maven.compiler.source>11</maven.compiler.source>

<wicket.version>9.16.0</wicket.version>
<jackson.version>2.12.7.1</jackson.version>
<jackson.version>2.16.1</jackson.version>
<slf4j.version>2.0.12</slf4j.version>
<junit.version>5.10.2</junit.version>
<servlet-api.version>4.0.1</servlet-api.version>
<jetty.version>9.4.44.v20210927</jetty.version>
<servlet-api.version>4.0.4</servlet-api.version>
<jetty.version>9.4.54.v20240208</jetty.version>
<rhino.version>1.7.14</rhino.version>
</properties>

<modules>
Expand Down Expand Up @@ -105,12 +106,6 @@
</dependency>

<!-- External dependencies -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${servlet-api.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand All @@ -121,8 +116,19 @@
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>org.mozilla</groupId>
<artifactId>rhino</artifactId>
<version>${rhino.version}</version>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>${servlet-api.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
Expand All @@ -146,8 +152,9 @@
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<artifactId>slf4j-reload4j</artifactId>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down
11 changes: 7 additions & 4 deletions wiquery-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.wicketstuff.wiquery</groupId>
<artifactId>wiquery-parent</artifactId>
<version>9.0.0-SNAPSHOT</version>
<version>9.1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>wiquery-core</artifactId>
Expand All @@ -25,23 +25,26 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<artifactId>slf4j-reload4j</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
9 changes: 5 additions & 4 deletions wiquery-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<parent>
<artifactId>wiquery-parent</artifactId>
<groupId>org.wicketstuff.wiquery</groupId>
<version>9.0.0-SNAPSHOT</version>
<version>9.1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>wiquery-demo</artifactId>
Expand Down Expand Up @@ -38,7 +39,7 @@
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<artifactId>slf4j-reload4j</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -48,8 +49,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected void onSubmit(AjaxRequestTarget target)
withDropDownDatePicker.setChangeMonth(true);
withDropDownDatePicker.setChangeYear(true);
withDropDownDatePicker
.setYearRange(new DatePickerYearRange(new Short("-20"), new Short("20"), true));
.setYearRange(new DatePickerYearRange(Short.parseShort("-20"), Short.parseShort("20"), true));

// Label
withDropDownDatePicker.setLabel(Model.of("Year/month dropdown"));
Expand Down
23 changes: 9 additions & 14 deletions wiquery-jquery-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.wicketstuff.wiquery</groupId>
<artifactId>wiquery-parent</artifactId>
<version>9.0.0-SNAPSHOT</version>
<version>9.1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>wiquery-jquery-ui</artifactId>
Expand All @@ -25,6 +25,11 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mozilla</groupId>
<artifactId>rhino</artifactId>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand All @@ -40,21 +45,11 @@
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>test</scope>
<artifactId>slf4j-reload4j</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>test</scope>
</dependency>

<!-- New Dependencies -->
<dependency>
<groupId>ro.isdc.wro4j</groupId>
<artifactId>rhino</artifactId>
<version>1.7R5-20130223-1</version>
<scope>test</scope>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public DatePickerYearRange getYearRange()
return (DatePickerYearRange)yearRange;
}

return new DatePickerYearRange(new Short("-10"), new Short("10"), false);
return new DatePickerYearRange(Short.parseShort("-10"), Short.parseShort("10"), false);
}

/**
Expand Down Expand Up @@ -698,7 +698,7 @@ public DatePickerNumberOfMonths getNumberOfMonths()
return (DatePickerNumberOfMonths)numberOfMonths;
}

return new DatePickerNumberOfMonths(new Short("1"));
return new DatePickerNumberOfMonths(Short.parseShort("1"));
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* Hebrew initialisation for the UI Datepicker extension. */
/* Written by Amir Hardon (ahardon at gmail dot com). */
( function( factory ) {
if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
define( [ "../widgets/datepicker" ], factory );
} else {

// Browser globals
factory( jQuery.datepicker );
}
}( function( datepicker ) {

datepicker.regional.he = {
closeText: "סגור",
prevText: "&#x3C;הקודם",
nextText: "הבא&#x3E;",
currentText: "היום",
monthNames: [ "ינואר","פברואר","מרץ","אפריל","מאי","יוני",
"יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר" ],
monthNamesShort: [ "ינו","פבר","מרץ","אפר","מאי","יוני",
"יולי","אוג","ספט","אוק","נוב","דצמ" ],
dayNames: [ "ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת" ],
dayNamesShort: [ "א'","ב'","ג'","ד'","ה'","ו'","שבת" ],
dayNamesMin: [ "א'","ב'","ג'","ד'","ה'","ו'","שבת" ],
weekHeader: "Wk",
dateFormat: "dd/mm/yy",
firstDay: 0,
isRTL: true,
showMonthAfterYear: false,
yearSuffix: "" };
datepicker.setDefaults( datepicker.regional.he );

return datepicker.regional.he;

} ) );
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* Indonesian initialisation for the jQuery UI date picker plugin. */
/* Written by Deden Fathurahman (dedenf@gmail.com). */
( function( factory ) {
if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
define( [ "../widgets/datepicker" ], factory );
} else {

// Browser globals
factory( jQuery.datepicker );
}
}( function( datepicker ) {

datepicker.regional.id = {
closeText: "Tutup",
prevText: "&#x3C;mundur",
nextText: "maju&#x3E;",
currentText: "hari ini",
monthNames: [ "Januari","Februari","Maret","April","Mei","Juni",
"Juli","Agustus","September","Oktober","Nopember","Desember" ],
monthNamesShort: [ "Jan","Feb","Mar","Apr","Mei","Jun",
"Jul","Agus","Sep","Okt","Nop","Des" ],
dayNames: [ "Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu" ],
dayNamesShort: [ "Min","Sen","Sel","Rab","kam","Jum","Sab" ],
dayNamesMin: [ "Mg","Sn","Sl","Rb","Km","jm","Sb" ],
weekHeader: "Mg",
dateFormat: "dd/mm/yy",
firstDay: 0,
isRTL: false,
showMonthAfterYear: false,
yearSuffix: "" };
datepicker.setDefaults( datepicker.regional.id );

return datepicker.regional.id;

} ) );
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
package org.wicketstuff.wiquery.ui.datepicker;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import java.util.GregorianCalendar;

import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.wicketstuff.wiquery.tester.WiQueryTestCase;

import static org.junit.Assert.*;

public class DateOptionTestCase extends WiQueryTestCase
{
protected static final Logger log = LoggerFactory.getLogger(DateOptionTestCase.class);

@Test
public void testGetJavaScriptOption()
{
DateOption dateOption = new DateOption(new Short("5"));
DateOption dateOption = new DateOption(Short.parseShort("5"));

// Short param
String expectedJavascript = "5";
Expand Down Expand Up @@ -60,7 +59,7 @@ public void testGetJavaScriptOption()
try
{
generatedJavascript = dateOption.getJavascriptOption().toString();
assertTrue(false);
fail();
}
catch (Exception e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class DatePickerDurationTestCase extends WiQueryTestCase
@Test
public void testGetJavaScriptOption()
{
DatePickerShortYearCutOff shortYearCutOff = new DatePickerShortYearCutOff(new Short("5"));
DatePickerShortYearCutOff shortYearCutOff = new DatePickerShortYearCutOff(Short.parseShort("5"));

// Short param
String expectedJavascript = "5";
Expand Down
Loading