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