Documentation of ECLERD

Documentation generated on using project's JS sources

HTML attributes

form[data-disabled]

Disable a form forever.
Its data-on-success will be removed, all its inputs (including those with form="theIdOfTheForm") will be disabled, and the submit event will be locked with a user error message.
So this is a no-way-back thing: you cannot toggle the form back to its "enabled" state. in file /resources/template/web/form.js

form[data-on-success]

Sets that a form will be submitted using AJAX. The valid values for this attribute are:
message
(empty value)
The default value (empty attribute) is "message", meaning that the server's response will be used to display a tooltip to the player.
reload:this
You reload only the current browsing context (the iframe itself if inside an iframe) Note that the message will also be displayed, after the reloading is done (delayed message)
reload:global
You reload the whole page (the tab, even if you currently are in an iframe) Note that the message will also be displayed, after the reloading is done (delayed message)
goto:/url/absolute/or/relative
The current browing context will go to the specified URL Note that the message will also be displayed, after the reloading is done (delayed message)
event-lock:eventName
The form will stay locked, and a CustomEvent with name "eventName" will be dispatched on the form. The event detail will be the server's response (usually, an object with ".row.message" fields). The "row" name comes from internal code: I use a generic "Single Row" bean. Note that this is the only value that brings no message by default: you must call the message display method in you event handler if you want a message to be shown.
in file /resources/template/web/form.js

a[data-opens-in]

Opens the anchor in an iframe.
This is very similar to the "target" default attribute, except that the iframe Node is created on the fly, and added to the DOM. This is the only way I found so Firefox won't show a white screen when changing page in the top most browsing level. If I put the iframe in the web page, then when I change the tab's URL
(not the iframe's URL) by clicking a normal link, then I get a white page during the loading.
Creating the iframe on the fly avoids that. in file /resources/template/web/form.js

a:not([data-opens-in])

Take the current browsing context's HTTP Accept value from its URL ("http-accept" GET parameter) and apply it to all the anchor elements that open in this browsing context.
This is useful so when a context requires a specific template (ie: iframe of researches) then clicking a link in this browsing context will keep that template through the value of http-accept in GET parameter which is overriding the HTTP Accept header for the server. in file /resources/template/web/form.js

.submit-on-change

Put this on a form field, and the form will be auto-submitted when the input is changed.
Works for any input, textarea, select, etc.
Even for non-input elements (so long a "change" event is dispatched).
Put this on the "form" tag and any input change will submit the form
(it's the preferred way if any input change must submit the form)
Note that listener is on the field and not on the form because the form might not be an ancestor of the input, so event might not boil up to the form. in file /resources/template/web/form.js

.close-frame

Indicates that this anchor/button (or whatever) closes the iframe it's in. in file /resources/template/web/form.js

img[alt]:not([alt=""]):not([title])

Automatically set the image title according to its alt. in file /resources/template/web/web.js

time[datetime]:not([title])

Formats the date on "time" HTML elements.
Set a custom title to avoid this behavior. in file /resources/template/web/web.js

.go-back

Does a history.back() when clicked in file /resources/template/web/web.js

input[type="checkbox"][readonly]

Forbid changing readonly checkboxes (this is not the default behavior of HTML) in file /resources/template/web/web.js

All endpoints (Open API JSON)

This is the list of all project's URLs. If the HTTP verb is POST then the endpoint cannot be GET called.
All endpoints can be contacted with the HTTP Accept header of your choice. You can also use the http-accept GET parameter. You can also use the http-accept GET parameter. So /url/?http-accept=application/json is the same as /url/ with Accept: application/json HTTP header, and it returns the page's data formatted in JSON.

POST /player/myprofile/avatar/

Not documented
Name Description
avatar Not documented

GET /player/myprofile/

Not documented

POST /player/myprofile/password/

Not documented
Name Description
old-password Not documented
new-password Not documented

POST /player/myprofile/pseudo/

Not documented
Name Description
pseudo Not documented
password Not documented

POST /player/myprofile/email/

Not documented
Name Description
email Not documented
password Not documented

GET /player/myprofile/email/validate/

Not documented
Name Description
idPlayer Not documented
hashedEmail Not documented
expires Not documented
signature Not documented
source Not documented

GET /player/identify/

Not documented
Name Description
show-warning Not documented

POST /player/identify/register/submit/

Not documented
Name Description
register-pseudo Not documented
register-password Not documented
register-email Not documented

POST /player/identify/logout/submit/

Not documented

POST /player/identify/login/submit/

Not documented
Name Description
login-pseudo Not documented
login-password Not documented

POST /player/messages/send/

Not documented
Name Description
idOtherPlayer Not documented
message Not documented

GET /player/messages/singlethread/

Not documented
Name Description
idOtherPlayer Not documented

GET /player/messages/alls/

Not documented

POST /player/messages/blocking/

Not documented
Name Description
idOtherPlayer Not documented
block Not documented

GET /map/world/

Map of the game's world.
Shows up the countries, the different available zooms and some global statistics. These stats are not computed on the fly, since it would be far too heavy, so they might be a bit outdated?!

POST /map/world/starton/

Not documented
Name Description
idCountry Not documented
idMapcase Not documented

GET /map/mapcase/diplomacy/

Not documented
Name Description
idMapcase Not documented

POST /map/mapcase/diplomacy/submit/troups/

Not documented
Name Description
idMapcaseSource Not documented
idMapcaseTarget Not documented
mission Not documented
troups Not documented

POST /map/mapcase/diplomacy/submit/people/

Not documented
Name Description
idMapcaseSource Not documented
idMapcaseTarget Not documented
peopleType Not documented
troups Not documented

GET /map/mapcase/construction/demolish/

Not documented
Name Description
idMapcase Not documented
idBuilding Not documented

POST /map/mapcase/construction/demolish/submit/

Not documented
Name Description
idMapcase Not documented

POST /map/mapcase/construction/construction/submit/

Not documented
Name Description
idMapcase Not documented
idBuilding Not documented

GET /map/mapcase/construction/construction/

Not documented
Name Description
idMapcase Not documented
idBuilding Not documented

GET /map/mapcase/construction/liste/

Not documented
Name Description
id Not documented

GET /map/mapcase/construction/operationnal/

Not documented
Name Description
idMapcase Not documented
idBuilding Not documented

GET /map/mapcase/construction/infos/

Not documented
Name Description
idMapcase Not documented

POST /map/mapcase/economy/moveresource/

Not documented
Name Description
idResource Not documented
idCurrentMapcase Not documented
idOtherMapcase Not documented
quantity Not documented
direction Not documented

GET /map/mapcase/economy/

Not documented
Name Description
idMapcase Not documented

GET /map/mapcase/environment/

Not documented
Name Description
idMapcase Not documented

GET /map/mapcase/

Not documented
Name Description
id Not documented

POST /map/country/research/submit/

Not documented
Name Description
idResearch Not documented
idMapcase Not documented

GET /map/country/research/

Not documented
Name Description
idPlayer Not documented
idMapcase Not documented

GET /map/country/research/infos/

Not documented
Name Description
idResearch Not documented
idMapcase Not documented
idCountry Not documented

POST /map/country/diplomacy/submit/

Not documented
Name Description
idOtherPlayer Not documented
canSendResources Not documented
canTakeResources Not documented
canSendPeople Not documented
canSeeGameInfos Not documented
isAllied Not documented

GET /map/country/diplomacy/

Not documented
Name Description
idCountry Not documented

GET /map/country/social/

Not documented
Name Description
idCountry Not documented

POST /map/country/laws/submit/

Not documented
Name Description
holidayWeeksPerYear Not documented
workingHoursPerDay Not documented
workingDaysPerWeek Not documented
educationUntilAge Not documented
retirementAge Not documented
natalityAgeMin Not documented
natalityAgeMax Not documented
natalityChildren Not documented

GET /map/country/laws/

Not documented
Name Description
idCountry Not documented

GET /map/country/economy/

Shows economic infos about a specific country.
The country might not be the current connected player's one.
Name Description
idCountry Not documented

GET /map/country/environment/

Not documented
Name Description
idCountry Not documented

GET /map/country/

Not documented
Name Description
id Not documented

POST /map/country/timeshift/

Not documented
Name Description
timeShift Not documented

POST /map/clickmap/

Not documented
Name Description
x Not documented
y Not documented

POST /map/balanceall/

Not documented
Name Description
idMapcase Not documented

You may try this viewer