Wednesday 15 January 2014

Word wrapping SharePoint 2010 list column headers using CSS


 Add  a Content Editor Web Part (CEWP)

    1.Go to your list. Select Site Actions < Edit Page
    2.Click “Add a web part”
    3.Select Content editor webpart and click add new content.
    4.select html--< Edit Html source and add following css:

<style type="text/css"<
.ms-vh, .ms-vh2-nograd, .ms-vh2, .ms-vb
{
white-space: normal;
text-align:center;
vertical-align:text-bottom;
}
</style<

Tuesday 14 January 2014

Dynamic Add Image inside Radio Buttons Using JQuery

<!DOCTYPE html<
<html<
<head<
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"<
</script<
<script<
$(document).ready(function(){


$("#button").click(function(){
var curAns="Radio 1";
var curVal=$('.optionAnswer:checked').val();

if(curAns == curVal)
{
$('.optionAnswer:checked').parent().append('<img width=25 height=25 src="" alt="correct"/<');
}
else
{
$('.optionAnswer:checked').parent().append('<img width=25 height=25 src="" alt="worng"/<');
$('.optionAnswer').each(function(index){
if($(this).val()== curAns)
$(this).parent().append('<img width=25 height=25 src="" alt="correct"/<');
});

}
});
});
</script<
</head<
<body<
  <div id="optionAns")<
   <span< <input type="radio" name="optionGroup" value="Radio 1" class="optionAnswer"<Radio 1</input<</span<</br<
   <span< <input type="radio" name="optionGroup" value="Radio 2" class="optionAnswer"<Radio 2</input<</span<</br<
   <span< <input type="radio" name="optionGroup" value="Radio 3" class="optionAnswer"<Radio 3</input<</span<</br<
</div<
<input type="button" id="button" name="button" value="submit" /<
 
</body<

</html<

Thursday 9 January 2014

Get current user name detail in sharepoint 2010 with spservices

Field Name Field Internal Name WSS MOSS
Account Name
Name Title
Work e-mail EMail
About me Notes
Picture Picture
Department Department
Job Title JobTitle
SIP Address SipAddress
First name FirstName  
Last Name LastName  
Work phone WorkPhone  
Office Office  
User name UserName  
Web site WebSite  
Responsibilities SPResponsibility  

Wednesday 1 January 2014

Below list shows ListTemplateId for all SharePoint list and libraries.

ListTemplateId
Description
100
Generic list
101
Document library
102
Survey
103
Links List
104
Announcement list
105
Contact List
106
Event List
107
Task List
108
Discussion Board
109
Picture Library
110
Data Source
111
Site Template Gallery
112
User Information List
113
Web Part Gallery
114
List Template Gallery
115
Xml Form Library
116
Master page Gallery
117
No-Code Workflows
118
Custom Workflow Process
119
Wiki Page Library
120
Custom Grid for list
130
Data Connection Library
140
Workflow History
150
Gantt Tasks list
200
Meeting Series list
201
Meeting Agenda list
202
Meeting Attendees list
204
Meeting Decisions list
207
Meeting Objectives list
210
Meeting text box
211
Meeting Things To Bring list
212
Meeting Workspace Pages list
300
Portal Sites list
301
Blog Posts list
302
Blog Comments list
303
Blog Categories list
1100
Issue tracking
1200
Administrator tasks list
2002
Personal document library
2003
Private document library