Sharepoint 2007: Pop up message on new announcements - sharepoint

Is it possible to display on a page a javascript popup message if there are new unseen items in an announcements list?

If you want the pop-up to jump out even when the user does not refresh a page, you will need to develop a polling mechanism (using JS) and call a web service to find out if there are new items.
Otherwise, you just need to add a web part to the page that will do the check on page load.
We did something similar, showing the users how many documents there are in a document library that each user has not read. we used the SPAudit object to find our what items have been seen by which user. Of course it has to be optimized for performance, so we just check a few of the latest items, not all of them. We even added this to the quick links menu, so that next to each document library appears a number of document the current user has not read yet, it is really cool, very similar to what you need.

You could store the last time the user viewed the announcements in a cookie and read that out to compare against the newest item. You can also store that the user has closed the pop-up.

Have a look at the following resources. You can make it work with minimum alteration
Using Jquery In Sharepoint To Display Notifications For Open Tasks
SharePoint Tasks Popup using JavaScript API
jQuery Ticker for SharePoint Announcement List

Related

SharePoint online - intercept document request when document clicked

I am working on this project where it includes hosted app with SharePoint online and a dozen of other things.
When they built the project, they implemented a functionality that does this :
When a user goes to a document library, and clicks on the name of a document of specific type, the user gets redirected to the hosted app where there is a logic to do something on the document.
What I am not able to figure out is :
How are they implementing the part of "when user clicks on document, user will be redirected to app" ?
I checked httpmodules and couldn't find anything, I also checked remote event receivers and couldn't find anything..maybe I am not searching properly in the large C# solutions they have, or maybe there is another way to implement this..I need help to figure that out.
You would typically add JavaScript to the library page that finds the <a> tags for the documents with your file extensions, and then replaces the "onclick" with your custom code.
You could also intercept the JavaScript function used by SharePoint and add your additional logic. (do a web search for "SharePoint coreinvoke")
Disclaimer: most of what you will find is for the "Classic experience". The SharePoint Online "modern experience" changes all of the rules!

Want to put a button on a sharepoint page to sign document. I don't want users to go to the library

Just downloaded the docusign app for Sharepoint online. It's on an HR publishing site and the page is for all new hire documentation. I want to put a button on the page to associate with the specific document that needs to be signed. I don't want users to have to go into the library and use the docusign tab. Is there a way to do this?
I can't quite see how this will work.
The ribbon command will have some code behind it. Presumably it uses the Docusign API so if you can find the code, you will be able to see what to do. Or review the API docs.
On your page, you would need to trigger the same code on each icon but I assume that the icon already triggers an action (e.g. downloading the file or something), so you would likely need a second icon or link to trigger the docusign action instead.
Not trivial. And I couldn't find another similar issue on Google.

SharePoint 2010 List disabling edit even for people with Manage permissions

this seems to be a bit of an odd requirement, but we have a separate form (not an infopath form) being filled out by people. Now, this form that we have has quite a lot of validations in it. We're currently trying to prevent people from accessing the list where this certain form is saving the data, this is so that they won't bypass the validations we created in the form that we created. Is there a way to be able to do this, one way or another?
Easy fix. Use SharePoint Designer to browse to the list, starting from "All Files". The list has several files in it. You're only interested in NewForm.aspx and EditForm.aspx.
Open these files. Either add JavaScript redirect code directly to the file (near placeholdermain) to point back to AllItems.aspx, or add a Content Query Web Part to add the redirect JavaScript code in that added web part.
Either way, when users go to add/edit items in that list, they will be bounced back to the page that list the items.
This will only work when JavaScript is enabled. Mind you, SP won't work very well with JavaScript off anyway, so people may not disable JS. But for a bullet proof solution, make a Visual Studio feature for the specific list.

SharePoint 2010, Upload Document Redirect to Page

I have a document library in SharePoint 2010 that several different teams are using for the same purpose. Each team has their own page that has a filtered view of the document library on it. The document library also has custom columns.
The issue I am running into is when a team member uploads a document from their page. They click "Add document" from their page, and then they browse to the document they want to upload. This part works perfectly - and the URL specifies the source as the team's page. However, after a user selects the document and clicks "OK", it takes them to the EditForm.aspx page that allows the user to fill in the meta data for the document. This is fine, but now the source URL specifies a view from inside of the document library, and no longer points to the team's page (where they came from).
Does anyone know how I can change this source URL to point to the team's page instead of the document library? Or, does anyone know a workaround for this issue so that a user can upload a document from a page (with document library web part on it) so that it returns to the page?
Thanks!!
SharePoint 2010 should work the way you want out-of-the-box. I tried to reproduce your situation, but was unable to. What I did was set up a library with one custom column and two custom views. I then created two pages, one with a list form web part using one view and one with a list form web part with the other view.
When I click on the Add Document from either page, a modal dialog window opens to the Upload page. I first select the file (Upload.aspx) and then am redirected to the metadata properties (EditForm.aspx). After filling out the metadata, the dialog window closes, and the page behind it (the page we were originally on) refreshes to show the new document in the web part. So the user experience is that they stay on the page they want while adding the document as desired.
If you edit your question or provide comments with more details on your situation we can try to reproduce it, but the functionality you describe is exactly how it is supposed to work out-of-the-box.
Peter's correct - SharePoint's being SharePoint.
If I am reading this right, it may be that you should simply check out in-line editing. Using a view, you and edit the properties dynamically without leaving the page (each team getting their own view).
Alternately, I see many who simply want to redirect users back to the page they came from either edit or view of an item regardless of where that was (a link, etc.). Simplest way to do that is a little programming by adding a button to the forms replacing the OK/Cancel with your own code. Simply edit the forms using InfoPath to add the new buttons - you have the user context if you need to custom redirect to a team home page or some such.

How to programmatically disable ECB menu item for a particular list item?

I have a custom document library which is based on default document library. I'd like to disable Edit physical document for some of the documents depending on their property.
If you don't mind a client side solution then you can use either a single Content Editor Web Part to inject some JavaScript on a single page or execute the script on every page in the site collection using our free SharePoint Infuser.
Plenty of examples, although not your particular problem, can be found here.

Resources