Friday, January 23, 2015

SharePoint 2013/2010 - To show waiting screen/image while loading in background.

Pre-Setup: Please download and link the source file to jquery-1.10.2.js. Link to approprite bg imane abd loader image. Set the mail JavaScript in the master page for reuse of the code.

<script src="jquery-1.10.2.js"></script>
<style>
#loading { display:none; position:fixed; left:0; top:100; width:98%; height:100%;            background-image:url("/bg.png"); }
</style>

<script type="text/javascript" language="javascript">
function block_screen() {
   $("#loading").show();
document.getElementById('contentRow').style.display = 'block';
}
function unblock_screen() {
 $("#loading").hide();
document.getElementById('contentRow').style.display = 'block';
}
</script>
<div id="loading" > 
 <div id="loadingImage" style="position:fixed; left:450px; top:400px;"> 
<img  src="loader.gif" /> </div>
</div>


/*To Block Screen and Show waiting gif*/

<script type="text/javascript" language="javascript">
block_screen();
</script>


/*To Unblock Screen*/
<script type="text/javascript" language="javascript">
unblock_screen()
</script>

Happy Browsing!
Relax..

Wednesday, January 14, 2015

SharePoint 2013/2010 - To set any column as link to item.


In order to set the any column present in the list to link the item, by using the SharePoint designer, we can set this.
1. Open the list in the SharePoint Designer, and create a new view.
2. Open the newly created view and find <ViewFields> tag in it.
3. Add the bewlow tag to any column that you want to make as it as link to item.
4. LinkToItem="TRUE"  or linkToItem="TRUE" (use one which works in your allowed clienttemplates.js) and save it.

Other Field Types:
LinkToItem="TRUE"  => To display link to item.
LinkToItemAllowed="TRUE"   => display more option (...) to column .
Filterable="FALSE"   => To disable Column Filtering.
Sortable="FALSE" => To disable Column Sorting.




Happy Browsing!
Relax..

Wednesday, December 24, 2014


SharePoint 2013/2010 -Go Up folder in Document Library

Issue:
Some time when we customize the tile/navigation/breadcrumb, the link to document folder go up folder by will go missing. Here is a simple hack for it.

Resolution:
Just paste this code in content editor or script editor, and add an image suitable with updating the link.
PS: correct the links of folder to you library and site location. (highlighted part)

<script type="text/javascript">
function getParameterByName(name) {    name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
    var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),        results = regex.exec(location.search);           return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));}

function GoUPFolder(){
if(getParameterByName('RootFolder')!="" && getParameterByName('RootFolder')!= "/teams/site/doclib"){
var url = getParameterByName('RootFolder').split("/");
var upfolder="";
for( var i=1; i< url.length-1; i++)
{upfolder=upfolder+"/" + url[i];}
window.location.href = "/teams/site/doclib/?RootFolder=" + upfolder;}
else{window.location.href = "/teams/site/doclib";}
}
</script>

<div id="divUpLink">
<img onclick="GoUPFolder();" style="cursor: pointer;" src='/teams/site/images/UpButton.gif'/>
</div>



Happy Browsing!
Relax..