code formatting

This commit is contained in:
Athou
2013-06-28 09:41:50 +02:00
parent 8191530e73
commit 0b017a0732

View File

@@ -18,19 +18,12 @@ module.directive('focus', [ '$timeout', function($timeout) {
/** /**
* Open a popup window pointing to the url in the href attribute * Open a popup window pointing to the url in the href attribute
*/ */
module module.directive('popup', function() {
.directive( var opts = 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=800';
'popup',
function() {
return { return {
link : function(scope, elm, attrs) { link : function(scope, elm, attrs) {
elm elm.bind('click', function(event) {
.bind( window.open(this.href, '', opts);
'click',
function(event) {
window
.open(this.href, '',
'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=800');
event.preventDefault(); event.preventDefault();
}); });
} }
@@ -40,17 +33,15 @@ module
/** /**
* Reusable favicon component * Reusable favicon component
*/ */
module module.directive('favicon', function() {
.directive( var tpl = '<img ng-src="{{url}}" class="favicon"></img>';
'favicon',
function() {
return { return {
restrict : 'E', restrict : 'E',
scope : { scope : {
url : '=' url : '='
}, },
replace : true, replace : true,
template : '<img ng-src="{{url}}" class="favicon"></img>' template : tpl
}; };
}); });