<%@ master language="VB" inherits="Template_FullContentPage, MachSol.MachPanel.Web" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolKit" %>
<%@ Register Assembly="AjaxControls" Namespace="AjaxControls" TagPrefix="ajaxCtrl" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Master Page</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

    <!-- Google Fonts -->
    <%--<link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css">--%>

    <link href="/css/google/material-icons.css" rel="stylesheet" type="text/css" />

    <link rel="stylesheet" type='text/css' href="~/JS/jquery-ui-1.11.2/jquery-ui.min.css" />
    <!-- Bootstrap Core Css -->
    <link href="~/plugins/bootstrap/css/bootstrap.css" rel="stylesheet">

    <!-- Waves Effect Css -->
    <link href="~/plugins/node-waves/waves.css" rel="stylesheet" />

    <!-- Animation Css -->
    <link href="~/plugins/animate-css/animate.css" rel="stylesheet" />

    <!-- Morris Chart Css-->
    <link href="~/plugins/morrisjs/morris.css" rel="stylesheet" />

    <link href="~/plugins/nestable/jquery-nestable.css" rel="stylesheet">

    <!-- AdminBSB Themes. You can choose a theme from css/themes instead of get all themes -->
    <link href="~/css/themes/all-themes.css" rel="stylesheet" />

    <!-- Bootstrap Select Css -->
    <link href="~/plugins/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" />

    <%--   <!-- JQuery DataTable Css -->
    <link href="~/plugins/jquery-datatable/skin/bootstrap/css/dataTables.bootstrap.css" rel="stylesheet">--%>

    <!-- Custom Css -->
    <link href="~/css/style.css" rel="stylesheet" />
    
    <%--menu css--%>
    <link href="~/css/menu.css" rel="stylesheet">

    <!-- AdminBSB Themes. You can choose a theme from css/themes instead of get all themes -->
    <link href="~/css/themes/all-themes.css" rel="stylesheet" />

    <link href="~/css/Calendar.css" rel="stylesheet">
    <link href="~/JS/cal/cal.css" rel="stylesheet" type="text/css" />

    <%--searchable option list library--%>
    <link rel="stylesheet" type='text/css' href="/JS/searchablelist/sol-2.0.2.css" />

    <%--<script type="text/javascript" language="javascript" src="<%# Helper.GetAppUrl(Request.Url.AbsoluteUri, Request.Url.AbsolutePath)%>/JS/Utility.js"></script>--%>

    <%--JQuery Framework References--%>
    <script language="javascript" type="text/javascript" src="/plugins/jquery/jquery.min.js?<%# Helper.GetProductVersion() %>"></script>
    <script language="javascript" type="text/javascript" src="/JS/jquery-ui-1.11.2/jquery-ui.min.js?<%# Helper.GetProductVersion() %>"></script>
    <script language="javascript" type="text/javascript" src="/JS/jquery-ui/js/jquery-ui-1.8.12.custom.min.js?<%# Helper.GetProductVersion() %>"></script>
    <%--<script language="javascript" type="text/javascript" src="/JS/bjqs-1.3.min.js?<%# Helper.GetProductVersion() %>"></script>--%>
    <%--<script language="javascript" type="text/javascript" src="/JS/jqueryNextPrev.js?<%# Helper.GetProductVersion() %>"></script>--%>
    <%--<script language="javascript" type="text/javascript" src="/JS/SliderNextPrev.js?<%# Helper.GetProductVersion() %>"></script>--%>
    <%--<script language="javascript" type="text/javascript" src="/JS/jquery.slimscroll.js?<%# Helper.GetProductVersion() %>"></script>--%>
    <%--Custom References of Controls Used for Help--%>
    <script language="javascript" type="text/javascript" src="/JS/RoboHelp_CSH.js?<%# Helper.GetProductVersion() %>"></script>
    <script language="javascript" type="text/javascript" src="/JS/overlib.js?<%# Helper.GetProductVersion() %>"></script>
    <script language="javascript" type="text/javascript" src="/JS/overlibmws.js?<%# Helper.GetProductVersion() %>"></script>
    <%--searchable option list js library--%>
    <script language="javascript" type="text/javascript" src="/JS/searchablelist/sol-2.0.2.js?<%# Helper.GetProductVersion() %>"></script>

    <%--MachPanel Custom JS files--%>
    <script language="javascript" type="text/javascript" src="/JS/date.js"></script>
    <script language="javascript" type="text/javascript" src="/JS/WebServiceCalls.js?<%# Helper.GetProductVersion() %>"></script>
    <script language="javascript" type="text/javascript" src="/JS/Utility.js?<%# Helper.GetProductVersion() %>"></script>
    <script language="javascript" type="text/javascript" src="/JS/Network.js?<%# Helper.GetProductVersion() %>"></script>
    <script language="javascript" type="text/javascript" src="/JS/menu.js?<%# Helper.GetProductVersion() %>"></script>
    <script language="javascript" type="text/javascript" src="/JS/HelpDesk.js?<%# Helper.GetProductVersion() %>"></script>
    <script language="javascript" type="text/javascript" src="/JS/inc_code.js?<%# Helper.GetProductVersion() %>"></script>
    <script language="javascript" type="text/javascript" src="/JS/service-q.js?<%# Helper.GetProductVersion() %>"></script>
    <script language="javascript" type="text/javascript" src="/JS/ProductBasicInfo.js?<%# Helper.GetProductVersion() %>"></script>
    <script language="javascript" type="text/javascript" src="/JS/Exchange.js?<%# Helper.GetProductVersion() %>"></script>
    <script language="javascript" type="text/javascript" src="/JS/cal/cal.js?<%# Helper.GetProductVersion() %>"></script>
    <script language="javascript" type="text/javascript" src="/JS/Lync.js?<%# Helper.GetProductVersion() %>"></script>
    <script language="javascript" type="text/javascript" src="/JS/vps-states.js?<%# Helper.GetProductVersion() %>"></script>

    <%--System alert box--%>
    <script src="/JS/pages/ui/notifications.js"></script>
    <!-- Bootstrap Notify Plugin Js -->
    <script src="/plugins/bootstrap-notify/bootstrap-notify.js"></script>
    <%--Client Helper JS files for custom purposes--%>
    <script language="javascript" type="text/javascript" src="/JS/functions.js?<%# Helper.GetProductVersion() %>"></script>
    

</head>
<body>
    <%If MachSol.MachPanel.DBCore.SystemSettings.IsDMP() Then %>
        <link href="/css/sar-customizations.css" rel="stylesheet" />
    <%End If%>
    <!-- Page Loader -->
    <div class="page-loader-wrapper">
        <div class="loader">
            <div class="preloader">
                <div class="spinner-layer pl-red">
                    <div class="circle-clipper left">
                        <div class="circle"></div>
                    </div>
                    <div class="circle-clipper right">
                        <div class="circle"></div>
                    </div>
                </div>
            </div>
            <p><%= Resources.Content.SPT002747 %></p>
        </div>
    </div>
    <!-- #END# Page Loader -->
    <form id="form1" runat="server" autocomplete="off">
        <br />
        <ajax:ScriptManager ID="SM_Master" EnablePartialRendering="true" EnableScriptGlobalization="true"
            EnableScriptLocalization="true" runat="server" AsyncPostBackTimeout="360">
        </ajax:ScriptManager>
        <!-- Success or Error Message Start -->
        <ajax:UpdatePanel RenderMode="Inline" ID="UP_Message" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <div id="Div_UPMessage" runat="server" class="container-fluid" style="display: none">
                    <div class="alert alert-dismissible sys-alert">
                        <button type="button" class="close" data-dismiss="alert">&times;</button>
                        <div id="Div_Message" class="successMsg" runat="server" visible="false" />
                    </div>
                </div>
                <!--  the below repleated Error Div's and Success Div are for Vue -->
                <div id="Div_UPMessageForJS" runat="server" class="container-fluid" style="display: none">
                    <div class="alert alert-dismissible sys-alert">
                        <button type="button" class="close" onclick="$('#ctl00_Div_UPMessageForJS').attr('style', 'display: none')">&times;</button>
                        <div id="Div_MessageForJS" class="successMsg" runat="server" />
                    </div>
                </div>
            </ContentTemplate>
        </ajax:UpdatePanel>
        <!-- //end Success or Error Message -->


        <%--<input type="hidden" id="HF_Ajax" value="0" />--%>

        <div>
            <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
            </asp:ContentPlaceHolder>
        </div>
    </form>

    <!-- Jquery Core Js -->
    <script src="/plugins/jquery/jquery.min.js"></script>

    <!-- Bootstrap Core Js -->
    <script src="/plugins/bootstrap/js/bootstrap.js"></script>

    <!-- Slimscroll Plugin Js -->
    <script src="/plugins/jquery-slimscroll/jquery.slimscroll.js"></script>
    <!-- Waves Effect Plugin Js -->
    <script src="/plugins/node-waves/waves.js"></script>

    <!-- Jquery CountTo Plugin Js -->
    <script src="/plugins/jquery-countto/jquery.countTo.js"></script>

    <!-- Morris Plugin Js -->
    <script src="/plugins/raphael/raphael.min.js"></script>
    <script src="/plugins/morrisjs/morris.js"></script>
    <script src="/plugins/nestable/jquery.nestable.js"></script>

    <!-- ChartJs -->
    <%--<script src="/plugins/chartjs/Chart.bundle.js"></script>--%>

    <!-- Flot Charts Plugin Js -->
    <%--<script src="/plugins/flot-charts/jquery.flot.js"></script>
    <script src="/plugins/flot-charts/jquery.flot.resize.js"></script>
    <script src="/plugins/flot-charts/jquery.flot.pie.js"></script>
    <script src="/plugins/flot-charts/jquery.flot.categories.js"></script>
    <script src="/plugins/flot-charts/jquery.flot.time.js"></script>--%>

    <!-- Sparkline Chart Plugin Js -->
    <%--<script src="/plugins/jquery-sparkline/jquery.sparkline.js"></script>--%>

    <!-- Select Plugin Js -->
    <script src="/plugins/bootstrap-select/js/bootstrap-select.js"></script>

    <%--   <!-- Jquery DataTable Plugin Js -->
    <script src="/plugins/jquery-datatable/jquery.dataTables.js"></script>
    <script src="/plugins/jquery-datatable/skin/bootstrap/js/dataTables.bootstrap.js"></script>
    <script src="/plugins/jquery-datatable/extensions/export/dataTables.buttons.min.js"></script>
    <script src="/plugins/jquery-datatable/extensions/export/buttons.flash.min.js"></script>
    <script src="/plugins/jquery-datatable/extensions/export/jszip.min.js"></script>
    <script src="/plugins/jquery-datatable/extensions/export/pdfmake.min.js"></script>
    <script src="/plugins/jquery-datatable/extensions/export/vfs_fonts.js"></script>
    <script src="/plugins/jquery-datatable/extensions/export/buttons.html5.min.js"></script>
    <script src="/plugins/jquery-datatable/extensions/export/buttons.print.min.js"></script>--%>

    <!-- Custom Js -->
    <%-- <script src="/JS/pages/tables/jquery-datatable.js"></script>--%>
    <%--<script src="/JS/pages/index.js"></script>--%>

    <!-- Demo Js -->
    <%--<script src="/JS/demo.js"></script>--%>
    <script language="javascript" type="text/javascript">

        function ModifyTabControlCssClasses() {

            $(".ajax__tab_xp").each(function () {

                $(this).removeAttr('class');

            });

            $('.ajax__tab_header').removeClass('ajax__tab_header').addClass('TabControlTabHeader');

            $(".ajax__tab_active").find('.ajax__tab_tab').removeClass('ajax__tab_tab').addClass('TabControlTab');

            $('.ajax__tab_tab').removeClass('ajax__tab_tab').addClass('TabControlTabInActive');

            $(".ajax__tab_body").removeClass('ajax__tab_body').addClass('TabControlTabBody');

        }

        function AdminBSBThemeChanges() {

            //AdminBSB Theme Changes:
            ModifyTabControlCssClasses();

            $('.row-label').each(function () {//Add div content in label to adjust display where Lael column data is not added in label control

                if ((!($(this).children('label').length)) && ($(this).next().find('input').length || $(this).next().find('select').length)) {
                    $(this).html('<label>' + $(this).html() + '</label>');
                }

            });



            $('select:not(.ms, .HE_top_bar select)').attr("data-live-search", "true")
                                                    .attr("data-width", "100%")
                                                    .attr("data-container", "body")
                                                    .addClass("selectpicker form-control")
                                                    .selectpicker();



            $('input[type = checkbox]').addClass("filled-in");
            $('input[type = radio]').addClass("with-gap");
            $('input[type = text]').addClass("form-control");
            $('input[type = password]').addClass("form-control");

            $('.search-panel .form-line').each(function () {

                $parent = $(this);

                if ($parent.find('input[type=text]').val() != '')
                    $parent.addClass("focused");

            });

            $('.selectpicker').selectpicker({
                //style: 'btn-info',
                //size: 4
            });

            //Tooltip
            $('[data-toggle="tooltip"]').tooltip({
                container: 'body'
            });

            //Popover
            $('[data-toggle="popover"]').popover();


            //Handling Select All checkbox, example usage in ClientsList Page.
            $('label').each(function () {
                if (($(this).prev().is("input[type='radio']") || ($(this).prev().is("input[type='checkbox']")))) {
                    $(this).attr("for", $(this).prev().attr('id'));
                }
            });

            //AdminBSB Theme Changes End

            //double horizontal scroll for expanded table/div
            $(".double-scroll-wrapper2 div").first().width($(".double-scroll-wrapper2 table").first().width());

            $(".double-scroll-wrapper1 div").first().width($(".double-scroll-wrapper2").find('div :first').width());

            $(".double-scroll-wrapper2").height($(".double-scroll-wrapper2 div").first().height());

            $(".double-scroll-wrapper1").scroll(function () {
                $(".double-scroll-wrapper2")
                    .scrollLeft($(".double-scroll-wrapper1").scrollLeft());
            });

            $(".double-scroll-wrapper2").scroll(function () {
                $(".double-scroll-wrapper1")
                    .scrollLeft($(".double-scroll-wrapper2").scrollLeft());
            });

            //double horizontal scroll for expanded table/div when we use two scroll in same page then we need double-scroll-wrapper3 double-scroll-wrapper4
            $(".double-scroll-wrapper4 div").first().width($(".double-scroll-wrapper4 table").first().width());

            $(".double-scroll-wrapper3 div").first().width($(".double-scroll-wrapper4").find('div :first').width());

            $(".double-scroll-wrapper4").height($(".double-scroll-wrapper4 div").first().height());

            $(".double-scroll-wrapper3").scroll(function () {
                $(".double-scroll-wrapper4")
                    .scrollLeft($(".double-scroll-wrapper3").scrollLeft());
            });

            $(".double-scroll-wrapper4").scroll(function () {
                $(".double-scroll-wrapper3")
                    .scrollLeft($(".double-scroll-wrapper4").scrollLeft());
            });


            !(function (e) {
                var t = function (t, n) {
                    (this.$element = e(t)), (this.type =
                      this.$element.data("uploadtype") ||
                      (this.$element.find(".thumbnail").length > 0
                        ? "image"
                        : "file")), (this.$input = this.$element.find(":file"));
                    if (this.$input.length === 0) return;
                    (this.name =
                      this.$input.attr("name") || n.name), (this.$hidden = this.$element.find(
                      'input[type=hidden][name="' + this.name + '"]'
                    )), this.$hidden.length === 0 &&
                      (
                        (this.$hidden = e('<input type="hidden" />')),
                        this.$element.prepend(this.$hidden)
                      ), (this.$preview = this.$element.find(".fileupload-preview"));
                    var r = this.$preview.css("height");
                    this.$preview.css("display") != "inline" &&
                      r != "0px" &&
                      r != "none" &&
                      this.$preview.css("line-height", r), (this.original = {
                          exists: this.$element.hasClass("fileupload-exists"),
                          preview: this.$preview.html(),
                          hiddenVal: this.$hidden.val()
                      }), (this.$remove = this.$element.find(
                      '[data-dismiss="fileupload"]'
                    )), this.$element
                      .find('[data-trigger="fileupload"]')
                      .on("click.fileupload", e.proxy(this.trigger, this)), this.listen();
                };
                (t.prototype = {
                    listen: function () {
                        this.$input.on("change.fileupload", e.proxy(this.change, this)), e(
                          this.$input[0].form
                        ).on("reset.fileupload", e.proxy(this.reset, this)), this.$remove &&
                          this.$remove.on("click.fileupload", e.proxy(this.clear, this));
                    },
                    change: function (e, t) {
                        if (t === "clear") return;
                        var n = e.target.files !== undefined
                          ? e.target.files[0]
                          : e.target.value ? { name: e.target.value.replace(/^.+\\/, "") } : null;
                        if (!n) {
                            this.clear();
                            return;
                        }
                        this.$hidden.val(""), this.$hidden.attr("name", ""), this.$input.attr(
                          "name",
                          this.name
                        );
                        if (
                          this.type === "image" &&
                          this.$preview.length > 0 &&
                          (typeof n.type != "undefined"
                            ? n.type.match("image.*")
                            : n.name.match(/\.(gif|png|jpe?g)$/i)) &&
                          typeof FileReader != "undefined"
                        ) {
                            var r = new FileReader(),
                              i = this.$preview,
                              s = this.$element;
                            (r.onload = function (e) {
                                i.html(
                                  '<img src="' +
                                    e.target.result +
                                    '" ' +
                                    (i.css("max-height") != "none"
                                      ? 'style="max-height: ' + i.css("max-height") + ';"'
                                      : "") +
                                    " />"
                                ), s.addClass("fileupload-exists").removeClass("fileupload-new");
                            }), r.readAsDataURL(n);
                        } else
                            this.$preview.text(n.name), this.$element
                              .addClass("fileupload-exists")
                              .removeClass("fileupload-new");
                    },
                    clear: function (e) {
                        this.$hidden.val(""), this.$hidden.attr(
                          "name",
                          this.name
                        ), this.$input.attr("name", "");
                        if (navigator.userAgent.match(/msie/i)) {
                            var t = this.$input.clone(!0);
                            this.$input.after(t), this.$input.remove(), (this.$input = t);
                        } else this.$input.val("");
                        this.$preview.html(""), this.$element
                          .addClass("fileupload-new")
                          .removeClass("fileupload-exists"), e &&
                          (this.$input.trigger("change", ["clear"]), e.preventDefault());
                    },
                    reset: function (e) {
                        this.clear(), this.$hidden.val(
                          this.original.hiddenVal
                        ), this.$preview.html(this.original.preview), this.original.exists
                          ? this.$element
                              .addClass("fileupload-exists")
                              .removeClass("fileupload-new")
                          : this.$element
                              .addClass("fileupload-new")
                              .removeClass("fileupload-exists");
                    },
                    trigger: function (e) {
                        this.$input.trigger("click"), e.preventDefault();
                    }
                }), (e.fn.fileupload = function (n) {
                    return this.each(function () {
                        var r = e(this),
                          i = r.data("fileupload");
                        i ||
                          r.data(
                            "fileupload",
                            (i = new t(this, n))
                          ), typeof n == "string" && i[n]();
                    });
                }), (e.fn.fileupload.Constructor = t), e(
                  document
                ).on("click.fileupload.data-api", '[data-provides="fileupload"]', function (
                  t
                ) {
                    var n = e(this);
                    if (n.data("fileupload")) return;
                    n.fileupload(n.data());
                    var r = e(t.target).closest(
                      '[data-dismiss="fileupload"],[data-trigger="fileupload"]'
                    );
                    r.length > 0 && (r.trigger("click.fileupload"), t.preventDefault());
                });
            })(window.jQuery);

        }

        $(document).ready(function () {

            AdminBSBThemeChanges();

            $('.page-loader-wrapper').hide();

            //Needed for Material design effect on Ajax call back.
            $.AdminBSB.input.activate();
            //AdminBSB Theme Changes  End
        });
    </script>
    <%--Need custom JS handling at end, to apply effects like Textbox Material design properly.--%>
    <script src="/JS/admin.js"></script>

    <script language="javascript" type="text/javascript" src="/JS/custom-fixes-rcc.js?<%# Helper.GetProductVersion() %>"></script>

</body>
</html>
