Skip to content

Commit

Permalink
Merge branch 'feature/directlink' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Lionel Laské committed May 4, 2024
2 parents 70facc1 + a49463c commit e9a9e80
Show file tree
Hide file tree
Showing 77 changed files with 1,075 additions and 23 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Launch activity directly from url of CLI

### Fixed
- Images go under each other while editing in Fototoon #1552
- Missalignment of icons and text in Fototoon activity "clean all" button #1596
Expand Down
17 changes: 17 additions & 0 deletions activities/Abacus.activity/lib/sugar-web/activity/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ define(["sugar-web/activity/shortcut",

datastoreObject = new datastore.DatastoreObject();

datastore.localStorage.load(function() {
var preferences = datastore.localStorage.getValue('sugar_settings');
if (preferences != null && preferences.name !== undefined) {
return;
}
if (window.location.protocol != "file:") {
location.href = window.location.protocol + "//" + window.location.host + "?redirect=" + encodeURIComponent(window.location.href);
} else {
let server = window.location.pathname.substring(0, window.location.pathname.indexOf("index.html"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
location.href = server + "/index.html?redirect=" + encodeURIComponent(window.location.href);
}
return;
});

var activityButton = document.getElementById("activity-button");

var activityPalette = new activitypalette.ActivityPalette(
Expand Down
17 changes: 17 additions & 0 deletions activities/Abecedarium.activity/lib/sugar-web/activity/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ define(["sugar-web/activity/shortcut",

datastoreObject = new datastore.DatastoreObject();

datastore.localStorage.load(function() {
var preferences = datastore.localStorage.getValue('sugar_settings');
if (preferences != null && preferences.name !== undefined) {
return;
}
if (window.location.protocol != "file:") {
location.href = window.location.protocol + "//" + window.location.host + "?redirect=" + encodeURIComponent(window.location.href);
} else {
let server = window.location.pathname.substring(0, window.location.pathname.indexOf("index.html"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
location.href = server + "/index.html?redirect=" + encodeURIComponent(window.location.href);
}
return;
});

var activityButton = document.getElementById("activity-button");

var activityPalette = new activitypalette.ActivityPalette(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ define(["sugar-web/activity/shortcut",

datastoreObject = new datastore.DatastoreObject();

datastore.localStorage.load(function() {
var preferences = datastore.localStorage.getValue('sugar_settings');
if (preferences != null && preferences.name !== undefined) {
return;
}
if (window.location.protocol != "file:") {
location.href = window.location.protocol + "//" + window.location.host + "?redirect=" + encodeURIComponent(window.location.href);
} else {
let server = window.location.pathname.substring(0, window.location.pathname.indexOf("index.html"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
location.href = server + "/index.html?redirect=" + encodeURIComponent(window.location.href);
}
return;
});

var activityButton = document.getElementById("activity-button");

var activityPalette = new activitypalette.ActivityPalette(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ define(["sugar-web/activity/shortcut",

datastoreObject = new datastore.DatastoreObject();

datastore.localStorage.load(function() {
var preferences = datastore.localStorage.getValue('sugar_settings');
if (preferences != null && preferences.name !== undefined) {
return;
}
if (window.location.protocol != "file:") {
location.href = window.location.protocol + "//" + window.location.host + "?redirect=" + encodeURIComponent(window.location.href);
} else {
let server = window.location.pathname.substring(0, window.location.pathname.indexOf("index.html"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
location.href = server + "/index.html?redirect=" + encodeURIComponent(window.location.href);
}
return;
});

var activityButton = document.getElementById("activity-button");

var activityPalette = new activitypalette.ActivityPalette(
Expand Down
17 changes: 17 additions & 0 deletions activities/Blockrain.activity/lib/sugar-web/activity/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ define(["sugar-web/activity/shortcut",

datastoreObject = new datastore.DatastoreObject();

datastore.localStorage.load(function() {
var preferences = datastore.localStorage.getValue('sugar_settings');
if (preferences != null && preferences.name !== undefined) {
return;
}
if (window.location.protocol != "file:") {
location.href = window.location.protocol + "//" + window.location.host + "?redirect=" + encodeURIComponent(window.location.href);
} else {
let server = window.location.pathname.substring(0, window.location.pathname.indexOf("index.html"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
location.href = server + "/index.html?redirect=" + encodeURIComponent(window.location.href);
}
return;
});

var activityButton = document.getElementById("activity-button");

var activityPalette = new activitypalette.ActivityPalette(
Expand Down
17 changes: 17 additions & 0 deletions activities/Calculate.activity/lib/sugar-web/activity/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ define(["sugar-web/activity/shortcut",

datastoreObject = new datastore.DatastoreObject();

datastore.localStorage.load(function() {
var preferences = datastore.localStorage.getValue('sugar_settings');
if (preferences != null && preferences.name !== undefined) {
return;
}
if (window.location.protocol != "file:") {
location.href = window.location.protocol + "//" + window.location.host + "?redirect=" + encodeURIComponent(window.location.href);
} else {
let server = window.location.pathname.substring(0, window.location.pathname.indexOf("index.html"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
location.href = server + "/index.html?redirect=" + encodeURIComponent(window.location.href);
}
return;
});

var activityButton = document.getElementById("activity-button");

var activityPalette = new activitypalette.ActivityPalette(
Expand Down
17 changes: 17 additions & 0 deletions activities/Calligra.activity/lib/sugar-web/activity/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ define(["sugar-web/activity/shortcut",

datastoreObject = new datastore.DatastoreObject();

datastore.localStorage.load(function() {
var preferences = datastore.localStorage.getValue('sugar_settings');
if (preferences != null && preferences.name !== undefined) {
return;
}
if (window.location.protocol != "file:") {
location.href = window.location.protocol + "//" + window.location.host + "?redirect=" + encodeURIComponent(window.location.href);
} else {
let server = window.location.pathname.substring(0, window.location.pathname.indexOf("index.html"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
location.href = server + "/index.html?redirect=" + encodeURIComponent(window.location.href);
}
return;
});

var activityButton = document.getElementById("activity-button");

var activityPalette = new activitypalette.ActivityPalette(
Expand Down
17 changes: 17 additions & 0 deletions activities/Chart.activity/lib/sugar-web/activity/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ define(["sugar-web/activity/shortcut",

datastoreObject = new datastore.DatastoreObject();

datastore.localStorage.load(function() {
var preferences = datastore.localStorage.getValue('sugar_settings');
if (preferences != null && preferences.name !== undefined) {
return;
}
if (window.location.protocol != "file:") {
location.href = window.location.protocol + "//" + window.location.host + "?redirect=" + encodeURIComponent(window.location.href);
} else {
let server = window.location.pathname.substring(0, window.location.pathname.indexOf("index.html"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
location.href = server + "/index.html?redirect=" + encodeURIComponent(window.location.href);
}
return;
});

var activityButton = document.getElementById("activity-button");

var activityPalette = new activitypalette.ActivityPalette(
Expand Down
17 changes: 17 additions & 0 deletions activities/Chat.activity/lib/sugar-web/activity/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ define(["sugar-web/activity/shortcut",

datastoreObject = new datastore.DatastoreObject();

datastore.localStorage.load(function() {
var preferences = datastore.localStorage.getValue('sugar_settings');
if (preferences != null && preferences.name !== undefined) {
return;
}
if (window.location.protocol != "file:") {
location.href = window.location.protocol + "//" + window.location.host + "?redirect=" + encodeURIComponent(window.location.href);
} else {
let server = window.location.pathname.substring(0, window.location.pathname.indexOf("index.html"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
location.href = server + "/index.html?redirect=" + encodeURIComponent(window.location.href);
}
return;
});

var activityButton = document.getElementById("activity-button");

var activityPalette = new activitypalette.ActivityPalette(
Expand Down
17 changes: 17 additions & 0 deletions activities/Chess.activity/lib/sugar-web/activity/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ define(["sugar-web/activity/shortcut",

datastoreObject = new datastore.DatastoreObject();

datastore.localStorage.load(function() {
var preferences = datastore.localStorage.getValue('sugar_settings');
if (preferences != null && preferences.name !== undefined) {
return;
}
if (window.location.protocol != "file:") {
location.href = window.location.protocol + "//" + window.location.host + "?redirect=" + encodeURIComponent(window.location.href);
} else {
let server = window.location.pathname.substring(0, window.location.pathname.indexOf("index.html"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
location.href = server + "/index.html?redirect=" + encodeURIComponent(window.location.href);
}
return;
});

var activityButton = document.getElementById("activity-button");

var activityPalette = new activitypalette.ActivityPalette(
Expand Down
17 changes: 17 additions & 0 deletions activities/Clock.activity/lib/sugar-web/activity/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ define(["sugar-web/activity/shortcut",

datastoreObject = new datastore.DatastoreObject();

datastore.localStorage.load(function() {
var preferences = datastore.localStorage.getValue('sugar_settings');
if (preferences != null && preferences.name !== undefined) {
return;
}
if (window.location.protocol != "file:") {
location.href = window.location.protocol + "//" + window.location.host + "?redirect=" + encodeURIComponent(window.location.href);
} else {
let server = window.location.pathname.substring(0, window.location.pathname.indexOf("index.html"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
location.href = server + "/index.html?redirect=" + encodeURIComponent(window.location.href);
}
return;
});

var activityButton = document.getElementById("activity-button");

var activityPalette = new activitypalette.ActivityPalette(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ define(["sugar-web/activity/shortcut",

datastoreObject = new datastore.DatastoreObject();

datastore.localStorage.load(function() {
var preferences = datastore.localStorage.getValue('sugar_settings');
if (preferences != null && preferences.name !== undefined) {
return;
}
if (window.location.protocol != "file:") {
location.href = window.location.protocol + "//" + window.location.host + "?redirect=" + encodeURIComponent(window.location.href);
} else {
let server = window.location.pathname.substring(0, window.location.pathname.indexOf("index.html"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
location.href = server + "/index.html?redirect=" + encodeURIComponent(window.location.href);
}
return;
});

var activityButton = document.getElementById("activity-button");

var activityPalette = new activitypalette.ActivityPalette(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ define(["sugar-web/activity/shortcut",

datastoreObject = new datastore.DatastoreObject();

datastore.localStorage.load(function() {
var preferences = datastore.localStorage.getValue('sugar_settings');
if (preferences != null && preferences.name !== undefined) {
return;
}
if (window.location.protocol != "file:") {
location.href = window.location.protocol + "//" + window.location.host + "?redirect=" + encodeURIComponent(window.location.href);
} else {
let server = window.location.pathname.substring(0, window.location.pathname.indexOf("index.html"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
location.href = server + "/index.html?redirect=" + encodeURIComponent(window.location.href);
}
return;
});

var activityButton = document.getElementById("activity-button");

var activityPalette = new activitypalette.ActivityPalette(
Expand Down
17 changes: 17 additions & 0 deletions activities/Curriculum.activity/lib/sugar-web/activity/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ define(["sugar-web/activity/shortcut",

datastoreObject = new datastore.DatastoreObject();

datastore.localStorage.load(function() {
var preferences = datastore.localStorage.getValue('sugar_settings');
if (preferences != null && preferences.name !== undefined) {
return;
}
if (window.location.protocol != "file:") {
location.href = window.location.protocol + "//" + window.location.host + "?redirect=" + encodeURIComponent(window.location.href);
} else {
let server = window.location.pathname.substring(0, window.location.pathname.indexOf("index.html"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
location.href = server + "/index.html?redirect=" + encodeURIComponent(window.location.href);
}
return;
});

var activityButton = document.getElementById("activity-button");

var activityPalette = new activitypalette.ActivityPalette(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ define(["sugar-web/activity/shortcut",

datastoreObject = new datastore.DatastoreObject();

datastore.localStorage.load(function() {
var preferences = datastore.localStorage.getValue('sugar_settings');
if (preferences != null && preferences.name !== undefined) {
return;
}
if (window.location.protocol != "file:") {
location.href = window.location.protocol + "//" + window.location.host + "?redirect=" + encodeURIComponent(window.location.href);
} else {
let server = window.location.pathname.substring(0, window.location.pathname.indexOf("index.html"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
location.href = server + "/index.html?redirect=" + encodeURIComponent(window.location.href);
}
return;
});

var activityButton = document.getElementById("activity-button");

var activityPalette = new activitypalette.ActivityPalette(
Expand Down
17 changes: 17 additions & 0 deletions activities/EbookReader.activity/lib/sugar-web/activity/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@ define(["sugar-web/activity/shortcut",

datastoreObject = new datastore.DatastoreObject();

datastore.localStorage.load(function() {
var preferences = datastore.localStorage.getValue('sugar_settings');
if (preferences != null && preferences.name !== undefined) {
return;
}
if (window.location.protocol != "file:") {
location.href = window.location.protocol + "//" + window.location.host + "?redirect=" + encodeURIComponent(window.location.href);
} else {
let server = window.location.pathname.substring(0, window.location.pathname.indexOf("index.html"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
server = server.substring(0, server.lastIndexOf("/"));
location.href = server + "/index.html?redirect=" + encodeURIComponent(window.location.href);
}
return;
});

var activityButton = document.getElementById("activity-button");

var activityPalette = new activitypalette.ActivityPalette(
Expand Down
Loading

0 comments on commit e9a9e80

Please sign in to comment.