From 16fd335b898e67f54b58399230f850a8a6604d57 Mon Sep 17 00:00:00 2001 From: Minhaj Mehmood Date: Mon, 9 Mar 2015 21:27:26 +0400 Subject: [PATCH 1/3] Adding footer content --- dashboard/partial/footer/footer.html | 8 +++++--- dashboard/partial/footer/footer.js | 5 ++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dashboard/partial/footer/footer.html b/dashboard/partial/footer/footer.html index 4a9d242..3e905ec 100644 --- a/dashboard/partial/footer/footer.html +++ b/dashboard/partial/footer/footer.html @@ -1,4 +1,6 @@ -
-footer + + -
diff --git a/dashboard/partial/footer/footer.js b/dashboard/partial/footer/footer.js index ce8de38..bccf31b 100644 --- a/dashboard/partial/footer/footer.js +++ b/dashboard/partial/footer/footer.js @@ -1,4 +1,3 @@ angular.module('dashboard').controller('FooterCtrl',function($scope){ - - -}); \ No newline at end of file + $scope.date = new Date(); +}); From 7ffc5e895e0fa2547cfddad6ab14b36e91d0ae60 Mon Sep 17 00:00:00 2001 From: Minhaj Mehmood Date: Mon, 9 Mar 2015 21:30:15 +0400 Subject: [PATCH 2/3] Some layout changes in index.html --- index.html | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index bdef94e..adbf0e3 100755 --- a/index.html +++ b/index.html @@ -45,6 +45,7 @@ + @@ -52,13 +53,7 @@
-
-
-
-
-
-
-
+
From 129c79f847fe7fefcd21d3b382dc93d131b5a215 Mon Sep 17 00:00:00 2001 From: Minhaj Mehmood Date: Mon, 9 Mar 2015 21:41:19 +0400 Subject: [PATCH 3/3] Adding time slice popup --- .yo-rc.json | 2 +- dashboard/dashboard.less | 1 + .../add-time-slice/add-time-slice-spec.js | 18 ++++++ .../add-time-slice/add-time-slice.html | 17 +++++ .../partial/add-time-slice/add-time-slice.js | 11 ++++ .../add-time-slice/add-time-slice.less | 0 dashboard/partial/dashboard/dashboard.html | 1 - dashboard/partial/header/header.html | 64 ++++++++++++++++++- dashboard/partial/header/header.js | 19 +++++- 9 files changed, 126 insertions(+), 7 deletions(-) create mode 100644 dashboard/partial/add-time-slice/add-time-slice-spec.js create mode 100644 dashboard/partial/add-time-slice/add-time-slice.html create mode 100644 dashboard/partial/add-time-slice/add-time-slice.js create mode 100644 dashboard/partial/add-time-slice/add-time-slice.less diff --git a/.yo-rc.json b/.yo-rc.json index 3cf0e28..6202fb8 100644 --- a/.yo-rc.json +++ b/.yo-rc.json @@ -38,4 +38,4 @@ } ] } -} \ No newline at end of file +} diff --git a/dashboard/dashboard.less b/dashboard/dashboard.less index d7f5783..60b1382 100644 --- a/dashboard/dashboard.less +++ b/dashboard/dashboard.less @@ -2,5 +2,6 @@ @import "partial/header/header.less"; @import "partial/footer/footer.less"; @import "partial/dashboard/dashboard.less"; +@import "partial/add-time-slice/add-time-slice.less"; /* Add Component LESS Above */ diff --git a/dashboard/partial/add-time-slice/add-time-slice-spec.js b/dashboard/partial/add-time-slice/add-time-slice-spec.js new file mode 100644 index 0000000..2bdbea3 --- /dev/null +++ b/dashboard/partial/add-time-slice/add-time-slice-spec.js @@ -0,0 +1,18 @@ +describe('AddTimeSliceCtrl', function() { + + beforeEach(module('dashboard')); + + var scope,ctrl; + + beforeEach(inject(function($rootScope, $controller) { + scope = $rootScope.$new(); + ctrl = $controller('AddTimeSliceCtrl', {$scope: scope}); + })); + + it('should ...', inject(function() { + + expect(1).toEqual(1); + + })); + +}); \ No newline at end of file diff --git a/dashboard/partial/add-time-slice/add-time-slice.html b/dashboard/partial/add-time-slice/add-time-slice.html new file mode 100644 index 0000000..b6fe332 --- /dev/null +++ b/dashboard/partial/add-time-slice/add-time-slice.html @@ -0,0 +1,17 @@ +
+ +
diff --git a/dashboard/partial/add-time-slice/add-time-slice.js b/dashboard/partial/add-time-slice/add-time-slice.js new file mode 100644 index 0000000..c535a5f --- /dev/null +++ b/dashboard/partial/add-time-slice/add-time-slice.js @@ -0,0 +1,11 @@ +angular.module('dashboard').controller('AddTimeSliceCtrl',function($scope, $modalInstance){ + + $scope.ok = function () { + $modalInstance.close(); + }; + + $scope.cancel = function () { + $modalInstance.dismiss('cancel'); + }; + +}); diff --git a/dashboard/partial/add-time-slice/add-time-slice.less b/dashboard/partial/add-time-slice/add-time-slice.less new file mode 100644 index 0000000..e69de29 diff --git a/dashboard/partial/dashboard/dashboard.html b/dashboard/partial/dashboard/dashboard.html index 7baa957..17c7359 100644 --- a/dashboard/partial/dashboard/dashboard.html +++ b/dashboard/partial/dashboard/dashboard.html @@ -3,4 +3,3 @@ Welcome, {{ currentUser }} - diff --git a/dashboard/partial/header/header.html b/dashboard/partial/header/header.html index 7c377bf..963e1bb 100644 --- a/dashboard/partial/header/header.html +++ b/dashboard/partial/header/header.html @@ -1,5 +1,63 @@ -
+
+ + +
+ +
diff --git a/dashboard/partial/header/header.js b/dashboard/partial/header/header.js index b302c4b..a5428d4 100644 --- a/dashboard/partial/header/header.js +++ b/dashboard/partial/header/header.js @@ -1,4 +1,19 @@ -angular.module('dashboard').controller('HeaderCtrl',function($scope){ +angular.module('dashboard').controller('HeaderCtrl', function($scope, $modal){ + $scope.open = function () { + var modalInstance = $modal.open({ + templateUrl: 'myModalContent.html', + controller: 'AddTimeSliceCtrl', + resolve: { + items: function () { + return $scope.items; + } + } + }); -}); \ No newline at end of file + modalInstance.result.then(function () { + }, function () { + console.log('Modal dismissed at: ' + new Date()); + }); + }; +});