Rev 1337 | Rev 1366 | 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() |
||
222 | { |
||
223 | |||
224 | return evaluateTableSorters(); |
||
225 | |||
226 | } |
||
227 | |||
228 | ); |
||
229 | |||
1327 | jmachado | 230 | function evaluateTableSorters() |
231 | { |
||
232 | evaluateTableSortersInside(""); |
||
233 | } |
||
234 | function evaluateTableSortersInside(insideDiv) |
||
235 | { |
||
236 | if($(insideDiv + " #myTable")) |
||
1312 | jmachado | 237 | { |
1327 | jmachado | 238 | $(insideDiv + " #myTable").tablesorter({ |
1312 | jmachado | 239 | theme: 'blue', |
240 | |||
241 | |||
242 | sortMultiSortKey: 'altKey', |
||
243 | //sortList: [[0,0]], |
||
244 | widgets: ["zebra","filter"], |
||
245 | |||
246 | ignoreCase: false, |
||
247 | widthFixed : true, |
||
248 | widgetOptions : {filter_reset : 'button.reset',filter_columnFilters : true}, |
||
249 | textExtraction: function(node) { |
||
250 | // extract data from markup and return it |
||
251 | if($(node).find(':input').size()>0) |
||
252 | { |
||
253 | var values = $(node).find(":input").map(function() { |
||
254 | return $(this).val() |
||
255 | }).get().join(","); |
||
256 | |||
257 | |||
258 | return values; |
||
259 | } |
||
260 | return $(node).text(); |
||
261 | }, |
||
262 | widgetOptions : { |
||
263 | |||
264 | filter_excludeFilter : { |
||
265 | // target a column by class name or column index (zero-based) |
||
266 | '.filter-false' : 'range' |
||
267 | } |
||
268 | |||
269 | } |
||
270 | |||
271 | /* , |
||
272 | |||
273 | widgetOptions : { |
||
274 | |||
275 | // filter_anyMatch options was removed in v2.15; it has been replaced by the filter_external option |
||
276 | |||
277 | // If there are child rows in the table (rows with class name from "cssChildRow" option) |
||
278 | // and this option is true and a match is found anywhere in the child row, then it will make that row |
||
279 | // visible; default is false |
||
280 | filter_childRows : false, |
||
281 | |||
282 | // if true, filter child row content by column; filter_childRows must also be true |
||
283 | filter_childByColumn : false, |
||
284 | |||
285 | // if true, a filter will be added to the top of each table column; |
||
286 | // disabled by using -> headers: { 1: { filter: false } } OR add class="filter-false" |
||
287 | // if you set this to false, make sure you perform a search using the second method below |
||
288 | filter_columnFilters : true, |
||
289 | |||
290 | // if true, allows using "#:{query}" in AnyMatch searches (column:query; added v2.20.0) |
||
291 | filter_columnAnyMatch: true, |
||
292 | |||
293 | // extra css class name (string or array) added to the filter element (input or select) |
||
294 | filter_cellFilter : '', |
||
295 | |||
296 | // extra css class name(s) applied to the table row containing the filters & the inputs within that row |
||
297 | // this option can either be a string (class applied to all filters) or an array (class applied to indexed filter) |
||
298 | filter_cssFilter : '', // or [] |
||
299 | |||
300 | // add a default column filter type "~{query}" to make fuzzy searches default; |
||
301 | // "{q1} AND {q2}" to make all searches use a logical AND. |
||
302 | filter_defaultFilter : {}, |
||
303 | |||
304 | // filters to exclude, per column |
||
305 | filter_excludeFilter : {}, |
||
306 | |||
307 | // jQuery selector (or object) pointing to an input to be used to match the contents of any column |
||
308 | // please refer to the filter-any-match demo for limitations - new in v2.15 |
||
309 | filter_external : '', |
||
310 | |||
311 | // class added to filtered rows (rows that are not showing); needed by pager plugin |
||
312 | filter_filteredRow : 'filtered', |
||
313 | |||
314 | // add custom filter elements to the filter row |
||
315 | // see the filter formatter demos for more specifics |
||
316 | filter_formatter : null, |
||
317 | |||
318 | // add custom filter functions using this option |
||
319 | // see the filter widget custom demo for more specifics on how to use this option |
||
320 | filter_functions : null, |
||
321 | |||
322 | // hide filter row when table is empty |
||
323 | filter_hideEmpty : true, |
||
324 | |||
325 | // if true, filters are collapsed initially, but can be revealed by hovering over the grey bar immediately |
||
326 | // below the header row. Additionally, tabbing through the document will open the filter row when an input gets focus |
||
327 | filter_hideFilters : true, |
||
328 | |||
329 | // Set this option to false to make the searches case sensitive |
||
330 | filter_ignoreCase : true, |
||
331 | |||
332 | // if true, search column content while the user types (with a delay) |
||
333 | filter_liveSearch : true, |
||
334 | |||
335 | // a header with a select dropdown & this class name will only show available (visible) options within that drop down. |
||
336 | |||
337 | |||
338 | // default placeholder text (overridden by any header "data-placeholder" setting) |
||
339 | filter_placeholder : { search : '', select : '' }, |
||
340 | |||
341 | // jQuery selector string of an element used to reset the filters |
||
342 | filter_reset : 'button.reset', |
||
343 | |||
344 | // Use the $.tablesorter.storage utility to save the most recent filters (default setting is false) |
||
345 | filter_saveFilters : true, |
||
346 | |||
347 | // Delay in milliseconds before the filter widget starts searching; This option prevents searching for |
||
348 | // every character while typing and should make searching large tables faster. |
||
349 | filter_searchDelay : 300, |
||
350 | |||
351 | // allow searching through already filtered rows in special circumstances; will speed up searching in large tables if true |
||
352 | filter_searchFiltered: true, |
||
353 | |||
354 | // include a function to return an array of values to be added to the column filter select |
||
355 | filter_selectSource : null, |
||
356 | |||
357 | // if true, server-side filtering should be performed because client-side filtering will be disabled, but |
||
358 | // the ui and events will still be used. |
||
359 | filter_serversideFiltering : false, |
||
360 | |||
361 | // Set this option to true to use the filter to find text from the start of the column |
||
362 | // So typing in "a" will find "albert" but not "frank", both have a's; default is false |
||
363 | filter_startsWith : false, |
||
364 | |||
365 | // Filter using parsed content for ALL columns |
||
366 | // be careful on using this on date columns as the date is parsed and stored as time in seconds |
||
367 | filter_useParsedData : false, |
||
368 | |||
369 | // data attribute in the header cell that contains the default filter value |
||
370 | filter_defaultAttrib : 'data-value', |
||
371 | |||
372 | // filter_selectSource array text left of the separator is added to the option value, right into the option text |
||
373 | filter_selectSourceSeparator : '|' |
||
374 | |||
375 | }*/ |
||
376 | } |
||
377 | ); |
||
378 | } |
||
379 | |||
1327 | jmachado | 380 | if($(insideDiv + " #myTable2")) |
1312 | jmachado | 381 | { |
1327 | jmachado | 382 | $(insideDiv + " #myTable2").tablesorter({ |
1312 | jmachado | 383 | theme: 'blue', |
384 | sortMultiSortKey: 'altKey', |
||
385 | //sortList: [[0,0]], |
||
386 | widgets: ["zebra","filter"], |
||
387 | ignoreCase: false, |
||
388 | widthFixed : true, |
||
389 | widgetOptions : {filter_reset : 'button.reset',filter_columnFilters : true, |
||
390 | filter_excludeFilter : { |
||
391 | // target a column by class name or column index (zero-based) |
||
392 | '.filter-false' : 'range' |
||
393 | }}, |
||
394 | textExtraction: function(node) { |
||
395 | // extract data from markup and return it |
||
396 | if($(node).find(':input').size()>0) |
||
397 | { |
||
398 | var values = $(node).find(":input").map(function() { |
||
399 | return $(this).val() |
||
400 | }).get().join(","); |
||
401 | |||
402 | |||
403 | return values; |
||
404 | } |
||
405 | return $(node).text(); |
||
406 | } |
||
407 | } |
||
408 | ); |
||
409 | } |
||
410 | |||
1327 | jmachado | 411 | if($(insideDiv + " .tablesortersimple")) |
1312 | jmachado | 412 | { |
1327 | jmachado | 413 | $(insideDiv + " .tablesortersimple").tablesorter({ |
1312 | jmachado | 414 | theme: 'blue', |
415 | sortMultiSortKey: 'altKey', |
||
416 | //sortList: [[0,0]], |
||
417 | widgets: ["zebra","filter"], |
||
418 | ignoreCase: false, |
||
419 | widthFixed : true, |
||
420 | widgetOptions : {filter_reset : 'button.reset',filter_columnFilters : true, |
||
421 | |||
422 | filter_excludeFilter : { |
||
423 | // target a column by class name or column index (zero-based) |
||
424 | '.filter-false' : 'range' |
||
425 | } |
||
426 | }, |
||
427 | textExtraction: function(node) { |
||
428 | // extract data from markup and return it |
||
429 | if($(node).find(':input').size()>0) |
||
430 | { |
||
431 | var values = $(node).find(":input").map(function() { |
||
432 | return $(this).val() |
||
433 | }).get().join(","); |
||
434 | |||
435 | |||
436 | return values; |
||
437 | } |
||
438 | return $(node).text(); |
||
439 | } |
||
440 | } |
||
441 | ); |
||
442 | } |
||
443 | /* |
||
444 | if($(".tablesorterfiltered")) |
||
445 | { |
||
446 | $(".tablesorterfiltered").tablesorter({ |
||
447 | theme: 'blue', |
||
448 | |||
449 | |||
450 | sortMultiSortKey: 'altKey', |
||
451 | //sortList: [[0,0]], |
||
452 | widgets: ["zebra","filter"], |
||
453 | |||
454 | ignoreCase: false, |
||
455 | widthFixed : true, |
||
456 | widgetOptions : {filter_reset : 'button.reset',filter_columnFilters : true}, |
||
457 | textExtraction: function(node) { |
||
458 | // extract data from markup and return it |
||
459 | if($(node).find(':input').size()>0) |
||
460 | { |
||
461 | var values = $(node).find(":input").map(function() { |
||
462 | return $(this).val() |
||
463 | }).get().join(","); |
||
464 | |||
465 | |||
466 | return values; |
||
467 | } |
||
468 | return $(node).text(); |
||
469 | } |
||
470 | } |
||
471 | ); |
||
472 | }*/ |
||
1327 | jmachado | 473 | if($(insideDiv + " .tablesorterfiltered")) |
1312 | jmachado | 474 | { |
1327 | jmachado | 475 | $(insideDiv + " .tablesorterfiltered").tablesorter({ |
1312 | jmachado | 476 | theme: 'blue', |
477 | |||
478 | |||
479 | sortMultiSortKey: 'altKey', |
||
480 | //sortList: [[0,0]], |
||
481 | widgets: ["zebra","filter"], |
||
482 | |||
483 | ignoreCase: false, |
||
484 | widthFixed : true, |
||
485 | widgetOptions : {filter_reset : 'button.reset',filter_columnFilters : true, |
||
486 | |||
487 | filter_excludeFilter : { |
||
488 | // target a column by class name or column index (zero-based) |
||
489 | '.filter-false' : 'range' |
||
490 | |||
491 | |||
492 | } |
||
493 | }, |
||
494 | textExtraction: function(node) { |
||
495 | // extract data from markup and return it |
||
496 | if($(node).find(':input').size()>0) |
||
497 | { |
||
498 | var values = $(node).find(":input").map(function() { |
||
499 | return $(this).val() |
||
500 | }).get().join(","); |
||
501 | |||
502 | |||
503 | return values; |
||
504 | } |
||
505 | return $(node).text(); |
||
506 | } |
||
507 | } |
||
508 | ); |
||
509 | } |
||
510 | |||
511 | |||
512 | |||
513 | // External search |
||
514 | // buttons set up like this: |
||
515 | // <button type="button" data-filter-column="4" data-filter-text="2?%">Saved Search</button> |
||
1327 | jmachado | 516 | $(insideDiv + 'button[data-filter-column]').click(function(){ |
1312 | jmachado | 517 | /*** first method *** data-filter-column="1" data-filter-text="!son" |
518 | add search value to Discount column (zero based index) input */ |
||
519 | var filters = [], |
||
520 | $t = $(this), |
||
521 | col = $t.data('filter-column'), // zero-based index |
||
522 | txt = $t.data('filter-text') || $t.text(); // text to add to filter |
||
523 | |||
524 | filters[col] = txt; |
||
525 | // using "table.hasFilters" here to make sure we aren't targeting a sticky header |
||
1327 | jmachado | 526 | if($(insideDiv + ' #myTable')) |
527 | $.tablesorter.setFilters( $(insideDiv + ' #myTable'), filters, true ); // new v2.9 |
||
528 | if($(insideDiv + ' #myTable2')) |
||
529 | $.tablesorter.setFilters( $(insideDiv + ' #myTable2'), filters, true ); // new v2.9 |
||
530 | if($(insideDiv + ' .tablesorterfiltered')) |
||
531 | $.tablesorter.setFilters( $(insideDiv + ' .tablesorterfiltered'), filters, true ); // new v2.9 |
||
1312 | jmachado | 532 | |
533 | /* |
||
534 | if($('.tablesorterfiltered')) |
||
535 | $.tablesorter.setFilters( $('.tablesorterfiltered'), filters, true ); // new v2.9 |
||
536 | */ |
||
537 | /** old method (prior to tablsorter v2.9 *** |
||
538 | var filters = $('table.tablesorter').find('input.tablesorter-filter'); |
||
539 | filters.val(''); // clear all filters |
||
540 | filters.eq(col).val(txt).trigger('search', false); |
||
541 | ******/ |
||
542 | |||
543 | /*** second method *** |
||
544 | this method bypasses the filter inputs, so the "filter_columnFilters" |
||
545 | option can be set to false (no column filters showing) |
||
546 | ******/ |
||
547 | /* |
||
548 | var columns = []; |
||
549 | columns[5] = '2?%'; // or define the array this way [ '', '', '', '', '', '2?%' ] |
||
550 | $('table').trigger('search', [ columns ]); |
||
551 | */ |
||
552 | |||
553 | return false; |
||
554 | }); |
||
555 | } |
||
556 | </script> |
||
557 | <style> |
||
558 | th.headerSortUp { |
||
559 | background-image: url(<%=request.getContextPath()%>/js/jquerytables/jquerytable/asc.gif); |
||
560 | background-color: #3399FF; |
||
561 | } |
||
562 | th.headerSortDown { |
||
563 | background-image: url(<%=request.getContextPath()%>/js/jquerytables/jquerytable/desc.gif); |
||
564 | background-color: #3399FF; |
||
565 | } |
||
566 | .dorsalActivado span, .dorsal span |
||
567 | { |
||
568 | text-align: center; |
||
569 | background-color: white; |
||
570 | padding: 3px; |
||
571 | border: 1px solid black; |
||
572 | font-weight: bold; |
||
573 | white-space: nowrap; |
||
574 | } |
||
575 | |||
576 | .tablesorterfiltered thead .disabled {display: none} |
||
577 | |||
578 | </style> |
||
579 | |||
580 | |||
581 | |||
582 | |||
583 | <%--SCRIPTS DO EDITOR DE HTML 5--%> |
||
584 | |||
1314 | jmachado | 585 | <!-- |
586 | |||
1312 | jmachado | 587 | <link rel="apple-touch-icon" href="//mindmup.s3.amazonaws.com/lib/img/apple-touch-icon.png" /> |
1314 | jmachado | 588 | --> |
1312 | jmachado | 589 | <link href="<%=request.getContextPath()%>/js/bootstrap-wysiwyg-master/external/google-code-prettify/prettify.css" rel="stylesheet"> |
590 | <!--<link href="<%=request.getContextPath()%>/js/bootstrap-wysiwyg-master/netdna/bootstrap-combined.no-icons.min.css" rel="stylesheet">--> |
||
591 | <%--<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-responsive.min.css" rel="stylesheet">--%> |
||
1315 | jmachado | 592 | <link href="<%=request.getContextPath()%>/js/bootstrap-wysiwyg-master/netdna/font-awesome.css" rel="stylesheet"> |
1312 | jmachado | 593 | <%--<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>--%> |
594 | <script src="<%=request.getContextPath()%>/js/bootstrap-wysiwyg-master/external/jquery.hotkeys.js"></script> |
||
595 | <%--<script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>--%> |
||
596 | <script src="<%=request.getContextPath()%>/js/bootstrap-wysiwyg-master/external/google-code-prettify/prettify.js"></script> |
||
597 | <link href="<%=request.getContextPath()%>/js/bootstrap-wysiwyg-master/index.css" rel="stylesheet"> |
||
598 | <script src="<%=request.getContextPath()%>/js/bootstrap-wysiwyg-master/bootstrap-wysiwyg.js"></script> |
||
599 | |||
600 | |||
601 | |||
602 | |||
603 | |||
604 | <script> |
||
605 | |||
606 | function initToolbarBootstrapBindings() { |
||
607 | var fonts = ['Serif', 'Sans', 'Arial', 'Arial Black', 'Courier', |
||
608 | 'Courier New', 'Comic Sans MS', 'Helvetica', 'Impact', 'Lucida Grande', 'Lucida Sans', 'Tahoma', 'Times', |
||
609 | 'Times New Roman', 'Verdana'], |
||
610 | fontTarget = $('[title=Font]').siblings('.dropdown-menu'); |
||
611 | $.each(fonts, function (idx, fontName) { |
||
612 | fontTarget.append($('<li><a data-edit="fontName ' + fontName +'" style="font-family:\''+ fontName +'\'">'+fontName + '</a></li>')); |
||
613 | }); |
||
614 | $('a[title]').tooltip({container:'body'}); |
||
615 | $('.dropdown-menu input').click(function() {return false;}) |
||
616 | .change(function () {$(this).parent('.dropdown-menu').siblings('.dropdown-toggle').dropdown('toggle');}) |
||
617 | .keydown('esc', function () {this.value='';$(this).change();}); |
||
618 | |||
619 | $('[data-role=magic-overlay]').each(function () { |
||
620 | var overlay = $(this), target = $(overlay.data('target')); |
||
621 | overlay.css('opacity', 0).css('position', 'absolute').offset(target.offset()).width(target.outerWidth()).height(target.outerHeight()); |
||
622 | }); |
||
623 | if ("onwebkitspeechchange" in document.createElement("input")) { |
||
624 | var editorOffset = $('#editor').offset(); |
||
625 | $('#voiceBtn').css('position','absolute').offset({top: editorOffset.top, left: editorOffset.left+$('#editor').innerWidth()-35}); |
||
626 | } else { |
||
627 | $('#voiceBtn').hide(); |
||
628 | } |
||
629 | }; |
||
630 | function showErrorAlert (reason, detail) { |
||
631 | var msg=''; |
||
632 | if (reason==='unsupported-file-type') { msg = "Unsupported format " +detail; } |
||
633 | else { |
||
634 | console.log("error uploading file", reason, detail); |
||
635 | } |
||
636 | $('<div class="alert"> <button type="button" class="close" data-dismiss="alert">×</button>'+ |
||
637 | '<strong>File upload error</strong> '+msg+' </div>').prependTo('#alerts'); |
||
638 | }; |
||
1317 | jmachado | 639 | |
640 | |||
641 | |||
642 | //Wysywyg Editor Toolbar |
||
1312 | jmachado | 643 | $(document).ready(function(){ |
644 | initToolbarBootstrapBindings(); |
||
645 | $('#editor').wysiwyg({ fileUploadError: showErrorAlert} ); |
||
646 | window.prettyPrint && prettyPrint(); |
||
647 | }); |
||
648 | |||
649 | |||
650 | /****** |
||
651 | * Function for Files Version service data.jsp |
||
652 | * |
||
653 | */ |
||
654 | function submitDataVersionForm() |
||
655 | { |
||
656 | $.post( "<%=request.getContextPath()%>/user/data.jsp?id=" + $("#filesVersionsId").val(), function( data ) { |
||
657 | $("#contentVersions").html($( data ).find("#contentVersions").html()); |
||
658 | evaluateTableSorters(); |
||
659 | }); |
||
660 | } |
||
661 | |||
662 | function invoqueDataVersionForm(id) |
||
663 | { |
||
664 | $("#filesVersionsId").val(id); |
||
665 | submitDataVersionForm(); |
||
666 | $('#historyFilesModal').modal({ |
||
667 | show: 'true' |
||
668 | }); |
||
669 | } |
||
670 | |||
671 | </script> |
||
1328 | jmachado | 672 | |
1315 | jmachado | 673 | <%--O nosso estilo fica aqui para se sobrepor--%> |
1320 | jmachado | 674 | <link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/style.css"/> |
1315 | jmachado | 675 | <link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/<%=bacoTheme%>/style.css"/> |
1317 | jmachado | 676 | <link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/<%=bacoTheme%>/stylePublicPortal.css"/> |
677 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
||
678 | <meta charset="UTF-8"> |