lunes, 29 de junio de 2009

Sharepoint Error Reading File Repair Tool

He creado una pequeña aplicación que repara de forma automática las paginas que producen el error “Error Reading File” desde sharepoint designer 2007.


Lo he colgado en Codeplex : http://sharepointfilerepair.codeplex.com/ podéis bajarlo de ahí.

En post anteriores trataba este tema, pero como resulta un engorro reparar los archivos, he implementado esta herramienta.Realmente hace lo que explico en el procedimiento http://sharepointworks.blogspot.com/2009/03/reparar-archivos-que-producen-el.html
Usando expresiones regulares, y de una manera sencilla y efectiva.
Cuelgo el código fuente para los curiosos.

Personalmente, ayuda bastante sobre todo porque como crecen tanto los archivos, el pc se queda sin memoria y es muy lento solucionar el problema.
Como uso el objeto filesystem, podemos acceder por webdav al CodigoFuente del fichero poniendo:
\\spserver.domain.corp\sites\ExampleSite\FiletoRepair.aspx
o directamente contra el disco local usando :
c:\CorruptedFiles\fileToRepair.aspx




Finalmente he de decir que deja los archivos totalmente indentados y totalmente reparados.

Espero que resulte de ayuda.
Saludos.
RobertoMarcos.com

jueves, 25 de junio de 2009

Crear campos checkbox conectados a DataFields

Objetivo:
Crear un campo checkbox (en cualquier ubicación) del dataview que este conectado a los datos del datafield

Receta:
Pegar este código dentro del dataview en la celda donde se quiera colocar el checkBox
<xsl:variable name="campo_Checked">
<xsl:choose
>
<xsl:when test="'@campoBooleano'='1' or msxsl:string-compare(string('@campoBooleano'),'Yes','','i')=0 or msxsl:string-compare(string('@campoBooleano'),'True','','i')=0">true</xsl:when
>
<xsl:otherwise>false</xsl:otherwise
>
</xsl:choose
>
</xsl:variable
>

<xsl:variable name="idCheck" select="generate-id()"
/>

<
xsl:variable name="XPath">
<xsl:call-template name="dvt.xpath"
/>
</xsl:variable
>

<
asp:CheckBox runat="server" id="campo_{$idCheck}" checked="{$campo_Checked}" __designer:bind="{ddwrt:DataBind('u',concat('campo_',$idCheck),'Checked','CheckedChanged','',string($XPath),'@campoBooleano')}" />

Nota:
Es posible que requiera la plantilla dvt.xpath la cual hay que declarar en un espacio fuera de otros xsl:template

<xsl:template name="dvt.xpath">
<xsl:for-each select="ancestor-or-self::*"><xsl:value-of select="concat('/node()[',count(preceding-sibling::node())+1,']')" /></xsl:for-each
>
</xsl:template>
Saludos
RobertoMarcos.com

miércoles, 17 de junio de 2009

Guía de Estilos para Modificar apariencia: Referencia CSS de MOSS 2007 y WSS3

Fuente: http://www.heathersolomon.com/content/sp07cssreference.htm

He creado una versión reducida del post Original, que permite localizar el fichero a modificar de un vistazo.

Clase CSS

Función

Fichero CSS - Línea Aproximada

ScreenShot

Global Links (Sign In/Welcome, My Links, etc)

.ms-globalbreadcrumb

Global link bar container

Core.CSS - 526, 532

.ms-HoverCellInActive,.ms-SpLinkButtonInActive

Global links

Core.CSS - 2575

.ms-HoverCellActive,.ms-SpLinkButtonActive

Global links hover state

Core.CSS - 2582

.ms-globalleft

Float table left

Core.CSS - 540

.ms-globallinks

Global link text

Core.CSS - 546, 551

.ms-globalright

Float table right

Core.CSS - 543

Search

.ms-sbcell

Wrapper around search input, button and Advanced Search link

Core.CSS - 4137

td.ms-sbgo

Search magnify icon

Core.CSS - 4177

.ms-sbLastcell

Empty cell to the right of the search area

Core.CSS - 4184

.ms-sblink

Link formatting

Core.CSS - 4162, 4166, 4173

.ms-sbplain

Formatting for Search terms text box

Core.CSS - 4153

td.ms-sbscopes

Wrapping table cell around Search Scopes

Core.CSS - 4190

select.ms-sbscopes

Formatting for Search Scopes select box

Core.CSS - 4193

.ms-sbtable

Wrapping table around Search

Core.CSS - 4116

.ms-sbtable-ex

Wrapping table around Search

Core.CSS - 4128

Top Horizontal Navigation - Default styles, but you can easily replace the CssClass references to your own in the code for the navigation, or omit the wrapping HTML

.ms-bannerContainer

Wrapping container around top navigation - Only shows through when a tab is not in the horizontal space in the top navigation.

Core.CSS - 518

.ms-topnavContainer

Wrapping container around top navigation, inside of ms-bannerContainer - Wraps only the tabs.

Core.CSS - 639

.ms-topnav

Navigation formatting

Core.CSS - 643, 654

.ms-topnavselected

Formatting for selected navigation

Core.CSS - 660, 670

.ms-topNavHover

Hover state

Core.CSS - 673, 681

.ms-topNavFlyOuts

Drop down menus

Core.CSS - 692, 697

.ms-topNavFlyOutsHover

Hover state for drop down menus

Core.CSS - 704

Site Actions Menu

.ms-siteaction,.ms-siteaction a

Site Actions text

Core.CSS - 590

.ms-siteactionsmenu

Wrapping table cell

Core.CSS - 603

.ms-siteactionsmenu div div div

Site Actions button

Core.CSS - 610, 619

.ms-siteactionsmenu div div div.ms-siteactionsmenuhover

Hover state

Core.CSS - 623

Quick Launch Bar (Default Left Vertical Navigation Bar) - Default styles, but you can easily replace the CssClass references to your own in the code for the navigation, or omit the wrapping HTML

.ms-titleareaframe

Area above navigation

.ms-pagemargin

Area to the right of the navigation

Core.CSS - 1212

.ms-quicklaunchheader

Quick Launch Headers (such as View All Site Content button)

Core.CSS - 917, 927, 931

.ms-navheader

Navigation headers

Core.CSS - 744, 756, 851, 854, 859

.ms-selectednavheader

Selected view state for navigation headers

Core.CSS - 766, 800, 811, 816

.ms-navitem

Sub navigation items under navigation headers

Core.CSS - 820, 863, 867

.ms-selectednav

Selected view state for navigation items under navigation headers

Core.CSS - 779, 788, 796, 941

.ms-navSubMenu1

Sub navigation items under navigation headers

Core.CSS - 827

.ms-navSubMenu2

Sub navigation items under navigation headers

Core.CSS - 763, 832

.ms-treeviewouter

Containing DIV for Tree View in Quick Launch

Core.CSS - 741, 750, 753, 887, 890

div.ms-treeviewouter div

Top border of Tree View Pane

Core.CSS - 750

.ms-tvselected

Selected navigation item in Tree View

Core.CSS - 881, 884

.ms-recyclebin

Recycle Bin

Core.CSS - 893, 900, 905

.ms-quicklaunchouter

Bottom border of Quick Launch pane and margin around pane

Core.CSS - 874, 878

.ms-quickLaunch

Quick Launch pane formatting and top and side borders around pane

Core.CSS - 909

.ms-quickLaunch table td

Container for sub items

Core.CSS - 738

Quick Launch Picker (Date Picker)

.ms-picker-header

Picker header

DatePicker.CSS - 8

.ms-picker-dayheader

Days of the week

DatePicker.CSS - 17

.ms-picker-daycenter

Date boxes

DatePicker.CSS - 96, 105, 111, 119

.ms-picker-daycenterOn

Hover state for Date boxes

DatePicker.CSS - 96, 123

.ms-picker-dayselected

Current date

DatePicker.CSS - 126

.ms-picker-footer

Picker footer

DatePicker.CSS - 180, 187, 190

.ms-quickLaunch

Wrapper around entire picker

Title Area

.ms-titlearealeft

Wrapping table cell around page image

Core.CSS - 1116

.ms-titleareaframe

Wrapping table cell around page image and neighboring table cell to the right

Core.CSS - 1120

.ms-pagetitleareaframe table

Wrapping table cell around page title

Core.CSS - 1130

.ms-pagetitle

Page title text

Core.CSS - 1256, 1263, 1269

Content Area

General

.ms-bodyareaframe

Content container

Core.CSS - 1238, 1247

.ms-listdescription

List/library description

Core.CSS 1631

.ms-formbody

Background for cells with form fields

Core.CSS - 304, 333, 349

.ms-formlabel

Form label formatting

Core.CSS - 284

.ms-formline

Bottom line under last form fields

Core.CSS - 352

.ms-authoringcontrols

Background for cells with form fields on administrative pages

Core.CSS - 1413

.ms-propertysheet

Controls fonts in several locations

Core.CSS - 1511, 1517, 1523, 1527

.ms-menuimagecell

Arrow that appears when column headers are moused over

Core.CSS - 1345, 1352, 1355

Breadcrumbs

.ms-pagebreadcrumb

Breadcrumb navigation in main content area

Core.CSS - 556, 561

.removeMargins

Adjusts margins around breadcrumb

PageLayouts.CSS - 105

.breadcrumb

Page level breadcrumbs used on publishing pages

Band.CSS - 47, 60, 67

.breadcrumbCurrent

Current location in page level breadcrumbs used on publishing pages

Band.CSS - 71

Page Edit Toolbar (Edit Console)

.ms-consolemptablerow

Wrapper around Edit Toolbar - master table cell

Core.CSS - 3203

.ms-consoletitleareaframe

Edit Toolbar container - sub table cell

Core.CSS - 1120, 1139, 1142

.ms-consoletitleareaframebottom

Bottom area under toolbar

Core.CSS - 1146

.ms-consoleframe

Edit Toolbar container - sub sub table

Core.CSS - 3210, 3223

.ms-consolestatusframe

Edit Toolbar container - sub sub sub table

Core.CSS - 3210, 3227

.ms-consolestatuscheckoutframe

Edit Toolbar container - sub sub sub table cell

Core.CSS - 3233, 3244

.ms-consolestatusminorframe

Edit Toolbar container - sub sub sub table cell

Core.CSS - 3233, 3240

.ms-consolehr

Separator rules between rows in toolbar

Core.CSS - 3293

Mini Console

.ms-wikieditouter

Div wrapper around console buttons

See shared styles under Wiki

.ms-wikieditthird

Background of buttons

.ms-wikitoolbar a.ms-toolbar

Buttons

.ms-wikitoolbar a:hover.ms-toolbar

Hover state of buttons

.ms-toolbar

See Toolbar

.ms-separator

See Toolbar

Web Parts

.ms-WPSelected

Edit view

Core.CSS - 2503

.ms-WPHeader

Header area

Core.CSS - 2664

.ms-WPTitle

Title text

Core.CSS - 2480, 2491, 2497

.ms-HoverCellInActive

Inactive state for web part menu arrow

.ms-HoverCellActiveDark

Mouseover for web part menu arrow

Core.CSS - 2590

.ms-WPBody

Body content of web parts

Core.CSS - 2507, 2512, 2516, 2521

.ms-WPBorder

Body content of web parts

Core.CSS - 2565, 2571

.link-item

Links within web parts

Controls.CSS - 63, 69, 73, 2521

.bullet

Bullets used in web part content

Controls.CSS - 117

.description

Descriptions within web parts

Controls.CSS - 91

.ms-vb

Column headers in lists, among other things

Core.CSS - 1750, 1754, 1758, 1762, 1766, 1838, 1843

.ms-rteCustom-ArticleTitle

Article Title in rich text fields

HtmlEditorCustomStyles.CSS - 68

.ms-rteCustom-ArticleHeadLine

Article Headline in rich text fields

HtmlEditorCustomStyles.CSS - 83

.ms-rteCustom-ArticleByline

Article Byline in rich text fields

HtmlEditorCustomStyles.CSS - 76

.ms-addnew

Link to add new list items

Core.CSS - 1882, 1889, 1893

.ms-partline

Separating line under web part and above Action links

Core.CSS - 1507

Menu Toolbar

.ms-menutoolbar

Toolbar menu

Core.CSS - 70, 77

.ms-separator img

Separating line between toolbar options

Core.CSS - 1404

.ms-menubuttoninactivehover

Toolbar button

Core.CSS - 100

.ms-menubuttonactivehover

Hover state for toolbar buttons

Core.CSS - 106

.ms-splitbuttonhover

Hover state for "New" toolbar button

Core.CSS - 202

.ms-splitbutton

New toolbar button

Core.CSS - 199

.ms-splitbuttontext

Wrapping table cell for toolbar menu item

Core.CSS - 196, 207

.ms-splitbuttondropdown

Separating line between 'New' text and drop down arrow

Core.CSS - 192, 207, 211

.ms-listheaderlabel

View text

Core.CSS - 132, 135

.ms-viewselector

View drop down menu

Core.CSS - 135, 139, 150, 158, 165

.ms-viewselectorhover

Hover state for View drop down menu

Core.CSS - 135, 139, 150, 161, 165

Toolbar

.ms-toolbar

Wrapping table cell for toolbar

Core.CSS - 20, 37, 42

.ms-separator

Button separator

Core.CSS 1399

Calendar

.ms-calheader

Calendar header

Calendar.CSS - 3

.ms-cal-navheader

Month directional arrows

Calendar.CSS - 844

.ms-cal-weekday

Weekday

Calendar.CSS - 50

.ms-cal-weekempty

Space to the left of the week day and weeks

Calendar.CSS - 41

.ms-cal-topday

Day header

Calendar.CSS - 75

.ms-cal-topdayover,

Hover state for Day header

Calendar.CSS - 148

.ms-cal-nodataMid

Empty days

Calendar.CSS - 215, 220

.ms-cal-nodataBtm2

Bottom area of empty days

Calendar.CSS - 220, 227

.ms-cal-week

Week header

Calendar.CSS - 56

.ms-cal-weekselected

Hover state for Week header

Calendar.CSS - 62, 67

.ms-cal-workitem

Work days

Calendar.CSS - 235, 240

.ms-cal-workitem2B

Bottom area of each work day

Calendar.CSS - 252

.ms-cal-noworkitem

Non work days

Calendar.CSS - 235, 285

.ms-cal-noworkitem2B

Bottom area of each non work day

Calendar.CSS - 292

.ms-cal-topday-today

Today marker

Calendar.CSS - 119, 125, 131, 200

.ms-cal-topday-todayover

Hover state for Today marker

Calendar.CSS - 136

.ms-cal-defaultbgcolor

All Day Event marker in Month View

Calendar.CSS - 352

.ms-cal-defaultbgcolorsel

Hover state for All Day Event marker in Month View

Calendar.CSS - 362, 390, 393

.ms-cal-time

Area to left of All Day Event marker in Day View

Calendar.CSS - 410

.ms-cal-alldayevent

Area to right of All Day Event marker in Day View

Calendar.CSS - 420, 715, 719

.ms-cal-wemptycell,.ms-cal-wemptycellL

Empty cells for other days not marked as an All Day Event when an All Day Event appears in the Week View

Calendar.CSS - 703

.ms-cal-tweekitem

Appointment block in Week View

Calendar.CSS - 756, 764, 770

.ms-cal-tdayitem

Appointment block in Day View

Calendar.CSS - 779, 787, 793, 798

Search Center (Advanced Search)

.ms-ptabarea

Containing table for tabs

Portal.CSS - 17

.ms-ptabcn

Selected tab

Portal.CSS - 20

.ms-ptabcnhover

Selected tab hover

Portal.CSS - 33

.ms-ptabcn A:link,

Selected tab text

Portal.CSS - 46

.ms-ptabcn A:visited,

text-decoration: none;

.ms-ptabcnhover A:link,

.ms-ptabcnhover A:visited,

color: #000000;

.ms-ptabcnhover A:hover

Selected tab text hover

Portal.CSS - 52

.ms-sctabcf

Unselected tab

Portal.CSS - 118

.ms-ptabcfhover

Unselected tab hover

Portal.CSS - 71

.ms-ptabcf A:link,

Unselected tab text

Portal.CSS - 86

.ms-ptabcf A:visited,

.ms-ptabcfhover A:link,

.ms-ptabcfhover A:visited,

font-style: normal;

.ms-ptabcfhover A:hover

Unselected tab text hover

Portal.CSS - 91

.ms-sctabrx

Line extending past tabs

Portal.CSS - 134

Site Directory (Site Map)

See Search Center

Site Map tabs

See Search Center

.ms-ptabcf

Unselected tab

Portal.CSS - 58

.ms-ptabrx

Line extending past tabs

Portal.CSS - 110

Blog

.ms-PostWrapper

Wrap around each post, includes date, title and footer

Core.CSS - 3510

.ms-PostDate

Post date

Core.CSS - 3569

.ms-PostTitle

Post title

Core.CSS - 3531, 3536, 3541

.ms-PostBody

Post body copy

Core.CSS - 3555, 3563, 3566

.ms-PostFooter

Post footer links and info

Core.CSS - 3546, 3551

.ms-CommentsWrapper

Wrap around comments

.ms-CommentHeader

Comment header text

Core.CSS - 3577

.ms-commentsempty

Formatting for default text when no comments have been posted.

Core.CSS - 3604

.ms-commenttable

Table that wraps each comment.

Core.CSS - 3639, 3643

.ms-CommentTitle

Comment title

Core.CSS - 3589

.ms-CommentBody

Comment body copy

Core.CSS - 3597

.ms-CommentFooter

Comment footer

.ms-blogedit

Edit button for posts and comments.

Core.CSS - 3610, 3616

.ms-blogAdminLinks

Admin links that show to right of blog posts

Core.CSS - 3493, 3499, 3507

.ms-BlogNavigator

Class used in a wrapper DIV tag that is around the Quick Launch (current) navigation. Used as a contextual selector in the CSS for many styles. Some styles seem to change nothing on the page when altered. Effective styles are listed below.

.ms-BlogNavigator div.ms-navheader

Navigation headers

Core.CSS - 3687, 3694, 3697

.ms-BlogNavigator div.ms-WPBody

Border above navigation headers

Core.CSS - 3704

.ms-BlogNavigator div.ms-PartSpacingVertical

Space under items in a navigation block.

Core.CSS - 3707

.ms-BlogNavigator td.ms-addnew

Amount of left indention of "Add New..." links

Core.CSS - 3712

.ms-BlogNavigator td.ms-addnew img

Amount of left indention after bullet in "Add New..." links

Core.CSS - 3715

.ms-CategoryTitleCell

Container and contents formatting for sub navigation items

Core.CSS - 3666, 3670

.ms-blogrssnav

RSS Feed link

Core.CSS - 3515, 3522

.ms-blogrssnav img

RSS Feed image

Core.CSS - 3528

Wiki

.ms-quicklaunchouter

The Recent Changes Wiki nav uses the default styles for the Quick Launch, and not any custom styles you may have created for the Quick Launch in your master page. The navigation styles are included above.

ms-quickLaunch

ms-quicklaunchheader

ms-navsubmenu1

ms-navsubmenu2

ms-navitem

.ms-recentchanges

Bullet image to left of View All Pages in nav

Core.CSS - 3459

.ms-addnew

View All Pages text link

See ms-addnew.

.ms-wikieditouter

Div wrapper around console buttons

Band.CSS - 387

.ms-wikieditthird

Background of buttons

Core.CSS - 3423

.ms-wikitoolbar a.ms-toolbar

Buttons

Core.CSS - 3404

.ms-wikitoolbar a:hover.ms-toolbar

Hover state of buttons

Core.CSS - 3437

.ms-wikicontent

Text formatting in a wiki page

Core.CSS - 3442, 3445, 3447, 3449, 3454

Espero os sea de utilidad.

RobertoMarcos.com