Skip to main content

Posts

Photo Zoom option script

// Magnific Popup v0.9.9 by Dmitry Semenov // http://bit.ly/magnific-popup#build=inline+image+ajax+iframe+gallery+retina+imagezoom+fastclick (function(a){var b="Close",c="BeforeClose",d="AfterClose",e="BeforeAppend",f="MarkupParse",g="Open",h="Change",i="mfp",j="."+i,k="mfp-ready",l="mfp-removing",m="mfp-prevent-close",n,o=function(){},p=!!window.jQuery,q,r=a(window),s,t,u,v,w,x=function(a,b){n.ev.on(i+a+j,b)},y=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},z=function(b,c){n.ev.triggerHandler(i+b,c),n.st.callbacks&&(b=b.charAt(0).toLowerCase()+b.slice(1),n.st.callbacks[b]&&n.st.callbacks[b].apply(n,a.isArray(c)?c:[c]))},A=function(b){if(b!==w||!n.currTemplate.closeBtn)n.currTemplate.closeBtn=a(n.st.close...

ShowHidePagecontrol based on user permissions in SharePoint using javascript

$(document).ready(function (){         getCurrentUserRole();  });  function getCurrentUserRole() {     var userPerm;     $().SPServices({         operation: "GetRolesAndPermissionsForCurrentUser",         async: false,         completefunc: function (xData, Status) {             //if( Status == "success") {             userPerm = $(xData.responseXML).SPFilterNode("Permissions").attr("Value");             //alert(userPerm);                         var nonAdminP = (33554432 & userPerm) == 33554432;         ...

Upload only PDF and XSL files for SharePoint Lists

function OkAttach() {     a: ;     var g = FileuploadString + String(FileUploadIndex), b = GetAttachElement(g), f = TrimWhiteSpaces(b.value);     if (!Boolean(f)) {         alert(Strings.STS.L_FileNameRequired_TXT);         b.focus()     }      else if(CustomizedCheck(b.value)==false) {            if(_spPageContextInfo.serverRequestPath.indexOf("Listname1") > -1)            {             alert("Invalid File Type. (Only PDF/PPTX files are allowed.)");            }            else if(_spPageContextInfo.serverRequestPath.indexOf("ListName2") > -1)        ...

Getting SharePoint List attachments in the SPGrid or Asp grid

In ascx or aspx file add the below code : <script type="text/javascript">        var listName = "List Name";        function deleteListItem(ID) {         var siteUrl = 'Site URL';         this.itemId = ID;         var clientContext = new SP.ClientContext(siteUrl);         var oList = clientContext.get_web().get_lists().getByTitle('List Name);         this.oListItem = oList.getItemById(itemId);         oListItem.deleteObject();         clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));     }     function onQuerySucceeded(data) {         al...

Jquery dilog box depending on today list item

 <div id="pop"></div>  <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css"> <script type="text/javascript"> var annclientContext = null; var annweb = null; var annmyItems; var currentQueryString ='<View><Query><Where><Eq><FieldRef Name="Created" /><Value Type="DateTime"><Today /></Value></Eq></Where></Query><RowLimit>1</RowLimit></View>'; var varT = ''; ExecuteOrDelayUntilScriptLoaded(loadAncmntListData, "sp.js"); function loadAncmntListData() { annclientContext = new SP.ClientContext.get_curr...

SharePoint 2013 Interview Question and Answers

1.        What are the New Changes in Search? In SharePoint 2013 the best of two Search Engines "SharePoint Search" and “FAST Search Server for SharePoint” was combinedto make one Search Engine that would provide greater redundancy and for better scalability.  2.        What is Continuous Crawl ? A new Crawl Option "Continuous crawls" has been Introduced in search's Crawl Schedule Category to help keep the search index and search results as fresh as possible.Continuous crawls run every 15 minutes by default.  3.        What are Display Templates? To eliminate the fact that the designers and power users needed to modify the XSLT each time they needed a particular look and feel in SharePoint, a new concept of Design Templates has been introduced. Each Display Template consist of two files an HTML file (.html) and JavaScript File (.js).  4.      ...