Skip to content

Issue #205 Upgrade jQuery to new version #214

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

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ebeaa07
Update jquery to the latest version of 2.x
tsujiguchitky Apr 6, 2020
5416512
Use jQuery 3.0.0 & jQuery Migrate 3.1.0
tsujiguchitky Apr 7, 2020
5a4f27b
Fix Mocha tests due to Deferred.then() works asynchronously
tsujiguchitky Apr 8, 2020
e88c1e9
Replace jQuery deprecated methods
tsujiguchitky Apr 9, 2020
f2addb3
ManageRulesView.initSorting() needs to wait for buildList()
tsujiguchitky Apr 13, 2020
a45893f
Fix synchronization mechanism in buildHTML()
tsujiguchitky Apr 14, 2020
1043c6b
Fix TypeError in ConditionAttrArrayView.js
tsujiguchitky Apr 23, 2020
ccf8b0d
Hide help-block by default
tsujiguchitky Apr 24, 2020
eb93c41
Suppress form submit in servers advanced section
tsujiguchitky Apr 24, 2020
77b5fba
Suppress deleting resource type when deleting pattern on resource typ…
tsujiguchitky Apr 27, 2020
1cdd83d
Update jQuery to 3.4.1
tsujiguchitky May 19, 2020
a5f79fb
Update RequireJS to 2.3.6
tsujiguchitky May 19, 2020
759a1b7
Update jQuery to 3.5.1
tsujiguchitky May 19, 2020
3aad60c
Fix broken page title due to jQuery 3.5
tsujiguchitky May 19, 2020
45ce0c0
Update RequireJS to 2.3.6 in OAuth2 pages
tsujiguchitky May 22, 2020
24007b7
Fix invalid self-closing tags
tsujiguchitky May 22, 2020
6f9f5fc
Remove unused QUnit dependency
tsujiguchitky May 22, 2020
ae59239
Fix error handling when the first authentication REST API returned an…
tsujiguchitky May 29, 2020
16f6b15
Update jQuery Migrate to 3.3.0
tsujiguchitky Jun 4, 2020
f06539b
Rename bootstrap-tabdrop.js
tsujiguchitky Jun 4, 2020
186cf25
Replace jQuery deprecated methods
tsujiguchitky Jun 4, 2020
750ab57
Replace jQuery deprecated methods
tsujiguchitky Jun 8, 2020
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
3 changes: 2 additions & 1 deletion openam-external-libs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -525,12 +525,13 @@
<goal>install-file</goal>
</goals>
<configuration>
<file>${basedir}/src/main/resources/bootstrap-tabdrop-1.0.js</file>
<file>${basedir}/src/main/resources/bootstrap-tabdrop-1.0-openam-jp.js</file>
<groupId>jp.openam.commons.ui.libs</groupId>
<artifactId>bootstrap-tabdrop</artifactId>
<version>1.0</version>
<packaging>js</packaging>
<generatePom>true</generatePom>
<classifier>openam-jp</classifier>
</configuration>
</execution>
<execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
register: function(fn) {
registered.push(fn);
if (inited === false) {
$(window).bind('resize', resize);
$(window).on('resize', resize);
inited = true;
}
},
Expand Down Expand Up @@ -114,4 +114,4 @@

$.fn.tabdrop.Constructor = TabDrop;

}( window.jQuery );
}( window.jQuery );
3 changes: 2 additions & 1 deletion openam-oauth2/src/main/resources/templates/CodeThanks.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
~ information: "Portions copyright [year] [name of copyright owner]".
~
~ Copyright 2015 ForgeRock AS.
~ Portions copyright 2020 Open Source Solution Technology Corporation
-->
<html lang="en">
<head>
Expand All @@ -34,6 +35,6 @@
done: true
};
</script>
<script data-main="${baseUrl?html}/XUI/main-device" src="${baseUrl?html}/XUI/libs/requirejs-2.1.14-min.js"></script>
<script data-main="${baseUrl?html}/XUI/main-device" src="${baseUrl?html}/XUI/libs/requirejs-2.3.6-min.js"></script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
~ information: "Portions copyright [year] [name of copyright owner]".
~
~ Copyright 2015 ForgeRock AS.
~ Portions copyright 2020 Open Source Solution Technology Corporation
-->
<html lang="en">
<head>
Expand All @@ -34,6 +35,6 @@
baseUrl : "${baseUrl?js_string}/XUI"
};
</script>
<script data-main="${baseUrl?html}/XUI/main-device" src="${baseUrl?html}/XUI/libs/requirejs-2.1.14-min.js"></script>
<script data-main="${baseUrl?html}/XUI/main-device" src="${baseUrl?html}/XUI/libs/requirejs-2.3.6-min.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions openam-oauth2/src/main/resources/templates/page/authorize.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
~ "Portions Copyrighted [year] [name of copyright owner]"
~
~ Portions Copyrighted 2014 Nomura Research Institute, Ltd
~ Portions Copyrighted 2019 Open Source Solution Technology Corp.
~ Portions Copyrighted 2019-2020 Open Source Solution Technology Corp.
-->
<html lang="en">
<head>
Expand Down Expand Up @@ -61,6 +61,6 @@
}
};
</script>
<script data-main="${baseUrl?html}/XUI/main-authorize" src="${baseUrl?html}/XUI/libs/requirejs-2.1.14-min.js"></script>
<script data-main="${baseUrl?html}/XUI/main-authorize" src="${baseUrl?html}/XUI/libs/requirejs-2.3.6-min.js"></script>
</body>
</html>
3 changes: 2 additions & 1 deletion openam-oauth2/src/main/resources/templates/page/error.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
~ "Portions Copyrighted [year] [name of copyright owner]"
~
~ Portions Copyrighted 2014 Nomura Research Institute, Ltd
~ Portions Copyrighted 2020 Open Source Solution Technology Corporation
-->
<html lang="en">
<head>
Expand Down Expand Up @@ -53,6 +54,6 @@
}
</#if>
</script>
<script data-main="${baseUrl?html}/XUI/main-authorize" src="${baseUrl?html}/XUI/libs/requirejs-2.1.14-min.js"></script>
<script data-main="${baseUrl?html}/XUI/main-authorize" src="${baseUrl?html}/XUI/libs/requirejs-2.3.6-min.js"></script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
~ "Portions Copyrighted [year] [name of copyright owner]"
~
~ Portions Copyrighted 2014 Nomura Research Institute, Ltd
~ Portions Copyrighted 2019 Open Source Solution Technology Corp.
~ Portions Copyrighted 2019-2020 Open Source Solution Technology Corp.
-->
<html lang="en">
<head>
Expand Down Expand Up @@ -60,6 +60,6 @@
}
};
</script>
<script data-main="${baseUrl?html}/XUI/main-authorize" src="${baseUrl?html}/XUI/libs/requirejs-2.1.14-min.js"></script>
<script data-main="${baseUrl?html}/XUI/main-authorize" src="${baseUrl?html}/XUI/libs/requirejs-2.3.6-min.js"></script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
~ "Portions Copyrighted [year] [name of copyright owner]"
~
~ Portions Copyrighted 2014 Nomura Research Institute, Ltd
~ Portions Copyrighted 2019 Open Source Solution Technology Corp.
~ Portions Copyrighted 2019-2020 Open Source Solution Technology Corp.
-->
<html lang="en">
<head>
Expand Down Expand Up @@ -60,6 +60,6 @@
}
};
</script>
<script data-main="${baseUrl?html}/XUI/main-authorize" src="${baseUrl?html}/XUI/libs/requirejs-2.1.14-min.js"></script>
<script data-main="${baseUrl?html}/XUI/main-authorize" src="${baseUrl?html}/XUI/libs/requirejs-2.3.6-min.js"></script>
</body>
</html>
6 changes: 3 additions & 3 deletions openam-ui/openam-ui-ria/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion openam-ui/openam-ui-ria/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"lodash": "3.10.1",
"mocha": "2.5.3",
"phantomjs-prebuilt": "2.1.7",
"requirejs": "2.2.0",
"requirejs": "2.3.6",
"rimraf": "2.5.2",
"sinon": "1.17.4",
"sinon-chai": "2.8.0"
Expand Down
17 changes: 2 additions & 15 deletions openam-ui/openam-ui-ria/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
<groupId>jp.openam.commons.ui.libs</groupId>
<artifactId>bootstrap-tabdrop</artifactId>
<version>1.0</version>
<classifier>openam-jp</classifier>
<type>js</type>
</dependency>
<dependency>
Expand Down Expand Up @@ -150,20 +151,6 @@
<type>js</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jp.openam.commons.ui.libs</groupId>
<artifactId>qunit</artifactId>
<version>1.15.0</version>
<type>js</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jp.openam.commons.ui.libs</groupId>
<artifactId>qunit</artifactId>
<type>css</type>
<version>1.15.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jp.openam.commons.ui.libs</groupId>
<artifactId>squire</artifactId>
Expand Down Expand Up @@ -264,7 +251,7 @@
</goals>
<configuration>
<outputDirectory>${project.build.directory}/test-classes/libs</outputDirectory>
<includeArtifactIds>sinon,qunit,squire</includeArtifactIds>
<includeArtifactIds>sinon,squire</includeArtifactIds>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

define([
"jquery",
"jquery-migrate",
"lodash",
"org/forgerock/openam/ui/common/util/Constants",
"org/forgerock/commons/ui/common/main/EventManager",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

define([
"jquery"
"jquery-migrate"
], function ($) {
var obj = {
"validPhoneFormat": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2019 Open Source Solution Technology Corporation
* Copyright 2019-2020 Open Source Solution Technology Corporation
*/

define("jp/co/osstech/openam/server/util/webauthn", [
"jquery"
"jquery-migrate"
], function ($) {

var obj = {};
Expand Down Expand Up @@ -44,11 +44,11 @@ define("jp/co/osstech/openam/server/util/webauthn", [

const jsonbody = JSON.stringify(jdata);
$("#PublicKeyCredential").val(jsonbody);
$("#idToken3_0").click();
$("#idToken3_0").trigger("click");
})
.catch((err) => {
console.log("ERROR", err);
$("#idToken3_1").click();
$("#idToken3_1").trigger("click");
});
};

Expand All @@ -73,11 +73,11 @@ define("jp/co/osstech/openam/server/util/webauthn", [

const jsonbody = JSON.stringify(jdata);
$("#PublicKeyCredential").val(jsonbody);
$("#idToken3_0").click();
$("#idToken3_0").trigger("click");
})
.catch((err) => {
console.log("ERROR", err);
$("#idToken3_1").click();
$("#idToken3_1").trigger("click");
});
};

Expand Down
13 changes: 10 additions & 3 deletions openam-ui/openam-ui-ria/src/main/js/main-authorize.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* Portions Copyrighted 2020 Open Source Solution Technology Corporation
*/

require.config({
Expand All @@ -35,10 +37,15 @@ require.config({
"lodash": "libs/lodash-3.10.1-min",
"handlebars": "libs/handlebars-4.0.5",
"i18next": "libs/i18next-1.7.3-min",
"jquery": "libs/jquery-2.1.1-min",
"jquery": "libs/jquery-3.5.1-min",
"jquery-migrate": "libs/jquery-migrate-3.3.0",
"text": "libs/text-2.0.15"
},
shim: {
"jquery-migrate": {
deps: ["jquery"],
exports: "jQuery"
},
"handlebars": {
exports: "handlebars"
},
Expand All @@ -53,7 +60,7 @@ require.config({
});

require([
"jquery",
"jquery-migrate",
"lodash",
"handlebars",
"org/forgerock/openam/ui/user/oauth2/OAuth2ConsentPageHelper",
Expand Down Expand Up @@ -145,7 +152,7 @@ require([
$("#wrapper").html(baseTemplate(data));
$("#footer").html(footerTemplate(data));
$("#loginBaseLogo").html(loginHeaderTemplate(data));
$("#content").html(formTemplate(data)).find(".panel-heading").bind("click keyup", function (e) {
$("#content").html(formTemplate(data)).find(".panel-heading").on("click keyup", function (e) {
// keyup is required so that the collapsed panel can be opened with the keyboard alone,
// and without relying on a mouse click event.
if (e.type === "keyup" && e.keyCode !== KEY_CODE_ENTER && e.keyCode !== KEY_CODE_SPACE) {
Expand Down
10 changes: 8 additions & 2 deletions openam-ui/openam-ui-ria/src/main/js/main-device.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2015-2016 ForgeRock AS.
* Portions copyright 2020 Open Source Solution Technology Corporation
*/

require.config({
Expand All @@ -27,10 +28,15 @@ require.config({
"lodash": "libs/lodash-3.10.1-min",
"handlebars": "libs/handlebars-4.0.5",
"i18next": "libs/i18next-1.7.3-min",
"jquery": "libs/jquery-2.1.1-min",
"jquery": "libs/jquery-3.5.1-min",
"jquery-migrate": "libs/jquery-migrate-3.3.0",
"text": "libs/text-2.0.15"
},
shim: {
"jquery-migrate": {
deps: ["jquery"],
exports: "jQuery"
},
"handlebars": {
exports: "handlebars"
},
Expand All @@ -45,7 +51,7 @@ require.config({
});

require([
"jquery",
"jquery-migrate",
"handlebars",
"org/forgerock/commons/ui/common/main/Configuration",
"org/forgerock/openam/ui/common/util/Constants",
Expand Down
13 changes: 9 additions & 4 deletions openam-ui/openam-ui-ria/src/main/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* information: "Portions copyright [year] [name of copyright owner]".
*
* Portions copyright 2011-2016 ForgeRock AS.
* Portions copyright 2019 Open Source Solution Technology Corporation
* Portions copyright 2019-2020 Open Source Solution Technology Corporation
*/

require.config({
Expand Down Expand Up @@ -47,14 +47,15 @@ require.config({
"bootstrap" : "libs/bootstrap-3.4.1-openam-jp",
"bootstrap-datetimepicker": "libs/bootstrap-datetimepicker-4.14.30-min",
"bootstrap-dialog" : "libs/bootstrap-dialog-1.34.4-min",
"bootstrap-tabdrop" : "libs/bootstrap-tabdrop-1.0",
"bootstrap-tabdrop" : "libs/bootstrap-tabdrop-1.0-openam-jp",

"clockPicker" : "libs/bootstrap-clockpicker-0.0.7-0915edd-min",
"doTimeout" : "libs/jquery.ba-dotimeout-1.0-min",
"form2js" : "libs/form2js-2.0-769718a",
"handlebars" : "libs/handlebars-4.0.5",
"i18next" : "libs/i18next-1.7.3-min",
"jquery" : "libs/jquery-2.1.1-min",
"jquery" : "libs/jquery-3.5.1-min",
"jquery-migrate": "libs/jquery-migrate-3.3.0",
"js2form" : "libs/js2form-2.0-769718a",
"jsonEditor" : "libs/jsoneditor-0.7.23-custom",
"lodash" : "libs/lodash-3.10.1-min",
Expand All @@ -70,6 +71,10 @@ require.config({
"text": "libs/text-2.0.15"
},
shim: {
"jquery-migrate": {
deps: ["jquery"],
exports: "jQuery"
},
"autosizeInput": {
deps: ["jquery"],
exports: "autosizeInput"
Expand Down Expand Up @@ -163,7 +168,7 @@ require([
"org/forgerock/commons/ui/common/main/EventManager",

// other modules that are necessary to include to startup the app
"jquery",
"jquery-migrate",
"lodash",
"backbone",
"handlebars",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

define([
"jquery",
"jquery-migrate",
"qrcode"
], function ($, QRCodeReader) {

Expand Down
Loading