Commit eb153fe96b6e347e376f537a94e0f553c1def01f

Authored by Nikita Kulshreshtha
1 parent ab5d8b3f

1. fixed the toggle button issue on main menu.

2. added dynamic title for modules and for views.
3. added constant for module names.
300-PROTOTYPES/20160229/AIA/js/custom.js
... ... @@ -5,6 +5,7 @@ $(function(){
5 5 var bar = $('.sidebar');
6 6 var main = $('.main');
7 7 $('.toggleBar').click(function() {
  8 + alert('jjjj')
8 9 /*barPos = parseInt($('.sidebar').css('left'));
9 10 if(barPos!==0 && !bar.hasClass('active'))
10 11 {
... ... @@ -27,7 +28,8 @@ $(function(){
27 28 var barPos=0;
28 29 var bar = $('.tools');
29 30 var main = $('.main2');
30   - $('.toggleBar').click(function() {
  31 + $('.toggleBar').click(function() {
  32 + alert('hjh')
31 33 /*barPos = parseInt($('.tools').css('left'));
32 34 if(barPos!==0 && !bar.hasClass('active'))
33 35 {
... ... @@ -51,7 +53,7 @@ $(function(){
51 53 var barPos=0;
52 54 var bar = $('.treeview-left');
53 55 var main = $('.main-treeview');
54   - $('.toggleBar').click(function() {
  56 + $('.toggleBar').click(function() { alert('kkkk')
55 57 /*barPos = parseInt($('.sidebar').css('left'));
56 58 if(barPos!==0 && !bar.hasClass('active'))
57 59 {
... ...
300-PROTOTYPES/20160229/AIA/js/main.js
1 1 /***
2 2 CUSTOM.JS FUNCTION
3 3 **/
4   -$(function(){
  4 +$(function(){ alert('ggggggg')
5 5 "use strict";
6 6 /*** Sidebar Toggle ***/
7 7 var barPos=0;
... ...
400-SOURCECODE/AIAHTML5.Web/MainMenu.html
1   -<div class="bodyWrap row">
2   - <div class="col-sm-12 pageHeading">
  1 +<div class="bodyWrap row" >
  2 + <div class="col-sm-12 col-md-12 pageHeading">
3 3 <!--<button type="button" class="btn btn-success pull-left toggleBar btn-sm" data-toggle="tooltip" data-placement="top" title="Show/Hide Sidebar"> <i class="fa fa-bars"></i> </button>-->
4   - <div class=" pull-left toggleBar toggleHeadingButton" data-toggle="tooltip" data-placement="top" title="Show/Hide Sidebar"> <i class="fa fa-bars"></i> </div>
5   - <h4 class="pull-left">Welcome to A.D.A.M. Interactive Anatomy</h4>
6   - <div class="clearfix"></div>
  4 + <div class=" pull-left toggleBar toggleHeadingButton" data-toggle="tooltip" data-placement="top" title="Show/Hide Sidebar" style="padding-left: 15px; "> <i class="fa fa-bars"></i> </div>
  5 + <h4 class="pull-left" ng->{{currentActiveModuleTitle}}</h4>
  6 + <div class="clearfix" style=""></div>
7 7 </div>
8 8 <!--Sidebar-->
9 9 <div class="sidebar pull-left">
... ... @@ -29,6 +29,7 @@
29 29 </div>
30 30 <div class="main">
31 31 <div class="col-sm-12">
  32 + <div align="center" id="MainImage"><img src="content/images/img1.png" alt="" title="" class="img-responsive"></div>
32 33 <div ng-view></div>
33 34 </div>
34 35 </div>
... ... @@ -69,4 +70,29 @@
69 70 $(function () {
70 71 $(".modal").draggable();
71 72 });
  73 +</script>
  74 +<script>
  75 + $(function () {
  76 + "use strict";
  77 + /*** Sidebar Toggle ***/
  78 + var barPos = 0;
  79 + var bar = $('.sidebar');
  80 + var main = $('.main');
  81 + $('.toggleBar').click(function () {
  82 + // alert('kkkkkkkkkkkkkk')
  83 + /*barPos = parseInt($('.sidebar').css('left'));
  84 + if(barPos!==0 && !bar.hasClass('active'))
  85 + {
  86 + bar.addClass('active');
  87 + main.addClass('active');
  88 + }
  89 + else
  90 + {
  91 + bar.removeClass('active');
  92 + main.removeClass('active');
  93 + }*/
  94 + bar.toggleClass('active');
  95 + main.toggleClass('active');
  96 + });
  97 + });
72 98 </script>
73 99 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
1 1 
2 2 'use strict';
3 3  
4   -AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "$routeParams",
5   -function ($scope,$rootScope, $compile,$http, $log, $location, $timeout,DA,$routeParam ) {
  4 +AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA","Modules", "$routeParams",
  5 +function ($scope,$rootScope, $compile,$http, $log, $location, $timeout,DA,Modules,$routeParam ) {
6 6  
7 7 $scope.genderId = "";
8 8 $scope.BodyViewData = null;
... ... @@ -17,12 +17,17 @@ function ($scope,$rootScope, $compile,$http, $log, $location, $timeout,DA,$route
17 17 //view specific constants
18 18 $scope.voId ;
19 19 $scope.layerNo;
  20 +
20 21  
21 22  
22 23 //get the DA body view list based on selected gender
23 24 $scope.getDAViewList = function ($event) {
24 25  
25   - // debugger;
  26 + // debugger;
  27 + if ($('#MainImage') != null) {
  28 + $('#MainImage').remove();
  29 + }
  30 + $rootScope.currentActiveModuleTitle = Modules[0].Name;
26 31 $("#bodyViewList").empty();
27 32 //for default load
28 33 if ($event == null) {
... ... @@ -54,9 +59,9 @@ function ($scope,$rootScope, $compile,$http, $log, $location, $timeout,DA,$route
54 59 }
55 60  
56 61 $scope.imagePath = "~/../content/images/DA/BodyViews/" + value._id + '/skintone/' + userEthnicity + '/' + thumbnailImage;
57   -
  62 + // debugger;
58 63  
59   - var $el = $('<div id=' + value._id + ' class="col-sm-3 col-lg-2" data-ng-click="openView($event)"><div class="thumbnail" >'
  64 + var $el = $('<div id=' + value._id + ' class="col-sm-3 col-lg-2" title = ' + value._title + ' data-ng-click="openView($event)"><div class="thumbnail" >'
60 65 + '<img class= "daImg" id="' + value._title + '" src="' + $scope.imagePath + '" alt="" title="" >'
61 66 + '<div class="caption"><p>' + value._title + '</p></div></a></div></div>').appendTo('#bodyViewList');
62 67  
... ... @@ -93,9 +98,11 @@ function ($scope,$rootScope, $compile,$http, $log, $location, $timeout,DA,$route
93 98  
94 99  
95 100 $scope.openView = function ($event) {
96   - // debugger;
  101 + debugger;
  102 + $rootScope.currentBodyViewId = $event.currentTarget.id;
  103 + $rootScope.CurrentActiveView = $event.currentTarget.textContent;
97 104 $rootScope.pageToOpen = 'app/views/da/da-body-view.html';
98   - $scope.voId = $event.currentTarget.id;
  105 +
99 106  
100 107 }
101 108  
... ... @@ -160,7 +167,7 @@ function ($scope,$rootScope, $compile,$http, $log, $location, $timeout,DA,$route
160 167 ajax: {
161 168 url: 'app/views/da/da-view.html'
162 169 },
163   - title: "Male Anterior",
  170 + title: $rootScope.CurrentActiveView,
164 171 // bootstrap: 'columns large-10 medium-9',
165 172 position: {
166 173 top: 70, //50,
... ... @@ -215,9 +222,9 @@ function ($scope,$rootScope, $compile,$http, $log, $location, $timeout,DA,$route
215 222 .error(function (data, status, headers, config) {
216 223 console.log(data);
217 224 });
  225 + debugger;
218 226  
219   -
220   - $scope.voId = 1;
  227 + $scope.voId = $rootScope.currentBodyViewId;
221 228 $scope.layerNo = 0;
222 229 $scope.skinTone = DA[0].ethnicity;
223 230  
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
1 1 'use strict';
2 2  
3   -AIA.controller("HomeController", ["$rootScope", "$log", "$location", "$timeout",
4   - function ($rootScope, $log, $location, $timeout) {
  3 +AIA.controller("HomeController", ["$rootScope","Modules", "$log", "$location", "$timeout",
  4 + function ($rootScope,Modules, $log, $location, $timeout) {
5 5  
6 6 //$scope.pageToOpen = {
7 7 // name: 'MainMenu'
8 8 //};
9 9 $rootScope.pageToOpen = 'MainMenu.html';
  10 + $rootScope.currentBodyViewId = 1;
  11 + $rootScope.currentActiveModuleTitle = 'Welcome to A.D.A.M. Interactive Anatomy';//Modules[0].Name;
  12 + $rootScope.CurrentActiveView;
10 13 }]
11 14 );
12 15 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
... ... @@ -41,6 +41,27 @@ AIA.constant(&#39;DA&#39;, [
41 41 ]);
42 42  
43 43  
  44 +AIA.constant('Modules', [
  45 + {
  46 + Id:1,
  47 + Name: 'Dissectible Anatomy',
  48 + },
  49 + {
  50 + Id:2,
  51 + Name: 'Atlas Anatomy',
  52 + },
  53 + {
  54 + Id:3,
  55 + Name: '3D Anatomy',
  56 + },
  57 + {
  58 + Id:4,
  59 + Name: 'Clinical Illustrations',
  60 + },
  61 +
  62 +]);
  63 +
  64 +
44 65 AIA.config(function ($routeProvider, pages, $locationProvider) {
45 66  
46 67 $locationProvider.html5Mode(true);
... ...
400-SOURCECODE/AIAHTML5.Web/content/js/custom/custom.js
... ... @@ -4,7 +4,8 @@ $(function(){
4 4 var barPos=0;
5 5 var bar = $('.sidebar');
6 6 var main = $('.main');
7   - $('.toggleBar').click(function() {
  7 + $('.toggleBar').click(function () {
  8 + alert('kkkkkkkkkkkkkk')
8 9 /*barPos = parseInt($('.sidebar').css('left'));
9 10 if(barPos!==0 && !bar.hasClass('active'))
10 11 {
... ... @@ -27,7 +28,8 @@ $(function(){
27 28 var barPos=0;
28 29 var bar = $('.tools');
29 30 var main = $('.main2');
30   - $('.toggleBar').click(function() {
  31 + $('.toggleBar').click(function () {
  32 + alert('hjh gjgvghg')
31 33 /*barPos = parseInt($('.tools').css('left'));
32 34 if(barPos!==0 && !bar.hasClass('active'))
33 35 {
... ... @@ -63,6 +65,7 @@ $(function(){
63 65 bar.removeClass('active');
64 66 main.removeClass('active');
65 67 }*/
  68 + alert('hjh')
66 69 bar.toggleClass('active');
67 70 main.toggleClass('active');
68 71 });
... ...
400-SOURCECODE/AIAHTML5.Web/content/js/custom/main.js
... ... @@ -7,8 +7,9 @@ $(function(){
7 7 var barPos=0;
8 8 var bar = $('.sidebar');
9 9 var main = $('.main');
10   - $('.toggleBar').click(function() {
11   - barPos = parseInt($('.sidebar').css('left'));
  10 + $('.toggleBar').click(function () {
  11 + debugger;
  12 + barPos = parseInt($('.sidebar').css('left'));
12 13 if(barPos!==0 && !bar.hasClass('active'))
13 14 {
14 15 bar.addClass('active');
... ...
400-SOURCECODE/AIAHTML5.Web/index.html
... ... @@ -44,7 +44,7 @@
44 44 </button>
45 45 <a class="frameLogo navbar-brand" href="welcome.html"><img src="content/images/logo-main.png" class="img-responsive" alt=""></a>
46 46 </div>
47   - <div ng-include="'TopMenu.html'"/>
  47 + <div ng-include="'TopMenu.html'"></div>
48 48 </div>
49 49 </nav>
50 50 <div class="bodyWrap row">
... ... @@ -52,7 +52,7 @@
52 52 <!--Body-->
53 53  
54 54 <!--<div ng-include="'MainMenu.html'" />-->
55   - <div ng-include="pageToOpen" />
  55 + <div ng-include="pageToOpen" ></div>
56 56 <!--<div data-ng-include data-ng-src="' pageToOpen.name '"></div>-->
57 57 <!-- Footer
58 58 <footer>
... ...
400-SOURCECODE/AIAHTML5.Web/libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.js
  1 +/// <reference path="../../../../../index.html" />
  2 +/// <reference path="../../../../../index.html" />
1 3 /* global console, MobileDetect, jQuery */
2 4 /* jQuery Plugin jsPanel
3 5 Dependencies:
... ... @@ -313,6 +315,7 @@ var jsPanel = {
313 315  
314 316 // closes a jsPanel and removes it from the DOM
315 317 close: function (panel) {
  318 + alert('jspanel closed')
316 319 // get parent-element of jsPanel
317 320 var context = panel.parent(),
318 321 panelID = panel.attr('id');
... ... @@ -1507,6 +1510,7 @@ console.log(&quot;jsPanel version: &quot; + jsPanel.version);
1507 1510 };
1508 1511  
1509 1512 jsP.close = function () {
  1513 + alert('1')
1510 1514 jsPanel.close(jsP);
1511 1515 // no need to return something
1512 1516 };
... ... @@ -1596,6 +1600,7 @@ console.log(&quot;jsPanel version: &quot; + jsPanel.version);
1596 1600  
1597 1601 // jsPanel close
1598 1602 $('.jsPanel-btn-close', jsP).on('click', function (e) {
  1603 + alert('2')
1599 1604 e.preventDefault();
1600 1605 if (!jsP.option.controls.confirmClose) {
1601 1606 jsPanel.close(jsP, jsP.parentElmtTagname);
... ... @@ -1604,6 +1609,7 @@ console.log(&quot;jsPanel version: &quot; + jsPanel.version);
1604 1609 jsPanel.close(jsP, jsP.parentElmtTagname);
1605 1610 }
1606 1611 }
  1612 + window.location.href = "da-view-list";
1607 1613 });
1608 1614  
1609 1615 // jsPanel minimize
... ...