RootLayoutMgr.renderParentLayoutChooser (selLayout, firstOption)
render a dropdown containing the available shareable system layouts (this method also checks if any of the system layouts is already in the chain of the selected layout, just to prevent a loop between two layouts)

  • Parameter Object:
    collection to work on
  • Parameter Object:
    current Layout
  • Parameter String:
    String to display as first option
  • See also
    LayoutMgr/renderParentLayoutChooser
Sourcecode in RootLayoutMgr/renderFunctions.js:
1:   function renderParentLayoutChooser(selLayout, firstOption) {
2:      var size = this.size();
3:      var parents = null;
4:      var selected = null;
5:      var options = [];
6:      for (var i=0;i<size;i++) {
7:         var l = this.get(i);
8:         var parents = l.getParents();
9:         if (!selLayout || (l != selLayout && !parents.containsKey(selLayout._id)))
10:           options.push({value: l.alias, display: l.title});
11:     }
12:     if (selLayout && selLayout.parent)
13:        selected = selLayout.parent.alias;
14:     Html.dropDown({name: "layout"}, options, selected, firstOption);
15:     return;
16:  }