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
ko.bindingHandlers.gistEmbed = { | |
update: function (element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) { | |
var $element, options, gist; | |
options = ko.utils.unwrapObservable(valueAccessor()); | |
$element = $(element); | |
$element.data('gist-id', options.gistid); | |
$element.data('gist-file', options.file); | |
$element.data('gist-hide-footer', options.hidefooter || 'false'); | |
$element.data('gist-hide-line-numbers', options.hidelinenumbers || '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
function restoreAccordionPanel(storageKey, accordionId) { | |
var activeItem = localStorage.getItem(storageKey); | |
if (activeItem) { | |
//remove default collapse settings | |
$(accordionId + " .panel-collapse").removeClass('in'); | |
//show the account_last visible group | |
$("#" + activeItem).addClass("in"); | |
} | |
} |