12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (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).
- -->
- <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:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:out="dummy-uri"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:rdb="http://developer.cognos.com/schemas/xts/rdb">
-
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
-
- <xsl:template match="rdb:mypages">
-
- <xsl:variable name="mode" select="@mode"/>
- <!-- When in properties mode, find out if this dialog should be read-only. -->
- <out:variable name="readOnly" select="/root/cm:queryResponse/cm:queryReply[1]/*/cm:permissions and not(contains(concat(' ',/root/cm:queryResponse/cm:queryReply[1]/*/cm:permissions,' '),' write '))"/>
-
- <!-- The language that will be in focus in the dropdown -->
- <out:variable name="currentLang">
- <out:choose>
- <out:when test="env/param[@name='m_mp_language']">
- <out:value-of select="env/param[@name='m_mp_language']"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="user/param[@name='contentLocale']"/>
- </out:otherwise>
- </out:choose>
- </out:variable>
-
- <out:variable name="titleControlName" select="concat('m_mp_mlt_title_', $currentLang)"/>
- <out:variable name="instructionControlName" select="concat('m_mp_mlt_instructions_', $currentLang)"/>
-
- <!-- Common script -->
- <script language="JavaScript">
- var cmdForm = null;
- var title = null;
- var instructions = null;
-
- var g_initTitleControls = <out:value-of select="not(key('env-param', 'm_mp_titleStyle')) or key('env-param', 'm_mp_titleStyle') = 'custom' or key('env-param', 'm_mp_titleStyle') = ''"/>;
- var g_initInstructionsControls = <out:value-of select="not(key('env-param', 'm_mp_instructionsStyle')) or key('env-param', 'm_mp_instructionsStyle') = 'custom' or key('env-param', 'm_mp_instructionsStyle') = ''"/>;
- var g_readOnly = <out:value-of select="$readOnly"/>;
- var isBidiEnabled = <out:value-of select="boolean($isBidiEnabled='true')"/>;
-
- function initTextControls()
- {
- cmdForm = document.pform;
- title = cmdForm.elements['<out:value-of select="xtsext:javascriptencode($titleControlName)"/>'];
- instructions = cmdForm.elements['<out:value-of select="xtsext:javascriptencode($instructionControlName)"/>'];
-
- if (!g_readOnly)
- {
- // Update title styles:
- if (g_initTitleControls)
- updateTitleText();
-
- // Update instructions styles:
- if (g_initInstructionsControls )
- updateInstructionsText();
- }
- }
-
- function updateTitleText()
- {
- if (cmdForm.m_mp_titleFont.selectedIndex != -1) {
- title.style.fontFamily = cmdForm.m_mp_titleFont.options[cmdForm.m_mp_titleFont.selectedIndex].value;
- title.style.fontSize = cmdForm.m_mp_titleFontSize.options[cmdForm.m_mp_titleFontSize.selectedIndex].value;
- }
-
- if (cmdForm.m_mp_titleColour.value != '' && cmdForm.m_mp_titleColour.value != 'default')
- title.style.color = cmdForm.m_mp_titleColour.value;
-
- title.style.fontWeight = (cmdForm.m_mp_titleBold.value == "true") ? "bold" : "normal" ;
- if (cmdForm.m_mp_titleBold.value == "true")
- press_titleStyle('title_bold');
-
- title.style.fontStyle = (cmdForm.m_mp_titleItalic.value == "true") ? "italic" : "normal" ;
- if (cmdForm.m_mp_titleItalic.value == "true")
- press_titleStyle('title_italic');
-
- title.style.textDecoration = (cmdForm.m_mp_titleUnderline.value == "true") ? "underline" : "none" ;
- if (cmdForm.m_mp_titleUnderline.value == "true")
- press_titleStyle('title_underline');
-
- title.style.textAlign = cmdForm.m_mp_titleAlign.value;
- if (cmdForm.m_mp_titleAlign.value != '')
- eval("press_titleStyle('title_align_" + cmdForm.m_mp_titleAlign.value + "')");
-
- if (isBidiEnabled){
- title.dir = ((bidi.baseTextDirection == "ltr" || bidi.baseTextDirection == "rtl") ? bidi.baseTextDirection : bidi.resolveStrBtd(title.value));
- if (bidi.baseTextDirection == "auto"){
- title.onkeyup = function() {bidi.onkeyup(title);};
- }
- }
- }
-
- function updateInstructionsText()
- {
- if (cmdForm.m_mp_instructionsFont.selectedIndex != -1) {
- instructions.style.fontFamily = cmdForm.m_mp_instructionsFont.options[cmdForm.m_mp_instructionsFont.selectedIndex].value;
- instructions.style.fontSize = cmdForm.m_mp_instructionsFontSize.options[cmdForm.m_mp_instructionsFontSize.selectedIndex].value;
- }
-
- instructions.style.fontWeight = (cmdForm.m_mp_instructionsBold.value == "true") ? "bold" : "normal" ;
- if (cmdForm.m_mp_instructionsBold.value == "true")
- press_tbInstructionsStyle('i_bold');
-
- instructions.style.fontStyle = (cmdForm.m_mp_instructionsItalic.value == "true") ? "italic" : "normal" ;
- if (cmdForm.m_mp_instructionsItalic.value == "true")
- press_tbInstructionsStyle('i_italic');
-
- instructions.style.textDecoration = (cmdForm.m_mp_instructionsUnderline.value == "true") ? "underline" : "none" ;
- if (cmdForm.m_mp_instructionsUnderline.value == "true")
- press_tbInstructionsStyle('i_underline');
-
- if (cmdForm.m_mp_instructionsColour.value != '' && cmdForm.m_mp_instructionsColour.value != 'default')
- instructions.style.color = cmdForm.m_mp_instructionsColour.value;
-
- instructions.style.textAlign = cmdForm.m_mp_instructionsAlign.value;
- if (cmdForm.m_mp_instructionsAlign.value != ''){
- eval("press_tbInstructionsStyle('i_align_" + cmdForm.m_mp_instructionsAlign.value + "')");
- }
-
- if (isBidiEnabled){
- instructions.dir = ((bidi.baseTextDirection == "ltr" || bidi.baseTextDirection == "rtl") ? bidi.baseTextDirection : bidi.resolveStrBtd(instructions.value));
- if (bidi.baseTextDirection == "auto"){
- instructions.onkeyup = function() {bidi.onkeyup(instructions);};
- }
- }
- }
-
- <!-- clears the styles of a given text field -->
- function clearCustomStyles(tf)
- {
- tf.color = '';
- tf.fontFamily = '';
- tf.fontSize = '';
- tf.fontWeight = '';
- tf.fontStyle = '';
- tf.textDecoration = '';
- tf.textAlign = '';
- }
- </script>
-
- <xsl:choose>
- <xsl:when test="$mode = 'properties'">
- <lyt:layout style="2" width="100%" border="yes" title="IDS_MEW_PAGE_STYLE_HEADING1" intro="IDS_MEW_PAGE_STYLE_HEADING1_INTRO">
- <lyt:section>
- <out:variable name="selectedLangs" select="''"/>
- <dp:input>
- <dp:section1>
- <xts:string id="IDS_PROP_LANGUAGE"/>
- </dp:section1>
- <dp:section2>
- <out:choose>
- <out:when test="not($readOnly)">
- <out:variable name="selectedLangs_list">
- <out:for-each select="/root/SelectedLanguages/lang">
- <out:value-of select="concat(' ', ., ' ')"/>
- </out:for-each>
- </out:variable>
-
- <script language="JavaScript">
- function changeLang(lang, index)
- {
- if (lang == '')
- {
- var liistSize = document.pform.m_mp_language.options.length
- if (liistSize > index+1)
- document.pform.m_mp_language.options[index+1].selected = true;
- else if (liistSize == index+1)
- document.pform.m_mp_language.options[index-1].selected = true;
- }
-
- document.pform.m_mp_cmd.value = "change_language";
- document.pform.m.value = "<out:value-of select="$mname"/>";
- document.pform.submit();
- }
-
- function remove_lang()
- {
- document.pform.m_mp_cmd.value = "remove_language";
- document.pform.m.value = "<out:value-of select="$mname"/>";
- document.pform.submit();
- }
- </script>
-
- <utml:select name="m_mp_language" onchange="changeLang(this.options[this.selectedIndex].value, this.selectedIndex)">
- <utml:default-value>
- <out:value-of select="$currentLang"/>
- </utml:default-value>
-
- <out:for-each select="/root/SelectedLanguages/lang">
- <out:variable name="z" select="."/>
- <utml:option>
- <utml:value><out:value-of select="."/></utml:value>
- <out:value-of select="/root/config/param[@name='locale']/locale[@type='contentLocale' and id = $z]/displayName"/>
- </utml:option>
- <out:if test="position()=last()">
- <utml:option>
- <utml:value></utml:value>
- <out:value-of select="'--------------------------------------'"/>
- </utml:option>
- </out:if>
- </out:for-each>
-
-
- <out:for-each select="/root/config/param[@name='locale']/locale[@type='contentLocale']">
- <out:if test="not(contains($selectedLangs_list, concat(' ', id, ' ')))">
- <utml:option>
- <utml:value><out:value-of select="id"/></utml:value>
- <out:value-of select="displayName"/>
- </utml:option>
- </out:if>
- </out:for-each>
- </utml:select>
-   
- <out:if test="count(/root/SelectedLanguages/lang) > 1">
- <a href="javascript:remove_lang()"><xts:string id="IDS_MEW_PAGE_STYLE_SREMOVE_LANGUAGE"/></a>
- </out:if>
- <!-- command -->
- <utml:input type="hidden" name="m_mp_cmd" utml:update="false"/>
- <!-- store the language now in focus in the lang dropdown -->
- <utml:input type="hidden" name="m_mp_langToSave" utml:update="false">
- <out:attribute name="value"><out:value-of select="$currentLang"/></out:attribute>
- </utml:input>
- </out:when>
-
- <out:otherwise>
- <out:value-of select="$currentLang"/>
- </out:otherwise>
- </out:choose>
-
- </dp:section2>
- </dp:input>
- </lyt:section>
- </lyt:layout>
- </xsl:when>
- <xsl:otherwise>
- <utml:input type="hidden" name="m_mp_language">
- <out:attribute name="value">
- <out:value-of select="$currentLang"/>
- </out:attribute>
- </utml:input>
- </xsl:otherwise>
- </xsl:choose>
-
- <out:variable name="fontUnit" select="/root/system/param[@name='myPages']/param[@name='fontUnit']"/>
-
- <xsl:variable name="fontSizeChoice">
- <utml:option><utml:value><out:value-of select="concat('8',$fontUnit)"/></utml:value>8</utml:option>
- <utml:option><utml:value><out:value-of select="concat('9',$fontUnit)"/></utml:value>9</utml:option>
- <utml:option><utml:value><out:value-of select="concat('10',$fontUnit)"/></utml:value>10</utml:option>
- <utml:option><utml:value><out:value-of select="concat('11',$fontUnit)"/></utml:value>11</utml:option>
- <utml:option><utml:value><out:value-of select="concat('12',$fontUnit)"/></utml:value>12</utml:option>
- <utml:option><utml:value><out:value-of select="concat('14',$fontUnit)"/></utml:value>14</utml:option>
- <utml:option><utml:value><out:value-of select="concat('16',$fontUnit)"/></utml:value>16</utml:option>
- <utml:option><utml:value><out:value-of select="concat('18',$fontUnit)"/></utml:value>18</utml:option>
- <utml:option><utml:value><out:value-of select="concat('20',$fontUnit)"/></utml:value>20</utml:option>
- <utml:option><utml:value><out:value-of select="concat('22',$fontUnit)"/></utml:value>22</utml:option>
- <utml:option><utml:value><out:value-of select="concat('24',$fontUnit)"/></utml:value>24</utml:option>
- <utml:option><utml:value><out:value-of select="concat('26',$fontUnit)"/></utml:value>26</utml:option>
- <utml:option><utml:value><out:value-of select="concat('28',$fontUnit)"/></utml:value>28</utml:option>
- <utml:option><utml:value><out:value-of select="concat('36',$fontUnit)"/></utml:value>36</utml:option>
- <utml:option><utml:value><out:value-of select="concat('48',$fontUnit)"/></utml:value>48</utml:option>
- <utml:option><utml:value><out:value-of select="concat('72',$fontUnit)"/></utml:value>72</utml:option>
- </xsl:variable>
-
- <xsl:variable name="fontSizeChoiceInPercent">
- <utml:option value="50%">50</utml:option>
- <utml:option value="80%">80</utml:option>
- <utml:option value="100%">100</utml:option>
- <utml:option value="110%">110</utml:option>
- <utml:option value="120%">120</utml:option>
- <utml:option value="140%">140</utml:option>
- <utml:option value="160%">160</utml:option>
- <utml:option value="180%">180</utml:option>
- <utml:option value="200%">200</utml:option>
- <utml:option value="220%">220</utml:option>
- <utml:option value="240%">240</utml:option>
- <utml:option value="280%">280</utml:option>
- <utml:option value="300%">300</utml:option>
- <utml:option value="350%">350</utml:option>
- <utml:option value="400%">400</utml:option>
- </xsl:variable>
-
- <xsl:variable name="fontFaceChoice">
- <out:choose>
- <out:when test="fonts/configuration/property/font">
- <out:for-each select="fonts/configuration/property/font">
- <utml:option>
- <utml:value><out:value-of select="id"/></utml:value>
- <out:value-of select="id"/>
- </utml:option>
- </out:for-each>
- </out:when>
- <out:otherwise>
- <!-- note: for simplicity, we use the default title font as the default here -->
- <utml:option>
- <utml:value><out:value-of select="/root/system/param[@name='myPages']/param[@name='defaultTitleFontFace']"/></utml:value>
- <out:value-of select="/root/system/param[@name='myPages']/param[@name='defaultTitleFontFace']"/>
- </utml:option>
- </out:otherwise>
- </out:choose>
- </xsl:variable>
-
-
- <!-- Title -->
- <!-- ======================================= -->
- <lyt:layout style="2" width="100%">
- <lyt:section>
- <dp:section>
- <dp:input>
- <dp:section1>
- <xts:string id="IDS_MEW_PAGE_STYLE_TITLE"/>
- </dp:section1>
- <dp:section2>
- <out:choose>
- <out:when test="not($readOnly)">
- <table cellpadding="0" cellspacing="0" border="0" style="width:610px;">
- <tr>
- <td width="100%" nowrap="nowrap" class="formLink" align="right">
- <script language="JavaScript">
- function setTitleStyle(mode)
- {
- if (mode == 'default')
- {
- document.getElementById('divTitleFormat').style.display = 'none';
- document.getElementById('divTitleFormatControlDefault').style.display = 'none';
- document.getElementById('divTitleFormatControlCustom').style.display = 'inline';
- document.pform.m_mp_titleStyle.value = "default";
- clearCustomStyles(title.style);
- title.className = 'defaultTitleText';
- }
- else
- {
- document.getElementById('divTitleFormat').style.display = 'inline';
- document.getElementById('divTitleFormatControlDefault').style.display = 'inline';
- document.getElementById('divTitleFormatControlCustom').style.display = 'none';
- document.pform.m_mp_titleStyle.value = "custom";
- updateTitleText();
- }
- }
-
- </script>
-
- <div id="divTitleFormatControlCustom">
- <out:attribute name="style">
- <out:choose>
- <out:when test="key('env-param', 'm_mp_titleStyle') = 'default'">display:inline;</out:when>
- <out:otherwise>display:none;</out:otherwise>
- </out:choose>
- </out:attribute>
- <img src="{'{$skin_images}'}prompt_option_to_left.gif" style="margin-right:5px;" align="absbottom"/>
- <a href="javascript:setTitleStyle('custom')"><xts:string id="IDS_MEW_PAGE_STYLE_CUSTOM_FORMAT"/></a>
- </div>
- <div id="divTitleFormatControlDefault">
- <out:attribute name="style">
- <out:choose>
- <out:when test="key('env-param', 'm_mp_titleStyle') = 'default'">display:none;</out:when>
- <out:otherwise>display:inline;</out:otherwise>
- </out:choose>
- </out:attribute>
- <a href="javascript:setTitleStyle('default')"><xts:string id="IDS_MEW_PAGE_STYLE_DEFAULT_FORMAT"/></a>
- <img src="{'{$skin_images}'}prompt_option_to_right.gif" style="margin-left:5px;margin-right:10px;" align="absbottom"/>
- </div>
- </td>
- <td height="30">
- <div id="divTitleFormat">
- <out:attribute name="style">
- <out:choose>
- <out:when test="key('env-param', 'm_mp_titleStyle') = 'default'">display:none;</out:when>
- <out:otherwise>display:inline;</out:otherwise>
- </out:choose>
- </out:attribute>
- <table cellpadding="2" cellspacing="0" border="0" style="width:100%">
- <tr>
- <td width="100%" align="right" nowrap="nowrap">
- <utml:select name="m_mp_titleFont" onchange="setTitleFont(this.options[this.selectedIndex].value)">
- <utml:default-value>
- <out:value-of select="/root/system/param[@name='myPages']/param[@name='defaultTitleFontFace']"/>
- </utml:default-value>
- <xsl:copy-of select="$fontFaceChoice"/>
- </utml:select>
- <script language="JavaScript">
- function setTitleFont(font)
- {
- title.style.fontFamily = font;
- }
- </script>
- </td>
-
- <td>
- <utml:select name="m_mp_titleFontSize" onchange="setTitleFontSize(this.options[this.selectedIndex].value)">
- <utml:default-value><out:value-of select="concat(/root/system/param[@name='myPages']/param[@name='defaultTitleFontSize'],$fontUnit)"/></utml:default-value>
- <out:choose>
- <out:when test="$fontUnit = '%'">
- <xsl:copy-of select="$fontSizeChoiceInPercent"/>
- </out:when>
- <out:otherwise>
- <xsl:copy-of select="$fontSizeChoice"/>
- </out:otherwise>
- </out:choose>
- </utml:select>
- <script language="JavaScript">
- function setTitleFontSize(size)
- {
- title.style.fontSize = size;
- }
- </script>
- </td>
-
- <td>
- <script language="JavaScript">
- function setTitleColour(color)
- {
- title.style.color = color;
- cmdForm.m_mp_titleColour.value = color;
- }
-
- function setTitleTextAlign(align)
- {
- releaseAllTitleAlign();
- eval("press_titleStyle('title_align_" + align + "')");
- title.style.textAlign = align;
- cmdForm.m_mp_titleAlign.value = align;
- }
-
- function releaseAllTitleAlign()
- {
- release_titleStyle('title_align_left');
- release_titleStyle('title_align_center');
- release_titleStyle('title_align_right');
- release_titleStyle('title_align_justify');
- }
-
- function title_bold()
- {
- if (isPressed_title_bold())
- {
- release_titleStyle('title_bold');
- cmdForm.m_mp_titleBold.value = "false";
- title.style.fontWeight = "normal";
- }
- else
- {
- press_titleStyle('title_bold');
- cmdForm.m_mp_titleBold.value = "true";
- title.style.fontWeight = "bold";
- }
- }
-
- function title_italic()
- {
- if (isPressed_title_italic())
- {
- release_titleStyle('title_italic');
- cmdForm.m_mp_titleItalic.value = "false";
- title.style.fontStyle = "normal";
- }
- else
- {
- press_titleStyle('title_italic');
- cmdForm.m_mp_titleItalic.value = "true";
- title.style.fontStyle = "italic";
- }
- }
-
- function title_underline()
- {
- if (isPressed_title_underline())
- {
- release_titleStyle('title_underline');
- cmdForm.m_mp_titleUnderline.value = "false";
- title.style.textDecoration = "none";
- }
- else
- {
- press_titleStyle('title_underline');
- cmdForm.m_mp_titleUnderline.value = "true";
- title.style.textDecoration = "underline";
- }
- }
- </script>
- <utml:input type="hidden" name="m_mp_titleStyle" value="custom"/>
- <utml:input type="hidden" name="m_mp_titleColour" value="#000000"/>
- <utml:input type="hidden" name="m_mp_titleAlign" value=""/>
- <utml:input type="hidden" name="m_mp_titleBold" value="true"/>
- <utml:input type="hidden" name="m_mp_titleItalic" value="false"/>
- <utml:input type="hidden" name="m_mp_titleUnderline" value="false"/>
-
- <out:variable name="titleToolBar">
- <toolbar id="titleStyle">
- <!-- Colour -->
- <toolbarButton id="title_colour">
- <param name="image">action_font_color.gif</param>
- <param name="onclick">showColourSelectionDlg('setTitleColour'); event.cancelBubble = true;</param>
- <param name="title"><xts:string id="IDS_MP_COLOUR"/></param>
- </toolbarButton>
- <toolbarSeparator style="space"/>
- <!-- Bold -->
- <toolbarButton id="title_bold">
- <param name="text"><span class="toolbarTextBold"><xts:string id="IDS_BOLD"/></span></param>
- <param name="onclick">title_bold()</param>
- <param name="title"><xts:string id="IDS_MP_BOLD"/></param>
- </toolbarButton>
- <!-- Italic -->
- <toolbarButton id="title_italic">
- <param name="text"><span class="toolbarTextItalic"><xts:string id="IDS_ITALIC"/></span></param>
- <param name="onclick">title_italic()</param>
- <param name="title"><xts:string id="IDS_MP_ITALIC"/></param>
- </toolbarButton>
- <!-- Underline -->
- <toolbarButton id="title_underline">
- <param name="text"><span class="toolbarTextUnderline"><xts:string id="IDS_UNDERLINE"/></span></param>
- <param name="onclick">title_underline()</param>
- <param name="title"><xts:string id="IDS_MP_UNDERLINE"/></param>
- </toolbarButton>
- <toolbarSeparator style="space"/>
- <!-- Align left -->
- <toolbarButton id="title_align_left">
- <param name="image">action_align_left.gif</param>
- <param name="onclick">setTitleTextAlign('left')</param>
- <param name="title"><xts:string id="IDS_MP_LEFT"/></param>
- </toolbarButton>
- <!-- Align center -->
- <toolbarButton id="title_align_center">
- <param name="image">action_align_center.gif</param>
- <param name="onclick">setTitleTextAlign('center')</param>
- <param name="title"><xts:string id="IDS_MP_CENTER"/></param>
- </toolbarButton>
- <!-- Align right -->
- <toolbarButton id="title_align_right">
- <param name="image">action_align_right.gif</param>
- <param name="onclick">setTitleTextAlign('right')</param>
- <param name="title"><xts:string id="IDS_MP_RIGHT"/></param>
- </toolbarButton>
- <!-- Align justify -->
- <toolbarButton id="title_align_justify">
- <param name="image">action_justify.gif</param>
- <param name="onclick">setTitleTextAlign('justify')</param>
- <param name="title"><xts:string id="IDS_MP_JUSTIFIED"/></param>
- </toolbarButton>
- </toolbar>
- </out:variable>
- <!-- Render the toolbar -->
- <out:call-template name="renderToolBar">
- <out:with-param name="toolbarXML">
- <out:copy-of select="$titleToolBar"/>
- </out:with-param>
- </out:call-template>
- </td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
- </table>
-
- <!-- Title text -->
- <table cellpadding="0" cellspacing="0" border="0" style="width:610px;">
- <tr>
- <td colspan="2">
- <input id="titleText" type="text" style="width:610px;" class="defaultTitleText" maxlength="65536">
- <out:attribute name="name">
- <out:value-of select="concat('m_mp_mlt_title_', $currentLang)"/>
- </out:attribute>
- <out:variable name="initValue">
- <out:value-of select="env/param[@name=concat('m_mp_mlt_title_', $currentLang)]"/>
- </out:variable>
- <out:attribute name="value">
- <out:value-of select="$initValue"/>
- </out:attribute>
- <out:call-template name="add-bidi-onfocus-event">
- <out:with-param name="value" select="$initValue"/>
- </out:call-template>
- </input>
- </td>
- </tr>
- </table>
- </out:when>
-
- <out:otherwise>
- <out:value-of select="env/param[@name=concat('m_mp_mlt_title_', $currentLang)]"/>
- </out:otherwise>
- </out:choose>
-
- </dp:section2>
- </dp:input>
- </dp:section>
- <dp:choice>
- <dp:section1>
- <utml:input type="checkbox" name="m_mp_hideTitle" value="true">
- <out:if test="$readOnly">
- <out:attribute name="disabled">disabled</out:attribute>
- </out:if>
- </utml:input>
- </dp:section1>
- <dp:section2>
- <xts:string id="IDS_MEW_PAGE_STYLE_HIDE_TITLE"/>
- </dp:section2>
- </dp:choice>
- </lyt:section>
- </lyt:layout>
-
-
-
-
- <!-- Instructions -->
- <!-- ======================================= -->
- <lyt:layout style="2" width="100%">
- <lyt:section>
- <dp:section>
- <dp:input>
- <dp:section1>
- <xts:string id="IDS_MEW_PAGE_STYLE_INSTRUCTIONS"/>
- </dp:section1>
- <dp:section2>
- <out:choose>
- <out:when test="not($readOnly)">
- <table cellpadding="0" cellspacing="0" border="0" style="width:610px;">
- <tr>
- <td width="100%" nowrap="nowrap" class="formLink" align="right">
- <script language="JavaScript">
- function setInstructionsStyle(mode)
- {
- if (mode == 'default')
- {
- document.getElementById('divInstructionsFormat').style.display = 'none';
- document.getElementById('divInstructionsFormatControlDefault').style.display = 'none';
- document.getElementById('divInstructionsFormatControlCustom').style.display = 'inline';
- document.pform.m_mp_instructionsStyle.value = "default";
- clearCustomStyles(instructions.style);
- instructions.className = 'defaultInstructionsText';
- }
- else
- {
- document.getElementById('divInstructionsFormat').style.display = 'inline';
- document.getElementById('divInstructionsFormatControlDefault').style.display = 'inline';
- document.getElementById('divInstructionsFormatControlCustom').style.display = 'none';
- document.pform.m_mp_instructionsStyle.value = "custom";
- updateInstructionsText();
- }
- }
- </script>
-
- <div id="divInstructionsFormatControlCustom">
- <out:attribute name="style">
- <out:choose>
- <out:when test="key('env-param', 'm_mp_instructionsStyle') = 'default'">display:inline;</out:when>
- <out:otherwise>display:none;</out:otherwise>
- </out:choose>
- </out:attribute>
- <img src="{'{$skin_images}'}prompt_option_to_left.gif" style="margin-right:5px;" align="absbottom"/>
- <a href="javascript:setInstructionsStyle('custom')"><xts:string id="IDS_MEW_PAGE_STYLE_CUSTOM_FORMAT"/></a>
- </div>
-
- <div id="divInstructionsFormatControlDefault">
- <out:attribute name="style">
- <out:choose>
- <out:when test="key('env-param', 'm_mp_instructionsStyle') = 'default'">display:none;</out:when>
- <out:otherwise>display:inline;</out:otherwise>
- </out:choose>
- </out:attribute>
- <a href="javascript:setInstructionsStyle('default')"><xts:string id="IDS_MEW_PAGE_STYLE_DEFAULT_FORMAT"/></a>
- <img src="{'{$skin_images}'}prompt_option_to_right.gif" style="margin-left:5px;margin-right:10px;" align="absbottom"/>
- </div>
- </td>
- <td height="30">
- <div id="divInstructionsFormat">
- <out:attribute name="style">
- <out:choose>
- <out:when test="key('env-param', 'm_mp_instructionsStyle') = 'default'">display:none;</out:when>
- <out:otherwise>display:inline;</out:otherwise>
- </out:choose>
- </out:attribute>
- <table cellpadding="2" cellspacing="0" border="0">
- <tr>
- <td width="100%" align="right" nowrap="nowrap">
- <utml:select name="m_mp_instructionsFont" onchange="setInstructionsFont(this.options[this.selectedIndex].value)">
- <utml:default-value>
- <out:value-of select="/root/system/param[@name='myPages']/param[@name='defaultInstructionsFontFace']"/>
- </utml:default-value>
- <xsl:copy-of select="$fontFaceChoice"/>
- </utml:select>
- <script language="JavaScript">
- function setInstructionsFont(font)
- {
- instructions.style.fontFamily = font;
- }
- </script>
- </td>
- <td>
- <utml:select name="m_mp_instructionsFontSize" onchange="setInstructionsFontSize(this.options[this.selectedIndex].value)">
- <utml:default-value><out:value-of select="concat(/root/system/param[@name='myPages']/param[@name='defaultInstructionsFontSize'], $fontUnit)"/></utml:default-value>
- <out:choose>
- <out:when test="$fontUnit = '%'">
- <xsl:copy-of select="$fontSizeChoiceInPercent"/>
- </out:when>
- <out:otherwise>
- <xsl:copy-of select="$fontSizeChoice"/>
- </out:otherwise>
- </out:choose>
- </utml:select>
- <script language="JavaScript">
- function setInstructionsFontSize(size)
- {
- instructions.style.fontSize = size;
- }
- </script>
- </td>
-
-
- <td>
- <script language="JavaScript">
- function setInstructionsColour(color)
- {
- instructions.style.color = color;
- cmdForm.m_mp_instructionsColour.value = color;
- }
-
- function instructions_bold()
- {
- if (isPressed_i_bold())
- {
- release_tbInstructionsStyle('i_bold');
- cmdForm.m_mp_instructionsBold.value = "false";
- instructions.style.fontWeight = "normal";
- }
- else
- {
- press_tbInstructionsStyle('i_bold');
- cmdForm.m_mp_instructionsBold.value = "true";
- instructions.style.fontWeight = "bold";
- }
- }
-
- function instructions_italic()
- {
- if (isPressed_i_italic())
- {
- release_tbInstructionsStyle('i_italic');
- cmdForm.m_mp_instructionsItalic.value = "false";
- instructions.style.fontStyle = "normal";
- }
- else
- {
- press_tbInstructionsStyle('i_italic');
- cmdForm.m_mp_instructionsItalic.value = "true";
- instructions.style.fontStyle = "italic";
- }
- }
-
- function instructions_underline()
- {
- if (isPressed_i_underline())
- {
- release_tbInstructionsStyle('i_underline');
- cmdForm.m_mp_instructionsUnderline.value = "false";
- instructions.style.textDecoration = "none";
- }
- else
- {
- press_tbInstructionsStyle('i_underline');
- cmdForm.m_mp_instructionsUnderline.value = "true";
- instructions.style.textDecoration = "underline";
- }
- }
-
- function setInstructionsTextAlign(align)
- {
- releaseAllInstructionsAlign();
- eval("press_tbInstructionsStyle('i_align_" + align + "')");
- instructions.style.textAlign = align;
- cmdForm.m_mp_instructionsAlign.value = align;
- }
-
- function releaseAllInstructionsAlign()
- {
- release_tbInstructionsStyle('i_align_left');
- release_tbInstructionsStyle('i_align_center');
- release_tbInstructionsStyle('i_align_right');
- release_tbInstructionsStyle('i_align_justify');
- }
- </script>
-
- <utml:input type="hidden" name="m_mp_instructionsStyle" value="custom"/>
- <utml:input type="hidden" name="m_mp_instructionsColour" value="#000000"/>
- <utml:input type="hidden" name="m_mp_instructionsBold" value="false"/>
- <utml:input type="hidden" name="m_mp_instructionsItalic" value="false"/>
- <utml:input type="hidden" name="m_mp_instructionsUnderline" value="false"/>
- <utml:input type="hidden" name="m_mp_instructionsAlign" value=""/>
-
- <out:variable name="instructionsToolBar">
- <toolbar id="tbInstructionsStyle">
- <!-- Colour -->
- <toolbarButton id="i_colour">
- <param name="image">action_font_color.gif</param>
- <param name="onclick">showColourSelectionDlg('setInstructionsColour'); event.cancelBubble = true;</param>
- <param name="title"><xts:string id="IDS_MP_COLOUR"/></param>
- </toolbarButton>
- <toolbarSeparator style="space"/>
- <!-- Bold -->
- <toolbarButton id="i_bold">
- <param name="text"><span class="toolbarTextBold"><xts:string id="IDS_BOLD"/></span></param>
- <param name="onclick">instructions_bold()</param>
- <param name="title"><xts:string id="IDS_MP_BOLD"/></param>
- </toolbarButton>
- <!-- Italic -->
- <toolbarButton id="i_italic">
- <param name="text"><span class="toolbarTextItalic"><xts:string id="IDS_ITALIC"/></span></param>
- <param name="onclick">instructions_italic()</param>
- <param name="title"><xts:string id="IDS_MP_ITALIC"/></param>
- </toolbarButton>
- <!-- Underline -->
- <toolbarButton id="i_underline">
- <param name="text"><span class="toolbarTextUnderline"><xts:string id="IDS_UNDERLINE"/></span></param>
- <param name="onclick">instructions_underline()</param>
- <param name="title"><xts:string id="IDS_MP_UNDERLINE"/></param>
- </toolbarButton>
- <toolbarSeparator style="space"/>
- <!-- Align left -->
- <toolbarButton id="i_align_left">
- <param name="image">action_align_left.gif</param>
- <param name="onclick">setInstructionsTextAlign('left')</param>
- <param name="title"><xts:string id="IDS_MP_LEFT"/></param>
- </toolbarButton>
- <!-- Align center -->
- <toolbarButton id="i_align_center">
- <param name="image">action_align_center.gif</param>
- <param name="onclick">setInstructionsTextAlign('center')</param>
- <param name="title"><xts:string id="IDS_MP_CENTER"/></param>
- </toolbarButton>
- <!-- Align right -->
- <toolbarButton id="i_align_right">
- <param name="image">action_align_right.gif</param>
- <param name="onclick">setInstructionsTextAlign('right')</param>
- <param name="title"><xts:string id="IDS_MP_RIGHT"/></param>
- </toolbarButton>
- <!-- Align justify -->
- <toolbarButton id="i_align_justify">
- <param name="image">action_justify.gif</param>
- <param name="onclick">setInstructionsTextAlign('justify')</param>
- <param name="title"><xts:string id="IDS_MP_JUSTIFIED"/></param>
- </toolbarButton>
- </toolbar>
- </out:variable>
-
- <out:call-template name="renderToolBar">
- <out:with-param name="toolbarXML">
- <out:copy-of select="$instructionsToolBar"/>
- </out:with-param>
- </out:call-template>
- </td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
-
- <!-- Instructions text -->
- <tr>
- <td colspan="2">
- <!-- Ensure that the amount of text in this textarea does not exceed the caf limit. The defined limit comes from the dynvariable:
- dynvariable name="dyn_m_mp_mlt" maxlen="65536"
- in cafrules.xml.
- Validation is manual because the generated client side validation does not support dynvariables.
- -->
- <script language="javascript" src="{'{$webRoot}'}/cr1/caf.js"/>
- <script language="javascript" src="{'{$webcontent}'}/{'{$app}'}/js/validation.js"/>
- <script language="JavaScript">
- var cafInvalidLength = "<xts:string id="IDS_VAL_ERR_MAXIMUM_LENGTH" encode="javascript"/>";
- function caf_dyn_m_mp_mlt(field)
- {
- if (window.CAFReportValidationError)
- {
- var value = field.value;
- var highlight = null;
- if (value.length > 65536)
- {
- CAFReportValidationError(cafInvalidLength);
- highlight=value;
- }
- if (highlight != null)
- {
- CAFSelectText(field, highlight);
- }
- }
- }
- </script>
- <textarea style="width:100%; height:100px;" class="defaultInstructionsText" onblur="javascript:caf_dyn_m_mp_mlt(this);">
- <out:attribute name="name">
- <out:value-of select="concat('m_mp_mlt_instructions_', $currentLang)"/>
- </out:attribute>
- <out:variable name="initValue">
- <out:value-of select="env/param[@name=concat('m_mp_mlt_instructions_', $currentLang)]"/>
- </out:variable>
- <out:call-template name="add-bidi-onfocus-event">
- <out:with-param name="value" select="$initValue"/>
- </out:call-template>
- <out:value-of select="$initValue"/>
- </textarea>
- </td>
- </tr>
- </table>
- </out:when>
- <out:otherwise>
- <out:value-of select="env/param[@name=concat('m_mp_mlt_instructions_', $currentLang)]"/>
- </out:otherwise>
- </out:choose>
- </dp:section2>
- </dp:input>
- </dp:section>
- <dp:choice>
- <dp:section1>
- <utml:input type="checkbox" name="m_mp_hideInstructions" value="true">
- <out:if test="$readOnly">
- <out:attribute name="disabled">disabled</out:attribute>
- </out:if>
- </utml:input>
- </dp:section1>
- <dp:section2>
- <xts:string id="IDS_MEW_PAGE_STYLE_HIDE_INSTRUCTIONS"/>
- </dp:section2>
- </dp:choice>
- </lyt:section>
- </lyt:layout>
-
- <!-- Portlet styles -->
- <lyt:layout style="2" width="100%" border="yes" title="IDS_MEW_PAGE_STYLE_HEADING2">
- <lyt:section>
- <dp:choice>
- <dp:section1>
- <utml:input type="checkbox" name="m_mp_hideBorders" value="true">
- <out:if test="$readOnly">
- <out:attribute name="disabled">disabled</out:attribute>
- </out:if>
- </utml:input>
- <utml:default-value>true</utml:default-value>
- </dp:section1>
- <dp:section2>
- <xts:string id="IDS_MEW_PAGE_STYLE_HIDE_BORDERS"/>
- </dp:section2>
- <dp:section1>
- <script language="JavaScript">
- function setTitleBarOption(bState)
- {
- if(bState)
- {
- document.pform.m_mp_hideEditMode.checked = true;
- document.pform.m_mp_hideEditMode.disabled = true;
- }
- else
- {
- document.pform.m_mp_hideEditMode.disabled = false;
- }
- }
- </script>
- <utml:input type="checkbox" name="m_mp_hideTitleBars" value="true" onclick="setTitleBarOption(this.checked)">
- <out:if test="$readOnly">
- <out:attribute name="disabled">disabled</out:attribute>
- </out:if>
- </utml:input>
- </dp:section1>
- <dp:section2>
- <xts:string id="IDS_MEW_PAGE_STYLE_HIDE_TITLE_BARS"/>
- </dp:section2>
- <dp:section1>
-    <utml:input type="checkbox" name="m_mp_hideEditMode" value="true">
- <out:if test="$readOnly or key('env-param', 'm_mp_hideTitleBars')">
- <out:attribute name="disabled">disabled</out:attribute>
- </out:if>
- <out:if test="key('env-param', 'm_mp_hideTitleBars')">
- <out:attribute name="checked">checked</out:attribute>
- </out:if>
- </utml:input>
- </dp:section1>
- <dp:section2>
-    <xts:string id="IDS_MEW_PAGE_STYLE_HIDE_EDIT_BUTTONS"/>
- </dp:section2>
- </dp:choice>
- </lyt:section>
- </lyt:layout>
-
- </xsl:template>
-
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
-
- </xsl:stylesheet>
|