public void button2Click(DomEvent e) { e.PreventDefault(); FB.api( F.d("method", "fql.query", "query", "SELECT type, created_time FROM page_fan WHERE page_id=\"18658586341\" AND uid=\"" + CurrentFacebookUID + "\""), new Response( delegate(Dictionary likeFqlResponse) { debug(U.toString(likeFqlResponse)); //if (U.exists(likeFqlResponse, "/value/type")) //{ // JQueryAPI.JQuery(View.ConnectDialog).dialog("close"); //} //else //{ // changePanel("View.Connect_LikeButtonPanel"); // FB.Event.subscribe( // "edge.create", // new Response( // delegate(Dictionary edgeCreateResponse) // { // JQueryAPI.JQuery(View.ConnectDialog).dialog("close"); // } // ) // ); //} } ) ); }
private void addTagButtonClick(DomEvent e) { e.PreventDefault(); addTag(view.uiTagAutoSuggest.Text); view.uiTagAutoSuggest.Text = ""; }
private void OnAddNearbyClick(DomEvent e) { try { Service.GetSurroundingPlaces ( int.ParseInvariant(this.view.uiRadiusPlaceAutoComplete.Value), int.ParseInvariant(this.view.uiNumberOfSurroundingTownsDropDown.Value), delegate(PlaceStub[] result, object context, string name) { for (int i = 0; i < result.Length; i++) { this.view.uiPlacesMultiSelector.AddItem(result[i].name, result[i].k.ToString()); } this.view.uiRadiusPlaceAutoComplete.Clear(); }, Trace.WebServiceFailure, null, 5000 ); }catch(Exception) { } e.PreventDefault(); }
public void button1Click(DomEvent e) { e.PreventDefault(); debug("click!"); FB.getLoginStatus( new Response( delegate(Dictionary statusResponse) { updateCurrentFacebookLoginStatus(statusResponse); } ) ); FB.Event.subscribe( "edge.create", new Response( delegate(Dictionary edgeCreateResponse) { debug("edge.create"); } ) ); }
private void OnKeyDown(DomEvent e) { if ("ABCDEFGHIJKLMNOPQRSTUVWXYZ,.;#[]".IndexOf(String.FromCharCode(e.KeyCode)) > -1) { e.PreventDefault(); } }
public static void HandleClick(AnchorElement anchor, DomEvent evt, AjaxOptions ajaxOptions) { evt.PreventDefault(); MvcHelpers.AsyncRequest(anchor.Href, "post", "", anchor, ajaxOptions); }
public static void HandleSubmit(FormElement form, DomEvent evt, AjaxOptions ajaxOptions) { evt.PreventDefault(); string body = MvcHelpers.SerializeForm(form); MvcHelpers.AsyncRequest(form.Action, form.Method ?? "post", body, form, ajaxOptions); }
protected void KeyDown(DomEvent e) { if (e.KeyCode == (int)Key.Right) { if (OnArrowKeyPress != null) OnArrowKeyPress(this, EventArgs.Empty); if (OnPhotoNextClick != null) OnPhotoNextClick(this, EventArgs.Empty); e.PreventDefault(); } else if (e.KeyCode == (int)Key.Left) { if (OnArrowKeyPress != null) OnArrowKeyPress(this, EventArgs.Empty); if (OnPhotoPrevClick != null) OnPhotoPrevClick(this, EventArgs.Empty); e.PreventDefault(); } //else if (e.KeyCode == (int)Key.Up) //{ // if (OnArrowKeyPress != null) // OnArrowKeyPress(this, EventArgs.Empty); // if (OnPhotoUpClick != null) // OnPhotoUpClick(this, EventArgs.Empty); // e.PreventDefault(); //} //else if (e.KeyCode == (int)Key.Down) //{ // if (OnArrowKeyPress != null) // OnArrowKeyPress(this, EventArgs.Empty); // if (OnPhotoDownClick != null) // OnPhotoDownClick(this, EventArgs.Empty); // e.PreventDefault(); //} else { NonArrowKeyDown(e); } }
private void OnAddClick(DomEvent e) { int[] brands = new int[]{}; if (view.uiBrand.Value.Length > 0) { brands[0] = int.ParseInvariant(view.uiBrand.Value); } Service.AddEvent( view.uiCal.GetDate(), view.uiVenueGetter.GetVenue().k, view.uiEventName.Text, view.uiSummary.Value, brands, AddEventSuccess, Trace.WebServiceFailure, null, 5000); e.PreventDefault(); }
private void photoClick(DomEvent e) { e.PreventDefault(); for (int i = 0; i < cells.Length; i++) { // Image Div(?) TableCell if (cells[i] == (TableCellElement)e.Target.ParentNode.ParentNode) { SelectedIndex = i; break; } } highlightCell(); if (OnChangePhoto != null) OnChangePhoto(this, new IntEventArgs(SelectedIndex)); }
public static void HandleSubmit(FormElement form, DomEvent evt, AjaxOptions ajaxOptions) { evt.PreventDefault(); // run validation ArrayList validationCallbacks = (ArrayList)Type.GetField(form, "validationCallbacks"); if (validationCallbacks != null) { for (int i = 0; i < validationCallbacks.Length; i++) { ValidationCallback callback = (ValidationCallback)validationCallbacks[i]; if (!callback()) { return; // bail out since validation failed } } } string body = MvcHelpers.SerializeForm(form); MvcHelpers.AsyncRequest(form.Action, form.Method ?? "post", body, form, ajaxOptions); }
void vote1VoteButtonClick(DomEvent e) { debug("vote1VoteButtonClick"); e.PreventDefault(); if (CurrentFacebookLoggedIn && CurrentFacebookConnected) { confirmFacebookAccount(); } else { #region login int asyncOperation = RegisterStartAsyncGeneric("Connecting...", false, false); // Don't set the timer to show the cencel button. FB.login( new Response( delegate(Dictionary loginResponse) { if (RegisterEndAsync(asyncOperation)) return; if (CurrentFacebookConnected) { confirmFacebookAccount(); } else { showError("Looks like Facebook had trouble getting you connected."); } } ), F.d("scope", "email,publish_stream") ); //Check out: http://developers.facebook.com/docs/authentication/permissions #endregion } }
void closeButtonClick(DomEvent e) { Area.Remove(this, true, false); e.PreventDefault(); }
void holderMouseOut(DomEvent e) { itemsListCancelMouseOut = false; Window.SetTimeout(itemsListMouseOutAfterDelay, 0); e.PreventDefault(); }
void holderMouseOver(DomEvent e) { itemsListCancelMouseOut = true; if (ItemsList != null) ItemsList.ClassName = "ChatClientPopupItemsList ChatClientPopupItemsListMouseOver"; e.PreventDefault(); }
void holderClick(DomEvent e) { if (Area.Animate) { try { Dictionary options = new Dictionary(); options["to"] = "#ChatClient_MessagesMain"; jHolder.effect("transfer", options, 500, null); } catch (Exception ex) { //JQueryAPI.JQuery("" } } if (ClickAction != null) ClickAction(RoomGuidForClickAction, null); Area.Remove(this, true, true); e.PreventDefault(); }
void confirmNoButtonClick(DomEvent e) { e.PreventDefault(); FacebookAccountConfirmationStepDone = true; int thisAsyncOperation = RegisterStartAsync("Logging out..."); FB.logout( new Response( delegate(Dictionary logoutResponse) { if (RegisterEndAsync(thisAsyncOperation)) return; View.VoteLikeHolder.Style.Display = "none"; //View.VoteFollowHolder.Style.Display = "none"; View.VoteButtonHolder.Style.Display = "none"; View.VoteConfirmHolder.Style.Display = "none"; //View.VoteTweetHolder.Style.Display = "none"; View.VoteLoggedOutHolder.Style.Display = ""; } ) ); }
void armaniSaveQuestionClick(DomEvent e) { e.PreventDefault(); int thisAsyncOperation1 = RegisterStartAsync("Saving..."); Server.SaveQuestion( EntryK, CompK, ImageUrl, View.ArmaniTextField.Value, new Response( delegate(Dictionary response) { if (RegisterEndAsync(thisAsyncOperation1)) return; if (U.isTrue(response, "Exception")) { showError("Looks like we had a problem..."); } else if (!U.isTrue(response, "Done")) { showError(U.get(response, "Message").ToString()); } else { changePanel(View.Vote2Panel); View.ArmaniSavedLabel.Style.Display = ""; } } ) ); }
void HandleKeyDown(DomEvent e) { if (e.KeyCode == (int)Key.Up) { if (popupMenu != null) popupMenu.IndexOfCurrentlyHighlightedItem -= 1; } else if (e.KeyCode == (int)Key.Down) { if (popupMenu != null) { popupMenu.IndexOfCurrentlyHighlightedItem += 1; } } else if (e.KeyCode == (int)Key.Esc) { if (this.popupMenu.CurrentlyHighlightedItem != null) { Clear(); e.PreventDefault(); } else { Cancel(); } } else if ((e.KeyCode == (int)Key.Tab && !e.ShiftKey) || e.KeyCode == (int)Key.Enter) { if (mode == HtmlAutoCompleteMode.Suggest) { if (SuggestionIsHighlighted) { e.PreventDefault(); ItemSelected(this.popupMenu.CurrentlyHighlightedItem); popupMenu.Clear(); return; } else { if (ValidSelectionHasBeenMade) { KeyValuePair pair = new KeyValuePair(); pair.Key = this.input.Value; pair.Value = this.input.Value; ItemSelected(pair); return; } } } else if (mode == HtmlAutoCompleteMode.Complete) { if (SuggestionIsHighlighted && !ValidSelectionHasBeenMade) { if (e.KeyCode == (int)Key.Enter) e.PreventDefault(); ItemSelected(this.popupMenu.CurrentlyHighlightedItem); return; } } } else if (e.KeyCode == (int)Key.Backspace && mode == HtmlAutoCompleteMode.Complete) { Suggestions.Clear(); if (this.ValidSelectionHasBeenMade) { this.hiddenInput.Value = ""; this.input.Value = ""; } else { this.hiddenInput.Value = ""; RequestSuggestions(); ; } } else if (e.KeyCode == (int)Key.Del && mode == HtmlAutoCompleteMode.Complete) { this.hiddenInput.Value = ""; RequestSuggestions(); ; } }
private void CallOnFocus(DomEvent e) { e.PreventDefault(); Login.WhenLoggedIn( new Action( delegate() { this.Focus(); if (OnFocus != null) OnFocus(e); } ) ); }
void voteButtonClick(DomEvent e) { debug("ButtonClick"); e.PreventDefault(); if (CurrentFacebookLoggedIn && CurrentFacebookConnected) { confirmFacebookAccount(); } else { doLogin(); } }
public void forwardLinkClick(DomEvent e) { e.PreventDefault(); view.Picker.DateModify(7, "d"); }
public void backLinkClick(DomEvent e) { e.PreventDefault(); view.Picker.DateModify(-7, "d"); }
void loggedOutButtonClick(DomEvent e) { e.PreventDefault(); doLogin(); }
void voteConfirmYesButtonClick(DomEvent e) { e.PreventDefault(); FacebookAccountConfirmationStepDone = true; showLikePanelIfNeeded(); }
void nextPageClick(DomEvent e) { e.PreventDefault(); this.RefreshBanners(); this.pageNumber++; this.LoadThreadComments(); Misc.RedirectToAnchor(CommentsAnchorName); }
void voteConfirmNoButtonClick(DomEvent e) { e.PreventDefault(); FacebookAccountConfirmationStepDone = true; int thisAsyncOperation = RegisterStartAsync("Logging out..."); FB.logout( new Response( delegate(Dictionary logoutResponse) { if (RegisterEndAsync(thisAsyncOperation)) return; changePanel(View.Vote1Panel); } ) ); }
void pageClick(DomEvent e) { e.PreventDefault(); this.RefreshBanners(); this.pageNumber = (int)e.Target.GetAttribute("pagenumber"); this.LoadThreadComments(); Misc.RedirectToAnchor(CommentsAnchorName); }
private void postCommentClick(DomEvent e) { e.PreventDefault(); Login.WhenLoggedIn( new Action( delegate() { postCommentClickInner(); } ) ); }
void confirmYesButtonClick(DomEvent e) { e.PreventDefault(); FacebookAccountConfirmationStepDone = true; voteNow(); }