Add Brief intro. for all personal plugins
Add Share Setting for Personal Plugins ( if have old data must be add default value "field: is_hidden => false " ) Apply New UI to Member Plugin Edit Page Personal Plugin Summary fix Academic Info. list fix
This commit is contained in:
1 parent
b487740035
commit
a067bcd304
159 files changed
+5145
-3453
No files matched your search
@@ -0,0 +1,105 @@
|
||||
var ListCheck = function(element) {
|
||||
this.element = $(element);
|
||||
this.element.data('exists', true);
|
||||
if(this.element.context.parentNode.tagName == "TD") {
|
||||
this.elementWrap = $(this.element.context.parentNode);
|
||||
this.elementWrap.addClass('listCheck');
|
||||
} else if(this.element.context.parentNode.tagName == "TH") {
|
||||
this.elementWrap = $(this.element.context.parentNode);
|
||||
this.elementWrap.addClass('listCheckHead');
|
||||
}
|
||||
this.element.before('<i class="icon-check-empty" />');
|
||||
};
|
||||
|
||||
$.fn.listCheck = function (callback) {
|
||||
this.each(function (i) {
|
||||
if(!$(this).data('exists')) {
|
||||
new ListCheck(this);
|
||||
};
|
||||
});
|
||||
this.on(clickEvent, function(e) {
|
||||
if($(this).prop('checked')) {
|
||||
$(this).siblings('i').addClass('icon-check').removeClass('icon-check-empty').closest('tr').addClass('checkHit');
|
||||
} else {
|
||||
$(this).siblings('i').addClass('icon-check-empty').removeClass('icon-check').closest('tr').removeClass('checkHit');
|
||||
};
|
||||
if ($(this).closest('.listCheckHead').length) {
|
||||
$('.listCheck .list-check').prop('checked', $(this).prop('checked'));
|
||||
if($(this).prop('checked')) {
|
||||
$('.listCheck i').addClass('icon-check').removeClass('icon-check-empty').closest('tr').addClass('checkHit');
|
||||
} else {
|
||||
$('.listCheck i').addClass('icon-check-empty').removeClass('icon-check').closest('tr').removeClass('checkHit');
|
||||
}
|
||||
};
|
||||
|
||||
var _isCheck = $('tbody .list-check').filter(':checked').length,
|
||||
_defaultLength = $('tbody .list-check').length;
|
||||
|
||||
if(_isCheck > 0 && _isCheck < _defaultLength) {
|
||||
$('.listCheckHead i').removeClass('icon-check-empty icon-check').addClass('icon-minus');
|
||||
} else if(!_isCheck) {
|
||||
$('.listCheckHead i').removeClass('icon-minus icon-check').addClass('icon-check-empty');
|
||||
} else {
|
||||
$('.listCheckHead i').removeClass('icon-check-empty icon-minus').addClass('icon-check');
|
||||
}
|
||||
_isCheck ? $('.list-active-btn').removeClass('disabled').data('actionable', true) : $('.list-active-btn').addClass('disabled').data('actionable', false);
|
||||
});
|
||||
};
|
||||
function clearCheck() {
|
||||
$('.list-check').each(function() {
|
||||
$(this).prop('checked', false);
|
||||
})
|
||||
}
|
||||
function actionSuccess(e) {
|
||||
$("tbody .list-check").each(function() {
|
||||
switch(e) {
|
||||
case 'list-be-hide':
|
||||
$(this).filter(':checked').closest('tr').addClass('checkHide');
|
||||
break;
|
||||
case 'list-be-show':
|
||||
$(this).filter(':checked').closest('tr').removeClass('checkHide');
|
||||
break;
|
||||
case 'list-be-remove':
|
||||
$(this).filter(':checked').closest('tr').fadeOut(300, function() {
|
||||
$(this).remove();
|
||||
});
|
||||
break;
|
||||
};
|
||||
$('.list-check').siblings('i').removeAttr('class').addClass('icon-check-empty').closest('tr').removeClass('checkHit');
|
||||
});
|
||||
clearCheck();
|
||||
}
|
||||
$(function() {
|
||||
var $t = null,
|
||||
_data = null;
|
||||
clearCheck();
|
||||
$('.list-check').listCheck();
|
||||
$('.list-active-btn').data('actionable', false).on(clickEvent, function(e) {
|
||||
$t = $(this)
|
||||
_data = $(this).data()
|
||||
_data.actionable ? $('#dialog').modal('show') : "";
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$("#dialog").on('show', function (e) {
|
||||
$(this).find('.delete-item').on(clickEvent, function() {
|
||||
var _v = [];
|
||||
$("tbody .list-check").each(function() {
|
||||
this.checked && _v.push("ids[]="+this.value)
|
||||
});
|
||||
var _t = $t.attr("rel");
|
||||
if(_t.indexOf("?") > -1) {
|
||||
$.ajax(_t + "&" + _v.join("&")).done(function() {
|
||||
actionSuccess(_data.checkAction)
|
||||
});
|
||||
} else {
|
||||
$.ajax(_t + "?" + _v.join("&")).done(function() {
|
||||
actionSuccess(_data.checkAction)
|
||||
});
|
||||
}
|
||||
$('#dialog').modal('hide');
|
||||
$('.list-active-btn').addClass('disabled').data('actionable', false);
|
||||
e.preventDefault();
|
||||
})
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,28 @@
|
||||
.table .listCheckHead,
|
||||
.table .listCheck {
|
||||
width: 30px;
|
||||
vertical-align: middle;
|
||||
padding: 0 0 0 10px!important;
|
||||
}
|
||||
.listCheckHead .list-check,
|
||||
.listCheck .list-check {
|
||||
position: absolute;
|
||||
margin: -12px 0 0 -1px;
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
|
||||
opacity: 0;
|
||||
}
|
||||
.listCheckHead i,
|
||||
.listCheck i {
|
||||
display: block;
|
||||
}
|
||||
.checkHide td {
|
||||
background-color: #E6E6E6 !important;
|
||||
color: #B9B9B9;
|
||||
}
|
||||
.checkHide a {
|
||||
color: #B9B9B9;
|
||||
}
|
||||
.checkHit td {
|
||||
background-color: #FFFEDB !important;
|
||||
}
|
||||
@@ -3,9 +3,9 @@
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@@ -364,6 +364,9 @@
|
||||
#profile #module-navbar {
|
||||
margin-left: 10px;
|
||||
}
|
||||
#profile #module-navbar .navbar {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
#profile #member-module {
|
||||
margin-left: 360px;
|
||||
}
|
||||
@@ -372,9 +375,13 @@
|
||||
}
|
||||
#profile #member-module #module-content .content {
|
||||
right: 10px;
|
||||
padding-bottom: 10px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#profile #member-module #module-content .list-active {
|
||||
padding-bottom: 8px;
|
||||
/*border-bottom: 1px solid #DDD;*/
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media (max-width: 979px) {
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
margin-top: 4px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.topnav .btn-group {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/* Bottom Nav */
|
||||
.bottomnav {
|
||||
|
||||
Reference in new issue
Block a user