Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

OWS.js

  Asked By: Jedidiah Mayo         Date: Feb 19, 2005      Category: Sharepoint      Views: 1034
 

I modified the OWS.js file so that users would not be presented with the "Edit
in ...." item when they click on the drop down of of document library item
unless the item had been checked out first. I thought it was working fine since
I implemented this a week or 2 ago. There is small issue.

We have our WSS installation on 2 servers behind a load balancer with the
appropriate rules. We currently have 2 entries pointing to the load balancer,
teamspace and teamspace-us.

When I go to a site with teamspace-us or the machine name in the URL the OWA.js
change works and there is no "Edit in ..." until the item is checked out, but
when I use just teamspace for the host name in the URL the change does not work
and the user always has the "Edit in ..." for Microsoft Office documents.

Any thoughts on why this might be occuring?

I simply took the code that is in the AddCheckinCheckoutMenuItem function to
test to see if the item has been checked out and inserted in the
AddDocLibMenuItems function after the if (ctx.isWebEditorPreview == 0) line

Added lines of code have ** at the beginning:

CAMOpt(m, strDisplayText, strAction, strImagePath);
if (currentItemFSObjType != 1)
{
if (ctx.isWebEditorPreview == 0)
{
** if (currentItemCheckedOutUserId == null)
** currentItemCheckedOutUserId = itemTable.COUId;
** if (currentItemCheckedOutUserId != "")
** {
if (ctx.listTemplate == LISTTEMPLATE_IMAGE_LIBRARY &&
itemTable.IsImage == "1")
{
strDisplayText = L_EditInOIS_Text;
strAction = "EditSingleImage('" + currentItemID + "')";
strImagePath = ctx.imagesPath + "oisweb.gif";
CAMOpt(m, strDisplayText, strAction, strImagePath);
}
else
{
setDocType();
if (currentItemAppName != "" && currentItemOpenControl != "")
{
strDisplayText = StBuildParam(L_EditIn_Text,
currentItemAppName);
strAction = "editDocumentWithProgID2('" +
currentItemFileUrl + "', '" + currentItemProgId + "', '" +
currentItemOpenControl + "')";
strImagePath = ctx.imagesPath + currentItemIcon;
CAMOpt(m, strDisplayText, strAction, strImagePath);
}
}
** }
}


Do you know someone who can help? Share a link to this thread on twitter, or facebook.

Tagged:    

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on OWS.js Or get search suggestion and latest updates.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].