-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathSystem.Web.UI.WebControls.ListView.debug.js
More file actions
45 lines (40 loc) · 1.93 KB
/
System.Web.UI.WebControls.ListView.debug.js
File metadata and controls
45 lines (40 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//=============================================================================
// Jocys.com JavaScript.NET Classes (In C# Object Oriented Style)
// Created by Evaldas Jocys <evaldas@jocys.com>
//=============================================================================
/// <reference path="System.debug.js" />
//=============================================================================
// Namespaces
//-----------------------------------------------------------------------------
// <PropertyGroup>
// <RootNamespace>System.Web.UI.WebControls</RootNamespace>
// <PropertyGroup>
//-----------------------------------------------------------------------------
System.Type.RegisterNamespace("System.Web.UI.WebControls");
//-----------------------------------------------------------------------------
// CLASS: System.Web.UI.WebControls.ListView
//-----------------------------------------------------------------------------
System.Web.UI.WebControls.ListView = function () {
/* use jQuery-UI DataTables */
};
System.Type.RegisterClass("System.Web.UI.WebControls.ListView");
System.Web.UI.WebControls.ListView.FixTable = function (id) {
/// <summary>
/// Browsers will screw tables, by moving TH nodes under 'TBODY TR' and removing 'THEAD' node.
/// It happnes when brower copies table under different HTML nodes (jQuery-UI DataTables).
/// This function will fix table structure by moving TH nodes back under THEAD TR node.
/// </summary>
var grid = $("#" + id);
var head = $(grid).children("thead");
// If header is missing then...
if (!head.length) {
var headRows = $(grid).find("tbody tr th");
var headRow = headRows.parent();
grid[0].createTHead();
head = $(grid).children("thead");
head.append(headRow);
}
};
//==============================================================================
// END
//------------------------------------------------------------------------------