123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cpscrn
- (C) Copyright IBM Corp. 2005, 2011
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <!-- $Header: //cpscrn/main/templates/cps4/portlets/utility/portlet-impl/rss/edit.xslt#1 $ -->
- <!-- $DateTime: 2008/10/22 11:12:04 $ -->
- <!-- $Change: 25109 $ -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:ui="http://developer.cognos.com/schemas/cps/logic/ui/1/"
- xmlns:uix="http://developer.cognos.com/schemas/cps/logic/ui-ext/1/"
- xmlns:utml="http://developer.cognos.com/schemas/cps/logic/form/1/"
- xmlns:trustedSession="java:com.cognos.portal.utils.TrustedSessionHelper"
- exclude-result-prefixes="xts ui uix utml">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <!-- declare global variables... -->
- <utml:variables/>
- <!-- create portal variable: $ui-consumer-info -->
- <ui:consumer/>
- <ui:property name="rss-use-title" select="'rss_use_title'"/>
- <ui:property name="rss-url" select="'rss_url'"/>
- <ui:property name="rss-entries" select="'rss_entries'" exclude-nav-state="not( key( 'utml-key-params', 'edit_visited' ) )"/>
- <ui:property name="rss-show-desc" select="'rss_show_desc'"/>
- <ui:property name="rss-show-image" select="'rss_show_image'"/>
- <ui:property name="rss-alternate" select="'rss_alternate'"/>
- <xsl:template match="/">
- <script language="javascript">
- function wsrp_rewrite_validate()
- {
- var msg1 = "<xts:string id="IDS_UTI_ERR_INVALID_URL" encode="javascript"/>";
- var msg2 = "<xts:string id="IDS_UTI_ERR_INVALID_FRAME_NAME" encode="javascript"/>";
- var msg3 = "<xts:string id="IDS_UTI_ERR_INVALID_CHANNEL_NAME" encode="javascript"/>";
- var msg4 = "<xts:string id="IDS_UTI_ERR_NUMBER_BETWEEN" encode="javascript"><xts:param name="min">1</xts:param><xts:param name="max">1000</xts:param></xts:string>";
- var cForm = document.wsrp_rewrite_form;
- if ( !wsrp_rewrite_isValidURL(cForm.p_rss_url.value, true, true)) {
- window.alert(msg1);
- cForm.p_rss_url.focus();
- return false;
- }
- if ( !wsrp_rewrite_isValidChannel(cForm.p_target.value, document.getElementById("wsrp_rewrite_radio_target").checked) ) {
- window.alert(msg2);
- cForm.p_target.focus();
- return false;
- }
- if ( !wsrp_rewrite_isValidChannel(cForm.p_channel.value, document.getElementById("wsrp_rewrite_radio_channel").checked) ) {
- window.alert(msg3);
- cForm.p_channel.focus();
- return false;
- }
- if ( !wsrp_rewrite_isValidBoundary(cForm.p_rss_entries.value,1,1000) ) {
- window.alert(msg4);
- cForm.p_rss_entries.focus();
- return false;
- }
- return true;
- }
- </script>
- <uix:script-isValidURL/>
- <uix:script-isValidChannel/>
- <uix:script-isValidBoundary/>
- <ui:about/>
- <ui:help/>
- <utml:form name="wsrp_rewrite_form" method="post" utml:maintainPrevNavState="true">
- <utml:input type="hidden" name="cps-authToken" utml:update="false">
- <utml:value>
- <xsl:value-of select="trustedSession:staticGenerateAuthToken(string(/root/cookies/cookie[@name='usersessionid']))"/>
- </utml:value>
- </utml:input>
- <ui:page>
- <ui:page-description><xts:string id="IDS_UTI_RSS_DESC"/></ui:page-description>
- <ui:page-section>
- <ui:page-sub-section-group>
- <ui:page-sub-section>
- <ui:page-sub-section-title><xts:string id="IDS_PRO_UIX_LABEL_TITLE"/></ui:page-sub-section-title>
- <ui:page-sub-section-content>
- <utml:radio-group name="p_rss_use_title">
- <utml:default-value>
- <xsl:value-of select="$rss-use-title"/>
- </utml:default-value>
- <table border="0" cellspacing="0" cellpadding="1">
- <tr>
- <td valign="top">
- <utml:input type="radio" value="false" class="portlet-form-field"/>
- </td>
- <td class="portlet-form-field"><xts:string id="IDS_UTI_COM_LABEL_USE_URL"/></td>
- </tr>
- <tr>
- <td valign="top">
- <utml:input type="radio" value="true" class="portlet-form-field"/>
- </td>
- <td><xts:string id="IDS_UTI_COM_LABEL_TYPE_TITLE"/></td>
- </tr>
- <tr>
- <td valign="top" rowspan="2">
- <br/>
- </td>
- <td>
- <uix:title onfocus="wsrp_rewrite_form.p_rss_use_title[1].checked = true;"/>
- </td>
- </tr>
- </table>
- </utml:radio-group>
- </ui:page-sub-section-content>
- </ui:page-sub-section>
- <ui:page-sub-section>
- <ui:page-sub-section-title><xts:string id="IDS_UTI_RSS_LABEL_URL"/></ui:page-sub-section-title>
- <ui:page-sub-section-content>
- <table border="0" cellspacing="0" cellpadding="1">
- <tr>
- <td class="portlet-form-field"><xts:string id="IDS_UTI_RSS_LABEL_RSS_SOURCE"/></td>
- </tr>
- <tr>
- <td>
- <utml:input name="p_rss_url" type="text" size="100" class="portlet-form-input-field" stttype="url">
- <utml:value>
- <xsl:value-of select="$rss-url"/>
- </utml:value>
- </utml:input>
- </td>
- </tr>
- </table>
- </ui:page-sub-section-content>
- </ui:page-sub-section>
- <ui:page-sub-section>
- <ui:page-sub-section-title><xts:string id="IDS_UTI_RSS_LABEL_FEATURES"/></ui:page-sub-section-title>
- <ui:page-sub-section-content>
- <table border="0" cellpadding="1" cellspacing="0">
- <tr>
- <td>
- <utml:input name="p_rss_show_desc" type="checkbox" value="true" class="portlet-form-field">
- <xsl:if test="$rss-show-desc = 'true'">
- <xsl:attribute name="checked"/>
- </xsl:if>
- </utml:input>
- </td>
- <td class="portlet-form-field"><xts:string id="IDS_UTI_RSS_LABEL_SHOW_DESCRIPTION"/></td>
- </tr>
- <tr>
- <td>
- <utml:input name="p_rss_show_image" type="checkbox" value="true" class="portlet-form-field">
- <xsl:if test="$rss-show-image = 'true'">
- <xsl:attribute name="checked"/>
- </xsl:if>
- </utml:input>
- </td>
- <td class="portlet-form-field"><xts:string id="IDS_UTI_RSS_LABEL_SHOW_IMAGE"/></td>
- </tr>
- <tr>
- <td>
- <utml:input name="p_rss_alternate" type="checkbox" value="true" class="portlet-form-field">
- <xsl:if test="$rss-alternate = 'true'">
- <xsl:attribute name="checked"/>
- </xsl:if>
- </utml:input>
- </td>
- <td class="portlet-form-field"><xts:string id="IDS_UTI_RSS_LABEL_ALTERNATE_BACKGROUND"/></td>
- </tr>
- </table>
- </ui:page-sub-section-content>
- </ui:page-sub-section>
- <ui:page-sub-section tailing-space="false">
- <ui:page-sub-section-title><xts:string id="IDS_PRO_UIX_LABEL_OPEN_LINKS"/></ui:page-sub-section-title>
- <ui:page-sub-section-content>
- <uix:open-links msgChannel="IDS_UTI_COM_DESC_CHANNEL_HTML"/>
- </ui:page-sub-section-content>
- </ui:page-sub-section>
- </ui:page-sub-section-group>
- </ui:page-section>
- <ui:page-section>
- <ui:page-section-divider><xts:string id="IDS_UTI_COM_GROUP_VIEWING_OPTIONS"/></ui:page-section-divider>
- <ui:page-sub-section-group>
- <ui:page-sub-section>
- <ui:page-sub-section-title><xts:string id="IDS_UTI_RSS_LABEL_MAX_ITEMS"/></ui:page-sub-section-title>
- <ui:page-sub-section-content>
- <table border="0" cellspacing="0" cellpadding="1">
- <tr>
- <td>
- <utml:input name="p_rss_entries" type="text" size="7" class="portlet-form-input-field">
- <utml:value>
- <xsl:value-of select="$rss-entries"/>
- </utml:value>
- </utml:input>
- </td>
- </tr>
- </table>
- </ui:page-sub-section-content>
- </ui:page-sub-section>
- </ui:page-sub-section-group>
- </ui:page-section>
- </ui:page>
- </utml:form>
- </xsl:template>
- </xsl:stylesheet>
|