Skip to content

Commit

Permalink
Added attributes.gridPreview option
Browse files Browse the repository at this point in the history
Allows user to nominate specific view for the grid preview button.
  • Loading branch information
modius committed Aug 16, 2014
1 parent 799a2ea commit 68b1754
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tags/formtools/objectadmin.cfm
Expand Up @@ -94,6 +94,7 @@
<cfparam name="attributes.bFlowCol" default="true" type="boolean">
<cfparam name="attributes.bPreviewCol" default="true" type="boolean">

<cfparam name="attributes.gridPreview" default="" type="string"><!--- Nominate a specific view for the preview; defaults to system default --->

<cfparam name="attributes.editMethod" default="edit" type="string">
<cfparam name="attributes.copyMethod" default="copy" type="string">
Expand Down Expand Up @@ -1268,7 +1269,9 @@
</cfif>

<cfif attributes.bPreviewCol>
<cfif attributes.bPreviewCol>
<cfif len(attributes.gridPreview)>
<cfoutput><a href="#application.fapi.getLink(type=attributes.typename, objectid=arguments.st.objectid, view=attributes.gridPreview)#" class="btn fc-btn-preview" target="_blank" title="Preview"><i class="fa fa-eye only-icon"></i></a></cfoutput>
<cfelse>
<cfoutput><a href="#application.fapi.getLink(type=attributes.typename, objectid=arguments.st.objectid)#" class="btn fc-btn-preview" target="_blank" title="Preview"><i class="fa fa-eye only-icon"></i></a></cfoutput>
</cfif>
</cfif>
Expand Down

3 comments on commit 68b1754

@justincarter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this attribute should be "previewWebskin" rather than "gridPreview"?

@shib71
Copy link
Contributor

@shib71 shib71 commented on 68b1754 Aug 18, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree.

@modius
Copy link
Member Author

@modius modius commented on 68b1754 Aug 18, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I concur.

Please sign in to comment.