npc 정책 UI
?가 아니라 본체를 선택해도 보이도록
This commit is contained in:
+39
-2
@@ -33,6 +33,35 @@ jQuery(function ($) {
|
|||||||
var $disabled = $(itemFrameDisabled.format('<비활성화 항목들>')).addClass('filtered');
|
var $disabled = $(itemFrameDisabled.format('<비활성화 항목들>')).addClass('filtered');
|
||||||
$disabledList.append($disabled);
|
$disabledList.append($disabled);
|
||||||
|
|
||||||
|
var lastInfoObj = null;
|
||||||
|
var lastInfoData = null;
|
||||||
|
|
||||||
|
var onChoose = function(evt){
|
||||||
|
//$(evt.item).find('.help-message').popopver('disable');
|
||||||
|
if(lastInfoObj){
|
||||||
|
lastInfoObj.popover('hide');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var onUnchoose = function(evt){
|
||||||
|
var $item = $(evt.item);//.find('.help-message').popopver('enable');
|
||||||
|
var $helpMessage = $item.find('.help-message');
|
||||||
|
if(!$helpMessage.length){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(lastInfoData != $item.data('value')){
|
||||||
|
$helpMessage.popover('show')
|
||||||
|
lastInfoData = $item.data('value');
|
||||||
|
lastInfoObj = $helpMessage;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$helpMessage.popover('hide');
|
||||||
|
lastInfoData = null;
|
||||||
|
lastInfoObj = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$.each(availablePriority, function (key, val) {
|
$.each(availablePriority, function (key, val) {
|
||||||
if (val in usedKey) {
|
if (val in usedKey) {
|
||||||
return true;
|
return true;
|
||||||
@@ -45,12 +74,16 @@ jQuery(function ($) {
|
|||||||
$disabledList.sortable({
|
$disabledList.sortable({
|
||||||
group: priorityKey,
|
group: priorityKey,
|
||||||
filter: '.filtered',
|
filter: '.filtered',
|
||||||
|
onChoose,onChoose,
|
||||||
|
onUnchoose:onUnchoose,
|
||||||
animation: 150
|
animation: 150
|
||||||
});
|
});
|
||||||
|
|
||||||
$enabledList.sortable({
|
$enabledList.sortable({
|
||||||
group: priorityKey,
|
group: priorityKey,
|
||||||
filter: '.filtered',
|
filter: '.filtered',
|
||||||
|
onChoose,onChoose,
|
||||||
|
onUnchoose:onUnchoose,
|
||||||
animation: 150
|
animation: 150
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -59,14 +92,18 @@ jQuery(function ($) {
|
|||||||
if(!(itemValue in btnHelpMessage)){
|
if(!(itemValue in btnHelpMessage)){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var helpText = btnHelpMessage[itemValue];
|
var helpText = btnHelpMessage[itemValue];
|
||||||
$item.find('.help-message').popover({
|
var $helpMessage = $item.find('.help-message');
|
||||||
|
$helpMessage.popover({
|
||||||
content:helpText,
|
content:helpText,
|
||||||
placement:'right',
|
placement:'right',
|
||||||
html:true,
|
html:true,
|
||||||
trigger:'hover'
|
trigger:'hover'
|
||||||
});
|
});
|
||||||
|
$item.mouseleave(function(){
|
||||||
|
$helpMessage.popover('hide');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user