예제 #1
0
파일: page.cs 프로젝트: tralivali1234/IL2JS
        private void RibbonInitFunc1()
        {
            RibbonBuildOptions rbOpts = new RibbonBuildOptions();

            rbOpts.LazyTabInit             = true;
            rbOpts.ShallowTabs             = true;
            rbOpts.LazyMenuInit            = true;
            rbOpts.AttachToDOM             = false;
            rbOpts.InitialScalingIndex     = 0;
            rbOpts.ValidateServerRendering = false;

            rbOpts.ShowQATId                  = "";
            rbOpts.ShowJewelId                = "";
            rbOpts.ShownContextualGroups      = null;
            rbOpts.FixedPositioningEnabled    = false;
            rbOpts.NormalizedContextualGroups = null;

            rbOpts.DataExtensions           = null;
            rbOpts.TrimEmptyGroups          = true;
            rbOpts.ScalingHint              = "-1819788779";
            rbOpts.ClientID                 = "RibbonContainer";
            rbOpts.Minimized                = _ribbon.GetField <bool>("buildMinimized");
            rbOpts.LaunchedByKeyboard       = _ribbon.GetField <bool>("launchedByKeyboard");
            rbOpts.InitialTabSelectedByUser = _ribbon.GetField <bool>("initialTabSelectedByUser");

            rbOpts.ShownTabs = new Dictionary <string, bool>();
            rbOpts.ShownTabs.Add("Ribbon.Read", true);
            rbOpts.ShownTabs.Add("Ribbon.Library", true);
            rbOpts.ShownTabs.Add("Ribbon.Document", true);

            rbOpts.InitiallyVisibleContextualGroups = new Dictionary <string, bool>();
            rbOpts.InitiallyVisibleContextualGroups.Add("Ribbon.LibraryContextualGroup", true);

            rbOpts.TrimmedIds = new Dictionary <string, bool>();
            rbOpts.TrimmedIds.Add("Ribbon.List.GanttView", true);
            rbOpts.TrimmedIds.Add("Ribbon.List.Share.AlertMe", true);
            rbOpts.TrimmedIds.Add("Ribbon.Library.Share.AlertMe", true);
            rbOpts.TrimmedIds.Add("Ribbon.Documents.FormActions", true);
            rbOpts.TrimmedIds.Add("Ribbon.ListItem.Share.AlertMe", true);
            rbOpts.TrimmedIds.Add("Ribbon.Documents.Share.AlertMe", true);
            rbOpts.TrimmedIds.Add("Ribbon.List.Actions.AllMeetings", true);
            rbOpts.TrimmedIds.Add("Ribbon.WebPartPage.Share.AlertMe", true);
            rbOpts.TrimmedIds.Add("Ribbon.Library.Actions.AllMeetings", true);
            rbOpts.TrimmedIds.Add("Ribbon.Calendar.Events.Share.AlertMe", true);
            rbOpts.TrimmedIds.Add("Ribbon.Calendar.Calendar.Share.AlertMe", true);
            rbOpts.TrimmedIds.Add("Ribbon.ListItem.Actions.ChangeItemOrder", true);
            rbOpts.TrimmedIds.Add("Ribbon.WebPartInsert.InsertRelatedDataToListForm", true);

            // Get parent Ribbon Container and prepare to build
            HtmlElement   ribbonCont = Browser.Document.GetById("RibbonContainer");
            RibbonBuilder builder    = new RibbonBuilder(rbOpts, ribbonCont, PageManager.Instance);

            // Set the data source and build tab
            DataSource dataSource = new DataSource("\u002f_layouts\u002fcommandui.ashx", "-829476993", "1033");

            builder.DataSource = dataSource;
            builder.BuildRibbonAndInitialTab(_ribbon.GetField <string>("initialTabId"));

            PMetrics.PerfReport();
        }
예제 #2
0
 public RibbonBuilder(RibbonBuildOptions options,
                      HtmlElement elmPlaceholder,
                      IRootBuildClient rootBuildClient)
     : base(options, elmPlaceholder, rootBuildClient)
 {
     if (CUIUtility.IsNullOrUndefined(elmPlaceholder))
         throw new ArgumentNullException("Ribbon placeholder DOM element is null or undefined.");
 }
예제 #3
0
 public RibbonBuilder(RibbonBuildOptions options,
                      HtmlElement elmPlaceholder,
                      IRootBuildClient rootBuildClient)
     : base(options, elmPlaceholder, rootBuildClient)
 {
     if (CUIUtility.IsNullOrUndefined(elmPlaceholder))
     {
         throw new ArgumentNullException("Ribbon placeholder DOM element is null or undefined.");
     }
 }
예제 #4
0
파일: page.cs 프로젝트: modulexcite/IL2JS
        private void RibbonInitFunc1()
        {
            RibbonBuildOptions rbOpts = new RibbonBuildOptions();
            rbOpts.LazyTabInit = true;
            rbOpts.ShallowTabs = true;
            rbOpts.LazyMenuInit = true;
            rbOpts.AttachToDOM = false;
            rbOpts.InitialScalingIndex = 0;
            rbOpts.ValidateServerRendering = false;

            rbOpts.ShowQATId = "";
            rbOpts.ShowJewelId = "";
            rbOpts.ShownContextualGroups = null;
            rbOpts.FixedPositioningEnabled = false;
            rbOpts.NormalizedContextualGroups = null;

            rbOpts.DataExtensions = null;
            rbOpts.TrimEmptyGroups = true;
            rbOpts.ScalingHint = "-1819788779";
            rbOpts.ClientID = "RibbonContainer";
            rbOpts.Minimized = _ribbon.GetField<bool>("buildMinimized");
            rbOpts.LaunchedByKeyboard = _ribbon.GetField<bool>("launchedByKeyboard");
            rbOpts.InitialTabSelectedByUser = _ribbon.GetField<bool>("initialTabSelectedByUser");

            rbOpts.ShownTabs = new Dictionary<string, bool>();
            rbOpts.ShownTabs.Add("Ribbon.Read", true);
            rbOpts.ShownTabs.Add("Ribbon.Library", true);
            rbOpts.ShownTabs.Add("Ribbon.Document", true);

            rbOpts.InitiallyVisibleContextualGroups = new Dictionary<string, bool>();
            rbOpts.InitiallyVisibleContextualGroups.Add("Ribbon.LibraryContextualGroup", true);

            rbOpts.TrimmedIds = new Dictionary<string, bool>();
            rbOpts.TrimmedIds.Add("Ribbon.List.GanttView", true);
            rbOpts.TrimmedIds.Add("Ribbon.List.Share.AlertMe", true);
            rbOpts.TrimmedIds.Add("Ribbon.Library.Share.AlertMe", true);
            rbOpts.TrimmedIds.Add("Ribbon.Documents.FormActions", true);
            rbOpts.TrimmedIds.Add("Ribbon.ListItem.Share.AlertMe", true);
            rbOpts.TrimmedIds.Add("Ribbon.Documents.Share.AlertMe", true);
            rbOpts.TrimmedIds.Add("Ribbon.List.Actions.AllMeetings", true);
            rbOpts.TrimmedIds.Add("Ribbon.WebPartPage.Share.AlertMe", true);
            rbOpts.TrimmedIds.Add("Ribbon.Library.Actions.AllMeetings", true);
            rbOpts.TrimmedIds.Add("Ribbon.Calendar.Events.Share.AlertMe", true);
            rbOpts.TrimmedIds.Add("Ribbon.Calendar.Calendar.Share.AlertMe", true);
            rbOpts.TrimmedIds.Add("Ribbon.ListItem.Actions.ChangeItemOrder", true);
            rbOpts.TrimmedIds.Add("Ribbon.WebPartInsert.InsertRelatedDataToListForm", true);

            // Get parent Ribbon Container and prepare to build
            HtmlElement ribbonCont = Browser.Document.GetById("RibbonContainer");
            RibbonBuilder builder = new RibbonBuilder(rbOpts, ribbonCont, PageManager.Instance);

            // Set the data source and build tab
            DataSource dataSource = new DataSource("\u002f_layouts\u002fcommandui.ashx", "-829476993", "1033");
            builder.DataSource = dataSource;
            builder.BuildRibbonAndInitialTab(_ribbon.GetField<string>("initialTabId"));

            PMetrics.PerfReport();
        }