Skip to content

Commit 0e78904

Browse files
committed
j2sClazz.js for core/package.js
1 parent 745e298 commit 0e78904

File tree

6 files changed

+8
-41
lines changed

6 files changed

+8
-41
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20230212221227
1+
20230216091105
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20230212221227
1+
20230216091105
201 Bytes
Binary file not shown.

sources/net.sf.j2s.java.core/srcjs/js/j2sApplet.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -312,24 +312,6 @@ window.J2S = J2S = (function() {
312312
return $.ajax(info);
313313
}
314314

315-
J2S.$getScriptAsync = function(file, whenDone) {
316-
// bad news: if the file does not exist, this fails to call any error. apparently fixed in JQuery 2.0
317-
318-
if (J2S._nozcore) {
319-
file = file.replace(/\.z\.js/,".js");
320-
}
321-
return J2S.$ajax({
322-
url: file,
323-
type: "GET",
324-
dataType: "script",
325-
cache: "NO",
326-
statusCode: { 404: function() {alert("!")}},
327-
success: whenDone,
328-
error: whenDone
329-
});
330-
}
331-
332-
333315
var fixProtocol = function(url) {
334316
if (!J2S._isFile && url.indexOf("file://") >= 0)
335317
url = "http" + url.substring(4);

sources/net.sf.j2s.java.core/srcjs/js/j2sClazz.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2398,16 +2398,12 @@ _Loader.loadPackageClasspath = function (pkg, base, isIndex, fSuccess, mode, pt)
23982398
if (base) // critical for multiple applets
23992399
map["@" + pkg] = base;
24002400
if (isIndex && !isPkgDeclared && !J2S.getGlobal(pkg + ".registered")) {
2401-
// pkgRefCount++;
2401+
// the package idea has been deprecated
2402+
// the only package is core/package.js
24022403
if (pkg == "java")
24032404
pkg = "core" // JSmol -- moves java/package.js to core/package.js
2404-
2405-
if (fSuccess) {
2406-
J2S.$getScriptAsync(_Loader.getClasspathFor(pkg + ".package"), fSuccess);
2407-
return;
2408-
}
2405+
// not really asynchronous
24092406
_Loader.loadClass(pkg + ".package", null, true, true, 1);
2410-
return;
24112407
}
24122408
fSuccess && fSuccess();
24132409
};

sources/net.sf.j2s.java.core/srcjs/swingjs2.js

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10998,13 +10998,6 @@ window.J2S = J2S = (function() {
1099810998
return $.ajax(info);
1099910999
}
1100011000

11001-
J2S.$getScriptAsync = function(file, whenDone) {
11002-
if (J2S._nozcore) {
11003-
file = file.replace(/\.z\.js/,".js");
11004-
}
11005-
return $.getScript(file, whenDone);
11006-
}
11007-
1100811001
var fixProtocol = function(url) {
1100911002
if (!J2S._isFile && url.indexOf("file://") >= 0)
1101011003
url = "http" + url.substring(4);
@@ -16459,16 +16452,12 @@ _Loader.loadPackageClasspath = function (pkg, base, isIndex, fSuccess, mode, pt)
1645916452
if (base) // critical for multiple applets
1646016453
map["@" + pkg] = base;
1646116454
if (isIndex && !isPkgDeclared && !J2S.getGlobal(pkg + ".registered")) {
16462-
// pkgRefCount++;
16455+
// the package idea has been deprecated
16456+
// the only package is core/package.js
1646316457
if (pkg == "java")
1646416458
pkg = "core" // JSmol -- moves java/package.js to core/package.js
16465-
16466-
if (fSuccess) {
16467-
J2S.$getScriptAsync(_Loader.getClasspathFor(pkg + ".package"), fSuccess);
16468-
return;
16469-
}
16459+
// not really asynchronous
1647016460
_Loader.loadClass(pkg + ".package", null, true, true, 1);
16471-
return;
1647216461
}
1647316462
fSuccess && fSuccess();
1647416463
};

0 commit comments

Comments
 (0)