Vaadin 7.2 migration #PL-3929

This commit is contained in:
Yuriy Artamonov 2014-07-04 15:28:34 +00:00
parent 2c5c101704
commit ba97e15477
3 changed files with 32 additions and 14 deletions

View File

@ -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'

View File

@ -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();

View File

@ -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 {