building.php
3.07 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<? include $_SERVER["DOCUMENT_ROOT"] . "/web/inc/php/header.php" ?>
<script language="javascript">
$(document).ready(function(){
var _isANDApp = (navigator.userAgent.indexOf('APPG(ANDROID)') != -1);
$(".jClose").click2(function(){
location.href = "native://action?cmd=closeWebView" ;
return false ;
});
$(".jPage").click2(function(){
var page = $(this).attr("page");
$(".jPage").removeClass("active") ;
$(this).addClass("active") ;
$.ajax({
url : "/web/buildingManage/" + page ,
type : "html",
success : function(data){
$(".jMainArea").html("");
$(".jMainArea").append(data);
} ,
complete : function(){
if(!_isANDApp){
var h = $(".jMainArea").height() + 100;
$(".jMainArea").css({"height" : h + "px"});
}
}
});
});
$(".jMainArea").on("click", ".jPopup", function(){
var page = $(this).attr("page");
var top = Math.max(0, (($(window).height() - $(this).outerHeight()) / 2) + $(window).scrollTop()) - 100;
$.ajax({
url : "/web/buildingManage/" + page ,
type : "html",
success : function(data){
$(".jPopupArea").html("") ;
$(".jPopupArea").append(data).trigger("create") ;
//스크롤 잠금
$(document).on('scroll touchmove mousewheel', function(e) {
e.preventDefault();
e.stopPropagation();
return false;
}) ;
$(".pop").css({ "margin-top" : top + "px" });
$(".jPopupArea").show() ;
}
});
});
$(document).on("click", ".jExit", function(){
//스크롤 잠금 해제
$(document).off("scroll touchmove mousewheel");
$(".jPopupArea").html("") ;
$(".jPopupArea").hide() ;
});
$(".jMainArea").on("click", ".jView", function(){
var no = $(this).attr("_no") ;
var page = $(this).attr("page") ;
location.href="/web/buildingManage/"+page+"?no="+no ;
});
$(".jMainArea").on("click", ".jRentView", function(){
var no = $(this).attr("_no") ;
location.href="/web/billManage/monthlyView.php?no="+no ;
});
init() ;
}) ;
function init() {
$(".jFirst").trigger("click") ;
$(".jFirst").removeClass("jFirst") ;
}
</script>
<div class="Wrap" style="height:100%">
<!-- 헤드 -->
<header>
<ul>
<li class="jClose"><img src="/web/inc/images/btn_top_back_over.png" alt="back" width="20%"/></li>
<li><p>건물현황</p></li><!-- 날짜 -->
<li></li>
</ul>
<div style="clear:both;"></div>
</header>
<!-- 헤드 -->
<!-- 네비게이션 -->
<nav>
<ul>
<li class="jPage jFirst" page="info.php"><a>건물정보</a></li><!-- 선택 된 상태일때 addClass 'active'-->
<li class="jPage" page="room.php"><a>호실별정보</a></li>
<li class="jPage" page="rent.php"><a>임대료내역</a></li>
</ul>
<div style="clear:both;"></div>
</nav>
<!-- 네비게이션 -->
<div class="jMainArea"></div>
<div class="jPopupArea" style="position: absolute; width: 100%; top: 0px; height: 170%; background: rgba(100, 100, 100, 0.5); display: none;"></div>
</div>
<? include $_SERVER["DOCUMENT_ROOT"] . "/web/inc/php/footer.php" ?>