Subversion Repositories bacoAlunos

Rev

Rev 1328 | Rev 1337 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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