private void addTagButtonClick(DomEvent e) { e.PreventDefault(); addTag(view.uiTagAutoSuggest.Text); view.uiTagAutoSuggest.Text = ""; }
private void OnBlur(DomEvent e) { if (GetDate() == null) { this.view.TextBox.Value = ""; } }
private void OnContainerKeyDown(DomEvent e) { if (e.KeyCode == (int) Key.Esc) { EventChosen(null); } }
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"); // } // ) // ); //} } ) ); }
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(); } }
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(); }
private void OnMouseDown(DomEvent e) { EventCreatorController.Instance.ShowPopup( this.EventInfo == null ? null : this.EventInfo.date, this.EventInfo == null ? null : this.EventInfo.venueInfo, this.EventInfo == null ? null : this.EventInfo.name, OnEventCreated); }
private void OnKeyDown(DomEvent e) { if ((Key)e.KeyCode == Key.Backspace || (Key)e.KeyCode == Key.Del) { this.EventInfo = null; this.view.uiEventDisplayDiv.InnerHTML = ""; } }
public static void HandleClick(AnchorElement anchor, DomEvent evt, AjaxOptions ajaxOptions) { evt.PreventDefault(); MvcHelpers.AsyncRequest(anchor.Href, "post", "", anchor, ajaxOptions); }
public void OnFocus(DomEvent ev) { Window.ClearTimeout(timeoutId); if (el.Value == watermark) { el.ClassName = ""; el.Value = ""; } }
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); }
private void AutoCompleteQueryGroupClick(DomEvent e) { if (this.view.uiJustBuddiesRadio.Checked) { this.view.uiBuddyMultiSelector.HtmlAutoComplete.SetWebMethod("GetBuddies"); } else { this.view.uiBuddyMultiSelector.HtmlAutoComplete.SetWebMethod("GetBuddiesThenUsrs"); } }
private void advancedCheckBoxClicked(DomEvent e) { // don't e.PreventDefault(); Login.WhenLoggedIn( new Action( delegate() { view.AddThreadAdvancedPanel.Style.Display = view.AddThreadAdvancedCheckBox.Checked ? "" : "none"; } ) ); }
void galleryChanged(DomEvent e) { for (int i = 0; i < view.uiCurrentGallery.ChildNodes.Length; i++) { if (((OptionElement)view.uiCurrentGallery.ChildNodes[i]).Selected) { int galleryK = int.ParseInvariant(((OptionElement)view.uiCurrentGallery.ChildNodes[i]).Value); ((EventPhotoProvider)PhotoProvider).setGallery(galleryK); view.uiPhotoControl.IsGallerySelectedChanged(galleryK > 0); view.uiPhotoBrowser.SelectedIndex = 0; PhotoBrowser.PaginationControl.CurrentPage = 1; } } }
private void ItemMouseEnterHandler(DomEvent e) { DOMElement el = e.Target; while (el.ParentNode != container) { el = el.ParentNode; } for (int i=0;i<container.ChildNodes.Length;i++) { if (container.ChildNodes[i] == el) { IndexOfCurrentlyHighlightedItem = i; return; } } }
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)); }
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); } }
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 voteConfirmYesButtonClick(DomEvent e) { e.PreventDefault(); FacebookAccountConfirmationStepDone = true; showLikePanelIfNeeded(); }
private void postCommentClick(DomEvent e) { e.PreventDefault(); Login.WhenLoggedIn( new Action( delegate() { postCommentClickInner(); } ) ); }
private void Element_OnChange(DomEvent e) { Type.SetField(e.Target, _hasTextChangedTag, true); }
private void Element_OnBlur(DomEvent e) { if ((bool)Type.GetField(e.Target, _hasTextChangedTag) || (bool)Type.GetField(e.Target, _hasValidationFiredTag)) { Validate("blur"); } }
// IE - contents of an input element changed private void Element_OnPropertyChange(DomEvent e) { if ((string)Type.GetField(e.RawEvent, "propertyName") == "value") { Type.SetField(e.Target, _hasTextChangedTag, true); if ((bool)Type.GetField(e.Target, _hasValidationFiredTag)) { Validate("input"); } } }
// Firefox, Opera, Safari, Chrome - contents of an input element changed private void Element_OnInput(DomEvent e) { Type.SetField(e.Target, _hasTextChangedTag, true); if ((bool)Type.GetField(e.Target, _hasValidationFiredTag)) { Validate("input"); } }
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 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 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 onMouseOver(DomEvent e) { mouseIsOverPopup = true; cancelMouseOut = true; }