-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.asp
More file actions
123 lines (111 loc) · 3.43 KB
/
Copy pathindex.asp
File metadata and controls
123 lines (111 loc) · 3.43 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
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN'
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html>
<head>
<meta http-equiv="expires" content="-1" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="copyright" content="2013, Web Site Management" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" >
<title>Set Element Display in Project Structure</title>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<style type="text/css">
body
{
padding: 10px;
}
textarea, input
{
width: 95%;
height: 150px;
}
</style>
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="rqlconnector/Rqlconnector.js"></script>
<script type="text/javascript">
var _ElementGuid = '<%= session("treeguid") %>';
var LoginGuid = '<%= session("loginguid") %>';
var SessionKey = '<%= session("sessionkey") %>';
var RqlConnectorObj = new RqlConnector(LoginGuid, SessionKey);
$(document).ready(function() {
$('.form-actions .btn').hide();
LoadContentClassElement(_ElementGuid);
});
function LoadContentClassElement(ElementGuid)
{
$('#processing').modal('show');
var strRQLXML = '<PROJECT><TEMPLATE><ELEMENT action="load" guid="' + ElementGuid + '"/></TEMPLATE></PROJECT>';
RqlConnectorObj.SendRql(strRQLXML, false, function(data){
var IsInvisible = $(data).find('ELEMENT').attr('eltinvisibleinclient');
switch(IsInvisible)
{
case '1':
$('#display-status').text('HIDDEN');
$('#display-status').addClass('btn-warning');
$('#show').show();
break
case '0':
$('#display-status').text('SHOWN');
$('#display-status').addClass('btn-success');
$('#hide').show();
break
}
$('#processing').modal('hide');
});
}
function ShowElement()
{
SetElementDisplay(_ElementGuid, true);
}
function HideElement()
{
SetElementDisplay(_ElementGuid, false);
}
function SetElementDisplay(ElementGuid, Show)
{
$('#processing').modal('show');
var IsInvisible;
if(Show)
{
IsInvisible = 0;
}
else
{
IsInvisible = 1;
}
var strRQLXML = '<PROJECT><TEMPLATE><ELEMENT action="save" guid="' + ElementGuid + '" eltinvisibleinclient="' + IsInvisible + '"/></TEMPLATE></PROJECT>';
RqlConnectorObj.SendRql(strRQLXML, false, function(data){
$('#processing').modal('hide');
window.close();
});
}
</script>
</head>
<body>
<div id="processing" class="modal hide fade" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<h3>Processing</h3>
</div>
<div class="modal-body">
<p>Please wait...</p>
</div>
</div>
<div class="form-horizontal">
<div class="navbar navbar-inverse">
<div class="navbar-inner">
<span class="brand">Current Element Display Status</span>
</div>
</div>
<div class="control-group">
<label class="control-label" for="display-status">Display Status</label>
<div class="controls">
<a href="#" id="display-status" class="btn disabled"></a>
</div>
</div>
<div class="form-actions">
<button class="btn btn-warning pull-right" id="hide" onclick="HideElement()">Hide</button>
<button class="btn btn-success pull-right" id="show" onclick="ShowElement()">Show</button>
</div>
</div>
</body>
</html>