From 150787b25ff6c20add28a7d66e642c226e1249c7 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 14 Jan 2015 12:06:05 -0800 Subject: [PATCH] [About] Add controllers Add initial implementations of controllers to support showing the About dialog on logo click, WTD-667. --- platform/commonUI/about/res/about-logo.html | 6 ++++-- .../commonUI/about/src/AboutController.js | 21 +++++++++++++++++++ platform/commonUI/about/src/LogoController.js | 18 ++++++++++++++++ 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 platform/commonUI/about/src/AboutController.js create mode 100644 platform/commonUI/about/src/LogoController.js diff --git a/platform/commonUI/about/res/about-logo.html b/platform/commonUI/about/res/about-logo.html index 323fc517fb..c31a7d55a7 100644 --- a/platform/commonUI/about/res/about-logo.html +++ b/platform/commonUI/about/res/about-logo.html @@ -1,2 +1,4 @@ - - + + + + diff --git a/platform/commonUI/about/src/AboutController.js b/platform/commonUI/about/src/AboutController.js new file mode 100644 index 0000000000..88fd95d99c --- /dev/null +++ b/platform/commonUI/about/src/AboutController.js @@ -0,0 +1,21 @@ +/*global define*/ + +define( + [], + function () { + "use strict"; + + function AboutController(versions, $window) { + return { + versions: function () { + return versions; + }, + openLicenses: function () { + $window.open("#/licenses", "_blank"); + } + }; + } + + return AboutController; + } +); \ No newline at end of file diff --git a/platform/commonUI/about/src/LogoController.js b/platform/commonUI/about/src/LogoController.js new file mode 100644 index 0000000000..93f425d1d7 --- /dev/null +++ b/platform/commonUI/about/src/LogoController.js @@ -0,0 +1,18 @@ +/*global define*/ + +define( + [], + function () { + "use strict"; + + function LogoController(overlayService) { + return { + showAboutDialog: function () { + overlayService.createOverlay("overlay-about"); + } + }; + } + + return LogoController; + } +); \ No newline at end of file