-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
- -
- {{notification.headline}}:{{notification.message}}×
-
-
-
-
-
-
diff --git a/src/Umbraco.Web.UI.Client/src/less/animations.less b/src/Umbraco.Web.UI.Client/src/less/animations.less
index b3d3d6b60d..1dcd9a63eb 100644
--- a/src/Umbraco.Web.UI.Client/src/less/animations.less
+++ b/src/Umbraco.Web.UI.Client/src/less/animations.less
@@ -1,44 +1,44 @@
// Animations
// -------------------------
-.fade-hide-setup, .fade-show-setup {
+.fade-hide, .fade-show {
-webkit-transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.3s;
-moz-transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.3s;
-o-transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.3s;
transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.3s;
}
-.fade-hide-setup {
+.fade-hide {
opacity: 1;
}
-.fade-hide-setup.fade-hide-start {
+.fade-hide.fade-hide-active {
opacity: 0;
}
-.fade-show-setup {
+.fade-show {
opacity: 0;
}
-.fade-show-setup.fade-show-start {
+.fade-show.fade-show-active {
opacity: 1;
}
-.slide-hide-setup, .slide-show-setup {
+.slide-hide, .slide-show {
-webkit-transition: all cubic-bezier(0.770, 0.000, 0.175, 1.000) 0.3s;
-moz-transition: all cubic-bezier(0.770, 0.000, 0.175, 1.000) 0.3s;
-o-transition: all cubic-bezier(0.770, 0.000, 0.175, 1.000) 0.3s;
transition: all cubic-bezier(0.770, 0.000, 0.175, 1.000) 0.3s;
}
-.slide-hide-setup {
+.slide-hide {
margin-left: 0;
}
-.slide-hide-setup.slide-hide-start {
+.slide-hide.slide-hide-active {
margin-left: -100%;
}
-.slide-show-setup {
+.slide-show {
margin-left: -100%;
}
-.slide-show-setup.slide-show-start {
+.slide-show.slide-show-active {
margin-left: 0;
}
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/main.js b/src/Umbraco.Web.UI.Client/src/main.js
index 738ea45873..77187671ef 100644
--- a/src/Umbraco.Web.UI.Client/src/main.js
+++ b/src/Umbraco.Web.UI.Client/src/main.js
@@ -1,6 +1,7 @@
require.config({
waitSeconds: 120,
paths: {
+ app: 'app_dev',
jquery: '../lib/jquery/jquery-1.8.2.min',
jqueryCookie: '../lib/jquery/jquery.cookie',
umbracoExtensions: "../lib/umbraco/extensions",
diff --git a/src/Umbraco.Web.UI.Client/src/views/common/application.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/application.controller.js
deleted file mode 100644
index 84795dcb70..0000000000
--- a/src/Umbraco.Web.UI.Client/src/views/common/application.controller.js
+++ /dev/null
@@ -1,145 +0,0 @@
-//Handles the section area of the app
-angular.module('umbraco').controller("NavigationController",
- function ($scope, navigationService) {
-
- //load navigation service handlers
- $scope.changeSection = navigationService.changeSection;
- $scope.showTree = navigationService.showTree;
- $scope.hideTree = navigationService.hideTree;
- $scope.hideMenu = navigationService.hideMenu;
- $scope.showMenu = navigationService.showMenu;
- $scope.hideDialog = navigationService.hideDialog;
- $scope.hideNavigation = navigationService.hideNavigation;
- $scope.ui = navigationService.ui;
-
- $scope.selectedId = navigationService.currentId;
- $scope.sections = navigationService.sections();
-
- //events
- $scope.$on("treeOptionsClick", function(ev, args){
- $scope.currentNode = args.node;
- args.scope = $scope;
- navigationService.showMenu(ev, args);
- });
-
- $scope.openDialog = function(currentNode,action,currentSection){
- navigationService.showDialog({
- scope: $scope,
- node: currentNode,
- action: action,
- section: currentSection});
- };
-});
-
-
-angular.module('umbraco').controller("SearchController", function ($scope, searchService, $log, navigationService) {
-
- var currentTerm = "";
- $scope.deActivateSearch = function(){
- currentTerm = "";
- };
-
- $scope.performSearch = function (term) {
- if(term != undefined && term != currentTerm){
- if(term.length > 3){
- $scope.ui.selectedSearchResult = -1;
- navigationService.showSearch();
- currentTerm = term;
- $scope.ui.searchResults = searchService.search(term, $scope.currentSection);
- }else{
- $scope.ui.searchResults = [];
- }
- }
- };
-
- $scope.hideSearch = navigationService.hideSearch;
-
- $scope.iterateResults = function (direction) {
- if(direction == "up" && $scope.ui.selectedSearchResult < $scope.ui.searchResults.length)
- $scope.ui.selectedSearchResult++;
- else if($scope.ui.selectedSearchResult > 0)
- $scope.ui.selectedSearchResult--;
- };
-
- $scope.selectResult = function () {
- navigationService.showMenu($scope.ui.searchResults[$scope.ui.selectedSearchResult], undefined);
- };
-});
-
-
-angular.module('umbraco').controller("DashboardController", function ($scope, $routeParams, scriptLoader) {
- $scope.name = $routeParams.section;
-
- scriptLoader.load(['http://www.google.com/jsapi'])
- .then(function(){
- google.load("maps", "3",
- {
- callback: function () {
-
- //Google maps is available and all components are ready to use.
- var mapOptions = {
- zoom: 8,
- center: new google.maps.LatLng(-34.397, 150.644),
- mapTypeId: google.maps.MapTypeId.ROADMAP
- };
-
- var mapDiv = document.getElementById('test_map');
- var map = new google.maps.Map(mapDiv, mapOptions);
-
- },
- other_params: "sensor=false"
- });
- });
-
-});
-
-
-//handles authentication and other application.wide services
-angular.module('umbraco').controller("MainController",
- function ($scope, $routeParams, $rootScope, notificationsService, userService, navigationService) {
-
- //also be authed for e2e test
- var d = new Date();
- var weekday = new Array("Super Sunday", "Manic Monday", "Tremendous Tuesday", "Wonderfull Wednesday", "Thunder Thursday", "Friendly Friday", "Shiny Saturday");
- $scope.today = weekday[d.getDay()];
-
-
- $scope.signin = function () {
- $scope.authenticated = userService.authenticate($scope.login, $scope.password);
-
- if($scope.authenticated){
- $scope.user = userService.getCurrentUser();
- }
- };
-
- $scope.signout = function () {
- userService.signout();
- $scope.authenticated = false;
- };
-
-
- //subscribes to notifications in the notification service
- $scope.notifications = notificationsService.current;
- $scope.$watch('notificationsService.current', function (newVal, oldVal, scope) {
- if (newVal) {
- $scope.notifications = newVal;
- }
- });
-
- $scope.removeNotification = function(index) {
- notificationsService.remove(index);
- };
-
- $scope.closeDialogs = function(event){
-
- $rootScope.$emit("closeDialogs");
-
- if(navigationService.ui.stickyNavigation && $(event.target).parents(".umb-modalcolumn").size() == 0){
- navigationService.hideNavigation();
- }
- };
-
- if (userService.authenticated) {
- $scope.signin();
- }
-});
diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dashboard.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/dashboard.controller.js
new file mode 100644
index 0000000000..2a0b0cc3d0
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/src/views/common/dashboard.controller.js
@@ -0,0 +1,14 @@
+/**
+ * @ngdoc controller
+ * @name DashboardController
+ * @function
+ *
+ * @description
+ * Controls the dashboards of the application
+ *
+ */
+function DashboardController($scope, $routeParams) {
+ $scope.name = $routeParams.section;
+}
+//register it
+angular.module('umbraco').controller("DashboardController", DashboardController);
diff --git a/src/Umbraco.Web.UI.Client/src/views/common/main.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/main.controller.js
new file mode 100644
index 0000000000..f6b8e95856
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/src/views/common/main.controller.js
@@ -0,0 +1,82 @@
+
+/**
+ * @ngdoc controller
+ * @name MainController
+ * @function
+ *
+ * @description
+ * The main application controller
+ *
+ */
+function MainController($scope, $routeParams, $rootScope, $timeout, notificationsService, userService, navigationService) {
+ //also be authed for e2e test
+ var d = new Date();
+ var weekday = new Array("Super Sunday", "Manic Monday", "Tremendous Tuesday", "Wonderfull Wednesday", "Thunder Thursday", "Friendly Friday", "Shiny Saturday");
+ $scope.today = weekday[d.getDay()];
+
+
+ //set default properties
+ $scope.authenticated = null; //the null is important because we do an explicit bool check on this in the view
+ $scope.login = "";
+ $scope.password = "";
+
+ /**
+ * @ngdoc function
+ * @name signin
+ * @methodOf MainController
+ * @function
+ *
+ * @description
+ * signs the user in
+ */
+ $scope.signin = function () {
+
+ userService.authenticate($scope.login, $scope.password)
+ .then(function (data) {
+ $scope.authenticated = data.authenticated;
+ $scope.user = data.user;
+ }, function (reason) {
+ alert(reason);
+ });
+ };
+
+ $scope.signout = function () {
+ userService.signout();
+ $scope.authenticated = false;
+ };
+
+ //subscribes to notifications in the notification service
+ $scope.notifications = notificationsService.current;
+ $scope.$watch('notificationsService.current', function (newVal, oldVal, scope) {
+ if (newVal) {
+ $scope.notifications = newVal;
+ }
+ });
+
+ $scope.removeNotification = function (index) {
+ notificationsService.remove(index);
+ };
+
+ $scope.closeDialogs = function (event) {
+
+ $rootScope.$emit("closeDialogs");
+
+ if (navigationService.ui.stickyNavigation && $(event.target).parents(".umb-modalcolumn").size() == 0) {
+ navigationService.hideNavigation();
+ }
+ };
+
+ //fetch the authorized status
+ userService.isAuthenticated()
+ .then(function (data) {
+ $scope.authenticated = data.authenticated;
+ $scope.user = data.user;
+ }, function (reason) {
+ alert("An error occurred checking authentication.");
+ $scope.authenticated = false;
+ $scope.user = null;
+ });
+}
+
+//register it
+angular.module('umbraco').controller("MainController", MainController);
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/views/common/navigation.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/navigation.controller.js
new file mode 100644
index 0000000000..a9ff4cbb72
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/src/views/common/navigation.controller.js
@@ -0,0 +1,44 @@
+
+/**
+ * @ngdoc controller
+ * @name NavigationController
+ * @function
+ *
+ * @description
+ * Handles the section area of the app
+ *
+ * @param navigationService {navigationService} A reference to the navigationService
+ */
+function NavigationController($scope, navigationService) {
+ //load navigation service handlers
+ $scope.changeSection = navigationService.changeSection;
+ $scope.showTree = navigationService.showTree;
+ $scope.hideTree = navigationService.hideTree;
+ $scope.hideMenu = navigationService.hideMenu;
+ $scope.showMenu = navigationService.showMenu;
+ $scope.hideDialog = navigationService.hideDialog;
+ $scope.hideNavigation = navigationService.hideNavigation;
+ $scope.ui = navigationService.ui;
+
+ $scope.selectedId = navigationService.currentId;
+ $scope.sections = navigationService.sections();
+
+ //events
+ $scope.$on("treeOptionsClick", function (ev, args) {
+ $scope.currentNode = args.node;
+ args.scope = $scope;
+ navigationService.showMenu(ev, args);
+ });
+
+ $scope.openDialog = function (currentNode, action, currentSection) {
+ navigationService.showDialog({
+ scope: $scope,
+ node: currentNode,
+ action: action,
+ section: currentSection
+ });
+ };
+}
+
+//register it
+angular.module('umbraco').controller("NavigationController", NavigationController);
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/views/common/search.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/search.controller.js
new file mode 100644
index 0000000000..54ac10a1ae
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/src/views/common/search.controller.js
@@ -0,0 +1,43 @@
+/**
+ * @ngdoc controller
+ * @name SearchController
+ * @function
+ *
+ * @description
+ * Controls the search functionality in the site
+ *
+ */
+function SearchController($scope, searchService, $log, navigationService) {
+ var currentTerm = "";
+ $scope.deActivateSearch = function () {
+ currentTerm = "";
+ };
+
+ $scope.performSearch = function (term) {
+ if (term != undefined && term != currentTerm) {
+ if (term.length > 3) {
+ $scope.ui.selectedSearchResult = -1;
+ navigationService.showSearch();
+ currentTerm = term;
+ $scope.ui.searchResults = searchService.search(term, $scope.currentSection);
+ } else {
+ $scope.ui.searchResults = [];
+ }
+ }
+ };
+
+ $scope.hideSearch = navigationService.hideSearch;
+
+ $scope.iterateResults = function (direction) {
+ if (direction == "up" && $scope.ui.selectedSearchResult < $scope.ui.searchResults.length)
+ $scope.ui.selectedSearchResult++;
+ else if ($scope.ui.selectedSearchResult > 0)
+ $scope.ui.selectedSearchResult--;
+ };
+
+ $scope.selectResult = function () {
+ navigationService.showMenu($scope.ui.searchResults[$scope.ui.selectedSearchResult], undefined);
+ };
+}
+//register it
+angular.module('umbraco').controller("SearchController", SearchController);
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/views/directives/umb-avatar.html b/src/Umbraco.Web.UI.Client/src/views/directives/umb-avatar.html
new file mode 100644
index 0000000000..48a4a776ba
--- /dev/null
+++ b/src/Umbraco.Web.UI.Client/src/views/directives/umb-avatar.html
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI.Client/src/views/directives/umb-leftcolumn.html b/src/Umbraco.Web.UI.Client/src/views/directives/umb-leftcolumn.html
index 8de56c7978..72c1bd17b1 100644
--- a/src/Umbraco.Web.UI.Client/src/views/directives/umb-leftcolumn.html
+++ b/src/Umbraco.Web.UI.Client/src/views/directives/umb-leftcolumn.html
@@ -1,17 +1,16 @@