started on avatar directive

This commit is contained in:
Shannon
2013-06-18 12:02:34 +10:00
parent e408d5f536
commit 15ea17e6d6
3 changed files with 22 additions and 6 deletions

View File

@@ -0,0 +1,14 @@
/**
* @ngdoc directive
* @name umbraco.directives:login
* @restrict E
**/
function avatarDirective() {
return {
restrict: "E", // restrict to an element
replace: true, // replace the html element with the template
templateUrl: 'views/directives/umb-avatar.html'
};
}
angular.module('umbraco.directives').directive("umbAvatar", avatarDirective);

View File

@@ -0,0 +1,3 @@
<a href="#" title="{{name}}">
<img ng-src="{{email}}" />
</a>

View File

@@ -1,17 +1,16 @@
<div id="leftcolumn" ng-controller="NavigationController" ng-mouseleave="hideTree()">
<div id="applications" ng-class="{faded:ui.stickyNavigation}">
<ul class="sections">
<li class="avatar">
<a href="#" title="{{user.name}}">
<img ng-src="{{user.avatar}}" />
</a>
<umb-avatar name="{{user.name}}" email="{{user.email}}"></umb-avatar>
</li>
<li ng-repeat="section in sections">
<a href="#/{{section.alias}}"
ng-click="changeSection(section.alias)"
ng-mouseenter="showTree(section.alias)"
prevent-default>
ng-click="changeSection(section.alias)"
ng-mouseenter="showTree(section.alias)"
prevent-default>
<i class="{{section.cssclass}}"></i><span>{{section.name}}</span>
</a>
</li>