public void GoToHistory() { if (Collab.ShowHistoryWindow != null) { Collab.ShowHistoryWindow(); } }
public override void EnterState() { //If we haven't received new bound info, fetch them var generalTemplate = EditorGUIUtility.Load(k_CollaborateEnabledUxmlPath) as VisualTreeAsset; var scrollContainer = provider.rootVisualElement.Q(null, k_ServiceScrollContainerClassName); var newVisual = generalTemplate.CloneTree().contentContainer; ServicesUtils.TranslateStringsInTree(newVisual); scrollContainer.Clear(); scrollContainer.Add(newVisual); m_CollabPublishSection = scrollContainer.Q(k_CollabPublishSection); m_CollabHistorySection = scrollContainer.Q(k_CollabHistorySection); // Don't show the Publish and History section by default if (m_CollabHistorySection != null) { m_CollabHistorySection.style.display = DisplayStyle.None; } if (m_CollabPublishSection != null) { m_CollabPublishSection.style.display = DisplayStyle.None; } var openHistory = provider.rootVisualElement.Q(k_OpenHistoryLink) as Button; if (openHistory != null) { openHistory.clicked += () => { if (Collab.ShowHistoryWindow != null) { Collab.ShowHistoryWindow(); } }; } Button openChangesLinkBtn = provider.rootVisualElement.Q(k_OpenChangesLink) as Button; if (openChangesLinkBtn != null) { openChangesLinkBtn.clicked += () => { if (Collab.ShowChangesWindow != null) { Collab.ShowChangesWindow(); } }; } var gotoWebDashboard = scrollContainer.Q(k_GoToWebDashboardLink); if (gotoWebDashboard != null) { var clickable = new Clickable(() => { ServicesConfiguration.instance.RequestBaseCloudUsageDashboardUrl(baseCloudUsageDashboardUrl => { provider.OpenDashboardOrgAndProjectIds(baseCloudUsageDashboardUrl); }); }); gotoWebDashboard.AddManipulator(clickable); } // Prepare the package section and update the package information PreparePackageSection(scrollContainer); UpdatePackageInformation(); provider.HandlePermissionRestrictedControls(); }