Commit 4870040f by felix

每日一更

parent 8ba4c02c
......@@ -38,6 +38,7 @@ class House {
'plate_id' => $_POST["basePlateId"],
'room_id' => $_POST['baseRoom'],
"location" => $_POST["location"],
'status' =>$_POST['status'],
"property_money" => $_POST["property_money"],
'community_name' => $_POST["community_name"],
);
......@@ -126,37 +127,31 @@ class House {
$res = InsertDao::addRecommend($houseId,$data);
if($res == 504){
$result = $res;
echo "推荐房源修改失败";
}
$wpdb->delete(Config::A_HOUSE_USER_TABLE,array("house_id" => $houseId));
$res = InsertDao::addRecConsultant($houseId,$data);
if($res == 505){
$result = $res;
echo "推荐置业顾问修改失败";
}
InsertDao::addHouseTag($_POST['mark'],$houseId);
return $result;
}
public static function data_insert($insert_tospur_house_array){
public static function data_insert($params){
global $wpdb;
//房源与类型以及面积信息
$data = $_POST["data"];
//获取新房信息,存入tospur_house表
$insert_tospur_house_array['user_id'] = get_current_user_id();
$insert_tospur_house_array['creattime'] = date("Y-m-d H:i:s");
$insert_tospur_house_array['house_type'] = 0;
$res = $wpdb->get_results('SELECT * FROM tospur_house WHERE name="' . $_POST['housename'] . '" and address="' . $_POST['address'] . '"', OBJECT);
$params['user_id'] = get_current_user_id();
$params['creattime'] = date("Y-m-d H:i:s");
$params['house_type'] = 0;
$res = $wpdb->get_results('SELECT * FROM tospur_house WHERE name="' . $_POST['housename'] . '" and address="' . $_POST['address'] . '" and house_type=0', OBJECT);
if (!$res) {
$houseRes = $wpdb->insert('tospur_house', $insert_tospur_house_array);
if (!$houseRes) {
return 500;
}
$houseId = $wpdb->insert_id;
if(!SearchDao::setHouseNumber($houseId,$insert_tospur_house_array['house_type'],$insert_tospur_house_array['city_id'])){
return 510;
}
$houseId = InsertDao::insert_tospur_house($params);
InsertDao::addMainImage($houseId,$data);
InsertDao::addRecommend($houseId,$data);
......
......@@ -276,9 +276,8 @@ function newHouseList()
$contest['totalPrice'] = $_POST['totalPrice'];
$contest['acreage'] = $_POST['acreage'];
$contest['characteristic'] = $_POST['characteristic'];
$contest['status'] = $_POST['status'];
$contest['status'] = SearchDao::searchStatus(1,$_POST['status']);
$contest['hasSearch'] = $_POST['hasSearch'];
}
Timber::render("newHouseList.html",$contest);
}
......
......@@ -34,11 +34,9 @@ class RentHouse{
'traffic' => $_POST['traffic'],
'periphery' => $_POST['periphery'],
'status' =>$_POST['status'],
'creattime' => date("Y-m-d H:i:s"),
'owner_name'=>$_POST['owner_name'],
'owner_phone'=>$_POST['owner_phone'],
"location" => $_POST["location"],
'house_type' => 2
);
if($type==3){
$wpdb->query("START TRANSACTION");
......@@ -85,10 +83,11 @@ class RentHouse{
public static function rentHouseData_insert($params)
{
global $wpdb;
//图片信息
$uploadedfile = $_FILES['files'];
//房源与类型以及面积信息
$data = $_POST["data"];
$params['user_id'] = get_current_user_id();
$params['creattime'] = date("Y-m-d H:i:s");
$params['house_type'] = 2;
$res = $wpdb->get_results('SELECT * FROM tospur_house WHERE address="' .$params['address'] . '" and owner_name="' .$params['owner_name'] . '" and owner_phone="'.$params['owner_phone'].'" and house_type=2', OBJECT);
if(!$res){
$houseId = InsertDao::insert_tospur_house($params);
......
......@@ -306,7 +306,7 @@ function rentHouseList()
$contest['totalPrice'] = $_POST['totalPrice'];
$contest['acreage'] = $_POST['acreage'];
$contest['characteristic'] = $_POST['characteristic'];
$contest['status'] = $_POST['status'];
$contest['status'] = SearchDao::searchStatus(2,$_POST['status']);
$contest['hasSearch'] = $_POST['hasSearch'];
}
......
......@@ -33,11 +33,9 @@ class SecHandHouse{
'traffic' => $_POST['traffic'],
'periphery' => $_POST['periphery'],
'status' =>$_POST['status'],
'creattime' => date("Y-m-d H:i:s"),
'owner_name'=>$_POST['owner_name'],
'owner_phone'=>$_POST['owner_phone'],
"location" => $_POST["location"],
'house_type' => 1
);
if($type==2){
$wpdb->query("START TRANSACTION");
......@@ -84,10 +82,11 @@ class SecHandHouse{
public static function secHouseData_insert($params)
{
global $wpdb;
//图片信息
$uploadedfile = $_FILES['files'];
//房源与类型以及面积信息
$data = $_POST["data"];
$params['user_id'] = get_current_user_id();
$params['creattime'] = date("Y-m-d H:i:s");
$params['house_type'] = 1;
//获取新房信息,存入tospur_house表
$res = $wpdb->get_results('SELECT * FROM tospur_house WHERE address="' .$params['address'] . '" and owner_name="' .$params['owner_name'] . '" and owner_phone="'.$params['owner_phone'].'" and house_type=1', OBJECT);
if(!$res){
......
......@@ -288,10 +288,10 @@ function secHandHouseList()
$contest['options']= SearchDao::searchForCDP($_POST['listCity'],$_POST['listDistrict'],$_POST['listPlate']);
$contest['totalPrice'] = $_POST['totalPrice'];
$contest['acreage'] = $_POST['acreage'];
$contest['totalPrice'] = $_POST['totalPrice'];
$contest['characteristic'] = $_POST['characteristic'];
$contest['status'] = $_POST['status'];
$contest['status'] = SearchDao::searchStatus(2,$_POST['status']);
$contest['hasSearch'] = $_POST['hasSearch'];
}
Timber::render("secHandHouseList.html",$contest);
}
......
......@@ -26,7 +26,11 @@
{% endif %}
</select>
<select id="totalPrice" name="totalPrice">
{% if hasSearch and totalPrice %}
<option value="{{totalPrice}}"> {{totalPrice}}</option>
{% else %}
<option value ="">价格</option>
{% endif %}
</select>
<select id="buildProperty" name="buildProperty">
{% if hasSearch and buildProperty %}
......@@ -36,15 +40,25 @@
{% endif %}
</select>
<select id="acreage" name="acreage">
{% if hasSearch and acreage %}
<option value="{{acreage}}"> {{acreage}}</option>
{% else %}
<option value ="">面积</option>
{% endif %}
</select>
<select name="status" name="status">
{% if hasSearch and status %}
{% for item in status %}
<option value="{{ item.status_id }}">{{ item.status_name }}</option>
{% endfor %}
{% else %}
<option value="-1">状态</option>
{% endif %}
<option value="0">未审核</option>
<option value="1">审核</option>
<option value="2">下架</option>
</select>
<input type="text" placeholder="请出入楼盘名/地段名搜索" name="searchText">
<input type="text" placeholder="请出入楼盘名" name="searchText">
<input type="submit" id="submit" class="button action" value="搜索">
<!-- Now we can render the completed list table -->
{{function("addNewHouseTable")}}
......
......@@ -12,7 +12,7 @@
<tbody>
<tr>
<th><label for="housename">楼盘名</label></th>
<td> <input name="housename" id="housename" type="text" value="{{result.name}}" class="regular-text code"></td>
<td> <input name="housename" id="housename" type="text" value="{{result.name}}" class="regular-text code" style="width: 150px;"></td>
</tr>
<tr>
<th><label for="mark">标签:</label></th>
......@@ -20,15 +20,15 @@
</tr>
<tr>
<th><label for="community_name">小区名</label></th>
<td> <input name="community_name" id="community_name" type="text" value="{{result.community_name}}" class="regular-text code"></td>
<td> <input name="community_name" id="community_name" type="text" value="{{result.community_name}}" style="width: 150px;" class="regular-text code" ></td>
</tr>
<tr>
<th><label for="average_price">均价</label></th>
<td> <input name="average_price" id="average_price" type="text" value="{{result.average_price}}" class="regular-text code"></td>
<td> <input name="average_price" id="average_price" type="text" value="{{result.average_price}}" class="regular-text code" style="width: 90px;"></td>
</tr>
<tr>
<th><label for="latest_news">最新动态</label></th>
<td><textarea name="latest_news" rows="4" cols="40" class="large-text code">{{result.latest_news}}</textarea></td>
<td><textarea name="latest_news" rows="4" cols="40" class="large-text code" style="width: 400px;">{{result.latest_news}}</textarea></td>
</tr>
<tr>
<th><label for="from">所属地区</label></th>
......@@ -99,11 +99,11 @@
</tr>
<tr>
<th><label for="traffic">交通线路</label></th>
<td> <input name="traffic" type="text" value="{{result.traffic}}" class="regular-text code"></td>
<td> <input name="traffic" type="text" value="{{result.traffic}}" class="regular-text code" style="width: 300px;"></td>
</tr>
<tr>
<th><label for="periphery">周边配套</label></th>
<td> <input name="periphery" type="text" value="{{result.periphery}}" class="regular-text code"></td>
<td> <input name="periphery" type="text" value="{{result.periphery}}" class="regular-text code" style="width: 300px;"></td>
</tr>
</tbody>
</table>
......@@ -122,51 +122,51 @@
</tr>
<tr>
<th><label for="developers">开发商</label></th>
<td> <input name="developers" type="text" value="{{result.developer}}" class="regular-text code"></td>
<td> <input name="developers" type="text" value="{{result.developer}}" class="regular-text code" style="width: 150px;"></td>
</tr>
<tr>
<th><label for="check_in_time">入住时间</label></th>
<td> <input name="check_in_time" id="checkin" type="text" value="{{result.check_in_time}}" class="regular-text code"></td>
<td> <input name="check_in_time" id="checkin" type="text" value="{{result.check_in_time}}" class="regular-text code" style="width: 150px;"></td>
</tr>
<tr>
<th><label for="property_age">产权年限</label></th>
<td> <input name="property_age" type="text" value="{{result.property_age}}" class="regular-text code"></td>
<td> <input name="property_age" type="text" value="{{result.property_age}}" class="regular-text code" style="width: 90px;"></td>
</tr>
<tr>
<th><label for="decoration">装修状况</label></th>
<td> <input name="decoration" type="text" value="{{result.decoration}}" class="regular-text code"></td>
<td> <input name="decoration" type="text" value="{{result.decoration}}" class="regular-text code"style="width: 90px;"></td>
</tr>
<tr>
<th><label for="covered_area">建筑面积</label></th>
<td> <input name="covered_area" type="text" value="{{result.covered_area}}" class="regular-text code"></td>
<td> <input name="covered_area" type="text" value="{{result.covered_area}}" class="regular-text code" style="width: 90px;"></td>
</tr>
<tr>
<th><label for="volume_rate">容积率</label></th>
<td> <input name="volume_rate" type="text" value="{{result.volume_rate}}" class="regular-text code"></td>
<td> <input name="volume_rate" type="text" value="{{result.volume_rate}}" class="regular-text code" style="width: 50px;"></td>
</tr>
<tr>
<th><label for="greening_rate">绿化率</label></th>
<td> <input name="greening_rate" type="text" value="{{result.greening_rate}}" class="regular-text code"></td>
<td> <input name="greening_rate" type="text" value="{{result.greening_rate}}" class="regular-text code" style="width: 50px;"></td>
</tr>
<tr>
<th><label for="households">规划户数</label></th>
<td> <input name="households" type="text" value="{{result.households}}" class="regular-text code"></td>
<td> <input name="households" type="text" value="{{result.households}}" class="regular-text code" style="width: 50px;"></td>
</tr>
<tr>
<th><label for="parking_spaces">车位数</label></th>
<td> <input name="parking_spaces" type="text" value="{{result.parking_spaces}}" class="regular-text code"></td>
<td> <input name="parking_spaces" type="text" value="{{result.parking_spaces}}" class="regular-text code" style="width: 50px;"></td>
</tr>
<tr>
<th><label for="property_management">物业公司</label></th>
<td> <input name="property_management" type="text" value="{{result.property_management}}" class="regular-text code"></td>
<td> <input name="property_management" type="text" value="{{result.property_management}}" class="regular-text code" style="width: 150px;"></td>
</tr>
<tr>
<th><label for="property_money">物业费</label></th>
<td> <input name="property_money" type="text" value="{{result.property_money}}" class="regular-text code"></td>
<td> <input name="property_money" type="text" value="{{result.property_money}}" class="regular-text code" style="width: 50px;"></td>
</tr>
<tr>
<th><label for="overview">楼盘概述</label></th>
<td> <textarea name="overview" rows="4" cols="40" class="large-text code">{{result.overview}}</textarea></td>
<td> <textarea name="overview" rows="4" cols="40" class="large-text code" style="width: 400px;">{{result.overview}}</textarea></td>
</tr>
</tbody>
</table>
......@@ -212,7 +212,7 @@
</p>
{% endfor %}
</div><br />
<button type="button" class="button action" data-toggle="modal" data-target="#myModal">
<button type="button" class="button action" data-toggle="modal" data-target="#myModal" id="recHouseBt">
添加房源
</button>
</td>
......@@ -229,7 +229,7 @@
</p>
{% endfor %}
</div><br />
<button type="button" class="button action" data-toggle="modal" data-target="#myConsultant">
<button type="button" class="button action" data-toggle="modal" data-target="#myConsultant" id="recConsultantBt">
选择置业顾问
</button>
</td>
......@@ -256,8 +256,6 @@
</form>
<!-- Modal -->
<!-- 新增房源弹出层 -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
......@@ -266,10 +264,6 @@
<div class="modal-body" style="height: 300px;overflow: auto;">
<select id="cityId">
<option value="-1"> 城市</option>
{% for item in city %}
<option value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<select id="areaId">
<option value = "-1">区域</option>
......@@ -310,10 +304,6 @@
<div class="modal-content">
<div class="modal-body" style="height: 300px;overflow: auto;">
<select id="consultCity">
<option value=""> 城市</option>
{% for item in city %}
<option value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<input type="text" placeholder="请出入置业顾问姓名搜索" id="consultantName">
<button type="button" class="button action" id="searchConsult">搜索</button>
......@@ -381,20 +371,21 @@
});
});
//推荐房源的联动AJAX
$("#cityId").change(function(){
var cityId = $(this).val();
var area = $("#areaId");
var acreage =$("#acreage");
var price = $("#price");
//根据上方选择的城市,选择推荐房源的默认城市
$("#recHouseBt").click(function(){
$('#cityId').find('option').remove();
$('#areaId').find('option:not(:first-child)').remove();
$('#plateId').find('option:not(:first-child)').remove();
$('#price').find('option:not(:first-child)').remove();
$('#acreage').find('option:not(:first-child)').remove();
$("#houseList").find("li").remove();
//城市联动区域
var acreage =$("#acreage");
var price = $("#price");
var cityId = $("#baseCity").val();
var cityName = $("#baseCity").find("option:selected").text();
var option = $("<option>").attr("value",cityId).append(cityName);
$("#cityId").append(option);
var area = $("#areaId");
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
......@@ -403,6 +394,7 @@
addOption(json,area);
}
});
//城市联动房子面积
$.ajax({
type: "GET",
......@@ -421,6 +413,23 @@
addOption(json,price);
}
});
$.ajax({
type: "post",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&cityId="+cityId+"&houseType=0",
success:function(json){
var result = json.result;
for(var i = 0; i <result.length; i++){
var name = result[i]["name"];
var id = result[i]['id'];
var imgUrl = json.images[id];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
var li = $("<li>").attr("id",id).addClass("addImg").append(img).append(name);
$("#houseList").append(li);
}
}
});
});
//区域联动板块
......@@ -441,7 +450,7 @@
});
//推荐房源下显示图片信息以及房名
$("#cityId,#areaId,#plateId,#buildProperty,#room,#acreage,#price").change(function(){
$("#areaId,#plateId,#buildProperty,#room,#acreage,#price").change(function(){
$("#houseList").find("li").remove();
var buildPropertyId = $("#buildProperty").val();
var room = $("#room").val();
......@@ -473,13 +482,15 @@
$searchtext = $("#searchtext").val();
$("#houseList").find("li").remove();
$.ajax({
type: "GET",
type: "post",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&searchtext="+$searchtext,
data: "action=searchHouse&searchText="+$searchtext,
success:function(json){
for(var i = 0; i <=json.length-1; i++){
var name = json[i]["name"];
var imgUrl = json[i]["path"];
var result = json.result;
for(var i = 0; i < result.length; i++){
var name = result[i]["name"];
var id = result[i]['id'];
var imgUrl = json.images[id];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
var li = $("<li>").addClass("addImg").append(img).append(name);
$("#houseList").append(li);
......@@ -488,18 +499,21 @@
});
})
//搜索对应城市的置业顾问
$("#consultCity").change(function(){
var consulCityId = $("#consultCity").val();
var consultantName =$("#consultantName").val();
//根据上方选择的城市,选择推荐置业顾问的默认城市
$("#recConsultantBt").click(function(){
$('#consultCity').find('option').remove();
$("#consultantList").find("li").remove();
var consulCityId = $("#baseCity").val();
var consultantName =$("#consultantName").val();
var cityName = $("#baseCity").find("option:selected").text();
var option = $("<option>").attr("value",consulCityId).append(cityName);
$("#consultCity").append(option);
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchConsultant&consulCityId="+consulCityId+"&consultantName="+consultantName,
success:function(json){
for(
var i = 0; i <=json.length-1; i++){
for(var i = 0; i <=json.length-1; i++){
var name = json[i]["consultantName"];
var imgUrl = json[i]["imageUrl"];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
......@@ -509,6 +523,7 @@
}
});
});
//添加置业顾问弹出层中搜索框的搜索内容
$("#searchConsult").click(function(){
var consulCityId = $("#consultCity").val();
......@@ -574,6 +589,7 @@
$(this).parent("p").remove();
});
$("#submit").click(function(){
if($("#housename").val()==""){
alert("请输入楼盘名");
......@@ -589,7 +605,7 @@
reader.onload = function (e) {
var img = $("<img>").attr({"id":"target","src":e.target.result,"heghit":100,"width":100});
var button = $("<input>").attr({"type":"button","value":"取消","property":+i,"id":+i}).addClass("cancel");
var type = $("<input>").attr({"type":"hidden","name":"data["+i+"][type]","value":0,"property":+i});
var type = $("<input>").attr({"type":"hidden","name":"data["+i+"][type]","value":4,"property":+i});
var file = $("<input>").attr({"type":"file","name":"files["+(i+1)+"]","property":+(i+1)}).addClass("files");
var select = $("<select>").attr({"name":"data["+i+"][buildProperty]"});
{% for item in buildProperty %}{{item.id}}
......
......@@ -12,7 +12,7 @@
<tbody>
<tr>
<th><label for="housename">房源名:</label></th>
<td> <input name="housename" id="housename" type="text" value="{{result.name}}" class="regular-text code"></td>
<td> <input name="housename" id="housename" type="text" value="{{result.name}}" class="regular-text code" style="width: 150px;"></td>
</tr>
<tr>
<th><label for="mark">标签:</label></th>
......@@ -21,16 +21,16 @@
{% if not houseId %}
<tr>
<th><label for="owner_name">业主姓名</label></th>
<td> <input name="owner_name" id="owner_name" type="text" value="" class="regular-text code"></td>
<td> <input name="owner_name" id="owner_name" type="text" value="" class="regular-text code" style="width: 150px;"></td>
</tr>
<tr>
<th><label for="owner_phone">业主电话</label></th>
<td> <input name="owner_phone" id="owner_phone" type="text" value="" class="regular-text code"></td>
<td> <input name="owner_phone" id="owner_phone" type="text" value="" class="regular-text code" style="width: 150px;"></td>
</tr>
{% endif %}
<tr>
<th><label for="rent">租金</label></th>
<td> <input name="rent" id="rent" type="text" value="{{result.rent}}" class="regular-text code"></td>
<td> <input name="rent" id="rent" type="text" value="{{result.rent}}" class="regular-text code" style="width: 90px;"></td>
</tr>
</tbody>
......@@ -51,23 +51,23 @@
</tr>
<tr>
<th><label for="covered_area">面积</label></th>
<td> <input name="covered_area" type="text" value="{{result.covered_area}}" class="regular-text code"></td>
<td> <input name="covered_area" type="text" value="{{result.covered_area}}" class="regular-text code" style="width: 90px;"></td>
</tr>
<tr>
<th><label for="floor">楼层:</label></th>
<td> <input name="floor" type="text" value="{{result.floor}}" class="regular-text code"></td>
<td> <input name="floor" type="text" value="{{result.floor}}" class="regular-text code" style="width: 90px;"></td>
</tr>
<tr>
<th><label for="faceto">朝向:</label></th>
<td> <input name="faceto" type="text" value="{{result.faceto}}" class="regular-text code"></td>
<td> <input name="faceto" type="text" value="{{result.faceto}}" class="regular-text code" style="width: 70px;"></td>
</tr>
<tr>
<th><label for="decoration">装修状况</label></th>
<td> <input name="decoration" type="text" value="{{result.decoration}}" class="regular-text code"></td>
<td> <input name="decoration" type="text" value="{{result.decoration}}" class="regular-text code" style="width: 70px;"></td>
</tr>
<tr>
<th><label for="age">建筑年代</label></th>
<td> <input name="age" type="text" value="{{result.age}}" class="regular-text code"></td>
<td> <input name="age" type="text" value="{{result.age}}" class="regular-text code" style="width: 70px;"></td>
</tr>
<tr>
<th><label for="matching_facilities">配套设施</label></th>
......@@ -75,15 +75,15 @@
</tr>
<tr>
<th><label for="flat">楼号</label></th>
<td> <input name="flat" type="text" value="{{result.flat}}" class="regular-text code"></td>
<td> <input name="flat" type="text" value="{{result.flat}}" class="regular-text code" style=" width: 50px;"></td>
</tr>
<tr>
<th><label for="suite"></label></th>
<td> <input name="suite" type="text" value="{{result.suite}}" class="regular-text code"></td>
<td> <input name="suite" type="text" value="{{result.suite}}" class="regular-text code" style=" width: 50px;"></td>
</tr>
<tr>
<th><label for="overview">房源点评</label></th>
<td> <textarea name="overview" rows="4" cols="40" class="large-text code">{{result.overview}}</textarea></td>
<td> <textarea name="overview" rows="4" cols="40" class="large-text code" style=" width: 400px;">{{result.overview}}</textarea></td>
</tr>
<tr>
<th><label for="from">所属地区</label></th>
......@@ -127,15 +127,15 @@
</tr>
<tr>
<th><label for="address">小区名称</label></th>
<td> <input name="community_name" type="text" value="{{result.community_name}}" class="regular-text code"></td>
<td> <input name="community_name" type="text" value="{{result.community_name}}" class="regular-text code" style="width: 150px;"></td>
</tr>
<tr>
<th><label for="traffic">交通线路</label></th>
<td> <input name="traffic" type="text" value="{{result.traffic}}" class="regular-text code"></td>
<td> <input name="traffic" type="text" value="{{result.traffic}}" class="regular-text code" style="width: 300px;"></td>
</tr>
<tr>
<th><label for="periphery">周边配套</label></th>
<td> <input name="periphery" type="text" value="{{result.periphery}}" class="regular-text code"></td>
<td> <input name="periphery" type="text" value="{{result.periphery}}" class="regular-text code" ></td>
</tr>
</tbody>
</table>
......@@ -174,7 +174,7 @@
<th><label for="recommend">推荐房源</label></th>
<td>
<div id="houseImg"></div><br />
<button type="button" class="button action" data-toggle="modal" data-target="#myModal">
<button type="button" class="button action" data-toggle="modal" data-target="#myModal" id="recHouseBt" >
添加房源
</button>
</td>
......@@ -191,7 +191,7 @@
</p>
{% endfor %}
</div><br />
<button type="button" class="button action" data-toggle="modal" data-target="#myConsultant">
<button type="button" class="button action" data-toggle="modal" data-target="#myConsultant" id="recConsultantBt">
选择置业顾问
</button>
</td>
......@@ -226,10 +226,6 @@
<div class="modal-body" style="height: 300px;overflow: auto;">
<select id="cityId">
<option value="-1"> 城市</option>
{% for item in city %}
<option value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<select id="areaId">
<option value = "-1">区域</option>
......@@ -324,19 +320,21 @@
});
});
//推荐房源的联动AJAX
$("#cityId").change(function(){
var cityId = $(this).val();
var area = $("#areaId");
var acreage =$("#acreage");
var price = $("#price");
//根据上方选择的城市,选择推荐房源的默认城市
$("#recHouseBt").click(function(){
$('#cityId').find('option').remove();
$('#areaId').find('option:not(:first-child)').remove();
$('#plateId').find('option:not(:first-child)').remove();
$('#price').find('option:not(:first-child)').remove();
$('#acreage').find('option:not(:first-child)').remove();
$("#houseList").find("li").remove();
//城市联动区域
var acreage =$("#acreage");
var price = $("#price");
var cityId = $("#baseCity").val();
var cityName = $("#baseCity").find("option:selected").text();
var option = $("<option>").attr("value",cityId).append(cityName);
$("#cityId").append(option);
var area = $("#areaId");
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
......@@ -345,6 +343,7 @@
addOption(json,area);
}
});
//城市联动房子面积
$.ajax({
type: "GET",
......@@ -363,8 +362,26 @@
addOption(json,price);
}
});
$.ajax({
type: "post",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&cityId="+cityId+"&houseType=2",
success:function(json){
var result = json.result;
for(var i = 0; i <result.length; i++){
var name = result[i]["name"];
var id = result[i]['id'];
var imgUrl = json.images[id];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
var li = $("<li>").attr("id",id).addClass("addImg").append(img).append(name);
$("#houseList").append(li);
}
}
});
});
//区域联动板块
$("#areaId").change(function(){
var areaId = $("#areaId").val();
......@@ -383,7 +400,7 @@
});
//推荐房源下显示图片信息以及房名
$("#cityId,#areaId,#plateId,#buildProperty,#room,#acreage,#price").change(function(){
$("#areaId,#plateId,#buildProperty,#room,#acreage,#price").change(function(){
$("#houseList").find("li").remove();
var buildPropertyId = $("#buildProperty").val();
var room = $("#room").val();
......@@ -422,13 +439,15 @@
$searchtext = $("#searchtext").val();
$("#houseList").find("li").remove();
$.ajax({
type: "GET",
type: "post",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&searchtext="+$searchtext,
data: "action=searchHouse&searchText="+$searchtext,
success:function(json){
for(var i = 0; i <=json.length-1; i++){
var name = json[i]["name"];
var imgUrl = json[i]["path"];
var result = json.result;
for(var i = 0; i < result.length; i++){
var name = result[i]["name"];
var id = result[i]['id'];
var imgUrl = json.images[id];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
var li = $("<li>").addClass("addImg").append(img).append(name);
$("#houseList").append(li);
......@@ -437,18 +456,21 @@
});
})
//搜索对应城市的置业顾问
$("#consultCity").change(function(){
var consulCityId = $("#consultCity").val();
var consultantName =$("#consultantName").val();
//根据上方选择的城市,选择推荐置业顾问的默认城市
$("#recConsultantBt").click(function(){
$('#consultCity').find('option').remove();
$("#consultantList").find("li").remove();
var consulCityId = $("#baseCity").val();
var consultantName =$("#consultantName").val();
var cityName = $("#baseCity").find("option:selected").text();
var option = $("<option>").attr("value",consulCityId).append(cityName);
$("#consultCity").append(option);
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchConsultant&consulCityId="+consulCityId+"&consultantName="+consultantName,
success:function(json){
for(
var i = 0; i <=json.length-1; i++){
for(var i = 0; i <=json.length-1; i++){
var name = json[i]["consultantName"];
var imgUrl = json[i]["imageUrl"];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
......
......@@ -27,7 +27,11 @@
{% endif %}
</select>
<select id="totalPrice" name="totalPrice">
{% if hasSearch and totalPrice %}
<option value="{{totalPrice}}"> {{totalPrice}}</option>
{% else %}
<option value ="">价格</option>
{% endif %}
</select>
<select id="buildProperty" name="buildProperty">
{% if hasSearch and buildProperty %}
......@@ -37,10 +41,20 @@
{% endif %}
</select>
<select id="acreage" name="acreage">
{% if hasSearch and acreage %}
<option value="{{acreage}}"> {{acreage}}</option>
{% else %}
<option value ="">面积</option>
{% endif %}
</select>
<select name="status" name="status">
{% if hasSearch and status %}
{% for item in status %}
<option value="{{ item.status_id }}">{{ item.status_name }}</option>
{% endfor %}
{% else %}
<option value="-1">状态</option>
{% endif %}
<option value="0">未审核</option>
<option value="1">审核</option>
<option value="2">自售</option>
......
<!DOCTYPE HTML>
<html>
<head>
......@@ -12,7 +13,7 @@
<tbody>
<tr>
<th><label for="housename">房源名:</label></th>
<td> <input name="housename" id="housename" type="text" value="{{result.name}}" class="regular-text code"></td>
<td> <input name="housename" id="housename" type="text" value="{{result.name}}" class="regular-text code" style="width: 150px;"></td>
</tr>
<tr>
<th><label for="housename">标签:</label></th>
......@@ -21,20 +22,20 @@
{% if not houseId %}
<tr>
<th><label for="owner_name">业主姓名</label></th>
<td> <input name="owner_name" id="owner_name" type="text" value="" class="regular-text code"></td>
<td> <input name="owner_name" id="owner_name" type="text" value="" class="regular-text code" style="width: 150px;"></td>
</tr>
<tr>
<th><label for="owner_phone">业主电话</label></th>
<td> <input name="owner_phone" id="owner_phone" type="text" value="" class="regular-text code"></td>
<td> <input name="owner_phone" id="owner_phone" type="text" value="" class="regular-text code" style="width: 150px;"></td>
</tr>
{% endif %}
<tr>
<th><label for="total_price">售价</label></th>
<td> <input name="total_price" id="total_price" type="text" value="{{result.total_price}}" class="regular-text code"></td>
<td> <input name="total_price" id="total_price" type="text" value="{{result.total_price}}" class="regular-text code" style="width: 90px;"></td>
</tr>
<tr>
<th><label for="average_price">单价</label></th>
<td> <input name="average_price" id="average_price" type="text" value="{{result.average_price}}" class="regular-text code"></td>
<td> <input name="average_price" id="average_price" type="text" value="{{result.average_price}}" class="regular-text code" style="width: 90px;"></td>
</tr>
</tbody>
</table>
......@@ -53,35 +54,35 @@
</tr>
<tr>
<th><label for="covered_area">面积</label></th>
<td> <input name="covered_area" type="text" value="{{result.covered_area}}" class="regular-text code"></td>
<td> <input name="covered_area" type="text" value="{{result.covered_area}}" class="regular-text code" style="width: 90px;"></td>
</tr>
<tr>
<th><label for="floor">楼层:</label></th>
<td> <input name="floor" type="text" value="{{result.floor}}" class="regular-text code"></td>
<td> <input name="floor" type="text" value="{{result.floor}}" class="regular-text code" style=" width: 70px;"></td>
</tr>
<tr>
<th><label for="faceto">朝向:</label></th>
<td> <input name="faceto" type="text" value="{{result.faceto}}" class="regular-text code"></td>
<td> <input name="faceto" type="text" value="{{result.faceto}}" class="regular-text code" style=" width: 70px;"></td>
</tr>
<tr>
<th><label for="decoration">装修状况</label></th>
<td> <input name="decoration" type="text" value="{{result.decoration}}" class="regular-text code"></td>
<td> <input name="decoration" type="text" value="{{result.decoration}}" class="regular-text code" style=" width: 70px;"></td>
</tr>
<tr>
<th><label for="age">建筑年代</label></th>
<td> <input name="age" type="text" value="{{result.age}}" class="regular-text code"></td>
<td> <input name="age" type="text" value="{{result.age}}" class="regular-text code" style=" width: 70px;"></td>
</tr>
<tr>
<th><label for="flat">楼号</label></th>
<td> <input name="flat" type="text" value="{{result.flat}}" class="regular-text code"></td>
<td> <input name="flat" type="text" value="{{result.flat}}" class="regular-text code" style=" width: 50px;"></td>
</tr>
<tr>
<th><label for="suite"></label></th>
<td> <input name="suite" type="text" value="{{result.suite}}" class="regular-text code"></td>
<td> <input name="suite" type="text" value="{{result.suite}}" class="regular-text code" style=" width: 50px;"></td>
</tr>
<tr>
<th><label for="overview">房源点评</label></th>
<td> <textarea name="overview" rows="4" cols="40" class="large-text code">{{result.overview}}
<td> <textarea name="overview" rows="4" cols="40" class="large-text code" style=" width: 400px;">{{result.overview}}
</textarea></td>
</tr>
<tr>
......@@ -127,15 +128,15 @@
</tr>
<tr>
<th><label for="address">小区名称</label></th>
<td> <input name="community_name" type="text" value="{{result.community_name}}" class="regular-text code"></td>
<td> <input name="community_name" type="text" value="{{result.community_name}}" class="regular-text code" style="width: 150px;"></td>
</tr>
<tr>
<th><label for="traffic">交通线路</label></th>
<td> <input name="traffic" type="text" value="{{result.traffic}}" class="regular-text code"></td>
<td> <input name="traffic" type="text" value="{{result.traffic}}" class="regular-text code" style="width: 300px;"></td>
</tr>
<tr>
<th><label for="periphery">周边配套</label></th>
<td> <input name="periphery" type="text" value="{{result.periphery}}" class="regular-text code"></td>
<td> <input name="periphery" type="text" value="{{result.periphery}}" class="regular-text code" style="width: 300px;"></td>
</tr>
</tbody>
</table>
......@@ -182,7 +183,7 @@
</p>
{% endfor %}
</div><br />
<button type="button" class="button action" data-toggle="modal" data-target="#myModal">
<button type="button" class="button action" data-toggle="modal" data-target="#myModal" id="recHouseBt">
添加房源
</button>
</td>
......@@ -199,7 +200,7 @@
</p>
{% endfor %}
</div><br />
<button type="button" class="button action" data-toggle="modal" data-target="#myConsultant">
<button type="button" class="button action" data-toggle="modal" data-target="#myConsultant" id="recConsultantBt">
选择置业顾问
</button>
</td>
......@@ -225,7 +226,6 @@
<input type="submit" id="submit" class="button action">
</form>
<!-- Modal -->
<!-- 新增房源弹出层 -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
......@@ -296,7 +296,6 @@
<script>
(function($){
$(document).ready(function(){
//主力房源中选择图片file的下标
var i = 0;
//基本信息的联动AJAX
......@@ -332,19 +331,21 @@
});
});
//推荐房源的联动AJAX
$("#cityId").change(function(){
var cityId = $(this).val();
var area = $("#areaId");
var acreage =$("#acreage");
var price = $("#price");
//根据上方选择的城市,选择推荐房源的默认城市
$("#recHouseBt").click(function(){
$('#cityId').find('option').remove();
$('#areaId').find('option:not(:first-child)').remove();
$('#plateId').find('option:not(:first-child)').remove();
$('#price').find('option:not(:first-child)').remove();
$('#acreage').find('option:not(:first-child)').remove();
$("#houseList").find("li").remove();
//城市联动区域
var acreage =$("#acreage");
var price = $("#price");
var cityId = $("#baseCity").val();
var cityName = $("#baseCity").find("option:selected").text();
var option = $("<option>").attr("value",cityId).append(cityName);
$("#cityId").append(option);
var area = $("#areaId");
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
......@@ -353,6 +354,7 @@
addOption(json,area);
}
});
//城市联动房子面积
$.ajax({
type: "GET",
......@@ -371,6 +373,23 @@
addOption(json,price);
}
});
$.ajax({
type: "post",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&cityId="+cityId+"&houseType=1",
success:function(json){
var result = json.result;
for(var i = 0; i <result.length; i++){
var name = result[i]["name"];
var id = result[i]['id'];
var imgUrl = json.images[id];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
var li = $("<li>").attr("id",id).addClass("addImg").append(img).append(name);
$("#houseList").append(li);
}
}
});
});
//区域联动板块
......@@ -391,7 +410,7 @@
});
//推荐房源下显示图片信息以及房名
$("#cityId,#areaId,#plateId,#buildProperty,#room,#acreage,#price").change(function(){
$("#areaId,#plateId,#buildProperty,#room,#acreage,#price").change(function(){
$("#houseList").find("li").remove();
var buildPropertyId = $("#buildProperty").val();
var room = $("#room").val();
......@@ -430,13 +449,15 @@
$searchtext = $("#searchtext").val();
$("#houseList").find("li").remove();
$.ajax({
type: "GET",
type: "post",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&searchtext="+$searchtext,
data: "action=searchHouse&searchText="+$searchtext,
success:function(json){
for(var i = 0; i <=json.length-1; i++){
var name = json[i]["name"];
var imgUrl = json[i]["path"];
var result = json.result;
for(var i = 0; i < result.length; i++){
var name = result[i]["name"];
var id = result[i]['id'];
var imgUrl = json.images[id];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
var li = $("<li>").addClass("addImg").append(img).append(name);
$("#houseList").append(li);
......@@ -445,18 +466,21 @@
});
})
//搜索对应城市的置业顾问
$("#consultCity").change(function(){
var consulCityId = $("#consultCity").val();
var consultantName =$("#consultantName").val();
//根据上方选择的城市,选择推荐置业顾问的默认城市
$("#recConsultantBt").click(function(){
$('#consultCity').find('option').remove();
$("#consultantList").find("li").remove();
var consulCityId = $("#baseCity").val();
var consultantName =$("#consultantName").val();
var cityName = $("#baseCity").find("option:selected").text();
var option = $("<option>").attr("value",consulCityId).append(cityName);
$("#consultCity").append(option);
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchConsultant&consulCityId="+consulCityId+"&consultantName="+consultantName,
success:function(json){
for(
var i = 0; i <=json.length-1; i++){
for(var i = 0; i <=json.length-1; i++){
var name = json[i]["consultantName"];
var imgUrl = json[i]["imageUrl"];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
......
......@@ -27,7 +27,11 @@
{% endif %}
</select>
<select id="totalPrice" name="totalPrice">
{% if hasSearch and totalPrice %}
<option value="{{totalPrice}}"> {{totalPrice}}</option>
{% else %}
<option value ="">价格</option>
{% endif %}
</select>
<select id="buildProperty" name="buildProperty">
{% if hasSearch and buildProperty %}
......@@ -37,7 +41,11 @@
{% endif %}
</select>
<select id="acreage" name="acreage">
{% if hasSearch and acreage %}
<option value="{{acreage}}"> {{acreage}}</option>
{% else %}
<option value ="">面积</option>
{% endif %}
</select>
<select id="characteristic" name="characteristic">
<option value ="">特色</option>
......@@ -45,7 +53,13 @@
<option value ="">唯一住房</option>
</select>
<select name="status" name="status">
{% if hasSearch and status %}
{% for item in status %}
<option value="{{ item.status_id }}">{{ item.status_name }}</option>
{% endfor %}
{% else %}
<option value="-1">状态</option>
{% endif %}
<option value="0">未审核</option>
<option value="1">审核</option>
<option value="2">自售</option>
......
......@@ -475,4 +475,12 @@ class SearchDao
return $result;
}
public static function searchStatus($type=null,$status=null){
global $wpdb;
if($status!=null && $type!=null){
$sql = "select status_id,status_name from tospur_status where status_type =".$type." and status_id =".$status;
$result = $wpdb->get_results($sql);
}
return $result;
}
}
\ No newline at end of file
<?php
require_once('const.php');
$context = array();
$context['theme'] = get_template_directory_uri();
$context['url'] = home_url();
Timber::render('comment.html', $context);
$user = wp_get_current_user();
$user_id = $user->ID;
if ($user_id == 0) {
wp_redirect($const_login_page);
} else {
$context['user_id'] = $user_id;
Timber::render('comment.html', $context);
}
?>
\ No newline at end of file
/* animation sets */
/* move from / to */
.pt-page-moveToLeft {
-webkit-animation: moveToLeft .6s ease both;
animation: moveToLeft .6s ease both;
}
.pt-page-moveFromLeft {
-webkit-animation: moveFromLeft .6s ease both;
animation: moveFromLeft .6s ease both;
}
.pt-page-moveToRight {
-webkit-animation: moveToRight .6s ease both;
animation: moveToRight .6s ease both;
}
.pt-page-moveFromRight {
-webkit-animation: moveFromRight .6s ease both;
animation: moveFromRight .6s ease both;
}
.pt-page-moveToTop {
-webkit-animation: moveToTop .6s ease both;
animation: moveToTop .6s ease both;
}
.pt-page-moveFromTop {
-webkit-animation: moveFromTop .6s ease both;
animation: moveFromTop .6s ease both;
}
.pt-page-moveToBottom {
-webkit-animation: moveToBottom .6s ease both;
animation: moveToBottom .6s ease both;
}
.pt-page-moveFromBottom {
-webkit-animation: moveFromBottom .6s ease both;
animation: moveFromBottom .6s ease both;
}
/* fade */
.pt-page-fade {
-webkit-animation: fade .7s ease both;
animation: fade .7s ease both;
}
/* move from / to and fade */
.pt-page-moveToLeftFade {
-webkit-animation: moveToLeftFade .7s ease both;
animation: moveToLeftFade .7s ease both;
}
.pt-page-moveFromLeftFade {
-webkit-animation: moveFromLeftFade .7s ease both;
animation: moveFromLeftFade .7s ease both;
}
.pt-page-moveToRightFade {
-webkit-animation: moveToRightFade .7s ease both;
animation: moveToRightFade .7s ease both;
}
.pt-page-moveFromRightFade {
-webkit-animation: moveFromRightFade .7s ease both;
animation: moveFromRightFade .7s ease both;
}
.pt-page-moveToTopFade {
-webkit-animation: moveToTopFade .7s ease both;
animation: moveToTopFade .7s ease both;
}
.pt-page-moveFromTopFade {
-webkit-animation: moveFromTopFade .7s ease both;
animation: moveFromTopFade .7s ease both;
}
.pt-page-moveToBottomFade {
-webkit-animation: moveToBottomFade .7s ease both;
animation: moveToBottomFade .7s ease both;
}
.pt-page-moveFromBottomFade {
-webkit-animation: moveFromBottomFade .7s ease both;
animation: moveFromBottomFade .7s ease both;
}
/* move to with different easing */
.pt-page-moveToLeftEasing {
-webkit-animation: moveToLeft .7s ease-in-out both;
animation: moveToLeft .7s ease-in-out both;
}
.pt-page-moveToRightEasing {
-webkit-animation: moveToRight .7s ease-in-out both;
animation: moveToRight .7s ease-in-out both;
}
.pt-page-moveToTopEasing {
-webkit-animation: moveToTop .7s ease-in-out both;
animation: moveToTop .7s ease-in-out both;
}
.pt-page-moveToBottomEasing {
-webkit-animation: moveToBottom .7s ease-in-out both;
animation: moveToBottom .7s ease-in-out both;
}
/********************************* keyframes **************************************/
/* move from / to */
@-webkit-keyframes moveToLeft {
from { }
to { -webkit-transform: translateX(-100%); }
}
@keyframes moveToLeft {
from { }
to { -webkit-transform: translateX(-100%); transform: translateX(-100%); }
}
@-webkit-keyframes moveFromLeft {
from { -webkit-transform: translateX(-100%); }
}
@keyframes moveFromLeft {
from { -webkit-transform: translateX(-100%); transform: translateX(-100%); }
}
@-webkit-keyframes moveToRight {
from { }
to { -webkit-transform: translateX(100%); }
}
@keyframes moveToRight {
from { }
to { -webkit-transform: translateX(100%); transform: translateX(100%); }
}
@-webkit-keyframes moveFromRight {
from { -webkit-transform: translateX(100%); }
}
@keyframes moveFromRight {
from { -webkit-transform: translateX(100%); transform: translateX(100%); }
}
@-webkit-keyframes moveToTop {
from { }
to { -webkit-transform: translateY(-100%); }
}
@keyframes moveToTop {
from { }
to { -webkit-transform: translateY(-100%); transform: translateY(-100%); }
}
@-webkit-keyframes moveFromTop {
from { -webkit-transform: translateY(-100%); }
}
@keyframes moveFromTop {
from { -webkit-transform: translateY(-100%); transform: translateY(-100%); }
}
@-webkit-keyframes moveToBottom {
from { }
to { -webkit-transform: translateY(100%); }
}
@keyframes moveToBottom {
from { }
to { -webkit-transform: translateY(100%); transform: translateY(100%); }
}
@-webkit-keyframes moveFromBottom {
from { -webkit-transform: translateY(100%); }
}
@keyframes moveFromBottom {
from { -webkit-transform: translateY(100%); transform: translateY(100%); }
}
/* fade */
@-webkit-keyframes fade {
from { }
to { opacity: 0.3; }
}
@keyframes fade {
from { }
to { opacity: 0.3; }
}
/* move from / to and fade */
@-webkit-keyframes moveToLeftFade {
from { }
to { opacity: 0.3; -webkit-transform: translateX(-100%); }
}
@keyframes moveToLeftFade {
from { }
to { opacity: 0.3; -webkit-transform: translateX(-100%); transform: translateX(-100%); }
}
@-webkit-keyframes moveFromLeftFade {
from { opacity: 0.3; -webkit-transform: translateX(-100%); }
}
@keyframes moveFromLeftFade {
from { opacity: 0.3; -webkit-transform: translateX(-100%); transform: translateX(-100%); }
}
@-webkit-keyframes moveToRightFade {
from { }
to { opacity: 0.3; -webkit-transform: translateX(100%); }
}
@keyframes moveToRightFade {
from { }
to { opacity: 0.3; -webkit-transform: translateX(100%); transform: translateX(100%); }
}
@-webkit-keyframes moveFromRightFade {
from { opacity: 0.3; -webkit-transform: translateX(100%); }
}
@keyframes moveFromRightFade {
from { opacity: 0.3; -webkit-transform: translateX(100%); transform: translateX(100%); }
}
@-webkit-keyframes moveToTopFade {
from { }
to { opacity: 0.3; -webkit-transform: translateY(-100%); }
}
@keyframes moveToTopFade {
from { }
to { opacity: 0.3; -webkit-transform: translateY(-100%); transform: translateY(-100%); }
}
@-webkit-keyframes moveFromTopFade {
from { opacity: 0.3; -webkit-transform: translateY(-100%); }
}
@keyframes moveFromTopFade {
from { opacity: 0.3; -webkit-transform: translateY(-100%); transform: translateY(-100%); }
}
@-webkit-keyframes moveToBottomFade {
from { }
to { opacity: 0.3; -webkit-transform: translateY(100%); }
}
@keyframes moveToBottomFade {
from { }
to { opacity: 0.3; -webkit-transform: translateY(100%); transform: translateY(100%); }
}
@-webkit-keyframes moveFromBottomFade {
from { opacity: 0.3; -webkit-transform: translateY(100%); }
}
@keyframes moveFromBottomFade {
from { opacity: 0.3; -webkit-transform: translateY(100%); transform: translateY(100%); }
}
/* scale and fade */
.pt-page-scaleDown {
-webkit-animation: scaleDown .7s ease both;
animation: scaleDown .7s ease both;
}
.pt-page-scaleUp {
-webkit-animation: scaleUp .7s ease both;
animation: scaleUp .7s ease both;
}
.pt-page-scaleUpDown {
-webkit-animation: scaleUpDown .5s ease both;
animation: scaleUpDown .5s ease both;
}
.pt-page-scaleDownUp {
-webkit-animation: scaleDownUp .5s ease both;
animation: scaleDownUp .5s ease both;
}
.pt-page-scaleDownCenter {
-webkit-animation: scaleDownCenter .4s ease-in both;
animation: scaleDownCenter .4s ease-in both;
}
.pt-page-scaleUpCenter {
-webkit-animation: scaleUpCenter .4s ease-out both;
animation: scaleUpCenter .4s ease-out both;
}
/********************************* keyframes **************************************/
/* scale and fade */
@-webkit-keyframes scaleDown {
from { }
to { opacity: 0; -webkit-transform: scale(.8); }
}
@keyframes scaleDown {
from { }
to { opacity: 0; -webkit-transform: scale(.8); transform: scale(.8); }
}
@-webkit-keyframes scaleUp {
from { opacity: 0; -webkit-transform: scale(.8); }
}
@keyframes scaleUp {
from { opacity: 0; -webkit-transform: scale(.8); transform: scale(.8); }
}
@-webkit-keyframes scaleUpDown {
from { opacity: 0; -webkit-transform: scale(1.2); }
}
@keyframes scaleUpDown {
from { opacity: 0; -webkit-transform: scale(1.2); transform: scale(1.2); }
}
@-webkit-keyframes scaleDownUp {
from { }
to { opacity: 0; -webkit-transform: scale(1.2); }
}
@keyframes scaleDownUp {
from { }
to { opacity: 0; -webkit-transform: scale(1.2); transform: scale(1.2); }
}
@-webkit-keyframes scaleDownCenter {
from { }
to { opacity: 0; -webkit-transform: scale(.7); }
}
@keyframes scaleDownCenter {
from { }
to { opacity: 0; -webkit-transform: scale(.7); transform: scale(.7); }
}
@-webkit-keyframes scaleUpCenter {
from { opacity: 0; -webkit-transform: scale(.7); }
}
@keyframes scaleUpCenter {
from { opacity: 0; -webkit-transform: scale(.7); transform: scale(.7); }
}
/* rotate sides first and scale */
.pt-page-rotateRightSideFirst {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotateRightSideFirst .8s both ease-in;
animation: rotateRightSideFirst .8s both ease-in;
}
.pt-page-rotateLeftSideFirst {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotateLeftSideFirst .8s both ease-in;
animation: rotateLeftSideFirst .8s both ease-in;
}
.pt-page-rotateTopSideFirst {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotateTopSideFirst .8s both ease-in;
animation: rotateTopSideFirst .8s both ease-in;
}
.pt-page-rotateBottomSideFirst {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotateBottomSideFirst .8s both ease-in;
animation: rotateBottomSideFirst .8s both ease-in;
}
/* flip */
.pt-page-flipOutRight {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: flipOutRight .5s both ease-in;
animation: flipOutRight .5s both ease-in;
}
.pt-page-flipInLeft {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: flipInLeft .5s both ease-out;
animation: flipInLeft .5s both ease-out;
}
.pt-page-flipOutLeft {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: flipOutLeft .5s both ease-in;
animation: flipOutLeft .5s both ease-in;
}
.pt-page-flipInRight {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: flipInRight .5s both ease-out;
animation: flipInRight .5s both ease-out;
}
.pt-page-flipOutTop {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: flipOutTop .5s both ease-in;
animation: flipOutTop .5s both ease-in;
}
.pt-page-flipInBottom {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: flipInBottom .5s both ease-out;
animation: flipInBottom .5s both ease-out;
}
.pt-page-flipOutBottom {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: flipOutBottom .5s both ease-in;
animation: flipOutBottom .5s both ease-in;
}
.pt-page-flipInTop {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: flipInTop .5s both ease-out;
animation: flipInTop .5s both ease-out;
}
/* rotate fall */
.pt-page-rotateFall {
-webkit-transform-origin: 0% 0%;
transform-origin: 0% 0%;
-webkit-animation: rotateFall 1s both ease-in;
animation: rotateFall 1s both ease-in;
}
/* rotate newspaper */
.pt-page-rotateOutNewspaper {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: rotateOutNewspaper .5s both ease-in;
animation: rotateOutNewspaper .5s both ease-in;
}
.pt-page-rotateInNewspaper {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
-webkit-animation: rotateInNewspaper .5s both ease-out;
animation: rotateInNewspaper .5s both ease-out;
}
/* push */
.pt-page-rotatePushLeft {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotatePushLeft .8s both ease;
animation: rotatePushLeft .8s both ease;
}
.pt-page-rotatePushRight {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotatePushRight .8s both ease;
animation: rotatePushRight .8s both ease;
}
.pt-page-rotatePushTop {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotatePushTop .8s both ease;
animation: rotatePushTop .8s both ease;
}
.pt-page-rotatePushBottom {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotatePushBottom .8s both ease;
animation: rotatePushBottom .8s both ease;
}
/* pull */
.pt-page-rotatePullRight {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotatePullRight .5s both ease;
animation: rotatePullRight .5s both ease;
}
.pt-page-rotatePullLeft {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotatePullLeft .5s both ease;
animation: rotatePullLeft .5s both ease;
}
.pt-page-rotatePullTop {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotatePullTop .5s both ease;
animation: rotatePullTop .5s both ease;
}
.pt-page-rotatePullBottom {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotatePullBottom .5s both ease;
animation: rotatePullBottom .5s both ease;
}
/* fold */
.pt-page-rotateFoldRight {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotateFoldRight .7s both ease;
animation: rotateFoldRight .7s both ease;
}
.pt-page-rotateFoldLeft {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotateFoldLeft .7s both ease;
animation: rotateFoldLeft .7s both ease;
}
.pt-page-rotateFoldTop {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotateFoldTop .7s both ease;
animation: rotateFoldTop .7s both ease;
}
.pt-page-rotateFoldBottom {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotateFoldBottom .7s both ease;
animation: rotateFoldBottom .7s both ease;
}
/* unfold */
.pt-page-rotateUnfoldLeft {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotateUnfoldLeft .7s both ease;
animation: rotateUnfoldLeft .7s both ease;
}
.pt-page-rotateUnfoldRight {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotateUnfoldRight .7s both ease;
animation: rotateUnfoldRight .7s both ease;
}
.pt-page-rotateUnfoldTop {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotateUnfoldTop .7s both ease;
animation: rotateUnfoldTop .7s both ease;
}
.pt-page-rotateUnfoldBottom {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotateUnfoldBottom .7s both ease;
animation: rotateUnfoldBottom .7s both ease;
}
/* room walls */
.pt-page-rotateRoomLeftOut {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotateRoomLeftOut .8s both ease;
animation: rotateRoomLeftOut .8s both ease;
}
.pt-page-rotateRoomLeftIn {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotateRoomLeftIn .8s both ease;
animation: rotateRoomLeftIn .8s both ease;
}
.pt-page-rotateRoomRightOut {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotateRoomRightOut .8s both ease;
animation: rotateRoomRightOut .8s both ease;
}
.pt-page-rotateRoomRightIn {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotateRoomRightIn .8s both ease;
animation: rotateRoomRightIn .8s both ease;
}
.pt-page-rotateRoomTopOut {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotateRoomTopOut .8s both ease;
animation: rotateRoomTopOut .8s both ease;
}
.pt-page-rotateRoomTopIn {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotateRoomTopIn .8s both ease;
animation: rotateRoomTopIn .8s both ease;
}
.pt-page-rotateRoomBottomOut {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotateRoomBottomOut .8s both ease;
animation: rotateRoomBottomOut .8s both ease;
}
.pt-page-rotateRoomBottomIn {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotateRoomBottomIn .8s both ease;
animation: rotateRoomBottomIn .8s both ease;
}
/* cube */
.pt-page-rotateCubeLeftOut {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotateCubeLeftOut .6s both ease-in;
animation: rotateCubeLeftOut .6s both ease-in;
}
.pt-page-rotateCubeLeftIn {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotateCubeLeftIn .6s both ease-in;
animation: rotateCubeLeftIn .6s both ease-in;
}
.pt-page-rotateCubeRightOut {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotateCubeRightOut .6s both ease-in;
animation: rotateCubeRightOut .6s both ease-in;
}
.pt-page-rotateCubeRightIn {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotateCubeRightIn .6s both ease-in;
animation: rotateCubeRightIn .6s both ease-in;
}
.pt-page-rotateCubeTopOut {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotateCubeTopOut .6s both ease-in;
animation: rotateCubeTopOut .6s both ease-in;
}
.pt-page-rotateCubeTopIn {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotateCubeTopIn .6s both ease-in;
animation: rotateCubeTopIn .6s both ease-in;
}
.pt-page-rotateCubeBottomOut {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotateCubeBottomOut .6s both ease-in;
animation: rotateCubeBottomOut .6s both ease-in;
}
.pt-page-rotateCubeBottomIn {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotateCubeBottomIn .6s both ease-in;
animation: rotateCubeBottomIn .6s both ease-in;
}
/* carousel */
.pt-page-rotateCarouselLeftOut {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotateCarouselLeftOut .8s both ease;
animation: rotateCarouselLeftOut .8s both ease;
}
.pt-page-rotateCarouselLeftIn {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotateCarouselLeftIn .8s both ease;
animation: rotateCarouselLeftIn .8s both ease;
}
.pt-page-rotateCarouselRightOut {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-animation: rotateCarouselRightOut .8s both ease;
animation: rotateCarouselRightOut .8s both ease;
}
.pt-page-rotateCarouselRightIn {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-animation: rotateCarouselRightIn .8s both ease;
animation: rotateCarouselRightIn .8s both ease;
}
.pt-page-rotateCarouselTopOut {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotateCarouselTopOut .8s both ease;
animation: rotateCarouselTopOut .8s both ease;
}
.pt-page-rotateCarouselTopIn {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotateCarouselTopIn .8s both ease;
animation: rotateCarouselTopIn .8s both ease;
}
.pt-page-rotateCarouselBottomOut {
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
-webkit-animation: rotateCarouselBottomOut .8s both ease;
animation: rotateCarouselBottomOut .8s both ease;
}
.pt-page-rotateCarouselBottomIn {
-webkit-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-animation: rotateCarouselBottomIn .8s both ease;
animation: rotateCarouselBottomIn .8s both ease;
}
/* sides */
.pt-page-rotateSidesOut {
-webkit-transform-origin: -50% 50%;
transform-origin: -50% 50%;
-webkit-animation: rotateSidesOut .5s both ease-in;
animation: rotateSidesOut .5s both ease-in;
}
.pt-page-rotateSidesIn {
-webkit-transform-origin: 150% 50%;
transform-origin: 150% 50%;
-webkit-animation: rotateSidesIn .5s both ease-out;
animation: rotateSidesIn .5s both ease-out;
}
/* slide */
.pt-page-rotateSlideOut {
-webkit-animation: rotateSlideOut 1s both ease;
animation: rotateSlideOut 1s both ease;
}
.pt-page-rotateSlideIn {
-webkit-animation: rotateSlideIn 1s both ease;
animation: rotateSlideIn 1s both ease;
}
/********************************* keyframes **************************************/
/* rotate sides first and scale */
@-webkit-keyframes rotateRightSideFirst {
0% { }
40% { -webkit-transform: rotateY(15deg); opacity: .8; -webkit-animation-timing-function: ease-out; }
100% { -webkit-transform: scale(0.8) translateZ(-200px); opacity:0; }
}
@keyframes rotateRightSideFirst {
0% { }
40% { -webkit-transform: rotateY(15deg); transform: rotateY(15deg); opacity: .8; -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; }
100% { -webkit-transform: scale(0.8) translateZ(-200px); transform: scale(0.8) translateZ(-200px); opacity:0; }
}
@-webkit-keyframes rotateLeftSideFirst {
0% { }
40% { -webkit-transform: rotateY(-15deg); opacity: .8; -webkit-animation-timing-function: ease-out; }
100% { -webkit-transform: scale(0.8) translateZ(-200px); opacity:0; }
}
@keyframes rotateLeftSideFirst {
0% { }
40% { -webkit-transform: rotateY(-15deg); transform: rotateY(-15deg); opacity: .8; -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; }
100% { -webkit-transform: scale(0.8) translateZ(-200px); transform: scale(0.8) translateZ(-200px); opacity:0; }
}
@-webkit-keyframes rotateTopSideFirst {
0% { }
40% { -webkit-transform: rotateX(15deg); opacity: .8; -webkit-animation-timing-function: ease-out; }
100% { -webkit-transform: scale(0.8) translateZ(-200px); opacity:0; }
}
@keyframes rotateTopSideFirst {
0% { }
40% { -webkit-transform: rotateX(15deg); transform: rotateX(15deg); opacity: .8; -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; }
100% { -webkit-transform: scale(0.8) translateZ(-200px); transform: scale(0.8) translateZ(-200px); opacity:0; }
}
@-webkit-keyframes rotateBottomSideFirst {
0% { }
40% { -webkit-transform: rotateX(-15deg); opacity: .8; -webkit-animation-timing-function: ease-out; }
100% { -webkit-transform: scale(0.8) translateZ(-200px); opacity:0; }
}
@keyframes rotateBottomSideFirst {
0% { }
40% { -webkit-transform: rotateX(-15deg); transform: rotateX(-15deg); opacity: .8; -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; }
100% { -webkit-transform: scale(0.8) translateZ(-200px); transform: scale(0.8) translateZ(-200px); opacity:0; }
}
/* flip */
@-webkit-keyframes flipOutRight {
from { }
to { -webkit-transform: translateZ(-1000px) rotateY(90deg); opacity: 0.2; }
}
@keyframes flipOutRight {
from { }
to { -webkit-transform: translateZ(-1000px) rotateY(90deg); transform: translateZ(-1000px) rotateY(90deg); opacity: 0.2; }
}
@-webkit-keyframes flipInLeft {
from { -webkit-transform: translateZ(-1000px) rotateY(-90deg); opacity: 0.2; }
}
@keyframes flipInLeft {
from { -webkit-transform: translateZ(-1000px) rotateY(-90deg); transform: translateZ(-1000px) rotateY(-90deg); opacity: 0.2; }
}
@-webkit-keyframes flipOutLeft {
from { }
to { -webkit-transform: translateZ(-1000px) rotateY(-90deg); opacity: 0.2; }
}
@keyframes flipOutLeft {
from { }
to { -webkit-transform: translateZ(-1000px) rotateY(-90deg); transform: translateZ(-1000px) rotateY(-90deg); opacity: 0.2; }
}
@-webkit-keyframes flipInRight {
from { -webkit-transform: translateZ(-1000px) rotateY(90deg); opacity: 0.2; }
}
@keyframes flipInRight {
from { -webkit-transform: translateZ(-1000px) rotateY(90deg); transform: translateZ(-1000px) rotateY(90deg); opacity: 0.2; }
}
@-webkit-keyframes flipOutTop {
from { }
to { -webkit-transform: translateZ(-1000px) rotateX(90deg); opacity: 0.2; }
}
@keyframes flipOutTop {
from { }
to { -webkit-transform: translateZ(-1000px) rotateX(90deg); transform: translateZ(-1000px) rotateX(90deg); opacity: 0.2; }
}
@-webkit-keyframes flipInBottom {
from { -webkit-transform: translateZ(-1000px) rotateX(-90deg); opacity: 0.2; }
}
@keyframes flipInBottom {
from { -webkit-transform: translateZ(-1000px) rotateX(-90deg); transform: translateZ(-1000px) rotateX(-90deg); opacity: 0.2; }
}
@-webkit-keyframes flipOutBottom {
from { }
to { -webkit-transform: translateZ(-1000px) rotateX(-90deg); opacity: 0.2; }
}
@keyframes flipOutBottom {
from { }
to { -webkit-transform: translateZ(-1000px) rotateX(-90deg); transform: translateZ(-1000px) rotateX(-90deg); opacity: 0.2; }
}
@-webkit-keyframes flipInTop {
from { -webkit-transform: translateZ(-1000px) rotateX(90deg); opacity: 0.2; }
}
@keyframes flipInTop {
from { -webkit-transform: translateZ(-1000px) rotateX(90deg); transform: translateZ(-1000px) rotateX(90deg); opacity: 0.2; }
}
/* fall */
@-webkit-keyframes rotateFall {
0% { -webkit-transform: rotateZ(0deg); }
20% { -webkit-transform: rotateZ(10deg); -webkit-animation-timing-function: ease-out; }
40% { -webkit-transform: rotateZ(17deg); }
60% { -webkit-transform: rotateZ(16deg); }
100% { -webkit-transform: translateY(100%) rotateZ(17deg); }
}
@keyframes rotateFall {
0% { -webkit-transform: rotateZ(0deg); transform: rotateZ(0deg); }
20% { -webkit-transform: rotateZ(10deg); transform: rotateZ(10deg); -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; }
40% { -webkit-transform: rotateZ(17deg); transform: rotateZ(17deg); }
60% { -webkit-transform: rotateZ(16deg); transform: rotateZ(16deg); }
100% { -webkit-transform: translateY(100%) rotateZ(17deg); transform: translateY(100%) rotateZ(17deg); }
}
/* newspaper */
@-webkit-keyframes rotateOutNewspaper {
from { }
to { -webkit-transform: translateZ(-3000px) rotateZ(360deg); opacity: 0; }
}
@keyframes rotateOutNewspaper {
from { }
to { -webkit-transform: translateZ(-3000px) rotateZ(360deg); transform: translateZ(-3000px) rotateZ(360deg); opacity: 0; }
}
@-webkit-keyframes rotateInNewspaper {
from { -webkit-transform: translateZ(-3000px) rotateZ(-360deg); opacity: 0; }
}
@keyframes rotateInNewspaper {
from { -webkit-transform: translateZ(-3000px) rotateZ(-360deg); transform: translateZ(-3000px) rotateZ(-360deg); opacity: 0; }
}
/* push */
@-webkit-keyframes rotatePushLeft {
from { }
to { opacity: 0; -webkit-transform: rotateY(90deg); }
}
@keyframes rotatePushLeft {
from { }
to { opacity: 0; -webkit-transform: rotateY(90deg); transform: rotateY(90deg); }
}
@-webkit-keyframes rotatePushRight {
from { }
to { opacity: 0; -webkit-transform: rotateY(-90deg); }
}
@keyframes rotatePushRight {
from { }
to { opacity: 0; -webkit-transform: rotateY(-90deg); transform: rotateY(-90deg); }
}
@-webkit-keyframes rotatePushTop {
from { }
to { opacity: 0; -webkit-transform: rotateX(-90deg); }
}
@keyframes rotatePushTop {
from { }
to { opacity: 0; -webkit-transform: rotateX(-90deg); transform: rotateX(-90deg); }
}
@-webkit-keyframes rotatePushBottom {
from { }
to { opacity: 0; -webkit-transform: rotateX(90deg); }
}
@keyframes rotatePushBottom {
from { }
to { opacity: 0; -webkit-transform: rotateX(90deg); transform: rotateX(90deg); }
}
/* pull */
@-webkit-keyframes rotatePullRight {
from { opacity: 0; -webkit-transform: rotateY(-90deg); }
}
@keyframes rotatePullRight {
from { opacity: 0; -webkit-transform: rotateY(-90deg); transform: rotateY(-90deg); }
}
@-webkit-keyframes rotatePullLeft {
from { opacity: 0; -webkit-transform: rotateY(90deg); }
}
@keyframes rotatePullLeft {
from { opacity: 0; -webkit-transform: rotateY(90deg); transform: rotateY(90deg); }
}
@-webkit-keyframes rotatePullTop {
from { opacity: 0; -webkit-transform: rotateX(-90deg); }
}
@keyframes rotatePullTop {
from { opacity: 0; -webkit-transform: rotateX(-90deg); transform: rotateX(-90deg); }
}
@-webkit-keyframes rotatePullBottom {
from { opacity: 0; -webkit-transform: rotateX(90deg); }
}
@keyframes rotatePullBottom {
from { opacity: 0; -webkit-transform: rotateX(90deg); transform: rotateX(90deg); }
}
/* fold */
@-webkit-keyframes rotateFoldRight {
from { }
to { opacity: 0; -webkit-transform: translateX(100%) rotateY(90deg); }
}
@keyframes rotateFoldRight {
from { }
to { opacity: 0; -webkit-transform: translateX(100%) rotateY(90deg); transform: translateX(100%) rotateY(90deg); }
}
@-webkit-keyframes rotateFoldLeft {
from { }
to { opacity: 0; -webkit-transform: translateX(-100%) rotateY(-90deg); }
}
@keyframes rotateFoldLeft {
from { }
to { opacity: 0; -webkit-transform: translateX(-100%) rotateY(-90deg); transform: translateX(-100%) rotateY(-90deg); }
}
@-webkit-keyframes rotateFoldTop {
from { }
to { opacity: 0; -webkit-transform: translateY(-100%) rotateX(90deg); }
}
@keyframes rotateFoldTop {
from { }
to { opacity: 0; -webkit-transform: translateY(-100%) rotateX(90deg); transform: translateY(-100%) rotateX(90deg); }
}
@-webkit-keyframes rotateFoldBottom {
from { }
to { opacity: 0; -webkit-transform: translateY(100%) rotateX(-90deg); }
}
@keyframes rotateFoldBottom {
from { }
to { opacity: 0; -webkit-transform: translateY(100%) rotateX(-90deg); transform: translateY(100%) rotateX(-90deg); }
}
/* unfold */
@-webkit-keyframes rotateUnfoldLeft {
from { opacity: 0; -webkit-transform: translateX(-100%) rotateY(-90deg); }
}
@keyframes rotateUnfoldLeft {
from { opacity: 0; -webkit-transform: translateX(-100%) rotateY(-90deg); transform: translateX(-100%) rotateY(-90deg); }
}
@-webkit-keyframes rotateUnfoldRight {
from { opacity: 0; -webkit-transform: translateX(100%) rotateY(90deg); }
}
@keyframes rotateUnfoldRight {
from { opacity: 0; -webkit-transform: translateX(100%) rotateY(90deg); transform: translateX(100%) rotateY(90deg); }
}
@-webkit-keyframes rotateUnfoldTop {
from { opacity: 0; -webkit-transform: translateY(-100%) rotateX(90deg); }
}
@keyframes rotateUnfoldTop {
from { opacity: 0; -webkit-transform: translateY(-100%) rotateX(90deg); transform: translateY(-100%) rotateX(90deg); }
}
@-webkit-keyframes rotateUnfoldBottom {
from { opacity: 0; -webkit-transform: translateY(100%) rotateX(-90deg); }
}
@keyframes rotateUnfoldBottom {
from { opacity: 0; -webkit-transform: translateY(100%) rotateX(-90deg); transform: translateY(100%) rotateX(-90deg); }
}
/* room walls */
@-webkit-keyframes rotateRoomLeftOut {
from { }
to { opacity: .3; -webkit-transform: translateX(-100%) rotateY(90deg); }
}
@keyframes rotateRoomLeftOut {
from { }
to { opacity: .3; -webkit-transform: translateX(-100%) rotateY(90deg); transform: translateX(-100%) rotateY(90deg); }
}
@-webkit-keyframes rotateRoomLeftIn {
from { opacity: .3; -webkit-transform: translateX(100%) rotateY(-90deg); }
}
@keyframes rotateRoomLeftIn {
from { opacity: .3; -webkit-transform: translateX(100%) rotateY(-90deg); transform: translateX(100%) rotateY(-90deg); }
}
@-webkit-keyframes rotateRoomRightOut {
from { }
to { opacity: .3; -webkit-transform: translateX(100%) rotateY(-90deg); }
}
@keyframes rotateRoomRightOut {
from { }
to { opacity: .3; -webkit-transform: translateX(100%) rotateY(-90deg); transform: translateX(100%) rotateY(-90deg); }
}
@-webkit-keyframes rotateRoomRightIn {
from { opacity: .3; -webkit-transform: translateX(-100%) rotateY(90deg); }
}
@keyframes rotateRoomRightIn {
from { opacity: .3; -webkit-transform: translateX(-100%) rotateY(90deg); transform: translateX(-100%) rotateY(90deg); }
}
@-webkit-keyframes rotateRoomTopOut {
from { }
to { opacity: .3; -webkit-transform: translateY(-100%) rotateX(-90deg); }
}
@keyframes rotateRoomTopOut {
from { }
to { opacity: .3; -webkit-transform: translateY(-100%) rotateX(-90deg); transform: translateY(-100%) rotateX(-90deg); }
}
@-webkit-keyframes rotateRoomTopIn {
from { opacity: .3; -webkit-transform: translateY(100%) rotateX(90deg); }
}
@keyframes rotateRoomTopIn {
from { opacity: .3; -webkit-transform: translateY(100%) rotateX(90deg); transform: translateY(100%) rotateX(90deg); }
}
@-webkit-keyframes rotateRoomBottomOut {
from { }
to { opacity: .3; -webkit-transform: translateY(100%) rotateX(90deg); }
}
@keyframes rotateRoomBottomOut {
from { }
to { opacity: .3; -webkit-transform: translateY(100%) rotateX(90deg); transform: translateY(100%) rotateX(90deg); }
}
@-webkit-keyframes rotateRoomBottomIn {
from { opacity: .3; -webkit-transform: translateY(-100%) rotateX(-90deg); }
}
@keyframes rotateRoomBottomIn {
from { opacity: .3; -webkit-transform: translateY(-100%) rotateX(-90deg); transform: translateY(-100%) rotateX(-90deg); }
}
/* cube */
@-webkit-keyframes rotateCubeLeftOut {
0% { }
50% { -webkit-animation-timing-function: ease-out; -webkit-transform: translateX(-50%) translateZ(-200px) rotateY(-45deg); }
100% { opacity: .3; -webkit-transform: translateX(-100%) rotateY(-90deg); }
}
@keyframes rotateCubeLeftOut {
0% { }
50% { -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; -webkit-transform: translateX(-50%) translateZ(-200px) rotateY(-45deg); transform: translateX(-50%) translateZ(-200px) rotateY(-45deg); }
100% { opacity: .3; -webkit-transform: translateX(-100%) rotateY(-90deg); transform: translateX(-100%) rotateY(-90deg); }
}
@-webkit-keyframes rotateCubeLeftIn {
0% { opacity: .3; -webkit-transform: translateX(100%) rotateY(90deg); }
50% { -webkit-animation-timing-function: ease-out; -webkit-transform: translateX(50%) translateZ(-200px) rotateY(45deg); }
}
@keyframes rotateCubeLeftIn {
0% { opacity: .3; -webkit-transform: translateX(100%) rotateY(90deg); transform: translateX(100%) rotateY(90deg); }
50% { -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; -webkit-transform: translateX(50%) translateZ(-200px) rotateY(45deg); transform: translateX(50%) translateZ(-200px) rotateY(45deg); }
}
@-webkit-keyframes rotateCubeRightOut {
0% { }
50% { -webkit-animation-timing-function: ease-out; -webkit-transform: translateX(50%) translateZ(-200px) rotateY(45deg); }
100% { opacity: .3; -webkit-transform: translateX(100%) rotateY(90deg); }
}
@keyframes rotateCubeRightOut {
0% { }
50% { -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; -webkit-transform: translateX(50%) translateZ(-200px) rotateY(45deg); transform: translateX(50%) translateZ(-200px) rotateY(45deg); }
100% { opacity: .3; -webkit-transform: translateX(100%) rotateY(90deg); transform: translateX(100%) rotateY(90deg); }
}
@-webkit-keyframes rotateCubeRightIn {
0% { opacity: .3; -webkit-transform: translateX(-100%) rotateY(-90deg); }
50% { -webkit-animation-timing-function: ease-out; -webkit-transform: translateX(-50%) translateZ(-200px) rotateY(-45deg); }
}
@keyframes rotateCubeRightIn {
0% { opacity: .3; -webkit-transform: translateX(-100%) rotateY(-90deg); transform: translateX(-100%) rotateY(-90deg); }
50% { -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; -webkit-transform: translateX(-50%) translateZ(-200px) rotateY(-45deg); transform: translateX(-50%) translateZ(-200px) rotateY(-45deg); }
}
@-webkit-keyframes rotateCubeTopOut {
0% { }
50% { -webkit-animation-timing-function: ease-out; -webkit-transform: translateY(-50%) translateZ(-200px) rotateX(45deg); }
100% { opacity: .3; -webkit-transform: translateY(-100%) rotateX(90deg); }
}
@keyframes rotateCubeTopOut {
0% {}
50% { -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; -webkit-transform: translateY(-50%) translateZ(-200px) rotateX(45deg); transform: translateY(-50%) translateZ(-200px) rotateX(45deg); }
100% { opacity: .3; -webkit-transform: translateY(-100%) rotateX(90deg); transform: translateY(-100%) rotateX(90deg); }
}
@-webkit-keyframes rotateCubeTopIn {
0% { opacity: .3; -webkit-transform: translateY(100%) rotateX(-90deg); }
50% { -webkit-animation-timing-function: ease-out; -webkit-transform: translateY(50%) translateZ(-200px) rotateX(-45deg); }
}
@keyframes rotateCubeTopIn {
0% { opacity: .3; -webkit-transform: translateY(100%) rotateX(-90deg); transform: translateY(100%) rotateX(-90deg); }
50% { -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; -webkit-transform: translateY(50%) translateZ(-200px) rotateX(-45deg); transform: translateY(50%) translateZ(-200px) rotateX(-45deg); }
}
@-webkit-keyframes rotateCubeBottomOut {
0% { }
50% { -webkit-animation-timing-function: ease-out; -webkit-transform: translateY(50%) translateZ(-200px) rotateX(-45deg); }
100% { opacity: .3; -webkit-transform: translateY(100%) rotateX(-90deg); }
}
@keyframes rotateCubeBottomOut {
0% { }
50% { -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; -webkit-transform: translateY(50%) translateZ(-200px) rotateX(-45deg); transform: translateY(50%) translateZ(-200px) rotateX(-45deg); }
100% { opacity: .3; -webkit-transform: translateY(100%) rotateX(-90deg); transform: translateY(100%) rotateX(-90deg); }
}
@-webkit-keyframes rotateCubeBottomIn {
0% { opacity: .3; -webkit-transform: translateY(-100%) rotateX(90deg); }
50% { -webkit-animation-timing-function: ease-out; -webkit-transform: translateY(-50%) translateZ(-200px) rotateX(45deg); }
}
@keyframes rotateCubeBottomIn {
0% { opacity: .3; -webkit-transform: translateY(-100%) rotateX(90deg); transform: translateY(-100%) rotateX(90deg); }
50% { -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; -webkit-transform: translateY(-50%) translateZ(-200px) rotateX(45deg); transform: translateY(-50%) translateZ(-200px) rotateX(45deg); }
}
/* carousel */
@-webkit-keyframes rotateCarouselLeftOut {
from { }
to { opacity: .3; -webkit-transform: translateX(-150%) scale(.4) rotateY(-65deg); }
}
@keyframes rotateCarouselLeftOut {
from { }
to { opacity: .3; -webkit-transform: translateX(-150%) scale(.4) rotateY(-65deg); transform: translateX(-150%) scale(.4) rotateY(-65deg); }
}
@-webkit-keyframes rotateCarouselLeftIn {
from { opacity: .3; -webkit-transform: translateX(200%) scale(.4) rotateY(65deg); }
}
@keyframes rotateCarouselLeftIn {
from { opacity: .3; -webkit-transform: translateX(200%) scale(.4) rotateY(65deg); transform: translateX(200%) scale(.4) rotateY(65deg); }
}
@-webkit-keyframes rotateCarouselRightOut {
from { }
to { opacity: .3; -webkit-transform: translateX(200%) scale(.4) rotateY(65deg); }
}
@keyframes rotateCarouselRightOut {
from { }
to { opacity: .3; -webkit-transform: translateX(200%) scale(.4) rotateY(65deg); transform: translateX(200%) scale(.4) rotateY(65deg); }
}
@-webkit-keyframes rotateCarouselRightIn {
from { opacity: .3; -webkit-transform: translateX(-200%) scale(.4) rotateY(-65deg); }
}
@keyframes rotateCarouselRightIn {
from { opacity: .3; -webkit-transform: translateX(-200%) scale(.4) rotateY(-65deg); transform: translateX(-200%) scale(.4) rotateY(-65deg); }
}
@-webkit-keyframes rotateCarouselTopOut {
from { }
to { opacity: .3; -webkit-transform: translateY(-200%) scale(.4) rotateX(65deg); }
}
@keyframes rotateCarouselTopOut {
from { }
to { opacity: .3; -webkit-transform: translateY(-200%) scale(.4) rotateX(65deg); transform: translateY(-200%) scale(.4) rotateX(65deg); }
}
@-webkit-keyframes rotateCarouselTopIn {
from { opacity: .3; -webkit-transform: translateY(200%) scale(.4) rotateX(-65deg); }
}
@keyframes rotateCarouselTopIn {
from { opacity: .3; -webkit-transform: translateY(200%) scale(.4) rotateX(-65deg); transform: translateY(200%) scale(.4) rotateX(-65deg); }
}
@-webkit-keyframes rotateCarouselBottomOut {
from { }
to { opacity: .3; -webkit-transform: translateY(200%) scale(.4) rotateX(-65deg); }
}
@keyframes rotateCarouselBottomOut {
from { }
to { opacity: .3; -webkit-transform: translateY(200%) scale(.4) rotateX(-65deg); transform: translateY(200%) scale(.4) rotateX(-65deg); }
}
@-webkit-keyframes rotateCarouselBottomIn {
from { opacity: .3; -webkit-transform: translateY(-200%) scale(.4) rotateX(65deg); }
}
@keyframes rotateCarouselBottomIn {
from { opacity: .3; -webkit-transform: translateY(-200%) scale(.4) rotateX(65deg); transform: translateY(-200%) scale(.4) rotateX(65deg); }
}
/* sides */
@-webkit-keyframes rotateSidesOut {
from { }
to { opacity: 0; -webkit-transform: translateZ(-500px) rotateY(90deg); }
}
@keyframes rotateSidesOut {
from { }
to { opacity: 0; -webkit-transform: translateZ(-500px) rotateY(90deg); transform: translateZ(-500px) rotateY(90deg); }
}
@-webkit-keyframes rotateSidesIn {
from { opacity: 0; -webkit-transform: translateZ(-500px) rotateY(-90deg); }
}
@keyframes rotateSidesIn {
from { opacity: 0; -webkit-transform: translateZ(-500px) rotateY(-90deg); transform: translateZ(-500px) rotateY(-90deg); }
}
/* slide */
@-webkit-keyframes rotateSlideOut {
0% { }
25% { opacity: .5; -webkit-transform: translateZ(-500px); }
75% { opacity: .5; -webkit-transform: translateZ(-500px) translateX(-200%); }
100% { opacity: .5; -webkit-transform: translateZ(-500px) translateX(-200%); }
}
@keyframes rotateSlideOut {
0% { }
25% { opacity: .5; -webkit-transform: translateZ(-500px); transform: translateZ(-500px); }
75% { opacity: .5; -webkit-transform: translateZ(-500px) translateX(-200%); transform: translateZ(-500px) translateX(-200%); }
100% { opacity: .5; -webkit-transform: translateZ(-500px) translateX(-200%); transform: translateZ(-500px) translateX(-200%); }
}
@-webkit-keyframes rotateSlideIn {
0%, 25% { opacity: .5; -webkit-transform: translateZ(-500px) translateX(200%); }
75% { opacity: .5; -webkit-transform: translateZ(-500px); }
100% { opacity: 1; -webkit-transform: translateZ(0) translateX(0); }
}
@keyframes rotateSlideIn {
0%, 25% { opacity: .5; -webkit-transform: translateZ(-500px) translateX(200%); transform: translateZ(-500px) translateX(200%); }
75% { opacity: .5; -webkit-transform: translateZ(-500px); transform: translateZ(-500px); }
100% { opacity: 1; -webkit-transform: translateZ(0) translateX(0); transform: translateZ(0) translateX(0); }
}
/* animation delay classes */
.pt-page-delay100 {
-webkit-animation-delay: .1s;
animation-delay: .1s;
}
.pt-page-delay180 {
-webkit-animation-delay: .180s;
animation-delay: .180s;
}
.pt-page-delay200 {
-webkit-animation-delay: .2s;
animation-delay: .2s;
}
.pt-page-delay300 {
-webkit-animation-delay: .3s;
animation-delay: .3s;
}
.pt-page-delay400 {
-webkit-animation-delay: .4s;
animation-delay: .4s;
}
.pt-page-delay500 {
-webkit-animation-delay: .5s;
animation-delay: .5s;
}
.pt-page-delay700 {
-webkit-animation-delay: .7s;
animation-delay: .7s;
}
.pt-page-delay1000 {
-webkit-animation-delay: 1s;
animation-delay: 1s;
}
\ No newline at end of file
html, body { height: 100%; }
.pt-perspective {
position: relative;
width: 100%;
height: 100%;
-webkit-perspective: 1200px;
-moz-perspective: 1200px;
perspective: 1200px;
}
.pt-page {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
visibility: hidden;
overflow: hidden;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transform: translate3d(0, 0, 0);
-moz-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.pt-page-current,
.no-js .pt-page {
visibility: visible;
z-index: 1;
}
.no-js body {
overflow: auto;
}
.pt-page-ontop {
z-index: 999;
}
/* Text Styles, Colors, Backgrounds */
.pt-page h1 {
position: absolute;
font-weight: 300;
font-size: 4.4em;
line-height: 1;
letter-spacing: 6px;
margin: 0;
top: 12%;
width: 100%;
text-align: center;
text-transform: uppercase;
word-spacing: -0.3em;
}
.pt-page h1 span {
font-family: 'Satisfy', serif;
font-weight: 400;
font-size: 40%;
text-transform: none;
word-spacing: 0;
letter-spacing: 0;
display: block;
opacity: 0.4;
}
.pt-page h1 strong {
color: rgba(0,0,0,0.1);
}
/* Triggers (menu and button) */
.pt-triggers {
position: absolute;
width: 300px;
z-index: 999999;
top: 12%;
left: 50%;
margin-top: 130px;
-webkit-transform: translateX(-50%);
-moz-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
}
.no-js .pt-triggers {
display: none;
}
.pt-triggers .dl-menuwrapper button,
.pt-touch-button {
border: none;
font-size: 13px;
font-weight: 700;
text-transform: uppercase;
margin: 10px 0 20px;
padding: 0px 20px;
line-height: 50px;
height: 50px;
letter-spacing: 1px;
width: 100%;
cursor: pointer;
display: block;
font-family: 'Lato', Calibri, Arial, sans-serif;
box-shadow: 0 3px 0 rgba(0,0,0,0.1);
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.pt-touch-button {
background: #fff;
color: #aaa;
}
.pt-triggers .dl-menuwrapper button {
margin-bottom: 0;
}
.pt-touch-button:active {
box-shadow: 0 1px 0 rgba(0,0,0,0.1);
}
.touch .pt-triggers .dl-menuwrapper {
display: none;
}
.pt-message {
display: none;
position: absolute;
z-index: 99999;
bottom: 0;
left: 0;
width: 100%;
background: #da475c;
color: #fff;
text-align: center;
}
.pt-message p {
margin: 0;
line-height: 60px;
font-size: 26px;
}
.no-cssanimations .pt-message {
display: block;
}
@media screen and (max-width: 47.4375em) {
.pt-page h1 {
font-size: 3em;
}
.pt-triggers .dl-menuwrapper {
display: none;
}
}
@media screen and (max-height: 45.9em) {
.pt-triggers .dl-menuwrapper li a {
padding-top: 2px;
padding-bottom: 2px;
}
.pt-triggers .dl-menuwrapper li.dl-back:after, .dl-menuwrapper li > a:not(:only-child):after {
line-height: 24px;
}
}
@media screen and (max-height: 38em) {
.pt-triggers .dl-menuwrapper {
display: none;
}
}
......@@ -426,6 +426,11 @@ body {
-webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
}
.detail_row #wrapper #scroller ul li p em {
font-style: normal;
font-size: 7px;
vertical-align: top;
}
.detail_row #wrapper #scroller ul li:last-child {
margin-right: 0;
}
......
......@@ -50,6 +50,9 @@ function page_template($template)
case 'map':
$page = $theme . '/map.php';
break;
case 'loan_calculator':
$page = $theme . '/loan_calculator.php';
break;
}
return $page;
} else {
......@@ -177,63 +180,30 @@ function get_consultant()
}
}
add_action('wp_ajax_get_my_house', 'get_my_house');
function get_my_house()
{
$houseType = $_POST['houseType'];
$userType = $_POST['userType'];
$userId = $_POST['userId'];
$index = $_POST['index'];
if (isset($houseType) && isset($userType) && isset($userId) && isset($index)) {
$house_result = SearchDao::searchHouse(
array(
'houseType' => $houseType,
'userType' => $userType,
'userId' => $userId,
'index' => $index
)
);
$array = get_house_image_and_tags($house_result);
wp_send_json($array);
}
}
add_action('wp_ajax_search_house', 'SearchDao::ajax_searchHouse');
add_action('wp_ajax_nopriv_search_house', 'SearchDao::ajax_searchHouse');
function get_house_image_and_tags($house_result)
add_action('wp_ajax_submit_comment', 'submit_comment');
function submit_comment()
{
$array = array();
if ($house_result) {
$array['code'] = 2000;
$house_ids = array();
foreach ($house_result as $key => $value) {
$house_id = $value->id;
$house_ids[] = $house_id;
}
$tag_result = dao::search_house_tag($house_ids);
//标签
if ($tag_result) {
foreach ($tag_result as $key => $value) {
$array['tags'][$value->house_id][] = $value->name;
}
}
//图片
$image_result = dao::search_house_image($house_ids);
if ($image_result) {
foreach ($image_result as $key => $value) {
$array['images'][$value->house_id] = home_url() . Image::getImage($value->path,'small');
}
}
$array['result'] = $house_result;
} else {
$array['code'] = 2001;
$user_id = $_POST['user_id'];
$content = $_POST['content'];
if (isset($user_id) && isset($content)) {
$data = array(
'comment_post_ID' => 1,
'comment_content' => $content,
'comment_parent' => 0,
'user_id' => $user_id,
'comment_date' => current_time('mysql'),
'comment_approved' => 1,
);
wp_insert_comment($data);
}
return $array;
}
add_action('wp_ajax_add_collect', 'add_collect');
function add_collect($house_id){
function add_collect($house_id)
{
$insert_a_house_user_array = array(
'user_id' => get_current_user_id(),
'house_id' => $_POST["hid"],
......@@ -252,16 +222,18 @@ function add_collect($house_id){
}
add_filter('login_redirect', 'new_login_redirect', 10, 3);
function new_login_redirect($redirect_to, $request, $user ){
if($user-ID>0) {
function new_login_redirect($redirect_to, $request, $user)
{
if ($user - ID > 0) {
$role = $user->roles[0];
if ($role == 'administrator' || $role == 'editor') {
return admin_url('admin.php?page=newHouseList');
} else {
return site_url();
}
}else{
} else {
return $redirect_to;
}
}
?>
\ No newline at end of file
/*!
* Bootstrap v3.3.5 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under the MIT license
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),
d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
\ No newline at end of file
/*!
* Generated using the Bootstrap Customizer (http://v3.bootcss.com/customize/?id=ec2646a603d67129ad19)
* Config saved to config.json and https://gist.github.com/ec2646a603d67129ad19
*/
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(t){"use strict";function e(e,s){return this.each(function(){var n=t(this),a=n.data("bs.modal"),o=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);a||n.data("bs.modal",a=new i(this,o)),"string"==typeof e?a[e](s):o.show&&a.show(s)})}var i=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};i.VERSION="3.3.5",i.TRANSITION_DURATION=300,i.BACKDROP_TRANSITION_DURATION=150,i.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},i.prototype.show=function(e){var s=this,n=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(n),this.isShown||n.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){s.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(s.$element)&&(s.ignoreBackdropClick=!0)})}),this.backdrop(function(){var n=t.support.transition&&s.$element.hasClass("fade");s.$element.parent().length||s.$element.appendTo(s.$body),s.$element.show().scrollTop(0),s.adjustDialog(),n&&s.$element[0].offsetWidth,s.$element.addClass("in"),s.enforceFocus();var a=t.Event("shown.bs.modal",{relatedTarget:e});n?s.$dialog.one("bsTransitionEnd",function(){s.$element.trigger("focus").trigger(a)}).emulateTransitionEnd(i.TRANSITION_DURATION):s.$element.trigger("focus").trigger(a)}))},i.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(i.TRANSITION_DURATION):this.hideModal())},i.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},i.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},i.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},i.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},i.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(e){var s=this,n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var a=t.support.transition&&n;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+n).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),a&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;a?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var o=function(){s.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",o).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):o()}else e&&e()},i.prototype.handleUpdate=function(){this.adjustDialog()},i.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},i.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},i.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},i.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var s=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=i,t.fn.modal.noConflict=function(){return t.fn.modal=s,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(i){var s=t(this),n=s.attr("href"),a=t(s.attr("data-target")||n&&n.replace(/.*(?=#[^\s]+$)/,"")),o=a.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(n)&&n},a.data(),s.data());s.is("a")&&i.preventDefault(),a.one("show.bs.modal",function(t){t.isDefaultPrevented()||a.one("hidden.bs.modal",function(){s.is(":visible")&&s.trigger("focus")})}),e.call(a,o,this)})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var s=t(this),n=s.data("bs.tab");n||s.data("bs.tab",n=new i(this)),"string"==typeof e&&n[e]()})}var i=function(e){this.element=t(e)};i.VERSION="3.3.5",i.TRANSITION_DURATION=150,i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),s=e.data("target");if(s||(s=e.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var n=i.find(".active:last a"),a=t.Event("hide.bs.tab",{relatedTarget:e[0]}),o=t.Event("show.bs.tab",{relatedTarget:n[0]});if(n.trigger(a),e.trigger(o),!o.isDefaultPrevented()&&!a.isDefaultPrevented()){var r=t(s);this.activate(e.closest("li"),i),this.activate(r,r.parent(),function(){n.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:n[0]})})}}},i.prototype.activate=function(e,s,n){function a(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),n&&n()}var o=s.find("> .active"),r=n&&t.support.transition&&(o.length&&o.hasClass("fade")||!!s.find("> .fade").length);o.length&&r?o.one("bsTransitionEnd",a).emulateTransitionEnd(i.TRANSITION_DURATION):a(),o.removeClass("in")};var s=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=s,this};var n=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}(jQuery),+function(t){"use strict";function e(e){var i,s=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(s)}function i(e){return this.each(function(){var i=t(this),n=i.data("bs.collapse"),a=t.extend({},s.DEFAULTS,i.data(),"object"==typeof e&&e);!n&&a.toggle&&/show|hide/.test(e)&&(a.toggle=!1),n||i.data("bs.collapse",n=new s(this,a)),"string"==typeof e&&n[e]()})}var s=function(e,i){this.$element=t(e),this.options=t.extend({},s.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};s.VERSION="3.3.5",s.TRANSITION_DURATION=350,s.DEFAULTS={toggle:!0},s.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},s.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,n=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(n&&n.length&&(e=n.data("bs.collapse"),e&&e.transitioning))){var a=t.Event("show.bs.collapse");if(this.$element.trigger(a),!a.isDefaultPrevented()){n&&n.length&&(i.call(n,"hide"),e||n.data("bs.collapse",null));var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var r=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return r.call(this);var l=t.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(s.TRANSITION_DURATION)[o](this.$element[0][l])}}}},s.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var n=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(n,this)).emulateTransitionEnd(s.TRANSITION_DURATION):n.call(this)}}},s.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},s.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(i,s){var n=t(s);this.addAriaAndCollapsedClass(e(n),n)},this)).end()},s.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var n=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=s,t.fn.collapse.noConflict=function(){return t.fn.collapse=n,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(s){var n=t(this);n.attr("data-target")||s.preventDefault();var a=e(n),o=a.data("bs.collapse"),r=o?"toggle":n.data();i.call(a,r)})}(jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,s=this;t(this).one("bsTransitionEnd",function(){i=!0});var n=function(){i||t(s).trigger(t.support.transition.end)};return setTimeout(n,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery);
\ No newline at end of file
function loan_calc(bj, year, rate) {
//贷款总额
var loan_ceiling = bj * 10000;
//贷款期限
var loan_period = year * 12;
var number_of_month = loan_period;
//贷款利率
var loan_rate = rate / 100 / 12;
//公式需要
var _rate = Math.pow(1 + loan_rate, loan_period);
//等额本息月供
var acpi_monthly_payment = (loan_ceiling * loan_rate * _rate) / (_rate - 1);
var acpi_interest = loan_period * acpi_monthly_payment - loan_ceiling;
//等额本金计算
var em = loan_ceiling / loan_period;
var nbj = loan_ceiling;
var i = 0;
var ac_interest = 0;
var ac_monthly_payment = [];
for (; loan_period > 0; loan_period--) {
var interest = (loan_ceiling - i * em) * loan_rate;
ac_interest += interest;
ac_monthly_payment.push(em + interest);
i++;
nbj -= em;
}
return {
//等额本息
acpi: {
interest: acpi_interest,
monthlyPayment: acpi_monthly_payment
},
//等额本金
ac: {
interest: ac_interest,
monthlyPayment: ac_monthly_payment
},
loan_period: number_of_month,
loan_ceiling: bj
}
}
/*
等额本息 Average Capital Plus Interest
等额本金 average capital
利息 interest
还款总额:Total repayment
{ACPI:{interest, MonthlyPayment},
AC:[],
interest:
loan_period:月
totalPayment}*/
/* Modernizr 2.6.2 (Custom Build) | MIT & BSD
* Build: http://modernizr.com/download/#-cssanimations-csstransitions-touch-shiv-cssclasses-prefixed-teststyles-testprop-testallprops-prefixes-domprefixes-load
*/
;window.Modernizr=function(a,b,c){function z(a){j.cssText=a}function A(a,b){return z(m.join(a+";")+(b||""))}function B(a,b){return typeof a===b}function C(a,b){return!!~(""+a).indexOf(b)}function D(a,b){for(var d in a){var e=a[d];if(!C(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function E(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:B(f,"function")?f.bind(d||b):f}return!1}function F(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+o.join(d+" ")+d).split(" ");return B(b,"string")||B(b,"undefined")?D(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),E(e,b,c))}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["&#173;",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},x={}.hasOwnProperty,y;!B(x,"undefined")&&!B(x.call,"undefined")?y=function(a,b){return x.call(a,b)}:y=function(a,b){return b in a&&B(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=u.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e}),q.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:w(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},q.cssanimations=function(){return F("animationName")},q.csstransitions=function(){return F("transition")};for(var G in q)y(q,G)&&(v=G.toLowerCase(),e[v]=q[G](),t.push((e[v]?"":"no-")+v));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)y(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},z(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function p(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return r.shivMethods?n(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(r,b.frag)}function q(a){a||(a=b);var c=m(a);return r.shivCSS&&!f&&!c.hasCSS&&(c.hasCSS=!!k(a,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),j||p(a,c),a}var c=a.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,e=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,f,g="_html5shiv",h=0,i={},j;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.testProp=function(a){return D([a])},e.testAllProps=F,e.testStyles=w,e.prefixed=function(a,b,c){return b?F(a,b,c):F(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
\ No newline at end of file
var PageTransitions = (function() {
var $main = $( '#pt-main' ),
$pages = $main.children( 'div.pt-page' ),
pagesCount = $pages.length,
current = 0,
isAnimating = false,
endCurrPage = false,
endNextPage = false,
animEndEventNames = {
'WebkitAnimation' : 'webkitAnimationEnd',
'OAnimation' : 'oAnimationEnd',
'msAnimation' : 'MSAnimationEnd',
'animation' : 'animationend'
},
// animation end event name
animEndEventName = animEndEventNames[ Modernizr.prefixed( 'animation' ) ],
// support css animations
support = Modernizr.cssanimations;
function init() {
$pages.each( function() {
var $page = $( this );
$page.data( 'originalClassList', $page.attr( 'class' ) );
} );
$pages.eq( current ).addClass( 'pt-page-current' );
}
function nextPage(options) {
var animation = (options.animation) ? options.animation : options;
if( isAnimating ) {
return false;
}
isAnimating = true;
var $currPage = $pages.eq( current );
if(options.showPage >= 0){
if( options.showPage < pagesCount ) {
current = options.showPage;
}
else {
current = 0;
}
}
var $nextPage = $pages.eq( current ).addClass( 'pt-page-current' ),
outClass = '', inClass = '';
switch( animation ) {
case 1:
outClass = 'pt-page-moveToLeft';
inClass = 'pt-page-moveFromRight';
break;
case 2:
outClass = 'pt-page-moveToRight';
inClass = 'pt-page-moveFromLeft';
break;
case 3:
outClass = 'pt-page-moveToTop';
inClass = 'pt-page-moveFromBottom';
break;
case 4:
outClass = 'pt-page-moveToBottom';
inClass = 'pt-page-moveFromTop';
break;
case 5:
outClass = 'pt-page-fade';
inClass = 'pt-page-moveFromRight pt-page-ontop';
break;
case 6:
outClass = 'pt-page-fade';
inClass = 'pt-page-moveFromLeft pt-page-ontop';
break;
case 7:
outClass = 'pt-page-fade';
inClass = 'pt-page-moveFromBottom pt-page-ontop';
break;
case 8:
outClass = 'pt-page-fade';
inClass = 'pt-page-moveFromTop pt-page-ontop';
break;
case 9:
outClass = 'pt-page-moveToLeftFade';
inClass = 'pt-page-moveFromRightFade';
break;
case 10:
outClass = 'pt-page-moveToRightFade';
inClass = 'pt-page-moveFromLeftFade';
break;
case 11:
outClass = 'pt-page-moveToTopFade';
inClass = 'pt-page-moveFromBottomFade';
break;
case 12:
outClass = 'pt-page-moveToBottomFade';
inClass = 'pt-page-moveFromTopFade';
break;
case 13:
outClass = 'pt-page-moveToLeftEasing pt-page-ontop';
inClass = 'pt-page-moveFromRight';
break;
case 14:
outClass = 'pt-page-moveToRightEasing pt-page-ontop';
inClass = 'pt-page-moveFromLeft';
break;
case 15:
outClass = 'pt-page-moveToTopEasing pt-page-ontop';
inClass = 'pt-page-moveFromBottom';
break;
case 16:
outClass = 'pt-page-moveToBottomEasing pt-page-ontop';
inClass = 'pt-page-moveFromTop';
break;
case 17:
outClass = 'pt-page-scaleDown';
inClass = 'pt-page-moveFromRight pt-page-ontop';
break;
case 18:
outClass = 'pt-page-scaleDown';
inClass = 'pt-page-moveFromLeft pt-page-ontop';
break;
case 19:
outClass = 'pt-page-scaleDown';
inClass = 'pt-page-moveFromBottom pt-page-ontop';
break;
case 20:
outClass = 'pt-page-scaleDown';
inClass = 'pt-page-moveFromTop pt-page-ontop';
break;
case 21:
outClass = 'pt-page-scaleDown';
inClass = 'pt-page-scaleUpDown pt-page-delay300';
break;
case 22:
outClass = 'pt-page-scaleDownUp';
inClass = 'pt-page-scaleUp pt-page-delay300';
break;
case 23:
outClass = 'pt-page-moveToLeft pt-page-ontop';
inClass = 'pt-page-scaleUp';
break;
case 24:
outClass = 'pt-page-moveToRight pt-page-ontop';
inClass = 'pt-page-scaleUp';
break;
case 25:
outClass = 'pt-page-moveToTop pt-page-ontop';
inClass = 'pt-page-scaleUp';
break;
case 26:
outClass = 'pt-page-moveToBottom pt-page-ontop';
inClass = 'pt-page-scaleUp';
break;
case 27:
outClass = 'pt-page-scaleDownCenter';
inClass = 'pt-page-scaleUpCenter pt-page-delay400';
break;
case 28:
outClass = 'pt-page-rotateRightSideFirst';
inClass = 'pt-page-moveFromRight pt-page-delay200 pt-page-ontop';
break;
case 29:
outClass = 'pt-page-rotateLeftSideFirst';
inClass = 'pt-page-moveFromLeft pt-page-delay200 pt-page-ontop';
break;
case 30:
outClass = 'pt-page-rotateTopSideFirst';
inClass = 'pt-page-moveFromTop pt-page-delay200 pt-page-ontop';
break;
case 31:
outClass = 'pt-page-rotateBottomSideFirst';
inClass = 'pt-page-moveFromBottom pt-page-delay200 pt-page-ontop';
break;
case 32:
outClass = 'pt-page-flipOutRight';
inClass = 'pt-page-flipInLeft pt-page-delay500';
break;
case 33:
outClass = 'pt-page-flipOutLeft';
inClass = 'pt-page-flipInRight pt-page-delay500';
break;
case 34:
outClass = 'pt-page-flipOutTop';
inClass = 'pt-page-flipInBottom pt-page-delay500';
break;
case 35:
outClass = 'pt-page-flipOutBottom';
inClass = 'pt-page-flipInTop pt-page-delay500';
break;
case 36:
outClass = 'pt-page-rotateFall pt-page-ontop';
inClass = 'pt-page-scaleUp';
break;
case 37:
outClass = 'pt-page-rotateOutNewspaper';
inClass = 'pt-page-rotateInNewspaper pt-page-delay500';
break;
case 38:
outClass = 'pt-page-rotatePushLeft';
inClass = 'pt-page-moveFromRight';
break;
case 39:
outClass = 'pt-page-rotatePushRight';
inClass = 'pt-page-moveFromLeft';
break;
case 40:
outClass = 'pt-page-rotatePushTop';
inClass = 'pt-page-moveFromBottom';
break;
case 41:
outClass = 'pt-page-rotatePushBottom';
inClass = 'pt-page-moveFromTop';
break;
case 42:
outClass = 'pt-page-rotatePushLeft';
inClass = 'pt-page-rotatePullRight pt-page-delay180';
break;
case 43:
outClass = 'pt-page-rotatePushRight';
inClass = 'pt-page-rotatePullLeft pt-page-delay180';
break;
case 44:
outClass = 'pt-page-rotatePushTop';
inClass = 'pt-page-rotatePullBottom pt-page-delay180';
break;
case 45:
outClass = 'pt-page-rotatePushBottom';
inClass = 'pt-page-rotatePullTop pt-page-delay180';
break;
case 46:
outClass = 'pt-page-rotateFoldLeft';
inClass = 'pt-page-moveFromRightFade';
break;
case 47:
outClass = 'pt-page-rotateFoldRight';
inClass = 'pt-page-moveFromLeftFade';
break;
case 48:
outClass = 'pt-page-rotateFoldTop';
inClass = 'pt-page-moveFromBottomFade';
break;
case 49:
outClass = 'pt-page-rotateFoldBottom';
inClass = 'pt-page-moveFromTopFade';
break;
case 50:
outClass = 'pt-page-moveToRightFade';
inClass = 'pt-page-rotateUnfoldLeft';
break;
case 51:
outClass = 'pt-page-moveToLeftFade';
inClass = 'pt-page-rotateUnfoldRight';
break;
case 52:
outClass = 'pt-page-moveToBottomFade';
inClass = 'pt-page-rotateUnfoldTop';
break;
case 53:
outClass = 'pt-page-moveToTopFade';
inClass = 'pt-page-rotateUnfoldBottom';
break;
case 54:
outClass = 'pt-page-rotateRoomLeftOut pt-page-ontop';
inClass = 'pt-page-rotateRoomLeftIn';
break;
case 55:
outClass = 'pt-page-rotateRoomRightOut pt-page-ontop';
inClass = 'pt-page-rotateRoomRightIn';
break;
case 56:
outClass = 'pt-page-rotateRoomTopOut pt-page-ontop';
inClass = 'pt-page-rotateRoomTopIn';
break;
case 57:
outClass = 'pt-page-rotateRoomBottomOut pt-page-ontop';
inClass = 'pt-page-rotateRoomBottomIn';
break;
case 58:
outClass = 'pt-page-rotateCubeLeftOut pt-page-ontop';
inClass = 'pt-page-rotateCubeLeftIn';
break;
case 59:
outClass = 'pt-page-rotateCubeRightOut pt-page-ontop';
inClass = 'pt-page-rotateCubeRightIn';
break;
case 60:
outClass = 'pt-page-rotateCubeTopOut pt-page-ontop';
inClass = 'pt-page-rotateCubeTopIn';
break;
case 61:
outClass = 'pt-page-rotateCubeBottomOut pt-page-ontop';
inClass = 'pt-page-rotateCubeBottomIn';
break;
case 62:
outClass = 'pt-page-rotateCarouselLeftOut pt-page-ontop';
inClass = 'pt-page-rotateCarouselLeftIn';
break;
case 63:
outClass = 'pt-page-rotateCarouselRightOut pt-page-ontop';
inClass = 'pt-page-rotateCarouselRightIn';
break;
case 64:
outClass = 'pt-page-rotateCarouselTopOut pt-page-ontop';
inClass = 'pt-page-rotateCarouselTopIn';
break;
case 65:
outClass = 'pt-page-rotateCarouselBottomOut pt-page-ontop';
inClass = 'pt-page-rotateCarouselBottomIn';
break;
case 66:
outClass = 'pt-page-rotateSidesOut';
inClass = 'pt-page-rotateSidesIn pt-page-delay200';
break;
case 67:
outClass = 'pt-page-rotateSlideOut';
inClass = 'pt-page-rotateSlideIn';
break;
}
$currPage.addClass( outClass ).on( animEndEventName, function() {
$currPage.off( animEndEventName );
endCurrPage = true;
if( endNextPage ) {
onEndAnimation( $currPage, $nextPage );
}
} );
$nextPage.addClass( inClass ).on( animEndEventName, function() {
$nextPage.off( animEndEventName );
endNextPage = true;
if( endCurrPage ) {
onEndAnimation( $currPage, $nextPage );
}
} );
if( !support ) {
onEndAnimation( $currPage, $nextPage );
}
}
function onEndAnimation( $outpage, $inpage ) {
endCurrPage = false;
endNextPage = false;
resetPage( $outpage, $inpage );
isAnimating = false;
}
function resetPage( $outpage, $inpage ) {
$outpage.attr( 'class', $outpage.data( 'originalClassList' ) );
$inpage.attr( 'class', $inpage.data( 'originalClassList' ) + ' pt-page-current' );
}
init();
return {
init : init,
nextPage : nextPage
};
})();
\ No newline at end of file
......@@ -48,7 +48,7 @@ function ajaxSendCode(ajaxUrl, self, phone, validate) {
myModal.modal('show');
break;
case 2002:
notice.html('<span>请输入有效的手机号</span>');
notice.html('<span>此手机号码尚未注册</span>');
myModal.modal('show');
self.bind('click', {ajaxUrl: ajaxUrl, validate: validate}, clickSendCode);
break;
......@@ -77,7 +77,7 @@ Date.prototype.Format = function (fmt) {
return fmt;
};
function scrollPullToRefresh(cb){
function scrollPullToRefresh(cb) {
var pullUpFlag = false;
var scroll = new IScroll('#wrapper', {
scrollbars: true,
......@@ -97,21 +97,21 @@ function scrollPullToRefresh(cb){
return scroll;
}
function ajax_get_house(url, loading, ajax_data, context){
function ajax_get_house(url, loading, ajax_data, context) {
loading.show();
$.ajax({
type: 'POST',
url: url + '/wp-admin/admin-ajax.php/',
data: ajax_data,
success:function(data){
success: function (data) {
loading.hide();
if (data.code == 2000) {
$.each(data.result, function (index, value) {
var houseType= value.house_type;
var houseType = value.house_type;
var template = $('#template_' + houseType).html();
if(data.tags)
if (data.tags)
var data_tags = data.tags[value.id];
if(data.images)
if (data.images)
var data_images = data.images[value.id];
var div = $('<div class="row">');
div.append(template);
......@@ -126,13 +126,17 @@ function ajax_get_house(url, loading, ajax_data, context){
div.find('[data-attr=community]').text(value.community_name);
div.find('[data-attr=apartment]').text(value.bp_literal);
div.find('[data-attr=covered_area]').text(value.covered_area + '平米');
div.find('[data-attr=price]').html('<em>' + value.total_price + '万</em>');
div.find('[data-attr=price]').html('<em>' + (value.total_price / 10000) + '万</em>');
} else if (houseType == 2) {
div.find('[data-attr=community]').text(value.community_name);
div.find('[data-attr=apartment]').text(value.bp_literal);
div.find('[data-attr=covered_area]').text(value.covered_area + '平米');
div.find('[data-attr=decoration]').text(value.decoration);
div.find('[data-attr=price]').html('<em>' + value.rent + '</em>/月');
var rent = value.rent;
if (rent.length > 4) {
rent = rent / 10000 + '万';
}
div.find('[data-attr=price]').html('<em>' + rent + '</em>/月');
}
var image = div.find('[data-attr=image]');
if (data_images) {
......@@ -145,7 +149,7 @@ function ajax_get_house(url, loading, ajax_data, context){
}
});
}
div.bind("tap",function(){
div.bind("tap", function () {
window.location.href = url + '/?page=detail&hid=' + value.id;
});
context.append(div);
......
<?php
$context = array();
$context['theme'] = get_template_directory_uri();
Timber::render('loan_calculator.html', $context);
?>
\ No newline at end of file
......@@ -33,9 +33,9 @@ if (is_user_logged_in()) {
if (!is_wp_error($user)) {
wp_redirect($const_my_page);
} else if ($user->get_error_code() == 'invalid_username') {
$context['error'] = '请输入有效的用户名';
$context['error'] = '此手机号码/帐号尚未注册';
} else if ($user->get_error_code() == 'incorrect_password') {
$context['error'] = '您输入的密码无效';
$context['error'] = '您输入的密码有误';
}
}
}
......
......@@ -13,10 +13,25 @@
<script type="text/javascript" src="{{ theme }}/js/jquery.mobile.custom.min.js"></script>
<script>
$(document).ready(function () {
var notice = $('#notice');
var myModal = $('#myModal');
var textarea = $('#content');
$('#submit').tap(function () {
var content = $('#content').val();
var content = textarea.val();
if (content.trim() == '') {
alert('请输入反馈内容');
notice.html('请输入反馈内容');
myModal.modal('show');
} else {
$.ajax({
type: 'POST',
url: '{{ url }}/wp-admin/admin-ajax.php/',
data: 'action=submit_comment&user_id={{ user_id }}&content=' + content,
success: function () {
textarea.val('');
notice.html('提交成功');
myModal.modal('show');
}
});
}
});
});
......@@ -31,5 +46,15 @@
<button type="button" class="btn btn-lg" id="submit">提交</button>
</div>
<div class="modal fade" id="myModal">
<div class="modal-dialog">
<div class="modal-content text-center">
<h4>提示</h4>
<p id="notice"></p>
<button type="button" class="btn btn-lg btn-block" data-dismiss="modal">确认</button>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
......@@ -33,7 +33,7 @@
<p>同策房屋</p>
</li>
<li class="col-xs-3">
<a href="{{ consultant_score_url }}" class="btn btn-block">评分</a>
<a class="btn btn-block" data-toggle="modal" data-target="#scoreDiv">评分</a>
</li>
</ul>
<h4>诚信宣言</h4>
......@@ -141,7 +141,22 @@
</li>
</ul>
</div>
<div class="modal fade" id="scoreDiv">
<div class="modal-dialog">
<div class="modal-content text-center">
<h4 class="modal-title">评分</h4>
<p>
<input type="hidden" id="score" name="score" value="0">
<input type="hidden" name="user_id" value="{{ user_id }}">
<input type="hidden" name="consultant_id" value="{{ consultant_id }}">
</p>
<p>
<button id="add_score" type="button" class="btn btn-lg">评分</button>
<button type="button" class="btn btn-lg" data-dismiss="modal">取消</button>
</p>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<script>
var houseType = 0;
var userId = '{{ consultant_id }}';
......@@ -149,12 +164,49 @@
var myScroll;
var template;
var loading;
var score = 0;
$(document).ready(function () {
$('#score').rating({
min: 0,
max: 5,
step: 0.5,
size: 'sm',
showClear: false,
showCaption: false,
hoverEnabled: false,
starCaptions: function (data) {
console.log(data);
score = data;
$(this).val(score);
}
});
$("#add_score").bind("tap", function () {
if (score > 0) {
$.ajax({
type: 'POST',
url: '{{ url }}/wp-admin/admin-ajax.php/',
data: 'action=add_score&user_id={{user_id}}&consultant_id={{consultant_id}}&score='+$("#score").val(),
success: function (data) {
if (data.code == 2000) {
alert('评分成功');
}else{
alert('您已经提交过评分了');
}
},
complete:function(){
$("#scoreDiv").modal('toggle');
}
});
} else {
alert('请选择后再评分');
}
});
var searchData = {
action: 'get_my_house',
action: 'search_house',
cityId: {{ consultant.cityId }},
houseType: houseType,
userType: 1,
userId: userId,
userId: {{ consultant_id }},
index: 0
};
var tabPane = $('[data-house=' + houseType + ']');
......
......@@ -16,6 +16,7 @@
<script type="text/javascript" src="{{ theme }}/js/jquery.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/jquery.mobile.custom.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/star-rating.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/bootstrap.min.js"></script>
<script type="text/javascript">
var myScroll;
var carouselScroll;
......@@ -44,6 +45,12 @@
$(document).ready(function(){
$("#slider").bind("tap",function(){
$("#carousel_wrapper").parent().show();
var carousel = $("#carousel_wrapper");
var carouselWidth = carousel.width();
carousel.find("#carousel_scroller ul li").css({"width":carouselWidth});
carousel.find("#carousel_indicator li").removeClass("carousel_active");
carousel.find("#carousel_indicator li:first").addClass("carousel_active");
carouselScroll = new IScroll('#carousel_wrapper', {
bounce: false,
scrollX: true,
......@@ -57,11 +64,6 @@
$("#carousel_indicator li").removeClass("carousel_active");
$("#carousel_indicator li").eq(this.currentPage.pageX).addClass("carousel_active");
});
var carousel = $("#carousel_wrapper");
var carouselWidth = carousel.width();
carousel.find("#carousel_scroller ul li").css({"width":carouselWidth});
carousel.find("#carousel_indicator li").removeClass("carousel_active");
carousel.find("#carousel_indicator li:first").addClass("carousel_active");
return false;
});
$("#carousel_wrapper").parent().bind("click",function(){
......@@ -84,6 +86,10 @@
});
});
$('#calculator').bind('tap',function(){
window.location.href = '{{ siteUrl }}/?page=loan_calculator';
});
$(".map").bind("tap",function(){
location.href = "{{ siteUrl }}/?page=map&a={{result.address}}&c={{cityName}}&hn={{result.community_name}}<br>{{result.address}}&p={{result.location}}";
});
......@@ -93,7 +99,6 @@
<body>
<p class="collect">
<i class="iconfont">&#xe604;</i>
</p>
<!-- 图片滚动 -->
......@@ -119,25 +124,19 @@
<p class="detail_title">{{result.name}}</p>
<ul class="list-unstyled">
<li class="col-xs-7 price">
均价:<span><em>{{(result.average_price/10000)|round(2, 'floor')}}万</em>/m<em>2</em></span>
均价:<span>
<em>
{% if result.average_price>=10000 %}
{{(result.average_price/10000)|round(2, 'floor')}}万
{% else %}
{{result.average_price}}元
{% endif %}
</em>/m<em>2</em></span>
</li>
<li class="col-xs-5">
<button type="button" class="btn btn-xs">房贷计算器</button>
<button type="button" class="btn btn-xs" id="calculator">房贷计算器</button>
</li>
</ul>
<!-- 二手房详细 -->
<!-- <ul class="list-unstyled">
<li class="col-xs-7">房源编号:CS0200000001</li>
<li class="col-xs-5">
<button type="button" class="btn btn-xs">房贷计算器</button>
</li>
<li class="col-xs-7 price">
均价:<span><em>20000元</em></span>
</li>
<li class="col-xs-5">单价:</li>
</ul> -->
<!-- 二手房详细 -->
</div>
<div class="detail_row">
<p class="detail_title">最新动态</p>
......@@ -152,7 +151,7 @@
<li>
<p><img src="{{siteUrl}}{{ item.path }}"></p>
<p>{{item.type}}</p>
<p>{{item.area}}</p>
<p>{{item.area}}/m<em>2</em></p>
</li>
{% endfor %}
</ul>
......@@ -167,12 +166,13 @@
<li>周边配套:{{result.periphery}}</li>
</ul>
<p class="map">
<span></span>
</p>
</div>
<div class="detail_row">
<a class="collapsed" data-toggle="collapse" href="#collapseExample"><p class="detail_title">基本信息<i class="iconfont pull-right"></i></p></a>
<ul class="list-unstyled collapse infoCont" id="collapseExample">
<a class="collapsed" data-toggle="collapse" href="#collapseExample">
<p class="detail_title">基本信息<span class="pull-right"></span></p>
</a>
<ul class="list-unstyled infoCont collapse" id="collapseExample">
<li>开发商:<span>{{result.developer}}</span></li>
<li>建筑类型:{{result.periphery}}</li>
<li>装修状况:{{result.decoration}}</li>
......
......@@ -89,6 +89,10 @@
location.href = "{{ siteUrl }}/?page=map&a={{result.address}}&c={{cityName}}&hn={{result.community_name}}<br>{{result.address}}&p={{result.location}}";
});
$('#calculator').bind('tap',function(){
window.location.href = '{{ siteUrl }}/?page=loan_calculator';
});
$(".col-xs-2").bind("tap",function(){
location.href = "{{siteUrl}}?page=consultant_info&consultant_id={{ consultant[0].id }}";
});
......@@ -135,18 +139,24 @@
<ul class="list-unstyled">
<li class="col-xs-7">房源编号:{{result.house_number}}</li>
<li class="col-xs-5">
<button type="button" class="btn btn-xs">房贷计算器</button>
<button type="button" class="btn btn-xs" id="calculator">房贷计算器</button>
</li>
<li class="col-xs-7 price">
售价:<span><em>{{(result.total_price/10000)|round(2, 'floor')}}万</em></span>
</li>
<li class="col-xs-5">单价:{{(result.average_price/10000)|round(2, 'floor')}}万</li>
<li class="col-xs-5">单价:
{% if result.average_price>=10000 %}
{{(result.average_price/10000)|round(2, 'floor')}}万
{% else %}
{{result.average_price}}元
{% endif %}
</li>
</ul>
<!-- 二手房详细 -->
</div>
<div class="detail_row">
<a class="collapsed" data-toggle="collapse" href="#collapseExample">
<p class="detail_title">基本信息<i class="iconfont pull-right"></i></p>
<p class="detail_title">基本信息<span class="pull-right"></span></p>
</a>
<ul class="list-unstyled collapse infoCont" id="collapseExample">
<li>户型:{{result.covered_area}}</li>
......
......@@ -23,14 +23,14 @@
<div id="city_wrapper" class="dropdown-menu">
<div id="city_scroller">
{% for item in select.city %}
<a href="{{ url }}?cityId={{item.id}}">{{item.value}}</a>
<a href="{{ url }}?houseType={{ houseType }}&cityId={{ item.id }}"{% if(item.id == cityId) %} class="active"{% endif %}>{{ item.value }}</a>
{% endfor %}
</div>
</div>
</div>
<div class="has-feedback pull-right">
<input type="text" class="form-control" placeholder="输入楼盘名/地段名搜索">
<span class="glyphicon glyphicon-search form-control-feedback"></span>
<input type="text" class="form-control" placeholder="输入楼盘名/地段名搜索" id="searchText">
<span class="glyphicon glyphicon-search form-control-feedback" id="searchBtn"></span>
</div>
</div>
......@@ -58,7 +58,7 @@
<a class="btn">价格<span></span></a>
<div id="price_wrapper" class="dropdown-menu">
{% if select.totalPrice %}
<div type="totalPrice" id="totalPrice_scroller">
<div type="totalPrice" id="totalPrice_scroller">
<a href="#">不限</a>
{% for item in select.totalPrice %}
<a data-id="{{item.value}}">{{item.value}}</a>
......@@ -66,7 +66,7 @@
</div>
{% endif %}
{% if select.rentalPrice %}
<div type="rentalPrice" id="rentalPrice_scroller">
<div type="rentalPrice" id="rentalPrice_scroller">
<a href="#">不限</a>
{% for item in select.rentalPrice %}
<a data-id="{{item.value}}">{{item.value}}</a>
......@@ -310,12 +310,20 @@
searchData[$(this).parent().attr("type")] = $(this).attr("data-id")!=undefined?$(this).attr("data-id"):-1;
if($(this).attr("data-action") != "open"){
//do somthing
$(this).parent().find('a').removeClass('active');
$(this).addClass('active');
$(".btn-group").removeClass("open");
scroller.html('');
ajax_get_house('{{ url }}', loading, searchData, scroller);
}
}
});
$('#searchBtn').bind('tap',function(){
searchData.index = 0;
searchData.searchText = $('#searchText').val();
scroller.html('');
ajax_get_house('{{ url }}', loading, searchData, scroller);
});
ajax_get_house('{{ url }}', loading, searchData, scroller);
});
var searchData = {
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=360, user-scalable=0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="format-detection" content="telephone=no"/>
<title>房贷计算器</title>
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/component.css"/>
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/animations.css"/>
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/loan_calculator.css">
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/loan_detail.css">
<script type="text/javascript" src="{{ theme }}/js/iscroll.js"></script>
<script type="text/javascript" src="{{ theme }}/js/jquery.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/modernizr.custom.js"></script>
<script type="text/javascript" src="{{ theme }}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/jquery.mobile.custom.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/gftools.js"></script>
</head>
<body>
<div id="pt-main" class="pt-perspective">
<div class="pt-page pt-page-1">
<ul id="tab" class="list-unstyled btn-group-justified tab">
<li class="btn-group active">
<a href="#commerce_loan" data-toggle="tab" class="btn">商业贷款</a>
</li>
<li class="btn-group">
<a href="#accumulationFund_loan" data-toggle="tab" class="btn">公积金贷款</a>
</li>
<li class="btn-group">
<a href="#combined_loan" data-toggle="tab" class="btn">组合贷款</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane fade in active" id="commerce_loan">
<ul class="list-unstyled">
<li>
<label class="col-xs-3">房价总额:</label>
<p class="col-xs-7">
<input type="number" class="form-control" data-id="fangjia_money">
</p>
<p class="col-xs-2">万元</p>
</li>
<li class="arrow">
<label class="col-xs-3">首付比例:</label>
<p class="col-xs-9">
<select class="form-control" data-id="first_payment">
<option value="3">3成</option>
<option value="4">4成</option>
<option value="5">5成</option>
<option value="6">6成</option>
<option value="7">7成</option>
<option value="8">8成</option>
<option value="9">9成</option>
</select>
</p>
</li>
<li>
<label class="col-xs-3">贷款金额:</label>
<p class="col-xs-7">
<input type="number" class="form-control" data-id="daikuan_money" readonly>
</p>
<p class="col-xs-2">万元</p>
</li>
<li class="arrow">
<label class="col-xs-3">按揭年数:</label>
<p class="col-xs-9">
<select class="form-control" data-id="year">
<option value="1">1年(12期)</option>
<option value="2">2年(24期)</option>
<option value="3">3年(36期)</option>
<option value="4">4年(48期)</option>
<option value="5">5年(60期)</option>
<option value="6">6年(72期)</option>
<option value="7">7年(84期)</option>
<option value="8">8年(96期)</option>
<option value="9">9年(108期)</option>
<option value="10">10年(120期)</option>
<option value="11">11年(132期)</option>
<option value="12">12年(144期)</option>
<option value="13">13年(156期)</option>
<option value="14">14年(168期)</option>
<option value="15">15年(180期)</option>
<option value="16">16年(192期)</option>
<option value="17">17年(204期)</option>
<option value="18">18年(216期)</option>
<option value="19">19年(228期)</option>
<option value="20" selected="selected">20年(240期)</option>
<option value="25">25年(300期)</option>
<option value="30">30年(360期)</option>
</select>
</p>
</li>
<li>
<label class="col-xs-3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;率:</label>
<p class="col-xs-7">
<input type="number" class="form-control" data-id="rate" value="5.4">
</p>
<p class="col-xs-2">%</p>
</li>
</ul>
<p class="text-right">商业贷款利率5.40%</p>
<input type="submit" value="开始计算" class="btn btn-lg">
</div>
<div class="tab-pane fade" id="accumulationFund_loan">
<ul class="list-unstyled">
<li>
<label class="col-xs-3">房价总额:</label>
<p class="col-xs-7">
<input type="number" class="form-control" data-id="fangjia_money">
</p>
<p class="col-xs-2">万元</p>
</li>
<li class="arrow">
<label class="col-xs-3">首付比例:</label>
<p class="col-xs-9">
<select class="form-control" data-id="first_payment">
<option value="3">3成</option>
<option value="4">4成</option>
<option value="5">5成</option>
<option value="6">6成</option>
<option value="7">7成</option>
<option value="8">8成</option>
<option value="9">9成</option>
</select>
</p>
</li>
<li>
<label class="col-xs-3">贷款金额:</label>
<p class="col-xs-7">
<input type="number" class="form-control" data-id="daikuan_money" readonly>
</p>
<p class="col-xs-2">万元</p>
</li>
<li class="arrow">
<label class="col-xs-3">按揭年数:</label>
<p class="col-xs-9">
<select class="form-control" data-id="year">
<option value="1">1年(12期)</option>
<option value="2">2年(24期)</option>
<option value="3">3年(36期)</option>
<option value="4">4年(48期)</option>
<option value="5">5年(60期)</option>
<option value="6">6年(72期)</option>
<option value="7">7年(84期)</option>
<option value="8">8年(96期)</option>
<option value="9">9年(108期)</option>
<option value="10">10年(120期)</option>
<option value="11">11年(132期)</option>
<option value="12">12年(144期)</option>
<option value="13">13年(156期)</option>
<option value="14">14年(168期)</option>
<option value="15">15年(180期)</option>
<option value="16">16年(192期)</option>
<option value="17">17年(204期)</option>
<option value="18">18年(216期)</option>
<option value="19">19年(228期)</option>
<option value="20" selected="selected">20年(240期)</option>
<option value="25">25年(300期)</option>
<option value="30">30年(360期)</option>
</select>
</p>
</li>
<li>
<label class="col-xs-3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;率:</label>
<p class="col-xs-7">
<input type="number" class="form-control" data-id="rate" value="3.5">
</p>
<p class="col-xs-2">%</p>
</li>
</ul>
<p class="text-right">公积金贷款利率3.50%</p>
<input type="submit" value="开始计算" class="btn btn-lg">
</div>
<div class="tab-pane fade" id="combined_loan">
<ul class="list-unstyled">
<li>
<label class="col-xs-3">房价总额:</label>
<p class="col-xs-7">
<input type="number" class="form-control" data-id="fangjia_money">
</p>
<p class="col-xs-2">万元</p>
</li>
<li class="arrow">
<label class="col-xs-3">首付比例:</label>
<p class="col-xs-8">
<select class="form-control" data-id="first_payment">
<option value="3">3成</option>
<option value="4">4成</option>
<option value="5">5成</option>
<option value="6">6成</option>
<option value="7">7成</option>
<option value="8">8成</option>
<option value="9">9成</option>
</select>
</p>
</li>
<li>
<label class="col-xs-5">公积金贷款金额:</label>
<p class="col-xs-5">
<input type="number" class="form-control" data-id="daikuan_money">
</p>
<p class="col-xs-2">万元</p>
</li>
<li class="arrow">
<label class="col-xs-5">公积金按揭年数:</label>
<p class="col-xs-6">
<select class="form-control" data-id="accumulationFund_year">
<option value="1">1年(12期)</option>
<option value="2">2年(24期)</option>
<option value="3">3年(36期)</option>
<option value="4">4年(48期)</option>
<option value="5">5年(60期)</option>
<option value="6">6年(72期)</option>
<option value="7">7年(84期)</option>
<option value="8">8年(96期)</option>
<option value="9">9年(108期)</option>
<option value="10">10年(120期)</option>
<option value="11">11年(132期)</option>
<option value="12">12年(144期)</option>
<option value="13">13年(156期)</option>
<option value="14">14年(168期)</option>
<option value="15">15年(180期)</option>
<option value="16">16年(192期)</option>
<option value="17">17年(204期)</option>
<option value="18">18年(216期)</option>
<option value="19">19年(228期)</option>
<option value="20" selected="selected">20年(240期)</option>
<option value="25">25年(300期)</option>
<option value="30">30年(360期)</option>
</select>
</p>
</li>
<li>
<label class="col-xs-5">商业贷款金额:</label>
<p class="col-xs-5">
<input type="number" class="form-control" data-id="commerce_money">
</p>
<p class="col-xs-2">万元</p>
</li>
<li class="arrow">
<label class="col-xs-3">按揭年数:</label>
<p class="col-xs-8">
<select class="form-control" data-id="commerce_year">
<option value="1">1年(12期)</option>
<option value="2">2年(24期)</option>
<option value="3">3年(36期)</option>
<option value="4">4年(48期)</option>
<option value="5">5年(60期)</option>
<option value="6">6年(72期)</option>
<option value="7">7年(84期)</option>
<option value="8">8年(96期)</option>
<option value="9">9年(108期)</option>
<option value="10">10年(120期)</option>
<option value="11">11年(132期)</option>
<option value="12">12年(144期)</option>
<option value="13">13年(156期)</option>
<option value="14">14年(168期)</option>
<option value="15">15年(180期)</option>
<option value="16">16年(192期)</option>
<option value="17">17年(204期)</option>
<option value="18">18年(216期)</option>
<option value="19">19年(228期)</option>
<option value="20" selected="selected">20年(240期)</option>
<option value="25">25年(300期)</option>
<option value="30">30年(360期)</option>
</select>
</p>
</li>
<li>
<label class="col-xs-3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;率:</label>
<p class="col-xs-7">
<input type="number" class="form-control" data-id="rate" value="5.4">
</p>
<p class="col-xs-2">%</p>
</li>
</ul>
<p class="text-right">公积金贷款利率3.50% 商业贷款利率5.40%</p>
<input type="submit" value="开始计算" class="btn btn-lg">
</div>
</div>
</div>
<div class="pt-page pt-page-2">
<div class="header">
<ul class="list-unstyled">
<li class="col-xs-7" id="money"></li>
<li class="col-xs-5" id="month"></li>
</ul>
<ul class="list-unstyled">
<li class="col-xs-4">还款方式</li>
<li class="col-xs-4">等额本息</li>
<li class="col-xs-4">等额本金</li>
<li class="col-xs-4">支付利息</li>
<li class="col-xs-4" id="acpi_interest"></li>
<li class="col-xs-4" id="ac_interest"></li>
</ul>
</div>
<div id="wrapper">
<div id="scroller">
<ul class="list-unstyled" id="result">
</ul>
</div>
</div>
</div>
</div>
<div class="modal fade" id="myModal">
<div class="modal-dialog">
<div class="modal-content text-center">
<h4>提示</h4>
<p id="notice"></p>
<button type="button" class="btn btn-lg btn-block" data-dismiss="modal">确认</button>
</div>
</div>
</div>
<script type="text/javascript" src="{{ theme }}/js/pagetransitions.js"></script>
<script>
var daikuan_money = 0;
var page = 0;
$(document).ready(function () {
var notice = $('#notice');
var myModal = $('#myModal');
$('[data-id=fangjia_money]').change(function () {
var fangjia_money = Number($(this).val().trim());
var tab = $(this).parents('.active');
var first_payment = Number(tab.find('[data-id=first_payment]').val());
daikuan_money = (fangjia_money * (1 - first_payment / 10)).toFixed(2);
tab.find('[data-id=daikuan_money]').val(daikuan_money);
});
$('[data-id=first_payment]').change(function () {
var first_payment = Number($(this).val());
var tab = $(this).parents('.active');
var fangjia_money = Number(tab.find('[data-id=fangjia_money]').val().trim());
daikuan_money = (fangjia_money * (1 - first_payment / 10)).toFixed(2);
tab.find('[data-id=daikuan_money]').val(daikuan_money);
});
$('input[type=submit]').tap(function () {
var tab = $(this).parents('.active');
var tabId = tab.attr('id');
var fangjia_money = Number(tab.find('[data-id=fangjia_money]').val().trim());
var year = Number(tab.find('[data-id=year]').val());
var rate = Number(tab.find('[data-id=rate]').val().trim());
if (fangjia_money == '') {
notice.html('请输入房价总额');
myModal.modal('show');
} else if (rate == '') {
notice.html('请输入利率');
myModal.modal('show');
} else {
var resultList = $('#result');
if (tabId == 'combined_loan') {
var accumulationFund_money = Number(tab.find('[data-id=daikuan_money]').val().trim());
var commerce_money = Number(tab.find('[data-id=commerce_money]').val().trim());
var accumulationFund_year = Number(tab.find('[data-id=accumulationFund_year]').val());
var commerce_year = Number(tab.find('[data-id=commerce_year]').val());
var accumulationFund_result = loan_calc(accumulationFund_money, accumulationFund_year, 3.5);
var commerce_result = loan_calc(commerce_money, commerce_year, rate);
console.log(accumulationFund_result);
console.log(commerce_result);
$('#money').text('贷款总额:' + (accumulationFund_money + commerce_money).toFixed(2) + '万元');
$('#acpi_interest').text(Math.round(accumulationFund_result.acpi.interest + commerce_result.acpi.interest));
$('#ac_interest').text(Math.round(accumulationFund_result.ac.interest + commerce_result.ac.interest));
//公积金按揭年数 >
if (accumulationFund_result.loan_period >= commerce_result.loan_period) {
$('#month').text('贷款月数:' + result.loan_period);
$.each(accumulationFund_result.ac.monthlyPayment, function (index, value) {
var payment = commerce_result.ac.monthlyPayment[index];
var commerce_monthlyPayment = commerce_result.acpi.monthlyPayment;
if (!payment) {
payment = 0;
commerce_monthlyPayment = 0;
}
resultList.append('<li><p class="col-xs-4">' + (index + 1) + '</p>' +
'<p class="col-xs-4">' + Math.round(accumulationFund_result.acpi.monthlyPayment + commerce_monthlyPayment) + '</p>' +
'<p class="col-xs-4">' + Math.round(value + payment) + '</p></li>');
});
} else {
$.each(commerce_result.ac.monthlyPayment, function (index, value) {
var payment = accumulationFund_result.ac.monthlyPayment[index];
var accumulationFund_monthlyPayment = accumulationFund_result.acpi.monthlyPayment;
if (!payment) {
payment = 0;
accumulationFund_monthlyPayment = 0;
}
resultList.append('<li><p class="col-xs-4">' + (index + 1) + '</p>' +
'<p class="col-xs-4">' + Math.round(accumulationFund_monthlyPayment + commerce_result.acpi.monthlyPayment) + '</p>' +
'<p class="col-xs-4">' + Math.round(value + payment) + '</p></li>');
});
}
} else {
var result = loan_calc(daikuan_money, year, rate);
$('#money').text('贷款总额:' + result.loan_ceiling + '万元');
$('#month').text('贷款月数:' + result.loan_period);
var acpi = result.acpi;
var ac = result.ac;
$('#acpi_interest').text(Math.round(acpi.interest));
$('#ac_interest').text(Math.round(ac.interest));
$.each(ac.monthlyPayment, function (index, value) {
resultList.append('<li><p class="col-xs-4">' + (index + 1) + '</p>' +
'<p class="col-xs-4">' + Math.round(acpi.monthlyPayment) + '</p>' +
'<p class="col-xs-4">' + Math.round(value) + '</p></li>');
});
}
var scroll = new IScroll('#wrapper', {
scrollbars: true,
click: true
});
page = 1;
window.location.href = '#result';
PageTransitions.nextPage({
animation: 1,
showPage: page
});
}
return false;
});
window.addEventListener("popstate", function(e) {
if (window.location.hash == '' && page == 1) {
console.log(page);
page = 0;
PageTransitions.nextPage({
animation: 2,
showPage: page
});
}else if(page == 0){
window.history.back();
}
});
});
</script>
</body>
</html>
\ No newline at end of file
......@@ -112,7 +112,7 @@
var loading;
$(document).ready(function () {
var searchData = {
action: 'get_my_house',
action: 'search_house',
houseType: houseType,
userType: 0,
userId: userId,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment