示例#1
0
 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;
     }
 }
示例#2
0
 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;
            }
        }
示例#4
0
 protected virtual void OnCommandButtons(CommandButtonsEventArgs e)
 {
 }
示例#5
0
 protected void contentView_CommandButtonsAction(object sender, CommandButtonsEventArgs e)
 {
     this.OnCommandButtons(e);
 }
示例#6
0
 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;
     }
 }