Skip to content

Commit

Permalink
Merge pull request #11 from psteiwer/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
psteiwer authored May 21, 2019
2 parents 4eaaefc + 78dcc66 commit 99841ab
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 30 deletions.
5 changes: 2 additions & 3 deletions PivotSubscriptions/UI/Dialog/EditSubscription.cls
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ Parameter APPLICATION;
/// Displayed name of this page.
Parameter PAGENAME;

/// Domain used for localization.
Parameter DOMAIN;
Parameter DOMAIN = "PivotSubscriptions";

Property pivotName As %ZEN.Datatype.string(ZENURL = "PIVOTNAME");

Expand All @@ -35,7 +34,7 @@ XData dialogBody [ XMLNamespace = "http://www.intersystems.com/zen" ]
<select id="Minute" label="Minute" displayList="00,15,30,45" valueList="0,15,30,45"/>
</hgroup>
<radioSet id="Format" label="Format" displayList="Excel,PDF" valueList="Excel,PDF" value="Excel"/>
<textarea id="Emails" label="Email Addresses" hint="Comma separated list of email addresses. '@intersystems.com' appended if no domain supplied."/>
<textarea id="Emails" label="Email Addresses" hint="Comma separated list of email addresses."/>
</pane>
}

Expand Down
31 changes: 19 additions & 12 deletions PivotSubscriptions/UI/PivotList.cls
Original file line number Diff line number Diff line change
@@ -1,32 +1,39 @@
Include %DeepSee

/// DeepSee CSV Import page.
/// This page lets you import data from a CSV file into DeepSee.
Class PivotSubscriptions.UI.PivotList Extends %DeepSee.UI.standardPage [ System = 4 ]
Class PivotSubscriptions.UI.PivotList Extends PivotSubscriptions.UI.Template [ System = 4 ]
{

/// Displayed name of this page.
Parameter PAGENAME = "PivotSubscriptions Pivot List";
Parameter PAGENAME = "Pivot List";

/// This XML block defines the contents of this pane.
XData contentPane [ XMLNamespace = "http://www.intersystems.com/zen" ]
{
<pane xmlns="http://www.intersystems.com/zen">
<hgroup valign="top" >
<spacer width="20" />
<vgroup valign="top" >
<spacer height="20" />
<tableNavigatorBar id="tableNavigator" tablePaneId="tablePane" showPageSize="true" />
<tablePane id="tablePane"
fixedHeaders="true"
dataSource="columns"
pageSize="100"
maxRows="1000"
useSnapshot="true"
cellSpacing="2"
fixedHeaders="false"
queryClass="PivotSubscriptions.UI.PivotList"
queryName="GetPivots"
useSnapshot="true"
showQuery="false"
showZebra="true"
showRowNumbers="false"
pageSize="100"
maxRows="1000"
OnExecuteResultSet="ExecuteRS"
>
<column id="Owner" header="Owner" colName="POwner" width="10%" filterType="text"/>
<column id="Name" header="Name" colName="PName" width="30%" filterType="text" link="./_DeepSee.UserPortal.Analyzer.zen?PIVOT=#(%query.PName)#"/>
<column OnDrawCell="DrawAddSubscriptionLink"/>
<column id="Owner" header="Owner" colName="POwner" filterType="text"/>
<column id="Name" header="Name" colName="PName" filterType="text" link="./_DeepSee.UserPortal.Analyzer.zen?PIVOT=#(%query.PName)#"/>
<column id="Subscription" header="Add Subscription" colName="PSubscription" OnDrawCell="DrawAddSubscriptionLink"/>
</tablePane>
</vgroup>
</hgroup>
</pane>
}

Expand Down
24 changes: 9 additions & 15 deletions PivotSubscriptions/UI/SubscriptionManager.cls
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
Include %DeepSee

Class PivotSubscriptions.UI.SubscriptionManager Extends %DeepSee.UI.standardPage [ System = 4 ]
Class PivotSubscriptions.UI.SubscriptionManager Extends PivotSubscriptions.UI.Template [ System = 4 ]
{

Parameter DOMAIN = "PivotSubscriptions";

Parameter Version = 1;

/// Displayed name of this page.
Parameter PAGENAME = "Pivot Subscriptions Manager";

/// If this page has multiple views, this is its initial display mode.
Parameter DEFAULTVIEWMODE;

Parameter DOCBOOKID;
Parameter PAGENAME = "Subscription Manager";

/// This XML block defines the contents of this pane.
XData contentPane [ XMLNamespace = "http://www.intersystems.com/zen" ]
{
<pane xmlns="http://www.intersystems.com/zen">
<hgroup valign="top" >
<spacer width="20" />
<vgroup valign="top" >
<spacer height="20" />
<tableNavigatorBar id="tableNavigator" tablePaneId="table" showPageSize="true" />
<tablePane id="table"
cellSpacing="2"
fixedHeaders="false"
Expand All @@ -31,10 +24,11 @@ XData contentPane [ XMLNamespace = "http://www.intersystems.com/zen" ]
showQuery="false"
showZebra="true"
showRowNumbers="false"
maxRows="5000"
pageSize="100"
maxRows="1000"
valueColumn="ID"
>
<column colName="ID" header="Subscription ID" />
<column colName="ID" header="Subscription ID" hidden="true" />
<column id="Pivot" header="Pivot" colName="Pivot" link="./_DeepSee.UserPortal.Analyzer.zen?PIVOT=#(%query.Pivot)#"/>
<column colName="Emails" header="Emails" />
<column onclick="zenPage.editSubscription(#(%query.ID)#,'#(%query.Pivot)#')" linkCaption="Edit" link="#"/>
Expand All @@ -48,13 +42,13 @@ XData contentPane [ XMLNamespace = "http://www.intersystems.com/zen" ]
/// Get the (localized) title string for the page.
Method %OnGetTitle() As %String [ Internal ]
{
Quit $$$Text("Pivot Subscriptions Manager","PivotSubscriptions")
Quit $$$Text("Subscription Manager","PivotSubscriptions")
}

/// Get the (localized) name of the page.
Method %OnGetPageName() As %String [ Internal ]
{
Quit $$$Text("Pivot Subscriptions Manager","PivotSubscriptions")
Quit $$$Text("Subscription Manager","PivotSubscriptions")
}

/// Get the product name for the page.
Expand Down
35 changes: 35 additions & 0 deletions PivotSubscriptions/UI/Template.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Class PivotSubscriptions.UI.Template Extends %DeepSee.UI.standardPage
{

Parameter DOMAIN = "PivotSubscriptions";

/// Get information to display in the ribbon bar.
Method OnGetRibbonInfo(Output pDisplay As %Boolean, Output pViewIcons As %List, Output pSortOptions As %List, Output pSearchBox As %Boolean, Output pRibbonTitle As %String, Output pCommands As %List) As %Status
{
Set pDisplay = 1
Set pSearchBox = 0
Set pRibbonTitle = $$$Text(..#PAGENAME)

Set pCommands($I(pCommands)) = $LB("subscriptionManager",$$$Text("Subscription Manager"),$$$Text("Manage Pivot Subscriptions"),"zenPage.navigate('subscriptionManager');")
Set pCommands($I(pCommands)) = $LB("pivotList",$$$Text("Pivot List"),$$$Text("View All Pivot Tables"),"zenPage.navigate('pivotList');")

Quit $$$OK
}

ClientMethod navigate(pageName) [ Language = javascript ]
{
var location=""
if (pageName=='subscriptionManager') {
location="./PivotSubscriptions.UI.SubscriptionManager.zen"
} else if (pageName=='pivotList') {
location="./PivotSubscriptions.UI.PivotList.zen"
} else {
// Invalid page name
}

if (location!="") {
window.location.href=location;
}
}

}

0 comments on commit 99841ab

Please sign in to comment.