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