<div ng-controller="escolaController" ng-init="carregarEscola()">
    <div ng-controller="loginController">
        <div class="container" style="">
            <div class="col-md-12" style="height:100px">

            </div>
            <div class="col-md-12" style="height:70px;">
                <img src="../app/images/inovar_inventario.png" style="margin-left:15px" />
            </div>
            <div class="col-md-12" style="" id="xxx">
                
                <form>
                    <div class="col-xs-6 col-md-8" style="height:100px">
                        <div>
                            <label style="padding-bottom:8px">{{nomeEscola}}</label>
                        </div>
                        <input ng-model="user.Login" id="login-username" type="text" class="form-control" name="username" placeholder="Login" autofocus style="max-width:450px" />
                        <br />
                        <input id="login-password" ng-model="user.Password" type="password" class="form-control" name="password" placeholder="Senha" style="max-width:450px" />
                        <div style="margin-top:10px">
                            <img class="apontar" src="../app/images/botao_entrar_inventario.png" ng-click="submit();" />
                            <button type="submit" ng-click="submit()" style="display:none"></button>
                        </div>
                    </div>
                </form>
            </div>
            <div class="col-md-12" style="">
                <div class="col-xs-6 col-md-8" style="">

                </div>
                <div class="col-xs-6 col-md-4" style="">
                    <img src="../app/images/img_grande_splash_inventario.png" />
                </div>
            </div>
        </div>

        <div class="col-md-12" style="background-color:#333366; height:170px; color:white">
            <div class="container" style="margin-top:10px">
                <div class="col-xs-6 col-md-4" ng-controller="destaquesController" ng-init="carregarDestaquesMostrar()">
                    <b>INFORMAÇÕES ÚTEIS</b>
                    <div style="overflow:hidden; height:100px; display:block" ng-bind-html="htmlDestaques" id="htmlDestaques">
                        {{htmlDestaques}}
                    </div>
                    <p align="right" class="apontar" ng-show="maisDestaques==true" ng-click="mostrarMaisDestaques()">Ver mais...</p>
                </div>
                <div class="col-xs-6 col-md-4">
                    <b>CONTACTOS</b>
                    <br />
                    {{info.Telefone}} | {{info.EMail}}
                    <br />
                    <br />
                    {{info.Morada}}
                </div>
                <div class="col-md-4">

                </div>
            </div>
        </div>


    </div>
</div>
<script>


    function reDim() {
        if (location.href.indexOf("login") == -1)
            return;

        var wh = window.innerHeight;
        var h = wh - 70 - 100 - 134 - 170 - 35;
        if (h < 100)
            h = 100;
        $("#xxx").height(h);
    }

    if (location.href.indexOf("login") != -1) {
        reDim();
        ultrapassouDim();
    }


    function ultrapassouDim() {
        if (location.href.indexOf("login") == -1)
            return false;

        var element = document.getElementById("htmlDestaques");
        //console.log(element.offsetHeight);
        //console.log(element.scrollHeight);
        //console.log(element.offsetWidth +"<"+ element.scrollWidth);
        if (element.offsetHeight < element.scrollHeight ||
            element.offsetWidth < element.scrollWidth) {


        } else {

        }

    }

</script>
