adding some code docs
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* The content item(s) are loaded into an array and this will set the active content item based on the current culture.
|
||||
* The content item(s) are loaded into an array and this will set the active content item based on the current culture (query string).
|
||||
* If the content item is invariant, then only one item exists in the array.
|
||||
*/
|
||||
function setActiveCulture() {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
/** This directive is used to render out the current variant tabs and properties and exposes an API for other directives to consume */
|
||||
function tabbedContentDirective() {
|
||||
|
||||
var directive = {
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
templateUrl: 'views/components/content/variant-content.html',
|
||||
link: function (scope) {
|
||||
|
||||
/**
|
||||
* Adds a new editor to the editors array to show content in a split view
|
||||
* @param {any} selectedVariant
|
||||
*/
|
||||
scope.openInSplitView = function (selectedVariant) {
|
||||
|
||||
var selectedCulture = selectedVariant.language.culture;
|
||||
@@ -52,6 +56,10 @@
|
||||
}, 100);
|
||||
};
|
||||
|
||||
/**
|
||||
* Changes the currently selected variant
|
||||
* @param {any} variantDropDownItem
|
||||
*/
|
||||
scope.selectVariant = function (variantDropDownItem) {
|
||||
|
||||
var editorIndex = _.findIndex(scope.editors, function (e) {
|
||||
@@ -79,6 +87,7 @@
|
||||
}
|
||||
};
|
||||
|
||||
/** Closes the split view */
|
||||
scope.closeSplitView = function () {
|
||||
//TODO: hacking animation states - these should hopefully be easier to do when we upgrade angular
|
||||
scope.editor.loading = true;
|
||||
@@ -105,6 +114,8 @@
|
||||
content: "=",
|
||||
editor: "=",
|
||||
editors: "=",
|
||||
//TODO: I don't like having this callback defined and would like to make this directive a bit less
|
||||
// coupled but right now don't have time
|
||||
initVariant: "&"
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user