-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsearch.html
143 lines (133 loc) · 6.45 KB
/
search.html
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Comprador - The Alfresco Client</title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="css/main.css" />
<link rel="stylesheet" type="text/css" href="css/magnific-popup.css" />
<link rel="stylesheet" type="text/css" href="css/jquery.msg.css" />
<script type="text/javascript" src="js/lib/jquery-2.0.3.js"></script>
<script type="text/javascript" src="js/lib/jquery.jfeed.js"></script>
<script type="text/javascript" src="js/lib/base64.min.js"></script>
<script type="text/javascript" src="js/lib/jquery.magnific-popup.js"></script>
<script type="text/javascript" src="js/lib/jquery.center.min.js"></script>
<script type="text/javascript" src="js/lib/jquery.msg.js"></script>
<script type="text/javascript" src="js/lib/tooltipsy.js"></script>
<script type="text/javascript" src="js/lib/purl.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</head>
<body>
<script>
checkUser();
</script>
<header class="pageheader">
<h2>Comprador</h2>
</header>
<section id="menupanel"></section>
<div id="mainwindow" width="100%">
<section id="toppanel" class="searchtoppanel">
<div class="searchinfo">
<h3 id="searchheader">Search Repository</h3>
<p class="searchsummary"></p>
</div>
</section>
<section id="searchleftpanel">
<fieldset class="searchoptions">
<legend>Search What?</legend>
<input type="text" list="recentterms" id="searchbox" /><br/> <br/>
<input type="radio" id="searchdoc" class="searchoption" name="searchoption" checked value="D" /><label for="searchdoc">Documents</label><br/>
<input type="radio" id="searchfolder" class="searchoption" name="searchoption" value="F" /><label for="searchfolder">Folders</label><br/>
<div class="btn" id="searchbutton" style="width: 92%">Search</div>
<datalist id="recentterms"></datalist>
</fieldset>
<fieldset class="searchoptions">
<legend>CMIS Custom Query</legend>
<textarea id="querybox" rows="5" cols="30" wrap="soft" style="float: left"></textarea>
<a class="helpicon" href="#helpcmis" title="CMIS Query Tips" style="float: right"></a>
<div class="btn" id="querybutton" style="width: 92%">Execute Query</div>
</fieldset>
</section>
<section id="rightpanel">
<table id="docslist" width="100%" cellspacing="5" cellspacing="10"></table>
</section>
<footer id="pagefooter"></footer>
</div>
<section id="helpcmis" class="white-popup mfp-hide">
<section id="helpheader">
<h2>Sample CMIS Queries</h2>
<p class="note">Click on a Query to use it.</p>
</section>
<p class="note">
<ul class="helpnote">
<li class="helpline">SELECT * FROM cmis:document<br/><i>selects all documents, returns all properties</i></li>
<li class="helpline">SELECT * FROM cmis:folder<br/><i>selects all folders, returns all properties</i></li>
<li class="helpline">SELECT * FROM cmis:document WHERE cmis:name LIKE '%myname%'<br/><i>selects all documents with name includes 'myname', returns all properties</i></li>
<li class="helpline">SELECT * FROM cmis:folder WHERE cmis:name IN ('myname1', 'myname2', 'myname3')<br/><i>selects all folders with name 'myname1' or 'myname2' or 'myname3', returns all properties</i></li>
<li class="helpline">SELECT * FROM cmis:document WHERE CONTAINS('mycontent')<br/><i>selects all documents having 'mycontent' keyword in the content, returns all properties</i></li>
<li class="helpline">SELECT cmis:objectId, cmis:createdBy, cmis:creationDate FROM cmis:document<br/><i>selects all documents, returns Object id, Creation date and Created by columns</i></li>
</ul>
<p style="margin: 50px 10px 20px 10px">Please refer to <a href="http://wiki.alfresco.com/wiki/CMIS_Query_Language" target="_blank">Alfresco Wiki</a> for detailed Alfresco CMIS Query Language.</p>
</p>
<button onclick="$.magnificPopup.close()" style="margin: 0 10px 0 10px; width: 98%">Close</button>
</section>
<section id="preferences" class="white-popup mfp-hide">
<section id="prefheader">
<h2>Preferences</h2>
<p class="note">Utilities for you.</p>
</section>
<fieldset class="searchoptions" style="margin: 20px 65px 0 65px" id="themeoptions">
<legend>Comprador Theme</legend>
<input type="radio" id="themeblue" class="themeoption" name="themeoption" value="B" /><label for="themeblue">I prefer Blue</label><br/>
<input type="radio" id="themegreen" class="themeoption" name="themeoption" value="G" /><label for="themegreen">Green suits me</label><br/>
<input type="radio" id="themebrown" class="themeoption" name="themeoption" value="W" /><label for="themebrown">Let's try Brown</label><br/>
<input type="radio" id="themeprof" class="themeoption" name="themeoption" value="P" /><label for="themeprof">Professional</label><br/>
<input type="radio" id="themedefault" class="themeoption" name="themeoption" value="D" /><label for="themedefault">Default is Okay</label><br/>
</fieldset>
<fieldset class="searchoptions" style="margin: 20px 65px 0 65px">
<legend>Comprador Cache</legend>
<button class="clearbtn" id="cachebutton" style="width: 100%">Clear Cache</button>
</fieldset>
<fieldset class="searchoptions" style="margin: 20px 65px 0 65px">
<legend>Alfresco Share Link</legend>
<div align="center" id="setsharelink">
<input type="url" id="sharelink" size="40" /><br/><br/>
<button class="cancelbtn" onclick="setShareLink(1)">Clear</button> <button class="defaultbtn" onclick="setShareLink(2)">Set Default</button> <button class="okbtn" onclick="setShareLink(3)">Ok</button>
</div>
</fieldset>
<button onclick="$.magnificPopup.close()" style="margin: 20px 10px 0 10px; width: 96%">Close</button>
</section>
<script>
$(document).ready(function () {
loadStyle();
buildMenu();
search();
$('#querybutton').bind('click', function() {
executeQuery($('#querybox').val());
});
$('#searchbutton').bind('click', function() {
search($('#searchbox').val());
});
$('.helpicon').magnificPopup({
type: 'inline',
src: '#helpcmis',
mainClass: 'mfp-fade'
});
$('.helpline').bind('click', function() {
$("#querybox").val(this.firstChild.textContent);
$.magnificPopup.close();
});
$('#searchbox').tipsy({
gravity: 'w',
fade: true,
fallback: 'Double click to see recently searched terms'
});
$('.helpicon').tipsy({
gravity: 'sw',
fade: true,
fallback: 'CMIS Query Tips'
});
});
</script>
</body>
</html>