This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Telerik.Sitefinity.Modules.News; | |
using Telerik.Sitefinity.News.Model; | |
public void ChangeNewsDate() | |
{ | |
// https://www.progress.com/blogs/how_to_publish_content_items_in_the_past | |
// https://www.progress.com/documentation/sitefinity-cms/for-developers-modify-news-items | |
var pubDate = new DateTime(2019, 02, 25); | |
var manager = NewsManager.GetManager(); | |
//var item = manager.GetNewsItem(new Guid("6aa1dc9a-58ad-45e5-b624-fe5e8267728a")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// loads later, so may be slow | |
window.addEventListener('load', functionName, false ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// based on: https://www.techiediaries.com/javascript/pure-javascript-equivalent-or-alternative-to-jquery-ready/ | |
// based on: https://stackoverflow.com/a/9899701/271985 | |
function docReady(fn) { | |
if (document.readyState !== 'loading'){ | |
fn(); | |
} else { | |
document.addEventListener('DOMContentLoaded', fn); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get single element by ID | |
var el=document.getElementById('test'); | |
// Get single element by class name | |
var el=document.getElementsByClassName('test')[0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add click listener | |
el.addEventListener("click", function() { alert('click'); }, false); |
OlderNewer