mirror of
https://gitee.com/jmix/cuba.git
synced 2024-11-30 18:27:56 +08:00
Vaadin 7.2 migration #PL-3929
This commit is contained in:
parent
2c5c101704
commit
ba97e15477
@ -60,7 +60,7 @@ def webToolkitLegacyModule = project(':cuba-web6-toolkit')
|
||||
def webModuleThemes = project(':cuba-web-themes')
|
||||
def webLegacyModuleThemes = project(':cuba-web6-themes')
|
||||
|
||||
def vaadinVersion = '7.2.2.cuba.2'
|
||||
def vaadinVersion = '7.2.4.cuba.1'
|
||||
def vaadinLegacyVersion = '6.6.1.144'
|
||||
def springVersion = '3.2.8.RELEASE'
|
||||
def springSecurityVersion = '3.2.3.RELEASE'
|
||||
|
@ -147,9 +147,11 @@ public class CubaSearchSelectWidget extends VFilterSelect {
|
||||
protected void handleSelectionOnBlur() {
|
||||
if (tabPressedWhenPopupOpen) {
|
||||
tabPressedWhenPopupOpen = false;
|
||||
waitingForFilteringResponse = false;
|
||||
suggestionPopup.menu.doSelectedItemAction();
|
||||
suggestionPopup.hide();
|
||||
} else if (!suggestionPopup.isAttached() || suggestionPopup.isJustClosed()) {
|
||||
waitingForFilteringResponse = false;
|
||||
if (currentSuggestion == null) {
|
||||
if (tb.getText() != null && !"".equals(tb.getText().trim())) {
|
||||
suggestionPopup.menu.doSelectedItemAction();
|
||||
|
@ -31,20 +31,19 @@ public class CubaTooltip extends VTooltip {
|
||||
}
|
||||
|
||||
protected void showTooltip(boolean forceShow) {
|
||||
// Close current tooltip
|
||||
if (isActuallyVisible()) {
|
||||
closeNow();
|
||||
}
|
||||
|
||||
// Schedule timer for showing the tooltip according to if it was
|
||||
// recently closed or not.
|
||||
// Schedule timer for showing the tooltip according to if it
|
||||
// was recently closed or not.
|
||||
int timeout = 0;
|
||||
if (!forceShow) {
|
||||
timeout = justClosed ? getQuickOpenDelay() : getOpenDelay();
|
||||
}
|
||||
if (timeout == 0) {
|
||||
showTooltip();
|
||||
} else {
|
||||
showTimer.schedule(timeout);
|
||||
opening = true;
|
||||
}
|
||||
}
|
||||
|
||||
public class CubaTooltipEventHandler extends TooltipEventHandler {
|
||||
|
||||
@ -126,11 +125,23 @@ public class CubaTooltip extends VTooltip {
|
||||
return;
|
||||
}
|
||||
|
||||
// If the parent (sub)component already has a tooltip open and it
|
||||
// hasn't changed, we ignore the event.
|
||||
// TooltipInfo contains a reference to the parent component that is
|
||||
// checked in it's equals-method.
|
||||
if (currentElement != null && isTooltipOpen()) {
|
||||
TooltipInfo currentTooltip = getTooltipFor(currentElement);
|
||||
TooltipInfo newTooltip = getTooltipFor(element);
|
||||
if (currentTooltip != null && currentTooltip.equals(newTooltip)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
TooltipInfo info = getTooltipFor(element);
|
||||
if (info == null) {
|
||||
// close tooltip only if it is from button or checkbox
|
||||
if (currentConnector instanceof ButtonConnector || currentConnector instanceof CheckBoxConnector) {
|
||||
if (isActuallyVisible()) {
|
||||
if (isTooltipOpen()) {
|
||||
handleHideEvent();
|
||||
} else {
|
||||
currentConnector = null;
|
||||
@ -139,13 +150,18 @@ public class CubaTooltip extends VTooltip {
|
||||
} else {
|
||||
if ((domEvent instanceof ClickEvent && !isStandardTooltip(currentConnector))
|
||||
|| (!(domEvent instanceof ClickEvent) && isStandardTooltip(currentConnector))) {
|
||||
setTooltipText(info);
|
||||
updatePosition(event, isFocused);
|
||||
if (closing) {
|
||||
closeTimer.cancel();
|
||||
closing = false;
|
||||
}
|
||||
|
||||
if (isActuallyVisible()) {
|
||||
if (isTooltipOpen()) {
|
||||
closeNow();
|
||||
}
|
||||
|
||||
setTooltipText(info);
|
||||
updatePosition(event, isFocused);
|
||||
|
||||
if (isStandardTooltip(currentConnector)) {
|
||||
showTooltip(false);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user