@@ -27,13 +27,24 @@ function(decoratorsProvider, sfBuilderProvider, sfPathProvider) {
2727 } ) ;
2828 }
2929 } ;
30+
31+ // Set tabArray sortOptions.items default.
32+ var tabArray = function ( args ) {
33+ if ( args . form . hasOwnProperty ( 'sortOptions' ) ) {
34+ if ( ! args . form . sortOptions . hasOwnProperty ( 'items' ) ) {
35+ args . form . sortOptions [ 'items' ] = 'li:not(:last-child)' ;
36+ }
37+ } else {
38+ args . form [ 'sortOptions' ] = { items : 'li:not(:last-child)' } ;
39+ }
40+ }
3041
3142 var defaults = [ sfField , ngModel , ngModelOptions , condition ] ;
3243 decoratorsProvider . defineDecorator ( 'bootstrapDecorator' , {
3344 textarea : { template : base + 'textarea.html' , builder : defaults } ,
3445 fieldset : { template : base + 'fieldset.html' , builder : [ sfField , simpleTransclusion , condition ] } ,
3546 array : { template : base + 'array.html' , builder : [ sfField , ngModelOptions , ngModel , array , condition ] } ,
36- tabarray : { template : base + 'tabarray.html' , builder : [ sfField , ngModelOptions , ngModel , array , condition ] } ,
47+ tabarray : { template : base + 'tabarray.html' , builder : [ sfField , ngModelOptions , ngModel , array , condition , tabArray ] } ,
3748 tabs : { template : base + 'tabs.html' , builder : [ sfField , ngModelOptions , tabs , condition ] } ,
3849 section : { template : base + 'section.html' , builder : [ sfField , simpleTransclusion , condition ] } ,
3950 conditional : { template : base + 'section.html' , builder : [ sfField , simpleTransclusion , condition ] } ,
0 commit comments