Commit a7637b4a by shz

Merge branch 'dev' into shz

Conflicts:
	.htaccess
	wp-content/plugins/tospur/Admin/House.php
	wp-content/plugins/tospur/Admin/feature.php
	wp-content/plugins/tospur/Admin/newHouseList.php
	wp-content/plugins/tospur/Admin/rentHouse.php
	wp-content/plugins/tospur/Admin/rentHouseList.php
	wp-content/plugins/tospur/Admin/secHandHouse.php
	wp-content/plugins/tospur/Admin/secHandHouseList.php
	wp-content/plugins/tospur/Admin/views/add_feature.html
	wp-content/plugins/tospur/Admin/views/feature_list.html
	wp-content/plugins/tospur/Admin/views/newHouseList.html
	wp-content/plugins/tospur/Admin/views/newhouse.html
	wp-content/plugins/tospur/Admin/views/rentHouse.html
	wp-content/plugins/tospur/Admin/views/rentHouseList.html
	wp-content/plugins/tospur/Admin/views/secHandHouse.html
	wp-content/plugins/tospur/Admin/views/secHandHouseList.html
	wp-content/plugins/tospur/Dao/InsertDao.php
	wp-content/plugins/tospur/Dao/SearchDao.php
	wp-content/plugins/tospur/Tools/Core.php
	wp-content/plugins/tospur/Tools/Image.php
	wp-content/plugins/tospur/consultant_score.php
	wp-content/plugins/tospur/handle_view_house.php
	wp-content/plugins/tospur/index.php
	wp-content/plugins/tospur/view_house.php
	wp-content/themes/tospur/const.php
	wp-content/themes/tospur/consultant_info.php
	wp-content/themes/tospur/consultant_list.php
	wp-content/themes/tospur/css/consultantShop.css
	wp-content/themes/tospur/css/detail.css
	wp-content/themes/tospur/dao.php
	wp-content/themes/tospur/detail.php
	wp-content/themes/tospur/functions.php
	wp-content/themes/tospur/img/formBg.jpg
	wp-content/themes/tospur/img/logo.png
	wp-content/themes/tospur/js/gftools.js
	wp-content/themes/tospur/list.php
	wp-content/themes/tospur/loan_calculator.php
	wp-content/themes/tospur/map.php
	wp-content/themes/tospur/my.php
	wp-content/themes/tospur/view.php
	wp-content/themes/tospur/views/comment.html
	wp-content/themes/tospur/views/consultant_info.html
	wp-content/themes/tospur/views/consultant_list.html
	wp-content/themes/tospur/views/detail.html
	wp-content/themes/tospur/views/detailOther.html
	wp-content/themes/tospur/views/list.html
	wp-content/themes/tospur/views/loan_calculator.html
	wp-content/themes/tospur/views/map.html
	wp-content/themes/tospur/views/myHouse.html
	wp-content/themes/tospur/views/register.html
	wp-content/themes/tospur/views/view.html
parents 965b462c dbfa0351
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /tospur/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /tospur/index.php [L]
</IfModule>
# END WordPress
......@@ -3,7 +3,8 @@ require_once(PLUGIN_DIR . 'Dao/SearchDao.php');
require_once(PLUGIN_DIR . 'Dao/InsertDao.php');
require_once(PLUGIN_DIR . 'Tools/Image.php');
require_once(PLUGIN_DIR . 'Tools/Core.php');
class House {
require_once(PLUGIN_DIR . 'Admin/Tospur_House.php');
class House extends Tospur_House{
public static function init_view(){
wp_enqueue_script('jquery-ui');
wp_enqueue_script('bootstrapjs');
......@@ -47,7 +48,7 @@ class House {
$result = House::data_update($_POST['houseId'],$insert_tospur_house_array);
if($result != 203){
$wpdb->query("ROLLBACK");
print_r($wpdb->last_error);;
print_r($result);
echo "新房房源修改失败";
}else{
$wpdb->query("COMMIT");
......@@ -55,9 +56,10 @@ class House {
}
}else{
$result = House::data_insert($insert_tospur_house_array);
print_r($result);
if($result != 200){
$wpdb->query("ROLLBACK");
print_r($wpdb->last_error);;
print_r($result);;
echo "新增房源失败";
}else{
$wpdb->query("COMMIT");
......@@ -166,11 +168,4 @@ class House {
return 200;
}
public static function getCurrentRole(){
$current_user = wp_get_current_user();
if ( !($current_user instanceof WP_User) )
return;
$roles = $current_user->roles;
return $roles[0];
}
}
\ No newline at end of file
<?php
class Tospur_House{
public static function getCurrentRole(){
$current_user = wp_get_current_user();
if ( !($current_user instanceof WP_User) )
return;
$roles = $current_user->roles;
return $roles[0];
}
}
\ No newline at end of file
......@@ -260,24 +260,27 @@ add_action( 'wp_ajax_nopriv_updateList', 'newHouseList::prepare_items');
add_action( 'wp_ajax_searchListCity', 'SearchDao::ajax_searchListCity');
add_action( 'wp_ajax_nopriv_searchListCity', 'SearchDao::ajax_searchListCity');
function newHouseList()
function function_newHouseList()
{
$contest = array();
$contest['page'] = $_REQUEST['page'];
$contest['city'] = SearchDao::searchCity();
$contest['status'] = SearchDao::searchStatusType(1);
$contest['buildProperty'] = SearchDao::searchBuildProperty();
$contest['room'] = searchDao::searchRoom();
if(isset($_POST['hasSearch'])){
$bpRes = SearchDao::searchBuildProperty();
foreach($bpRes as $val){
if($val->id == $_POST['buildProperty']){
$contest['buildProperty'] = $val->value;
$contest['buildPropertyId'] = $val->id;
}
}
$contest['options']= SearchDao::searchForCDP($_POST['listCity'],$_POST['listDistrict'],$_POST['listPlate']);
$contest['district'] = SearchDao::searchCity($_POST['listCity']);
$contest['plate'] = SearchDao::searchCity($_POST['listCity'],$_POST['listDistrict']);
$contest['dicTotalPrice'] = searchDao::searchTotalPrice($_POST['listCity']);
$contest['dicArea'] = searchDao::searchArea($_POST['listCity']);
$contest['cityId'] = $_POST['listCity'];
$contest['districtId'] = $_POST['listDistrict'];
$contest['plateId' ]= $_POST['listPlate'];
$contest['roomId']= $_POST['room'];
$contest['buildPropertyId']= $_POST['buildProperty'];
$contest['totalPrice'] = $_POST['totalPrice'];
$contest['acreage'] = $_POST['acreage'];
$contest['characteristic'] = $_POST['characteristic'];
$contest['status'] = SearchDao::searchStatus(1,$_POST['status']);
$contest['hasSearch'] = $_POST['hasSearch'];
$contest['statusId'] = $_POST['status'];
}
Timber::render("newHouseList.html",$contest);
}
......
......@@ -2,7 +2,7 @@
require_once(PLUGIN_DIR . 'Dao/SearchDao.php');
require_once(PLUGIN_DIR . 'Dao/InsertDao.php');
require_once(PLUGIN_DIR . 'Tools/Image.php');
class RentHouse{
class RentHouse extends Tospur_House{
//二手房信息
public static function rentHouse_html(){
wp_enqueue_script('bootstrapjs');
......@@ -44,7 +44,7 @@ class RentHouse{
$result = RentHouse::data_update($_POST['houseId'],$insert_tospur_house_array);
if($result != 202){
$wpdb->query("ROLLBACK");
print_r($wpdb->last_error);;
print_r($result);;
echo "租房房源修改失败";
}else{
$wpdb->query("COMMIT");
......@@ -55,7 +55,7 @@ class RentHouse{
$result = RentHouse::rentHouseData_insert($insert_tospur_house_array);
if ($result != 200) {
$wpdb->query("ROLLBACK");
print_r($wpdb->last_error);;
print_r($result);;
echo "租房房源新增失败";
} else {
$wpdb->query("COMMIT");
......@@ -139,12 +139,5 @@ class RentHouse{
InsertDao::addHouseTag($_POST['mark'],$houseId);
return $result;
}
public static function getCurrentRole(){
$current_user = wp_get_current_user();
if ( !($current_user instanceof WP_User) )
return;
$roles = $current_user->roles;
return $roles[0];
}
}
......@@ -31,18 +31,10 @@ class rentHouseList extends WP_List_Table
case 'decoration':
case 'age':
case 'matching_facilities':
case 'flat':
case 'suite':
case 'user_id':
case 'status':
$handle = $item['name'];
if ($handle == 0) {
return '<a href="' . admin_url() . 'admin.php?page=rentHouse&edit=true&id=' . $item['id'] . '">' . $item[$column_name] . '</a>';
} else {
return $item[$column_name];
}
default:
return print_r($item, true); //Show the whole array for troubleshooting purposes
return '<a href="' . admin_url() . 'admin.php?page=rentHouse&edit=true&id=' . $item['id'] . '">' . $item[$column_name] . '</a>';
}
}
......@@ -75,8 +67,6 @@ class rentHouseList extends WP_List_Table
$columns['decoration']= '装修状况';
$columns['age']= '年代';
$columns['matching_facilities']= '配套设施';
$columns['flat']= '楼号';
$columns['suite']= '室';
$columns['user_id']= '置业顾问';
$columns['status']= '状态';
return $columns;
......@@ -96,8 +86,6 @@ class rentHouseList extends WP_List_Table
'decoration' => array('decoration', false),
'age' => array('age', false),
'matching_facilities' => array('matching_facilities', false),
'flat' => array('flat', false),
'suite' => array('suite', false),
'user_id' => array('user_id', false),
'status' => array('status', false)
);
......@@ -198,10 +186,10 @@ class rentHouseList extends WP_List_Table
);
$sql = "select * from tospur_house th
left join(select user_id as aus_id,house_id from a_house_user) ahu on th.id = ahu.house_id
left join(select user_id as aus_id,house_id,user_type from a_house_user) ahu on th.id = ahu.house_id
left join(select id as consul_id,name as consul_name from tospur_consultant) tc on ahu.aus_id = tc.consul_id
left join(select value,literal from dic_buildproperty) db on th.buildproperty_id = db.value
where 1=1 and house_type=2";
where 1=1 and house_type=2 and ahu.user_type=1";
if($_POST["listCity"]!=0 ){
$sql = $sql." and city_id=".$_POST["listCity"];
}
......@@ -240,8 +228,6 @@ class rentHouseList extends WP_List_Table
'decoration' => $value->decoration,
'age' => $value->age,
'matching_facilities'=> $value->matching_facilities,
'flat' => $value->flat,
'suite' => $value->suite,
'user_id' => $value->consul_name,
);
......@@ -290,25 +276,25 @@ add_action( 'wp_ajax_nopriv_updateList', 'newHouseList::prepare_items');
add_action( 'wp_ajax_searchListCity', 'SearchDao::ajax_searchListCity');
add_action( 'wp_ajax_nopriv_searchListCity', 'SearchDao::ajax_searchListCity');
function rentHouseList()
function function_rentHouseList()
{
$contest = array();
$contest['page'] = $_REQUEST['page'];
$contest['city'] = SearchDao::searchCity();
$contest['status'] = SearchDao::searchStatusType(2);
$contest['buildProperty'] = SearchDao::searchBuildProperty();
if(isset($_POST['hasSearch'])){
$bpRes = SearchDao::searchBuildProperty();
foreach($bpRes as $val){
if($val->id == $_POST['buildProperty']){
$contest['buildProperty'] = $val->value;
$contest['buildPropertyId'] = $val->id;
}
}
$contest['options']= SearchDao::searchForCDP($_POST['listCity'],$_POST['listDistrict'],$_POST['listPlate']);
$contest['district'] = SearchDao::searchCity($_POST['listCity']);
$contest['plate'] = SearchDao::searchCity($_POST['listCity'],$_POST['listDistrict']);
$contest['dicTotalPrice'] = searchDao::searchTotalPrice($_POST['listCity']);
$contest['dicArea'] = searchDao::searchArea($_POST['listCity']);
$contest['cityId'] = $_POST['listCity'];
$contest['districtId'] = $_POST['listDistrict'];
$contest['plateId' ]= $_POST['listPlate'];
$contest['buildPropertyId']= $_POST['buildProperty'];
$contest['totalPrice'] = $_POST['totalPrice'];
$contest['acreage'] = $_POST['acreage'];
$contest['characteristic'] = $_POST['characteristic'];
$contest['status'] = SearchDao::searchStatus(2,$_POST['status']);
$contest['hasSearch'] = $_POST['hasSearch'];
$contest['statusId'] = $_POST['status'];
}
Timber::render("rentHouseList.html",$contest);
}
......
......@@ -2,7 +2,7 @@
require_once(PLUGIN_DIR . 'Dao/SearchDao.php');
require_once(PLUGIN_DIR . 'Dao/InsertDao.php');
require_once(PLUGIN_DIR . 'Tools/Image.php');
class SecHandHouse{
class SecHandHouse extends Tospur_House{
//二手房信息
public static function secHandHouse_html(){
wp_enqueue_script('bootstrapjs');
......@@ -43,7 +43,7 @@ class SecHandHouse{
$result = SecHandHouse::data_update($_POST['houseId'],$insert_tospur_house_array);
if($result != 201){
$wpdb->query("ROLLBACK");
print_r($wpdb->last_error);;
print_r( $result);;
echo "二手房房源修改失败";
}else{
$wpdb->query("COMMIT");
......@@ -54,7 +54,7 @@ class SecHandHouse{
$result = SecHandHouse::secHouseData_insert($insert_tospur_house_array);
if ($result != 200) {
$wpdb->query("ROLLBACK");
print_r($wpdb->last_error);;
print_r( $result);;
echo "二手房房源新增失败";
} else {
$wpdb->query("COMMIT");
......@@ -68,6 +68,7 @@ class SecHandHouse{
$context["district"] = SearchDao::searchCity($context['result']->city_id);
$context["plate"] = SearchDao::searchCity($context['result']->city_id,$context['result']->district_id);
$context["mark"] = SearchDao::searchHouseTag($_GET['id']);
$context["featureOld"] = SearchDao::searchFeatureByHouse($_GET['id']);
}
$context['role'] = SecHandHouse::getCurrentRole();
$context["city"] = SearchDao::searchCity();
......@@ -75,6 +76,7 @@ class SecHandHouse{
$context["room"] = SearchDao::searchRoom();
$context["photoType"] = SearchDao::searchPhotoType();
$context["status"] = searchDao::searchStatusType(2);
$context["feature"] = searchDao::searchFeature();
Timber::render("secHandHouse.html",$context);
}
......@@ -98,7 +100,12 @@ class SecHandHouse{
InsertDao::addRecConsultant($houseId,$data);
if(isset($_POST['mark'])&&$_POST['mark']!=""){
InsertDao::addHouseTag($_POST['mark'],$houseId);
}
InsertDao::addHouseFeature($houseId,$data);
}else{
return 507;
......@@ -137,16 +144,20 @@ class SecHandHouse{
$wpdb->delete(Config::A_HOUSE_USER_TABLE,array("house_id" => $houseId));
InsertDao::addRecConsultant($houseId,$data);
// $wpdb->delete(Config::A_HOUSE_TAG_TABLE,array("house_id" => $houseId));
$wpdb->query(
$wpdb->prepare(
"DELETE FROM a_house_tag
WHERE tag_id in(select tag_id from (select tag_id,tt.type from a_house_tag as aht
left JOIN tospur_tag tt on aht.tag_id = tt.id) as a
where house_id = %d and a.type = 1);", $houseId)
);
InsertDao::addHouseFeature($houseId,$data);
if(isset($_POST['mark'])&&$_POST['mark']!="") {
InsertDao::addHouseTag($_POST['mark'],$houseId);
return $result;
}
public static function getCurrentRole(){
$current_user = wp_get_current_user();
if ( !($current_user instanceof WP_User) )
return;
$roles = $current_user->roles;
return $roles[0];
return $result;
}
}
......
......@@ -23,14 +23,13 @@ class secHandHouseList extends WP_List_Table
case 'name':
case 'community_name':
case 'total_price':
case 'average_price':
case 'buildproperty_id':
case 'covered_area':
case 'floor':
case 'faceto':
case 'decoration':
case 'age':
case 'flat':
case 'suite':
case 'user_id':
case 'status':
default:
......@@ -60,14 +59,13 @@ class secHandHouseList extends WP_List_Table
$columns['name']= '二手房标题';
$columns['community_name']= '小区名称';
$columns['total_price']= '总价';
$columns['average_price']='单价';
$columns['buildproperty_id']= '户型';
$columns['covered_area']= '面积';
$columns['floor']= '楼层';
$columns['faceto']= '朝向';
$columns['decoration']= '装修状况';
$columns['age']= '年代';
$columns['flat']= '楼号';
$columns['suite']= '室';
$columns['user_id']= '置业顾问';
$columns['status']= '状态';
return $columns;
......@@ -80,14 +78,13 @@ class secHandHouseList extends WP_List_Table
'name' => array('name', false),
'community_name' => array('community_name', false),
'total_price' => array('total_price', false),
'average_price' => array('average_price', false),
'buildproperty_id' => array('buildproperty_id', false),
'covered_area' => array('covered_area', false),
'floor' => array('floor', false),
'faceto' => array('faceto', false),
'decoration' => array('decoration', false),
'age' => array('age', false),
'flat' => array('flat', false),
'suite' => array('suite', false),
'user_id' => array('user_id', false),
'status' => array('status', false)
);
......@@ -159,7 +156,6 @@ class secHandHouseList extends WP_List_Table
break;
}
global $wpdb;
print_r('update tospur_house SET status='.$status .' where id in ' . $string);
$result = $wpdb->query('update tospur_house SET status='.$status .' where id in ' . $string);
}
}
......@@ -181,10 +177,10 @@ class secHandHouseList extends WP_List_Table
//$data = $this->example_data;
$sql = "select * from tospur_house th
left join(select user_id as aus_id,house_id from a_house_user) ahu on th.id = ahu.house_id
left join(select user_id as aus_id,house_id,user_type from a_house_user) ahu on th.id = ahu.house_id
left join(select id as consul_id,name as consul_name from tospur_consultant) tc on ahu.aus_id = tc.consul_id
left join(select value,literal from dic_buildproperty) db on th.buildproperty_id = db.value
where 1=1 and house_type=1";
where 1=1 and house_type=1 and ahu.user_type=1";
if($_POST["listCity"]!=0 ){
$sql = $sql." and city_id=".$_POST["listCity"];
}
......@@ -220,14 +216,13 @@ class secHandHouseList extends WP_List_Table
'name' => $value->name,
'community_name' => $value->community_name,
'total_price' => $value->total_price,
'average_price'=> $value->average_price,
'buildproperty_id' => $value->literal,
'covered_area' => $value->covered_area,
'floor' => $value->floor,
'faceto' => $value->faceto,
'decoration' => $value->decoration,
'age' => $value->age,
'flat' => $value->flat,
'suite' => $value->suite,
'user_id' => $value->consul_name,
);
if($value->status == 0){
......@@ -273,25 +268,25 @@ class secHandHouseList extends WP_List_Table
add_action( 'wp_ajax_updateList', 'newHouseList::prepare_items');
add_action( 'wp_ajax_nopriv_updateList', 'newHouseList::prepare_items');
function secHandHouseList()
function function_secHandHouseList()
{
$contest = array();
$contest['page'] = $_REQUEST['page'];
$contest['city'] = SearchDao::searchCity();
$contest['status'] = SearchDao::searchStatusType(2);
$contest['buildProperty'] = SearchDao::searchBuildProperty();
if(isset($_POST['hasSearch'])){
$bpRes = SearchDao::searchBuildProperty();
foreach($bpRes as $val){
if($val->id == $_POST['buildProperty']){
$contest['buildProperty'] = $val->value;
$contest['buildPropertyId'] = $val->id;
}
}
$contest['options']= SearchDao::searchForCDP($_POST['listCity'],$_POST['listDistrict'],$_POST['listPlate']);
$contest['district'] = SearchDao::searchCity($_POST['listCity']);
$contest['plate'] = SearchDao::searchCity($_POST['listCity'],$_POST['listDistrict']);
$contest['dicTotalPrice'] = searchDao::searchTotalPrice($_POST['listCity']);
$contest['dicArea'] = searchDao::searchArea($_POST['listCity']);
$contest['cityId'] = $_POST['listCity'];
$contest['districtId'] = $_POST['listDistrict'];
$contest['plateId' ]= $_POST['listPlate'];
$contest['buildPropertyId']= $_POST['buildProperty'];
$contest['totalPrice'] = $_POST['totalPrice'];
$contest['acreage'] = $_POST['acreage'];
$contest['totalPrice'] = $_POST['totalPrice'];
$contest['characteristic'] = $_POST['characteristic'];
$contest['status'] = SearchDao::searchStatus(2,$_POST['status']);
$contest['hasSearch'] = $_POST['hasSearch'];
$contest['statusId'] = $_POST['status'];
}
Timber::render("secHandHouseList.html",$contest);
}
......
<h2>添加特色</h2>
<label for="feature">特色:</label>
<input id="feature" type="text">
<input type="submit" id="submit" class="button">
<script>
(function ($) {
$(document).ready(function () {
$('#submit').click(function () {
var name = $('#feature').val();
if (name.trim() != '') {
$.ajax({
type: 'POST',
url: '{{ url }}/wp-admin/admin-ajax.php/',
data: 'action=add_feature&name=' + name,
success: function (data) {
if (data) {
alert('添加成功');
} else {
alert('添加失败');
}
}
});
} else {
alert('请输入特色');
}
});
});
})(jQuery);
</script>
\ No newline at end of file
......@@ -3,62 +3,64 @@
<form id="scores-filter" method="POST">
<!-- For plugins, we also need to ensure that the form posts back to our current page -->
<input type="hidden" name="page" value="{{page}}"/>
<input type="hidden" name="hasSearch" value="1"/>
<select id="listCity" name="listCity">
{% if hasSearch and options.cityName %}
<option value="{{options.cityId}}"> {{options.cityName}}</option>
{% else %}
<option value="0"> 城市</option>
{% endif %}
{% for item in city %}
<option {{ item.id == cityId ?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<select id="listDistrict" name="listDistrict">
{% if hasSearch and options.districtName %}
<option value="{{options.districtId}}"> {{options.districtName}}</option>
{% else %}
<option value="0">区域</option>
{% if district %}
{% for item in district %}
<option {{ item.id == districtId ?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
{% endif %}
</select>
<select id="listPlate" name="listPlate">
{% if hasSearch and options.districtName and options.plateName %}
<option value="{{options.plateId}}">{{options.plateName}}</option>
{% else %}
<option value="0">板块</option>
{% if plate %}
{% for item in plate %}
<option {{ item.id == plateId ?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
{% endif %}
</select>
<select id="totalPrice" name="totalPrice">
{% if hasSearch and totalPrice %}
<option value="{{totalPrice}}"> {{totalPrice}}</option>
{% else %}
<option value ="">价格</option>
{% if dicTotalPrice %}
{% for item in dicTotalPrice %}
<option {{ item.value == totalPrice ?"selected":"" }} value="{{ item.value }}">{{ item.value }}</option>
{% endfor %}
{% endif %}
</select>
<select id="room" name="room">
<option value="0">类型</option>
{% for item in room %}
<option {{ item.id == roomId ?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<select id="buildProperty" name="buildProperty">
{% if hasSearch and buildProperty %}
<option value="{{buildPropertyId}}"> {{buildProperty}}</option>
{% else %}
<option value="0"> 房型</option>
{% endif %}
{% for item in buildProperty %}
<option {{ item.id == buildPropertyId ?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<select id="acreage" name="acreage">
{% if hasSearch and acreage %}
<option value="{{acreage}}"> {{acreage}}</option>
{% else %}
<option value ="">面积</option>
{% if acreage %}
{% for item in dicArea %}
<option {{ item.value == acreage ?"selected":"" }} value="{{ item.value }}">{{ item.value }}</option>
{% endfor %}
{% 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>
{% for item in status%}
<option {{ item.id == statusId ?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<input type="text" placeholder="请出入楼盘名" name="searchText">
<input type="hidden" name="hasSearch" value="1"/>
<input type="submit" id="submit" class="button action" value="搜索">
<!-- Now we can render the completed list table -->
{{function("addNewHouseTable")}}
......@@ -67,38 +69,6 @@
<script>
(function ($) {
$(document).ready(function(){
//获取城市信息AJAX
var listCity = $("#listCity");
var room = $("#room");
var buildProperty =$("#buildProperty");
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=serachCity",
success:function(data){
addOption(data,listCity)
}
})
//获取类型信息AJAX
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchRoom",
success:function(data){
addOption(data,room)
}
})
//获取房型信息AJAX
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchBuildProperty",
success:function(data){
addOption(data,buildProperty)
}
})
$("#listCity").change(function(){
var listCityId = $("#listCity").val();
var district =$("#listDistrict");
......@@ -106,6 +76,8 @@
var totalPrice = $("#totalPrice");
$('#listDistrict').find('option:not(:first-child)').remove();
$('#listPlate').find('option:not(:first-child)').remove();
$('#acreage').find('option:not(:first-child)').remove();
$('#totalPrice').find('option:not(:first-child)').remove();
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
......@@ -132,7 +104,7 @@
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchUnitPriceRange&cityId="+listCityId,
data: "action=searchTotalPrice&cityId="+listCityId,
success:function(json){
for(var i = 0; i <=json.length-1; i++){
var id = json[i]["id"];
......
......@@ -34,13 +34,13 @@
<th><label for="from">所属地区</label></th>
<td>
<select id="baseCity" name="baseCity">
<option value=""> 城市</option>
<option value="-1"> 城市</option>
{% for item in city %}
<option {{ item.id == result.city_id?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<select id="baseAreaId" name="baseAreaId">
<option value = "">区域</option>
<option value = "-1">区域</option>
{% if district %}
{% for item in district %}
<option {{ item.id == result.district_id?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
......@@ -48,7 +48,7 @@
{% endif %}
</select>
<select id="basePlateId" name="basePlateId">
<option value = "">板块</option>
<option value = "-1">板块</option>
{% if district %}
{% for item in plate %}
<option {{ item.id == result.plate_id?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
......@@ -184,6 +184,7 @@
{% endif %}
{% set exists_photo_ids = exists_photo_ids~item.image_id %}
<p>
<input type="radio" name="frontCover" value="{{item.image_id}}" {{ result.frontCover_id == item.image_id?"checked":"" }} />
<select name="exists_photo[{{ item.image_id }}][type]">
{% for i in photoType %}
<option {{ i.id == item.image_type?"selected":"" }} value="{{ i.id }}">{{ i.value }}</option>
......@@ -240,7 +241,7 @@
<td>
<select id="status" name="status">
{% for item in status %}
<option value={{item.status_id}}>{{item.status_name}}</option>
<option value={{item.id}}>{{item.value}}</option>
{% endfor %}
</select>
</td>
......@@ -385,6 +386,7 @@
var cityName = $("#baseCity").find("option:selected").text();
var option = $("<option>").attr("value",cityId).append(cityName);
$("#cityId").append(option);
if(cityId != -1){
var area = $("#areaId");
$.ajax({
type: "GET",
......@@ -413,23 +415,8 @@
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);
addList(0);
}
}
});
});
//区域联动板块
......@@ -451,30 +438,7 @@
//推荐房源下显示图片信息以及房名
$("#areaId,#plateId,#buildProperty,#room,#acreage,#price").change(function(){
$("#houseList").find("li").remove();
var buildPropertyId = $("#buildProperty").val();
var room = $("#room").val();
var areaId = $("#areaId").val();
var cityId = $("#cityId").val();
var plateId = $("#plateId").val();
var acreage = $("#acreage").val();
var price = $("#price").val();
$.ajax({
type: "post",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&cityId="+cityId+"&districtId="+areaId+"&plateId="+plateId+"&buildPropertyId="+buildPropertyId+"&roomId="+room+"&acreage="+acreage+"&totalPrice="+price+"&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);
}
}
});
addList(0);
});
//添加房源中搜索框的搜索
......@@ -567,13 +531,14 @@
//新增房源相册
$("#housePicture").click(function(){
var picDelet = $("<font>").append("删除").addClass("picDelet");
var checkBox = $("<input>").attr({"type":"radio","name":"frontCover","value":i});
var picDelet = $("<input>").attr({"type":"button","value":"删除"}).addClass("picDelet");
var file = $("<input>").attr({"type":"file","name":"files["+i+"]"}).addClass("picFiles");
var select = $("<select>").attr("name","data["+i+"][type]");
{% for item in photoType %}
select.append($("<option>").attr("value",{{item.id}}).append('{{item.value}}'));
{% endfor%}
var p = $("<p>").append(select).append(file).append(picDelet);
var p = $("<p>").append(checkBox).append(select).append(file).append(picDelet);
$("#picList").append(p);
i++
});
......@@ -588,7 +553,9 @@
$("#houseImg,#consultantImg,#picList").on("click",".imgCancel,.consultantCancel,.picDelet",function(){
$(this).parent("p").remove();
});
$("#preview,#picList,#houseImg,#consultantImg").on("click",".existsCancel",function(){
$(this).parent().remove();
});
$("#submit").click(function(){
if($("#housename").val()==""){
......@@ -651,9 +618,54 @@
}
}
$("#preview,#picList,#houseImg,#consultantImg").on("click",".existsCancel",function(){
$(this).parent().remove();
function getUrlParmas(){
var href = location.search.substr(1,location.search.length-1);
var params = href.split("&");
var map = {};
for(item in params){
var key = params[item].split("=")[0] || "";
var value = params[item].split("=")[1] || "";
map[key] = value;
}
return map;
}
function addList($houseType){
$("#houseList").find("li").remove();
var cityId = $("#baseCity").val();
var buildPropertyId = $("#buildProperty").val();
var room = $("#room").val();
var areaId = $("#areaId").val();
var cityId = $("#cityId").val();
var plateId = $("#plateId").val();
var acreage = $("#acreage").val();
var price = $("#price").val();
$.ajax({
type: "post",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&cityId="+cityId+"&districtId="+areaId+"&plateId="+plateId+"&buildPropertyId="+buildPropertyId+"&roomId="+room+"&acreage="+acreage+"&totalPrice="+price+"&houseType="+$houseType,
success:function(json){
var result = json.result;
var urlParams = getUrlParmas();
for(var i = 0; i <result.length; i++){
var name = result[i]["name"];
var id = result[i]['id'];
var imgUrl = result[i]['path'];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
var li = $("<li>").attr("id",id).addClass("addImg").append(img).append(name);
if(urlParams["id"]){
if(urlParams["id"]!=id){
$("#houseList").append(li);
}
}else{
$("#houseList").append(li);
}
}
}
});
}
});
})(jQuery);
......
......@@ -89,13 +89,13 @@
<th><label for="from">所属地区</label></th>
<td>
<select id="baseCity" name="baseCity">
<option value=""> 城市</option>
<option value="-1"> 城市</option>
{% for item in city %}
<option {{ item.id == result.city_id?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<select id="baseAreaId" name="baseAreaId">
<option value = "">区域</option>
<option value = -1">区域</option>
{% if district %}
{% for item in district %}
<option {{ item.id == result.district_id?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
......@@ -103,7 +103,7 @@
{% endif %}
</select>
<select id="basePlateId" name="basePlateId">
<option value = "">板块</option>
<option value = "-1">板块</option>
{% if district %}
{% for item in plate %}
<option {{ item.id == result.plate_id?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
......@@ -154,6 +154,7 @@
{% endif %}
{% set exists_photo_ids = exists_photo_ids~item.image_id %}
<p>
<input type="radio" name="frontCover" value="{{item.image_id}}" {{ result.frontCover_id == item.image_id?"checked":"" }} />
<select name="exists_photo[{{ item.image_id }}][type]">
{% for i in photoType %}
<option {{ i.id == item.image_type?"selected":"" }} value="{{ i.id }}">{{ i.value }}</option>
......@@ -202,7 +203,7 @@
<td>
<select id="status" name="status">
{% for item in status %}
<option value={{item.status_id}}>{{item.status_name}}</option>
<option value={{item.id}}>{{item.value}}</option>
{% endfor %}
</select>
</td>
......@@ -335,6 +336,7 @@
var option = $("<option>").attr("value",cityId).append(cityName);
$("#cityId").append(option);
var area = $("#areaId");
if(cityId != -1){
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
......@@ -362,24 +364,9 @@
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);
}
addList(2);
}
});
});
//区域联动板块
......@@ -401,37 +388,7 @@
//推荐房源下显示图片信息以及房名
$("#areaId,#plateId,#buildProperty,#room,#acreage,#price").change(function(){
$("#houseList").find("li").remove();
var buildPropertyId = $("#buildProperty").val();
var room = $("#room").val();
var areaId = $("#areaId").val();
var cityId = $("#cityId").val();
var plateId = $("#plateId").val();
var acreage = $("#acreage").val();
var price = $("#price").val();
$.ajax({
type: "post",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&cityId="+cityId+"&districtId="+areaId+"&plateId="+plateId+"&buildPropertyId="+buildPropertyId+"&roomId="+room+"&acreage="+acreage+"&totalPrice="+price+"&houseType=2",
success:function(json){
var result = json.result;
var urlParams = getUrlParmas();
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);
if(urlParams["id"]){
if(urlParams["id"]!=id){
$("#houseList").append(li);
}
}else{
$("#houseList").append(li);
}
}
}
});
addList(2);
});
//添加房源中搜索框的搜索
......@@ -524,13 +481,14 @@
//新增房源相册
$("#housePicture").click(function(){
var picDelet = $("<font>").append("删除").addClass("picDelet");
var checkBox = $("<input>").attr({"type":"radio","name":"frontCover","value":i});
var picDelet = $("<input>").attr({"type":"button","value":"删除"}).addClass("picDelet");
var file = $("<input>").attr({"type":"file","name":"files["+i+"]"}).addClass("picFiles");
var select = $("<select>").attr("name","data["+i+"][type]");
{% for item in photoType %}
select.append($("<option>").attr("value",{{item.id}}).append('{{item.value}}'));
{% endfor%}
var p = $("<p>").append(select).append(file).append(picDelet);
var p = $("<p>").append(checkBox).append(select).append(file).append(picDelet);
$("#picList").append(p);
i++
});
......@@ -545,6 +503,9 @@
$("#houseImg,#consultantImg,#picList").on("click",".imgCancel,.consultantCancel,.picDelet",function(){
$(this).parent("p").remove();
});
$("#picList,#houseImg,#consultantImg").on("click",".existsCancel",function(){
$(this).parent().remove();
});
$("#submit").click(function(){
if($("#housename").val()==""){
......@@ -622,9 +583,42 @@
}
return map;
}
$("#picList,#houseImg,#consultantImg").on("click",".existsCancel",function(){
$(this).parent().remove();
function addList($houseType){
$("#houseList").find("li").remove();
var cityId = $("#baseCity").val();
var buildPropertyId = $("#buildProperty").val();
var room = $("#room").val();
var areaId = $("#areaId").val();
var cityId = $("#cityId").val();
var plateId = $("#plateId").val();
var acreage = $("#acreage").val();
var price = $("#price").val();
$.ajax({
type: "post",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&cityId="+cityId+"&districtId="+areaId+"&plateId="+plateId+"&buildPropertyId="+buildPropertyId+"&roomId="+room+"&acreage="+acreage+"&totalPrice="+price+"&houseType="+$houseType,
success:function(json){
var result = json.result;
var urlParams = getUrlParmas();
for(var i = 0; i <result.length; i++){
var name = result[i]["name"];
var id = result[i]['id'];
var imgUrl = result[i]['path'];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
var li = $("<li>").attr("id",id).addClass("addImg").append(img).append(name);
if(urlParams["id"]){
if(urlParams["id"]!=id){
$("#houseList").append(li);
}
}else{
$("#houseList").append(li);
}
}
}
});
}
});
})(jQuery);
......
......@@ -6,61 +6,55 @@
<input type="hidden" name="page" value="{{page}}"/>
<input type="hidden" name="hasSearch" value="1"/>
<select id="listCity" name="listCity">
{% if hasSearch and options.cityName %}
<option value="{{options.cityId}}"> {{options.cityName}}</option>
{% else %}
<option value="0"> 城市</option>
{% endif %}
{% for item in city %}
<option {{ item.id == cityId ?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<select id="listDistrict" name="listDistrict">
{% if hasSearch and options.districtName %}
<option value="{{options.districtId}}"> {{options.districtName}}</option>
{% else %}
<option value="0">区域</option>
{% if district %}
{% for item in district %}
<option {{ item.id == districtId ?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
{% endif %}
</select>
<select id="listPlate" name="listPlate">
{% if hasSearch and options.districtName and options.plateName %}
<option value="{{options.plateId}}">{{options.plateName}}</option>
{% else %}
<option value="0">板块</option>
{% if plate %}
{% for item in plate %}
<option {{ item.id == plateId ?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
{% endif %}
</select>
<select id="totalPrice" name="totalPrice">
{% if hasSearch and totalPrice %}
<option value="{{totalPrice}}"> {{totalPrice}}</option>
{% else %}
<option value ="">价格</option>
{% if dicTotalPrice %}
{% for item in dicTotalPrice %}
<option {{ item.value == totalPrice ?"selected":"" }} value="{{ item.value }}">{{ item.value }}</option>
{% endfor %}
{% endif %}
</select>
<select id="buildProperty" name="buildProperty">
{% if hasSearch and buildProperty %}
<option value="{{buildPropertyId}}"> {{buildProperty}}</option>
{% else %}
<option value="0"> 房型</option>
{% endif %}
{% for item in buildProperty %}
<option {{ item.id == buildPropertyId ?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<select id="acreage" name="acreage">
{% if hasSearch and acreage %}
<option value="{{acreage}}"> {{acreage}}</option>
{% else %}
<option value ="">面积</option>
{% if acreage %}
{% for item in dicArea %}
<option {{ item.value == acreage ?"selected":"" }} value="{{ item.value }}">{{ item.value }}</option>
{% endfor %}
{% 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>
<option value="3">他售</option>
<option value="4">无效</option>
<option value="5">重激活</option>
{% for item in status%}
<option {{ item.id == statusId ?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<input type="text" placeholder="请出入楼盘名/地段名搜索" name="searchText">
<input type="submit" id="submit" class="button action" value="搜索">
......@@ -71,38 +65,6 @@
<script>
(function ($) {
$(document).ready(function(){
//获取城市信息AJAX
var listCity = $("#listCity");
var room = $("#room");
var buildProperty =$("#buildProperty");
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=serachCity",
success:function(data){
addOption(data,listCity)
}
})
//获取类型信息AJAX
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchRoom",
success:function(data){
addOption(data,room)
}
})
//获取房型信息AJAX
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchBuildProperty",
success:function(data){
addOption(data,buildProperty)
}
})
$("#listCity").change(function(){
var listCityId = $("#listCity").val();
var district =$("#listDistrict");
......
......@@ -16,7 +16,11 @@
<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>
<th><label for="address">小区名称</label></th>
<td> <input name="community_name" type="text" value="{{result.community_name}}" class="regular-text code" style="width: 150px;"></td>
</tr>
<tr>
<th><label for="mark">标签:</label></th>
<td> <input name="mark" id="mark" type="text" value="{{mark}}" class="regular-text code"></td>
</tr>
{% if not houseId %}
......@@ -89,13 +93,13 @@
<th><label for="from">所属地区</label></th>
<td>
<select id="baseCity" name="baseCity">
<option value=""> 城市</option>
<option value="-1"> 城市</option>
{% for item in city %}
<option {{ item.id == result.city_id?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<select id="baseAreaId" name="baseAreaId">
<option value = "">区域</option>
<option value = "-1">区域</option>
{% if district %}
{% for item in district %}
<option {{ item.id == result.district_id?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
......@@ -103,7 +107,7 @@
{% endif %}
</select>
<select id="basePlateId" name="basePlateId">
<option value = "">板块</option>
<option value = "-1">板块</option>
{% if district %}
{% for item in plate %}
<option {{ item.id == result.plate_id?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
......@@ -127,10 +131,6 @@
<td> <input name="address" type="text" value="{{result.address}}" class="regular-text code"></td>
</tr>
<tr>
<th><label for="address">小区名称</label></th>
<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" style="width: 300px;"></td>
</tr>
......@@ -155,6 +155,7 @@
{% endif %}
{% set exists_photo_ids = exists_photo_ids~item.image_id %}
<p>
<input type="radio" name="frontCover" value="{{item.image_id}}" {{ result.frontCover_id == item.image_id?"checked":"" }} />
<select name="exists_photo[{{ item.image_id }}][type]">
{% for i in photoType %}
<option {{ i.id == item.image_type?"selected":"" }} value="{{ i.id }}">{{ i.value }}</option>
......@@ -189,6 +190,23 @@
</td>
</tr>
<tr>
<th><label for="feature">房源特色</label></th>
<td>
<div id="feature">
{% for item in featureOld %}
<p>
<span>{{ item.name }}</span>
<input type="button" value="删除" class="featureCancel existsCancel">
<input type="hidden" name="data[houseFeature][]" value="{{item.tag_id}}">
</p>
{% endfor %}
</div><br/>
<button type="button" class="button action" data-toggle="modal" data-target="#houseFeature" id="featureBt">
添加特色
</button>
</td>
</tr>
<tr>
<th><label for="consultant">置业顾问</label></th>
<td>
<div id="consultantImg">
......@@ -211,7 +229,7 @@
<td>
<select id="status" name="status">
{% for item in status %}
<option value={{item.status_id}}>{{item.status_name}}</option>
<option value={{item.id}}>{{item.value}}</option>
{% endfor %}
</select>
</td>
......@@ -292,6 +310,24 @@
</div>
</div>
<!-- 房源特色出层 -->
<div class="modal fade" id="houseFeature" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<table class="form-table" id="featureTable">
<tbody>
<tr>
<th style="width: 45px"><label for="feature">特色:</label></th>
{% for item in feature %}
<td id="{{ item.id }}">{{ item.value }}</td>
{% endfor %}
</tr>
</tbody>
</table>
</div>
</div>
</div>
<script>
(function($){
......@@ -341,11 +377,12 @@
$("#houseList").find("li").remove();
var acreage =$("#acreage");
var price = $("#price");
var area = $("#areaId");
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");
if(cityId != -1){
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
......@@ -373,23 +410,8 @@
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);
addList(1)
}
}
});
});
//区域联动板块
......@@ -411,37 +433,7 @@
//推荐房源下显示图片信息以及房名
$("#areaId,#plateId,#buildProperty,#room,#acreage,#price").change(function(){
$("#houseList").find("li").remove();
var buildPropertyId = $("#buildProperty").val();
var room = $("#room").val();
var areaId = $("#areaId").val();
var cityId = $("#cityId").val();
var plateId = $("#plateId").val();
var acreage = $("#acreage").val();
var price = $("#price").val();
$.ajax({
type: "post",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&cityId="+cityId+"&districtId="+areaId+"&plateId="+plateId+"&buildPropertyId="+buildPropertyId+"&roomId="+room+"&acreage="+acreage+"&totalPrice="+price+"&houseType=1",
success:function(json){
var result = json.result;
var urlParams = getUrlParmas();
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);
if(urlParams["id"]){
if(urlParams["id"]!=id){
$("#houseList").append(li);
}
}else{
$("#houseList").append(li);
}
}
}
});
addList(1)
});
//添加房源中搜索框的搜索
......@@ -500,8 +492,7 @@
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});
......@@ -534,16 +525,26 @@
//新增房源相册
$("#housePicture").click(function(){
var picDelet = $("<font>").append("删除").addClass("picDelet");
var checkBox = $("<input>").attr({"type":"radio","name":"frontCover","value":i});
var picDelet = $("<input>").attr({"type":"button","value":"删除"}).addClass("picDelet");
var file = $("<input>").attr({"type":"file","name":"files["+i+"]"}).addClass("picFiles");
var select = $("<select>").attr("name","data["+i+"][type]");
{% for item in photoType %}
select.append($("<option>").attr("value",{{item.id}}).append('{{item.value}}'));
{% endfor%}
var p = $("<p>").append(select).append(file).append(picDelet);
var p = $("<p>").append(checkBox).append(select).append(file).append(picDelet);
$("#picList").append(p);
i++
});
//显示选中的特色
$("#featureTable").find("tr > td").click(function(){
var houseFeature = $("<input>").attr({"type":"hidden","name":"data[houseFeature][]","value": $(this).attr("id")});
var cancel = $("<input>").attr({"type":"button","value":"删除"}).addClass("featureCancel");
var font = $("<font>").append( $(this).text());
var p =$("<p>").append(houseFeature).append(font).append(cancel);
$("#feature").append(p);
});
//房源相册
$("#picList").on("change",".picFiles",function(){
......@@ -552,10 +553,14 @@
});
//删除房源相册、推荐房源、推荐置业顾问
$("#houseImg,#consultantImg,#picList").on("click",".imgCancel,.consultantCancel,.picDelet",function(){
$("#houseImg,#consultantImg,#picList,#feature").on("click",".imgCancel,.consultantCancel,.picDelet,.featureCancel",function(){
$(this).parent("p").remove();
});
$("#picList,#houseImg,#consultantImg").on("click",".existsCancel",function(){
$(this).parent().remove();
});
$("#submit").click(function(){
if($("#housename").val()==""){
alert("请输入楼盘名");
......@@ -633,9 +638,40 @@
return map;
}
$("#picList,#houseImg,#consultantImg").on("click",".existsCancel",function(){
$(this).parent().remove();
function addList(houseType){
$("#houseList").find("li").remove();
var cityId = $("#baseCity").val();
var buildPropertyId = $("#buildProperty").val();
var room = $("#room").val();
var areaId = $("#areaId").val();
var cityId = $("#cityId").val();
var plateId = $("#plateId").val();
var acreage = $("#acreage").val();
var price = $("#price").val();
$.ajax({
type: "post",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchHouse&cityId="+cityId+"&districtId="+areaId+"&plateId="+plateId+"&buildPropertyId="+buildPropertyId+"&roomId="+room+"&acreage="+acreage+"&totalPrice="+price+"&houseType="+houseType,
success:function(json){
var result = json.result;
var urlParams = getUrlParmas();
for(var i = 0; i <result.length; i++){
var name = result[i]["name"];
var id = result[i]['id'];
var imgUrl = result[i]['path'];
var img = $("<img>").attr({"src":imgUrl,"height":100,"width":100});
var li = $("<li>").attr("id",id).addClass("addImg").append(img).append(name);
if(urlParams["id"]){
if(urlParams["id"]!=id){
$("#houseList").append(li);
}
}else{
$("#houseList").append(li);
}
}
}
});
}
});
})(jQuery);
......
......@@ -6,66 +6,55 @@
<input type="hidden" name="page" value="{{page}}"/>
<input type="hidden" name="hasSearch" value="1"/>
<select id="listCity" name="listCity">
{% if hasSearch and options.cityName %}
<option value="{{options.cityId}}"> {{options.cityName}}</option>
{% else %}
<option value="0"> 城市</option>
{% endif %}
{% for item in city %}
<option {{ item.id == cityId ?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<select id="listDistrict" name="listDistrict">
{% if hasSearch and options.districtName %}
<option value="{{options.districtId}}"> {{options.districtName}}</option>
{% else %}
<option value="0">区域</option>
{% if district %}
{% for item in district %}
<option {{ item.id == districtId ?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
{% endif %}
</select>
<select id="listPlate" name="listPlate">
{% if hasSearch and options.districtName and options.plateName %}
<option value="{{options.plateId}}">{{options.plateName}}</option>
{% else %}
<option value="0">板块</option>
{% if plate %}
{% for item in plate %}
<option {{ item.id == plateId ?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
{% endif %}
</select>
<select id="totalPrice" name="totalPrice">
{% if hasSearch and totalPrice %}
<option value="{{totalPrice}}"> {{totalPrice}}</option>
{% else %}
<option value ="">价格</option>
{% if dicTotalPrice %}
{% for item in dicTotalPrice %}
<option {{ item.value == totalPrice ?"selected":"" }} value="{{ item.value }}">{{ item.value }}</option>
{% endfor %}
{% endif %}
</select>
<select id="buildProperty" name="buildProperty">
{% if hasSearch and buildProperty %}
<option value="{{buildPropertyId}}"> {{buildProperty}}</option>
{% else %}
<option value="0"> 房型</option>
{% endif %}
{% for item in buildProperty %}
<option {{ item.id == buildPropertyId ?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<select id="acreage" name="acreage">
{% if hasSearch and acreage %}
<option value="{{acreage}}"> {{acreage}}</option>
{% else %}
<option value ="">面积</option>
{% if acreage %}
{% for item in dicArea %}
<option {{ item.value == acreage ?"selected":"" }} value="{{ item.value }}">{{ item.value }}</option>
{% endfor %}
{% endif %}
</select>
<select id="characteristic" name="characteristic">
<option value ="">特色</option>
<option value ="">满5</option>
<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>
<option value="3">他售</option>
<option value="4">无效</option>
<option value="5">重激活</option>
{% for item in status%}
<option {{ item.id == statusId ?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<input type="text" placeholder="请出入楼盘名/地段名搜索" name="searchText">
<input type="submit" id="submit" class="button action" value="搜索">
......@@ -76,38 +65,6 @@
<script>
(function ($) {
$(document).ready(function(){
//获取城市信息AJAX
var listCity = $("#listCity");
var room = $("#room");
var buildProperty =$("#buildProperty");
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=serachCity",
success:function(data){
addOption(data,listCity)
}
})
//获取类型信息AJAX
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchRoom",
success:function(data){
addOption(data,room)
}
})
//获取房型信息AJAX
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchBuildProperty",
success:function(data){
addOption(data,buildProperty)
}
})
$("#listCity").change(function(){
var listCityId = $("#listCity").val();
var district =$("#listDistrict");
......@@ -141,7 +98,7 @@
$.ajax({
type: "GET",
url: "/tospur/wp-admin/admin-ajax.php",
data: "action=searchUnitPriceRange&cityId="+listCityId,
data: "action=searchTotalPrice&cityId="+listCityId,
success:function(json){
for(var i = 0; i <=json.length-1; i++){
var id = json[i]["id"];
......
......@@ -68,6 +68,7 @@ class InsertDao{
global $wpdb;
//图片信息
$uploadedfile = $_FILES['files'];
$frontCover = $_POST["frontCover"];
//主力房源的图片与房子信息关联插入数据库
if(isset($uploadedfile["name"])){
foreach($uploadedfile["name"] as $key=> $value) {
......@@ -106,8 +107,13 @@ class InsertDao{
if (!$imgRes) {
return 501;
}
//获取插入图片的id
$imgid = $wpdb->insert_id;
if($_POST["frontCover"] == $key){
$frontCover =$imgid;
}
//房源类型、面积与图片关联表
if($data[$key]["type"] == "0"){
$houseTypeArea = array(
......@@ -136,6 +142,7 @@ class InsertDao{
}
}
}
$wpdb->update(Config::TOSPUR_HOUSE_TABLE,array("frontCover_id"=>$frontCover),array("id"=>$houseId));
}
public static function addRecommend($houseId,$data){
......@@ -172,6 +179,23 @@ class InsertDao{
}
}
}
public static function addHouseFeature($houseId,$data){
global $wpdb;
if($data["houseFeature"]){
foreach($data["houseFeature"] as $val){
$a_house_feature = array(
"house_id" => $houseId,
"tag_id" =>$val
);
$a_house_featureRes = $wpdb->insert(Config::A_HOUSE_TAG_TABLE,$a_house_feature);
if(!$a_house_featureRes){
return 506;
}
}
}
}
public static function addHouseTag($tags, $house_id)
{
......@@ -183,7 +207,7 @@ class InsertDao{
//房源的标签id数组
$tags_ids = array();
//查询存在的标签
$sql = "select * from tospur_tag where name in " . $tags_string;
$sql = "select * from tospur_tag where name in " . $tags_string." and type=0";
$has_tags_result = $wpdb->get_results($sql);
//排除存在的标签,剩下未有的标签和存在标签id数组
foreach ($has_tags_result as $key => $value) {
......@@ -205,11 +229,12 @@ class InsertDao{
}
}
//删除该房源的标签关联后,添加新的标签关联
$wpdb->delete(
'a_house_tag',
array(
'house_id' => $house_id
)
$wpdb->query(
$wpdb->prepare(
"DELETE FROM a_house_tag
WHERE tag_id in(select tag_id from (select tag_id,tt.type from a_house_tag as aht
left JOIN tospur_tag tt on aht.tag_id = tt.id) as a
where house_id = %d and a.type = 0);", $house_id)
);
foreach ($tags_ids as $value) {
$wpdb->insert(
......
......@@ -231,8 +231,12 @@ class SearchDao
$areaArray = explode("-", $array['acreage']);
$params[] = $areaArray[0];
$params[] = $areaArray[1];
if ($array['houseType'] == 0) {
$sql = $sql . " and ada.house_area between %d and %d";
}else{
$sql = $sql . " and covered_area between %d and %d";
}
}
if ($array['totalPrice'] > -1) {
$priceArray = explode("-", $array['totalPrice']);
$params[] = $priceArray[0];
......@@ -325,10 +329,18 @@ class SearchDao
return $array;
}
public static function searchFeatureByHouse($hid){
global $wpdb;
$featureSql ="select tag_id,name from a_house_tag aht
LEFT JOIN (select id as tid,name ,type from tospur_tag) tt on aht.tag_id = tt.tid where aht.house_id = %d and type = 1";
$feature = $wpdb->get_results($wpdb->prepare($featureSql,$hid));
return $feature;
}
public static function searchFeature()
{
$sql = 'select id,name as value from '.Config::TOSPUR_TAG_TABLE.' where type = 1;';
global $wpdb;
$sql = 'select id,name as value from '.Config::TOSPUR_TAG_TABLE.' where type = 1;';
return $wpdb->get_results($sql);
}
......@@ -358,7 +370,10 @@ class SearchDao
public static function getDetailInfo($hid,$type = NULL){
global $wpdb;
$sql = "select * from ".Config::TOSPUR_HOUSE_TABLE." where id = %d";
$sql = "select *,dr.literal as room,db.literal as buildproperty from ".Config::TOSPUR_HOUSE_TABLE." th
left JOIN ".Config::DIC_ROOM_TABLE." dr on th.room_id = dr.id
left JOIN dic_buildproperty db on th.buildproperty_id = db.value
where th.id = %d";
$result = $wpdb->get_row($wpdb->prepare($sql,$hid));
$context = array();
$context['result'] = $result;
......@@ -373,22 +388,26 @@ class SearchDao
where ada.house_id = %d";
$mainImage = $wpdb->get_results($wpdb->prepare($mainImagesSql,$hid));
foreach($mainImage as $key => $value){
$value->path = Image::getImage($value->path,'small');
$value->path = Image::getImage($value->path,'big');
}
$context['mainImage'] = $mainImage;
$recommendSql = "select th.id,th.name,th.average_price,th.latest_news,th.address,ti.path,dr.literal,(SELECT GROUP_CONCAT(left(tt.name,3)) from a_house_tag aht
LEFT JOIN tospur_tag tt on tt.id = aht.tag_id
where aht.house_id = th.id) as tags from tospur_house th
LEFT JOIN tospur_image ti on th.frontCover_id = ti.id
LEFT JOIN dic_room dr on dr.value = th.room_id
where th.id in(select recommend_id from a_house_recommend where house_id = %d);";
}else{
$recommendSql = "select th.id,th.name,th.community_name,ti.path,dr.value,th.rent,th.decoration,th.covered_area,th.total_price,(SELECT GROUP_CONCAT(left(tt.name,3)) from a_house_tag aht
LEFT JOIN tospur_tag tt on tt.id = aht.tag_id
where aht.house_id = th.id) as tags from tospur_house th
LEFT JOIN dic_room dr on dr.id = th.room_id
LEFT JOIN tospur_image ti on th.frontCover_id = ti.id
where th.id in(select recommend_id from a_house_recommend where house_id = %d);";
}
$recommendSql = "select ahi.house_id as id,ti.path from a_house_image ahi
left join tospur_image ti on ahi.image_id = ti.id
where ti.image_type in (1,5) and house_id
in (select recommend_id from a_house_recommend where house_id = %d) group by house_id";
$recommends = $wpdb->get_results($wpdb->prepare($recommendSql,$hid));
if(count($recommends) == 0){
$recommendSql = "select ahi.house_id as id,ti.path from a_house_image ahi
left join tospur_image ti on ahi.image_id = ti.id
where house_id in (select recommend_id from a_house_recommend where house_id = %d) group by house_id";
$recommends = $wpdb->get_results($wpdb->prepare($recommendSql,$hid));
}
foreach($recommends as $key => $value){
$value->path = Image::getImage($value->path,'small');
}
......@@ -426,7 +445,7 @@ class SearchDao
global $wpdb;
$sql = "select tt.name from a_house_tag aht
LEFT JOIN tospur_tag tt on aht.tag_id = tt.id
where aht.house_id = %d;";
where aht.house_id = %d and type = 0;";
$results = $wpdb->get_results($wpdb->prepare($sql,$houseId));
$tags = array();
foreach($results as $item){
......@@ -437,42 +456,9 @@ class SearchDao
public static function searchStatusType($statusType){
global $wpdb;
$sql="select status_type,status_id,status_name from tospur_status where status_type = %d";
$sql="select status_id as id,status_name as value from tospur_status where status_type = %d";
$results = $wpdb->get_results($wpdb->prepare($sql,$statusType));
return $results;
}
public static function searchForCDP($cityId=null,$districtId=null,$plateId=null){
global $wpdb;
$selectName = "";
$where = " where 1=1 ";
$params = array();
if($cityId != 0){
$where .= " and cityId = %d";
$selectName = "cityId,cityName";
$params[] = $cityId;
}
if($districtId != 0){
$where .= " and districtId = %d";
$selectName = "cityId,cityName,districtId,districtName";
$params[] = $districtId;
}
if($plateId != 0){
$where .= " and plateId = %d";
$selectName = "cityId,cityName,districtId,districtName,plateId,plateName";
$params[] = $plateId;
}
$result = $wpdb->get_row($wpdb->prepare('select ' . $selectName . ' from ' . Config::DIC_CITY_TABLE . $where,$params));
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
......@@ -23,7 +23,6 @@ function tospur_init()
require_once(PLUGIN_DIR . 'Admin/rentHouse.php');
require_once(PLUGIN_DIR . 'Admin/rentHouseList.php');
require_once(PLUGIN_DIR . 'Admin/feature.php');
require_once(PLUGIN_DIR . 'Admin/introduction.php');
require_once('consultant_score.php');
require_once('view_house.php');
add_action('admin_menu', 'reset_menu');
......@@ -34,8 +33,8 @@ function tospur_init()
function tospur_theme_format(){
//移除
add_filter('admin_footer_text', 'tospur_remove_admin_footer_text', 1000);
add_filter('update_footer', 'tospur_remove_admin_footer_upgrade', 1000);
add_filter('admin_footer_text', tospur_remove_admin_footer_text, 1000);
add_filter('update_footer', tospur_remove_admin_footer_upgrade, 1000);
add_action('login_enqueue_scripts', 'tospur_login_logo');
//admin bar
add_action('wp_before_admin_bar_render', 'tospur_remove_admin_bar');
......@@ -69,9 +68,11 @@ function tospur_theme_format(){
function tospur_register_script_style(){
wp_register_script('jquery-ui',plugins_url('Admin/views', __FILE__)."/js/jquery-ui.js");
wp_register_script('validate',plugins_url('Admin/views', __FILE__)."/js/jquery.validate.js");
wp_register_script('bootstrapjs',plugins_url('Admin/views', __FILE__)."/js/bootstrap.min.js");
wp_register_style('jquery-ui_css', plugins_url('Admin/views', __FILE__)."/css/jquery-ui.css");
wp_register_style('bootstrapcss', plugins_url('Admin/views', __FILE__)."/css/bootstrap.css");
wp_register_style('bootstrapMinCss', plugins_url('Admin/views', __FILE__)."/css/bootstrap.min.css");
}
function tospur_ajax_set()
......@@ -90,14 +91,12 @@ function tospur_ajax_set()
add_action('wp_ajax_nopriv_searchTotalPrice', 'SearchDao::ajax_searchTotalPrice');
add_action('wp_ajax_searchOrganization', 'SearchDao::ajax_searchOrganization');
add_action('wp_ajax_nopriv_searchOrganization', 'SearchDao::ajax_searchOrganization');
add_action('wp_ajax_searchHouse', 'SearchDao::ajax_searchHouse');
add_action('wp_ajax_nopriv_searchHouse', 'SearchDao::ajax_searchHouse');
add_action('wp_ajax_searchConsultant', 'SearchDao::ajax_searchConsultant');
add_action('wp_ajax_nopriv_searchConsultant', 'SearchDao::ajax_searchConsultant');
add_action( 'wp_ajax_searchHouse', 'SearchDao::ajax_searchHouse' );
add_action( 'wp_ajax_nopriv_searchHouse', 'SearchDao::ajax_searchHouse');
add_action( 'wp_ajax_searchConsultant', 'SearchDao::ajax_searchConsultant' );
add_action( 'wp_ajax_nopriv_searchConsultant', 'SearchDao::ajax_searchConsultant');
add_action('wp_ajax_add_feature', 'feature::ajax_add_feature');
add_action('wp_ajax_nopriv_add_feature', 'feature::ajax_add_feature');
add_action('wp_ajax_submit_introduction', 'introduction::ajax_submit_introduction');
add_action('wp_ajax_nopriv_submit_introduction', 'introduction::ajax_submit_introduction');
//后台处理 置业顾问评分
add_action('wp_ajax_valid_consultant_score', 'valid_consultant_score');
//后台处理 置业顾问
......@@ -138,15 +137,13 @@ function update_consultant()
function reset_menu()
{
add_menu_page("sync", "同步数据", "manage_options", "1", "do_sync");
add_menu_page('nesHouseList','新房列表', 'moderate_comments', 'newHouseList', 'newHouseList', 'dashicons-menu', 6);
add_menu_page('nesHouseList','新房列表', 'moderate_comments', 'newHouseList', 'function_newHouseList', 'dashicons-menu', 6);
add_submenu_page('newHouseList', '添加新房', '添加新房', 'moderate_comments', 'newHouse', 'House::init_view');
add_menu_page('secHandHouseList','二手房列表', 'moderate_comments', 'secHandHouseList', 'secHandHouseList', 'dashicons-menu', 7);
add_menu_page('secHandHouseList','二手房列表', 'moderate_comments', 'secHandHouseList', 'function_secHandHouseList', 'dashicons-menu', 7);
add_submenu_page('secHandHouseList', '添加二手房', '添加二手房', 'moderate_comments', 'secHandHouse', 'SecHandHouse::secHandHouse_html');
add_submenu_page('secHandHouseList', '特色列表', '特色列表', 'moderate_comments', 'feature_list', 'feature::feature_list_html');
add_submenu_page('secHandHouseList', '添加特色', '添加特色', 'moderate_comments', 'add_feature', 'feature::add_feature_html');
add_menu_page('rentHouseList','租房列表', 'moderate_comments', 'rentHouseList', 'rentHouseList', 'dashicons-menu', 8);
add_submenu_page('secHandHouseList', '添加特色', '添加特色', 'moderate_comments', 'feature', 'feature::feature_html');
add_menu_page('rentHouseList','租房列表', 'moderate_comments', 'rentHouseList', 'function_rentHouseList', 'dashicons-menu', 8);
add_submenu_page('rentHouseList', '添加租房', '添加租房', 'moderate_comments', 'rentHouse', 'RentHouse::rentHouse_html');
add_menu_page("introduction", "诚信宣言", "editor", "introduction", "introduction::introduction_html", 'dashicons-menu', 9);
//移除更新信息
remove_action( 'admin_notices', 'update_nag', 3 );
global $menu;
......
......@@ -443,10 +443,11 @@ a:hover {
background-color: #f9f9f9;
}
.footer .btn {
width: 45%;
width: 94%;
display: block;
color: #ffffff;
font-weight: bold;
margin: 5px 2%;
margin: 5px auto;
padding: 1px;
background-color: #008cd7;
border-top-left-radius: 4px;
......
......@@ -526,8 +526,9 @@ body {
margin-right: 5px;
font-size: 14px;
}
.detail_row #wrapper #scroller ul li p img {
width: 100%;
.detail_row #wrapper #scroller ul li p:nth-child(1) {
height: 70px;
overflow: hidden;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom-left-radius: 6px;
......@@ -537,6 +538,9 @@ body {
-webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
}
.detail_row #wrapper #scroller ul li p:nth-child(1) img {
height: 100%;
}
.detail_row #wrapper #scroller ul li p em {
font-style: normal;
font-size: 7px;
......
......@@ -7,6 +7,7 @@
if(isset($_GET['hid'])){
$hid = $_GET['hid'];
$context['hid'] = $hid;
$context['cityName'] = SearchDao::getCityNameWithId($result->city_id);
$context = array_merge($context,SearchDao::getDetailInfo($hid));
$houseType = $context['result']->house_type;
if($houseType !=0){
......
......@@ -53,9 +53,6 @@ function page_template($template)
case 'loan_calculator':
$page = $theme . '/loan_calculator.php';
break;
case 'loan_result':
$page = $theme . '/loan_result.php';
break;
}
return $page;
} else {
......
wp-content/themes/tospur/img/formBg.jpg

10.2 KB | W: | H:

wp-content/themes/tospur/img/formBg.jpg

6.72 KB | W: | H:

wp-content/themes/tospur/img/formBg.jpg
wp-content/themes/tospur/img/formBg.jpg
wp-content/themes/tospur/img/formBg.jpg
wp-content/themes/tospur/img/formBg.jpg
  • 2-up
  • Swipe
  • Onion skin
wp-content/themes/tospur/img/logo.png

1.25 KB | W: | H:

wp-content/themes/tospur/img/logo.png

1.97 KB | W: | H:

wp-content/themes/tospur/img/logo.png
wp-content/themes/tospur/img/logo.png
wp-content/themes/tospur/img/logo.png
wp-content/themes/tospur/img/logo.png
  • 2-up
  • Swipe
  • Onion skin
/*!
* 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
......@@ -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>
......@@ -63,9 +63,6 @@
</div>
</div>
<footer class="footer navbar-fixed-bottom">
<a class="btn btn-wechat">
<span></span>微信联系
</a>
<a href="tel:{{ consultant_mobile }}" class="btn btn-phone">
<span></span>电话联系
</a>
......@@ -141,14 +138,66 @@
</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 }}';
var index = 0;
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: 'search_house',
cityId: {{ consultant.cityId }},
......
......@@ -16,9 +16,12 @@
<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;
$(document).ready(function(){
window.addEventListener("load",function(){
var bullets = document.getElementById('indicator').getElementsByTagName('li');
window.mySwipe = new Swipe(document.getElementById('slider'), {
......@@ -40,10 +43,14 @@
});
},false);
$(document).ready(function(){
$("#slider").bind("tap",function(){
$("#carousel_wrapper").parent().show();
$("#carouselModal").modal('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,15 +64,10 @@
$("#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(){
$(this).hide();
$("#carouselModal,#photoModal").bind("click",function(){
$(this).modal('hide');
return false;
});
......@@ -91,13 +93,22 @@
$(".map").bind("tap",function(){
location.href = "{{ siteUrl }}/?page=map&a={{result.address}}&c={{cityName}}&hn={{result.community_name}}<br>{{result.address}}&p={{result.location}}";
});
$(".recommendCont").on("tap",".row",function(){
window.location.href = '{{ siteUrl }}/?page=detail&hid=' + $(this).attr("data-id");
});
$("#scroller").on("tap","*[data-image-url]",function(){
$("#photoModal").find("img").eq(0).attr("src",$(this).attr("data-image-url"));
$("#photoModal").modal("show");
return false;
});
});
</script>
</head>
<body>
<p class="collect">
</p>
<p class="collect"></p>
<!-- 图片滚动 -->
<div class="addWrap">
......@@ -122,7 +133,14 @@
<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" id="calculator">房贷计算器</button>
......@@ -139,10 +157,10 @@
<div id="scroller">
<ul class="list-inline text-nowrap">
{% for item in mainImage %}
<li>
<li data-image-url="{{siteUrl}}{{ item.path }}">
<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>
......@@ -150,8 +168,10 @@
</div>
</div>
<div class="detail_row">
<p class="detail_title">位置及周边</p>
<ul class="list-unstyled">
<a class="collapsed" data-toggle="collapse" href="#collapseExample">
<p class="detail_title">位置及周边<span class="pull-right"></span></p>
</a>
<ul class="list-unstyled collapse" id="collapseExample" style="min-height:60px;display:block;overflow:hidden;height:0;">
<li>地址:{{result.address}}</li>
<li>交通线路:{{result.traffic}}</li>
<li>周边配套:{{result.periphery}}</li>
......@@ -160,10 +180,12 @@
</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="#collapseInfoCont">
<p class="detail_title">基本信息<span class="pull-right"></span></p>
</a>
<ul class="list-unstyled collapse infoCont" id="collapseInfoCont" style="min-height:60px;display:block;overflow:hidden;height:0;">
<li>开发商:<span>{{result.developer}}</span></li>
<li>建筑类型:{{result.periphery}}</li>
<li>建筑类型:{{result.room}}</li>
<li>装修状况:{{result.decoration}}</li>
<li>容积率:{{result.volume_rate}}</li>
<li>规划户数:{{result.households}}</li>
......@@ -177,18 +199,55 @@
</ul>
</div>
<div class="detail_row">
<p class="detail_title">楼盘概述</p>
<p>{{result.overview}}</p>
<a class="collapsed" data-toggle="collapse" href="#collapseSummary">
<p class="detail_title">楼盘概述<span class="pull-right"></span></p>
</a>
<p class="collapse" id="collapseSummary" style="min-height:60px;display:block;overflow:hidden;height:0;">
{{result.overview}}
</p>
</div>
<div class="detail_row">
<p class="detail_title pull-left">推荐房源</p>
<ul class="list-unstyled recommendCont">
{% if recommends %}
<div class="detail_row recommend">
<p class="detail_title">推荐房源</p>
<div class="recommendCont">
{% for item in recommends %}
<a href="{{siteUrl}}?page=detail&hid={{item.id}}"><li class="col-xs-3"><p style="background-image:url({{siteUrl}}{{ item.path }});"></p></li></a>
<div data-id="{{item.id}}" class="row">
<p>
{% if item.path %}
<img src="{{siteUrl}}{{item.path}}">
{% else %}
<img src="{{siteUrl}}/wp-content/themes/tospur/img/img.jpg">
{% endif %}
</p>
<ul class="list-unstyled">
<li class="address">
<span>{{item.name}}</span>
<span class="pull-right">{{item.literal}}</span>
</li>
<li>{{item.address}}</li>
<li>{{item.latest_news}}</li>
<li>
{% for tag in item.tags|split(',') %}
<span class="label">{{tag}}</span>
{% endfor %}
<span class="pull-right">
<em>
{% if item.average_price>=10000 %}
{{(item.average_price/10000)|round(2, 'floor')}}万
{% else %}
{{item.average_price}}元
{% endif %}
</em>/m<em>2</em>
</span>
</li>
</ul>
</div>
<div class="detail_row" id="consultantDiv">
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% if consultant %}
<div class="detail_row" id="consultantDiv">
<p class="detail_title">置业顾问</p>
<ul class="list-unstyled peopleCont">
{% for item in consultant %}
......@@ -225,7 +284,8 @@
</a>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
<footer class="footer navbar-fixed-bottom">
<a href="#consultantDiv" class="btn">置业顾问</a>
......@@ -244,7 +304,7 @@
<!-- 二手房详细 -->
</footer>
<div class="modal">
<div class="modal" id="carouselModal">
<div id="carousel_wrapper">
<div id="carousel_scroller">
<ul class="list-inline text-nowrap">
......@@ -264,6 +324,10 @@
</ul>
</div>
</div>
<div class="modal" id="photoModal">
<p>
<span><img></span>
</p>
</div>
</body>
</html>
\ No newline at end of file
......@@ -19,6 +19,8 @@
<script type="text/javascript">
var myScroll;
var carouselScroll;
$(document).ready(function(){
window.addEventListener("load",function(){
var bullets = document.getElementById('indicator').getElementsByTagName('li');
window.mySwipe = new Swipe(document.getElementById('slider'), {
......@@ -40,10 +42,8 @@
});
},false);
$(document).ready(function(){
$("#slider").bind("tap",function(){
$("#carousel_wrapper").parent().show();
$("#carouselModal").modal("show");
var carousel = $("#carousel_wrapper");
var carouselWidth = carousel.width();
carousel.find("#carousel_scroller ul li").css({"width":carouselWidth});
......@@ -65,8 +65,8 @@
});
return false;
});
$("#carousel_wrapper").parent().bind("click",function(){
$(this).hide();
$("#carouselModal").bind("click",function(){
$("#carouselModal").modal("hide");
return false;
});
......@@ -89,15 +89,24 @@
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 }}";
});
$(".recommendCont").on("tap",".row",function(){
window.location.href = '{{ siteUrl }}/?page=detail&hid=' + $(this).attr("data-id");
});
});
</script>
</head>
<body>
<p class="collect">
<i class="iconfont"></i>
</p>
<!-- 图片滚动 -->
......@@ -121,23 +130,48 @@
<div class="detail_row priceCont">
<p class="detail_title">{{result.name}}</p>
<!-- <ul class="list-unstyled">
<li class="col-xs-7 price">
均价:<span><em>2.35万</em>/m<em>2</em></span>
</li>
<li class="col-xs-5">
<button type="button" class="btn btn-xs">房贷计算器</button>
</li>
</ul>-->
<!-- 二手房详细 -->
<ul class="list-unstyled">
<li class="col-xs-7">房源编号:{{result.house_number}}</li>
{% if result.house_type == 1%}
<li class="col-xs-5">
<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>
{% else %}
<li class="col-xs-5">
</li>
<li class="col-xs-7 price">
租金:<span><em>{{result.rent}}/月</em></span>
</li>
{% endif %}
</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>
<ul class="list-unstyled collapse infoCont" id="collapseExample" style="min-height:60px;display:block;overflow:hidden;height:0;">
<li>户型:{{result.buildproperty}}</li>
<li>面积:{{result.covered_area}}</li>
<li>楼层:{{result.floor}}</li>
<li>朝向:{{result.faceto}}</li>
......@@ -146,27 +180,78 @@
</ul>
</div>
<div class="detail_row">
<p class="detail_title">房源点评</p>
<p>{{result.overview}}</p>
<a class="collapsed" data-toggle="collapse" href="#collapseSummary" aria-expanded="false">
<p class="detail_title">房源点评<span class="pull-right"></span></p>
</a>
<p class="collapse" id="collapseSummary" style="min-height: 60px; display: block; overflow: hidden; height: 0px;" aria-expanded="false">
{{result.overview}}
</p>
</div>
<div class="detail_row">
<p class="detail_title">位置及周边</p>
<ul class="list-unstyled">
<a class="collapsed" data-toggle="collapse" href="#collapseAddress">
<p class="detail_title">位置及周边<span class="pull-right"></span></p>
</a>
<ul class="list-unstyled collapse" id="collapseAddress" style="min-height:60px;display:block;overflow:hidden;height:0;">
<li>地址:{{result.address}}</li>
<li>交通线路:{{result.traffic}}</li>
<li>周边配套:{{result.periphery}}</li>
</ul>
<p class="map">
</p>
<p class="map"></p>
</div>
<div class="detail_row">
<p class="detail_title pull-left">推荐房源</p>
<ul class="list-unstyled recommendCont">
{% if recommends %}
<div class="detail_row recommend">
<p class="detail_title">推荐房源</p>
<div class="recommendCont">
{% for item in recommends %}
<a href="{{siteUrl}}?page=detail&hid={{item.id}}"><li class="col-xs-3"><p style="background-image:url({{siteUrl}}{{ item.path }});"></p></li></a>
<div data-id="{{item.id}}" class="row">
<p>
{% if item.path %}
<img src="{{siteUrl}}{{item.path}}">
{% else %}
<img src="{{siteUrl}}/wp-content/themes/tospur/img/img.jpg">
{% endif %}
</p>
<ul class="list-unstyled">
<li class="multiLine_omit">
{{item.name}}
</li>
<li>{{item.community_name}}</li>
<li>
<span>{{item.value}}</span>
{% if result.house_type == 2 %}
<span>{{item.decoration}}</span>
{% endif %}
<span>{{item.covered_area}}平米</span>
</li>
<li>
{% for tag in item.tags|split(',') %}
{% if loop.index <=3 %}
<span class="label">{{tag}}</span>
{% endif %}
{% endfor %}
<span class="pull-right">
{% if result.house_type == 1 %}
<em>
{{(item.total_price/10000)|round(2, 'floor')}}万
</em>
{% elseif result.house_type == 2 %}
<em>
{% if item.rent>=10000 %}
{{(item.rent/10000)|round(2, 'floor')}}万
{% else %}
{{item.rent}}
{% endif %}
/月
</em>
{% endif %}
</span>
</li>
</ul>
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% if consultant[0] %}
<footer class="footer navbar-fixed-bottom">
<ul class="list-unstyled">
......@@ -195,17 +280,17 @@
<span>电话联系</span>
</a>
{% endif %}
<!--<a href="#" class="btn btn-wechat">
<a href="{{siteUrl}}?page=view&house_id={{hid}}&consultant_id={{consultant[0].id}}" class="btn btn-wechat">
<span></span>
<span>微信联系</span>
</a>-->
<span>一键预约</span>
</a>
</li>
</ul>
<!-- 二手房详细 -->
</footer>
{% endif %}
<div class="modal">
<div class="modal" id="carouselModal">
<div id="carousel_wrapper">
<div id="carousel_scroller">
<ul class="list-inline text-nowrap">
......
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