mirror of
https://github.com/nasa/openmct.git
synced 2025-01-24 05:18:06 +00:00
7543faa577
Fixes #1233 Adds to text inputs content; Mods to MCTExample to allow a padded wrapper around <pre> element; Fixed snow theme css file reference;
31 lines
770 B
JavaScript
31 lines
770 B
JavaScript
define([
|
|
'text!../res/templates/mct-example.html'
|
|
], function (
|
|
MCTExampleTemplate
|
|
) {
|
|
|
|
function MCTExample() {
|
|
function link($scope, $element, $attrs, controller, $transclude) {
|
|
var codeEl = $element.find('pre');
|
|
var exampleEl = $element.find('div');
|
|
|
|
$transclude(function (clone) {
|
|
exampleEl.append(clone);
|
|
codeEl.text(exampleEl.html()
|
|
.replace(/ class="ng-scope"/g, "")
|
|
.replace(/ ng-scope"/g, '"'));
|
|
});
|
|
}
|
|
|
|
return {
|
|
restrict: "E",
|
|
template: MCTExampleTemplate,
|
|
transclude: true,
|
|
link: link,
|
|
replace: true
|
|
};
|
|
}
|
|
|
|
return MCTExample;
|
|
});
|