TANK OPERATION
diff --git a/activities/ChatPrototype.activity/js/loader.js b/activities/ChatPrototype.activity/js/loader.js index 6ca5783bf..a1d7779bd 100644 --- a/activities/ChatPrototype.activity/js/loader.js +++ b/activities/ChatPrototype.activity/js/loader.js @@ -1,38 +1,33 @@ var l10n_s; requirejs.config({ - baseUrl: "lib", - paths: { - activity: "../js" - } + baseUrl: "lib", + paths: { + activity: "../js" + } }); requirejs(["activity/activity"]); -requirejs(["webL10n","sugar-web/env"], function(l10n, env) { - l10n_s = l10n; //global declaration of translate interface +requirejs(["webL10n","sugar-web/env","sugar-web/datastore"], function(l10n, env ,datastore) { + l10n_s = l10n; //global declaration of translate interface - getSettings(function(settings) { //globally setting language from sugar settings + datastore.localStorage.load(function() { + getSettings(function(settings) { //globally setting language from sugar settings l10n_s.language.code = settings.language; + }); }); function getSettings(callback) { var defaultSettings = { name: "", - language: navigator.language + language: (typeof chrome != 'undefined' && chrome.app && chrome.app.runtime) ? chrome.i18n.getUILanguage() : navigator.language }; if (!env.isSugarizer()) { callback(defaultSettings); return; } - if (typeof chrome != 'undefined' && chrome.app && chrome.app.runtime) { - var loadedSettings = JSON.parse(values.sugar_settings); - chrome.storage.local.get('sugar_settings', function(values) { - callback(loadedSettings); - }); - } else { - var loadedSettings = JSON.parse(localStorage.sugar_settings); - callback(loadedSettings); - } + loadedSettings = datastore.localStorage.getValue('sugar_settings'); + callback(loadedSettings); } }); diff --git a/activities/Clock.activity/js/activity.js b/activities/Clock.activity/js/activity.js index e483c453c..f8d39a6b3 100644 --- a/activities/Clock.activity/js/activity.js +++ b/activities/Clock.activity/js/activity.js @@ -1,4 +1,4 @@ -define(["sugar-web/activity/activity","sugar-web/graphics/radiobuttonsgroup","mustache","moment-with-locales.min"], function (activity,radioButtonsGroup,mustache,moment) { +define(["sugar-web/activity/activity","sugar-web/graphics/radiobuttonsgroup","mustache","moment-with-locales.min","webL10n"], function (activity,radioButtonsGroup,mustache,moment) { // Manipulate the DOM only when it is ready. require(['domReady!'], function (doc) { diff --git a/activities/Clock.activity/js/loader.js b/activities/Clock.activity/js/loader.js index b7f4534c8..cfe0c7a42 100644 --- a/activities/Clock.activity/js/loader.js +++ b/activities/Clock.activity/js/loader.js @@ -1,39 +1,34 @@ var l10n_s; requirejs.config({ - baseUrl: "lib", - paths: { - activity: "../js" - } + baseUrl: "lib", + paths: { + activity: "../js" + } }); requirejs(["activity/activity"]); -requirejs(["webL10n","sugar-web/env","moment-with-locales.min"], function(l10n, env, moment) { - l10n_s = l10n; //global declaration of translate interface +requirejs(["webL10n","sugar-web/env","moment-with-locales.min","sugar-web/datastore"], function(l10n, env, moment,datastore) { + l10n_s = l10n; //global declaration of translate interface - getSettings(function(settings) { //globally setting language from sugar settings + datastore.localStorage.load(function() { + getSettings(function(settings) { //globally setting language from sugar settings l10n_s.language.code = settings.language; moment.locale(settings.language); + }); }); - function getSettings(callback) { + function getSettings(callback) { var defaultSettings = { name: "", - language: navigator.language + language: (typeof chrome != 'undefined' && chrome.app && chrome.app.runtime) ? chrome.i18n.getUILanguage() : navigator.language }; if (!env.isSugarizer()) { callback(defaultSettings); return; } - if (typeof chrome != 'undefined' && chrome.app && chrome.app.runtime) { - var loadedSettings = JSON.parse(values.sugar_settings); - chrome.storage.local.get('sugar_settings', function(values) { - callback(loadedSettings); - }); - } else { - var loadedSettings = JSON.parse(localStorage.sugar_settings); - callback(loadedSettings); - } + loadedSettings = datastore.localStorage.getValue('sugar_settings'); + callback(loadedSettings); } }); diff --git a/activities/Clock.activity/lib/webL10n.js b/activities/Clock.activity/lib/webL10n.js index e9101be98..f76d66a5e 100644 --- a/activities/Clock.activity/lib/webL10n.js +++ b/activities/Clock.activity/lib/webL10n.js @@ -43,7 +43,7 @@ define(function (require) { * content until the `localized' event happens. */ - var gAsyncResourceLoading = false; // read-only + var gAsyncResourceLoading = true; // read-only /** @@ -807,7 +807,6 @@ define(function (require) { function getL10nData(key, args) { var data = gL10nData[key]; if (!data) { - l10nStartup(); consoleWarn('#' + key + ' missing for [' + gLanguage + ']'); } diff --git a/activities/GetThingsDone.activity/js/loader.js b/activities/GetThingsDone.activity/js/loader.js index b7f4534c8..085bb0b0c 100644 --- a/activities/GetThingsDone.activity/js/loader.js +++ b/activities/GetThingsDone.activity/js/loader.js @@ -1,39 +1,34 @@ var l10n_s; requirejs.config({ - baseUrl: "lib", - paths: { - activity: "../js" - } + baseUrl: "lib", + paths: { + activity: "../js" + } }); requirejs(["activity/activity"]); -requirejs(["webL10n","sugar-web/env","moment-with-locales.min"], function(l10n, env, moment) { - l10n_s = l10n; //global declaration of translate interface +requirejs(["webL10n","sugar-web/env","moment-with-locales.min","sugar-web/datastore"], function(l10n, env, moment,datastore) { + l10n_s = l10n; //global declaration of translate interface - getSettings(function(settings) { //globally setting language from sugar settings + datastore.localStorage.load(function() { + getSettings(function(settings) { //globally setting language from sugar settings l10n_s.language.code = settings.language; moment.locale(settings.language); + }); }); function getSettings(callback) { var defaultSettings = { name: "", - language: navigator.language + language: (typeof chrome != 'undefined' && chrome.app && chrome.app.runtime) ? chrome.i18n.getUILanguage() : navigator.language }; if (!env.isSugarizer()) { callback(defaultSettings); return; } - if (typeof chrome != 'undefined' && chrome.app && chrome.app.runtime) { - var loadedSettings = JSON.parse(values.sugar_settings); - chrome.storage.local.get('sugar_settings', function(values) { - callback(loadedSettings); - }); - } else { - var loadedSettings = JSON.parse(localStorage.sugar_settings); - callback(loadedSettings); - } + loadedSettings = datastore.localStorage.getValue('sugar_settings'); + callback(loadedSettings); } }); diff --git a/activities/Markdown.activity/js/loader.js b/activities/Markdown.activity/js/loader.js index 9c9d69332..4f9c6e809 100644 --- a/activities/Markdown.activity/js/loader.js +++ b/activities/Markdown.activity/js/loader.js @@ -12,31 +12,26 @@ requirejs.config({ requirejs(["activity/activity"]); -requirejs(["webL10n","sugar-web/env","moment-with-locales.min"], function(l10n, env, moment) { - l10n_s = l10n; //global declaration of translate interface +requirejs(["webL10n","sugar-web/env","moment-with-locales.min","sugar-web/datastore"], function(l10n, env, moment,datastore) { + l10n_s = l10n; //global declaration of translate interface - getSettings(function(settings) { //globally setting language from sugar settings + datastore.localStorage.load(function() { + getSettings(function(settings) { //globally setting language from sugar settings l10n_s.language.code = settings.language; moment.locale(settings.language); + }); }); - function getSettings(callback) { + function getSettings(callback) { var defaultSettings = { name: "", - language: navigator.language + language: (typeof chrome != 'undefined' && chrome.app && chrome.app.runtime) ? chrome.i18n.getUILanguage() : navigator.language }; if (!env.isSugarizer()) { callback(defaultSettings); return; } - if (typeof chrome != 'undefined' && chrome.app && chrome.app.runtime) { - var loadedSettings = JSON.parse(values.sugar_settings); - chrome.storage.local.get('sugar_settings', function(values) { - callback(loadedSettings); - }); - } else { - var loadedSettings = JSON.parse(localStorage.sugar_settings); - callback(loadedSettings); - } + loadedSettings = datastore.localStorage.getValue('sugar_settings'); + callback(loadedSettings); } }); diff --git a/activities/Moon.activity/js/moon-activity.js b/activities/Moon.activity/js/moon-activity.js index 73342b1e3..86079934c 100644 --- a/activities/Moon.activity/js/moon-activity.js +++ b/activities/Moon.activity/js/moon-activity.js @@ -15,13 +15,15 @@ define(['activity/data-model', 'activity/draw', 'webL10n', 'sugar-web/env', 'sug l10n.ready(function() { if (first) { first = false; - getSugarSettings(function(settings) { - l10n.language.code = settings.language; - moment.locale(settings.language); - var refreshTime = setTimeout(function() { - clearTimeout(refreshTime); - updateView(); - }, 50); + datastore.localStorage.load(function() { + getSugarSettings(function(settings) { + l10n.language.code = settings.language; + moment.locale(settings.language); + var refreshTime = setTimeout(function() { + clearTimeout(refreshTime); + updateView(); + }, 50); + }); }); } }); @@ -75,24 +77,17 @@ define(['activity/data-model', 'activity/draw', 'webL10n', 'sugar-web/env', 'sug function getSugarSettings(callback) { - var defaultSettings = { - name: "", - language: navigator.language - }; - if (!env.isSugarizer()) { - callback(defaultSettings); - return; - } - if (typeof chrome != 'undefined' && chrome.app && chrome.app.runtime) { - var loadedSettings = JSON.parse(values.sugar_settings); - chrome.storage.local.get('sugar_settings', function(values) { - callback(loadedSettings); - }); - } else { - var loadedSettings = JSON.parse(localStorage.sugar_settings); - callback(loadedSettings); - } - } + var defaultSettings = { + name: "", + language: (typeof chrome != 'undefined' && chrome.app && chrome.app.runtime) ? chrome.i18n.getUILanguage() : navigator.language + }; + if (!env.isSugarizer()) { + callback(defaultSettings); + return; + } + var loadedSettings = datastore.localStorage.getValue('sugar_settings'); + callback(loadedSettings); + } function updateSizes() { diff --git a/activities/Speak.activity/js/SpeakActivity.js b/activities/Speak.activity/js/SpeakActivity.js index 65d8e7fed..ea11c45e4 100644 --- a/activities/Speak.activity/js/SpeakActivity.js +++ b/activities/Speak.activity/js/SpeakActivity.js @@ -1,4 +1,4 @@ -define(["sugar-web/graphics/palette","sugar-web/env","webL10n"], function (palette,env,l10n) { +define(["sugar-web/graphics/palette","sugar-web/env","webL10n","sugar-web/datastore"], function (palette,env,l10n,datastore) { var canvas = document.getElementById("canvas"); var ctx = canvas.getContext('2d'); @@ -42,32 +42,34 @@ define(["sugar-web/graphics/palette","sugar-web/env","webL10n"], function (palet function init(){ speech = Speech(); - getSettings(function(settings) { - sugarSettings = settings; - speech.init(sugarSettings); - // If not IE, setup mouse for capture - if (!IE){ - document.captureEvents(Event.MOUSEMOVE) - } - var FPS = 30; - setInterval(function() { - updateCanvas(); - }, 1000/FPS); - window.addEventListener('localized', function() { - if (first) { - l10n.language.code = sugarSettings.language; - first = false; - return; - } else { - localize(); - var timer = window.setTimeout(function() { - window.clearTimeout(timer); - var language = document.getElementById('speaklang').innerHTML; - var text = l10n.get("TypeSomething", {name:sugarSettings.name}); - speech.playVoice(language, text); - moveMouth(text); - }, 100); + datastore.localStorage.load(function() { + getSettings(function(settings) { + sugarSettings = settings; + speech.init(sugarSettings); + // If not IE, setup mouse for capture + if (!IE){ + document.captureEvents(Event.MOUSEMOVE) } + var FPS = 30; + setInterval(function() { + updateCanvas(); + }, 1000/FPS); + window.addEventListener('localized', function() { + if (first) { + l10n.language.code = sugarSettings.language; + first = false; + return; + } else { + localize(); + var timer = window.setTimeout(function() { + window.clearTimeout(timer); + var language = document.getElementById('speaklang').innerHTML; + var text = l10n.get("TypeSomething", {name:sugarSettings.name}); + speech.playVoice(language, text); + moveMouth(text); + }, 100); + } + }); }); }); } @@ -75,21 +77,14 @@ define(["sugar-web/graphics/palette","sugar-web/env","webL10n"], function (palet function getSettings(callback) { var defaultSettings = { name: "", - language: navigator.language + language: (typeof chrome != 'undefined' && chrome.app && chrome.app.runtime) ? chrome.i18n.getUILanguage() : navigator.language }; if (!env.isSugarizer()) { callback(defaultSettings); return; } - if (typeof chrome != 'undefined' && chrome.app && chrome.app.runtime) { - var loadedSettings = JSON.parse(values.sugar_settings); - chrome.storage.local.get('sugar_settings', function(values) { - callback(loadedSettings); - }); - } else { - var loadedSettings = JSON.parse(localStorage.sugar_settings); - callback(loadedSettings); - } + var loadedSettings = datastore.localStorage.getValue('sugar_settings'); + callback(loadedSettings); } function hidePalettes(){ diff --git a/activities/TankOp.activity/app.js b/activities/TankOp.activity/app.js index 151b71b6c..0fa77aefd 100644 --- a/activities/TankOp.activity/app.js +++ b/activities/TankOp.activity/app.js @@ -1,134 +1,136 @@ -requirejs(["sugar-web/activity/activity","../lib/webL10n"], function (activity, l10n) { - - l10n.language.code = language_code; //defined in settings.js - - // Main app class - enyo.kind({ - name: "TankOp.App", - kind: enyo.Control, - published: {activity: null}, - classes: "home", - components: [ - // Image - {kind: "Image", classes: "home-image no-select-content", src: "images/home.png"}, - - // Popup - {classes: "start-button", ontap: "play", components: [ - {kind: "Image", classes: "start-button-image no-select-content", src: "images/button.png"}, - {content: l10n.get("Start"), classes: "start-button-text no-select-content"} + +// Main app class +enyo.kind({ + name: "TankOp.App", + kind: enyo.Control, + published: {activity: null}, + classes: "home", + components: [ + // Image + {kind: "Image", classes: "home-image no-select-content", src: "images/home.png"}, + + // Popup + {classes: "start-button", ontap: "play", components: [ + {kind: "Image", classes: "start-button-image no-select-content", src: "images/button.png"}, + {name: "start", classes: "start-button-text no-select-content"} + ]}, + + // Credit + {kind: "Image", classes: "credit-button no-select-content", src: "images/credit.png", ontap: "showCredit"}, + {name: "creditsPopup", kind: "TankOp.CreditsPopup"}, + + // Next mission + {classes: "mission-description no-select-content", components: [ + {components: [ + {name: "nextmission", classes: "mission-header mission-line"}, + {content: ":", classes: "mission-dot mission-line"} ]}, - - // Credit - {kind: "Image", classes: "credit-button no-select-content", src: "images/credit.png", ontap: "showCredit"}, - {name: "creditsPopup", kind: "TankOp.CreditsPopup"}, - - // Next mission - {classes: "mission-description no-select-content", components: [ - {components: [ - {content: l10n.get("NextMission"), classes: "mission-header mission-line"}, - {content: ":", classes: "mission-dot mission-line"} - ]}, - {classes: "go-arrow go-left mission-line", ontap: "previousMission"}, - {name: "mission", content: " ", classes: "mission-text mission-line"}, - {classes: "go-arrow go-right mission-line", ontap: "nextMission"} + {classes: "go-arrow go-left mission-line", ontap: "previousMission"}, + {name: "mission", content: " ", classes: "mission-text mission-line"}, + {classes: "go-arrow go-right mission-line", ontap: "nextMission"} + ]}, + + {classes: "mission-status no-select-content", components: [ + {components: [ + {name: "completed", classes: "mission-header mission-line"}, + {content: ":", classes: "mission-dot mission-line"} ]}, - - {classes: "mission-status no-select-content", components: [ - {components: [ - {content: l10n.get("Completed"), classes: "mission-header mission-line"}, - {content: ":", classes: "mission-dot mission-line"} - ]}, - {name: "stars", components: [ - {classes: "mission mission-completed mission-line"}, - {classes: "mission mission-tocomplete mission-line"}, - {classes: "mission mission-tocomplete mission-line"}, - {classes: "mission mission-tocomplete mission-line"}, - {classes: "mission mission-tocomplete mission-line"}, - {classes: "mission mission-tocomplete mission-line"}, - {classes: "mission mission-tocomplete mission-line"}, - {classes: "mission mission-tocomplete mission-line"}, - {classes: "mission mission-tocomplete mission-line"}, - {classes: "mission mission-tocomplete mission-line"}, - {classes: "mission mission-tocomplete mission-line"}, - {classes: "mission mission-tocomplete mission-line"} - ]} + {name: "stars", components: [ + {classes: "mission mission-completed mission-line"}, + {classes: "mission mission-tocomplete mission-line"}, + {classes: "mission mission-tocomplete mission-line"}, + {classes: "mission mission-tocomplete mission-line"}, + {classes: "mission mission-tocomplete mission-line"}, + {classes: "mission mission-tocomplete mission-line"}, + {classes: "mission mission-tocomplete mission-line"}, + {classes: "mission mission-tocomplete mission-line"}, + {classes: "mission mission-tocomplete mission-line"}, + {classes: "mission mission-tocomplete mission-line"}, + {classes: "mission mission-tocomplete mission-line"}, + {classes: "mission mission-tocomplete mission-line"} ]} - ], - - // Constructor - create: function() { - this.inherited(arguments); - this.currentlevel = 0; - this.$.mission.setContent(settings.levels[this.currentlevel].name); - - this.init(); - }, - - // Draw screen - init: function() { - // Play theme - sound.play("audio/soundtrack", true); - - // Draw completed mission - var items = []; - enyo.forEach(this.$.stars.getControls(), function(item) { items.push(item); }); - for (var i = 0 ; i < items.length ; i++) { items[i].destroy(); }; - for (var i = 0 ; i < settings.levels.length ; i++) { - this.$.stars.createComponent({ - classes: (settings.levels[i].completed ? "mission mission-completed mission-line" : "mission mission-tocomplete mission-line") - }, - {owner: this}).render(); - } - }, - - // Select mission - previousMission: function() { - this.currentlevel--; - if (this.currentlevel < 0) - this.currentlevel = settings.levels.length-1; - this.$.mission.setContent(settings.levels[this.currentlevel].name); - }, - - nextMission: function() { - this.currentlevel++; - if (this.currentlevel == settings.levels.length) - this.currentlevel = 0; - this.$.mission.setContent(settings.levels[this.currentlevel].name); - }, - - // Show credit - showCredit: function() { - this.$.creditsPopup.show(); - }, - - // Play game - play: function() { - // Stop sound - sound.pause(); - - // Start game - new TankOp.Play({level: this.currentlevel}).renderInto(document.getElementById("board")); - }, - - // Load game from datastore - load: function() { - var datastoreObject = this.activity.getDatastoreObject(); - var currentthis = this; - datastoreObject.loadAsText(function (error, metadata, data) { - var data = JSON.parse(data); - settings.setState(data); - currentthis.init(); - }); - }, - - // Save game in datastore - save: function(count) { - var datastoreObject = this.activity.getDatastoreObject(); - var jsonData = JSON.stringify(settings.getState()); - datastoreObject.setDataAsText(jsonData); - datastoreObject.save(function() {}); + ]} + ], + + // Constructor + create: function() { + this.inherited(arguments); + this.currentlevel = 0; + this.$.mission.setContent(preferences.levels[this.currentlevel].name); + + this.init(); + }, + + // Draw screen + init: function() { + // Localize + this.$.start.setContent(l10n.get("Start")); + this.$.nextmission.setContent(l10n.get("NextMission")); + this.$.completed.setContent(l10n.get("Completed")); + + // Play theme + sound.play("audio/soundtrack", true); + + // Draw completed mission + var items = []; + this.$.mission.setContent(preferences.levels[this.currentlevel].name = l10n.get(preferences.levels[this.currentlevel].id)); + enyo.forEach(this.$.stars.getControls(), function(item) { items.push(item); }); + for (var i = 0 ; i < items.length ; i++) { items[i].destroy(); }; + for (var i = 0 ; i < preferences.levels.length ; i++) { + preferences.levels[i].name = l10n.get(preferences.levels[i].id); + this.$.stars.createComponent({ + classes: (preferences.levels[i].completed ? "mission mission-completed mission-line" : "mission mission-tocomplete mission-line") + }, + {owner: this}).render(); } + }, + + // Select mission + previousMission: function() { + this.currentlevel--; + if (this.currentlevel < 0) + this.currentlevel = preferences.levels.length-1; + this.$.mission.setContent(preferences.levels[this.currentlevel].name); + }, + + nextMission: function() { + this.currentlevel++; + if (this.currentlevel == preferences.levels.length) + this.currentlevel = 0; + this.$.mission.setContent(preferences.levels[this.currentlevel].name); + }, + + // Show credit + showCredit: function() { + this.$.creditsPopup.show(); + }, + + // Play game + play: function() { + // Stop sound + sound.pause(); + + // Start game + new TankOp.Play({level: this.currentlevel}).renderInto(document.getElementById("board")); + }, + + // Load game from datastore + load: function() { + var datastoreObject = this.activity.getDatastoreObject(); + var currentthis = this; + datastoreObject.loadAsText(function (error, metadata, data) { + var data = JSON.parse(data); + preferences.setState(data); + currentthis.init(); + }); + }, + + // Save game in datastore + save: function(count) { + var datastoreObject = this.activity.getDatastoreObject(); + var jsonData = JSON.stringify(preferences.getState()); + datastoreObject.setDataAsText(jsonData); + datastoreObject.save(function() {}); + } - - }); -}); \ No newline at end of file +}); diff --git a/activities/TankOp.activity/credits.js b/activities/TankOp.activity/credits.js index 7d61b285c..5145e6d3f 100644 --- a/activities/TankOp.activity/credits.js +++ b/activities/TankOp.activity/credits.js @@ -1,46 +1,54 @@ -requirejs(["../lib/webL10n"], function (l10n) { - - l10n.language.code = language_code; //defined in settings.js + // Credits popup +enyo.kind({ + name: "TankOp.CreditsPopup", + kind: "Popup", + classes: "credits-popup", + centered: true, + modal: true, + floating: true, + components: [ + { kind: "Scroller", classes: "credit-content no-select-content", components: [ + { kind: "Image", src: "images/hq_blue.png", classes: "credit-image-hq" }, + { kind: "Image", src: "images/target.png", classes: "credit-image-target" }, + { kind: "Image", src: "images/tank_red_0.png", classes: "credit-image-tankred" }, + { name: "cac", classes: "credit-title" }, + { content: "Lionel Laské", classes: "credit-name" }, + { kind: "Image", src: "images/tank_blue_2.png", classes: "credit-image-tank" }, + { name: "arts", classes: "credit-title" }, + { name: "vicki", classes: "credit-name" }, + { name: "tux", classes: "credit-name" }, + { name: "mister", classes: "credit-name" }, + { name: "none", classes: "credit-name" }, + { kind: "Image", src: "images/helo_blue_2.png", classes: "credit-image-helo" }, + { name: "music", classes: "credit-title" }, + { name: "valkyries", classes: "credit-name" }, + { kind: "Image", src: "images/soldier_blue_2.png", classes: "credit-image-soldier" }, + { name: "sounds", classes: "credit-title" }, + { name: "fridobeck", classes: "credit-name" }, + { name: "joshfeed", classes: "credit-name" }, + { name: "danipenet", classes: "credit-name" }, + { name: "juskiddink", classes: "credit-name" } + ]} + ], - // Credits popup - enyo.kind({ - name: "TankOp.CreditsPopup", - kind: "Popup", - classes: "credits-popup", - centered: true, - modal: true, - floating: true, - components: [ - { kind: "Scroller", classes: "credit-content no-select-content", components: [ - { kind: "Image", src: "images/hq_blue.png", classes: "credit-image-hq" }, - { kind: "Image", src: "images/target.png", classes: "credit-image-target" }, - { kind: "Image", src: "images/tank_red_0.png", classes: "credit-image-tankred" }, - { content: l10n.get("CaC"), classes: "credit-title" }, - { content: "Lionel Laské", classes: "credit-name" }, - { kind: "Image", src: "images/tank_blue_2.png", classes: "credit-image-tank" }, - { content: l10n.get("Arts"), classes: "credit-title" }, - { content: l10n.get("Vicki"), classes: "credit-name" }, - { content: l10n.get("Tux"), classes: "credit-name" }, - { content: l10n.get("Mister"), classes: "credit-name" }, - { content: l10n.get("None"), classes: "credit-name" }, - { kind: "Image", src: "images/helo_blue_2.png", classes: "credit-image-helo" }, - { content: l10n.get("Music"), classes: "credit-title" }, - { content: l10n.get("Valkyries"), classes: "credit-name" }, - { kind: "Image", src: "images/soldier_blue_2.png", classes: "credit-image-soldier" }, - { content: l10n.get("Sounds"), classes: "credit-title" }, - { content: l10n.get("Fridobeck"), classes: "credit-name" }, - { content: l10n.get("Joshfeed"), classes: "credit-name" }, - { content: l10n.get("Danipenet"), classes: "credit-name" }, - { content: l10n.get("Juskiddink"), classes: "credit-name" } - ]} - ], + // Constructor + create: function() { + this.inherited(arguments); + }, - // Constructor - create: function() { - this.inherited(arguments); - }, - - rendered: function() { - } - }); -}); \ No newline at end of file + rendered: function() { + this.$.cac.setContent(l10n.get("CaC")); + this.$.arts.setContent(l10n.get("Arts")); + this.$.vicki.setContent(l10n.get("Vicki")); + this.$.tux.setContent(l10n.get("Tux")); + this.$.mister.setContent(l10n.get("Mister")); + this.$.none.setContent(l10n.get("None")); + this.$.music.setContent(l10n.get("Music")); + this.$.valkyries.setContent(l10n.get("Valkyries")); + this.$.sounds.setContent(l10n.get("Sounds")); + this.$.fridobeck.setContent(l10n.get("Fridobeck")); + this.$.joshfeed.setContent(l10n.get("Joshfeed")); + this.$.danipenet.setContent(l10n.get("Danipenet")); + this.$.juskiddink.setContent(l10n.get("Juskiddink")); + } +}); diff --git a/activities/TankOp.activity/index.html b/activities/TankOp.activity/index.html index 00953dc9e..9b98247b5 100644 --- a/activities/TankOp.activity/index.html +++ b/activities/TankOp.activity/index.html @@ -9,12 +9,11 @@ + href="lib/sugar-web/graphics/css/sugar-200dpi.css"> - @@ -33,8 +32,8 @@ - - + +
- +