aboutDialog.js 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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,require,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. this.onToolDone = function () {};
  33. function init() {
  34. // TODO: translation, once the the about text has been decided about
  35. var tr = runtime.tr,
  36. dialog;
  37. // Dialog
  38. dialog = new Dialog({
  39. style: "width: 400px",
  40. title: "WebODF Text Editor",
  41. autofocus: false,
  42. content: "<p>The WebODF Text Editor is an easy to use Javascript-based plugin for webpages. " +
  43. "It provides a stand-alone editor for text documents in the OpenDocument Format.</p>" +
  44. //TODO: add proper link directly to page about the component
  45. "<p>Learn more on the <a href=\"http://webodf.org/\" target=\"_blank\">WebODF website</a>.</p>" +
  46. "<p>Version " + webodf.Version + "</p>" +
  47. "<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>"
  48. });
  49. dialog.onHide = function() { self.onToolDone(); };
  50. callback(dialog);
  51. }
  52. init();
  53. };
  54. });