123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2014
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml">
- <!--
- ===============================================================================================
- formlogic_init - standard form logic initialization
- ===============================================================================================
- -->
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
- <!--
- ===============================================================================================
- getObjects - get object class names
- ===============================================================================================
- -->
- <xts:block id="classNames" type="exec" mode="input" processor="XML" path="/portal/uiExtensions.xml">
- <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_names.xslt"/>
- </xts:block>
- <!-- Content Request =========================================================== -->
- <xts:block id="getContent" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="no"/>
- <cml:object-predicates/>
- <xsl:template match="root">
- <xsl:variable name="m_sort" select="/root/env/param[@name='m_sort']"/>
- <xsl:variable name="m_path" select="/root/env/param[@name='m_path']"/>
- <xts:sequence>
- <xts:append>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:requests>
- <cm:query>
- <cm:search>
- <xsl:value-of select="$m_path"/>
- </cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="ancestors"/>
- </cm:properties>
- </cm:query>
- <cm:query>
- <cm:search>
- <xsl:value-of select="$m_path"/>/*<xsl:value-of select="$visibility-predicate"/>
- <xsl:text/>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name = 'stype'] != 'any'">
- <xsl:text/>[@objectClass = '<xsl:value-of select="/root/env/param[@name = 'stype']"/>']<xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text/>[@usage != 'subObject' and @objectClass != 'packageConfiguration']<xsl:text/>
- </xsl:otherwise>
- </xsl:choose>
- </cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="searchPath"/>
- <cm:property name="displaySequence"/>
- <cm:property name="modificationTime"/>
- <cm:property name="launchableType"/>
- <cm:property name="usage"/>
- <cm:property name="hidden"/>
- </cm:properties>
- <cm:sortBy>
- <cm:sort name="usage" order="ascending"/>
- <cm:sort name="displaySequence" order="descending"/>
- <cm:sort name="defaultName" order="ascending"/>
- </cm:sortBy>
- <cm:options schemaInfo="true"/>
- </cm:query>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="format" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="getContent classNames">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- xmlns:st="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/specializetabs/"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- exclude-result-prefixes="xsl cm pf lyt dp df st cf cp bus cml dbg utml xtsext xts">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'sort.xts'"/>
- <!-- add any theme variables -->
- <pf:variables/>
- <xsl:key name="object-class" match="/root/objectClass/class" use="@name"/>
- <xsl:variable name="containerCount" select="count(/root/cm:queryResponse/cm:queryReply[2]/*[key('system-param', 'ui_objects')/object[@container = 'T']/@class = cm:objectClass and cm:displaySequence!=0])"/>
- <xsl:variable name="entriesCount" select="count(/root/cm:queryResponse/cm:queryReply[2]/*[key('system-param', 'ui_objects')/object[@container = 'F']/@class = cm:objectClass and cm:displaySequence!=0])"/>
- <!-- start the output -->
- <xsl:template match="/root">
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page longTitle="$product_name">
- <dp:meta>
- <pf:meta/>
- <!-- Standard meta tags -->
- </dp:meta>
- <dp:script>
- <pf:help context="HID_SORT"/>
- <!-- Help system -->
- <script language="javascript">
- var containerDefaultList = new Array();
- <xsl:for-each select="cm:queryResponse/cm:queryReply[2]/*[key('system-param', 'ui_objects')/object[@container = 'T']/@class = cm:objectClass and cm:displaySequence=0]">
- <xsl:variable name="containerName">
- <xsl:choose>
- <xsl:when test="string-length(string(cm:defaultName)) > 61">
- <xsl:value-of select="concat(substring(string(cm:defaultName),0,60),'...')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="cm:defaultName"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="containerNameDisplay">
- <xsl:value-of select="xtsext:enforceBTD($containerName, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </xsl:variable>
- containerDefaultList[<xsl:value-of select="(position() - 1)"/>] = new Array("0", "<xsl:value-of select="xtsext:replace( xtsext:javascriptencode(string($containerNameDisplay)), '</', '<" + "/')"/> (<xsl:value-of select="xtsext:javascriptencode(string(key('object-class', cm:objectClass)))"/>)", "<xsl:value-of select="xtsext:replace(xtsext:javascriptencode(string(cm:searchPath)), '</', '<" + "/')"/>", "", "<xsl:value-of select="xtsext:replace( xtsext:javascriptencode(string(cm:defaultName)), '</', '<" + "/')"/>", "<xsl:value-of select="xtsext:javascriptencode(string(cm:modificationTime))"/>", "<xsl:value-of select="xtsext:javascriptencode(string(cm:objectClass))"/>", "<xsl:value-of select="xtsext:javascriptencode(string(cm:hidden))"/>");
- </xsl:for-each>
- var containerOptionList = new Array();
- <xsl:for-each select="cm:queryResponse/cm:queryReply[2]/*[key('system-param', 'ui_objects')/object[@container = 'T']/@class = cm:objectClass and cm:displaySequence!=0]">
- <xsl:variable name="containerName">
- <xsl:choose>
- <xsl:when test="string-length(string(cm:defaultName)) > 61">
- <xsl:value-of select="concat(substring(string(cm:defaultName),0,60),'...')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="cm:defaultName"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="containerNameDisplay">
- <xsl:value-of select="xtsext:enforceBTD($containerName, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </xsl:variable>
- containerOptionList[<xsl:value-of select="(position() - 1)"/>] = new Array("<xsl:value-of select="$containerCount - (position() - 1)"/>", "<xsl:value-of select="xtsext:replace( xtsext:javascriptencode(string($containerNameDisplay)), '</', '<" + "/')"/> (<xsl:value-of select="xtsext:javascriptencode(string(key('object-class', cm:objectClass)))"/>)", "<xsl:value-of select="xtsext:replace(xtsext:javascriptencode(string(cm:searchPath)), '</', '<" + "/')"/>", "", "<xsl:value-of select="xtsext:replace( xtsext:javascriptencode(string(cm:defaultName)), '</', '<" + "/')"/>", "<xsl:value-of select="xtsext:javascriptencode(string(cm:modificationTime))"/>", "<xsl:value-of select="xtsext:javascriptencode(string(cm:objectClass))"/>", "<xsl:value-of select="xtsext:javascriptencode(string(cm:hidden))"/>");
- </xsl:for-each>
- var entriesDefaultList = new Array();
- <xsl:for-each select="cm:queryResponse/cm:queryReply[2]/*[key('system-param', 'ui_objects')/object[@container = 'F']/@class = cm:objectClass and cm:displaySequence=0]">
- <xsl:variable name="entryName">
- <xsl:choose>
- <xsl:when test="string-length(string(cm:defaultName)) > 61">
- <xsl:value-of select="concat(substring(string(cm:defaultName),0,60),'...')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="cm:defaultName"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="entryNameDisplay">
- <xsl:value-of select="xtsext:enforceBTD($entryName, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </xsl:variable>
- entriesDefaultList[<xsl:value-of select="(position() - 1)"/>] = new Array("0", "<xsl:value-of select="xtsext:replace( xtsext:javascriptencode(string($entryNameDisplay)), '</', '<" + "/')"/> (<xsl:value-of select="xtsext:javascriptencode(string(key('object-class', cm:objectClass)))"/>)", "<xsl:value-of select="xtsext:replace( xtsext:javascriptencode(string(cm:searchPath)), '</', '<" + "/')"/>", "", "<xsl:value-of select="xtsext:replace( xtsext:javascriptencode(string(cm:defaultName)), '</', '<" + "/')"/>", "<xsl:value-of select="xtsext:javascriptencode(string(cm:modificationTime))"/>", "<xsl:value-of select="xtsext:javascriptencode(string(cm:objectClass))"/>", "<xsl:value-of select="xtsext:javascriptencode(string(cm:hidden))"/>");
- </xsl:for-each>
- var entriesOptionList = new Array();
- <xsl:for-each select="cm:queryResponse/cm:queryReply[2]/*[key('system-param', 'ui_objects')/object[@container = 'F']/@class = cm:objectClass and cm:displaySequence!=0]">
- <xsl:variable name="entryName">
- <xsl:choose>
- <xsl:when test="string-length(string(cm:defaultName)) > 61">
- <xsl:value-of select="concat(substring(string(cm:defaultName),0,60),'...')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="cm:defaultName"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="entryNameDisplay">
- <xsl:value-of select="xtsext:enforceBTD($entryName, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </xsl:variable>
- entriesOptionList[<xsl:value-of select="(position() - 1)"/>] = new Array("<xsl:value-of select="$entriesCount - (position() - 1)"/>", "<xsl:value-of select="xtsext:replace( xtsext:javascriptencode(string($entryNameDisplay)), '</', '<" + "/')"/> (<xsl:value-of select="xtsext:javascriptencode(string(key('object-class', cm:objectClass)))"/>)", "<xsl:value-of select="xtsext:replace( xtsext:javascriptencode(string(cm:searchPath)), '</', '<" + "/')"/>", "", "<xsl:value-of select="xtsext:replace( xtsext:javascriptencode(string(cm:defaultName)), '</', '<" + "/')"/>", "<xsl:value-of select="xtsext:javascriptencode(string(cm:modificationTime))"/>", "<xsl:value-of select="xtsext:javascriptencode(string(cm:objectClass))"/>", "<xsl:value-of select="xtsext:javascriptencode(string(cm:hidden))"/>");
- </xsl:for-each>
- //set all the values to zero
- function resetToZero(what, sortArray) {
- for (var i=0; i < what.options.length; i++){
- sortArray[what.options[i].value][0] = 0;
- what[i].selected = false;
- }
- }
- function resetList(what,aray,dosel)
- {
- if (what) {
- for (var i=0; i < aray.length; i++){
- what[i].value = aray[i][0] + ',' + aray[i][2] + ',' + aray[i][6];
- if( dosel==1)
- what[i].selected = true;
- }
- }
- }
- //this will set the values for both selectbox
- function setValues() {
- if( containerOptionList.length!=0) {
- revalue(containerOptionList);
- resetList(document.pform.containerSortOrder,containerOptionList,1);
- }
- if( containerDefaultList.length!=0){
- setList(document.pform.containerDefaultOrder, containerDefaultList);
- }
- if( entriesOptionList.length != 0) {
- revalue(entriesOptionList);
- resetList(document.pform.entriesSortOrder, entriesOptionList,1);
- }
- if( entriesDefaultList.length !=0) {
- setList(document.pform.entriesDefaultOrder, entriesDefaultList);
- }
- //<!-- Innocent hack to get the main page to reset the sort order after visiting this page -->
- if (document.pform.backURL && document.pform.backURL != "")
- document.pform.backURL.value = document.pform.backURL.value + "&resetSort=";
- }
- function resetC(def,idx)
- {
- if(def=='def')
- {
- for( ; idx < containerOptionList.length; idx++) {
- containerOptionList[idx] = containerOptionList[idx + 1];
- }
- containerOptionList.length=containerOptionList.length-1;
- } else {
- for( ; idx < containerDefaultList.length; idx++) {
- containerDefaultList[idx] = containerDefaultList[idx + 1];
- }
- containerDefaultList.length=containerDefaultList.length-1;
- }
- }
- function resetE(def,idx)
- {
- if(def=='def')
- {
- for( ; idx < entriesOptionList.length; idx++) {
- entriesOptionList[idx] = entriesOptionList[idx + 1];
- }
- entriesOptionList.length=entriesOptionList.length-1;
- } else {
- for( ; idx < entriesDefaultList.length; idx++) {
- entriesDefaultList[idx] = entriesDefaultList[idx + 1];
- }
- entriesDefaultList.length=entriesDefaultList.length-1;
- }
- }
- //delete an option
- function delOpt(what, index) {
- what.options[index] = null;
- for(var i=index; i < what.options.length; i++) {
- what.options[i].value = i;
- }
- }
- //add an option
- function addOpt(what, text, value,isHidden) {
- var defaultSelected = false;
- var selected = false;
- var optionName = new Option(text, value, defaultSelected, selected);
- if(isHidden=="true")
- optionName.className = "inactiveText";
- what.options[what.length] = optionName;
- if(what.length > 0)
- what.options[what.length-1].selected = false;
- }
- function processFolder(type, def, whatto,whatfrom)
- {
- if(type=='ones')
- {
- var tolen = whatto.length;
- var fnd=0;
- if( whatfrom.length > 0 ) {
- for( var i=0,j=tolen; i < whatfrom.length && i > -1;)
- {
- if(whatfrom[i].selected==true) {
- if(fnd==0)fnd=1;
- if(def=='def') {
- addOpt(whatto,containerOptionList[i][1],j,containerOptionList[i][7]);
- containerDefaultList[j]=containerOptionList[i];
- j++;
- } else {
- addOpt(whatto,containerDefaultList[i][1],j,containerDefaultList[i][7]);
- containerOptionList[j]=containerDefaultList[i];
- j++;
- }
- delOpt(whatfrom,i);
- resetC(def,i);
- }
- if(fnd==1) {
- fnd=0;
- if(whatfrom.length>0 && i!=0)
- i=i-1;
- } else {
- i++;
- }
- }
- if(def=='def') {
- resetToZero(whatto,containerDefaultList);
- } else {
- resetToZero(whatfrom,containerDefaultList);
- }
- }
- }
- else if(type=='all')
- {
- var fromlen = whatfrom.length;
- if(fromlen!=0) {
- var tolen = whatto.length;
- for( var i=0, j=tolen; i < fromlen; i++,j++)
- {
- if( def=='def' ) {
- addOpt(whatto,containerOptionList[i][1],j,containerOptionList[i][7]);
- containerDefaultList[j]=containerOptionList[i];
- }
- else {
- addOpt(whatto,containerDefaultList[i][1],j,containerDefaultList[i][7]);
- containerOptionList[j]=containerDefaultList[i];
- }
- delOpt(whatfrom,0);
- }
- if(def=='def') {
- resetToZero(whatto,containerDefaultList);
- containerOptionList = null;
- containerOptionList = new Array();
- }
- else {
- containerDefaultList = null;
- containerDefaultList = new Array();
- revalue(containerOptionList);
- }
- }
- }
- }
- function processEntries(type, def, whatto,whatfrom)
- {
- if(type=='ones')
- {
- var tolen = whatto.length;
- var fnd=0;
- if( whatfrom.length > 0 ) {
- for( var i=0,j=tolen; i < whatfrom.length && i > -1;)
- {
- if(whatfrom[i].selected==true) {
- if(fnd==0)fnd=1;
- if(def=='def') {
- addOpt(whatto,entriesOptionList[i][1],j,entriesOptionList[i][7]);
- entriesDefaultList[j]=entriesOptionList[i];
- j++;
- } else {
- addOpt(whatto,entriesDefaultList[i][1],j,entriesDefaultList[i][7]);
- entriesOptionList[j]=entriesDefaultList[i];
- j++;
- }
- delOpt(whatfrom,i);
- resetE(def,i);
- }
- if(fnd==1) {
- fnd=0;
- if(whatfrom.length>0 && i!=0)
- i=i-1;
- } else {
- i++;
- }
- }
- if(def=='def') {
- resetToZero(whatto,entriesDefaultList);
- } else {
- resetToZero(whatfrom,entriesDefaultList);
- }
- }
- }
- else if(type=='all')
- {
- var fromlen = whatfrom.length;
- if(fromlen!=0) {
- var tolen = whatto.length;
- for( var i=0, j=tolen; i < fromlen; i++,j++)
- {
- if( def=='def' ) {
- addOpt(whatto,entriesOptionList[i][1],j,entriesOptionList[i][7]);
- entriesDefaultList[j]=entriesOptionList[i];
- }
- else {
- addOpt(whatto,entriesDefaultList[i][1],j,entriesDefaultList[i][7]);
- entriesOptionList[j]=entriesDefaultList[i];
- }
- delOpt(whatfrom,0);
- }
- if(def=='def') {
- resetToZero(whatto,entriesDefaultList);
- entriesOptionList = null;
- entriesOptionList = new Array();
- }
- else {
- entriesDefaultList = null;
- entriesDefaultList = new Array();
- revalue(entriesOptionList);
- }
- }
- }
- }
- </script>
- </dp:script>
- <cml:single-object/>
- <utml:form name="pform" method="post" action="{$gateway}">
- <utml:input type="hidden" name="ps_nav_op" value="" utml:update="false"/>
- <utml:input type="hidden" name="ifrmcmd" value="save" utml:update="false"/>
- <!-- dialog header -->
- <dp:header dp:kbA11y="true">
- <!-- header titles-->
- <dp:title>
- <xts:string id="IDS_SORT_ORDER_TITLE">
- <xts:param name="sortIn">
- <xsl:value-of select="xtsext:enforceBTD(cm:queryResponse/cm:queryReply[1]/*/cm:defaultName, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </xts:param>
- </xts:string>
- </dp:title>
- <dp:description>
- <xts:string id="IDS_SORT_INTRO"/>
- </dp:description>
- </dp:header>
- <!-- body contents - form item -->
- <xsl:variable name="sort_name">
- <xts:string id="IDS_NAME"/>
- </xsl:variable>
- <xsl:variable name="sort_modified">
- <xts:string id="IDS_MODIFIED"/>
- </xsl:variable>
- <xsl:variable name="containerOptCnt">
- <xsl:value-of select="count(/root/cm:queryResponse/cm:queryReply[2]/*[key('system-param', 'ui_objects')/object[@container = 'T']/@class = cm:objectClass and cm:displaySequence!=0])"/>
- </xsl:variable>
- <xsl:variable name="entriesOptCnt">
- <xsl:value-of select="count(/root/cm:queryResponse/cm:queryReply[2]/*[key('system-param', 'ui_objects')/object[@container = 'F']/@class = cm:objectClass and cm:displaySequence!=0])"/>
- </xsl:variable>
- <lyt:layout style="1" border="yes" title="IDS_SORT_FOLDERS" lyt:kbA11y="true" id="IDS_SORT_FOLDERS">
- <lyt:section>
- <dp:list role="presentation">
- <dp:section dp:kbA11y="true">
- <dp:list title="IDS_SORT_REST" for="containerDefaultOrder_ID" valign="top" role="presentation" parentTitle="IDS_SORT_FOLDERS">
- <dp:section width="40%" dp:kbA11y="true">
- <dp:text>
- <cf:sortList class="sortSelectContent" name="containerDefaultOrder" id="containerDefaultOrder_ID" form="pform" array="containerDefaultList" size="15" action="none">
- <cf:initContent>
- <xsl:for-each select="cm:queryResponse/cm:queryReply[2]/*[key('system-param', 'ui_objects')/object[@container = 'T']/@class = cm:objectClass]">
- <xsl:if test="cm:displaySequence=0">
- <xsl:variable name="containerNam">
- <xsl:choose>
- <xsl:when test="string-length(string(cm:defaultName)) > 61">
- <xsl:value-of select="concat(substring(string(cm:defaultName),0,60),'...')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="cm:defaultName"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <utml:option>
- <xsl:attribute name="value"><xsl:value-of select="(position() - number($containerOptCnt) -1)"/></xsl:attribute>
- <xsl:if test="string(cm:hidden)='true'">
- <xsl:attribute name="class">
- <xsl:text/>inactiveText<xsl:text/>
- </xsl:attribute>
- </xsl:if>
- <xsl:value-of select="xtsext:enforceBTD($containerNam, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- <xsl:text> (</xsl:text>
- <xsl:value-of select="key('object-class', cm:objectClass)"/>
- <xsl:text>)</xsl:text>
- <xsl:text/>
- </utml:option>
- </xsl:if>
- </xsl:for-each>
- </cf:initContent>
- </cf:sortList>
- </dp:text>
- </dp:section>
- </dp:list>
- <dp:list role="presentation">
- <dp:section width="10%" dp:kbA11y="true">
- <dp:columnButtonGroup align="center" width="40" label="IDS_SORT_REST" parentLabel = "IDS_SORT_FOLDERS">
- <dp:columnButton>
- <a href="javascript:processFolder('ones', 'opt', document.pform.containerSortOrder, document.pform.containerDefaultOrder)">
- <img height="18" width="18" border="0" class="flippingImages">
- <xsl:attribute name="src"><xsl:value-of select="$image_root"/>move_right.gif<xsl:text/></xsl:attribute>
- <xsl:attribute name="alt"><xts:string id="IDS_SELECT_LANG_ADD"/></xsl:attribute>
- </img>
- </a>
- </dp:columnButton>
- <dp:columnButton>
- <a href="javascript:processFolder('ones','def',document.pform.containerDefaultOrder, document.pform.containerSortOrder)">
- <img height="18" width="18" border="0" class="flippingImages">
- <xsl:attribute name="src"><xsl:value-of select="$image_root"/>move_left.gif<xsl:text/></xsl:attribute>
- <xsl:attribute name="alt"><xts:string id="IDS_SELECT_LANG_REMOVE"/></xsl:attribute>
- </img>
- </a>
- </dp:columnButton>
- <dp:columnButton>
- <a href="javascript:processFolder('all', 'opt', document.pform.containerSortOrder, document.pform.containerDefaultOrder)">
- <img height="18" width="18" border="0" class="flippingImages">
- <xsl:attribute name="src"><xsl:value-of select="$image_root"/>move_all_right.gif<xsl:text/></xsl:attribute>
- <xsl:attribute name="alt"><xts:string id="IDS_SELECT_LANG_ADD_ALL"/></xsl:attribute>
- </img>
- </a>
- </dp:columnButton>
- <dp:columnButton>
- <a href="javascript:processFolder('all','def',document.pform.containerDefaultOrder, document.pform.containerSortOrder)">
- <img height="18" width="18" border="0" class="flippingImages">
- <xsl:attribute name="src"><xsl:value-of select="$image_root"/>move_all_left.gif<xsl:text/></xsl:attribute>
- <xsl:attribute name="alt"><xts:string id="IDS_SELECT_LANG_REMOVE_ALL"/></xsl:attribute>
- </img>
- </a>
- </dp:columnButton>
- </dp:columnButtonGroup>
- </dp:section>
- </dp:list>
- <dp:list title="IDS_SORT_SHOWN_FIRST" for="containerSortOrder_ID" valign="top" role="presentation" parentTitle="IDS_SORT_FOLDERS">
- <dp:section width="40%" dp:kbA11y="true">
- <dp:text>
- <cf:sortList class="sortSelectContent" name="containerSortOrder" id="containerSortOrder_ID" form="pform" array="containerOptionList" size="15" tLabel="IDS_SORT_SHOWN_FIRST_IDS_SORT_ENTRIES" parentLabel="IDS_SORT_ENTRIES">
- <cf:initContent>
- <xsl:for-each select="cm:queryResponse/cm:queryReply[2]/*[key('system-param', 'ui_objects')/object[@container = 'T']/@class = cm:objectClass]">
- <xsl:if test="cm:displaySequence!=0">
- <xsl:variable name="containerNam">
- <xsl:choose>
- <xsl:when test="string-length(string(cm:defaultName)) > 61">
- <xsl:value-of select="concat(substring(string(cm:defaultName),0,60),'...')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="cm:defaultName"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <utml:option>
- <xsl:attribute name="value"><xsl:value-of select="(position() - 1)"/></xsl:attribute>
- <xsl:if test="string(cm:hidden)='true'">
- <xsl:attribute name="class">
- <xsl:text/>inactiveText<xsl:text/>
- </xsl:attribute>
- </xsl:if>
- <xsl:value-of select="xtsext:enforceBTD($containerNam, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- <xsl:text> (</xsl:text>
- <xsl:value-of select="key('object-class', cm:objectClass)"/>
- <xsl:text>)</xsl:text>
- <xsl:text/>
- </utml:option>
- </xsl:if>
- </xsl:for-each>
- </cf:initContent>
- </cf:sortList>
- </dp:text>
- </dp:section>
- </dp:list>
- </dp:section>
- </dp:list>
- </lyt:section>
- </lyt:layout>
- <lyt:layout style="1" border="yes" title="IDS_SORT_ENTRIES" lyt:kbA11y="true" id="IDS_SORT_ENTRIES">
- <lyt:section>
- <dp:list role="presentation">
- <dp:section dp:kbA11y="true">
- <dp:list title="IDS_SORT_REST" for="entriesDefaultOrder_ID" valign="top" role="presentation" parentTitle="IDS_SORT_ENTRIES">
- <dp:section width="40%" dp:kbA11y="true">
- <dp:text>
- <cf:sortList class="sortSelectContent" name="entriesDefaultOrder" id="entriesDefaultOrder_ID" form="pform" array="entriesDefaultList" size="15" action="none">
- <cf:initContent>
- <xsl:for-each select="cm:queryResponse/cm:queryReply[2]/*[key('system-param', 'ui_objects')/object[@container = 'F']/@class = cm:objectClass]">
- <xsl:if test="cm:displaySequence=0">
- <xsl:variable name="entryNam">
- <xsl:choose>
- <xsl:when test="string-length(string(cm:defaultName)) > 61">
- <xsl:value-of select="concat(substring(string(cm:defaultName),0,60),'...')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="cm:defaultName"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="entryNamDisplay">
- <xsl:value-of select="xtsext:enforceBTD($entryNam, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </xsl:variable>
- <xsl:variable name="launchableType" select="cm:launchableType"/>
- <utml:option>
- <xsl:attribute name="value"><xsl:value-of select="(position() - number($entriesOptCnt) -1)"/></xsl:attribute>
- <xsl:if test="string(cm:hidden)='true'">
- <xsl:attribute name="class">
- <xsl:text/>inactiveText<xsl:text/>
- </xsl:attribute>
- </xsl:if>
- <xsl:value-of select="$entryNamDisplay"/> (<xsl:value-of select="key('object-class', cm:objectClass)[@launchableType=$launchableType or not($launchableType)]"/>)<xsl:text/>
- </utml:option>
- </xsl:if>
- </xsl:for-each>
- </cf:initContent>
- </cf:sortList>
- </dp:text>
- </dp:section>
- </dp:list>
- <dp:list role="presentation">
- <dp:section width="10%" dp:kbA11y="true">
- <dp:columnButtonGroup align="center" width="40" label="IDS_SORT_REST" parentLabel="IDS_SORT_ENTRIES">
- <dp:columnButton>
- <a href="javascript:processEntries('ones', 'opt', document.pform.entriesSortOrder, document.pform.entriesDefaultOrder)">
- <img height="18" width="18" border="0" class="flippingImages">
- <xsl:attribute name="src"><xsl:value-of select="$image_root"/>move_right.gif<xsl:text/></xsl:attribute>
- <xsl:attribute name="alt"><xts:string id="IDS_SELECT_LANG_ADD"/></xsl:attribute>
- </img>
- </a>
- </dp:columnButton>
- <dp:columnButton>
- <a href="javascript:processEntries('ones', 'def', document.pform.entriesDefaultOrder, document.pform.entriesSortOrder)">
- <img height="18" width="18" border="0" class="flippingImages">
- <xsl:attribute name="src"><xsl:value-of select="$image_root"/>move_left.gif<xsl:text/></xsl:attribute>
- <xsl:attribute name="alt"><xts:string id="IDS_SELECT_LANG_REMOVE"/></xsl:attribute>
- </img>
- </a>
- </dp:columnButton>
- <dp:columnButton>
- <a href="javascript:processEntries('all','opt',document.pform.entriesSortOrder, document.pform.entriesDefaultOrder)">
- <img height="18" width="18" border="0" class="flippingImages">
- <xsl:attribute name="src"><xsl:value-of select="$image_root"/>move_all_right.gif<xsl:text/></xsl:attribute>
- <xsl:attribute name="alt"><xts:string id="IDS_SELECT_LANG_ADD_ALL"/></xsl:attribute>
- </img>
- </a>
- </dp:columnButton>
- <dp:columnButton>
- <a href="javascript:processEntries('all','def',document.pform.entriesDefaultOrder, document.pform.entriesSortOrder)">
- <img height="18" width="18" border="0" class="flippingImages">
- <xsl:attribute name="src"><xsl:value-of select="$image_root"/>move_all_left.gif<xsl:text/></xsl:attribute>
- <xsl:attribute name="alt"><xts:string id="IDS_SELECT_LANG_REMOVE_ALL"/></xsl:attribute>
- </img>
- </a>
- </dp:columnButton>
- </dp:columnButtonGroup>
- </dp:section>
- </dp:list>
- <dp:list title="IDS_SORT_SHOWN_FIRST" for="entriesSortOrder_ID" valign="top" role="presentation" parentTitle="IDS_SORT_ENTRIES" >
- <dp:section width="40%" dp:kbA11y="true">
- <dp:text>
- <cf:sortList class="sortSelectContent" name="entriesSortOrder" id="entriesSortOrder_ID" form="pform" array="entriesOptionList" size="15" tLabel="IDS_SORT_SHOWN_FIRST_IDS_SORT_FOLDERS" parentLabel="IDS_SORT_FOLDERS">
- <cf:initContent>
- <xsl:for-each select="cm:queryResponse/cm:queryReply[2]/*[key('system-param', 'ui_objects')/object[@container = 'F']/@class = cm:objectClass]">
- <xsl:if test="cm:displaySequence!=0">
- <xsl:variable name="entryNam">
- <xsl:choose>
- <xsl:when test="string-length(string(cm:defaultName)) > 81">
- <xsl:value-of select="concat(substring(string(cm:defaultName),0,80),'...')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="cm:defaultName"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="entryNamDisplay">
- <xsl:value-of select="xtsext:enforceBTD($entryNam, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/>
- </xsl:variable>
- <xsl:variable name="launchableType" select="cm:launchableType"/>
- <utml:option>
- <xsl:attribute name="value"><xsl:value-of select="(position() - 1)"/></xsl:attribute>
- <xsl:if test="string(cm:hidden)='true'">
- <xsl:attribute name="class">
- <xsl:text/>inactiveText<xsl:text/>
- </xsl:attribute>
- </xsl:if>
- <xsl:value-of select="$entryNamDisplay"/> (<xsl:value-of select="key('object-class', cm:objectClass)[@launchableType=$launchableType or not($launchableType)]"/>)<xsl:text/>
- </utml:option>
- </xsl:if>
- </xsl:for-each>
- </cf:initContent>
- </cf:sortList>
- </dp:text>
- </dp:section>
- </dp:list>
- </dp:section>
- </dp:list>
- </lyt:section>
- </lyt:layout>
- <dp:footer>
- <df:button df:id="IDS_OK" utml:validate="false" df:style="submit" onclick="javascript:setValues()"/>
- <df:button df:id="IDS_CANCEL" df:style="back-url"/>
- </dp:footer>
- </utml:form>
- </dp:page>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - display debug information
- ===============================================================================================
- -->
- <xts:block id="debug" dependency="format" condition=".[/root/session/param[@name='debug'] = '1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <!-- debug logic sheet -->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <dbg:templates/>
- <!-- add any debug templates -->
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|