Rev 1353 | Rev 1417 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1312 | jmachado | 1 | <%@ page import="pt.estgp.estgweb.web.filters.TopImageFilter" %> |
2 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
||
3 | |||
4 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
||
5 | |||
6 | |||
1328 | jmachado | 7 | |
8 | |||
1312 | jmachado | 9 | <% |
10 | String bacoTheme = (String) request.getAttribute("pt_estgp_estgweb_theme"); |
||
11 | if(bacoTheme == null) |
||
12 | bacoTheme = "estg"; |
||
13 | %> |
||
14 | |||
15 | <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/yui/build/menu/assets/skins/sam/menu.css" /> |
||
16 | <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/yui/build/button/assets/skins/sam/button.css" /> |
||
17 | <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/yui/build/fonts/fonts-min.css" /> |
||
18 | <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/yui/build/container/assets/skins/sam/container.css" /> |
||
19 | <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/yui/build/editor/assets/skins/sam/editor.css" /> |
||
20 | |||
21 | <!--OFF CANVAS É PARA METER O BODY ABAIXO DO MENU DESLIZANTE DE TOPO--> |
||
22 | <link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/offcanvas.css"/> |
||
1315 | jmachado | 23 | |
1317 | jmachado | 24 | |
1312 | jmachado | 25 | <script type="text/javascript" src="<%=request.getContextPath()%>/js/functions.js"></script> |
26 | <script type="text/javascript" src="<%=request.getContextPath()%>/js/ajax.js"></script> |
||
27 | <script type="text/javascript" src="<%=request.getContextPath()%>/js/compactedPopup.js"></script> |
||
28 | <!-- |
||
29 | <style> |
||
30 | body |
||
31 | { |
||
32 | background: url('http://www.ist.utl.pt/img/page/cubes.png') |
||
33 | } |
||
34 | </style>--> |
||
35 | <!-- |
||
36 | <link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/js/jquery/style.css"/> |
||
37 | <script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-latest.js"></script> |
||
38 | <script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.tablesorter.js"></script> |
||
39 | --> |
||
40 | |||
41 | <% |
||
42 | String link = (String) request.getAttribute(TopImageFilter.TOP_CSS); |
||
43 | if (link != null) |
||
44 | { |
||
45 | %> |
||
46 | <link type="text/css" rel="stylesheet" href="<%=link%>"/> |
||
47 | <% |
||
48 | } |
||
49 | %> |
||
50 | |||
51 | <script type="text/javascript" language="JavaScript"> |
||
52 | var cal = new CalendarPopup(); |
||
53 | |||
54 | /* //TABLE SORTER |
||
55 | $(document).ready(function() |
||
56 | { |
||
57 | $("#myTable").tablesorter(); |
||
58 | |||
59 | } |
||
60 | );*/ |
||
61 | |||
62 | </script> |
||
63 | |||
64 | |||
65 | |||
66 | <script type="text/javascript" src="<%=request.getContextPath()%>/js/jquerytables/jquery-2.1.4.min.js"></script> |
||
1328 | jmachado | 67 | |
68 | <!--READY FIRST EVENT--> |
||
69 | <script> |
||
70 | $(document).ready( |
||
71 | function() |
||
72 | { |
||
73 | $(".baco-please-wait-target").hide(); |
||
74 | $(".baco-please-wait").html( |
||
75 | "<div class=\"panel panel-info\">" + |
||
76 | "<div class=\"panel-body\">" + |
||
77 | "<p>Por favor aguarde um momento, o sistema está a carregar <img src=\"<%=request.getContextPath()%>/imgs/wait.gif\"/></p>" + |
||
78 | "</div>" + |
||
79 | "</div>"); |
||
1337 | jmachado | 80 | setTimeout("removeBacoWait()", 500); |
1328 | jmachado | 81 | |
82 | } |
||
83 | ); |
||
84 | function removeBacoWait() |
||
85 | { |
||
86 | $(".baco-please-wait").fadeOut(300, function(){ $(this).remove();}); |
||
87 | $(".baco-please-wait-target").fadeIn(300, function(){ $(this).show();}); |
||
88 | } |
||
89 | </script> |
||
90 | <style> |
||
91 | .baco-please-wait-target |
||
92 | { |
||
93 | display: none; |
||
94 | } |
||
1353 | jmachado | 95 | |
1328 | jmachado | 96 | </style> |
97 | <!--READY FIRST EVENT--> |
||
98 | |||
1312 | jmachado | 99 | <script type="text/javascript" src="<%=request.getContextPath()%>/js/jquerytables/jquery.tablesorter.min.js"></script> |
100 | <script type="text/javascript" src="<%=request.getContextPath()%>/js/jquerytables/jquery.tablesorter.widgets.js"></script> |
||
101 | <script type="text/javascript" src="<%=request.getContextPath()%>/js/jquerytables/bootstrap/js/bootstrap.js"></script> |
||
102 | <link rel="stylesheet" href="<%=request.getContextPath()%>/js/jquerytables/bootstrap/css/bootstrap.css" type="text/css"/> |
||
103 | <link rel="stylesheet" href="<%=request.getContextPath()%>/js/jquerytables/bootstrap/icomoon/style.css" type="text/css"/> |
||
104 | <!--<link rel="stylesheet" href="<%=request.getContextPath()%>/js/jquerytables/bootstrap/css/bootstrap-theme.css" type="text/css"/>--> |
||
105 | <link rel="stylesheet" href="<%=request.getContextPath()%>/js/jquerytables/jquerytable/theme.estg.css" type="text/css"/> |
||
106 | <link rel="stylesheet" href="<%=request.getContextPath()%>/js/jquerytables/jquerytable/filter.formatter.css" type="text/css"/> |
||
107 | <!--<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/variables.less"/> |
||
108 | <link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/lavish-bootstrap.css"/>--> |
||
109 | <link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/<%=bacoTheme%>/lavish-bootstrap.css"/> |
||
110 | <link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/<%=bacoTheme%>/variables.scss"/> |
||
111 | |||
112 | |||
113 | |||
1329 | jmachado | 114 | <link href="<%=request.getContextPath()%>/js/bootstrap-toggle-master/css/bootstrap-toggle.min.css" rel="stylesheet"> |
115 | <script src="<%=request.getContextPath()%>/js/bootstrap-toggle-master/js/bootstrap-toggle.min.js"></script> |
||
116 | |||
117 | |||
1312 | jmachado | 118 | <%--SCRIPTS DO CALENDARIO BOOTSTRAP--%> |
119 | <%--<script type="text/javascript" src="/bower_components/jquery/jquery.min.js"></script>--%> |
||
120 | <script type="text/javascript" src="<%=request.getContextPath()%>/js/bower_components/moment/min/moment.min.js"></script> |
||
121 | <script type="text/javascript" src="<%=request.getContextPath()%>/js/bower_components/moment/locale/pt.js"></script> |
||
122 | <%--<script type="text/javascript" src="/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>--%> |
||
123 | <script type="text/javascript" src="<%=request.getContextPath()%>/js/bower_components/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js"></script> |
||
124 | <%--<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css" />--%> |
||
125 | <link rel="stylesheet" href="<%=request.getContextPath()%>/js/bower_components/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css" /> |
||
126 | |||
127 | <script type="text/javascript"> |
||
128 | $(function () { |
||
129 | $('.datetimepicker').datetimepicker({ |
||
130 | locale: 'pt', |
||
131 | format: 'YYYY/MM/DD' |
||
132 | }); |
||
133 | }); |
||
134 | </script> |
||
135 | |||
136 | <script type="text/javascript" language="JavaScript"> |
||
137 | var cal = new CalendarPopup(); |
||
138 | |||
139 | /* |
||
140 | //TABLE SORTER |
||
141 | $(document).ready(function() |
||
142 | { |
||
143 | $("#myTable").tablesorter(); |
||
144 | |||
145 | } |
||
146 | ); |
||
147 | */ |
||
148 | |||
149 | function isBreakpoint( alias ) { |
||
150 | return $('.device-' + alias).is(':visible'); |
||
151 | } |
||
152 | |||
153 | |||
154 | |||
155 | |||
156 | |||
1328 | jmachado | 157 | |
158 | |||
159 | |||
1312 | jmachado | 160 | $(document).ready( |
161 | function(){ |
||
162 | $("#network").hide(); |
||
163 | $("#network2").hide(); |
||
164 | $("#network").mouseleave( |
||
165 | function(){ |
||
166 | $("#network").animate({ |
||
167 | height: 'hide' |
||
168 | }); |
||
169 | } |
||
170 | |||
171 | ); |
||
172 | $("#network2").mouseleave( |
||
173 | function(){ |
||
174 | $("#network2").animate({ |
||
175 | height: 'hide' |
||
176 | }); |
||
177 | } |
||
178 | |||
179 | ); |
||
180 | } |
||
181 | ); |
||
182 | |||
183 | function openNetwork(id){ |
||
184 | |||
185 | $(".slideMenu").each(function() |
||
186 | { |
||
187 | if($(this).attr("id") != id) |
||
188 | { |
||
189 | $(this).animate({ |
||
190 | height: 'hide' |
||
191 | },200); |
||
192 | } |
||
193 | }); |
||
194 | |||
195 | $("#"+id).animate({ |
||
196 | height: 'toggle' |
||
197 | },600); |
||
198 | |||
199 | } |
||
200 | |||
201 | |||
202 | |||
203 | </script> |
||
204 | <script language="javascript"> |
||
205 | |||
206 | function ping() |
||
207 | { |
||
208 | $.ajax({ |
||
209 | url: "<%=request.getContextPath()%>/ping.jsp", |
||
210 | type: "POST", |
||
211 | dataType: "json", |
||
212 | success: function(resposta) { |
||
213 | setTimeout("ping()",10000); |
||
214 | }, |
||
215 | error: function() { |
||
216 | setTimeout("ping()",10000); |
||
217 | } |
||
218 | }); |
||
219 | |||
220 | } |
||
221 | $(document).ready(function() |
||
1366 | jmachado | 222 | { |
1312 | jmachado | 223 | |
1366 | jmachado | 224 | $(".tablesorterfiltered").wrap( "<div class=\"table-responsive\"></div>" ) |
225 | evaluateTableSorters(); |
||
1312 | jmachado | 226 | |
1366 | jmachado | 227 | } |
1312 | jmachado | 228 | |
229 | ); |
||
230 | |||
1327 | jmachado | 231 | function evaluateTableSorters() |
232 | { |
||
233 | evaluateTableSortersInside(""); |
||
234 | } |
||
235 | function evaluateTableSortersInside(insideDiv) |
||
236 | { |
||
237 | if($(insideDiv + " #myTable")) |
||
1312 | jmachado | 238 | { |
1327 | jmachado | 239 | $(insideDiv + " #myTable").tablesorter({ |
1312 | jmachado | 240 | theme: 'blue', |
241 | |||
242 | |||
243 | sortMultiSortKey: 'altKey', |
||
244 | //sortList: [[0,0]], |
||
245 | widgets: ["zebra","filter"], |
||
246 | |||
247 | ignoreCase: false, |
||
248 | widthFixed : true, |
||
249 | widgetOptions : {filter_reset : 'button.reset',filter_columnFilters : true}, |
||
250 | textExtraction: function(node) { |
||
251 | // extract data from markup and return it |
||
252 | if($(node).find(':input').size()>0) |
||
253 | { |
||
254 | var values = $(node).find(":input").map(function() { |
||
255 | return $(this).val() |
||
256 | }).get().join(","); |
||
257 | |||
258 | |||
259 | return values; |
||
260 | } |
||
261 | return $(node).text(); |
||
262 | }, |
||
263 | widgetOptions : { |
||
264 | |||
265 | filter_excludeFilter : { |
||
266 | // target a column by class name or column index (zero-based) |
||
267 | '.filter-false' : 'range' |
||
268 | } |
||
269 | |||
270 | } |
||
271 | |||
272 | /* , |
||
273 | |||
274 | widgetOptions : { |
||
275 | |||
276 | // filter_anyMatch options was removed in v2.15; it has been replaced by the filter_external option |
||
277 | |||
278 | // If there are child rows in the table (rows with class name from "cssChildRow" option) |
||
279 | // and this option is true and a match is found anywhere in the child row, then it will make that row |
||
280 | // visible; default is false |
||
281 | filter_childRows : false, |
||
282 | |||
283 | // if true, filter child row content by column; filter_childRows must also be true |
||
284 | filter_childByColumn : false, |
||
285 | |||
286 | // if true, a filter will be added to the top of each table column; |
||
287 | // disabled by using -> headers: { 1: { filter: false } } OR add class="filter-false" |
||
288 | // if you set this to false, make sure you perform a search using the second method below |
||
289 | filter_columnFilters : true, |
||
290 | |||
291 | // if true, allows using "#:{query}" in AnyMatch searches (column:query; added v2.20.0) |
||
292 | filter_columnAnyMatch: true, |
||
293 | |||
294 | // extra css class name (string or array) added to the filter element (input or select) |
||
295 | filter_cellFilter : '', |
||
296 | |||
297 | // extra css class name(s) applied to the table row containing the filters & the inputs within that row |
||
298 | // this option can either be a string (class applied to all filters) or an array (class applied to indexed filter) |
||
299 | filter_cssFilter : '', // or [] |
||
300 | |||
301 | // add a default column filter type "~{query}" to make fuzzy searches default; |
||
302 | // "{q1} AND {q2}" to make all searches use a logical AND. |
||
303 | filter_defaultFilter : {}, |
||
304 | |||
305 | // filters to exclude, per column |
||
306 | filter_excludeFilter : {}, |
||
307 | |||
308 | // jQuery selector (or object) pointing to an input to be used to match the contents of any column |
||
309 | // please refer to the filter-any-match demo for limitations - new in v2.15 |
||
310 | filter_external : '', |
||
311 | |||
312 | // class added to filtered rows (rows that are not showing); needed by pager plugin |
||
313 | filter_filteredRow : 'filtered', |
||
314 | |||
315 | // add custom filter elements to the filter row |
||
316 | // see the filter formatter demos for more specifics |
||
317 | filter_formatter : null, |
||
318 | |||
319 | // add custom filter functions using this option |
||
320 | // see the filter widget custom demo for more specifics on how to use this option |
||
321 | filter_functions : null, |
||
322 | |||
323 | // hide filter row when table is empty |
||
324 | filter_hideEmpty : true, |
||
325 | |||
326 | // if true, filters are collapsed initially, but can be revealed by hovering over the grey bar immediately |
||
327 | // below the header row. Additionally, tabbing through the document will open the filter row when an input gets focus |
||
328 | filter_hideFilters : true, |
||
329 | |||
330 | // Set this option to false to make the searches case sensitive |
||
331 | filter_ignoreCase : true, |
||
332 | |||
333 | // if true, search column content while the user types (with a delay) |
||
334 | filter_liveSearch : true, |
||
335 | |||
336 | // a header with a select dropdown & this class name will only show available (visible) options within that drop down. |
||
337 | |||
338 | |||
339 | // default placeholder text (overridden by any header "data-placeholder" setting) |
||
340 | filter_placeholder : { search : '', select : '' }, |
||
341 | |||
342 | // jQuery selector string of an element used to reset the filters |
||
343 | filter_reset : 'button.reset', |
||
344 | |||
345 | // Use the $.tablesorter.storage utility to save the most recent filters (default setting is false) |
||
346 | filter_saveFilters : true, |
||
347 | |||
348 | // Delay in milliseconds before the filter widget starts searching; This option prevents searching for |
||
349 | // every character while typing and should make searching large tables faster. |
||
350 | filter_searchDelay : 300, |
||
351 | |||
352 | // allow searching through already filtered rows in special circumstances; will speed up searching in large tables if true |
||
353 | filter_searchFiltered: true, |
||
354 | |||
355 | // include a function to return an array of values to be added to the column filter select |
||
356 | filter_selectSource : null, |
||
357 | |||
358 | // if true, server-side filtering should be performed because client-side filtering will be disabled, but |
||
359 | // the ui and events will still be used. |
||
360 | filter_serversideFiltering : false, |
||
361 | |||
362 | // Set this option to true to use the filter to find text from the start of the column |
||
363 | // So typing in "a" will find "albert" but not "frank", both have a's; default is false |
||
364 | filter_startsWith : false, |
||
365 | |||
366 | // Filter using parsed content for ALL columns |
||
367 | // be careful on using this on date columns as the date is parsed and stored as time in seconds |
||
368 | filter_useParsedData : false, |
||
369 | |||
370 | // data attribute in the header cell that contains the default filter value |
||
371 | filter_defaultAttrib : 'data-value', |
||
372 | |||
373 | // filter_selectSource array text left of the separator is added to the option value, right into the option text |
||
374 | filter_selectSourceSeparator : '|' |
||
375 | |||
376 | }*/ |
||
377 | } |
||
378 | ); |
||
379 | } |
||
380 | |||
1327 | jmachado | 381 | if($(insideDiv + " #myTable2")) |
1312 | jmachado | 382 | { |
1327 | jmachado | 383 | $(insideDiv + " #myTable2").tablesorter({ |
1312 | jmachado | 384 | theme: 'blue', |
385 | sortMultiSortKey: 'altKey', |
||
386 | //sortList: [[0,0]], |
||
387 | widgets: ["zebra","filter"], |
||
388 | ignoreCase: false, |
||
389 | widthFixed : true, |
||
390 | widgetOptions : {filter_reset : 'button.reset',filter_columnFilters : true, |
||
391 | filter_excludeFilter : { |
||
392 | // target a column by class name or column index (zero-based) |
||
393 | '.filter-false' : 'range' |
||
394 | }}, |
||
395 | textExtraction: function(node) { |
||
396 | // extract data from markup and return it |
||
397 | if($(node).find(':input').size()>0) |
||
398 | { |
||
399 | var values = $(node).find(":input").map(function() { |
||
400 | return $(this).val() |
||
401 | }).get().join(","); |
||
402 | |||
403 | |||
404 | return values; |
||
405 | } |
||
406 | return $(node).text(); |
||
407 | } |
||
408 | } |
||
409 | ); |
||
410 | } |
||
411 | |||
1327 | jmachado | 412 | if($(insideDiv + " .tablesortersimple")) |
1312 | jmachado | 413 | { |
1327 | jmachado | 414 | $(insideDiv + " .tablesortersimple").tablesorter({ |
1312 | jmachado | 415 | theme: 'blue', |
416 | sortMultiSortKey: 'altKey', |
||
417 | //sortList: [[0,0]], |
||
418 | widgets: ["zebra","filter"], |
||
419 | ignoreCase: false, |
||
420 | widthFixed : true, |
||
421 | widgetOptions : {filter_reset : 'button.reset',filter_columnFilters : true, |
||
422 | |||
423 | filter_excludeFilter : { |
||
424 | // target a column by class name or column index (zero-based) |
||
425 | '.filter-false' : 'range' |
||
426 | } |
||
427 | }, |
||
428 | textExtraction: function(node) { |
||
429 | // extract data from markup and return it |
||
430 | if($(node).find(':input').size()>0) |
||
431 | { |
||
432 | var values = $(node).find(":input").map(function() { |
||
433 | return $(this).val() |
||
434 | }).get().join(","); |
||
435 | |||
436 | |||
437 | return values; |
||
438 | } |
||
439 | return $(node).text(); |
||
440 | } |
||
441 | } |
||
442 | ); |
||
443 | } |
||
444 | /* |
||
445 | if($(".tablesorterfiltered")) |
||
446 | { |
||
447 | $(".tablesorterfiltered").tablesorter({ |
||
448 | theme: 'blue', |
||
449 | |||
450 | |||
451 | sortMultiSortKey: 'altKey', |
||
452 | //sortList: [[0,0]], |
||
453 | widgets: ["zebra","filter"], |
||
454 | |||
455 | ignoreCase: false, |
||
456 | widthFixed : true, |
||
457 | widgetOptions : {filter_reset : 'button.reset',filter_columnFilters : true}, |
||
458 | textExtraction: function(node) { |
||
459 | // extract data from markup and return it |
||
460 | if($(node).find(':input').size()>0) |
||
461 | { |
||
462 | var values = $(node).find(":input").map(function() { |
||
463 | return $(this).val() |
||
464 | }).get().join(","); |
||
465 | |||
466 | |||
467 | return values; |
||
468 | } |
||
469 | return $(node).text(); |
||
470 | } |
||
471 | } |
||
472 | ); |
||
473 | }*/ |
||
1327 | jmachado | 474 | if($(insideDiv + " .tablesorterfiltered")) |
1312 | jmachado | 475 | { |
1327 | jmachado | 476 | $(insideDiv + " .tablesorterfiltered").tablesorter({ |
1312 | jmachado | 477 | theme: 'blue', |
478 | |||
479 | |||
480 | sortMultiSortKey: 'altKey', |
||
481 | //sortList: [[0,0]], |
||
482 | widgets: ["zebra","filter"], |
||
483 | |||
484 | ignoreCase: false, |
||
485 | widthFixed : true, |
||
486 | widgetOptions : {filter_reset : 'button.reset',filter_columnFilters : true, |
||
487 | |||
488 | filter_excludeFilter : { |
||
489 | // target a column by class name or column index (zero-based) |
||
490 | '.filter-false' : 'range' |
||
491 | |||
492 | |||
493 | } |
||
494 | }, |
||
495 | textExtraction: function(node) { |
||
496 | // extract data from markup and return it |
||
497 | if($(node).find(':input').size()>0) |
||
498 | { |
||
499 | var values = $(node).find(":input").map(function() { |
||
500 | return $(this).val() |
||
501 | }).get().join(","); |
||
502 | |||
503 | |||
504 | return values; |
||
505 | } |
||
506 | return $(node).text(); |
||
507 | } |
||
508 | } |
||
509 | ); |
||
510 | } |
||
511 | |||
512 | |||
513 | |||
514 | // External search |
||
515 | // buttons set up like this: |
||
516 | // <button type="button" data-filter-column="4" data-filter-text="2?%">Saved Search</button> |
||
1327 | jmachado | 517 | $(insideDiv + 'button[data-filter-column]').click(function(){ |
1312 | jmachado | 518 | /*** first method *** data-filter-column="1" data-filter-text="!son" |
519 | add search value to Discount column (zero based index) input */ |
||
520 | var filters = [], |
||
521 | $t = $(this), |
||
522 | col = $t.data('filter-column'), // zero-based index |
||
523 | txt = $t.data('filter-text') || $t.text(); // text to add to filter |
||
524 | |||
525 | filters[col] = txt; |
||
526 | // using "table.hasFilters" here to make sure we aren't targeting a sticky header |
||
1327 | jmachado | 527 | if($(insideDiv + ' #myTable')) |
528 | $.tablesorter.setFilters( $(insideDiv + ' #myTable'), filters, true ); // new v2.9 |
||
529 | if($(insideDiv + ' #myTable2')) |
||
530 | $.tablesorter.setFilters( $(insideDiv + ' #myTable2'), filters, true ); // new v2.9 |
||
531 | if($(insideDiv + ' .tablesorterfiltered')) |
||
532 | $.tablesorter.setFilters( $(insideDiv + ' .tablesorterfiltered'), filters, true ); // new v2.9 |
||
1312 | jmachado | 533 | |
534 | /* |
||
535 | if($('.tablesorterfiltered')) |
||
536 | $.tablesorter.setFilters( $('.tablesorterfiltered'), filters, true ); // new v2.9 |
||
537 | */ |
||
538 | /** old method (prior to tablsorter v2.9 *** |
||
539 | var filters = $('table.tablesorter').find('input.tablesorter-filter'); |
||
540 | filters.val(''); // clear all filters |
||
541 | filters.eq(col).val(txt).trigger('search', false); |
||
542 | ******/ |
||
543 | |||
544 | /*** second method *** |
||
545 | this method bypasses the filter inputs, so the "filter_columnFilters" |
||
546 | option can be set to false (no column filters showing) |
||
547 | ******/ |
||
548 | /* |
||
549 | var columns = []; |
||
550 | columns[5] = '2?%'; // or define the array this way [ '', '', '', '', '', '2?%' ] |
||
551 | $('table').trigger('search', [ columns ]); |
||
552 | */ |
||
553 | |||
554 | return false; |
||
555 | }); |
||
556 | } |
||
557 | </script> |
||
558 | <style> |
||
559 | th.headerSortUp { |
||
560 | background-image: url(<%=request.getContextPath()%>/js/jquerytables/jquerytable/asc.gif); |
||
561 | background-color: #3399FF; |
||
562 | } |
||
563 | th.headerSortDown { |
||
564 | background-image: url(<%=request.getContextPath()%>/js/jquerytables/jquerytable/desc.gif); |
||
565 | background-color: #3399FF; |
||
566 | } |
||
567 | .dorsalActivado span, .dorsal span |
||
568 | { |
||
569 | text-align: center; |
||
570 | background-color: white; |
||
571 | padding: 3px; |
||
572 | border: 1px solid black; |
||
573 | font-weight: bold; |
||
574 | white-space: nowrap; |
||
575 | } |
||
576 | |||
577 | .tablesorterfiltered thead .disabled {display: none} |
||
578 | |||
579 | </style> |
||
580 | |||
581 | |||
582 | |||
583 | |||
584 | <%--SCRIPTS DO EDITOR DE HTML 5--%> |
||
585 | |||
1314 | jmachado | 586 | <!-- |
587 | |||
1312 | jmachado | 588 | <link rel="apple-touch-icon" href="//mindmup.s3.amazonaws.com/lib/img/apple-touch-icon.png" /> |
1314 | jmachado | 589 | --> |
1312 | jmachado | 590 | <link href="<%=request.getContextPath()%>/js/bootstrap-wysiwyg-master/external/google-code-prettify/prettify.css" rel="stylesheet"> |
591 | <!--<link href="<%=request.getContextPath()%>/js/bootstrap-wysiwyg-master/netdna/bootstrap-combined.no-icons.min.css" rel="stylesheet">--> |
||
592 | <%--<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-responsive.min.css" rel="stylesheet">--%> |
||
1315 | jmachado | 593 | <link href="<%=request.getContextPath()%>/js/bootstrap-wysiwyg-master/netdna/font-awesome.css" rel="stylesheet"> |
1312 | jmachado | 594 | <%--<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>--%> |
595 | <script src="<%=request.getContextPath()%>/js/bootstrap-wysiwyg-master/external/jquery.hotkeys.js"></script> |
||
596 | <%--<script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>--%> |
||
597 | <script src="<%=request.getContextPath()%>/js/bootstrap-wysiwyg-master/external/google-code-prettify/prettify.js"></script> |
||
598 | <link href="<%=request.getContextPath()%>/js/bootstrap-wysiwyg-master/index.css" rel="stylesheet"> |
||
599 | <script src="<%=request.getContextPath()%>/js/bootstrap-wysiwyg-master/bootstrap-wysiwyg.js"></script> |
||
600 | |||
601 | |||
602 | |||
603 | |||
604 | |||
605 | <script> |
||
606 | |||
607 | function initToolbarBootstrapBindings() { |
||
608 | var fonts = ['Serif', 'Sans', 'Arial', 'Arial Black', 'Courier', |
||
609 | 'Courier New', 'Comic Sans MS', 'Helvetica', 'Impact', 'Lucida Grande', 'Lucida Sans', 'Tahoma', 'Times', |
||
610 | 'Times New Roman', 'Verdana'], |
||
611 | fontTarget = $('[title=Font]').siblings('.dropdown-menu'); |
||
612 | $.each(fonts, function (idx, fontName) { |
||
613 | fontTarget.append($('<li><a data-edit="fontName ' + fontName +'" style="font-family:\''+ fontName +'\'">'+fontName + '</a></li>')); |
||
614 | }); |
||
615 | $('a[title]').tooltip({container:'body'}); |
||
616 | $('.dropdown-menu input').click(function() {return false;}) |
||
617 | .change(function () {$(this).parent('.dropdown-menu').siblings('.dropdown-toggle').dropdown('toggle');}) |
||
618 | .keydown('esc', function () {this.value='';$(this).change();}); |
||
619 | |||
620 | $('[data-role=magic-overlay]').each(function () { |
||
621 | var overlay = $(this), target = $(overlay.data('target')); |
||
622 | overlay.css('opacity', 0).css('position', 'absolute').offset(target.offset()).width(target.outerWidth()).height(target.outerHeight()); |
||
623 | }); |
||
624 | if ("onwebkitspeechchange" in document.createElement("input")) { |
||
625 | var editorOffset = $('#editor').offset(); |
||
626 | $('#voiceBtn').css('position','absolute').offset({top: editorOffset.top, left: editorOffset.left+$('#editor').innerWidth()-35}); |
||
627 | } else { |
||
628 | $('#voiceBtn').hide(); |
||
629 | } |
||
630 | }; |
||
631 | function showErrorAlert (reason, detail) { |
||
632 | var msg=''; |
||
633 | if (reason==='unsupported-file-type') { msg = "Unsupported format " +detail; } |
||
634 | else { |
||
635 | console.log("error uploading file", reason, detail); |
||
636 | } |
||
637 | $('<div class="alert"> <button type="button" class="close" data-dismiss="alert">×</button>'+ |
||
638 | '<strong>File upload error</strong> '+msg+' </div>').prependTo('#alerts'); |
||
639 | }; |
||
1317 | jmachado | 640 | |
641 | |||
642 | |||
643 | //Wysywyg Editor Toolbar |
||
1312 | jmachado | 644 | $(document).ready(function(){ |
645 | initToolbarBootstrapBindings(); |
||
646 | $('#editor').wysiwyg({ fileUploadError: showErrorAlert} ); |
||
647 | window.prettyPrint && prettyPrint(); |
||
648 | }); |
||
649 | |||
650 | |||
651 | /****** |
||
652 | * Function for Files Version service data.jsp |
||
653 | * |
||
654 | */ |
||
655 | function submitDataVersionForm() |
||
656 | { |
||
657 | $.post( "<%=request.getContextPath()%>/user/data.jsp?id=" + $("#filesVersionsId").val(), function( data ) { |
||
658 | $("#contentVersions").html($( data ).find("#contentVersions").html()); |
||
659 | evaluateTableSorters(); |
||
660 | }); |
||
661 | } |
||
662 | |||
663 | function invoqueDataVersionForm(id) |
||
664 | { |
||
665 | $("#filesVersionsId").val(id); |
||
666 | submitDataVersionForm(); |
||
667 | $('#historyFilesModal').modal({ |
||
668 | show: 'true' |
||
669 | }); |
||
670 | } |
||
671 | |||
672 | </script> |
||
1328 | jmachado | 673 | |
1315 | jmachado | 674 | <%--O nosso estilo fica aqui para se sobrepor--%> |
1320 | jmachado | 675 | <link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/style.css"/> |
1315 | jmachado | 676 | <link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/<%=bacoTheme%>/style.css"/> |
1317 | jmachado | 677 | <link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/<%=bacoTheme%>/stylePublicPortal.css"/> |
678 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
||
679 | <meta charset="UTF-8"> |