alaawahbah
2/18/2016 - 9:29 AM

Public Functions

Public Functions

app.ShowTab = function (PanelID) {
        $('a[href="#' + PanelID + '"]').tab('show');
    }
 $(document).ajaxStart(function (e, xhr, opts) {
        $(".tabbable").addClass('csspinner').addClass('load1');

    }).ajaxComplete(function (e, xhr, opts) {
        $(".tabbable").removeClass('csspinner').removeClass('load1');
    });
var app = app || {};

(function () {
    app.ClearForm = function Clear(formContainerId) {
        if (formContainerId) {
            formContainerId = '#' + formContainerId;
        }
        else {
            formContainerId = '';
        }

        $(formContainerId).find(':input').each(function () {
            switch (this.type) {
                case 'password':
                case 'select-multiple':
                case 'select-one':
                case 'text':
                case 'textarea':
                    $(this).val('');
                    break;
                case 'hidden':
                    if ($(this).attr('id') == 'ID')
                        $(this).val('0');
                    break;
                case 'checkbox':
                case 'radio':
                    this.checked = false;
            }
        });


        $(".k-upload-files").remove();
        $(".k-upload-status").remove();
        $(".k-upload.k-header").addClass("k-upload-empty");
        $(".k-upload-button").removeClass("k-state-focused");

    };
    });
$(function () {
  
});
/*******************/
(function () {

})();
 app.RebindGrid = function (GridName) {
        if (GridName)
            $('#' + GridName).data('kendoGrid').dataSource.read();
    }
    
    //$('#' + GridName).data('kendoGrid').dataSource.read({id:3});
$('#' + GridName).data('kendoGrid').dataSource.read().then(function(){
  alert('Done');
  });
app.ShowModal = function (ModalId) {
        $('#' + ModalId).modal('show');
    }
    
     app.HideModal = function (ModalId) {
        $('#' + ModalId).modal('hide');
    }
app.DisableField = function (FieldId) {
        $('#' + FieldId).attr('disabled', 'disabled');
    }
var x =$('#ListName').data('kendoListView').dataSource;
x.Page();//GetCurrentPage
x.Page(1);//SetPage
x.total()//GetRowTotal
x.pageSize(19)//SetPageSize to 19

  app.CheckAll = function (e) {
        $('input[type=checkbox]').each(function () {
            $(this).prop('checked', true);
        });
    }
    app.UnCheckAll = function (e) {
        $('input[type=checkbox]').each(function () {
            $(this).prop('checked', false);
        });
    }
$('#ListViewName').data('kendoListView').dataSource.read({id:3});
 app.ActiveLink = function (Link) {
        var CurrentLink = $('a[href="' + Link + '"]');

        var CurrentLink_li = CurrentLink.closest("li");
        var CurrentLink_li_ul = CurrentLink_li.closest("ul");
        var CurrentLink_li_ul_li = CurrentLink_li_ul.closest("li");

        var ActiveLink = $('.main-navigation-menu .active');
        ActiveLink.removeClass("open");
        ActiveLink.removeClass("active");

        CurrentLink_li.addClass("active");
        CurrentLink_li_ul_li.addClass("active open");
    }
    
    //app.ActiveLink(window.location.pathname);