Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 6950960

Browse files
committed
build
1 parent 0ae3a3e commit 6950960

File tree

3 files changed

+98
-1
lines changed

3 files changed

+98
-1
lines changed

dist/example.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@
6060
url: '/scroll',
6161
templateUrl: 'views/scroll.example.html'
6262
};
63+
states['flush-height'] = {
64+
url: '/flush-height',
65+
templateUrl: 'views/flush-height.example.html'
66+
};
67+
states['full-height'] = {
68+
url: '/full-height',
69+
templateUrl: 'views/full-height.example.html'
70+
};
6371
results = [];
6472
for (key in states) {
6573
state = states[key];
@@ -142,7 +150,9 @@ angular.module("example").run(["$templateCache", function($templateCache) {$temp
142150
$templateCache.put("views/checkbox.example.html","<checkbox ng-model=\"vm.value\" label=\"Show me the money\"></checkbox><hr/><img src=\"http://i.perezhilton.com/wp-content/uploads/2013/07/tumblr_m3bwbqnjig1rrgbmqo1_500.gif\" ng-show=\"vm.value\"/>");
143151
$templateCache.put("views/countdown.example.html","<countdown end=\"2015-08-013 09:30:26.123+07:00\"></countdown>");
144152
$templateCache.put("views/filters.example.html","<time>{{ \"1995-12-25T08:00:00.000Z\" | timeLapse }}</time>");
153+
$templateCache.put("views/flush-height.example.html","<div flush-height=\"flush-height\" style=\"background-color:grey\">Flush Height</div>");
145154
$templateCache.put("views/focus-on-click.example.html","<button type=\"button\" focus-on-click=\"focus-on-click\" class=\"focus-on-click\">should have red border when focused</button>");
155+
$templateCache.put("views/full-height.example.html","<div full-height=\"full-height\" style=\"background-color:grey\">Full Height</div>");
146156
$templateCache.put("views/loader.example.html","<loader></loader>");
147157
$templateCache.put("views/modal.example.html","<button ng-click=\"vm.show = true\">Show</button><modal show=\"vm.show\" background-click-close=\"background-click-close\"><img src=\"http://petdogss.com/wp-content/uploads/2015/01/attention-seeking-puppy.jpg\"/></modal>");
148158
$templateCache.put("views/scroll.example.html","<button type=\"button\" scroll-element=\"section2\">Scroll to Section 2</button><div id=\"section1\" class=\"scrollSection\"><h2>Section 1</h2></div><div id=\"section2\" class=\"scrollSection\"><h2>Section 2</h2></div>");

dist/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<link rel="stylesheet" href="main.css">
55

66

7-
</head><body><ul class="nav"><li><a ui-sref="avatar">Avatar</a></li><li><a ui-sref="countdown">Countdown</a></li><li><a ui-sref="loader">Loader</a></li><li><a ui-sref="filters">Filters</a></li><li><a ui-sref="modal">Modal</a></li><li><a ui-sref="focus-on-click">Focus on click</a></li><li><a ui-sref="checkbox">Checkbox</a></li><li><a ui-sref="selected-button" style="text-decoration: line-through;">Selected Button</a></li><li><a ui-sref="selectable">Selectable</a></li><li><a ui-sref="scroll">Scroll</a></li></ul><main role="main" ui-view="" class="layout-main {{ pageClass }}"></main><end></end><end></end><end></end>
7+
</head><body><ul class="nav"><li><a ui-sref="avatar">Avatar</a></li><li><a ui-sref="countdown">Countdown</a></li><li><a ui-sref="loader">Loader</a></li><li><a ui-sref="filters">Filters</a></li><li><a ui-sref="modal">Modal</a></li><li><a ui-sref="focus-on-click">Focus on click</a></li><li><a ui-sref="checkbox">Checkbox</a></li><li><a ui-sref="selected-button" style="text-decoration: line-through;">Selected Button</a></li><li><a ui-sref="selectable">Selectable</a></li><li><a ui-sref="scroll">Scroll</a></li><li><a ui-sref="flush-height">Flush Height</a></li><li><a ui-sref="full-height">Full Height</a></li></ul><main role="main" ui-view="" class="layout-main {{ pageClass }}"></main><end></end><end></end><end></end>
88
<script src="lib.js"></script>
99
<script src="main.js"></script>
1010
<script src="example.js"></script>

dist/main.js

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,93 @@ $templateCache.put("views/selected-button.directive.html","<button ng-class=\"{\
253253

254254
}).call(this);
255255

256+
(function() {
257+
'use strict';
258+
var dir;
259+
260+
dir = function($window, $rootScope) {
261+
var elements, flushHeight, link, setViewPortHeight, viewPortHeight;
262+
viewPortHeight = 0;
263+
elements = [];
264+
setViewPortHeight = function() {
265+
viewPortHeight = $($window).height();
266+
return viewPortHeight;
267+
};
268+
setViewPortHeight();
269+
flushHeight = function($element) {
270+
var heightDiff, ref, ref1, top;
271+
top = (ref = $element[0]) != null ? (ref1 = ref.getBoundingClientRect()) != null ? ref1.top : void 0 : void 0;
272+
heightDiff = viewPortHeight - top;
273+
return $element.height(heightDiff);
274+
};
275+
$($window).bind('resize', function() {
276+
var element, i, len, results;
277+
setViewPortHeight();
278+
results = [];
279+
for (i = 0, len = elements.length; i < len; i++) {
280+
element = elements[i];
281+
results.push(flushHeight(element));
282+
}
283+
return results;
284+
});
285+
link = function(scope, element, attrs) {
286+
elements.push($(element[0]));
287+
return flushHeight($(element[0]));
288+
};
289+
return {
290+
restrict: 'A',
291+
link: link
292+
};
293+
};
294+
295+
dir.$inject = ['$window', '$rootScope'];
296+
297+
angular.module('appirio-tech-ng-ui-components').directive('flushHeight', dir);
298+
299+
}).call(this);
300+
301+
(function() {
302+
'use strict';
303+
var dir;
304+
305+
dir = function($window, $rootScope) {
306+
var elements, fullHeight, link, setViewPortHeight, viewPortHeight;
307+
viewPortHeight = 0;
308+
elements = [];
309+
setViewPortHeight = function() {
310+
viewPortHeight = $($window).height();
311+
return viewPortHeight;
312+
};
313+
setViewPortHeight();
314+
fullHeight = function($element) {
315+
return $element.height(viewPortHeight);
316+
};
317+
$($window).bind('resize', function() {
318+
var element, i, len, results;
319+
setViewPortHeight();
320+
results = [];
321+
for (i = 0, len = elements.length; i < len; i++) {
322+
element = elements[i];
323+
results.push(fullHeight(element));
324+
}
325+
return results;
326+
});
327+
link = function(scope, element, attrs) {
328+
elements.push($(element[0]));
329+
return fullHeight($(element[0]));
330+
};
331+
return {
332+
restrict: 'A',
333+
link: link
334+
};
335+
};
336+
337+
dir.$inject = ['$window', '$rootScope'];
338+
339+
angular.module('appirio-tech-ng-ui-components').directive('fullHeight', dir);
340+
341+
}).call(this);
342+
256343
(function() {
257344
'use strict';
258345
var AvatarController;

0 commit comments

Comments
 (0)