Showing posts with label Content Editor webpart. Show all posts
Showing posts with label Content Editor webpart. Show all posts

Tuesday, March 13, 2012

Move the View Dropdown for Wide Lists

One of the annoying "features" of SharePoint 2007 is how the View dropdown gets pushed off of the page when working with list views with many columns.


Left part of the page:




Two scrolls to the right and we can now find the view menu:




View menu just to the right of the other toolbar buttons. (After Adding the Javascript)




Complete Steps:


  1. Display the list's view page

  2. Click Site Actions, Edit Page

  3. Add a Content Editor Web Part and move it to the bottom of the page (below the list's web part)

  4. Edit the Content Editor Web Part, click the Content Editor button and paste in the following JavaScript

  5. Save everything and test!


Javascript code:

<script>


var x = document.getElementsByTagName("table");


for (var i=0;i<x.length;i++)


{


// find the table with this class


if (x[i].className=="ms-menutoolbar")


{


// change the widths of all of the cells to 0


for (var j=0; j<x[i].rows[0].cells.length;j++)


{


x[i].rows[0].cells[j].style.width="0"


}


// change the width of the last column


x[i].rows[0].cells[j-1].style.width="100%"


}


}


</script>

Tuesday, September 20, 2011

How to hide the Left navigation bar or Quick launch Sharepoint 2010

To hide the left navigation bar\ Quick launch , you can add the follow the below mentioned steps.

Site Actions

Edit Page 

Add a webpart

Add Content Editor Webpart

Modify shared webpart - Edit the Source Code and paste the below code in Source code .
<Style>
body #s4-leftpanel
{
display: none;
}
.s4-ca
{
margin-left: 0px;
}
</style>

Select Ok. Then from the Appearance Section Hide the webpart - Click Apply Ok. Exit Edit mode.

Hope this helps

Sunday, September 18, 2011

How to add a Video on Sharepoint Site

 A Very Simple way to Embed a video on your sharepoint site.  


  1. Upload a media file to a standard SharePoint Document Library

  2. Navigate to the site where you want to embed the video

  3. Edit the page and select Add a Web Part

  4. Under Miscellaneous, insert a Content Editor Web Part

  5. From the Web select Open the Tool Pane

  6. From Tool Pane, select Source Editor

  7. Copy in the following code (replace http://link to video here with the actual link to the video in the library):


<div align="center">

   <embed src="http://link to video here"

      autoplay="true"

      loop="false"

      width="200"

      height="200"

   </embed>

</div>

Click Apply and Voila :)

Tuesday, August 16, 2011

Redirect Sharepoint site

Script For Redirecting The Sharepoint Site Using Content Editor Webpart.

 

<HTML>
<HEAD>
<SCRIPT language="JavaScript">
<!--
function redirectsp()
{
top.location="http://YOURSITE HERE";
}
if (top.frames.length==0)
{
setTimeout('redirectsp()',5000);
}
//-->
</SCRIPT>
</HEAD>
<body>
<TABLE width=70% align=center cellpadding=10><TBODY bgcolor=#EOEBED><TR><TD><STRONG><FONT size=4 color=#59452A><BR>You will be redirected here: <FONT face=Verdana><A href="http://servername/sites/Test/default.aspx">http://servername/sites/Test/default.aspx</A> Please bookmark it for future reference. You will be redirected in 5 seconds or you may click on the link to go there immediately.<BR><BR></FONT></FONT></STRONG></TD></TR></TBODY></TABLE>
</body>
</html>

Tuesday, August 2, 2011

Users with polish keyboards cannot input some data in the Rich text Editor of the Content editor webpart or the Wiki pages

Polish has letters in addition to the 26 letters that are used in English. However, you cannot type some of these additional letters in the Rich Text Editor. For example, this issue occurs when you try to type some Polish letters in a blog or in a custom list that uses the Rich Text Editor.
We need to run the STSADM utility to enable this fix. Use the following command:
stsadm.exe -o setproperty -url http://portal -pn "richtexteditorshortcutenabled" -pv "no"
This has to run on the portal which contains the site collection.

Users with polish keyboards cannot input some data in the Rich text Editor of the Content editor webpart or the Wiki pages

Polish has letters in addition to the 26 letters that are used in English. However, you cannot type some of these additional letters in the Rich Text Editor. For example, this issue occurs when you try to type some Polish letters in a blog or in a custom list that uses the Rich Text Editor.
We need to run the STSADM utility to enable this fix. Use the following command:
stsadm.exe -o setproperty -url http://portal -pn "richtexteditorshortcutenabled" -pv "no"
This has to run on the portal which contains the site collection.

Friday, May 27, 2011

Content Editor Webpart Error On Page

Issue: Unable to move Content Editor webpart from one place to another. We get the following error message "Error On page" on the Bottom left of the IE.
Or
After moving the content Editor webpart , when we click Exit edit mode . It gives "Unexpected error has occured".

 

Cause: This usually happens whenever we copy the HTML code from one Content Editor webpart to another. When we copy the HTML code it also copies the Webpart ID and it conflicts.

Resolution: Open the Site in Firefox\Chrome browser as IE will not give you the Drop down to edit the webpart
Modify the Content Editor Webpart
Open the Source Code
Remove the following Tag from the code for eg:- "id=WebPartWPXX WebPartID="XXXX-XXXX-XXXX-XXXX-XXXXXXXX"
Click Apply - OK
You can then move the webparts without any issues



Content Editor Webpart Movement

IssueUnable to move Content Editor webpart from one place to another. We get the following error message "Error On page" on the Bottom left of the IE.
Or
After moving the content Editor webpart , when we click Exit edit mode . It gives "Unexpected error has occured".

CauseThis usually happens whenever we copy the HTML code from one Content Editor webpart to another. When we copy the HTML code it also copies the Webpart ID and it conflicts.

ResolutionOpen the Site in Firefox\Chrome browser as IE will not give you the Drop down to edit the webpart
Modify the Content Editor Webpart
Open the Source Code
Remove the following Tag from the code for eg:- "id=WebPartWPXX WebPartID="XXXX-XXXX-XXXX-XXXX-XXXXXXXX"
Click Apply - OK
You can then move the webparts without any issues