$scope.pager.page = 1;
}
- $scope.print_hide = function(v) {
- $log.info('print_hide', v);
- if ( v ) {
- angular.element('.print-hide').hide();
- angular.element('.print-add-center').addClass('print-center');
- } else {
- angular.element('.print-hide').show();
- angular.element('.print-add-center').removeClass('print-center');
+ $scope.print = {
+ layout: false,
+ center: '',
+ toggle: function(v) {
+ $log.info('print_hide', v);
+ $scope.print.layout = ! $scope.print.layout;
+ if ( v ) {
+ $scope.print.center = 'print-center';
+ } else {
+ $scope.print.center = '';
+ }
}
}
}
-<dt class="print-hide">
+<dt ng-show="! print.layout">
% if ( my $before = stash('before') ) {
%= $before->()
% }
<dd>
- <p class="well print-hide">
+ <p class="well" ng-show="! print.layout">
{{registration.user.firstname}}
{{registration.user.surname}}
<em>{{registration.user.organization}}</em>,
</p>
</p>
-<h3 ng-show="registration.work.title" class="print-add-center">
+<h3 ng-show="registration.work.title" ng-class="print.center">
{{registration.work.title}}
</h3>
-<p ng-repeat="author in registration.work.persons" class="print-add-center">
+<p ng-repeat="author in registration.work.persons" ng-class="print.center">
{{author.firstname}}
- {{author.surname}}<span class="print-hide">,</span>
- <em class="print-add-center">{{author.organization}}</em>
- <tt class="print-hide"><{{author.email}}></tt>
+ {{author.surname}}<span ng-show="! print.layout">,</span>
+ <br ng-show="print.layout">
+ <em ng-class="print.center">{{author.organization}}</em>
+ <tt ng-show="! print.layout"><{{author.email}}></tt>
</p>
<p class="abstract">{{registration.work.abstract}}</p>