|
|
|
|
Macaw SPS joust menu 1.6 Author: Serge van den Oever, Specialist Developer, Macaw (serge@macaw.nl) Release date: 26 februari, 2003 Home on the net: http://spsutil.sourceforge.net 1 AbstractThe Macaw SPS Joust Menu is a tree view web part that allows you to configure a view on information in the Web Storage System (WSS). WSS is the “database” used by SharePoint Portal Server 2001 to store all documents, category trees, dashboard trees and other information. Macaw SPS Joust Menu provides your user a similar interface as the Explorer add in provides when installing the SharePoint Portal Server client tools to browse through your documents, but much more configurable. Select which folders to display, specify filters on the documents to be displayed, which property to display as title, and what action to execute on selection of an item in the tree. 2 A quick introMacaw SPS Joust Menu is all about trees, content and beefing up your user experience in the SharePoint Portal Server dashboards… The following pictures will show more than the thousands of words that follow to give you a quick impression! Render a tree view for the Documents folder in SharePoint, note that the items are the same as the icons rendered in the Explorer view using the SharePoint client tools. Also complete category tree views, using the names of the categories
You can also show a tree view of your dashboards! Be able to navigate your complete site, without this “strange” two-line menu navigation mechanism, without reloads to get to deeper levels, and with a complete view of all levels above you!!
View entries by their title, or any property that you want!
Respond in other web parts on actions taken in the tree view using a powerful client-side event mechanism.
I hope that this quick intro showed you some of the possibilities, and there are many, many more!! But that is described in the thousands of words below… with only a few pictures.
Have fun! 3 IntroductionMacaw SPS joust menu is a tree menu to render folders and documents of the SharePoint Portal Server 2001 WSS. Initially only the top level entries are rendered. Items within folders are retrieved dynamically using a roundtrip to the server when requested.
Features:
Please let me know if this functionality is useful, when the documentation is not clear, when you find bugs, if you would like to see changed/new features, or need any help. 4 Using the Macaw SPS joust menuThere are two ways that the code for the Macaw SPS joust menu can be used:
Both approaches have their advantages and disadvantages. 4.1 Virtual directory containing codeAdvantages:
Disadvantages:
4.2 Code packaged with web partAdvantages:
Disadvantages:
4.3 Approaches takenMutiple versions of the web part are available:
Macaw SPS Joust Menu.dwp (embedded code) Macaw SPS Joust Menu - virtual directory.dwp (code through virtual directory) + many more showing some configuration features (all on the virtual directory version, if you want to use the embedded code version (no virtual directory install needed), copy the configuration!
My preference is to use the Macaw SPS joust menu web parts that use the virtual directory (Macaw SPS Joust Menu – virtual directory.dwp and others). 5 Configuring the virtual directoryConfigure the virtual directory where the Macaw SPS Joust Menu is hosted with the same security settings as used for the virtual directory of jour portal. To review the security settings of your portal do the following:
The virtual directory for MacawSPSJoustMenu virtual directory should be configured as follows:
The MacawSPSJoustMenu virtual directory contains the code for the tree control. The tree control web parts will access the code through the url http://<servername> /MacawSPSjoustMenu. 6 Using the Macaw SPS joust menu web partsThe installation of the Macaw SPS joust menu web parts is simple, use “Import a Web Part File…” option in the Content screen and browse to the “Macaw SPS Joust Menu.dwp” file or “Macaw SPS Joust Menu – virtual directory.dwp” file (or one of the other examples!). When the “Macaw SPS Joust Menu.dwp” file is imported, all related content in the “Macaw SPS Joust Menu_Files” is also installed. For the “Macaw SPS Joust Menu – virtual directory.dwp” web part (and other “virtual directory” examples) the MacawSPSjoustMenu virtual directory must be configured first (see above).
The web part can be configured through the “urn:schemas-microsoft-com:webpart:PartStorage” attribute (Part Storage field in Advanced Settings in the settings screen of the web part). In the previous versions od Macaw SPS Joust Menu this field contained the configuration in XML. This approach was not easy and clear enough. The current version contains a configuration file in the following format:
workspace=_WORKSPACE_ url=_WORKSPACE_ openurl=_WORKSPACE_ rememberstate=showactive charset=utf-8 folderdisplayproperty= filedisplayproperty=urn:schemas-microsoft-com:office:office#Title roottext=Documents rooturl= _WORKSPACE_/Documents rooticon=_WORKSPACE_/Portal/resources/DocTypeIcons/urn-content-classes-folder16.gif showhidden=false linkonfolder=true foldersonly=false modalfolders=false DDSCevents=false checkimage=false texttarget=_blank foldertarget=_top querySelect= querywherefirst= querywhereother= queryorder= debug=false
Where three replacement variables are available: _SERVER_ Replaced by the name of the server, for example http://sergelaptop _WORKSPACE_ Replaced by the name of the workspace, for example http://sergelaptop/serge _CURRENTURL_ Replaced by the current URL within the portal, can be used in the ‘openurl’ parameter to have the menu opened at the correct entry when used on the “Document Library” dashboard or the “Categories” dashboard, or when used to display the dashboards tree. 6.1 Macaw SPS joust menu configurationRequires parameters:
Some URL parameters must be specified in canonicalized Utf8 format. This means that special characters and accentuated characters are encoded using %xx coding style. You can use the provided web part “Macaw SPS Canonicalized Utf8 Converter.dwp” to get the current url and a specified url in canonicalized Utf8 format.
Some interesting features available through the above configuration:
Configure the character set we are working in (the default utf-8 will do for most situations)
Remember the content of the menu, so it opens at the same node when returning to the dashboard containing this tree. Note that this is an extra performance penalty, we have to read level by level the nodes, multiple roundtrips to the server (done at server side).
Specify separate display properties for the tree entry names for folders and files.
Optional specification of a “root” entry (text and icon) [Thanks to Steven Collier for the request]. You can also set an URL on this root entry that will be “executed” when the root entry is clicked.
Do/don’t show hidden files (sometimes you need to show the hidden files, for example to show the dashboard tree, those items are hidden)
Modal folders is handy if remember state is also on. Because rememberstate can only reconstruct the last opened folders, not all folders opened and closed in the meantime. Performance penalty would be too high. Using modal folders reflects this situation better (although I don’t really like this kind of operation in a tree).
DDSC events are generated on folder/file selection
NOTA BENE: THIS DUAL DISPLAY IS NOT SUPPORTED ANYMORE (ALTHOUGH IT COULD BE ENABLED IN index.asp BY SETTING THE “text” IFRAME TO A GIVEN SIZE.
Target window specification for documents and folders
Advanced extra selection and ordering filters.
Currently only one URL folder can be
specified. The contents of this folder will be displayed as top-level entries.
Examples:
Two column, menuwidth=210, textwidth=* (means fill remainings), texttarget=text.
Two single column views, on categories and portal content. menuwidth=100%, textwidth=*, texttarget=_blank. [NOT POSSIBLE ANYMORE, WILL BE UPDATED] 7 Example configurationsThis section describes some common used configurations to provide useful functionality within your portal.
Note that the configurations.txt file in the web parts directory of the Macaw SPS Joust Menu distribution contains a bunch of sample configurations. 7.1 Document Library treeInteresting configuration for usage on the “Document Library” dashboard. Folders only, only folders as shown in SharePoint, change querywherefirst for other languages. If people have a more language independent approach, please let me know.
workspace=_WORKSPACE_ url=_WORKSPACE_ openurl=_CURRENTURL_ rememberstate=none charset=utf-8 folderdisplayproperty= filedisplayproperty=urn:schemas-microsoft-com:office:office#Title roottext=Documents rooturl= _WORKSPACE_/Documents rooticon=_WORKSPACE_/Portal/resources/DocTypeIcons/urn-content-classes-folder16.gif showhidden=false linkonfolder=true foldersonly=true modalfolders=false DDSCevents=false checkimage=false texttarget=_blank foldertarget=_top querySelect= querywherefirst=(("DAV:isfolder"=true AND "DAV:displayname"='Dashboards') OR ("DAV:isfolder"=true AND "DAV:displayname"='Documents') OR ("DAV:isfolder"=true AND "DAV:displayname"='Portal Content') OR "DAV:isfolder"=false) querywhereother= queryorder=
debug=false Version which shows only the folders, and not that help file in the root directory. Exactly same view as SharePoint “Document Library” view.
url=_WORKSPACE_ openurl=_CURRENTURL_ rememberstate=none charset=utf-8 folderdisplayproperty= filedisplayproperty=urn:schemas-microsoft-com:office:office#Title roottext=Documents rooturl= _WORKSPACE_/Documents rooticon=_WORKSPACE_/Portal/resources/DocTypeIcons/urn-content-classes-folder16.gif showhidden=false linkonfolder=true foldersonly=true modalfolders=false DDSCevents=false checkimage=false texttarget=_blank foldertarget=_top querySelect= querywherefirst=(("DAV:isfolder"=true AND "DAV:displayname"='Dashboards') OR ("DAV:isfolder"=true AND "DAV:displayname"='Documents') OR ("DAV:isfolder"=true AND "DAV:displayname"='Portal Content') OR "DAV:isfolder"=false) querywhereother= queryorder= debug=false
The tree will display the directory open in the Document Library, on click on a directory in the tree control, the Document Library will display the corresponding files.
A first step to the replacement of the current Document Library functionality into a more intuitive one!
Only problem is that in the top level view the Document Library only displays the entries:
While the above configuration gives the following entries:
If requests for it will come, I will implement the multiple url feature described in the wishlist. [NOTE: IS SOLVED BY ABOVE CONFIGURATION!] 7.2 Dashboards tree
7.3 Show a tree of dashboards, opened to the dashboards level the web part is on.
workspace=_WORKSPACE_ 7.4 Categories treeInteresting configuration for usage on the “Categories” dashboard:
workspace=_WORKSPACE_ url=_WORKSPACE_/Categories openurl=_CURRENTURL_ rememberstate=none charset=utf-8 folderdisplayproperty= filedisplayproperty=urn:schemas-microsoft-com:office:office#Title roottext=Categories rooturl= _WORKSPACE_/Categories rooticon=_WORKSPACE_/Portal/resources/DocTypeIcons/urn-content-classes-rootcategoryfolder16.gif showhidden=false linkonfolder=true foldersonly=true modalfolders=false DDSCevents=false checkimage=false texttarget=_blank foldertarget=_top querySelect= querywherefirst= querywhereother= queryorder= debug=false
The tree will display the folder open in the Categories, on click on a folder in the tree control, the Categories will display the corresponding information.
8 Using as stand-alone pageIf the virtual directory is created as described above, you can access the the Macaw SPS joust menu at the following URL:
http://<servername>/MacawSPSjoustMenu/index.asp?...
Examples:
…/index.asp?workspace=http://sergelaptop/serge&url=http://sergelaptop/serge/Documents
…/index.asp?workspace=http://sergelaptop/serge&url=http://sergelaptop/serge/Documents&showhidden=false&texttarget=_blank&foldertarget=_blank 9 Styling the menuThe visual appearance of the menu items are managed in the JoustStyles CSS as defined at the top of menu.htm:
<STYLE ID="JoustStyles" TYPE="text/css"> <!-- .menuItem {position:absolute; visibility:hidden; left:0px;} .menuItem BR { clear: both; } .node { color: black; font-family : "Helvetica", "Arial", "MS Sans Serif", sans-serif; font-size : 9pt;} .node A:link { color: black; text-decoration: none; } .node A:visited { color: black; text-decoration: none; } .node A:active { color: black; text-decoration: underline; } .node A:hover { color: red; text-decoration: underline; } .leaf { color: black; font-family : "Helvetica", "Arial", "MS Sans Serif", sans-serif; font-size : 9pt;} .leaf A:link { color: black; text-decoration: none;} .leaf A:visited { color: black; text-decoration: none; } .leaf A:active { color: black; text-decoration: underline; } .leaf A:hover { color: red; text-decoration: underline; } --> </STYLE>
Currently we configured a red color and underline for hovered over folders and documents and underline for the currently active folder or document. Play with it and amaze yourself. 10 What is newVersion 1.6:
Version 1.5 [bug release]:
The file menu.asp contains two scenarios for solving the problem:
a. A redraw of the menu b. A complete refresh of the iframe
First the first scenario should be tried, if this does not work try the second scenario (currently commented out).
To find the two scenario’s: search the file menu.asp for the following code:
function RedrawMenuAfterIFrameResize() { // option 1: refresh the DHTML if (theMenu) { theMenu.refreshDHTML(); } // option 2: reload, a complete rebuild of the menu is done //document.location.href = document.location.href; }
Version 1.4:
11 Known “features”
à Should be solved now (version 1.2), menu contains entry “*** ERR: Table does not exist. ***” in case of incorrect url specified.
12 Wishlist
13 Thanks to….
14 HistoryVersion 1.0: initial version Version 1.1: Major rewrite, many new options Version 1.2: Bug fixes and minor changes - linkonmenu only worked when DDSCevents was set to true. FIXED. - French users still had problems with the character encoding. Encoding is now configurable (charset option). Hope this solves the problem. Please let me know your experiences with other character encodings… - Improved error handling (should solve hangings on incorrect parameters like unknown url). Version 1.3: Bug fixes and additional features - Again some character encoding issues solved - openurl parameter added - debug parameter added Version 1.4: Major rewrite, many new features, some bugs solved. Version 1.5: Bug fix release Version 1.6: Bug fix release + interactive configuration support. 15 LicenseDue to the fact that most part of the code is based on the Joust Outliner, this code is distributed under the same licensing conditions as the Joust Outliner as described below. Some additional statements are added to this license for the SPS specific code. 15.1PreambleWe request that publicly available Web Sites using Joust provide a suitable acknowledgement and a link to our site. Promoting Joust in this fashion will help to grow our user community, thus providing us with stimulus for the continued development and support of Joust. This is a request, not a requirement. The Software Licence, below, explains the requirements for using Joust. 15.2Software LicenceJoust Outliner Version 2.5.3 Macaw SPS joust menu Version 1.6 Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. The copyright notice must not be modified or removed from any of the source code. If the source is reorganised into different files (*.js files, for example) then the copyright notice must be included in each file that contains some or all of the original source. Redistributions of source code must retain all copyright notices in the source and must be accompanied by this license. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. Neither the name of MITEM (Europe) Ltd nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY ORIGINAL CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. The Joust design and JavaScript code remain the intellectual property of MITEM (Europe) Ltd. © Copyright 1996-2001. All rights reserved. The Macaw SPS joust menu design and JavaScript/VBScript code remain the intellectual property of Serge van den Oever, Macaw. © Copyright 2002-2003. All rights reserved. |
|
|