From 0b017a073215511efa8e24bcc7abdad405a8da67 Mon Sep 17 00:00:00 2001 From: Athou Date: Fri, 28 Jun 2013 09:41:50 +0200 Subject: [PATCH] code formatting --- src/main/webapp/js/directives.js | 53 +++++++++++++------------------- 1 file changed, 22 insertions(+), 31 deletions(-) diff --git a/src/main/webapp/js/directives.js b/src/main/webapp/js/directives.js index acb6e730..64157c4b 100644 --- a/src/main/webapp/js/directives.js +++ b/src/main/webapp/js/directives.js @@ -18,41 +18,32 @@ module.directive('focus', [ '$timeout', function($timeout) { /** * Open a popup window pointing to the url in the href attribute */ -module - .directive( - 'popup', - function() { - return { - link : function(scope, elm, attrs) { - elm - .bind( - 'click', - function(event) { - window - .open(this.href, '', - 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=800'); - event.preventDefault(); - }); - } - }; - }); +module.directive('popup', function() { + var opts = 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=800'; + return { + link : function(scope, elm, attrs) { + elm.bind('click', function(event) { + window.open(this.href, '', opts); + event.preventDefault(); + }); + } + }; +}); /** * Reusable favicon component */ -module - .directive( - 'favicon', - function() { - return { - restrict : 'E', - scope : { - url : '=' - }, - replace : true, - template : '' - }; - }); +module.directive('favicon', function() { + var tpl = ''; + return { + restrict : 'E', + scope : { + url : '=' + }, + replace : true, + template : tpl + }; +}); /** * Support for the blur event