From e39959217f8d7ec60c6740618b581f4927944c7f Mon Sep 17 00:00:00 2001 From: Ron Gilchrist Date: Mon, 16 May 2016 14:51:58 -0700 Subject: [PATCH] tour authoring rough initial ui scaffolding... remove external lib peripheral files remove binaries from git --- Default.aspx | 91 +++++++++++++++---- Gruntfile.js | 1 + app.js | 2 +- controllers/MainController.js | 62 ++++++++++--- controllers/tabs/CurrentTourController.js | 5 ++ css/variables.less | 2 +- css/webclient.less | 104 ++++++++++++++++++++++ packages.config | 2 +- views/modals/intro.html | 2 +- views/modals/mobile-view.html | 7 +- webclient.csproj | 22 ++--- 11 files changed, 249 insertions(+), 51 deletions(-) create mode 100644 controllers/tabs/CurrentTourController.js diff --git a/Default.aspx b/Default.aspx index 8247c0a..281cd47 100644 --- a/Default.aspx +++ b/Default.aspx @@ -1,5 +1,6 @@ <%@ Page Language="C#" %> <%@ Import Namespace="System.Globalization" %> +<%@ Import Namespace="System.Security.Cryptography.X509Certificates" %> <%@ Import Namespace="WURFL" %> - - - - - - - - + + + + + + + + <% if (Debug || DebugChrome) { %> @@ -198,6 +201,7 @@ + @@ -448,6 +452,16 @@ +
  • + +
  • @@ -840,7 +854,54 @@ - <% } %> + <% } %> +
    + + + + + + + + + + + +
    + + +
    + {{currentTour.minuteDuration}}:{{currentTour.secDuration}} +
    +
    +
    +
    +
    + {{stop.description}} + + +
    +
    + + +
    +
    + +
    +
    + +
     
    + + + +
    diff --git a/Gruntfile.js b/Gruntfile.js index 30155c2..adad47a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -69,6 +69,7 @@ module.exports = function(grunt) { 'controllers/tabs/ViewController.js', 'controllers/tabs/ToursController.js', 'controllers/tabs/CommunityController.js', + 'controllers/tabs/CurrentTourController.js', 'controllers/modals/ShareController.js', 'controllers/modals/OpenItemController.js', 'controllers/modals/ObservingTimeController.js', diff --git a/app.js b/app.js index 3868cab..f361fed 100644 --- a/app.js +++ b/app.js @@ -21,7 +21,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. **/ -var wwt = { +var wwt = { app: angular.module('wwtApp', [ 'mgcrea.ngStrap', 'ngTouch', diff --git a/controllers/MainController.js b/controllers/MainController.js index 8247319..9681182 100644 --- a/controllers/MainController.js +++ b/controllers/MainController.js @@ -630,19 +630,52 @@ wwt.controllers.controller('MainController', $('#openModal').modal('show'); }; - $scope.playTour = function(url) { - $('.finder-scope').hide(); - wwtlib.WWTControl.singleton.playTour(url); - wwt.tourPlaying = $rootScope.tourPlaying = true; - wwt.wc.add_tourEnded(tourChangeHandler); - //wwt.wc.add_tourPaused(tourChangeHandler); - setTimeout(function() { - $('#ribbon,.top-panel,.context-panel,.layer-manager').fadeOut(800); - }, 200); - - } + $scope.playTour = function(url) { + $('.finder-scope').hide(); + wwtlib.WWTControl.singleton.playTour(url); + wwt.tourPlaying = $rootScope.tourPlaying = true; + $rootScope.tourPaused = false; + + wwt.wc.add_tourEnded(tourChangeHandler); + wwt.wc.add_tourReady(function() { - function tourChangeHandler() { + $scope.$applyAsync(function() { + $scope.currentTour = wwtlib.WWTControl.singleton.tour; + $scope.currentTour.duration = 0; + $scope.tourStops = $scope.currentTour.get_tourStops().map(function(s) { + s.description = s.get_description(); + s.thumb = s.get_thumbnail(); + s.duration = s.get_duration(); + s.secDuration = Math.round(s.duration / 1000); + if (s.secDuration < 10) { + s.secDuration = '0' + s.secDuration; + } + s.secDuration = '0:' + s.secDuration; + $scope.currentTour.duration += s.duration; + return s; + }); + $scope.currentTour.minuteDuration = Math.floor($scope.currentTour.duration / 60000); + $scope.currentTour.secDuration = Math.floor(($scope.currentTour.duration % 60000) / 1000); + $scope.activeItem = { label: 'currentTour' }; + $scope.activePanel = 'currentTour'; + }); + //$('#ribbon,.top-panel,.context-panel,.layer-manager').fadeOut(800); + + }); + //wwt.wc.add_tourPaused(tourChangeHandler); + + }; + + $scope.gotoStop = function(index) { + $scope.currentTour.set_currentTourstopIndex(index); + }; + + $scope.pauseTour = function () { + wwtlib.WWTControl.singleton.uiController.pauseTour(); + $rootScope.tourPaused = !$rootScope.tourPaused; + } + + function tourChangeHandler() { var settings = appState.get('settings') || {}; wwt.tourPlaying = $rootScope.tourPlaying = false; @@ -651,6 +684,7 @@ wwt.controllers.controller('MainController', $('.context-panel').fadeIn(800); } if (!settings.autoHideTabs) { + $('#ribbon,.top-panel,.layer-manager').fadeIn(800); } ctl.clearAnnotations(); @@ -678,7 +712,7 @@ wwt.controllers.controller('MainController', $scope.setLanguageCode = function(code) { appState.set('language', code); $timeout(function() { - if ($scope.selectedLanguage != code) { + if ($scope.selectedLanguage !== code) { $scope.selectedLanguage = code; $scope.languageCode = code; } @@ -705,7 +739,7 @@ wwt.controllers.controller('MainController', //util.log('loc calls: ' + locCalls); } var key = englishString + $scope.selectedLanguage; - if ($scope.selectedLanguage == 'EN') { + if ($scope.selectedLanguage === 'EN') { localized[key] = englishString; } if (localized[key]) { diff --git a/controllers/tabs/CurrentTourController.js b/controllers/tabs/CurrentTourController.js new file mode 100644 index 0000000..1906333 --- /dev/null +++ b/controllers/tabs/CurrentTourController.js @@ -0,0 +1,5 @@ +wwt.controllers.controller('CurrentTourController', ['$scope', function($scope) { + +}]); + + \ No newline at end of file diff --git a/css/variables.less b/css/variables.less index 1476c6a..19a6173 100644 --- a/css/variables.less +++ b/css/variables.less @@ -43,7 +43,7 @@ background-image: -moz-linear-gradient(top, @start-color, @second-color @color-stop2, @third-color @color-stop3, @end-color); background-image: linear-gradient(@start-color, @second-color @color-stop2, @third-color @color-stop3, @end-color); background-repeat: no-repeat; - filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@second-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback + } } diff --git a/css/webclient.less b/css/webclient.less index 747c6dd..b28f3e3 100644 --- a/css/webclient.less +++ b/css/webclient.less @@ -466,6 +466,7 @@ body.wwt-webclient-wrapper.mobile{ //height: 267px; width: 278px; margin: -3px -8px -8px -8px; + } div.explore-panel { @@ -473,8 +474,111 @@ body.wwt-webclient-wrapper.mobile{ max-height: 97px; height: 97px; //overflow: hidden; + table{ + table-layout:fixed; + width:100%; + margin:5px 8px; + td.play-tour{ + width:80px; + vertical-align:middle; + text-align:center; + height:112px; + } + td.tour-stops{ + width:100%; + border: solid 1px #728f9a; + .scroller{ + padding-left:5px; + max-width: 100%; + overflow-x: auto; + overflow-y:hidden; + div.stops-container{ + position:relative; + top:-26px; + height:84px; + white-space:nowrap; + vertical-align:text-top; + .stop-arrow{ + + white-space:nowrap; + vertical-align:text-top; + width:155px; + display:inline-block; + } + div.stop-thumb{ + position:relative; + + img{ + display:inline-block; + border:none; + } + .duration{ + position:absolute; + bottom:-16px; + left:0; + } + } + .right-arrow{ + padding-top:33px; + width:50px; + vertical-align:middle; + display:inline-block; + position: relative; + //top: 11px; + left: -3px; + i.fa{ + + font-size:20px;vertical-align:middle; + } + i.fa.fa-caret-right{ + font-size:47px; + position:relative; + top:1px; + } + } + } + + } + + } + } + tour-slides{ + overflow-x:scroll; + } } + a.btn-play-tour{ + height:48px;width:48px; + border-radius:50%; + display:inline-block; + font-size: 20px; + //padding: 10px 17px; + //margin:16px 0 0 8px; + box-shadow:inset 0 -2px 6px #324272, + inset 0 0 2px rgba(0,0,0,.5), + 0 0 3px rgba(0,0,0,.5), + 0 0 6px rgba(44,185,201,.7); + background-color:rgba(0,0,0,.3); + #gradient > .vertical-four-colors(rgba(255,255,255,.3), rgba(155,155,155,.01), 50%, rgba(155,155,155,.01), 75%, rgba(44,185,201,.7)); + border:solid 1px #000; + i.fa{ + margin:14px 17px; + } + i.fa.fa-pause{ + margin:14px 14px; + } + } + a.btn-play-tour:hover { + box-shadow:inset 0 -2px 6px lighten(rgba(44,185,201,1),10%), + inset 0 0 2px rgba(0,0,0,.3), + 0 0 2px rgba(0,0,0,.5), + 0 0 9px lighten(rgba(44,185,201,1),10%); + border:solid 1px #000; + background-color:rgba(23,56,156,.5); + #gradient > .vertical-four-colors(rgba(255,255,255,.6), rgba(155,155,155,.01), 50%, rgba(155,155,155,.01), 75%, rgba(44,185,201,.7)); + + } + div.explore-panel.expanded { height: 377px; max-height: 377px; diff --git a/packages.config b/packages.config index a69d9c1..a1525fb 100644 --- a/packages.config +++ b/packages.config @@ -1,7 +1,7 @@  - + \ No newline at end of file diff --git a/views/modals/intro.html b/views/modals/intro.html index d342c68..41f46ae 100644 --- a/views/modals/intro.html +++ b/views/modals/intro.html @@ -12,7 +12,7 @@ localize="Microsoft WorldWide Telescope Logo" localize-only="alt" />

    - Microsoft® Research
    + American Astronomical Society
    WorldWide Telescope

    diff --git a/views/modals/mobile-view.html b/views/modals/mobile-view.html index da7c221..396a29a 100644 --- a/views/modals/mobile-view.html +++ b/views/modals/mobile-view.html @@ -7,9 +7,10 @@
    -
    - -
    +
    + + +
    diff --git a/webclient.csproj b/webclient.csproj index b03c2a4..aee90ba 100644 --- a/webclient.csproj +++ b/webclient.csproj @@ -74,7 +74,7 @@ - + @@ -190,7 +190,6 @@ - @@ -266,26 +265,20 @@ - - - - - + + - - - - + + + - - @@ -313,7 +306,6 @@ - @@ -328,7 +320,7 @@ - + Web.config