protected override void OnCommandButtons(CommandButtonsEventArgs e) { switch (e.ButtonType) { case CommandButtonType.CheckoutSave: case CommandButtonType.CheckoutSaveCheckin: case CommandButtonType.Publish: case CommandButtonType.Save: case CommandButtonType.SaveCheckin: e.Cancel = true; this.HandleTagReplacement(e.ContentView); break; } }
public void OnCommandButtonsAction(object sender, CommandButtonType commandButtonType, string customCommand, out bool cancelled) { cancelled = false; if (CommandButtonsAction != null) { NeedToValidate = true; var args = new CommandButtonsEventArgs(commandButtonType, this, customCommand); CommandButtonsAction(sender, args); if (args.Cancel) { cancelled = true; } } }
protected void ContentView_CommandButtonsAction(object sender, CommandButtonsEventArgs e) { if (e.ButtonType == CommandButtonType.Cancel) return; e.ContentView.UpdateContent(); var cic = e.ContentView.Content["CheckInComments"] as string; var gc = e.ContentView.ContentHandler as GenericContent; if (gc == null || (gc.CheckInCommentsMode == CheckInCommentsMode.Compulsory && string.IsNullOrEmpty(cic))) { e.ContentView.ContentException = new Exception(HttpContext.GetGlobalResourceObject("Portal", "CheckInCommentsCompulsory") as string); e.Cancel = true; } }
protected virtual void OnCommandButtons(CommandButtonsEventArgs e) { }
protected void contentView_CommandButtonsAction(object sender, CommandButtonsEventArgs e) { this.OnCommandButtons(e); }
public void OnCommandButtonsAction(object sender, CommandButtonType commandButtonType, string customCommand, out bool cancelled) { cancelled = false; if (CommandButtonsAction != null) { NeedToValidate = true; var args = new CommandButtonsEventArgs(commandButtonType, this, customCommand); CommandButtonsAction(sender, args); if (args.Cancel) cancelled = true; } }