0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-11-22 01:07:56 +01:00

Turning popupMask in a Button

This commit is contained in:
peteruithoven 2014-01-16 12:04:55 +01:00
parent a952a1ee7b
commit fc8c83ae19
3 changed files with 6 additions and 4 deletions

View File

@ -1,11 +1,11 @@
function showPopup(popup) {
$("#popupMask").fadeIn(POPUP_SHOW_DURATION);
popupMask.fadeIn(POPUP_SHOW_DURATION);
popup.fadeIn(POPUP_SHOW_DURATION);
keyboardShortcutsEnabled=false;
}
function hidePopup(popup) {
$("#popupMask").fadeOut(POPUP_SHOW_DURATION);
popupMask.fadeOut(POPUP_SHOW_DURATION);
popup.fadeOut(POPUP_SHOW_DURATION);
keyboardShortcutsEnabled=true;
}

View File

@ -8,13 +8,13 @@ function initWordArt() {
function showWordArtDialog() {
buttonGroupAdd.hide();
showPopup(popupWordArt);
$("#popupMask").bind("click", onWordArtCancel);
popupMask.bind("onButtonClick", onWordArtCancel);
$("#txtWordArt").focus();
$("#txtWordArt").val(""); //clear textbox
}
function onWordArtCancel() {
$("#popupMask").unbind("click");
popupMask.unbind("onButtonClick");
hidePopup(popupWordArt);
}

View File

@ -48,7 +48,9 @@ function initButtonBehavior() {
buttonGroupVerticalShapes = $("#buttonGroupVerticalShapes");
popupWordArt = $("#popupWordArt");
popupShape = $("#popupShape");
popupMask = $("#popupMask");
popupMask.Button();
btnNew.on("onButtonClick", onBtnNew);
btnAdd.on("onButtonClick", onBtnAdd);
btnWordArt.on("onButtonClick", onBtnWordArt);