用户列表

This commit is contained in:
谢洪龙 2017-07-28 18:59:31 +08:00
parent 02008e5173
commit d14f0e099e
11 changed files with 14944 additions and 14626 deletions

View File

@ -47,7 +47,13 @@ public class User {
@RequestMapping(value = "/getUserList", method = RequestMethod.POST)
@ResponseBody
public Object getlist() {
return userHelper.getlist();
public Object getlist(String draw, Integer start, Integer length) {
return userHelper.getlist(draw, start, length);
}
@RequestMapping(value = "/updateRemarks", method = RequestMethod.POST)
@ResponseBody
public Object updateRemarks(String userId, String remarks) {
return userHelper.updateRemarks(userId, remarks);
}
}

View File

@ -19,7 +19,8 @@ public enum PushTypeEnum {
offline_push("offline_push", "离线通知"),
send_report("send_report", "看护报告"),
shops_push("shops_push", "看护通知"),
all_push("all_push", "所有用户推送");
all_push("all_push", "所有用户推送"),
pinglun_push("pinglun_push", "直播间评论");
private PushTypeEnum(String key, String value) {
this.key = key;

View File

@ -26,5 +26,14 @@ public interface UserHelper {
*
* @return
*/
public Object getlist();
public Object getlist(String draw, Integer start, Integer pageSize);
/**
* 修改备注
*
* @param userId
* @param remarks
* @return
*/
public Object updateRemarks(String userId, String remarks);
}

View File

@ -57,8 +57,9 @@ public class UserHelperI implements UserHelper {
* @return
*/
@Override
public Object getlist() {
List<Map> list = tbl_User_Mapper.getUserList();
public Object getlist(String draw, Integer start, Integer pageSize) {
List<Map> list = tbl_User_Mapper.getUserList(start, pageSize);
Integer count = tbl_User_Mapper.getUsersCount();
for (Map map : list) {
if (map.get("createTime") != null) {
@ -73,10 +74,29 @@ public class UserHelperI implements UserHelper {
Map map = new HashMap();
map.put("data", list);
map.put("draw", 20);
map.put("recordsTotal", 100);
map.put("recordsFiltered", 77);
map.put("draw", draw);
map.put("recordsTotal", count);
map.put("recordsFiltered", count);
return map;
}
/**
* 修改备注
*
* @param userId
* @param remarks
* @return
*/
@Override
public Object updateRemarks(String userId, String remarks) {
Tbl_User user = new Tbl_User();
user.setUserId(Integer.parseInt(userId));
user.setRemarks(remarks);
int i = tbl_User_Mapper.updateUser(user);
if (i > 0) {
return "true";
} else {
return "false";
}
}
}

View File

@ -119,6 +119,14 @@ public interface Tbl_User_Mapper {
*
* @return
*/
@SelectProvider(type = Tbl_User_MapperSql.class, method = "getlist")
List<Map> getUserList();
@SelectProvider(type = Tbl_User_MapperSql.class, method = "getUserList")
List<Map> getUserList(@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize);
/**
* 根据条件查询用户列表总数
*
* @return
*/
@SelectProvider(type = Tbl_User_MapperSql.class, method = "getUsersCount")
Integer getUsersCount();
}

View File

@ -98,11 +98,25 @@ public class Tbl_User_MapperSql {
*
* @return
*/
public String getlist() {
public String getUserList(@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize) {
StringBuilder sb = new StringBuilder();
sb.append("SELECT user_id userId,phone_number phoneNumber,user_email userEmail,nick_name nickName,create_time createTime,phone_type phoneType,login_type loginType,login_time loginTime,login_count loginCount,address,is_register_gwell isRegisterGwell,jiguang_userid jiguangUserid,remarks FROM tbl_user \n"
+ "LIMIT 40,10");
+ " ORDER BY user_id DESC "
+ "LIMIT " + pageNo + "," + pageSize);
return sb.toString();
}
/**
* 注册用户页获取用户列表总数
*
* @return
*/
public String getUsersCount() {
StringBuilder sb = new StringBuilder();
sb.append("SELECT count(1) FROM tbl_user ");
return sb.toString();
}

View File

@ -167,6 +167,7 @@
<div class="col-lg-12 heading">
<!-- Start .bredcrumb -->
<ul id="crumb" class="breadcrumb">
<li><i class="im-home"></i><a href="index">首页</a><i class="en-arrow-right7"></i></li>
</ul>
<!-- End .breadcrumb -->
</div>

View File

@ -15,9 +15,123 @@
<div class="panel panel-default plain toggle panelClose panelRefresh">
<!-- Start .panel -->
<div class="panel-heading white-bg">
<h4 class="panel-title">Data table</h4>
<h4 class="panel-title">用户列表</h4>
</div>
<div class="panel-body">
<table id="searchTable" class="table table-bordered">
<tbody><tr>
<td class="important">
<label>ID</label>
</td>
<td>
<input type="number" id="userId" name="userId" values="10026" class="input-medium searchClass" min="1">
</td>
<td class="important">
<label>手机号</label>
</td>
<td>
<input type="text" id="phoneNumber" name="phoneNumber" class="input-medium searchClass" maxlength="15">
</td>
<td class="important">
<label>邮箱</label>
</td>
<td>
<input type="text" id="userEmail" name="userEmail" class="input-medium searchClass" maxlength="20">
</td>
<td class="important">
<label>手机类型</label>
</td>
<td>
<select id="phoneType" name="phoneType" class="input-medium searchClass">
<option value="">请选择</option>
<option value="ios">ios</option>
<option value="android">android</option>
</select>
</td>
</tr>
<tr>
<td class="important">
<label>是否注册技威</label>
</td>
<td>
<select id="isRegisterGwell" name="isRegisterGwell" class="input-medium searchClass">
<option value="">请选择</option>
<option value="0">否</option>
<option value="1">是</option>
</select>
</td>
<td class="important">
<label>是否注册极光</label>
</td>
<td>
<select id="isRegisterJiguang" name="isRegisterJiguang" class="input-medium searchClass">
<option value="">请选择</option>
<option value="0">否</option>
<option value="1">是</option>
</select>
</td>
<td class="important">
<label>排序字段</label>
</td>
<td>
<select id="sortField" name="sortField" class="input-medium searchClass">
<option value="">请选择</option>
<option value="createTime">注册时间</option>
<option value="loginTime">登陆时间</option>
<option value="loginCount">登陆次数</option>
</select>
</td>
<td class="important">
<label>排序方式</label>
</td>
<td>
<select id="sortMode" name="sortMode" class="input-medium searchClass">
<option value="">请选择</option>
<option value="asc">升序↑</option>
<option value="desc">降序↓</option>
</select>
</td>
</tr>
<tr>
<td class="important">
<label>昵称</label>
</td>
<td>
<input type="text" id="nickName" name="nickName" class="input-medium searchClass" maxlength="10">
</td>
<td class="important">
<label>备注</label>
</td>
<td>
<input type="text" id="remarks" name="remarks" class="input-medium searchClass" maxlength="10">
</td>
</tr>
<tr>
<td class="important">
<label>登陆时间</label>
</td>
<td colspan="2">
<input type="text" id="loginTime1" name="loginTime1" class="input-medium searchClass" maxlength="20">~~<input type="text" id="loginTime2" name="loginTime2" class="input-medium searchClass" maxlength="20">
</td>
<td class="important">
<label>注册时间</label>
</td>
<td colspan="2">
<input type="text" id="createTime1" name="createTime1" class="input-medium searchClass" maxlength="20">~~<input type="text" id="createTime2" name="createTime2" class="input-medium searchClass" maxlength="20">
</td>
</tr>
<tr>
<td colspan="12" style="text-align:center;" class="important">
<button type="button" class="btn btn-sm btn-info" onclick="refreshTable();" style="margin-right:20px;"><i class="fa-refresh"></i> 刷新</button>
<button id="reset" type="reset" class="btn btn-sm btn-info" style="margin-right:20px;"><i class="fa-undo"></i> 重置</button>
</td>
</tr>
</tbody></table>
<table class="dataTable cell-border" id="datatable" >
<thead>
<tr>
@ -36,7 +150,6 @@
</table>
</div>
<button id="prompt-modal" type="button" class="btn btn-success btn-alt mr15 mb15">Prompt modal</button>
</div>
<!-- End .panel -->
</div>
@ -47,17 +160,52 @@
<!-- End .outlet -->
<script>
$(document).ready(function () {
$('#prompt-modal').click(function () {
bootbox.dialog({ message: '<div class="text-center"><i class="fa fa-spin fa-spinner"></i> Loading...</div>' })
function refreshTable() {
var table = $('#datatable').DataTable();
table.ajax.reload(null, false);
}
$.fn.dataTable.ext.search.push(
function (settings, data, dataIndex) {
var userId = parseInt($('#userId').val(), 10);
return true;
}
);
//备注
function remarks(userId, remarks) {
if (remarks == 'undefined') {
remarks = '';
}
bootbox.prompt({
input:'textarea',
size: 'large',
inputType: 'textarea',
title: "请输入要修改的备注",
value: remarks,
callback: function (result) {
//callback result
console.log(result);
$.ajax({
url: 'updateRemarks',
type: 'post',
data: {"userId": userId, "remarks": result},
success: function (data) {
var table = $('#datatable').DataTable();
table.ajax.reload(null, false);
console.log(data);
},
error: function (data) {
console.log(data);
}
});
}
});
//$('#remarksModal').modal("show");
}
$(document).ready(function () {
//日期控件
$('#loginTime1,#loginTime2,#createTime1,#createTime2').datepicker({
format: "yyyy-mm-dd"
});
var data = [
@ -78,7 +226,7 @@
"$5,300"
]
];
$('#datatable').DataTable({
var table = $('#datatable').DataTable({
//记录用户状态
stateSave: true,
//中文自定义
@ -117,7 +265,23 @@
//ajax获取服务器数据
ajax: {
url: 'getUserList',
type: 'post'
type: 'post',
data: function (d) {
d.userId = $('#userId').val();
d.phoneNumber = $('#phoneNumber').val();
d.userEmail = $('#userEmail').val();
d.phoneType = $('#phoneType').val();
d.isRegisterGwell = $('#isRegisterGwell').val();
d.isRegisterJiguang = $('#isRegisterJiguang').val();
d.sortField = $('#sortField').val();
d.sortMode = $('#sortMode').val();
d.nickName = $('#nickName').val();
d.remarks = $('#remarks').val();
d.loginTime1 = $('#loginTime1').val();
d.loginTime2 = $('#loginTime2').val();
d.createTime1 = $('#createTime1').val();
d.createTime2 = $('#createTime2').val();
}
},
//数据展示
columns: [
@ -171,6 +335,8 @@
}
if (row.loginCount != null) {
str = str + "<span class='label label-info mr10 mb10'>" + row.loginCount + "</span>";
} else {
str = str + "<span class='label label-info mr10 mb10'>0</span>";
}
return str;
}
@ -190,9 +356,9 @@
render: function (data, type, row, meta) {
var str = "";
if (row.isRegisterGwell != null && row.isRegisterGwell == '1') {
str = "<span class='btn btn-dark btn-alt'>是</span></br>";
str = "<span class='btn btn-success btn-alt'>是</span></br>";
} else {
str = "<span class='btn btn-dark btn-alt'>否</span></br>";
str = "<span class='btn btn-danger btn-alt'>否</span></br>";
}
return str;
}
@ -202,9 +368,9 @@
render: function (data, type, row, meta) {
var str = "";
if (row.jiguangUserid != null && row.jiguangUserid == '') {
str = "<span class='btn btn-dark btn-alt'>是</span></br>";
str = "<span class='btn btn-success btn-alt'>是</span></br>";
} else {
str = "<span class='btn btn-dark btn-alt'>否</span></br>";
str = "<span class='btn btn-danger btn-alt'>否</span></br>";
}
return str;
}
@ -214,16 +380,26 @@
render: function (data, type, row, meta) {
var str = "";
if (row.remarks != null) {
str = str + "<span class='btn btn-dark btn-alt'>" + row.remarks + "</span></br>";
str = row.remarks;
}
return str;
}
},
{"data": "userId"},
{
"data": "userId",
render: function (data, type, row, meta) {
var str = "<a href='javascript:void(0);' onclick='remarks(" + row.userId + ",\"" + row.remarks + "\")' title='备注' class='label label-primary'><span class='fa-edit'></span></a>";
return str;
}
},
{"data": "userId"}
]
});
$('#userId').keyup(function () {
//table.ajax.reload(null, true);
});
});
</script>

View File

@ -323,7 +323,8 @@ $.cleanData = function( elems ) {
try {
$(elem).triggerHandler("remove");
// http://bugs.jquery.com/ticket/8235
} catch( e ) {}
} catch (e) {
}
}
_cleanData(elems);
};
@ -869,7 +870,9 @@ $.widget("ui.mouse", {
_mouseDown: function (event) {
// don't let more than one widget handle mouseStart
if( mouseHandled ) { return; }
if (mouseHandled) {
return;
}
// we may have missed mouseup (out of window)
(this._mouseStarted && this._mouseUp(event));
@ -976,7 +979,9 @@ $.widget("ui.mouse", {
_mouseStart: function (/* event */) {},
_mouseDrag: function (/* event */) {},
_mouseStop: function (/* event */) {},
_mouseCapture: function(/* event */) { return true; }
_mouseCapture: function (/* event */) {
return true;
}
});
})(jQuery);
@ -1375,8 +1380,7 @@ $.ui.position = {
if (newOverRight < 0 || newOverRight < abs(overLeft)) {
position.left += myOffset + atOffset + offset;
}
}
else if ( overRight > 0 ) {
} else if (overRight > 0) {
newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
if (newOverLeft > 0 || abs(newOverLeft) < overRight) {
position.left += myOffset + atOffset + offset;
@ -1410,8 +1414,7 @@ $.ui.position = {
if ((position.top + myOffset + atOffset + offset) > overTop && (newOverBottom < 0 || newOverBottom < abs(overTop))) {
position.top += myOffset + atOffset + offset;
}
}
else if ( overBottom > 0 ) {
} else if (overBottom > 0) {
newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
if ((position.top + myOffset + atOffset + offset) > overBottom && (newOverTop > 0 || abs(newOverTop) < overBottom)) {
position.top += myOffset + atOffset + offset;
@ -3031,14 +3034,15 @@ function Datepicker() {
prevText: "Prev", // Display text for previous month link
nextText: "Next", // Display text for next month link
currentText: "Today", // Display text for current month link
monthNames: ["January","February","March","April","May","June",
"July","August","September","October","November","December"], // Names of months for drop-down and formatting
monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], // For formatting
dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], // For formatting
dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], // For formatting
dayNamesMin: ["Su","Mo","Tu","We","Th","Fr","Sa"], // Column headings for days starting at Sunday
monthNames: ["一月", "二月", "三月", "四月", "五月", "六月",
"七月", "八月", "九月", "十月", "十一", "十二"], // Names of months for drop-down and formatting
monthNamesShort: ["一月", "二月", "三月", "四月", "五月", "六月",
"七月", "八月", "九月", "十月", "十一", "十二"], // For formatting
dayNames: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], // For formatting
dayNamesShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], // For formatting
dayNamesMin: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], // Column headings for days starting at Sunday
weekHeader: "Wk", // Column header for week of the year
dateFormat: "mm/dd/yy", // See format options on parseDate
dateFormat: "yy/mm/dd", // See format options on parseDate
firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
isRTL: false, // True if right-to-left language, false if left-to-right
showMonthAfterYear: false, // True if the year select precedes month, false for month then year
@ -3361,7 +3365,9 @@ $.extend(Datepicker.prototype, {
if (nodeName === "input") {
target.disabled = false;
inst.trigger.filter("button").
each(function() { this.disabled = false; }).end().
each(function () {
this.disabled = false;
}).end().
filter("img").css({opacity: "1.0", cursor: ""});
} else if (nodeName === "div" || nodeName === "span") {
inline = $target.children("." + this._inlineClass);
@ -3370,7 +3376,9 @@ $.extend(Datepicker.prototype, {
prop("disabled", false);
}
this._disabledInputs = $.map(this._disabledInputs,
function(value) { return (value === target ? null : value); }); // delete entry
function (value) {
return (value === target ? null : value);
}); // delete entry
},
/* Disable the date picker to a jQuery selection.
@ -3389,7 +3397,9 @@ $.extend(Datepicker.prototype, {
if (nodeName === "input") {
target.disabled = true;
inst.trigger.filter("button").
each(function() { this.disabled = true; }).end().
each(function () {
this.disabled = true;
}).end().
filter("img").css({opacity: "0.5", cursor: "default"});
} else if (nodeName === "div" || nodeName === "span") {
inline = $target.children("." + this._inlineClass);
@ -3398,7 +3408,9 @@ $.extend(Datepicker.prototype, {
prop("disabled", true);
}
this._disabledInputs = $.map(this._disabledInputs,
function(value) { return (value === target ? null : value); }); // delete entry
function (value) {
return (value === target ? null : value);
}); // delete entry
this._disabledInputs[this._disabledInputs.length] = target;
},
@ -3426,8 +3438,7 @@ $.extend(Datepicker.prototype, {
_getInst: function (target) {
try {
return $.data(target, PROP_NAME);
}
catch (err) {
} catch (err) {
throw "Missing instance data for this datepicker";
}
},
@ -3539,10 +3550,12 @@ $.extend(Datepicker.prototype, {
inst._keyEvent = true;
if ($.datepicker._datepickerShowing) {
switch (event.keyCode) {
case 9: $.datepicker._hideDatepicker();
case 9:
$.datepicker._hideDatepicker();
handled = false;
break; // hide on tab out
case 13: sel = $("td." + $.datepicker._dayOverClass + ":not(." +
case 13:
sel = $("td." + $.datepicker._dayOverClass + ":not(." +
$.datepicker._currentClass + ")", inst.dpDiv);
if (sel[0]) {
$.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
@ -3559,27 +3572,33 @@ $.extend(Datepicker.prototype, {
}
return false; // don't submit the form
case 27: $.datepicker._hideDatepicker();
case 27:
$.datepicker._hideDatepicker();
break; // hide on escape
case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
case 33:
$.datepicker._adjustDate(event.target, (event.ctrlKey ?
-$.datepicker._get(inst, "stepBigMonths") :
-$.datepicker._get(inst, "stepMonths")), "M");
break; // previous month/year on page up/+ ctrl
case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
case 34:
$.datepicker._adjustDate(event.target, (event.ctrlKey ?
+$.datepicker._get(inst, "stepBigMonths") :
+$.datepicker._get(inst, "stepMonths")), "M");
break; // next month/year on page down/+ ctrl
case 35: if (event.ctrlKey || event.metaKey) {
case 35:
if (event.ctrlKey || event.metaKey) {
$.datepicker._clearDate(event.target);
}
handled = event.ctrlKey || event.metaKey;
break; // clear on ctrl or command +end
case 36: if (event.ctrlKey || event.metaKey) {
case 36:
if (event.ctrlKey || event.metaKey) {
$.datepicker._gotoToday(event.target);
}
handled = event.ctrlKey || event.metaKey;
break; // current on ctrl or command +home
case 37: if (event.ctrlKey || event.metaKey) {
case 37:
if (event.ctrlKey || event.metaKey) {
$.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), "D");
}
handled = event.ctrlKey || event.metaKey;
@ -3591,12 +3610,14 @@ $.extend(Datepicker.prototype, {
}
// next month/year on alt +left on Mac
break;
case 38: if (event.ctrlKey || event.metaKey) {
case 38:
if (event.ctrlKey || event.metaKey) {
$.datepicker._adjustDate(event.target, -7, "D");
}
handled = event.ctrlKey || event.metaKey;
break; // -1 week on ctrl or command +up
case 39: if (event.ctrlKey || event.metaKey) {
case 39:
if (event.ctrlKey || event.metaKey) {
$.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), "D");
}
handled = event.ctrlKey || event.metaKey;
@ -3608,12 +3629,14 @@ $.extend(Datepicker.prototype, {
}
// next month/year on alt +right
break;
case 40: if (event.ctrlKey || event.metaKey) {
case 40:
if (event.ctrlKey || event.metaKey) {
$.datepicker._adjustDate(event.target, +7, "D");
}
handled = event.ctrlKey || event.metaKey;
break; // +1 week on ctrl or command +down
default: handled = false;
default:
handled = false;
}
} else if (event.keyCode === 36 && event.ctrlKey) { // display the date picker on ctrl+home
$.datepicker._showDatepicker(this);
@ -3655,8 +3678,7 @@ $.extend(Datepicker.prototype, {
$.datepicker._updateAlternate(inst);
$.datepicker._updateDatepicker(inst);
}
}
catch (err) {
} catch (err) {
}
}
return true;
@ -4011,7 +4033,9 @@ $.extend(Datepicker.prototype, {
altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat");
date = this._getDate(inst);
dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
$(altField).each(function() { $(this).val(dateStr); });
$(altField).each(function () {
$(this).val(dateStr);
});
}
},
@ -4372,10 +4396,14 @@ $.extend(Datepicker.prototype, {
}
} else {
switch (format.charAt(iFormat)) {
case "d": case "m": case "y": case "@":
case "d":
case "m":
case "y":
case "@":
chars += "0123456789";
break;
case "D": case "M":
case "D":
case "M":
return null; // Accept anything
case "'":
if (lookAhead("'")) {
@ -4441,8 +4469,7 @@ $.extend(Datepicker.prototype, {
try {
return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
offset, $.datepicker._getFormatConfig(inst));
}
catch (e) {
} catch (e) {
// Ignore
}
@ -4456,15 +4483,21 @@ $.extend(Datepicker.prototype, {
while (matches) {
switch (matches[2] || "d") {
case "d" : case "D" :
day += parseInt(matches[1],10); break;
case "w" : case "W" :
day += parseInt(matches[1],10) * 7; break;
case "m" : case "M" :
case "d" :
case "D" :
day += parseInt(matches[1], 10);
break;
case "w" :
case "W" :
day += parseInt(matches[1], 10) * 7;
break;
case "m" :
case "M" :
month += parseInt(matches[1], 10);
day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
break;
case "y": case "Y" :
case "y":
case "Y" :
year += parseInt(matches[1], 10);
day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
break;
@ -4667,11 +4700,18 @@ $.extend(Datepicker.prototype, {
calender += "<div class='ui-datepicker-group";
if (numMonths[1] > 1) {
switch (col) {
case 0: calender += " ui-datepicker-group-first";
cornerClass = " ui-corner-" + (isRTL ? "right" : "left"); break;
case numMonths[1]-1: calender += " ui-datepicker-group-last";
cornerClass = " ui-corner-" + (isRTL ? "left" : "right"); break;
default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break;
case 0:
calender += " ui-datepicker-group-first";
cornerClass = " ui-corner-" + (isRTL ? "right" : "left");
break;
case numMonths[1] - 1:
calender += " ui-datepicker-group-last";
cornerClass = " ui-corner-" + (isRTL ? "left" : "right");
break;
default:
calender += " ui-datepicker-group-middle";
cornerClass = "";
break;
}
}
calender += "'>";
@ -5201,7 +5241,8 @@ $.widget( "ui.dialog", {
// https://bugs.webkit.org/show_bug.cgi?id=47182
$(activeElement).blur();
}
} catch ( error ) {}
} catch (error) {
}
}
this._hide(this.uiDialog, this.options.hide, function () {
@ -6312,8 +6353,7 @@ $.widget("ui.draggable", $.ui.mouse, {
this.containment[ 2 ] + co.left,
this.containment[ 3 ] + co.top
];
}
else {
} else {
containment = this.containment;
}
@ -6492,7 +6532,9 @@ $.ui.plugin.add("draggable", "connectToSortable", {
//We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
this.instance.currentItem = $(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item", true);
this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
this.instance.options.helper = function() { return ui.helper[0]; };
this.instance.options.helper = function () {
return ui.helper[0];
};
event.target = this.instance.currentItem[0];
this.instance._mouseCapture(event, true);
@ -6743,7 +6785,9 @@ $.ui.plugin.add("draggable", "stack", {
return (parseInt($(a).css("zIndex"), 10) || 0) - (parseInt($(b).css("zIndex"), 10) || 0);
});
if (!group.length) { return; }
if (!group.length) {
return;
}
min = parseInt($(group[0]).css("zIndex"), 10) || 0;
$(group).each(function (i) {
@ -6928,7 +6972,10 @@ $.widget("ui.droppable", {
inst.options.scope === draggable.options.scope &&
inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) &&
$.ui.intersect(draggable, $.extend(inst, {offset: inst.element.offset()}), inst.options.tolerance)
) { childrenIntersection = true; return false; }
) {
childrenIntersection = true;
return false;
}
});
if (childrenIntersection) {
return false;
@ -7164,7 +7211,6 @@ $.effects = {
(function (jQuery, undefined) {
var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
// plusequals test for += 100 -= 100
rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
// a set of RE's that can match strings and generate color tuples.
@ -7220,7 +7266,6 @@ $.effects = {
];
}
}],
// jQuery.Color( )
color = jQuery.Color = function (color, green, blue, alpha) {
return new jQuery.Color.fn.parse(color, green, blue, alpha);
@ -7274,13 +7319,10 @@ $.effects = {
}
},
support = color.support = {},
// element for support tests
supportElem = jQuery("<p>")[ 0 ],
// colors = jQuery.Color.names
colors,
// local aliases of functions called often
each = jQuery.each;
@ -8070,16 +8112,30 @@ $.extend( $.effects, {
getBaseline: function (origin, original) {
var y, x;
switch (origin[ 0 ]) {
case "top": y = 0; break;
case "middle": y = 0.5; break;
case "bottom": y = 1; break;
default: y = origin[ 0 ] / original.height;
case "top":
y = 0;
break;
case "middle":
y = 0.5;
break;
case "bottom":
y = 1;
break;
default:
y = origin[ 0 ] / original.height;
}
switch (origin[ 1 ]) {
case "left": x = 0; break;
case "center": x = 0.5; break;
case "right": x = 1; break;
default: x = origin[ 1 ] / original.width;
case "left":
x = 0;
break;
case "center":
x = 0.5;
break;
case "right":
x = 1;
break;
default:
x = origin[ 1 ] / original.width;
}
return {
x: x,
@ -8402,7 +8458,8 @@ $.extend( baseEasings, {
var pow2,
bounce = 4;
while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
while (p < ((pow2 = Math.pow(2, --bounce)) - 1) / 11) {
}
return 1 / Math.pow(4, 3 - bounce) - 7.5625 * Math.pow((pow2 * 3 - 2) / 22 - p, 2);
}
});
@ -8496,7 +8553,6 @@ $.effects.effect.blind = function( o, done ) {
$.effects.effect.bounce = function (o, done) {
var el = $(this),
props = ["position", "top", "bottom", "left", "right", "height", "width"],
// defaults:
mode = $.effects.setMode(el, o.mode || "effect"),
hide = mode === "hide",
@ -8504,19 +8560,16 @@ $.effects.effect.bounce = function( o, done ) {
direction = o.direction || "up",
distance = o.distance,
times = o.times || 5,
// number of internal animations
anims = times * 2 + (show || hide ? 1 : 0),
speed = o.duration / anims,
easing = o.easing,
// utility:
ref = (direction === "up" || direction === "down") ? "top" : "left",
motion = (direction === "up" || direction === "left"),
i,
upAnim,
downAnim,
// we will need to re-assemble the queue to stack our animations in place
queue = el.queue(),
queuelen = queue.length;
@ -8706,15 +8759,12 @@ $.effects.effect.explode = function( o, done ) {
el = $(this),
mode = $.effects.setMode(el, o.mode || "hide"),
show = mode === "show",
// show and then visibility:hidden the element before calculating offset
offset = el.show().css("visibility", "hidden").offset(),
// width and height of a piece
width = Math.ceil(el.outerWidth() / cells),
height = Math.ceil(el.outerHeight() / rows),
pieces = [],
// loop
i, j, left, top, mx, my;
@ -8906,7 +8956,6 @@ $.effects.effect.pulsate = function( o, done ) {
show = mode === "show",
hide = mode === "hide",
showhide = (show || mode === "hide"),
// showing or hiding leaves of the "last" animation
anims = ((o.times || 5) * 2) + (showhide ? 1 : 0),
duration = o.duration / anims,
@ -9051,16 +9100,13 @@ $.effects.effect.size = function( o, done ) {
var original, baseline, factor,
el = $(this),
props0 = ["position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity"],
// Always restore
props1 = ["position", "top", "bottom", "left", "right", "overflow", "opacity"],
// Copy for children
props2 = ["width", "height", "overflow"],
cProps = ["fontSize"],
vProps = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"],
hProps = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"],
// Set options
mode = $.effects.setMode(el, o.mode || "effect"),
restore = o.restore || mode !== "effect",
@ -9271,7 +9317,6 @@ $.effects.effect.shake = function( o, done ) {
animation1 = {},
animation2 = {},
i,
// we will need to re-assemble the queue to stack our animations in place
queue = el.queue(),
queuelen = queue.length;
@ -10848,7 +10893,9 @@ $.ui.plugin.add("resizable", "containment", {
else {
element = $(ce);
p = [];
$([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); });
$(["Top", "Right", "Left", "Bottom"]).each(function (i, name) {
p[i] = num(element.css("padding" + name));
});
that.containerOffset = element.offset();
that.containerPosition = element.position();
@ -10960,8 +11007,14 @@ $.ui.plugin.add("resizable", "alsoResize", {
};
if (typeof (o.alsoResize) === "object" && !o.alsoResize.parentNode) {
if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
else { $.each(o.alsoResize, function (exp) { _store(exp); }); }
if (o.alsoResize.length) {
o.alsoResize = o.alsoResize[0];
_store(o.alsoResize);
} else {
$.each(o.alsoResize, function (exp) {
_store(exp);
});
}
} else {
_store(o.alsoResize);
}
@ -10976,7 +11029,6 @@ $.ui.plugin.add("resizable", "alsoResize", {
height: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0,
top: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0
},
_alsoResize = function (exp, c) {
$(exp).each(function () {
var el = $(this), start = $(this).data("ui-resizable-alsoresize"), style = {},
@ -10994,7 +11046,9 @@ $.ui.plugin.add("resizable", "alsoResize", {
};
if (typeof (o.alsoResize) === "object" && !o.alsoResize.nodeType) {
$.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); });
$.each(o.alsoResize, function (exp, c) {
_alsoResize(exp, c);
});
} else {
_alsoResize(o.alsoResize);
}
@ -11256,8 +11310,16 @@ $.widget("ui.selectable", $.ui.mouse, {
x2 = event.pageX,
y2 = event.pageY;
if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; }
if (y1 > y2) { tmp = y2; y2 = y1; y1 = tmp; }
if (x1 > x2) {
tmp = x2;
x2 = x1;
x1 = tmp;
}
if (y1 > y2) {
tmp = y2;
y2 = y1;
y1 = tmp;
}
this.helper.css({left: x1, top: y1, width: x2 - x1, height: y2 - y1});
this.selectees.each(function () {
@ -12541,7 +12603,9 @@ $.widget("ui.sortable", $.ui.mouse, {
o = o || {};
items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); });
items.each(function () {
ret.push($(o.item || this).attr(o.attribute || "id") || "");
});
return ret;
},
@ -12806,8 +12870,12 @@ $.widget("ui.sortable", $.ui.mouse, {
}
//If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); }
if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); }
if (!p.height()) {
p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop") || 0, 10) - parseInt(that.currentItem.css("paddingBottom") || 0, 10));
}
if (!p.width()) {
p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft") || 0, 10) - parseInt(that.currentItem.css("paddingRight") || 0, 10));
}
}
};
}
@ -12894,7 +12962,8 @@ $.widget("ui.sortable", $.ui.mouse, {
}
if (Math.abs(cur - base) < dist) {
dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
dist = Math.abs(cur - base);
itemWithLeastDistance = this.items[j];
this.direction = nearBottom ? "up" : "down";
}
}
@ -13197,19 +13266,33 @@ $.widget("ui.sortable", $.ui.mouse, {
}
if (this.fromOutside && !noPropagation) {
delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
delayedTriggers.push(function (event) {
this._trigger("receive", event, this._uiHash(this.fromOutside));
});
}
if ((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) {
delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
delayedTriggers.push(function (event) {
this._trigger("update", event, this._uiHash());
}); //Trigger update callback if the DOM position has changed
}
// Check if the items Container has Changed and trigger appropriate
// events.
if (this !== this.currentContainer) {
if (!noPropagation) {
delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
delayedTriggers.push(function (event) {
this._trigger("remove", event, this._uiHash());
});
delayedTriggers.push((function (c) {
return function (event) {
c._trigger("receive", event, this._uiHash(this));
};
}).call(this, this.currentContainer));
delayedTriggers.push((function (c) {
return function (event) {
c._trigger("update", event, this._uiHash(this));
};
}).call(this, this.currentContainer));
}
}

View File

@ -1070,7 +1070,7 @@
var navsub = navel.closest('.nav.sub');
//empty curmb
breadcrumb.empty();
breadcrumb.append('<li>'+homeIcon+'<a href="index.html">Home</a>'+rightArrow+'</li>');
breadcrumb.append('<li>'+homeIcon+'<a href="index">首页</a>'+rightArrow+'</li>');
if (navsub.closest('li').hasClass('hasSub')) {
//get previous

View File

@ -785,7 +785,7 @@
CANCEL : "Ακύρωση",
CONFIRM : "Επιβεβαίωση"
},
en : {
enE : {
OK : "OK",
CANCEL : "Cancel",
CONFIRM : "OK"
@ -855,7 +855,7 @@
CANCEL : "İptal",
CONFIRM : "Onayla"
},
zh_CN : {
en : {
OK : "OK",
CANCEL : "取消",
CONFIRM : "确认"