From 4abd6fa9adbddf6d4bd8909129c4e9c78316a144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Rom=C3=A1n?= Date: Wed, 28 Apr 2021 18:19:32 -0700 Subject: [PATCH] feat: add 8.1.5 changes Closes #36 --- src/system/__init__.py | 4 +-- src/system/perspective/__init__.py | 42 +++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/src/system/__init__.py b/src/system/__init__.py index b6864be..21e9212 100644 --- a/src/system/__init__.py +++ b/src/system/__init__.py @@ -14,5 +14,5 @@ Scripting section. """ -__version__ = "8.1.4" -__build__ = "2021040109" +__version__ = "8.1.5" +__build__ = "2021042810" diff --git a/src/system/perspective/__init__.py b/src/system/perspective/__init__.py index fe55435..f7d6702 100644 --- a/src/system/perspective/__init__.py +++ b/src/system/perspective/__init__.py @@ -24,6 +24,8 @@ "login", "logout", "navigate", + "navigateBack", + "navigateForward", "openDock", "openPopup", "print", @@ -385,6 +387,7 @@ def navigate( params=None, sessionId="current_session", pageId="current_page", + newTab=False, ): """ Navigate the session to a specified view or mounted page. @@ -420,10 +423,47 @@ def navigate( must be included in the call. Optional. pageId (str): Identifier of the Page to target. If omitted, the current Page will be used automatically. Optional. + newTab (bool): If True, opens the contents in a new tab. + Optional. + """ + from __builtin__ import print + + print(page, url, view, params, sessionId, pageId, newTab) + + +def navigateBack(sessionId=None, pageId=None): + """ + Navigate the session to a specified view or mounted page. This is + similar to a browser's "back" function. + + Args: + sessionId (str): Identifier of the Session to target. If + omitted, the current Session will be used automatically. + Optional. + pageId (str): Identifier of the page to target. If omitted, the + current page will be used automatically. Optional. + """ + from __builtin__ import print + + print(sessionId, pageId) + + +def navigateForward(sessionId=None, pageId=None): + """ + Navigate the session to a specified view or mounted page. This is + similar to a browser's "forward" function. + + Args: + sessionId (str): Identifier of the Session to target. If + omitted, the current Session will be used automatically. + When targeting a different session, then the pageId + parameter must be included in the call. Optional. + pageId (str): Identifier of the page to target. If omitted, the + current page will be used automatically. Optional. """ from __builtin__ import print - print(page, url, view, params, sessionId, pageId) + print(sessionId, pageId) def openDock(