Esempio n. 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;
     }
 }
Esempio n. 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;
         }
     }
 }
Esempio n. 3
0
        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;
            }
        }
Esempio n. 4
0
 protected virtual void OnCommandButtons(CommandButtonsEventArgs e)
 {
 }
Esempio n. 5
0
 protected void contentView_CommandButtonsAction(object sender, CommandButtonsEventArgs e)
 {
     this.OnCommandButtons(e);
 }
Esempio n. 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;
     }
 }