Wednesday, December 4, 2013

SharePoint 2013 Feature Availability

There are some limitations to the SharePoint Online service, such as site collection quotas, file upload limits, and storage limits. For details, see SharePoint Online software boundaries and limits. In addition, there are certain types of files that you cannot upload or download in a SharePoint list or library see blocked file types.

Referance URL http://technet.microsoft.com/en-us/library/sharepoint-online-service-description.aspx

Wednesday, November 20, 2013

Knockout JS with SharePoint 2010

1.      Create SharePoint webpart solution.
2.      Add Module to your project.
3.      Add Application page to module along with your Jquery-**.JS and Knockout-2.1.0.js file.
4.      Then add below code to your application page.aspx file.

<asp:Content ID="Content" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <script src="jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="jquery.tmpl.min.js" type="text/javascript"></script>
    <script src="knockout-2.1.0.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        $(function () {
            InitForm();
        });
        var viewModel;

        function InitForm()
        {
            $.getJSON('/_vti_bin/ListData.svc/MYTESTLIST',
                    function (data) {
                        viewModel = {
                            reports: ko.observableArray(data.d.results),
                            sortByName: function () {
                                this.items.sort(function (a, b) { return a.Title < b.Title ? -1 : 1; });
                            }
                        };
                        ko.applyBindings(viewModel);
                    });
        }
 </script>
    <script id='reportsRowTemplate' type='text/html'>
        <tr>
            <td><span data-bind='text:Id, uniqueName:true' /></td>
            <td><span data-bind='text:Title, uniqueName:true' /></td>
        </tr>
    </script>
     <p>You have <span data-bind='text: reports().length'> </span> report(s)</p>
     <table data-bind='visible: reports().length > 0'>
         <thead>
             <tr>
                 <th align=left>Report ID</th>
                 <th align=left>Report Name</th>
             </tr>
         </thead>
         <tbody data-bind='template: { name: "reportsRowTemplate", foreach: reports }' />
     </table>
     <button data-bind='click: sortByName, enable: reports().length > 0' type='submit'>Sort</button>
 </asp:Content>

Above example uses SharePoint web service and connect to  MYTESTLIST, it will fetch Title from the list and display it on the page.

Thursday, May 16, 2013

SharePoint – Print is too small. How to increase print font?


SharePoint – Print is too small. How to increase print font?
Add the Content Editor WebPart to a SharePoint Site [how to add…]
Now click the “Click here to add content” and then click the HTML button in the Ribbon to bring up the Edit source code window;
This Code will add the button and allow you to adjust the Font Size.
 
<styletype="text/css">

@media Print

{

/*This is to change style of body fonts.*/

BODY {

LINE-HEIGHT: 160%; BACKGROUND: white; FONT-SIZE: 16pt

}

INPUT {

DISPLAY: none

}

/*Now in my case my page was mostly having SPAN and Paragraph tags.

So added below styles to page.*/

/*IMPORTANT is required to override inline styles.*/

DIV SPAN {

LINE-HEIGHT: 24px; FONT-SIZE: 18pt!important

}

DIV P {

LINE-HEIGHT: 24px; FONT-SIZE: 18pt!important

}

/*Below style is to hide title If you want to enable it then remove it.*/

.s4-title {
DISPLAY: none

}

}</style>

<inputid="myPrintButton"onclick="window.print();return false;"type="button"value="Print this page">
 
 
This resolved my problem. I was able to get fonts based on user’s need.
 
Use the ‘Comments’ form to share your thoughts.

How to add Content Editor WebPart to SharePoint Page.


To add a Content Editor Web Part (or CEWP) to your page, follow the steps listed below:

·         Open your SharePoint site.

·         Navigate to the page you wish to add CEWP.

·         Click on 'Site Actions' then select 'Edit Page'. Alternatively, there is now a small 'Edit' icon right on the page. It is located icon in the upper left hand corner of your screen Clicking this icon will take you into edit mode.

·         Now 'Editing Tools' tab will be visible with two options for editing the page, 'Format Text' and 'Insert'. Click on the tab labeled 'Insert'.

·         Select 'Web Part'.

·         On the Web Parts page, there are columns of information to use when browsing the type of web part you'd like to add to the page.

·         From Categories choose “Media and Content” > “Content Editor” and add it to the main section of the page;

·         Click the “Click here to add content” and then click the HTML button in the Ribbon to bring up the Edit source code window;

·         Once you have finished adding the web part to the page, click on the small 'Save & Close' icon in the upper left hand corner of your screen (it is by default the third option in, following 'Site Actions' and 'Navigate Up'). Clicking this icon will save your work and take you out of edit mode.

Content Editor WebPart is now added to the page.
Please leave your comments/feedback.

Tuesday, May 7, 2013

SharePoint 2013 Global Navigation Menu Alignment and Display

Default behavior of Top Navigation menu in sharepoint 2013 was overlaped, and also the menu-arrow were not vertical aligned.

So quick fix for this problem is to add Content Editor WebPart to page and add (Override) CSS classes used by TOp Navigation Menu.

Add below CSS to Content Editor WebPart and it will resolve problem.
<style>
.ms-core-listMenu-horizontalBox .menu-item.ms-core-listMenu-horizontalBox  
.menu-item .additional-background.ms-core-listMenu-horizontalBox  
.menu-item .additional-background .menu-item-text { display:block; }
ul.dynamic { min-width:175px; }
span.menu-item-text:hover { 
background-color:rgba(205,230,247,0.5);
padding:2px;
}
span.menu-item-textpadding:2px;
}
</style> 

Tuesday, April 30, 2013

Display Lists and Libraries in sharepoint search refinements.



You can achieve this by editing the XSLT in Search Core Results web part.
Follow below steps,

  • Open search site and search for some word.
  • Once you see results on your search page.
  • Edit the page.
  • Now edit Refinement Panel -> Edit Web Part.
  • Expand Refinement section.
  • Copy XML from Filter Category Definition to XML editor.
  • Add new category under <FilterCategories> section.
  • Copy and Paste below section.

 
<Category    Title="Site"    Description="Which site this document is from" 
    Type="Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator"     
MetadataThreshold="5"    NumberOfFiltersToDisplay="4"    MaxNumberOfFilters="20"
     SortBy="Frequency"    SortByForMoreFilters="Name"    SortDirection="Descending" 
    SortDirectionForMoreFilters="Ascending"    ShowMoreLink="True"    MappedProperty="SiteName"
     MoreLinkText="show more"    LessLinkText="show fewer" />

  • Copy new XML and update Web Part’s Filter Category Definition.
  • Close the XSL Editor and save the webparts properties.
  • Refresh the page to test it.

SharePoint search result display as Model Dialog or in Pop Up window




You can achieve this by editing the XSLT in Search Core Results web part.
Follow below steps,

1.      Open search site and search for some word.

2.      Once you see results on your search page.

3.      Edit the page

4.      Edit the Search Core Results webpart

5.      Expand the Display Properties section

6.      Uncheck "Use Local Visualization"

7.      Click on XSL Editor.
From here, we need to modify the XSL, so that all search results will be opened in a modal dialog.
For this, now we will edit Result template ().
  • This template starts off with a statement.
  • Just after the block, REMOVE  the link tag  

  <a id="{concat($currentId,'_Title')}">
    <xsl:attribute name="href">
      <xsl:value-of  select="$url"/>
    </xsl:attribute>
    <xsl:attribute name="title">
      <xsl:value-of select="title"/>
    </xsl:attribute>
    <xsl:choose>
      <xsl:when test="hithighlightedproperties/HHTitle[. != '']">
        <xsl:call-template name="HitHighlighting">
          <xsl:with-param name="hh" select="hithighlightedproperties/HHTitle" />
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="title"/>
      </xsl:otherwise>
    </xsl:choose>
  </a>

  • And REPLACE it with the following markup

  <a id="{concat($currentId,'_Title')}" href="javascript:SP.UI.ModalDialog.ShowPopupDialog('{$url}')">
    <xsl:attribute name="title">
      <xsl:value-of select="title"/>
    </xsl:attribute>
    <xsl:choose>
      <xsl:when test="hithighlightedproperties/HHTitle[. != '']">
        <xsl:call-template name="HitHighlighting">
          <xsl:with-param name="hh" select="hithighlightedproperties/HHTitle" />
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="title"/>
      </xsl:otherwise>
    </xsl:choose>
  </a>

  • Close the XSL Editor and save the webparts properties
  • Refresh the page to test it.