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