Skip to content

Commit

Permalink
Remove save-as-image button
Browse files Browse the repository at this point in the history
- the button does not work now, cause unknown,

- duplicates the function of screenshot key.
  • Loading branch information
quozl committed Aug 8, 2018
1 parent 8c1e983 commit acb2aee
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 147 deletions.
4 changes: 0 additions & 4 deletions css/navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,3 @@
#toggle-hemisphere-button {
background-image: url(../icons/toggle-hemisphere.svg);
}

#save-image-button {
background-image: url(../icons/save-image.svg);
}
3 changes: 0 additions & 3 deletions data.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ Longitude=Longitude
ToggleGrid=Toggle Grid View
ToggleHemisphere=Toggle Hemisphere View
SaveImage=Save As Image
[fr]
Expand Down Expand Up @@ -83,7 +82,6 @@ Longitude=Longitude
ToggleGrid=Afficher/Masquer la grille
ToggleHemisphere=Changer d'hémisphère
SaveImage=Enregistrer en tant qu'image


[es]
Expand Down Expand Up @@ -127,4 +125,3 @@ Longitude=Longitud

ToggleGrid=Cambiar a vista grilla
ToggleHemisphere=Cambiar a vista hemisferio
SaveImage=Guardarla como una imagen
95 changes: 0 additions & 95 deletions icons/save-image.svg

This file was deleted.

3 changes: 0 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
<!-- Add more buttons here -->
<button class="toolbutton" id="toggle-grid-button" title="Toggle Grid View"></button>
<button class="toolbutton" id="toggle-hemisphere-button" title="Toggle Hemisphere View"></button>
<button class="toolbutton" id="save-image-button" title="Save As Image">
<a download="moon.jpg"></a>
</button>

<!-- Buttons with class="pull-right" will be right aligned -->
<button class="toolbutton pull-right" id="stop-button" title="Stop"></button>
Expand Down
24 changes: 0 additions & 24 deletions js/moon-activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ define(['activity/data-model', 'activity/draw', 'webL10n', 'sugar-web/env', 'sug

document.getElementById("toggle-grid-button").title = _('ToggleGrid');
document.getElementById("toggle-hemisphere-button").title = _('ToggleHemisphere');
document.getElementById("save-image-button").title = _('SaveImage');
}


Expand All @@ -246,7 +245,6 @@ define(['activity/data-model', 'activity/draw', 'webL10n', 'sugar-web/env', 'sug

toggleGridBtn.addEventListener('click', toggleGrid);
toggleHemisphereBtn.addEventListener('click', toggleHemisphere);
document.querySelector('#save-image-button').addEventListener('click', saveImage);
}


Expand Down Expand Up @@ -282,28 +280,6 @@ define(['activity/data-model', 'activity/draw', 'webL10n', 'sugar-web/env', 'sug
}


function saveImage() {
/*
Read canvas data as base64 string and
store image in datastore
*/

var mimetype = 'image/jpeg';
var inputData = canvas.toDataURL(mimetype, 1);
var metadata = {
mimetype: mimetype,
title: "Image Moon",
activity: "org.olpcfrance.MediaViewerActivity",
timestamp: new Date().getTime(),
creation_time: new Date().getTime(),
file_size: 0
};
datastore.create(metadata, function() {
console.log("export done.")
}, inputData);
}


function formatDate(date) {
/*
Modify rendered dates to match Sugar Moon format
Expand Down
6 changes: 0 additions & 6 deletions po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,3 @@ msgstr "Cambiar a vista grilla"
msgctxt "ToggleHemisphere"
msgid "Toggle Hemisphere View"
msgstr "Cambiar a vista hemisferio"

#: SaveImage
msgctxt "SaveImage"
msgid "Save As Image"
msgstr "Guardarla como una imagen"

6 changes: 0 additions & 6 deletions po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,3 @@ msgstr "Afficher/Masquer la grille"
msgctxt "ToggleHemisphere"
msgid "Toggle Hemisphere View"
msgstr "Changer d'hémisphère"

#: SaveImage
msgctxt "SaveImage"
msgid "Save As Image"
msgstr "Enregistrer en tant qu'image"

6 changes: 0 additions & 6 deletions po/template.pot
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,3 @@ msgstr ""
msgctxt "ToggleHemisphere"
msgid "Toggle Hemisphere View"
msgstr ""

#: SaveImage
msgctxt "SaveImage"
msgid "Save As Image"
msgstr ""

0 comments on commit acb2aee

Please sign in to comment.