diff --git a/src/main/webapp/app/internationalization.js b/src/main/webapp/app/internationalization.js index c7dc2fcff496dbd65c3527d42e67c3ce6a5b23f3..2ea4de2a20f12427836965373ac091c2392fd528 100755 --- a/src/main/webapp/app/internationalization.js +++ b/src/main/webapp/app/internationalization.js @@ -280,7 +280,6 @@ HINT_FOR_SOLUTION: "Lösungshinweis", HINT_FOR_SOLUTION_EDIT: "Lösungshinweis?", SAMPLE_SOLUTION: "Musterlösung", - EXPORT_TO_CLICK: "Exportiere nach Click", /* sort */ SORT_QUESTIONS_TITLE: "Fragen sortieren", @@ -802,6 +801,7 @@ IMP_ERROR_SAVE: "Session konnte nicht gespeichert werden", IMP_ERROR_IMAGE: "Session konnte nicht gespeichert werden. Bild überschreitet maximale Größe.", +<<<<<<< 26d09ede31f046ba0c6e57ba699629fc34226bb3 /* content export*/ QUESTIONS_EXPORT_BUTTON: "Fragen<br>exportieren", QUESTIONS_EXPORT_MSBOX_TITLE: "Inhalte exportieren", @@ -820,6 +820,25 @@ QUESTIONS_IMPORT_ABSTENTION_ERROR: "Fehler im Feld 'abstention'", QUESTIONS_IMPORT_INVALID_FORMAT: "Ungültiges Dateiformat", FLASHCARDS_CHOOSE_SUBJECT: "Legen Sie ein Thema für das zu importierende Lernkarten-Set fest" +======= + /* Export to click */ + QUESTION_EXPORT_TO_CLICK: "Exportiere nach Click", + QUESTION_EXPORT_TO_CLICK_MSBOX_TITLE: "Export nach arsnova.click", + QUESTION_EXPORT_TO_CLICK_MSBOX_INFO: "Diese Frage wird als JSON-Datei exportiert und wird als ### gespeichert. Sie können diese unter http://arsnova.click/ importieren. Beim Import werden Sie nach einem Hashtag gefragt, unter dem Sie diese Frage als Quiz eröffnen wollen.", + + /* CSV export*/ + QUESTIONS_CSV_EXPORT_BUTTON: "Fragen<br>exportieren", + QUESTIONS_CSV_EXPORT_MSBOX_TITLE: "Inhalte exportieren", + QUESTIONS_CSV_EXPORT_MSBOX_INFO: "Die Inhalte werden als CSV-Datei exportiert. Fragen vom Typ \"Hot Spots\" werden übersprungen. Für den gesamten Export der Session steht der Export auf der Sessionübersichtseite zur Verfügung. <br>Fragen exportieren?", + + /* CSV import*/ + QUESTIONS_CSV_IMPORT_BUTTON: "Fragen<br>importieren", + QUESTIONS_CSV_IMPORT_MSBOX_TITLE: "Inhalte importieren", + QUESTIONS_CSV_IMPORT_ERR_IN_ROW: "in Zeile", + QUESTIONS_CSV_IMPORT_TYPE_ERROR: "Ungültiger Fragentyp", + QUESTIONS_CSV_IMPORT_ABSTENTION_ERROR: "Fehler im Feld 'abstention'", + QUESTIONS_CSV_IMPORT_INVALID_FORMAT: "Ungültiges Dateiformat" +>>>>>>> show a messagebox when exporting a question to click }; switch (variation) { @@ -1667,6 +1686,11 @@ IMP_ERROR_SAVE: "Could not save session to database.", IMP_ERROR_IMAGE: "Could not save session, image exceeds maximal size.", + /* Export to click */ + QUESTION_EXPORT_TO_CLICK: "Export to click", + QUESTION_EXPORT_TO_CLICK_MSBOX_TITLE: "Export to arsnova.click", + QUESTION_EXPORT_TO_CLICK_MSBOX_INFO: "This question gets exported as a JSON-File and will be saved as ###. You can import this under http://arsnova.click/. You will be asked to enter a hashtag under which this question will be opened as a quiz.", + /* content export */ QUESTIONS_EXPORT_BUTTON: "Export<br>content", QUESTIONS_EXPORT_MSBOX_TITLE: "Export content", @@ -1685,14 +1709,6 @@ QUESTIONS_IMPORT_ABSTENTION_ERROR: "Error in field 'abstention'", QUESTIONS_IMPORT_INVALID_FORMAT: "Invalid file format", FLASHCARDS_CHOOSE_SUBJECT: "Enter a subject for the imported flashcard-set" - - /* CSV import */ - QUESTIONS_CSV_IMPORT_BUTTON: "Import<br>questions", - QUESTIONS_CSV_IMPORT_MSBOX_TITLE: "Import content", - QUESTIONS_CSV_IMPORT_ERR_IN_ROW: "at line", - QUESTIONS_CSV_IMPORT_TYPE_ERROR: "Invalid question type", - QUESTIONS_CSV_IMPORT_ABSTENTION_ERROR: "Error in field 'abstention'", - QUESTIONS_CSV_IMPORT_INVALID_FORMAT: "Invalid file format" }; switch (variation) { diff --git a/src/main/webapp/app/view/speaker/ShowcaseEditButtons.js b/src/main/webapp/app/view/speaker/ShowcaseEditButtons.js index 5216da508e8d13d7b8574e7744eef5018950a9c9..9b563c6fa3c0ac2b7c22413dff64e81b344a5edc 100755 --- a/src/main/webapp/app/view/speaker/ShowcaseEditButtons.js +++ b/src/main/webapp/app/view/speaker/ShowcaseEditButtons.js @@ -136,14 +136,34 @@ Ext.define('ARSnova.view.speaker.ShowcaseEditButtons', { }); this.exportToClickButton = Ext.create('ARSnova.view.MatrixButton', { - text: Messages.EXPORT_TO_CLICK, + text: Messages.QUESTION_EXPORT_TO_CLICK, cls: this.config.buttonClass, imageCls: 'icon-cloud-download', scope: this, handler: function () { - var questionExportController = ARSnova.app.getController('QuestionExport'); - var clickQuestionObject = questionExportController.exportQuestionToClick(this.questionObj); - questionExportController.saveClickQuestionOnFileSystem(clickQuestionObject, this.questionObj.subject); + var messageBox = Ext.create('Ext.MessageBox', { + title: Messages.QUESTION_EXPORT_TO_CLICK_MSBOX_TITLE, + message: Messages.QUESTION_EXPORT_TO_CLICK_MSBOX_INFO.replace(/###/, localStorage.getItem("shortName") + "_" + this.questionObj.subject + ".json"), + cls: 'exportToClickBox', + hide: function () { + } + }); + + var question = this.questionObj; + + messageBox.setButtons([{ + text: Messages.CONTINUE, + itemId: 'continue', + ui: 'action', + handler: function () { + var questionExportController = ARSnova.app.getController('QuestionExport'); + var clickQuestionObject = questionExportController.exportQuestionToClick(question); + questionExportController.saveClickQuestionOnFileSystem(clickQuestionObject, question.subject); + messageBox.hide(); + } + }]); + + messageBox.show(); } });