raver
|
 |
| Joined: 03 Dec 2002 |
| Total Posts: 2 |
| |
|
Outlook webparts Posted: 03 Dec 2002 11:11 AM |
Als ik een outlook webpart importeer vraagt sharepoint bij een normale user in eens om een naam en wachtwoord als deze die invoert komt het scherm nog 3 maal naar voren.
Weet iemand hier een antwoord op??
Frederik |
|
|
 |
|
|
Re: Outlook webparts Posted: 03 Dec 2002 03:15 PM |
ik ben het volgende eens tegengekomen.
Je moet de volgende regel toevoegen in deze XSL code in ieder Outlook Web Part onder Embedded XSL
Zoek in de code naar
//savePartStorage_WPQ_();
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<script language="JavaScript">
// Constants
strIconsFile_WPQ_ = "_WPR_/Icons.xml";
strIconsName_WPQ_ = "<xsl:value-of
select="/Strings/String[@_locID='L_Icons_Text']"/>";
strListFile_WPQ_ = "_WPR_/List.xml";
strListName_WPQ_ = "<xsl:value-of
select="/Strings/String[@_locID='L_List_Text']"/>";
DefaultHeight_WPQ_ = "147px";
</script>
<!-- Navigation UI -->
<table border="0" cellpadding="0" cellspacing="0" style="width:100%;
height:23px; display:none" id="MainTable_WPQ_">
<tr height="100%" valign="center">
<td class="UserToolbarTextArea">
<a class="UserToolbarLink" href="javascript:createNewItem_WPQ_()">
<xsl:attribute name="title">
<xsl:value-of select="/Strings/String[@_locID='L_NewNote_Text']"/>
</xsl:attribute>
<xsl:value-of select="/Strings/String[@_locID='L_New_Text']"/></a>
<!-- Prevents an extra space after new -->
|
<a class="UserToolbarLink" href="javascript:deleteItem_WPQ_()">
<xsl:attribute name="title">
<xsl:value-of select="/Strings/String[@_locID='L_Delete_Text']"/>
</xsl:attribute>
<xsl:value-of select="/Strings/String[@_locID='L_Delete_Text']"/>
</a>
</td>
<td class="UserToolbarImageArea" align="right" id="ToolbarButtons_WPQ_">
<nobr>
<img src="_WPR_/List.gif" id="ListIcon_WPQ_"
class="UserToolbarImage">
<xsl:attribute name="alt">
<xsl:value-of
select="/Strings/String[@_locID='L_List_Text']"/></xsl:attribute>
</img>
<img src="_WPR_/Icons.gif" id="IconsIcon_WPQ_"
class="UserToolbarImage">
<xsl:attribute name="alt"><xsl:value-of
select="/Strings/String[@_locID='L_Icons_Text']"/></xsl:attribute>
</img>
</nobr>
</td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" style="width:100%;
height:100%; display:none" id="OVCTable_WPQ_">
<tr valign="top">
<td width="100%" height="100%" style="border-left: 1 solid
white;border-top: 1 solid white">
<!-- Outlook View Control -->
<object style="margin:-1"
classid="clsid:0006F063-0000-0000-C000-000000000046" id="OVC_WPQ_"
width="100%" height="100%">
<param name="Folder" VALUE="Inbox"/>
<param name="Namespace" value="MAPI"/>
</object>
</td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" style="width:100%;
height:100%" id="ErrorTable_WPQ_">
<tr valign="top">
<td width="100%" height="100%">
<div class="UserNotification">
<xsl:value-of
select="/Strings/String[@_locID='L_CantDisplay_Text']"/><br/>
<xsl:value-of select="/Strings/String[@_locID='L_Upgrade_Text']"/>
</div>
</td>
</tr>
</table>
<script language="JavaScript">
// ---------------------------------------------------
// Outlook Shared Code
// Globals
var xmldom_WPQ_;
var g_blnV10_WPQ_ = true;
var g_currentViewName_WPQ_;
// Constants
c_strDefaultView_WPQ_ = "DefaultView";
/******************** Inline ************************/
if( -1 != window.navigator.appVersion.indexOf( "MSIE" ) )
{
// We are running in a browser which supports
// ActiveX objects
var strVersion = "";
var intCount;
intCount = window.navigator.appVersion.indexOf( "MSIE" ) + 5;
while( window.navigator.appVersion.charAt( intCount ) != '.' )
{
strVersion += window.navigator.appVersion.charAt( intCount );
intCount++;
}
<xsl:eval no-entities="t">"if( ( 5 <= parseInt(strVersion) ) &&
( null != OVC_WPQ_.object ) )"</xsl:eval>
{
// We were able to load the Microsoft Outlook View Control
MainTable_WPQ_.style.display="inline";
ErrorTable_WPQ_.style.display="none";
OVCTable_WPQ_.style.display="inline";
if( typeof(OVC_WPQ_.viewXML) != "undefined" )
{
var strTempXML;
strTempXML = OVC_WPQ_.viewXML;
}
else
{
g_blnV10_WPQ_ = false;
enableReducedFunctionalityMode_WPQ_();
}
// Check with the DDSC to see whether this part has
// a set height. If not, set it manually to the
// default.
if( null != DDSC.object )
{
DDSC.RegisterForEvent( "urn:schemas-microsoft-com:dhtml", "onload",
onload_WPQ_ );
DDSC.RegisterForEvent( "urn:schemas-microsoft-com:dhtml", "onunload",
onunload_WPQ_ );
}
else
{
// Make the height static
OVCTable_WPQ_.style.height = DefaultHeight_WPQ_;
}
}
}
/***************** End Inline ************************/
// Create a new item
function createNewItem_WPQ_()
{
OVC_WPQ_.NewDefaultItem();
}
// Delete the selected item
function deleteItem_WPQ_()
{
if( null == OVC_WPQ_.Selection )
alert( "<xsl:value-of
select="/Strings/String[@_locID='L_NoneSelected_Text']"/>" );
else
OVC_WPQ_.Delete();
}
// Remove characters from the view
// name that XML doesn't like
function encodeViewName_WPQ_( strViewName )
{
var regExp;
var strEncName;
regExp = / |'/g;
strEncName = strViewName.replace( regExp, "-" );
if( 0 == strEncName.length )
strEncName = "ERROR Encoding";
return strEncName;
}
function getDefaultView_WPQ_()
{
var nodeViews;
var strDefView = "";
nodeViews = xmldom_WPQ_.selectSingleNode( "/Views" );
if (nodeViews != null )
{
strDefView = nodeViews.getAttribute( c_strDefaultView_WPQ_ );
}
return strDefView;
}
// Perform initialization for the
// view persistance mechanism
function initViewStore_WPQ_()
{
var thisPart;
thisPart = DDSC.dashboard.parts( "_WPQ_" );
xmldom_WPQ_ = new ActiveXObject( "Microsoft.XMLDOM" );
xmldom_WPQ_.loadXML(
thisPart.Properties.Item("urn:schemas-microsoft-com:webpart:#PartStorage").V
alue );
}
// Run as a result of the 'onload' event
function onload_WPQ_()
{
var strDefView;
initViewStore_WPQ_();
sizeViewControl_WPQ_();
setInitialView_WPQ_();
strDefView = getDefaultView_WPQ_();
if( strDefView.length != 0 )
{
setView_WPQ_( null, strDefView );
setSelection_WPQ_( strDefView );
}
}
// Run as a result of the 'onunload' event
function onunload_WPQ_(){
if( g_blnV10_WPQ_ <xsl:eval no-entities="t">"&&"</xsl:eval>
(typeof(OVC_WPQ_) == "object") )
{
//savePartStorage_WPQ_();
}
}
// Persist the current view in the view control
// based on the folder name
function persistCurrentView_WPQ_()
{
var xmlViewNode;
var xmlRoot;
var xmlView;
var strViewXML;
strViewXML = OVC_WPQ_.viewXML;
<xsl:eval no-entities="t">"if( ( null != g_currentViewName_WPQ_ )
&& ( 0 < strViewXML.length ) )"</xsl:eval>
{
var strEncViewName;
var xmlTempNode;
// Create a node based on the current folder
strEncViewName = encodeViewName_WPQ_( g_currentViewName_WPQ_ );
xmlViewNode = xmldom_WPQ_.createElement( strEncViewName );
xmlView = new ActiveXObject( "Microsoft.XMLDOM" );
xmlView.loadXML( strViewXML );
xmlViewNode.appendChild( xmlView.documentElement );
// Look for a node with the same name as
// the current folder. If one exists, then
// replace it. Otherwise, just add the one
// we have.
xmlRoot = xmldom_WPQ_.selectSingleNode( "/Views" );
if( null == xmlRoot )
{
xmldom_WPQ_.loadXML( "<xsl:eval no-entities="t">"<?xml
version='1.0'?><Views/>"</xsl:eval>" );
xmlRoot = xmldom_WPQ_.selectSingleNode( "/Views" );
}
// Set the current view as our default
xmlRoot.setAttribute( c_strDefaultView_WPQ_, g_currentViewName_WPQ_ );
xmlTempNode = xmlRoot.selectSingleNode( strEncViewName );
if( null == xmlTempNode )
{
xmlRoot.appendChild( xmlViewNode );
}
else
{
xmlRoot.replaceChild( xmlViewNode, xmlTempNode );
}
}
}
// Write the contents of our view XML
// back out to part storage
function savePartStorage_WPQ_()
{
var thisPart;
if( null != currentlySelected_WPQ_ )
persistCurrentView_WPQ_();
thisPart = DDSC.dashboard.parts( "_WPQ_" );
thisPart.Properties.Item("urn:schemas-microsoft-com:webpart:#PartStorage").V
alue=xmldom_WPQ_.xml;
thisPart.save();
}
// Set the view on the view control
function setView_WPQ_( strViewFile, strViewName )
{
var xmlView;
var httpRequest;
var xmlViewNode;
var strEncodedName
// Look for the view in our current xml descriptor,
// if it is present, apply it; otherwise, load the
// view from the file name passed in
strEncodedName = encodeViewName_WPQ_( strViewName );
xmlViewNode = xmldom_WPQ_.selectSingleNode( "/Views/" + strEncodedName );
if( null != xmlViewNode)
{
xmlView = xmlViewNode.selectSingleNode( "view" );
}
else
{
xmlView = new ActiveXObject( "Microsoft.XMLDOM" );
httpRequest = new ActiveXObject( "Microsoft.XMLHTTP" );
// Attempt to load the xml file passed
// in.
httpRequest.open( "GET", strViewFile, false );
httpRequest.send("");
// Load the XML file we found
xmlView.load( httpRequest.responseBody );
// UNDONE: Handle parse error appropriately
}
OVC_WPQ_.viewXML = xmlView.xml;
g_currentViewName_WPQ_ = strViewName;
}
// Set the size of the view control dynamically
// based on whether or not we have a specified
// part height
function sizeViewControl_WPQ_()
{
var strHeight;
strHeight = DDSC.dashboard.parts( "_WPQ_" ).properties(
"urn:schemas-microsoft-com:webpart:Height" ).value;
if( 0 == strHeight.length )
{
// Set the default height
OVCTable_WPQ_.style.height = DefaultHeight_WPQ_;
}
}
// ---------------------------------------------------
// Outlook Tasks Specific Code
var currentlySelected_WPQ_;
// Run in reduced functionality mode
function enableReducedFunctionalityMode_WPQ_()
{
ToolbarButtons_WPQ_.style.display="none";
}
// Set the default view for this control
function setInitialView_WPQ_()
{
OVC_WPQ_.folder = "<xsl:value-of
select="/Strings/String[@_locID='L_NotesFolder_Text']"/>";
if( g_blnV10_WPQ_ )
{
setSelection_WPQ_( strListName_WPQ_ );
setView_WPQ_( strListFile_WPQ_, strListName_WPQ_ );
}
}
// Set the current folder
function setSelection_WPQ_( strView )
{
// Remove old border
if( null != currentlySelected_WPQ_ )
{
persistCurrentView_WPQ_();
currentlySelected_WPQ_.className = "UserToolbarImage";
}
// Set new highlight border on
// appropriate view icon
switch( strView )
{
case strListName_WPQ_:
ListIcon_WPQ_.className = "UserToolbarSelectedImage";
currentlySelected_WPQ_ = ListIcon_WPQ_;
break;
case strIconsName_WPQ_:
IconsIcon_WPQ_.className = "UserToolbarSelectedImage";
currentlySelected_WPQ_ = IconsIcon_WPQ_;
break;
}
}
</script>
</xsl:template>
</xsl:stylesheet>
|
|
|
 |
|
raver
|
 |
| Joined: 03 Dec 2002 |
| Total Posts: 2 |
| |
|
Re: Outlook webparts Posted: 03 Dec 2002 04:59 PM |
| Welke regel bedoel je hier ?? |
|
|
 |
|
|
Re: Outlook webparts Posted: 03 Dec 2002 07:37 PM |
het gaat om de regel
//savePartStorage_WPQ_();
deze staat bijvoorbeeld in het onunload event:
function onunload_WPQ_(){
if( g_blnV10_WPQ_ <xsl:eval no-entities="t">"&&"</xsl:eval>
(typeof(OVC_WPQ_) == "object") )
{
//savePartStorage_WPQ_(); => deze regel
}
}
de oplossing is overigens ook niet helemaal duidelijk (ik heb niet veel ervaring met SPPS) dus het kan zijn dat je deze regel via // uitcommentarieer, of juist beschikbaar moet maken.
Ik zou zeggen, probeer het eens uit. |
|
|
 |
|