From bba2e69506107080d0bc2386868a779ec86673c0 Mon Sep 17 00:00:00 2001 From: Nasta Date: Thu, 10 Sep 2015 16:35:11 +0300 Subject: [PATCH] add profile file upload preview, fix google maps error, amMap fix, etc. --- src/app/app.js | 2 +- src/app/common/controllers/mainCtrl.js | 2 +- src/app/common/directives/animatedChange.js | 2 +- src/app/common/directives/autoExpand.js | 2 +- src/app/common/directives/autoFocus.js | 2 +- src/app/common/directives/ngFileSelect.js | 10 ++++ src/app/common/directives/zoomIn.js | 2 +- src/app/common/modules/upload.js | 55 +++++++++++++++++++ src/app/components/backTop/backTop.js | 2 +- src/app/components/msgCenter/msgCenter.js | 2 +- src/app/components/pageTop/pageTop.html | 2 +- src/app/components/pageTop/pageTop.js | 2 +- src/app/components/pieCharts/pieCharts.js | 2 +- src/app/components/sidebar/sidebar.js | 2 +- src/app/components/widgets/widgets.js | 2 +- .../charts/widgets/areaChart/areaChart.js | 2 +- .../pages/charts/widgets/barChart/barChart.js | 2 +- .../charts/widgets/funnelChart/funnelChart.js | 2 +- .../charts/widgets/lineChart/lineChart.js | 2 +- .../pages/charts/widgets/pieChart/pieChart.js | 2 +- .../dashboard/widgets/amChart/amChart.js | 2 +- .../widgets/amChartMap/amChartMap.js | 4 +- .../dashboard/widgets/calendar/calendar.js | 2 +- .../pages/dashboard/widgets/chart/chart.js | 2 +- .../dashboard/widgets/timeline/timeline.js | 2 +- src/app/pages/dashboard/widgets/todo/todo.js | 2 +- .../form/inputs/widgets/select/select.js | 2 +- .../form/inputs/widgets/switch/switch.js | 2 +- .../inputs/widgets/tagsInput/tagsInput.js | 2 +- .../maps/widgets/google-maps/google-maps.js | 2 +- .../widgets/google-maps/lib/google-maps.js | 20 ------- src/app/pages/maps/widgets/leaflet/leaflet.js | 2 +- .../maps/widgets/map-bubbles/map-bubbles.js | 2 +- .../pages/maps/widgets/map-lines/map-lines.js | 2 +- .../widgets/notifications/notifications.js | 2 +- src/app/pages/profile/_profile.scss | 14 ++++- src/app/pages/profile/profile.html | 6 +- src/app/pages/profile/profile.js | 10 +++- .../profile/profileModal/profileModal.js | 2 +- src/app/pages/typography/typography.js | 2 +- src/index.html | 1 + 41 files changed, 126 insertions(+), 60 deletions(-) create mode 100644 src/app/common/directives/ngFileSelect.js create mode 100644 src/app/common/modules/upload.js delete mode 100644 src/app/pages/maps/widgets/google-maps/lib/google-maps.js diff --git a/src/app/app.js b/src/app/app.js index 428663d..b9662fb 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -1,6 +1,6 @@ "use strict"; -var app = angular.module('BlurAdmin', [ +var blurAdminApp = angular.module('BlurAdmin', [ 'ui.sortable', 'ngRoute', 'BlurAdmin.dashboard', diff --git a/src/app/common/controllers/mainCtrl.js b/src/app/common/controllers/mainCtrl.js index 28dd2a1..018f69f 100644 --- a/src/app/common/controllers/mainCtrl.js +++ b/src/app/common/controllers/mainCtrl.js @@ -1,6 +1,6 @@ 'use strict'; -app.controller('mainCtrl', ['$scope', '$timeout', function ($scope, $timeout) { +blurAdminApp.controller('mainCtrl', ['$scope', '$timeout', function ($scope, $timeout) { $timeout(function () { $scope.finishLoading = true; }, 1000); diff --git a/src/app/common/directives/animatedChange.js b/src/app/common/directives/animatedChange.js index 87c58db..f1321d9 100644 --- a/src/app/common/directives/animatedChange.js +++ b/src/app/common/directives/animatedChange.js @@ -4,7 +4,7 @@ 'use strict'; -app.directive('animatedChange', ["$timeout", function ($timeout) { +blurAdminApp.directive('animatedChange', ["$timeout", function ($timeout) { return { link: function (scope, element) { $timeout(function () { diff --git a/src/app/common/directives/autoExpand.js b/src/app/common/directives/autoExpand.js index 9115bd4..6bd28c6 100644 --- a/src/app/common/directives/autoExpand.js +++ b/src/app/common/directives/autoExpand.js @@ -3,7 +3,7 @@ */ 'use strict'; -app.directive('autoExpand', function () { +blurAdminApp.directive('autoExpand', function () { return { restrict: 'A', link: function ($scope, elem) { diff --git a/src/app/common/directives/autoFocus.js b/src/app/common/directives/autoFocus.js index de296dc..4a61c53 100644 --- a/src/app/common/directives/autoFocus.js +++ b/src/app/common/directives/autoFocus.js @@ -1,6 +1,6 @@ 'use strict'; -app.directive('autoFocus', ["$timeout", "$parse", function ($timeout, $parse) { +blurAdminApp.directive('autoFocus', ["$timeout", "$parse", function ($timeout, $parse) { return { link: function (scope, element, attrs) { var model = $parse(attrs.autoFocus); diff --git a/src/app/common/directives/ngFileSelect.js b/src/app/common/directives/ngFileSelect.js new file mode 100644 index 0000000..741e61f --- /dev/null +++ b/src/app/common/directives/ngFileSelect.js @@ -0,0 +1,10 @@ +blurAdminApp.directive("ngFileSelect", function () { + return { + link: function ($scope, el) { + el.bind("change", function (e) { + $scope.file = (e.srcElement || e.target).files[0]; + $scope.getFile(); + }) + } + } +}); \ No newline at end of file diff --git a/src/app/common/directives/zoomIn.js b/src/app/common/directives/zoomIn.js index 871e7a3..4305d0e 100644 --- a/src/app/common/directives/zoomIn.js +++ b/src/app/common/directives/zoomIn.js @@ -4,7 +4,7 @@ 'use strict'; -app.directive('zoomIn', ['$timeout', function ($timeout) { +blurAdminApp.directive('zoomIn', ['$timeout', function ($timeout) { return { restrict: 'A', link: function ($scope, elem) { diff --git a/src/app/common/modules/upload.js b/src/app/common/modules/upload.js new file mode 100644 index 0000000..844e9e8 --- /dev/null +++ b/src/app/common/modules/upload.js @@ -0,0 +1,55 @@ +(function (blurAdminApp) { + + blurAdminApp.factory("fileReader", fileReader); + fileReader.$inject = ["$q"]; + + function fileReader ($q) { + var onLoad = function(reader, deferred, scope) { + return function () { + scope.$apply(function () { + deferred.resolve(reader.result); + }); + }; + }; + + var onError = function (reader, deferred, scope) { + return function () { + scope.$apply(function () { + deferred.reject(reader.result); + }); + }; + }; + + var onProgress = function(reader, scope) { + return function (event) { + scope.$broadcast("fileProgress", + { + total: event.total, + loaded: event.loaded + }); + }; + }; + + var getReader = function(deferred, scope) { + var reader = new FileReader(); + reader.onload = onLoad(reader, deferred, scope); + reader.onerror = onError(reader, deferred, scope); + reader.onprogress = onProgress(reader, scope); + return reader; + }; + + var readAsDataURL = function (file, scope) { + var deferred = $q.defer(); + + var reader = getReader(deferred, scope); + reader.readAsDataURL(file); + + return deferred.promise; + }; + + return { + readAsDataUrl: readAsDataURL + }; + } + +}(blurAdminApp)); \ No newline at end of file diff --git a/src/app/components/backTop/backTop.js b/src/app/components/backTop/backTop.js index b589197..dd6c7b7 100644 --- a/src/app/components/backTop/backTop.js +++ b/src/app/components/backTop/backTop.js @@ -1,6 +1,6 @@ 'use strict'; -app.directive('backTop', function () { +blurAdminApp.directive('backTop', function () { return { restrict: 'E', controller: [function () { diff --git a/src/app/components/msgCenter/msgCenter.js b/src/app/components/msgCenter/msgCenter.js index 9dbe770..4fee4f8 100644 --- a/src/app/components/msgCenter/msgCenter.js +++ b/src/app/components/msgCenter/msgCenter.js @@ -1,6 +1,6 @@ 'use strict'; -app.directive('msgCenter', function () { +blurAdminApp.directive('msgCenter', function () { return { restrict: 'E', templateUrl: '/app/components/msgCenter/msgCenter.html' diff --git a/src/app/components/pageTop/pageTop.html b/src/app/components/pageTop/pageTop.html index 1b951a0..f4d2ae2 100644 --- a/src/app/components/pageTop/pageTop.html +++ b/src/app/components/pageTop/pageTop.html @@ -8,7 +8,7 @@ diff --git a/src/app/components/pageTop/pageTop.js b/src/app/components/pageTop/pageTop.js index 178ce58..6e0b40e 100644 --- a/src/app/components/pageTop/pageTop.js +++ b/src/app/components/pageTop/pageTop.js @@ -1,6 +1,6 @@ 'use strict'; -app.directive('pageTop', ["$location", function ($location) { +blurAdminApp.directive('pageTop', ["$location", function ($location) { return { restrict: 'E', templateUrl: '/app/components/pageTop/pageTop.html', diff --git a/src/app/components/pieCharts/pieCharts.js b/src/app/components/pieCharts/pieCharts.js index 7a06a48..a7b27ee 100644 --- a/src/app/components/pieCharts/pieCharts.js +++ b/src/app/components/pieCharts/pieCharts.js @@ -1,6 +1,6 @@ 'use strict'; -app.directive('pieCharts', function () { +blurAdminApp.directive('pieCharts', function () { return { restrict: 'E', controller: ["$scope", "$element", "$window", "$timeout", function ($scope, $element, $window, $timeout) { diff --git a/src/app/components/sidebar/sidebar.js b/src/app/components/sidebar/sidebar.js index e313b29..81b67df 100644 --- a/src/app/components/sidebar/sidebar.js +++ b/src/app/components/sidebar/sidebar.js @@ -1,6 +1,6 @@ 'use strict'; -app.directive('sidebar', function () { +blurAdminApp.directive('sidebar', function () { return { restrict: 'E', templateUrl: '/app/components/sidebar/sidebar.html', diff --git a/src/app/components/widgets/widgets.js b/src/app/components/widgets/widgets.js index c7d31f7..7032dfc 100644 --- a/src/app/components/widgets/widgets.js +++ b/src/app/components/widgets/widgets.js @@ -1,6 +1,6 @@ 'use strict'; -app.directive('widgets', function () { +blurAdminApp.directive('widgets', function () { return { restrict: 'EA', scope: { diff --git a/src/app/pages/charts/widgets/areaChart/areaChart.js b/src/app/pages/charts/widgets/areaChart/areaChart.js index a674dd8..c150060 100644 --- a/src/app/pages/charts/widgets/areaChart/areaChart.js +++ b/src/app/pages/charts/widgets/areaChart/areaChart.js @@ -1,6 +1,6 @@ 'use strict'; -app.controller('areaChartCtrl', ['$scope', '$timeout', '$element', function($scope, $timeout, $element) { +blurAdminApp.controller('areaChartCtrl', ['$scope', '$timeout', '$element', function($scope, $timeout, $element) { var id = $element[0].getAttribute('id'); var areaChart = AmCharts.makeChart(id, { type: "serial", diff --git a/src/app/pages/charts/widgets/barChart/barChart.js b/src/app/pages/charts/widgets/barChart/barChart.js index 1c5e03b..228f7d2 100644 --- a/src/app/pages/charts/widgets/barChart/barChart.js +++ b/src/app/pages/charts/widgets/barChart/barChart.js @@ -1,6 +1,6 @@ 'use strict'; -app.controller('barChartCtrl', ['$scope', '$timeout', '$element', function($scope, $timeout, $element) { +blurAdminApp.controller('barChartCtrl', ['$scope', '$timeout', '$element', function($scope, $timeout, $element) { var id = $element[0].getAttribute('id'); var barChart = AmCharts.makeChart(id, { type: "serial", diff --git a/src/app/pages/charts/widgets/funnelChart/funnelChart.js b/src/app/pages/charts/widgets/funnelChart/funnelChart.js index fd7ece7..9c52245 100644 --- a/src/app/pages/charts/widgets/funnelChart/funnelChart.js +++ b/src/app/pages/charts/widgets/funnelChart/funnelChart.js @@ -1,6 +1,6 @@ 'use strict'; -app.controller('funnelChartCtrl', ['$scope', '$timeout', '$element', function($scope, $timeout, $element) { +blurAdminApp.controller('funnelChartCtrl', ['$scope', '$timeout', '$element', function($scope, $timeout, $element) { var id = $element[0].getAttribute('id'); var funnelChart = AmCharts.makeChart(id, { type: "funnel", diff --git a/src/app/pages/charts/widgets/lineChart/lineChart.js b/src/app/pages/charts/widgets/lineChart/lineChart.js index e4fcb9d..34c2701 100644 --- a/src/app/pages/charts/widgets/lineChart/lineChart.js +++ b/src/app/pages/charts/widgets/lineChart/lineChart.js @@ -1,6 +1,6 @@ 'use strict'; -app.controller('lineChartCtrl', ['$scope', '$timeout', '$element', function($scope, $timeout, $element) { +blurAdminApp.controller('lineChartCtrl', ['$scope', '$timeout', '$element', function($scope, $timeout, $element) { var id = $element[0].getAttribute('id'); var lineChart = AmCharts.makeChart(id, { type: "serial", diff --git a/src/app/pages/charts/widgets/pieChart/pieChart.js b/src/app/pages/charts/widgets/pieChart/pieChart.js index 479859a..7e94bcf 100644 --- a/src/app/pages/charts/widgets/pieChart/pieChart.js +++ b/src/app/pages/charts/widgets/pieChart/pieChart.js @@ -1,6 +1,6 @@ 'use strict'; -app.controller('pieChartCtrl', ['$scope', '$timeout', '$element', function($scope, $timeout, $element) { +blurAdminApp.controller('pieChartCtrl', ['$scope', '$timeout', '$element', function($scope, $timeout, $element) { var id = $element[0].getAttribute('id'); var pieChart = AmCharts.makeChart(id, { type: "pie", diff --git a/src/app/pages/dashboard/widgets/amChart/amChart.js b/src/app/pages/dashboard/widgets/amChart/amChart.js index cfe00b2..0f784a0 100644 --- a/src/app/pages/dashboard/widgets/amChart/amChart.js +++ b/src/app/pages/dashboard/widgets/amChart/amChart.js @@ -1,6 +1,6 @@ 'use strict'; -app.controller('amChartCtrl', ['$scope', '$timeout', '$element', function ($scope, $timeout, $element) { +blurAdminApp.controller('amChartCtrl', ['$scope', '$timeout', '$element', function ($scope, $timeout, $element) { var chartData = [ { date: new Date(2011, 0), value: -30700}, { date: new Date(2011, 1), value: -16800}, diff --git a/src/app/pages/dashboard/widgets/amChartMap/amChartMap.js b/src/app/pages/dashboard/widgets/amChartMap/amChartMap.js index 59ad221..ce45037 100644 --- a/src/app/pages/dashboard/widgets/amChartMap/amChartMap.js +++ b/src/app/pages/dashboard/widgets/amChartMap/amChartMap.js @@ -1,6 +1,6 @@ 'use strict'; -app.controller('amMapCtrl', ['$scope', '$timeout', '$element', function ($scope, $timeout, $element) { +blurAdminApp.controller('amMapCtrl', ['$scope', '$timeout', '$element', function ($scope, $timeout, $element) { var id = $element[0].getAttribute('id'); var map = AmCharts.makeChart(id, { @@ -109,7 +109,7 @@ app.controller('amMapCtrl', ['$scope', '$timeout', '$element', function ($scope, id: "NL", color: colorPrimary, customData: "1 213", - groupId: "before2004" + groupId: "1" }, { title: "Portugal", diff --git a/src/app/pages/dashboard/widgets/calendar/calendar.js b/src/app/pages/dashboard/widgets/calendar/calendar.js index 99f4907..d4ff99b 100644 --- a/src/app/pages/dashboard/widgets/calendar/calendar.js +++ b/src/app/pages/dashboard/widgets/calendar/calendar.js @@ -1,6 +1,6 @@ 'use strict'; -app.controller('calendarCtrl', ['$scope', '$timeout', '$element', function ($scope, $timeout, $element) { +blurAdminApp.controller('calendarCtrl', ['$scope', '$timeout', '$element', function ($scope, $timeout, $element) { $element.fullCalendar({ header: { left: 'prev,next today', diff --git a/src/app/pages/dashboard/widgets/chart/chart.js b/src/app/pages/dashboard/widgets/chart/chart.js index d994b97..3367d58 100644 --- a/src/app/pages/dashboard/widgets/chart/chart.js +++ b/src/app/pages/dashboard/widgets/chart/chart.js @@ -1,6 +1,6 @@ 'use strict'; -app.controller('trafficChartCtrl', [function () { +blurAdminApp.controller('trafficChartCtrl', [function () { var doughnutData = [ { diff --git a/src/app/pages/dashboard/widgets/timeline/timeline.js b/src/app/pages/dashboard/widgets/timeline/timeline.js index a3874f5..d30982c 100644 --- a/src/app/pages/dashboard/widgets/timeline/timeline.js +++ b/src/app/pages/dashboard/widgets/timeline/timeline.js @@ -1,6 +1,6 @@ 'use strict'; -app.controller('timelineCtrl', [function () { +blurAdminApp.controller('timelineCtrl', [function () { var timelineBlocks = $('.cd-timeline-block'), offset = 0.8; diff --git a/src/app/pages/dashboard/widgets/todo/todo.js b/src/app/pages/dashboard/widgets/todo/todo.js index c597861..8840d59 100644 --- a/src/app/pages/dashboard/widgets/todo/todo.js +++ b/src/app/pages/dashboard/widgets/todo/todo.js @@ -1,6 +1,6 @@ 'use strict'; -app.directive('blurTodo', function () { +blurAdminApp.directive('blurTodo', function () { return { restrict: 'A', controller: ["$scope", function ($scope) { diff --git a/src/app/pages/form/inputs/widgets/select/select.js b/src/app/pages/form/inputs/widgets/select/select.js index 49cd391..021296a 100644 --- a/src/app/pages/form/inputs/widgets/select/select.js +++ b/src/app/pages/form/inputs/widgets/select/select.js @@ -1,6 +1,6 @@ 'use strict'; -app.directive('selectpicker', [function() { +blurAdminApp.directive('selectpicker', [function() { return { restrict: 'A', link: function( $scope, elem) { diff --git a/src/app/pages/form/inputs/widgets/switch/switch.js b/src/app/pages/form/inputs/widgets/switch/switch.js index f900fde..56db0e6 100644 --- a/src/app/pages/form/inputs/widgets/switch/switch.js +++ b/src/app/pages/form/inputs/widgets/switch/switch.js @@ -1,6 +1,6 @@ 'use strict'; -app.directive('switch', ['$timeout', function ($timeout) { +blurAdminApp.directive('switch', ['$timeout', function ($timeout) { return { restrict: 'EA', replace: true, diff --git a/src/app/pages/form/inputs/widgets/tagsInput/tagsInput.js b/src/app/pages/form/inputs/widgets/tagsInput/tagsInput.js index 24b1f44..fbb67d2 100644 --- a/src/app/pages/form/inputs/widgets/tagsInput/tagsInput.js +++ b/src/app/pages/form/inputs/widgets/tagsInput/tagsInput.js @@ -1,6 +1,6 @@ 'use strict'; -app.directive('tagInput', [function() { +blurAdminApp.directive('tagInput', [function() { return { restrict: 'A', link: function( $scope, elem, attr) { diff --git a/src/app/pages/maps/widgets/google-maps/google-maps.js b/src/app/pages/maps/widgets/google-maps/google-maps.js index 370419f..f5f1d5b 100644 --- a/src/app/pages/maps/widgets/google-maps/google-maps.js +++ b/src/app/pages/maps/widgets/google-maps/google-maps.js @@ -1,6 +1,6 @@ 'use strict'; -app.controller('googleMapsCtrl', ["$timeout", function ($timeout) { +blurAdminApp.controller('googleMapsCtrl', ["$timeout", function ($timeout) { function initialize() { var mapCanvas = document.getElementById('google-maps'); var mapOptions = { diff --git a/src/app/pages/maps/widgets/google-maps/lib/google-maps.js b/src/app/pages/maps/widgets/google-maps/lib/google-maps.js deleted file mode 100644 index d2c4bb7..0000000 --- a/src/app/pages/maps/widgets/google-maps/lib/google-maps.js +++ /dev/null @@ -1,20 +0,0 @@ -window.google = window.google || {}; -google.maps = google.maps || {}; -(function() { - - function getScript(src) { - document.write('<' + 'script src="' + src + '"><' + '/script>'); - } - - var modules = google.maps.modules = {}; - google.maps.__gjsload__ = function(name, text) { - modules[name] = text; - }; - - google.maps.Load = function(apiLoad) { - delete google.maps.Load; - apiLoad([0.009999999776482582,[[["https://mts0.googleapis.com/vt?lyrs=m@318000000\u0026src=api\u0026hl=en-US\u0026","https://mts1.googleapis.com/vt?lyrs=m@318000000\u0026src=api\u0026hl=en-US\u0026"],null,null,null,null,"m@318000000",["https://mts0.google.com/vt?lyrs=m@318000000\u0026src=api\u0026hl=en-US\u0026","https://mts1.google.com/vt?lyrs=m@318000000\u0026src=api\u0026hl=en-US\u0026"]],[["https://khms0.googleapis.com/kh?v=183\u0026hl=en-US\u0026","https://khms1.googleapis.com/kh?v=183\u0026hl=en-US\u0026"],null,null,null,1,"183",["https://khms0.google.com/kh?v=183\u0026hl=en-US\u0026","https://khms1.google.com/kh?v=183\u0026hl=en-US\u0026"]],null,[["https://mts0.googleapis.com/vt?lyrs=t@132,r@318000000\u0026src=api\u0026hl=en-US\u0026","https://mts1.googleapis.com/vt?lyrs=t@132,r@318000000\u0026src=api\u0026hl=en-US\u0026"],null,null,null,null,"t@132,r@318000000",["https://mts0.google.com/vt?lyrs=t@132,r@318000000\u0026src=api\u0026hl=en-US\u0026","https://mts1.google.com/vt?lyrs=t@132,r@318000000\u0026src=api\u0026hl=en-US\u0026"]],null,null,[["https://cbks0.googleapis.com/cbk?","https://cbks1.googleapis.com/cbk?"]],[["https://khms0.googleapis.com/kh?v=87\u0026hl=en-US\u0026","https://khms1.googleapis.com/kh?v=87\u0026hl=en-US\u0026"],null,null,null,null,"87",["https://khms0.google.com/kh?v=87\u0026hl=en-US\u0026","https://khms1.google.com/kh?v=87\u0026hl=en-US\u0026"]],[["https://mts0.googleapis.com/mapslt?hl=en-US\u0026","https://mts1.googleapis.com/mapslt?hl=en-US\u0026"]],[["https://mts0.googleapis.com/mapslt/ft?hl=en-US\u0026","https://mts1.googleapis.com/mapslt/ft?hl=en-US\u0026"]],[["https://mts0.googleapis.com/vt?hl=en-US\u0026","https://mts1.googleapis.com/vt?hl=en-US\u0026"]],[["https://mts0.googleapis.com/mapslt/loom?hl=en-US\u0026","https://mts1.googleapis.com/mapslt/loom?hl=en-US\u0026"]],[["https://mts0.googleapis.com/mapslt?hl=en-US\u0026","https://mts1.googleapis.com/mapslt?hl=en-US\u0026"]],[["https://mts0.googleapis.com/mapslt/ft?hl=en-US\u0026","https://mts1.googleapis.com/mapslt/ft?hl=en-US\u0026"]],[["https://mts0.googleapis.com/mapslt/loom?hl=en-US\u0026","https://mts1.googleapis.com/mapslt/loom?hl=en-US\u0026"]]],["en-US","US",null,0,null,null,"https://maps.gstatic.com/mapfiles/","https://csi.gstatic.com","https://maps.googleapis.com","https://maps.googleapis.com",null,"https://maps.google.com","https://gg.google.com","https://maps.gstatic.com/maps-api-v3/api/images/","https://www.google.com/maps",0,"https://www.google.com"],["https://maps.googleapis.com/maps-api-v3/api/js/22/2","3.22.2"],[2083414771],1,null,null,null,null,null,"",null,null,1,"https://khms.googleapis.com/mz?v=183\u0026",null,"https://earthbuilder.googleapis.com","https://earthbuilder.googleapis.com",null,"https://mts.googleapis.com/vt/icon",[["https://mts0.googleapis.com/vt","https://mts1.googleapis.com/vt"],["https://mts0.googleapis.com/vt","https://mts1.googleapis.com/vt"],null,null,null,null,null,null,null,null,null,null,["https://mts0.google.com/vt","https://mts1.google.com/vt"],"/maps/vt",318000000,132],2,500,[null,"https://g0.gstatic.com/landmark/tour","https://g0.gstatic.com/landmark/config",null,"https://www.google.com/maps/preview/log204","","https://static.panoramio.com.storage.googleapis.com/photos/",["https://geo0.ggpht.com/cbk","https://geo1.ggpht.com/cbk","https://geo2.ggpht.com/cbk","https://geo3.ggpht.com/cbk"],"https://maps.googleapis.com/maps/api/js/GeoPhotoService.GetMetadata","https://maps.googleapis.com/maps/api/js/GeoPhotoService.SingleImageSearch"],["https://www.google.com/maps/api/js/master?pb=!1m2!1u22!2s2!2sen-US!3sUS!4s22/2","https://www.google.com/maps/api/js/widget?pb=!1m2!1u22!2s2!2sen-US"],null,0,null,"/maps/api/js/ApplicationService.GetEntityDetails",0,null,null,[null,null,null,null,null,null,null,null,null,[0,0],[0,null,1,"12300062","0","U","0","0","0","0"]]], loadScriptTime); - }; - var loadScriptTime = (new Date).getTime(); - getScript("https://maps.googleapis.com/maps-api-v3/api/js/22/2/main.js"); -})(); diff --git a/src/app/pages/maps/widgets/leaflet/leaflet.js b/src/app/pages/maps/widgets/leaflet/leaflet.js index ad969bc..709a5c2 100644 --- a/src/app/pages/maps/widgets/leaflet/leaflet.js +++ b/src/app/pages/maps/widgets/leaflet/leaflet.js @@ -1,6 +1,6 @@ 'use strict'; -app.controller('leafletCtrl', ["$timeout", function ($timeout) { +blurAdminApp.controller('leafletCtrl', ["$timeout", function ($timeout) { var map = L.map('leaflet-map').setView([51.505, -0.09], 13); L.Icon.Default.imagePath = 'release/img'; diff --git a/src/app/pages/maps/widgets/map-bubbles/map-bubbles.js b/src/app/pages/maps/widgets/map-bubbles/map-bubbles.js index e727da0..29948dc 100644 --- a/src/app/pages/maps/widgets/map-bubbles/map-bubbles.js +++ b/src/app/pages/maps/widgets/map-bubbles/map-bubbles.js @@ -1,6 +1,6 @@ 'use strict'; -app.controller('mapBubblesCtrl', [function () { +blurAdminApp.controller('mapBubblesCtrl', [function () { var latlong = {}; latlong["AD"] = {"latitude": 42.5, "longitude": 1.5}; diff --git a/src/app/pages/maps/widgets/map-lines/map-lines.js b/src/app/pages/maps/widgets/map-lines/map-lines.js index 8e45a90..96c27c0 100644 --- a/src/app/pages/maps/widgets/map-lines/map-lines.js +++ b/src/app/pages/maps/widgets/map-lines/map-lines.js @@ -1,6 +1,6 @@ 'use strict'; -app.controller('mapLinesCtrl', [function () { +blurAdminApp.controller('mapLinesCtrl', [function () { // svg path for target icon var targetSVG = "M9,0C4.029,0,0,4.029,0,9s4.029,9,9,9s9-4.029,9-9S13.971,0,9,0z M9,15.93 c-3.83,0-6.93-3.1-6.93-6.93S5.17,2.07,9,2.07s6.93,3.1,6.93,6.93S12.83,15.93,9,15.93 M12.5,9c0,1.933-1.567,3.5-3.5,3.5S5.5,10.933,5.5,9S7.067,5.5,9,5.5 S12.5,7.067,12.5,9z"; // svg path for plane icon diff --git a/src/app/pages/modals/widgets/notifications/notifications.js b/src/app/pages/modals/widgets/notifications/notifications.js index 30ec87a..286e4a6 100644 --- a/src/app/pages/modals/widgets/notifications/notifications.js +++ b/src/app/pages/modals/widgets/notifications/notifications.js @@ -1,6 +1,6 @@ 'use strict'; -app.controller('notificationsCtrl', ["$scope", "toastr", function ($scope, toastr) { +blurAdminApp.controller('notificationsCtrl', ["$scope", "toastr", function ($scope, toastr) { $scope.showSuccessMsg = function() { toastr.success('Your information has been saved successfully!'); diff --git a/src/app/pages/profile/_profile.scss b/src/app/pages/profile/_profile.scss index b525554..9ea464b 100644 --- a/src/app/pages/profile/_profile.scss +++ b/src/app/pages/profile/_profile.scss @@ -69,18 +69,28 @@ h3.with-line { height: 202px; position: relative; cursor: pointer; + .userpic-wrapper { + width: 200px; + height: 200px; + overflow: hidden; + } img { width: 100%; } i { display: none; position: absolute; - top: -15px; - right: -13px; font-size: 32px; background: #ffffff; cursor: pointer; color: $success; + top: -11px; + right: -11px; + height: 26px; + border-radius: 50%; + &:before { + line-height: 26px; + } &:hover { color: $danger; } diff --git a/src/app/pages/profile/profile.html b/src/app/pages/profile/profile.html index f4ee022..345a055 100644 --- a/src/app/pages/profile/profile.html +++ b/src/app/pages/profile/profile.html @@ -19,10 +19,12 @@
diff --git a/src/app/pages/profile/profile.js b/src/app/pages/profile/profile.js index 397b762..8f1b35d 100644 --- a/src/app/pages/profile/profile.js +++ b/src/app/pages/profile/profile.js @@ -8,7 +8,7 @@ angular.module('BlurAdmin.profilePage', ['ngRoute']) controller: 'profilePageCtrl' }); }]) - .controller('profilePageCtrl', ['$scope', function ($scope) { + .controller('profilePageCtrl', ['$scope', 'fileReader', function ($scope, fileReader) { $scope.picture = "release/img/pic-profile.png"; $scope.removePicture = function () { @@ -19,6 +19,7 @@ angular.module('BlurAdmin.profilePage', ['ngRoute']) $scope.uploadPicture = function () { var fileInput = document.getElementById('uploadFile'); fileInput.click(); + }; $scope.socialProfiles = [ @@ -67,5 +68,12 @@ angular.module('BlurAdmin.profilePage', ['ngRoute']) $('#profileModal').modal('show'); }; + $scope.getFile = function () { + fileReader.readAsDataUrl($scope.file, $scope) + .then(function (result) { + $scope.picture = result; + }); + }; + $scope.switches = [true, true, false, true, true, false]; }]); \ No newline at end of file diff --git a/src/app/pages/profile/profileModal/profileModal.js b/src/app/pages/profile/profileModal/profileModal.js index 859e7bf..1a606c8 100644 --- a/src/app/pages/profile/profileModal/profileModal.js +++ b/src/app/pages/profile/profileModal/profileModal.js @@ -1,6 +1,6 @@ 'use strict'; -app.directive('profileModal', [function () { +blurAdminApp.directive('profileModal', [function () { return { restrict: 'EA', replace: true, diff --git a/src/app/pages/typography/typography.js b/src/app/pages/typography/typography.js index b0da914..c936c70 100644 --- a/src/app/pages/typography/typography.js +++ b/src/app/pages/typography/typography.js @@ -8,6 +8,6 @@ angular.module('BlurAdmin.typographyPage', ['ngRoute']) controller: 'typographyPageCtrl' }); }]) - .controller('typographyPageCtrl', ['$scope', '$timeout', function ($scope, $timeout) { + .controller('typographyPageCtrl', [function () { }]); \ No newline at end of file diff --git a/src/index.html b/src/index.html index f0e57d0..aecd29c 100644 --- a/src/index.html +++ b/src/index.html @@ -58,6 +58,7 @@ +