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
function addJQuery(callback) { | |
var script = document.createElement("script"); | |
script.setAttribute("src", "http://code.jquery.com/jquery-1.5.1.min.js"); | |
script.addEventListener('load', function() { | |
var script = document.createElement("script"); | |
script.textContent = "(" + callback.toString() + ")();"; | |
document.body.appendChild(script); | |
}, false); | |
document.body.appendChild(script); | |
} |
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 System.Linq; | |
using System.Text; | |
using EPiServer; | |
using EPiServer.Core; | |
using EPiServer.PlugIn; | |
namespace BlendInteractive.AppCode.Plugins | |
{ | |
[ScheduledPlugIn(DisplayName = "Delete Unpublished Faculty and Staff")] | |
public class DeleteUnpublishedPeople |
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 System.Linq; | |
using EPiServer; | |
using EPiServer.BaseLibrary.Scheduling; | |
using EPiServer.Core; | |
using EPiServer.PlugIn; | |
namespace BlendInteractive.AppCode.Plugins | |
{ | |
[ScheduledPlugIn(DisplayName = "Delete Unpublished Faculty and Staff")] | |
public class DeleteUnpublishedPeople : JobBase |
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 System; | |
using System.Runtime.InteropServices; | |
using System.Security.Principal; | |
using EPiServer.BaseLibrary.Scheduling; | |
namespace BlendInteractive.CustomUserJob | |
{ | |
public class ImpersonationJob : JobBase | |
{ |
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
public static void SerializeObjectToFile<T>(string filename, T objectToSerialze) | |
{ | |
using (Stream stream = File.Open(filename, FileMode.Create)) | |
{ | |
var formatter = new BinaryFormatter(); | |
formatter.Serialize(stream, objectToSerialze); | |
} | |
} |
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
protected void SetSelectedMultipleItemPropertyValues(string propertyName, ListControl control) | |
{ | |
var listValues = EditModel[propertyName] == null ? new List<string>() : EditModel[propertyName].ToString().Split(',').ToList(); | |
foreach (var option in GetMultipleOptionsListItemsForProperty(propertyName).ListOptions) | |
{ | |
var newItem = new ListItem(option.Key, option.Value); | |
if (!control.Items.Contains(newItem)) | |
control.Items.Add(newItem); | |
} |
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
private MultipleOptionsListSettings GetMultipleOptionsListItemsForProperty(string propertyName) | |
{ | |
IPropertySettingsRepository settingsRepository = new PropertySettingsRepository(); | |
PropertySettingsContainer container; | |
PageData dummyModel = DataFactory.Instance.GetDefaultPageData(SiteSettings.ModelRoot, "Model Page"); | |
if (settingsRepository.TryGetContainer(dummyModel.Property[propertyName].SettingsID, out container)) | |
{ | |
var wrapper = new PropertySettingsWrapper(); |
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
public static class IEnumerableExtensions | |
{ | |
public static IEnumerable<T> OrEmptyListIfNull<T>(this IEnumerable<T> source) | |
{ | |
return source ?? Enumerable.Empty<T>(); | |
} | |
} |
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
function createAndSubmitSalesForceLogin(selector,action,method) { | |
var newForm = $(document.createElement('form')).hide() | |
.attr('method',method).attr('action',action) | |
.append($(selector).html()) | |
.appendTo('body'); | |
$(newForm).submit(); | |
} |
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
private void CleanupXFormHtmlMarkup(XFormControl formControl) | |
{ | |
if (formControl.EditMode) | |
{ | |
// We need to render the default table when in edit mode, otherwise the form wizard won't work | |
return; | |
} | |
bool firstLiteralControl = false; |
OlderNewer