Tag Info

Hot answers tagged

3

The 'Edit Source' dialog frequently modifies the source that you enter before saving it to the page. You'll often find that custom classes, styles, spacing, markup, etc. are changed/modified/added/removed by SharePoint as it attempts to avoid possible conflicts. Simple solution to your scenario (a single page where you want some minimal customization) is to ...


3

1)Register ngSanitize module: Add reference to angular-sanitize.js resource, for example: <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular-sanitize.js"></script> Include ngSanitize module, for example: var app = angular.module('SmartphoneOSList', ['ngSanitize']); 2) Replace the line: ...


3

in your page make sure there is no reference to core.css.... issue is due to masterpage which has that reference that the page your using could be referencing the masterpage. several methods: 1) if its referencing a masterpage than make a custom masterpage that is almost the same only that it doesnt contain the core.css reference. 2) within your css add ...


3

You can easily add a content editor webpart and add in your CSS in the HTML editor. Or you can add your CSS to a text file, then using a content editor webpart, you can reference that text file and it will include the css in that page.


3

If you want it to be easily maintain you should add a Content editor webpart to the page, and add the text in the webpart. (More here http://office.microsoft.com/en-us/sharepoint-foundation-help/using-the-content-editor-web-part-HA101794745.aspx)


2

When entering HTML content into a SharePoint page or web part, it will always modify the markup using SharePoint's black box. There is, however, a workaround that might work for you: 1) Use a Content Editor web part (you can insert one into regular page content or a web part zone) 2) Put all of your markup in an HTML or TXT file stored in a document ...


2

try using the below script in CEWP: <a onclick="modalcall()" href="#">Add New Item</a><script type="text/javascript"> function modalcall() { SP.UI.ModalDialog.showModalDialog({ url: "NewForm.aspx", title: "New Item", //allowMaximize: true, //showClose: true, dialogReturnValueCallback: ...


2

You can't change the .master file when it's bound like this, you can only edit the .html file. It will re-generate the .master when you save the .html. This is due to the Design Manager packet in SP2013. Here's the MSDN article on this feature set: http://msdn.microsoft.com/en-us/library/office/jj822363(v=office.15).aspx


2

you can use the below css code for background image: background-image: url("Image.jpg"); background-repeat:no-repeat; background-position:top; background-size:cover;


2

I like John-o's answer, but if the HTML is simple enough that it won't be modified by SP, then go ahead and add it to the page. But my preference would be to add it via a content editor part, simply do to the fact that it makes it easier for other developers to figure out how the page was changed later on. (Meaning, if I am responsible for editing a page ...


2

You can do it as <img src='<SharePoint:EncodedLiteral runat="server" text="<%$SPUrl:~site/Shared%20Documents/enddate.png%>" EncodeMethod="HtmlEncode"/>' alt="" />


2

I'm using this: <script type="text/javascript"> var loginName = ""; var userid = _spPageContextInfo.userId; GetCurrentUser(); function GetCurrentUser() { var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/getuserbyid(" + userid + ")"; var requestHeaders = { "accept" : "application/json;odata=verbose" }; $.ajax({ url : requestUri, ...


1

You can use SPServices jQuery Library and CAML query to get data from a SharePoint List and display that retrieved data in Content Editor Web Part where you would write your html table code. To learn more about SPServices refer this: SPServices CodePlex Before writing the below code in Content Editor Web Part make sure you download jquery-1.4.2.min.js from ...


1

If you can grab the offending NOBR element via JavaScript, you can then hide it and insert a less offensive element adjacent to it with the same (or modified) HTML content. // 1. grab the NOBR tag via CSS selector var nobr = document.querySelector(".ms-standardheader.ms-WPTitle nobr"); // NOTE: Replace above CSS Selector with one that grabs the title of ...


1

you could use PACE indicator to have the progress of the web page rendering which is nothing but a js which is used to present the rendering of pages but the disadvantage is that it will not work with older android OS. There are various types like loading,center fold etc.


1

It cannot be done in workflow alone AFAIK since WF 2013 doesn't allow you to have custom code in it. Actually, this is not entirely true because you can create custom activities, but this is not preferred way. You should create web service which implements the conversion (http://stackoverflow.com/questions/286813/how-do-you-convert-html-to-plain-text) and ...


1

Your problem is your string literal for set_viewXml. You need to escape newline to continue a string literal through several lines. You also need to swap your ' for "". Example: camlQuery.set_viewXml("<Query> \ <Where> \ <And> \ <Eq> \ <FieldRef Name='Title' /> \ <Value ...


1

This is the jQuery expando attribute, it's a bit random because it's generated on page load, it's "jQuery" + (new Date()).getTime() (to avoid possible naming conflicts) but you'll notice the attribute is the same for all elements. This is they key in $.cache for the element's events and data...it's stored this way for a few reasons, the main is to avoid ...


1

HTML text is coming because the fields are HTML enabled. You can use below code to strip html tags answer.InnerText = Regex.Replace(answers[index]["Answer"].ToString(), @"<[^>]+>|&nbsp;", "").Trim(); Do the same for questions


1

Add the following CSS and reference it from your masterpage: <style> #aspnetForm[action*="Home.aspx"] #pageContentTitle {display:none;} </style> where Home.aspx is the page you want to hide the title from.


1

you can edit the page directly using sharepoint designer, then add your snippet of code directly, it will break the page definition... but that normally isn't a big deal.


1

Create a new Page Edit Page and add Content Editor Web Part Inside the webpart you can add HTML. So based on your requirement you can design the HTML content (by placing images etc.) Inside HTML objects (Clickable objects) you can use JavaScript to redirect user to the list where he can see the files for that server. (You can create views for each server ...


1

It turned out to be a Content Type caching issue... Apparently SharePoint remembered the version of it when it was not fully developed. Creating a new Site Collection resolved the issue.


1

I think the issue is the value your retriving is not getting it at the correct moment first time round. Thats why on the second postback it would get the correct item value and its loaded within the context properly. have you tried calling the method out of the page load event? so at bottom code just do showStatusAlert(); instead. or use this method ...


1

To change the locale for a specific site, go to the Site Settings area and select Regional Settings from the Site Administration group of links. For more options you can check: http://blog.funknstyle.com/2012/08/working-with-date-formats-in-sharepoint-2010/


1

What do you mean by InfoPath is going away? Microsoft will support InfoPath till 2023. Yes you always has the flexibility to create Visual WebParts and deploy them with SharePoint. Using the JSOM is also not bad. If the shifting means some additional learning to you as well, then go with client side development. Because SharePoint will try its best to be a ...


1

It seems you are getting the proper wiki page content but you are missing styles defined in SharePoint CSS files as you mentioned earlier. In SharePoint 2013 the specified styles are declared in file: /_layouts/15/1033/styles/corev15.css


1

Try including the inline CSS to the body of the email. Use the max-width property for images inside the body's div. For ex. if you blog post body's div has a class 'ms-BlogPost' add css as: <style type='text/css'> div.ms-BlogPost img {max-width: 600px; } </style>


1

I have noticed really similar problems with images and I ended up solving it by changing the name of the new image. Somehow if I made modifications to the image or changed it and replaced the old one with it while keeping the same name, the old image was still shown around insted of the new one. Don't know why it's happening, but I suspect it might be ...


1

To launch an .exe directly (presuming security cleared) - Link to the .exe directly: <a href="file://Foobar/Foobar.exe">Launch Foobar</a> This will launch the Foobar app in the Foobar directory. If using link to the doc only with the file extension .foo that is associated with the Foobar App then use - <a href="file://Foofile.foo">Open ...



Only top voted, non community-wiki answers of a minimum length are eligible