Skip to content

Commit

Permalink
Merge branch 'master' into websockets
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan Brichau committed Dec 27, 2022
2 parents 64c3a5b + 3bae043 commit 9efdaf3
Show file tree
Hide file tree
Showing 119 changed files with 554 additions and 415 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@ jobs:
continue-on-error: ${{ matrix.experimental }}
name: ${{ matrix.smalltalk }}
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H:%M:%S')"
- name: Log date
run: echo "${{ steps.date.outputs.date }}"
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.workflow_dispatch.ref }}
- uses: hpi-swa/setup-smalltalkCI@v1
Expand Down
29 changes: 13 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,19 @@ To install the latest stable version of Seaside in a [Gemstone](https://gemtalks
load: #('Development' 'Examples' 'Zinc') ].
```

### Instructions for VAST

Seaside is an official vendor supported framework that can be installed using VAST's feature loading tool GUI. In addition, it can be installed programmatically as shown below. VAST fork is at https://github.com/instantiations/Seaside

#### Load Seaside
To install the latest stable version of Seaside in a [VAST Platform](https://www.instantiations.com/vast-platform/) image, execute the following code:

```Smalltalk
(EmConfigurationMap editionsFor: 'z.ST: Server Smalltalk (SST) - Seaside')
first loadWithRequiredMaps
```


### Instructions for Squeak

#### Squeak >= 5.2
Expand Down Expand Up @@ -112,22 +125,6 @@ Metacello new
```


### Instructions for VAST Platform

Seaside is an official vendor supported framework that can be installed using VAST's feature loading tool GUI. In addition, it can be installed programmatically as shown below.

#### Load Seaside
To install the latest stable version of Seaside in a [VAST Platform](https://www.instantiations.com/vast-platform/) image, execute the following code:

```Smalltalk
(EmConfigurationMap editionsFor: 'z.ST: Server Smalltalk (SST) - Seaside')
first loadWithRequiredMaps
```





## Community
Check out the Add-on libraries and projects related to Seaside: https://github.com/SeasideSt/Seaside/wiki/Add-On-Libraries

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ baselinejavascript: spec
package: 'Javascript-Core' with: [
spec requires: #('Seaside-Core' 'Seaside-Canvas' ) ];
package: 'Javascript-Tests-Core' with: [
spec requires: #('Javascript-Core' 'Seaside-Tests-Core' ) ].
spec requires: #('Javascript-Core' 'Seaside-Tests-Core' ) ];
package: 'Seaside-Ajaxifier-Core' with: [
spec requires: #('Seaside-Core') ].
spec
group: 'Javascript' with: #('Javascript-Core');
group: 'Javascript Tests' with: #('Javascript-Tests-Core' );
group: 'Tests' with: #( 'Javascript Tests' ) ].
group: 'Tests' with: #( 'Javascript Tests' );
group: 'Ajaxifier' with: #( 'Seaside-Ajaxifier-Core' ) ].

spec for: #squeak do: [
spec
Expand Down Expand Up @@ -47,4 +50,4 @@ baselinejavascript: spec
package: 'Javascript-Core'
with: [ spec includes: #('Javascript-GemStone-Core') ];
package: 'Javascript-GemStone-Core'
with: [ spec requires: #('Javascript-Core') ] ].
with: [ spec requires: #('Javascript-Core') ] ].
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ baselinejquery: spec
package: 'JQuery-Core' with: [
spec requires: #('Javascript-Core' ) ];
package: 'JQuery-Tests-Core' with: [
spec requires: #('JQuery-Core' 'Javascript-Tests-Core' 'Seaside-Development' 'Seaside-Tests-Functional') ];
spec requires: #('JQuery-Core' 'Javascript-Tests-Core' 'Seaside-Development' 'Seaside-Tests-Functional' 'Seaside-Ajaxifier-Core') ];
package: 'JQuery-JSON' with: [
spec requires: #('JQuery-Core' 'Seaside-JSON-Core') ];
package: 'JQuery-Tests-JSON' with: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,8 @@ baselinesqueak: spec
package: 'Seaside-Tests-Core' with: [ spec includes: #('Seaside-Tests-Squeak-Core') ];
package: 'Seaside-Tests-Squeak-Core' with: [ spec requires: #('Seaside-Squeak-Core' 'Seaside-Tests-Core') ];
package: 'Seaside-Tests-Pharo-Functional' with: [ spec requires: #('Seaside-Tests-Squeak-Core') ];
package: 'Seaside-Pharo-Email' with: [ spec requires: #('Seaside-Email' 'Seaside-Squeak-Core') ] ].

"ToolBuilder based tools"
spec for: #(#'squeak4.6.x' #'squeak5.x') do: [
spec
package: 'Seaside-Tools-Core' with: [
spec includes: #('Seaside-Squeak-Tools-Development') ];
package: 'Seaside-Squeak-Tools-Development' with: [
spec requires: #('Seaside-Tools-Core') ]
].
package: 'Seaside-Pharo-Email' with: [ spec requires: #('Seaside-Email' 'Seaside-Squeak-Core') ];

"ToolBuilder based tools"
package: 'Seaside-Tools-Core' with: [ spec includes: #('Seaside-Squeak-Tools-Development') ];
package: 'Seaside-Squeak-Tools-Development' with: [ spec requires: #('Seaside-Tools-Core') ] ]

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ initialize
application
preferenceAt: #sessionClass put: WAExpirySession;
addLibrary: JQDeploymentLibrary;
addLibrary: JQAjaxifierLibrary
addLibrary: WAAjaxifierLibrary
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ renderContentOn: html
#( bounce highlight pulsate shake size transfer ) do: [ :each |
html anchor
onClick: (self
perform: each asMutator
perform: each greaseAsMutator
with: (html jQuery: '.box') effect);
with: each ] ].
self renderBoxOn: html
5 changes: 5 additions & 0 deletions repository/Seaside-Ajaxifier-Core.package/.filetree
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"separateMethodMetaAndSource" : false,
"noMethodMetaData" : true,
"useCypressPropertiesFile" : true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I ajaxify a web application by turning full page requests into background AJAX requests.
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
uploads
ajaxifierJs
^ '/* JavaScript based Ajaxifier
* Copyright (c) 2008 Lukas Renggli, [email protected]
* Copyright (c) 2022 Philippe Marschall, [email protected]
*/
"use strict";
window.addEventListener("DOMContentLoaded", (loadEvent) => {
// variables
let activeHash = "";
// ajax action
function load(type, url, data, modifyHistory) {
const xhr = new XMLHttpRequest();
xhr.responseType = "document"
xhr.addEventListener("load", (event) => {
if (xhr.status === 200) {
Array.from(xhr.response.head.children).forEach((child) => {
if (child.nodeType === Node.ELEMENT_NODE && child.nodeName === "SCRIPT") {
child.remove();
}
});
document.head.innerHTML = xhr.response.head.innerHTML;
document.body = xhr.response.body;
if (modifyHistory) {
const path = xhr.responseURL;
window.history.pushState(path, null, path);
}
}
});
xhr.open(type, url);
// WAActionCallback per default are disabled for AJAX requests
// Detection happens with X-Requested-With so we override it
xhr.setRequestHeader("X-Requested-With", "Ajaxifier");
xhr.send(data);
}
// click handler
document.addEventListener("click", (event) => {
// links
const anchor = event.target.closest("a");
if (anchor !== null) {
load("GET", anchor.getAttribute("href"), null, true);
event.preventDefault();
return;
}
// submit
const submit = event.target.closest("input[type=submit], button[type=submit]");
if (submit !== null) {
const form = submit.closest("form");
if (form !== null) {
const formData = new FormData(form);
formData.append(submit.getAttribute("name"), "");
load("POST", form.getAttribute("action"), formData, true);
event.preventDefault();
}
}
});
// check for changes in the hash
setInterval(() => {
const currentHash = window.location.hash.substr(1);
if (currentHash !== activeHash)
load("GET", "?" + (activeHash = currentHash), null, true);
}, 250);
// We assume nobody else will override onpopstate... since we are LIKELY the only ones to use pushstate etc.
window.onpopstate = (event) => {
load("GET", event.state, null, false);
}
});'
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commentStamp" : "",
"commentStamp" : "pmm 8/25/2022 15:03",
"super" : "WAFileLibrary",
"category" : "JQuery-Core-Libraries",
"category" : "Seaside-Ajaxifier-Core",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "JQAjaxifierLibrary",
"name" : "WAAjaxifierLibrary",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SystemOrganization addCategory: #'Seaside-Ajaxifier-Core'!
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(name 'Seaside-Ajaxifier-Core')
1 change: 1 addition & 0 deletions repository/Seaside-Ajaxifier-Core.package/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ }
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ on: aSelector of: anObject
self selected: (anObject perform: aSelector).
self callback: (GRDelayedSend
receiver: anObject
selector: aSelector asMutator)
selector: aSelector greaseAsMutator)
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ on: aSelector of: anObject
self value: (anObject perform: aSelector).
self callback: (GRDelayedSend
receiver: anObject
selector: aSelector asMutator)
selector: aSelector greaseAsMutator)
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ callbacks
on: aSelector of: anObject
self callback: (GRDelayedSend
receiver: anObject
selector: aSelector asMutator)
selector: aSelector greaseAsMutator)
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ on: aSelector of: anObject
self value: (anObject perform: aSelector).
self callback: (GRDelayedSend
receiver: anObject
selector: aSelector asMutator)
selector: aSelector greaseAsMutator)
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
seasideVersion
"Answer the Seaside version"

^ (GRVersion major: 3 minor: 4 revision: 8)
^ (GRVersion major: 3 minor: 5 revision: 0)
yourself
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
private
compileText: aByteArrayOrString selector: aSymbol
"Compiles aByteArrayOrString into a method named aSymbol that returns aByteArrayOrString as a string literal.
aSymbol
^ aByteArrayOrString"
"Compiles aByteArrayOrString into a method named aSymbol that returns aByteArrayOrString as a string literal."
| code |
code := String streamContents: [ :stream |
stream
nextPutAll: aSymbol;
nextPut: Character cr.
stream
tab;
nextPutAll: '^ '''.
aByteArrayOrString greaseString do: [ :each |
each = $' ifTrue: [ stream nextPut: $' ].
stream nextPut: each ].
stream nextPut: $' ].
code := GRPlatform current asMethodReturningString: aByteArrayOrString named: aSymbol.
GRPlatform current
compile: code
into: self
Expand Down
Loading

0 comments on commit 9efdaf3

Please sign in to comment.