Showing posts with label Sharepoint. Show all posts
Showing posts with label Sharepoint. Show all posts
How do you install web parts in SharePoint ?

There is a process in installing and configuring web parts, you have to login to site with site admin permissions, now go to parent/root site settings then go to web designer gallery => web parts then go to file tab and select upload document and then add web part file with .dwp and then click ok, later on you can use to attach it to respective web pages by using insert tab.
How are web parts developed in SharePoint?
Before that, web parts are controlled by server side by adding it to web part page, in order to create web part, you have to select in which SharePoint project you want to create it and then go to the solution explorer and then select project and add new item have to be web part, give the name of the web part and then save it, it is as simple as it is.
What is a web part zone in SharePoint ?
It is a place/ container where a group of web part are organized with same zone properties which helps to present web parts on web part page, there are two set of properties available to organize web parts on web part pages, they are shown below
a: one subset of properties is used to manage layout/ format of the web parts for presenting purpose.
b: other subset of properties is used to organize the web parts by providing access permissions to zone.
In Sharepoint What is the difference between a document library and a form library?
The main purpose of using these libraries are to store information and retrieving them, but the main difference will be in format for data that you are going to store.
Document Library: These libraries are mainly used to store documents in the form of word, text, PowerPoint, excel sheets, CSV and so on and providing access to different people to use them and modify.
Form Library: It is mainly used to store InfoPath forms where usually they are in XML format and the group are the user who has access will have a chance to work on it from Form Library.
Note: Respective library will have their own inbuilt tools for developing respective things by using tools.
Pure css tooltip for sharepoint
<head>
<Style type="text/css">
a {
position: relative;
cursor: pointer;
font: normal normal 85% sans-serif;
color: white;
text-shadow: #090A0B 0 -1px;
display: inline-block;
}
a > i {
text-align: center;
font: italic normal 90% Georgia, serif;
line-height: 150%;
color: black;
text-shadow: white 0 1px;
background: #DDD;
background-clip: padding-box;
box-shadow: 0 0px 2px rgba(0, 0, 0, 0.5);
border: 5px solid #111;
border: 5px solid rgba(0, 0, 0, 0.5);
border-radius: 3px;
position: absolute;
width: 250px;
left: 50%;
margin-left: -125px;
padding: 10px 0;
bottom: 100%;
margin-bottom: 15px;
visibility:hidden;
opacity:0;
-webkit-transition: opacity 0.5s linear;
-moz-transition: opacity 0.5s linear;
-ms-transition: opacity 0.5s linear;
-o-transition: opacity 0.5s linear;
transition: opacity 0.5s linear;
}
a > i:before, a > i:after {
content: "";
position: absolute;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
top: 100%;
left: 50%;
margin-left: -10px;
}
a > i:before {
border-top: 10px solid #111;
border-top: 10px solid rgba(0, 0, 0, 0.5);
margin-top: 5px;
}
a > i:after{
border-top: 10px solid #DDD;
margin-top: -2px;
z-index: 1;
}
a:hover > i {
visibility: visible;
opacity: 1;
}
</style>
</head>
<body>
<body>
<a>Tool Tip Example<i>This tootips's Example.<br />helps in Keeping handy!</i></a>
</body>
</body
</html>
How to get current site url in sharepoint using javascript
You just add the below code in script editor or the js file in an app
//--------------------------------------------
<script type="text/javascript">
function Test() {
currentcontext = new SP.ClientContext.get_current();
var Sitecol_url = window.location.protocol + '//' + window.location.host;
var PageURL = Sitecol_url + currentcontext.get_url();
}
</script>
//------------------------------
How to add jquery pluging to sharepoint , jquery scripting
Some times the normal jquery reference may not work with the sharepoint scripting webpart
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
Google CDN:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
Microsoft CDN:
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.12.2.min.js"></script>
Try The Below Code To Enable The JQuery Scripting
<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
_______________________________________
Using jsom checking the permission level of user in sharepoint
Let’s see how we can retrieve the web object and check the permission levels of the current logged in user.
function functionName1(){
SP.SOD.executeFunc('SP.Runtime.js', 'SP.ClientContext',
function() {
SP.SOD.executeFunc('SP.js', 'SP.ClientContext',
function() {
var siteUrl = _spPageContextInfo.webAbsoluteUrl;
var clientContext = new SP.ClientContext(siteUrl);
var web = clientContext.get_web();
clientContext.load(web, 'Title', 'EffectiveBasePermissions');
clientContext.executeQueryAsync(onSuccess, onError);
});
});
}
function onSuccess(){
alert('Title: ' + web.get_title());
var permissions = SP.PermissionKind.manageWeb && SP.PermissionKind.viewListItems;
if(web.get_effectiveBasePermissions().has(permissions)){
alert('user has the required permissions');
}
}
function onError(sender, args) {
alert(args.get_message() + '\n' + args.get_stackTrace());
}