Nextrek
Diff Revisions
586
vs
587
for /Android/SmartCharging/endPoints/nightly/control_panel/js/utilities.js
|
@@ -1,6 +1,35 @@ |
|
1 |
+ |
//jQuery styleTable |
|
2 |
+ |
/*(function ($) { |
|
3 |
+ |
$.fn.styleTable = function (options) { |
|
4 |
+ |
var defaults = { |
|
5 |
+ |
css: 'ui-styled-table' |
|
6 |
+ |
}; |
|
7 |
+ |
options = $.extend(defaults, options); |
|
8 |
+ |
|
|
9 |
+ |
return this.each(function () { |
|
10 |
+ |
$this = $(this); |
|
11 |
+ |
$this.addClass(options.css); |
|
12 |
+ |
|
|
13 |
+ |
$this.on('mouseover mouseout', 'tbody tr', function (event) { |
|
14 |
+ |
$(this).children().toggleClass("ui-state-hover", |
|
15 |
+ |
event.type == 'mouseover'); |
|
16 |
+ |
}); |
|
17 |
+ |
|
|
18 |
+ |
$this.find("th").addClass("ui-state-default"); |
|
19 |
+ |
$this.find("td").addClass("ui-widget-content"); |
|
20 |
+ |
$this.find("tr:last-child").addClass("last-child"); |
|
21 |
+ |
}); |
|
22 |
+ |
}; |
|
23 |
+ |
})(jQuery);*/ |
|
24 |
+ |
|
|
25 |
+ |
|
1 |
26 |
|
function getHtmlPage(file, callback) { |
2 |
27 |
|
$.ajax({ |
3 |
28 |
|
url: file, |
4 |
29 |
|
success: callback |
5 |
30 |
|
}); |
|
31 |
+ |
} |
|
32 |
+ |
|
|
33 |
+ |
function isEmpty( el ){ |
|
34 |
+ |
return !$.trim(el.html()) |
6 |
35 |
|
} |