aboutDialog.js 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /**
  2. * Copyright (C) 2014 KO GmbH <copyright@kogmbh.com>
  3. *
  4. * @licstart
  5. * This file is part of WebODF.
  6. *
  7. * WebODF is free software: you can redistribute it and/or modify it
  8. * under the terms of the GNU Affero General Public License (GNU AGPL)
  9. * as published by the Free Software Foundation, either version 3 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * WebODF is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU Affero General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Affero General Public License
  18. * along with WebODF. If not, see <http://www.gnu.org/licenses/>.
  19. * @licend
  20. *
  21. * @source: http://www.webodf.org/
  22. * @source: https://github.com/kogmbh/WebODF/
  23. */
  24. /*global define, dojo, runtime, webodf */
  25. define("webodf/editor/widgets/aboutDialog", ["dijit/Dialog"], function (Dialog) {
  26. "use strict";
  27. var editorBase = dojo.config && dojo.config.paths && dojo.config.paths["webodf/editor"],
  28. kogmbhImageUrl = editorBase + "/images/kogmbh.png";
  29. runtime.assert(editorBase, "webodf/editor path not defined in dojoConfig");
  30. return function AboutDialog(callback) {
  31. var self = this;
  32. /*jslint emptyblock: true*/
  33. this.onToolDone = function () {};
  34. /*jslint emptyblock: false*/
  35. function init() {
  36. // TODO: translation, once the the about text has been decided about
  37. var dialog;
  38. // Dialog
  39. dialog = new Dialog({
  40. style: "width: 400px",
  41. title: "Wodo.TextEditor",
  42. autofocus: false,
  43. content: "<p>Wodo.TextEditor is an easy to use Javascript-based plugin for webpages. " +
  44. "It provides a stand-alone editor for text documents in the OpenDocument Format. " +
  45. "Done with WebODF.</p>" +
  46. //TODO: add proper link directly to page about the component
  47. "<p>Learn more on the <a href=\"http://webodf.org/\" target=\"_blank\">WebODF website</a>.</p>" +
  48. "<p>Version " + webodf.Version + "</p>" +
  49. "<p>Made by <a href=\"http://kogmbh.com\" target=\"_blank\"><img src=\"" + kogmbhImageUrl + "\" width=\"172\" height=\"40\" alt=\"KO GmbH\" style=\"vertical-align: top;\"></a>.</p>"
  50. });
  51. dialog.onHide = function () { self.onToolDone(); };
  52. callback(dialog);
  53. }
  54. init();
  55. };
  56. });