forked from yui/yuicompressor
/
_syntax_error.js
73 lines (61 loc) · 1.4 KB
/
_syntax_error.js
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
window.$ = $telerik.$;
$(document).ready(function() {
movePageElements();
var text = $('textarea').val();
if (text != "")
$('textarea').attr("style", "display: block;");
else
$('textarea').attr("style", "display: none;");
//cleanup
text = null;
});
function movePageElements() {
var num = null;
var pagenum = $(".pagecontrolscontainer");
if (pagenum.length > 0) {
var num = pagenum.attr("pagenumber");
if ((num > 5) && (num < 28)) {
var x = $('div#commentbutton');
$("div.buttonContainer").prepend(x);
}
else {
$('div#commentbutton').attr("style", "display: none;");
}
}
//Add in dropshadowing
if ((num > 5) && (num < 28)) {
var top = $('.dropshadow-top');
var middle = $('#dropshadow');
var bottom = $('.dropshadow-bottom');
$('#page').prepend(top);
$('#topcontainer').after(middle);
middle.append($('#topcontainer'));
middle.after(bottom);
}
//cleanup
num = null;
pagenum = null;
top = null;
middle = null;
bottom=null;
}
function expandCollapseDiv(id) {
$telerik.$(id).slideToggle("slow");
}
function expandCollapseHelp() {
$('.helpitems').slideToggle("slow");
//Add in dropshadowing
if ($('#helpcontainer').length) {
$('#help-dropshadow-bot').insertAfter('#helpcontainer');
$('#help-dropshadow-bot').removeAttr("style");
}
}
function expandCollapseComments() {
var style = $('textarea').attr("style");
if (style == "display: none;")
$('textarea').fadeIn().focus();
else
$('textarea').fadeOut();
//cleanup
style = null;
}