view.phtml
1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<div class="n2-heading-bar <?php echo $snapClass; ?>">
<?php
if ($snap == false) :
?>
<div class="n2-heading-bar-left">
<div class="n2-h1 n2-heading"><?php echo $title; ?></div>
</div>
<?php
endif;
?>
<?php
if (count($menu)):
?>
<div class="n2-heading-menu">
<?php
foreach ($menu AS $menu):
echo $menu;
endforeach;
?>
</div>
<?php
endif;
?>
<?php
if (!empty($actions)):
?>
<div class="n2-heading-actions">
<span class="n2-heading-actions-label n2-h4"></span>
<?php
echo $actions;
?>
</div>
<?php
endif;
?>
</div>
<script type="text/javascript">
nextend.ready(
function ($) {
var label = $('.n2-heading-actions-label');
$('.n2-heading-actions > a').on({
mouseenter: function () {
label.html($(this).data('label'));
},
mouseleave: function () {
label.html('');
}
});
}
);
</script>
<?php
if ($snap !== false) :
?>
<script type="text/javascript">
nextend.ready(
function ($) {
var topOffset = $('#wpadminbar, .navbar-fixed-top').height() + $('.n2-top-bar').height() + 2 <?php echo $snap; ?>;
$('.<?php echo $snapClass; ?>').each(function () {
var bar = $(this);
bar.css({height: 0, marginTop: -34});
bar.fixTo(bar.parent(), {
top: topOffset
});
});
}
);
</script>
<?php
endif;
?>