Saturday 29 March 2014

CSR /JSLink

;(function(){
 var priorityFiledContext = {};  
    priorityFiledContext.Templates = {}; 
priorityFiledContext.Templates.Header = "<div id='CompanyAnnounce'>";
priorityFiledContext.Templates .Footer="</div>";
   priorityFiledContext.Templates.Item = priorityFiledTemplate; 
    SPClientTemplates.TemplateManager.RegisterTemplateOverrides(priorityFiledContext); 
})();
function priorityFiledTemplate(ctx) { 
 var oItem = ctx.CurrentItem;
 var render = "<table id='tblAnnouncement'><tr><td><h4><b>"+oItem["Title"]+"</b></h4></td></tr>";
 render += "<tr><td  style='align:left;color:red;'><span style='color:black;'>By </span>"+oItem["Author"][0].title+"</td></tr>"; 
 render += "<tr><td style='color:red;float:right;'> "+oItem["Created"]+"</td></tr>"; 
 render += "<tr><td ><p> "+oItem["Body"]+"</p></td></tr>";
render += "</table>";  
 return render;
}

Tuesday 25 March 2014


SharePoint - JavaScript current page context info

http://johnliu.net/blog/2012/2/3/sharepoint-javascript-current-page-context-info.html
html page insert iframe without border use seamless

<iframe src=" test.html" seamless ></iframe>

Thursday 20 March 2014

Sharepoint open Page   with out or With ribon control using query string.

in the query string use below attribute to show or hide ribbon control.
InitialTabId=Ribbon.WebPartPage
InitialTabId=Ribbon.Read

http://msdn.microsoft.com/en-us/library/microsoft.web.commandui.ribbon_members.aspx

Sunday 16 March 2014

One of the simplest way is to create your Watermark function for HTML Inputbox
<input
type="text"
value="Search Wiki"
name="visitors_name"
onblur="if(value=='') value = 'Search Wiki'"
onfocus="if(value=='Search Wiki') value = ''"
/>

Thursday 13 March 2014

 Add custom master page

http://pratapreddypilaka.blogspot.in/2013/03/deploying-custom-master-page-using.html

http://frederik.se/how-to-deploy-a-custom-master-page-in-sharepoint-2013-using-visual-studio/