<div class="modal-header">
    <h3 class="modal-title">{{message.subject}}</h3>
</div>
<div class="modal-body">

    <uib-tabset active="activeForm" class="mail-summary">

        <!-- TODO: fix auto-selection of first tab when first tab not shown -->

        <uib-tab index="0" heading="HTML Body" ng-show="message.messageHasBodyHTML">
            <div ng-include src="'includes/mail-meta.html'" class="mail-summary-meta"></div>
            <iframe class="mail-summary-content mail-summary-content-html" src="{{messageHTMLURL}}"></iframe>
        </uib-tab>

        <uib-tab index="1" heading="Text Body" ng-show="message.messageHasBodyText">
            <div ng-include src="'includes/mail-meta.html'"></div>
            <div class="mail-summary-content mail-summary-content-pre">{{message.messageBodyText}}</div>
        </uib-tab>

        <uib-tab index="2" heading="Original Message">
            <div class="mail-summary-content mail-summary-content-pre mail-summary-content-raw">{{message.messageRaw}}</div>
        </uib-tab>

    </uib-tabset>


</div>
<div class="modal-footer">
    <button class="btn btn-info" ng-click="modalCtrl.close()">Close</button>
</div>


<div class="modal-header">
    <h3 class="modal-title">{{message.subject}}</h3>
</div>
<div class="modal-body">

    <uib-tabset active="activeForm" class="mail-summary">

        <uib-tab id="0" heading="HTML Body" ng-if="message.messageHasBodyHTML">
            <div ng-include src="'includes/mail-meta.html'" class="mail-summary-meta"></div>
            <iframe class="mail-summary-content mail-summary-content-html" src="{{messageHTMLURL}}"></iframe>
        </uib-tab>

        <uib-tab id="1" heading="Text Body" ng-if="message.messageHasBodyText">
            <div ng-include src="'includes/mail-meta.html'"></div>
            <div class="mail-summary-content mail-summary-content-pre">{{message.messageBodyText}}</div>
        </uib-tab>

        <uib-tab id="2" heading="Original Message" ng-if="true">
            <div class="mail-summary-content mail-summary-content-pre mail-summary-content-raw">{{message.messageRaw}}</div>
        </uib-tab>

    </uib-tabset>


</div>
<div class="modal-footer">
    <button class="btn btn-info" ng-click="modalCtrl.close()">Close</button>
</div>


Fix default selection of available tab when html and/or text version wasn't available.
Fix default selection of available tab when html and/or text version wasn't available.
