diff --git a/WebContent/CumulusTagCloud.swf b/WebContent/CumulusTagCloud.swf new file mode 100755 index 0000000..3eec8c2 Binary files /dev/null and b/WebContent/CumulusTagCloud.swf differ diff --git a/WebContent/GameGrid.swf b/WebContent/GameGrid.swf new file mode 100755 index 0000000..72d924f Binary files /dev/null and b/WebContent/GameGrid.swf differ diff --git a/WebContent/Grafico1.swf b/WebContent/Grafico1.swf new file mode 100755 index 0000000..15176db Binary files /dev/null and b/WebContent/Grafico1.swf differ diff --git a/WebContent/GraficoBolha.swf b/WebContent/GraficoBolha.swf new file mode 100755 index 0000000..3d6f8f1 Binary files /dev/null and b/WebContent/GraficoBolha.swf differ diff --git a/WebContent/GraficoColuna.swf b/WebContent/GraficoColuna.swf new file mode 100755 index 0000000..5689bf7 Binary files /dev/null and b/WebContent/GraficoColuna.swf differ diff --git a/WebContent/GraficoColuna2.swf b/WebContent/GraficoColuna2.swf new file mode 100755 index 0000000..fe71901 Binary files /dev/null and b/WebContent/GraficoColuna2.swf differ diff --git a/WebContent/GraficoLine.swf b/WebContent/GraficoLine.swf new file mode 100755 index 0000000..86f1531 Binary files /dev/null and b/WebContent/GraficoLine.swf differ diff --git a/WebContent/GraficoLine2.swf b/WebContent/GraficoLine2.swf new file mode 100755 index 0000000..47d68d3 Binary files /dev/null and b/WebContent/GraficoLine2.swf differ diff --git a/WebContent/GraficoPizza.swf b/WebContent/GraficoPizza.swf new file mode 100755 index 0000000..2a8aa9b Binary files /dev/null and b/WebContent/GraficoPizza.swf differ diff --git a/WebContent/GraficoPlot.swf b/WebContent/GraficoPlot.swf new file mode 100755 index 0000000..86448c7 Binary files /dev/null and b/WebContent/GraficoPlot.swf differ diff --git a/WebContent/GraficoTreeMap.swf b/WebContent/GraficoTreeMap.swf new file mode 100755 index 0000000..4185832 Binary files /dev/null and b/WebContent/GraficoTreeMap.swf differ diff --git a/WebContent/META-INF/MANIFEST.MF b/WebContent/META-INF/MANIFEST.MF old mode 100644 new mode 100755 diff --git a/WebContent/WEB-INF/struts/struts-config-course.xml b/WebContent/WEB-INF/struts/struts-config-course.xml old mode 100644 new mode 100755 index f0eb058..023199b --- a/WebContent/WEB-INF/struts/struts-config-course.xml +++ b/WebContent/WEB-INF/struts/struts-config-course.xml @@ -100,6 +100,39 @@ + + + + + + + + + + + + + + + + + + + + @@ -109,6 +142,8 @@ + + @@ -125,6 +160,7 @@ + @@ -194,7 +230,17 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WebContent/WEB-INF/struts/struts-config-messenger.xml b/WebContent/WEB-INF/struts/struts-config-messenger.xml new file mode 100755 index 0000000..d170887 --- /dev/null +++ b/WebContent/WEB-INF/struts/struts-config-messenger.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/WebContent/WEB-INF/struts/struts-config-mobile.xml b/WebContent/WEB-INF/struts/struts-config-mobile.xml old mode 100644 new mode 100755 diff --git a/WebContent/WEB-INF/struts/struts-config-module.xml b/WebContent/WEB-INF/struts/struts-config-module.xml old mode 100644 new mode 100755 index 508ab28..9be44ca --- a/WebContent/WEB-INF/struts/struts-config-module.xml +++ b/WebContent/WEB-INF/struts/struts-config-module.xml @@ -18,13 +18,11 @@ - - - + - + + + + + + @@ -179,6 +183,8 @@ + + @@ -250,6 +256,15 @@ + + + + + @@ -276,7 +291,19 @@ - + + + + + @@ -301,6 +328,12 @@ name="messageForum" input="/forumActivity.do?method=showViewNewAnswerForumActivity" parameter="method" scope="request" /> + + diff --git a/WebContent/WEB-INF/struts/struts-config.xml b/WebContent/WEB-INF/struts/struts-config.xml old mode 100644 new mode 100755 diff --git a/WebContent/WEB-INF/struts/validation-course.xml b/WebContent/WEB-INF/struts/validation-course.xml old mode 100644 new mode 100755 diff --git a/WebContent/WEB-INF/struts/validation-module.xml b/WebContent/WEB-INF/struts/validation-module.xml old mode 100644 new mode 100755 index ff1b35b..91408b4 --- a/WebContent/WEB-INF/struts/validation-module.xml +++ b/WebContent/WEB-INF/struts/validation-module.xml @@ -11,19 +11,20 @@ - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/WebContent/WEB-INF/struts/validation-settings.xml b/WebContent/WEB-INF/struts/validation-settings.xml old mode 100644 new mode 100755 diff --git a/WebContent/WEB-INF/struts/validation-user.xml b/WebContent/WEB-INF/struts/validation-user.xml old mode 100644 new mode 100755 diff --git a/WebContent/WEB-INF/struts/validator-rules.xml b/WebContent/WEB-INF/struts/validator-rules.xml old mode 100644 new mode 100755 diff --git a/WebContent/WEB-INF/sun-jaxws.xml b/WebContent/WEB-INF/sun-jaxws.xml old mode 100644 new mode 100755 diff --git a/WebContent/WEB-INF/tags/c.tld b/WebContent/WEB-INF/tags/c.tld old mode 100644 new mode 100755 diff --git a/WebContent/WEB-INF/tags/fmt.tld b/WebContent/WEB-INF/tags/fmt.tld old mode 100644 new mode 100755 diff --git a/WebContent/WEB-INF/tags/sql.tld b/WebContent/WEB-INF/tags/sql.tld old mode 100644 new mode 100755 diff --git a/WebContent/WEB-INF/tags/struts-bean.tld b/WebContent/WEB-INF/tags/struts-bean.tld old mode 100644 new mode 100755 diff --git a/WebContent/WEB-INF/tags/struts-html.tld b/WebContent/WEB-INF/tags/struts-html.tld old mode 100644 new mode 100755 diff --git a/WebContent/WEB-INF/tags/struts-logic.tld b/WebContent/WEB-INF/tags/struts-logic.tld old mode 100644 new mode 100755 index f267fcc..270c1a3 --- a/WebContent/WEB-INF/tags/struts-logic.tld +++ b/WebContent/WEB-INF/tags/struts-logic.tld @@ -1,10 +1,4 @@ - - - - - - 1.2 diff --git a/WebContent/WEB-INF/tags/struts-nested.tld b/WebContent/WEB-INF/tags/struts-nested.tld old mode 100644 new mode 100755 diff --git a/WebContent/WEB-INF/tags/struts-tiles.tld b/WebContent/WEB-INF/tags/struts-tiles.tld old mode 100644 new mode 100755 diff --git a/WebContent/WEB-INF/tags/x.tld b/WebContent/WEB-INF/tags/x.tld old mode 100644 new mode 100755 diff --git a/WebContent/WEB-INF/web.xml b/WebContent/WEB-INF/web.xml old mode 100644 new mode 100755 index c272223..20de518 --- a/WebContent/WEB-INF/web.xml +++ b/WebContent/WEB-INF/web.xml @@ -49,28 +49,50 @@ /WEB-INF/struts/struts-config-module.xml, /WEB-INF/struts/struts-config-mobile.xml, /WEB-INF/struts/struts-config-openid.xml, - /WEB-INF/struts/struts-config-settings.xml + /WEB-INF/struts/struts-config-settings.xml, + /WEB-INF/struts/struts-config-log.xml, + /WEB-INF/struts/struts-config-messenger.xml, + /WEB-INF/struts/struts-config-twittertool.xml 2 - + - + - + + + + + Jersey REST Service + com.sun.jersey.spi.container.servlet.ServletContainer + + com.sun.jersey.config.property.packages + br.ufpe.cin.amadeus.amadeus_web.services + + 1 + + + + + Jersey REST Service + /ws/* + + + dwr-invoker @@ -98,7 +120,6 @@ action *.do - @@ -114,6 +135,7 @@ index.jsp + 404 diff --git a/WebContent/amadeus_sdmm/Prototipo.jsp b/WebContent/amadeus_sdmm/Prototipo.jsp old mode 100644 new mode 100755 diff --git a/WebContent/amadeus_sdmm/video/InsertVideo.jsp b/WebContent/amadeus_sdmm/video/InsertVideo.jsp old mode 100644 new mode 100755 diff --git a/WebContent/amadeus_sdmm/video/PageInsertVideo.jsp b/WebContent/amadeus_sdmm/video/PageInsertVideo.jsp old mode 100644 new mode 100755 diff --git a/WebContent/amadeus_sdmm/video/PageSearchVideo.jsp b/WebContent/amadeus_sdmm/video/PageSearchVideo.jsp old mode 100644 new mode 100755 diff --git a/WebContent/amadeus_sdmm/video/VideoViewer.jsp b/WebContent/amadeus_sdmm/video/VideoViewer.jsp old mode 100644 new mode 100755 diff --git a/WebContent/index.jsp b/WebContent/index.jsp old mode 100644 new mode 100755 index 603b90a..dd9abc2 --- a/WebContent/index.jsp +++ b/WebContent/index.jsp @@ -12,6 +12,7 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título --> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> + <%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %> diff --git a/WebContent/js/Log.js b/WebContent/js/Log.js new file mode 100755 index 0000000..0d93243 --- /dev/null +++ b/WebContent/js/Log.js @@ -0,0 +1,41 @@ +/* + * Copyright 2008, 2009 UFPE - Universidade Federal de Pernambuco + * + * Este arquivo é parte do programa Amadeus Sistema de Gestão de Aprendizagem, ou simplesmente Amadeus LMS + * + * O Amadeus LMS é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como + * publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença. + * + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. + * + * Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +function saveLogGame (idGame, numFases, tempo, pontuacao, metaAlternativa){ + + UtilDWR.getInclude('/saveLog.do?method=saveLog&jogo='+idGame+ + '&fases='+numFases+ + '&tempo='+tempo+ + '&pontuacao='+pontuacao+ + '&metaAlternativa='+metaAlternativa, + function(data) { + } + ); +} + +function saveLogViewMaterial (idMaterial){ + + //alert('chamou a funcao de log'); + UtilDWR.getInclude('/saveLogViewMaterial.do?method=saveLogViewMaterial&idMaterial='+idMaterial, + function(data) { + } + ); +} + +function saveLogViewVideo(idMaterial){ + UtilDWR.getInclude('/saveLogViewVideo.do?method=saveLogViewVideo&idMaterial='+idMaterial, + function(data) { + } + ); +} \ No newline at end of file diff --git a/WebContent/js/amadeus.js b/WebContent/js/amadeus.js old mode 100644 new mode 100755 index fad6b4e..7aff116 --- a/WebContent/js/amadeus.js +++ b/WebContent/js/amadeus.js @@ -1,16 +1,15 @@ /* - * Copyright 2008, 2009 UFPE - Universidade Federal de Pernambuco - * - * Este arquivo � parte do programa Amadeus Sistema de Gest�o de Aprendizagem, ou simplesmente Amadeus LMS - * - * O Amadeus LMS � um software livre; voc� pode redistribui-lo e/ou modifica-lo dentro dos termos da Licen�a P�blica Geral GNU como - * publicada pela Funda��o do Software Livre (FSF); na vers�o 2 da Licen�a. - * - * Este programa � distribu�do na esperan�a que possa ser �til, mas SEM NENHUMA GARANTIA; sem uma garantia impl�cita de ADEQUA��O a qualquer MERCADO ou APLICA��O EM PARTICULAR. Veja a Licen�a P�blica Geral GNU para maiores detalhes. - * - * Voc� deve ter recebido uma c�pia da Licen�a P�blica Geral GNU, sob o t�tulo "LICENCA.txt", junto com este programa, se n�o, escreva para a Funda��o do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - */ +Copyright 2008, 2009 UFPE - Universidade Federal de Pernambuco + +Este arquivo é parte do programa Amadeus Sistema de Gestão de Aprendizagem, ou simplesmente Amadeus LMS + +O Amadeus LMS é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como +publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença. + +Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. + +Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +*/ var keyUserNotLogged = ""; var keyAccessDenied = ""; @@ -118,7 +117,7 @@ function verificaEspaco(login){ var i; for(i=0;i'+ + '.nyroModalCloseButton{font-size: 1px}'+ + '.nyroModalLink .nyroModalPrev, .nyroModalDom .nyroModalPrev, .nyroModalForm .nyroModalPrev, .nyroModalFormFile .nyroModalPrev {left: -10px}'+ + ''); + $.nmObj({ + _reposition: function() { + var elts = this.elts.cont.find('.nmReposition'); + if (elts.length) { + var outer = this.getInternal()._getOuter($b), + fs = isFullScreen(); + var space = { + top: - (fs ? outer.h.border / 2 : 0), + left: - (fs ? outer.w.border / 2 : 0) + }; + elts.each(function() { + var me = $(this), + offset = me.offset(); + me.css({ + top: offset.top - space.top, + left: offset.left - space.left + }); + }); + this.elts.cont.after(elts); + } + this.elts.cont.css('overflow', 'auto'); + } + }); + $.nmInternal({ + _calculateFullSize: function() { + var scrollHeight = Math.max( + document.documentElement.scrollHeight, + document.body.scrollHeight + ), + offsetHeight = Math.max( + document.documentElement.offsetHeight, + document.body.offsetHeight + ), + scrollWidth = Math.max( + document.documentElement.scrollWidth, + document.body.scrollWidth + ), + offsetWidth = Math.max( + document.documentElement.offsetWidth, + document.body.offsetWidth + ); + this.fullSize = { + wW: $w.width(), + wH: $w.height() + }; + this.fullSize.h = scrollHeight < offsetHeight ? $w.height() : scrollHeight; + this.fullSize.w = scrollWidth < offsetWidth ? $w.width() : scrollWidth; + this.fullSize.viewW = Math.min(this.fullSize.w, this.fullSize.wW); + this.fullSize.viewH = Math.min(this.fullSize.h, this.fullSize.wH); + } + }); + $.nmAnims({ + basic: { + resize: function(nm, clb) { + var space = nm.getInternal()._getSpaceReposition(), + outer = nm.getInternal()._getOuter(nm.elts.cont); + nm.elts.cont.css({ + width: nm.sizes.w, + height: nm.sizes.h, + top: space.top + (nm.getInternal().fullSize.viewH - outer.h.total - nm.sizes.h) / 2, + left: space.left + (nm.getInternal().fullSize.viewW - outer.w.total - nm.sizes.w) / 2 + }); + clb(); + } + }, + fade: { + resize: function(nm, clb) { + var space = nm.getInternal()._getSpaceReposition(), + outer = nm.getInternal()._getOuter(nm.elts.cont); + nm.elts.cont.animate({ + width: nm.sizes.w, + height: nm.sizes.h, + top: space.top + (nm.getInternal().fullSize.viewH - outer.h.total - nm.sizes.h) / 2, + left: space.left + (nm.getInternal().fullSize.viewW - outer.w.total - nm.sizes.w) / 2 + }, clb); + } + } + }); + $.nmFilters({ + ie6: { + is: function() { + return true; + }, + initElts: function(nm) { + nm.store.ie6 = true; + if (shown == 0) { + $h.css({overflow: 'hidden'}); + var w = $b.width(), + h = $b.outerHeight(true)+'px'; + if ($w.height() >= $b.outerHeight(true)) { + h = $w.height()+'px'; + } else + w+= 20; + w += 'px'; + $b.css({ + width: w, + height: h, + position: 'static', + overflow: 'hidden' + }); + } + }, + beforeShowBg: function(nm) { + var space = nm.getInternal()._getSpaceReposition(), + outer = nm.getInternal()._getOuter($b); + nm.elts.bg.css({ + position: 'absolute', + top: space.top, + left: space.left, + width: nm.getInternal().fullSize.viewW + 200, + height: nm.getInternal().fullSize.viewH + 200 + }); + shown++; + }, + afterHideBg: function(nm) { + if (nm.store.ie6) { + nm.store.ie6 = false; + shown--; + } + if (shown == 0) { + $h.css({overflow: ''}); + $b.css({ + width: '', + height: '', + position: '', + overflow: '' + }); + } + }, + size: function(nm) { + if (!nm._hasFilter('image') && !nm._hasFilter('swf')) { + // apply min height and width + if (nm.sizes.h < 250) nm.sizes.h = 250; + if (nm.sizes.w < 250) nm.sizes.w = 250; + else if (nm.sizes.w > 1000) nm.sizes.w = 1000; + } + }, + close: function(nm) { + if (nm.store.ie6) { + nm.store.ie6 = false; + shown--; + } + }, + beforeShowLoad: function(nm) { + var space = nm.getInternal()._getSpaceReposition(), + outer = nm.getInternal()._getOuter(nm.elts.load); + nm.elts.load.css({ + 'z-index': zIndex++, + position: 'absolute', + top: space.top + (nm.getInternal().fullSize.viewH - nm.elts.load.height() - outer.h.margin)/2, + left: space.left + (nm.getInternal().fullSize.viewW - nm.elts.load.width() - outer.w.margin)/2 + }); + }, + beforeShowCont: function(nm) { + var space = nm.getInternal()._getSpaceReposition(), + outer = nm.getInternal()._getOuter(nm.elts.cont); + nm.elts.cont.css({ + 'z-index': zIndex++, + position: 'absolute', + top: space.top + (nm.getInternal().fullSize.viewH - outer.h.total - nm.sizes.h) / 2, + left: space.left + (nm.getInternal().fullSize.viewW - outer.w.total - nm.sizes.w) / 2 + }); + } + } + }); +}); \ No newline at end of file diff --git a/WebContent/js/jqueryNyroModal/jquery.nyroModal-ie6.min.js b/WebContent/js/jqueryNyroModal/jquery.nyroModal-ie6.min.js new file mode 100755 index 0000000..08fe2c7 --- /dev/null +++ b/WebContent/js/jqueryNyroModal/jquery.nyroModal-ie6.min.js @@ -0,0 +1,9 @@ +/* + * nyroModal v2.alpha + * for IE6 + * + */ +jQuery(function($,undefined){var $b=$('body'),$w=$(window),$h=$('html'),shown=0,zIndex=100;function isFullScreen(){return screen.height==$w.height()+58;};$b.append('');$.nmObj({_reposition:function(){var elts=this.elts.cont.find('.nmReposition');if(elts.length){var outer=this.getInternal()._getOuter($b),fs=isFullScreen();var space={top:-(fs?outer.h.border/2:0),left:-(fs?outer.w.border/2:0)};elts.each(function(){var me=$(this),offset=me.offset();me.css({top:offset.top-space.top,left:offset.left-space.left});});this.elts.cont.after(elts);} +this.elts.cont.css('overflow','auto');}});$.nmInternal({_calculateFullSize:function(){var scrollHeight=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),offsetHeight=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),scrollWidth=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),offsetWidth=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);this.fullSize={wW:$w.width(),wH:$w.height()};this.fullSize.h=scrollHeight=$b.outerHeight(true)){h=$w.height()+'px';}else +w+=20;w+='px';$b.css({width:w,height:h,position:'static',overflow:'hidden'});}},beforeShowBg:function(nm){var space=nm.getInternal()._getSpaceReposition(),outer=nm.getInternal()._getOuter($b);nm.elts.bg.css({position:'absolute',top:space.top,left:space.left,width:nm.getInternal().fullSize.viewW+200,height:nm.getInternal().fullSize.viewH+200});shown++;},afterHideBg:function(nm){if(nm.store.ie6){nm.store.ie6=false;shown--;} +if(shown==0){$h.css({overflow:''});$b.css({width:'',height:'',position:'',overflow:''});}},size:function(nm){if(!nm._hasFilter('image')&&!nm._hasFilter('swf')){if(nm.sizes.h<250)nm.sizes.h=250;if(nm.sizes.w<250)nm.sizes.w=250;else if(nm.sizes.w>1000)nm.sizes.w=1000;}},close:function(nm){if(nm.store.ie6){nm.store.ie6=false;shown--;}},beforeShowLoad:function(nm){var space=nm.getInternal()._getSpaceReposition(),outer=nm.getInternal()._getOuter(nm.elts.load);nm.elts.load.css({'z-index':zIndex++,position:'absolute',top:space.top+(nm.getInternal().fullSize.viewH-nm.elts.load.height()-outer.h.margin)/2,left:space.left+(nm.getInternal().fullSize.viewW-nm.elts.load.width()-outer.w.margin)/2});},beforeShowCont:function(nm){var space=nm.getInternal()._getSpaceReposition(),outer=nm.getInternal()._getOuter(nm.elts.cont);nm.elts.cont.css({'z-index':zIndex++,position:'absolute',top:space.top+(nm.getInternal().fullSize.viewH-outer.h.total-nm.sizes.h)/2,left:space.left+(nm.getInternal().fullSize.viewW-outer.w.total-nm.sizes.w)/2});}}});}); \ No newline at end of file diff --git a/WebContent/js/jqueryNyroModal/jquery.nyroModal.custom.js b/WebContent/js/jqueryNyroModal/jquery.nyroModal.custom.js new file mode 100755 index 0000000..22cc6b0 --- /dev/null +++ b/WebContent/js/jqueryNyroModal/jquery.nyroModal.custom.js @@ -0,0 +1,1672 @@ +/* + * nyroModal v2.0.0 + * Core + * + * Commit 15acdbfd58dae7610a5456d80fa2806c9ed4e0d7 (01/19/2012) * + * + * Included parts: + * - anims.fade + * - filters.title + * - filters.gallery + * - filters.link + * - filters.dom + * - filters.data + * - filters.image + * - filters.swf + * - filters.form + * - filters.formFile + * - filters.iframe + * - filters.iframeForm + * - filters.embedly + */ +/* + * nyroModal v2.0.0 + * Core + * + */ +jQuery(function($, undefined) { + + var $w = $(window), + $d = $(document), + $b = $('body'), + baseHref = $('base').attr('href'), + // nyroModal Object + _nmObj = { + filters: [], // List of filters used + callbacks: {}, // Sepcific callbacks + loadFilter: undefined, // Name of the filter used for loading + + modal: false, // Indicates if it's a modal window or not + closeOnEscape: true, // Indicates if the modal should close on Escape key + closeOnClick: true, // Indicates if a click on the background should close the modal + useKeyHandler: false, // Indicates if the modal has to handle key down event + + showCloseButton: true, // Indicates if the closeButonn should be added + closeButton: 'Close', // Close button HTML + + stack: false, // Indicates if links automatically binded inside the modal should stack or not + nonStackable: 'form', // Filter to not stack DOM element + + header: undefined, // header include in every modal + footer: undefined, // footer include in every modal + + // Specific confirguation for gallery filter + galleryLoop: true, // Indicates if the gallery should loop + galleryCounts: true, // Indicates if the gallery counts should be shown + ltr: true, // Left to Right by default. Put to false for Hebrew or Right to Left language. Used in gallery filter + + // Specific confirguation for image filter + imageRegex: '[^\.]\.(jpg|jpeg|png|tiff|gif|bmp)\s*$', // Regex used to detect image link + + selIndicator: 'nyroModalSel', // Value added when a form or Ajax is sent with a filter content + + swfObjectId: undefined, // Object id for swf object + swf: { // Default SWF attributes + allowFullScreen: 'true', + allowscriptaccess: 'always', + wmode: 'transparent' + }, + + store: {}, // Storage object for filters. + errorMsg: 'An error occured', // Error message + elts: { // HTML elements for the modal + all: undefined, + bg: undefined, + load: undefined, + cont: undefined, + hidden: undefined + }, + sizes: { // Size information + initW: undefined, // Initial width + initH: undefined, // Initial height + w: undefined, // width + h: undefined, // height + minW: undefined, // minimum Width + minH: undefined, // minimum height + wMargin: undefined, // Horizontal margin + hMargin: undefined // Vertical margin + }, + anim: { // Animation names to use + def: undefined, // Default animation set to use if sspecific are not defined or doesn't exist + showBg: undefined, // Set to use for showBg animation + hideBg: undefined, // Set to use for hideBg animation + showLoad: undefined, // Set to use for showLoad animation + hideLoad: undefined, // Set to use for hideLoad animation + showCont: undefined, // Set to use for showCont animation + hideCont: undefined, // Set to use for hideCont animation + showTrans: undefined, // Set to use for showTrans animation + hideTrans: undefined, // Set to use for hideTrans animation + resize: undefined // Set to use for resize animation + }, + + _open: false, // Indicates if the modal is open + _bgReady: false, // Indicates if the background is ready + _opened: false, // Indicates if the modal was opened (useful for stacking) + _loading: false, // Indicates if the loading is shown + _animated: false, // Indicates if the modal is currently animated + _transition: false, //Indicates if the modal is in transition + _nmOpener: undefined, // nmObj of the modal that opened the current one in non stacking mode + _nbContentLoading: 0, // Counter for contentLoading call + _scripts: '', // Scripts tags to be included + _scriptsShown: '', //Scripts tags to be included once the modal is swhon + + // save the object in data + saveObj: function() { + this.opener.data('nmObj', this); + }, + // Open the modal + open: function() { + if (this._nmOpener) + this._nmOpener._close(); + this.getInternal()._pushStack(this.opener); + this._opened = false; + this._bgReady = false; + this._open = true; + this._initElts(); + this._load(); + this._nbContentLoading = 0; + this._callAnim('showBg', $.proxy(function() { + this._bgReady = true; + if (this._nmOpener) { + // fake closing of the opener nyroModal + this._nmOpener._bgReady = false; + this._nmOpener._loading = false; + this._nmOpener._animated = false; + this._nmOpener._opened = false; + this._nmOpener._open = false; + this._nmOpener.elts.cont = this._nmOpener.elts.hidden = this._nmOpener.elts.load = this._nmOpener.elts.bg = this._nmOpener.elts.all = undefined; + this._nmOpener.saveObj(); + this._nmOpener = undefined; + } + this._contentLoading(); + }, this)); + }, + + // Resize the modal according to sizes.initW and sizes.initH + // Will call size function + // @param recalc boolean: Indicate if the size should be recalaculated (useful when content has changed) + resize: function(recalc) { + if (recalc) { + this.elts.hidden.append(this.elts.cont.children().first().clone()); + this.sizes.initW = this.sizes.w = this.elts.hidden.width(); + this.sizes.initH = this.sizes.h = this.elts.hidden.height(); + this.elts.hidden.empty(); + } else { + this.sizes.w = this.sizes.initW; + this.sizes.h = this.sizes.initH; + } + this._unreposition(); + this.size(); + this._callAnim('resize', $.proxy(function() { + this._reposition(); + }, this)); + }, + + // Update sizes element to not go outsize the viewport. + // Will call 'size' callback filter + size: function() { + var maxHeight = this.getInternal().fullSize.viewH - this.sizes.hMargin, + maxWidth = this.getInternal().fullSize.viewW - this.sizes.wMargin; + if (this.sizes.minW && this.sizes.minW > this.sizes.w) + this.sizes.w = this.sizes.minW; + if (this.sizes.minH && this.sizes.minH > this.sizes.h) + this.sizes.h = this.sizes.minH; + if (this.sizes.h > maxHeight || this.sizes.w > maxWidth) { + // We're gonna resize the modal as it will goes outside the view port + this.sizes.h = Math.min(this.sizes.h, maxHeight); + this.sizes.w = Math.min(this.sizes.w, maxWidth); + } + this._callFilters('size'); + }, + + // Get the nmObject for a new nyroModal + getForNewLinks: function(elt) { + var ret; + if (this.stack && (!elt || this.isStackable(elt))) { + ret = $.extend(true, {}, this); + ret._nmOpener = undefined; + ret.elts.all = undefined; + } else { + ret = $.extend({}, this); + ret._nmOpener = this; + } + ret.filters = []; + ret.opener = undefined; + ret._open = false; + return ret; + }, + + // Indicate if an element can be stackable or not, regarding the nonStackable setting + isStackable: function(elt) { + return !elt.is(this.nonStackable); + }, + + // key handle function. + // Will call 'keyHandle' callback filter + keyHandle: function(e) { + this.keyEvent = e; + this._callFilters('keyHandle'); + this.keyEvent = undefined; + delete(this.keyEvent); + }, + + // Get the internal object + getInternal: function() { + return _internal; + }, + + // Internal function for closing a nyroModal + // Will call 'close' callback filter + _close: function() { + this.getInternal()._removeStack(this.opener); + this._opened = false; + this._open = false; + this._callFilters('close'); + }, + // Public function for closing a nyroModal + close: function() { + this._close(); + this._callFilters('beforeClose'); + var self = this; + this._unreposition(); + self._callAnim('hideCont', function() { + self._callAnim('hideLoad', function() { + self._callAnim('hideBg', function() { + self._callFilters('afterClose'); + self.elts.cont.remove(); + self.elts.hidden.remove(); + self.elts.load.remove(); + self.elts.bg.remove(); + self.elts.all.remove(); + self.elts.cont = self.elts.hidden = self.elts.load = self.elts.bg = self.elts.all = undefined; + }); + }); + }); + }, + + // Init HTML elements + _initElts: function() { + if (!this.stack && this.getInternal().stack.length > 1) + this.elts = this.getInternal().stack[this.getInternal().stack.length-2]['nmObj'].elts; + if (!this.elts.all || this.elts.all.closest('body').length == 0) + this.elts.all = this.elts.bg = this.elts.cont = this.elts.hidden = this.elts.load = undefined; + if (!this.elts.all) + this.elts.all = $('
').appendTo(this.getInternal()._container); + if (!this.elts.bg) + this.elts.bg = $('
').hide().appendTo(this.elts.all); + if (!this.elts.cont) + this.elts.cont = $('
').hide().appendTo(this.elts.all); + if (!this.elts.hidden) + this.elts.hidden = $('
').hide().appendTo(this.elts.all); + this.elts.hidden.empty(); + if (!this.elts.load) + this.elts.load = $('
').hide().appendTo(this.elts.all); + this._callFilters('initElts'); + }, + + // Trigger the error + // Will call 'error' callback filter + _error: function() { + this._callFilters('error'); + }, + + // Set the HTML content to show. + // - html: HTML content + // - selector: selector to filter the content + // Will init the size and call the 'size' function. + // Will call 'filledContent' callback filter + _setCont: function(html, selector) { + if (selector) { + var tmp = [], + i = 0; + // Looking for script to store them + html = html + .replace(/\r\n/gi, 'nyroModalLN') + .replace(//gi, function(x) { + tmp[i] = x; + return '
';
+							});
+					var cur = $('
'+html+'
').find(selector); + if (cur.length) { + html = cur.html() + .replace(/
<\/pre>/gi, function(x, y, z) { return tmp[y]; })
+							.replace(/nyroModalLN/gi, "\r\n");
+					} else {
+						// selector not found
+						this._error();
+						return;
+					}
+				}
+				this.elts.hidden
+					.append(this._filterScripts(html))
+					.prepend(this.header)
+					.append(this.footer)
+					.wrapInner('
'); + + // Store the size of the element + this.sizes.initW = this.sizes.w = this.elts.hidden.width(); + this.sizes.initH = this.sizes.h = this.elts.hidden.height(); + var outer = this.getInternal()._getOuter(this.elts.cont); + this.sizes.hMargin = outer.h.total; + this.sizes.wMargin = outer.w.total; + + this.size(); + + this.loading = false; + this._callFilters('filledContent'); + this._contentLoading(); + }, + + // Filter an html content to remove the script[src] and store them appropriately if needed + // - data: Data to filter + _filterScripts: function(data) { + if (typeof data != 'string') + return data; + + this._scripts = []; + this._scriptsShown = []; + var start = 0, + stStart = ' -1) { + pos2 = data.indexOf(stEnd)+endLn; + tmp = $(data.substring(pos, pos2)); + if (!tmp.attr('src') || tmp.attr('rel') == 'forceLoad') { + if (tmp.attr('rev') == 'shown') + this._scriptsShown.push(tmp.get(0)); + else + this._scripts.push(tmp.get(0)); + } + data = data.substring(0, pos)+data.substr(pos2); + start = pos; + } + return data; + }, + + // Check if the nmObject has a specific filter + // - filter: Filter name + _hasFilter: function(filter) { + var ret = false; + $.each(this.filters, function(i, f) { + ret = ret || f == filter; + }); + return ret; + }, + + // Remove a specific filter + // - filter: Filter name + _delFilter: function(filter) { + this.filters = $.map(this.filters, function(v) { + if (v != filter) + return v; + }); + }, + + // Call a function against all active filters + // - fct: Function name + // return an array of all return of callbacks; keys are filters name + _callFilters: function(fct) { + this.getInternal()._debug(fct); + var ret = [], + self = this; + $.each(this.filters, function(i, f) { + ret[f] = self._callFilter(f, fct); + }); + if (this.callbacks[fct] && $.isFunction(this.callbacks[fct])) + this.callbacks[fct](this); + return ret; + }, + + // Call a filter function for a specific filter + // - f: Filter name + // - fct: Function name + // return the return of the callback + _callFilter: function(f, fct) { + if (_filters[f] && _filters[f][fct] && $.isFunction(_filters[f][fct])) + return _filters[f][fct](this); + return undefined; + }, + + // Call animation callback. + // Will also call beforeNNN and afterNNN filter callbacks + // - fct: Animation function name + // - clb: Callback once the animation is done + _callAnim: function(fct, clb) { + this.getInternal()._debug(fct); + this._callFilters('before'+ucfirst(fct)); + if (!this._animated) { + this._animated = true; + if (!$.isFunction(clb)) clb = $.noop; + var set = this.anim[fct] || this.anim.def || 'basic'; + if (!_animations[set] || !_animations[set][fct] || !$.isFunction(_animations[set][fct])) + set = 'basic'; + _animations[set][fct](this, $.proxy(function() { + this._animated = false; + this._callFilters('after'+ucfirst(fct)); + clb(); + }, this)); + } + }, + + // Load the content + // Will call the 'load' function of the filter specified in the loadFilter parameter + _load: function() { + this.getInternal()._debug('_load'); + if (!this.loading && this.loadFilter) { + this.loading = true; + this._callFilter(this.loadFilter, 'load'); + } + }, + + // Show the content or the loading according to the current state of the modal + _contentLoading: function() { + if (!this._animated && this._bgReady) { + if (!this._transition && this.elts.cont.html().length > 0) + this._transition = true; + this._nbContentLoading++; + if (!this.loading) { + if (!this._opened) { + this._opened = true; + if (this._transition) { + var fct = $.proxy(function() { + this._writeContent(); + this._callFilters('beforeShowCont'); + this._callAnim('hideTrans', $.proxy(function() { + this._transition = false; + this._callFilters('afterShowCont'); + this.elts.cont.append(this._scriptsShown); + this._reposition(); + }, this)); + }, this); + if (this._nbContentLoading == 1) { + this._unreposition(); + this._callAnim('showTrans', fct); + } else { + fct(); + } + } else { + this._callAnim('hideLoad', $.proxy(function() { + this._writeContent(); + this._callAnim('showCont', $.proxy(function() { + this.elts.cont.append(this._scriptsShown); + this._reposition(); + }, this)); + }, this)); + } + } + } else if (this._nbContentLoading == 1) { + var outer = this.getInternal()._getOuter(this.elts.load); + this.elts.load + .css({ + position: 'fixed', + top: (this.getInternal().fullSize.viewH - this.elts.load.height() - outer.h.margin)/2, + left: (this.getInternal().fullSize.viewW - this.elts.load.width() - outer.w.margin)/2 + }); + if (this._transition) { + this._unreposition(); + this._callAnim('showTrans', $.proxy(function() { + this._contentLoading(); + }, this)); + } else { + this._callAnim('showLoad', $.proxy(function() { + this._contentLoading(); + }, this)); + } + } + } + }, + + // Write the content in the modal. + // Content comes from the hidden div, scripts and eventually close button. + _writeContent: function() { + this.elts.cont + .empty() + .append(this.elts.hidden.contents()) + .append(this._scripts) + .append(this.showCloseButton ? this.closeButton : '') + .css({ + position: 'fixed', + width: this.sizes.w, + height: this.sizes.h, + top: (this.getInternal().fullSize.viewH - this.sizes.h - this.sizes.hMargin)/2, + left: (this.getInternal().fullSize.viewW - this.sizes.w - this.sizes.wMargin)/2 + }); + }, + + // Reposition elements with a class nmReposition + _reposition: function() { + var elts = this.elts.cont.find('.nmReposition'); + if (elts.length) { + var space = this.getInternal()._getSpaceReposition(); + elts.each(function() { + var me = $(this), + offset = me.offset(); + me.css({ + position: 'fixed', + top: offset.top - space.top, + left: offset.left - space.left + }); + }); + this.elts.cont.after(elts); + } + this.elts.cont.css('overflow', 'auto'); + this._callFilters('afterReposition'); + }, + + // Unreposition elements with a class nmReposition + // Exaclty the reverse of the _reposition function + _unreposition: function() { + this.elts.cont.css('overflow', ''); + var elts = this.elts.all.find('.nmReposition'); + if (elts.length) + this.elts.cont.append(elts.removeAttr('style')); + this._callFilters('afterUnreposition'); + } + }, + _internal = { + firstInit: true, + debug: false, + stack: [], + fullSize: { + w: 0, + h: 0, + wW: 0, + wH: 0, + viewW: 0, + viewH: 0 + }, + nyroModal: function(opts, fullObj) { + if (_internal.firstInit) { + _internal._container = $('
').appendTo($b); + $w.smartresize($.proxy(_internal._resize, _internal)); + $d.on('keydown.nyroModal', $.proxy(_internal._keyHandler, _internal)); + _internal._calculateFullSize(); + _internal.firstInit = false; + } + return this.nmInit(opts, fullObj).each(function() { + _internal._init($(this).data('nmObj')); + }); + }, + nmInit: function(opts, fullObj) { + return this.each(function() { + var me = $(this); + if (fullObj) + me.data('nmObj', $.extend(true, {opener: me}, opts)); + else + me.data('nmObj', + me.data('nmObj') + ? $.extend(true, me.data('nmObj'), opts) + : $.extend(true, {opener: me}, _nmObj, opts)); + }); + }, + nmCall: function() { + return this.trigger('nyroModal'); + }, + + nmManual: function(url, opts) { + $('').nyroModal(opts).trigger('nyroModal'); + }, + nmData: function(data, opts) { + this.nmManual('#', $.extend({data: data}, opts)); + }, + nmObj: function(opts) { + $.extend(true, _nmObj, opts); + }, + nmInternal: function(opts) { + $.extend(true, _internal, opts); + }, + nmAnims: function(opts) { + $.extend(true, _animations, opts); + }, + nmFilters: function(opts) { + $.extend(true, _filters, opts); + }, + nmTop: function() { + if (_internal.stack.length) + return _internal.stack[_internal.stack.length-1]['nmObj']; + return undefined; + }, + + _debug: function(msg) { + if (this.debug && window.console && window.console.log) + window.console.log(msg); + }, + + _container: undefined, + + _init: function(nm) { + nm.filters = []; + $.each(_filters, function(f, obj) { + if (obj.is && $.isFunction(obj.is) && obj.is(nm)) { + nm.filters.push(f); + } + }); + nm._callFilters('initFilters'); + nm._callFilters('init'); + nm.opener + .off('nyroModal.nyroModal nmClose.nyroModal nmResize.nyroModal') + .on({ + 'nyroModal.nyroModal': function(e) { nm.open(); return false;}, + 'nmClose.nyroModal': function() { nm.close(); return false;}, + 'nmResize.nyroModal': function() { nm.resize(); return false;} + }); + }, + + _scrollWidth: (function() { + var scrollbarWidth; + if ($.browser.msie) { + var $textarea1 = $('') + .css({ position: 'absolute', top: -1000, left: -1000 }).appendTo($b), + $textarea2 = $('') + .css({ position: 'absolute', top: -1000, left: -1000 }).appendTo($b); + scrollbarWidth = $textarea1.width() - $textarea2.width(); + $textarea1.add($textarea2).remove(); + } else { + var $div = $('
') + .css({ width: 100, height: 100, overflow: 'auto', position: 'absolute', top: -1000, left: -1000 }) + .prependTo($b).append('
').find('div') + .css({ width: '100%', height: 200 }); + scrollbarWidth = 100 - $div.width(); + $div.parent().remove(); + } + return scrollbarWidth; + })(), + + _selNyroModal: function(obj) { + return $(obj).data('nmObj') ? true : false; + }, + + _selNyroModalOpen: function(obj) { + var me = $(obj); + return me.data('nmObj') ? me.data('nmObj')._open : false; + }, + + _keyHandler: function(e) { + var nmTop = $.nmTop(); + if (nmTop && nmTop.useKeyHandler) { + return nmTop.keyHandle(e); + } + }, + _pushStack: function(obj) { + this.stack = $.map(this.stack, function(elA) { + if (elA['nmOpener'] != obj.get(0)) + return elA; + }); + this.stack.push({ + nmOpener: obj.get(0), + nmObj: $(obj).data('nmObj') + }); + }, + _removeStack: function(obj) { + this.stack = $.map(this.stack, function(elA) { + if (elA['nmOpener'] != obj.get(0)) + return elA; + }); + }, + _resize: function() { + var opens = $(':nmOpen').each(function() { + $(this).data('nmObj')._unreposition(); + }); + this._calculateFullSize(); + opens.trigger('nmResize'); + }, + _calculateFullSize: function() { + this.fullSize = { + w: $d.width(), + h: $d.height(), + wW: $w.width(), + wH: $w.height() + }; + this.fullSize.viewW = Math.min(this.fullSize.w, this.fullSize.wW); + this.fullSize.viewH = Math.min(this.fullSize.h, this.fullSize.wH); + }, + _getCurCSS: function(elm, name) { + var ret = parseInt($.curCSS(elm, name, true)); + return isNaN(ret) ? 0 : ret; + }, + _getOuter: function(elm) { + elm = elm.get(0); + var ret = { + h: { + margin: this._getCurCSS(elm, 'marginTop') + this._getCurCSS(elm, 'marginBottom'), + border: this._getCurCSS(elm, 'borderTopWidth') + this._getCurCSS(elm, 'borderBottomWidth'), + padding: this._getCurCSS(elm, 'paddingTop') + this._getCurCSS(elm, 'paddingBottom') + }, + w: { + margin: this._getCurCSS(elm, 'marginLeft') + this._getCurCSS(elm, 'marginRight'), + border: this._getCurCSS(elm, 'borderLeftWidth') + this._getCurCSS(elm, 'borderRightWidth'), + padding: this._getCurCSS(elm, 'paddingLeft') + this._getCurCSS(elm, 'paddingRight') + } + }; + + ret.h.outer = ret.h.margin + ret.h.border; + ret.w.outer = ret.w.margin + ret.w.border; + + ret.h.inner = ret.h.padding + ret.h.border; + ret.w.inner = ret.w.padding + ret.w.border; + + ret.h.total = ret.h.outer + ret.h.padding; + ret.w.total = ret.w.outer + ret.w.padding; + + return ret; + }, + _getSpaceReposition: function() { + var outer = this._getOuter($b), + ie7 = $.browser.msie && $.browser.version < 8 && !(screen.height <= $w.height()+23); + return { + top: $w.scrollTop() - (!ie7 ? outer.h.border / 2 : 0), + left: $w.scrollLeft() - (!ie7 ? outer.w.border / 2 : 0) + }; + }, + + _getHash: function(url) { + if (typeof url == 'string') { + var hashPos = url.indexOf('#'); + if (hashPos > -1) + return url.substring(hashPos); + } + return ''; + }, + _extractUrl: function(url) { + var ret = { + url: undefined, + sel: undefined + }; + + if (url) { + var hash = this._getHash(url), + hashLoc = this._getHash(window.location.href), + curLoc = window.location.href.substring(0, window.location.href.length - hashLoc.length), + req = url.substring(0, url.length - hash.length); + ret.sel = hash; + if (req != curLoc && req != baseHref) + ret.url = req; + } + return ret; + } + }, + _animations = { + basic: { + showBg: function(nm, clb) { + nm.elts.bg.css({opacity: 0.7}).show(); + clb(); + }, + hideBg: function(nm, clb) { + nm.elts.bg.hide(); + clb(); + }, + showLoad: function(nm, clb) { + nm.elts.load.show(); + clb(); + }, + hideLoad: function(nm, clb) { + nm.elts.load.hide(); + clb(); + }, + showCont: function(nm, clb) { + nm.elts.cont.show(); + clb(); + }, + hideCont: function(nm, clb) { + nm.elts.cont.hide(); + clb(); + }, + showTrans: function(nm, clb) { + nm.elts.cont.hide(); + nm.elts.load.show(); + clb(); + }, + hideTrans: function(nm, clb) { + nm.elts.cont.show(); + nm.elts.load.hide(); + clb(); + }, + resize: function(nm, clb) { + nm.elts.cont.css({ + width: nm.sizes.w, + height: nm.sizes.h, + top: (nm.getInternal().fullSize.viewH - nm.sizes.h - nm.sizes.hMargin)/2, + left: (nm.getInternal().fullSize.viewW - nm.sizes.w - nm.sizes.wMargin)/2 + }); + clb(); + } + } + }, + _filters = { + basic: { + is: function(nm) { + return true; + }, + init: function(nm) { + if (nm.opener.attr('rev') == 'modal') + nm.modal = true; + if (nm.modal) + nm.closeOnEscape = nm.closeOnClick = nm.showCloseButton = false; + if (nm.closeOnEscape) + nm.useKeyHandler = true; + }, + initElts: function(nm) { + nm.elts.bg.addClass('nyroModalBg'); + if (nm.closeOnClick) + nm.elts.bg.off('click.nyroModal').on('click.nyroModal', function(e) { + e.preventDefault(); + nm.close(); + }); + nm.elts.cont.addClass('nyroModalCont'); + nm.elts.hidden.addClass('nyroModalCont nyroModalHidden'); + nm.elts.load.addClass('nyroModalCont nyroModalLoad'); + }, + error: function(nm) { + nm.elts.hidden.addClass('nyroModalError'); + nm.elts.cont.addClass('nyroModalError'); + nm._setCont(nm.errorMsg); + }, + beforeShowCont: function(nm) { + nm.elts.cont + .find('.nyroModal').each(function() { + var cur = $(this); + cur.nyroModal(nm.getForNewLinks(cur), true); + }).end() + .find('.nyroModalClose').on('click.nyroModal', function(e) { + e.preventDefault(); + nm.close(); + }); + }, + keyHandle: function(nm) { + // used for escape key + if (nm.keyEvent.keyCode == 27 && nm.closeOnEscape) { + nm.keyEvent.preventDefault(); + nm.close(); + } + } + }, + + custom: { + is: function(nm) { + return true; + } + } + }; + + // Add jQuery call fucntions + $.fn.extend({ + nm: _internal.nyroModal, + nyroModal: _internal.nyroModal, + nmInit: _internal.nmInit, + nmCall: _internal.nmCall + }); + + // Add global jQuery functions + $.extend({ + nmManual: _internal.nmManual, + nmData: _internal.nmData, + nmObj: _internal.nmObj, + nmInternal: _internal.nmInternal, + nmAnims: _internal.nmAnims, + nmFilters: _internal.nmFilters, + nmTop: _internal.nmTop + }); + + // Add jQuery selectors + $.expr[':'].nyroModal = $.expr[':'].nm = _internal._selNyroModal; + $.expr[':'].nmOpen = _internal._selNyroModalOpen; +}); + +// Smartresize plugin +(function($,sr){ + + // debouncing function from John Hann + // http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/ + var debounce = function (func, threshold, execAsap) { + var timeout; + + return function debounced () { + var obj = this, args = arguments; + function delayed () { + if (!execAsap) + func.apply(obj, args); + timeout = null; + }; + + if (timeout) + clearTimeout(timeout); + else if (execAsap) + func.apply(obj, args); + + timeout = setTimeout(delayed, threshold || 100); + }; + }; + // smartresize + jQuery.fn[sr] = function(fn){ return fn ? this.on('resize', debounce(fn)) : this.trigger(sr); }; + +})(jQuery,'smartresize'); +// ucFirst +function ucfirst(str) { + // http://kevin.vanzonneveld.net + // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) + // + bugfixed by: Onno Marsman + // + improved by: Brett Zamir (http://brett-zamir.me) + // * example 1: ucfirst('kevin van zonneveld'); + // * returns 1: 'Kevin van zonneveld' + str += ''; + var f = str.charAt(0).toUpperCase(); + return f + str.substr(1); +} +/* + * nyroModal v2.0.0 + * + * Fade animations + * + * Depends: + * + */ +jQuery(function($, undefined) { + $.nmAnims({ + fade: { + showBg: function(nm, clb) { + nm.elts.bg.fadeTo(250, 0.7, clb); + }, + hideBg: function(nm, clb) { + nm.elts.bg.fadeOut(clb); + }, + showLoad: function(nm, clb) { + nm.elts.load.fadeIn(clb); + }, + hideLoad: function(nm, clb) { + nm.elts.load.fadeOut(clb); + }, + showCont: function(nm, clb) { + nm.elts.cont.fadeIn(clb); + }, + hideCont: function(nm, clb) { + nm.elts.cont.css('overflow', 'hidden').fadeOut(clb); + }, + showTrans: function(nm, clb) { + nm.elts.load + .css({ + position: nm.elts.cont.css('position'), + top: nm.elts.cont.css('top'), + left: nm.elts.cont.css('left'), + width: nm.elts.cont.css('width'), + height: nm.elts.cont.css('height'), + marginTop: nm.elts.cont.css('marginTop'), + marginLeft: nm.elts.cont.css('marginLeft') + }) + .fadeIn(function() { + nm.elts.cont.hide(); + clb(); + }); + }, + hideTrans: function(nm, clb) { + nm.elts.cont.css('visibility', 'hidden').show(); + nm.elts.load + .css('position', nm.elts.cont.css('position')) + .animate({ + top: nm.elts.cont.css('top'), + left: nm.elts.cont.css('left'), + width: nm.elts.cont.css('width'), + height: nm.elts.cont.css('height'), + marginTop: nm.elts.cont.css('marginTop'), + marginLeft: nm.elts.cont.css('marginLeft') + }, function() { + nm.elts.cont.css('visibility', ''); + nm.elts.load.fadeOut(clb); + }); + }, + resize: function(nm, clb) { + nm.elts.cont.animate({ + width: nm.sizes.w, + height: nm.sizes.h, + top: (nm.getInternal().fullSize.viewH - nm.sizes.h - nm.sizes.hMargin)/2, + left: (nm.getInternal().fullSize.viewW - nm.sizes.w - nm.sizes.wMargin)/2 + }, clb); + } + } + }); + // Define fade aniamtions as default + $.nmObj({anim: {def: 'fade'}}); +}); +/* + * nyroModal v2.0.0 + * + * Title filter + * + * Depends: + * + * Before: + */ +jQuery(function($, undefined) { + $.nmFilters({ + title: { + is: function(nm) { + return nm.opener.is('[title]'); + }, + beforeShowCont: function(nm) { + var offset = nm.elts.cont.offset(); + nm.store.title = $('

', { + text: nm.opener.attr('title') + }).addClass('nyroModalTitle nmReposition'); + nm.elts.cont.prepend(nm.store.title); + }, + close: function(nm) { + if (nm.store.title) { + nm.store.title.remove(); + nm.store.title = undefined; + delete(nm.store.title); + } + } + } + }); +}); +/* + * nyroModal v2.0.0 + * + * Gallery filter + * + * Depends: + * - filters.title + * + * Before: filters.title + */ +jQuery(function($, undefined) { + $.nmFilters({ + gallery: { + is: function(nm) { + var ret = nm.opener.is('[rel]:not([rel=external], [rel=nofollow])'); + if (ret) { + var rel = nm.opener.attr('rel'), + indexSpace = rel.indexOf(' '), + gal = indexSpace > 0 ? rel.substr(0, indexSpace) : rel, + links = $('[href][rel="'+gal+'"], [href][rel^="'+gal+' "]'); + if (links.length < 2) + ret = false; + if (ret && nm.galleryCounts && !nm._hasFilter('title')) + nm.filters.push('title'); + } + return ret; + }, + init: function(nm) { + nm.useKeyHandler = true; + }, + keyHandle: function(nm) { + // used for arrows key + if (!nm._animated && nm._opened) { + if (nm.keyEvent.keyCode == 39 || nm.keyEvent.keyCode == 40) { + nm.keyEvent.preventDefault(); + nm._callFilters('galleryNext'); + } else if (nm.keyEvent.keyCode == 37 || nm.keyEvent.keyCode == 38) { + nm.keyEvent.preventDefault(); + nm._callFilters('galleryPrev'); + } + } + }, + initElts: function(nm) { + var rel = nm.opener.attr('rel'), + indexSpace = rel.indexOf(' '); + nm.store.gallery = indexSpace > 0 ? rel.substr(0, indexSpace) : rel; + nm.store.galleryLinks = $('[href][rel="'+nm.store.gallery+'"], [href][rel^="'+nm.store.gallery+' "]'); + nm.store.galleryIndex = nm.store.galleryLinks.index(nm.opener); + }, + beforeShowCont: function(nm) { + if (nm.galleryCounts && nm.store.title && nm.store.galleryLinks && nm.store.galleryLinks.length > 1) { + var curTitle = nm.store.title.html(); + nm.store.title.html((curTitle.length ? curTitle+' - ' : '')+(nm.store.galleryIndex+1)+'/'+nm.store.galleryLinks.length); + } + }, + filledContent: function(nm) { + var link = this._getGalleryLink(nm, -1), + append = nm.elts.hidden.find(' > div'); + if (link) { + $('', { + text: 'previous', + href: '#' + }) + .addClass('nyroModalPrev') + .on('click', function(e) { + e.preventDefault(); + nm._callFilters('galleryPrev'); + }) + .appendTo(append); + } + link = this._getGalleryLink(nm, 1); + if (link) { + $('', { + text: 'next', + href: '#' + }) + .addClass('nyroModalNext') + .on('click', function(e) { + e.preventDefault(); + nm._callFilters('galleryNext'); + }) + .appendTo(append); + } + }, + close: function(nm) { + nm.store.gallery = undefined; + nm.store.galleryLinks = undefined; + nm.store.galleryIndex = undefined; + delete(nm.store.gallery); + delete(nm.store.galleryLinks); + delete(nm.store.galleryIndex); + if (nm.elts.cont) + nm.elts.cont.find('.nyroModalNext, .nyroModalPrev').remove(); + }, + galleryNext: function(nm) { + this._getGalleryLink(nm, 1).nyroModal(nm.getForNewLinks(), true).click(); + }, + galleryPrev: function(nm) { + this._getGalleryLink(nm, -1).nyroModal(nm.getForNewLinks(), true).click(); + }, + _getGalleryLink: function(nm, dir) { + if (nm.store.gallery) { + if (!nm.ltr) + dir *= -1; + var index = nm.store.galleryIndex + dir; + if (nm.store.galleryLinks && index >= 0 && index < nm.store.galleryLinks.length) + return nm.store.galleryLinks.eq(index); + else if (nm.galleryLoop && nm.store.galleryLinks) + return nm.store.galleryLinks.eq(index<0 ? nm.store.galleryLinks.length-1 : 0); + } + return undefined; + } + } + }); +}); +/* + * nyroModal v2.0.0 + * + * Link filter + * + * Depends: + * + * Before: filters.gallery + */ +jQuery(function($, undefined) { + $.nmFilters({ + link: { + is: function(nm) { + var ret = nm.opener.is('[href]'); + if (ret) + nm.store.link = nm.getInternal()._extractUrl(nm.opener.attr('href')); + return ret; + }, + init: function(nm) { + nm.loadFilter = 'link'; + nm.opener.off('click.nyroModal').on('click.nyroModal', function(e) { + e.preventDefault(); + nm.opener.trigger('nyroModal'); + }); + }, + load: function(nm) { + var ajax = $.extend(true, {}, nm.ajax || {}, { + url: nm.store.link.url, + data: nm.store.link.sel ? [{name: nm.selIndicator, value: nm.store.link.sel.substring(1)}] : undefined, + success: function(data) { + nm._setCont(data, nm.store.link.sel); + }, + error: function() { + nm._error(); + } + }); + + $.ajax(ajax); + } + } + }); +}); +/* + * nyroModal v2.0.0 + * + * Dom filter + * + * Depends: + * - filters.link + * + * Before: filters.link + */ +jQuery(function($, undefined) { + $.nmFilters({ + dom: { + is: function(nm) { + return nm._hasFilter('link') && !nm.store.link.url && nm.store.link.sel; + }, + init: function(nm) { + nm.loadFilter = 'dom'; + }, + load: function(nm) { + nm.store.domEl = $(nm.store.link.sel); + if (nm.store.domEl.length) + nm._setCont(nm.store.domEl.contents()); + else + nm._error(); + }, + close: function(nm) { + if (nm.store.domEl && nm.elts.cont) + nm.store.domEl.append(nm.elts.cont.find('.nyroModalDom').contents()); + } + } + }); +}); +/* + * nyroModal v2.0.0 + * + * Data filter + * + * Depends: + * - filters.link + * + * Before: filters.dom + */ +jQuery(function($, undefined) { + $.nmFilters({ + data: { + is: function(nm) { + var ret = nm.data ? true : false; + if (ret) { + nm._delFilter('dom'); + } + return ret; + }, + init: function(nm) { + nm.loadFilter = 'data'; + }, + load: function(nm) { + nm._setCont(nm.data); + } + } + }); +}); +/* + * nyroModal v2.0.0 + * + * Image filter + * + * Depends: + * - filters.link + * + * Before: filters.data + */ +jQuery(function($, undefined) { + $.nmFilters({ + image: { + is: function(nm) { + return (new RegExp(nm.imageRegex, 'i')).test(nm.opener.attr('href')); + }, + init: function(nm) { + nm.loadFilter = 'image'; + }, + load: function(nm) { + var url = nm.opener.attr('href'); + $('') + .load(function() { + nm.elts.cont.addClass('nyroModalImg'); + nm.elts.hidden.addClass('nyroModalImg'); + nm._setCont(this); + }).error(function() { + nm._error(); + }) + .attr('src', url); + }, + size: function(nm) { + if (nm.sizes.w != nm.sizes.initW || nm.sizes.h != nm.sizes.initH) { + var ratio = Math.min(nm.sizes.w/nm.sizes.initW, nm.sizes.h/nm.sizes.initH); + nm.sizes.w = nm.sizes.initW * ratio; + nm.sizes.h = nm.sizes.initH * ratio; + } + var img = nm.loading ? nm.elts.hidden.find('img') : nm.elts.cont.find('img'); + img.attr({ + width: nm.sizes.w, + height: nm.sizes.h + }); + }, + close: function(nm) { + if (nm.elts.cont) { + nm.elts.cont.removeClass('nyroModalImg'); + nm.elts.hidden.removeClass('nyroModalImg'); + } + } + } + }); +}); +/* + * nyroModal v2.0.0 + * + * SWF filter + * + * Depends: + * - filters.link + * + * Before: filters.image + */ +jQuery(function($, undefined) { + $.nmFilters({ + swf: { + idCounter: 1, + is: function(nm) { + return nm._hasFilter('link') && nm.opener.is('[href$=".swf"]'); + }, + init: function(nm) { + nm.loadFilter = 'swf'; + }, + load: function(nm) { + if (!nm.swfObjectId) + nm.swfObjectId = 'nyroModalSwf-'+(this.idCounter++); + var url = nm.store.link.url, + cont = '
', + tmp = ''; + $.each(nm.swf, function(name, val) { + cont+= ''; + tmp+= ' '+name+'="'+val+'"'; + }); + cont+= '
'; + nm._setCont(cont); + } + } + }); +}); +/* + * nyroModal v2.0.0 + * + * Form filter + * + * Depends: + * + * Before: filters.swf + */ +jQuery(function($, undefined) { + $.nmFilters({ + form: { + is: function(nm) { + var ret = nm.opener.is('form'); + if (ret) + nm.store.form = nm.getInternal()._extractUrl(nm.opener.attr('action')); + return ret; + }, + init: function(nm) { + nm.loadFilter = 'form'; + nm.opener.off('submit.nyroModal').on('submit.nyroModal', function(e) { + e.preventDefault(); + nm.opener.trigger('nyroModal'); + }); + }, + load: function(nm) { + var data = {}; + $.map(nm.opener.serializeArray(), function(d){ + data[d.name] = d.value; + }); + if (nm.store.form.sel) + data[nm.selIndicator] = nm.store.form.sel.substring(1); + + var ajax = $.extend(true, { type : 'get', dataType : 'text' }, nm.ajax || {}, { + url: nm.store.form.url, + data: data, + type: nm.opener.attr('method') ? nm.opener.attr('method') : undefined, + success: function(data) { + nm._setCont(data, nm.store.form.sel); + }, + error: function() { + nm._error(); + } + }); + + $.ajax(ajax); + } + } + }); +}); +/* + * nyroModal v2.0.0 + * + * Form file filter + * + * Depends: + * + * Before: filters.form + */ +jQuery(function($, undefined) { + $.nmFilters({ + formFile: { + is: function(nm) { + var ret = nm.opener.is('form[enctype="multipart/form-data"]'); + if (ret) { + nm._delFilter('form'); + if (!nm.store.form) + nm.store.form = nm.getInternal()._extractUrl(nm.opener.attr('action')); + } + return ret; + }, + init: function(nm) { + nm.loadFilter = 'formFile'; + nm.store.formFileLoading = false; + nm.opener.off('submit.nyroModal').on('submit.nyroModal', function(e) { + if (!nm.store.formFileIframe) { + e.preventDefault(); + nm.opener.trigger('nyroModal'); + } else { + nm.store.formFileLoading = true; + } + }); + }, + initElts: function(nm) { + var inputSel; + if (nm.store.form.sel) + inputSel = $('', { + 'type': 'hidden', + name: nm.selIndicator, + value: nm.store.form.sel.substring(1) + }).appendTo(nm.opener); + function rmFormFileElts() { + if (inputSel) { + inputSel.remove(); + inputSel = undefined; + delete(inputSel); + } + nm.store.formFileIframe.attr('src', 'about:blank').remove(); + nm.store.formFileIframe = undefined; + delete(nm.store.formFileIframe); + } + nm.store.formFileIframe = $('') + .hide() + .load(function() { + if (nm.store.formFileLoading) { + nm.store.formFileLoading = false; + var content = nm.store.formFileIframe + .off('load error') + .contents().find('body').not('script[src]'); + if (content && content.html() && content.html().length) { + rmFormFileElts(); + nm._setCont(content.html(), nm.store.form.sel); + } else { + // Not totally ready, try it in a few secs + var nbTry = 0; + fct = function() { + nbTry++; + var content = nm.store.formFileIframe + .off('load error') + .contents().find('body').not('script[src]'); + if (content && content.html() && content.html().length) { + nm._setCont(content.html(), nm.store.form.sel); + rmFormFileElts(); + } else if (nbTry < 5) { + setTimeout(fct, 25); + } else { + rmFormFileElts(); + nm._error(); + } + }; + setTimeout(fct, 25); + } + } + }) + .error(function() { + rmFormFileElts(); + nm._error(); + }); + nm.elts.all.append(nm.store.formFileIframe); + nm.opener + .attr('target', 'nyroModalFormFile') + .submit(); + }, + close: function(nm) { + nm.store.formFileLoading = false; + if (nm.store.formFileIframe) { + nm.store.formFileIframe.remove(); + nm.store.formFileIframe = undefined; + delete(nm.store.formFileIframe); + } + } + } + }); +}); +/* + * nyroModal v2.0.0 + * + * Iframe filter + * + * Depends: + * - filters.link + * + * Before: filters.formFile + */ +jQuery(function($, undefined) { + $.nmFilters({ + iframe: { + is: function(nm) { + var target = nm.opener.attr('target') || '', + rel = nm.opener.attr('rel') || '', + opener = nm.opener.get(0); + return !nm._hasFilter('image') && (target.toLowerCase() == '_blank' + || rel.toLowerCase().indexOf('external') > -1 + || (opener.hostname && opener.hostname.replace(/:\d*$/,'') != window.location.hostname.replace(/:\d*$/,''))); + }, + init: function(nm) { + nm.loadFilter = 'iframe'; + }, + load: function(nm) { + nm.store.iframe = $(''); + nm._setCont(nm.store.iframe); + }, + afterShowCont: function(nm) { + nm.store.iframe.attr('src', nm.opener.attr('href')); + }, + close: function(nm) { + if (nm.store.iframe) { + nm.store.iframe.remove(); + nm.store.iframe = undefined; + delete(nm.store.iframe); + } + } + } + }); +}); +/* + * nyroModal v2.0.0 + * + * Iframe form filter + * + * Depends: + * - filters.iframe + * + * Before: filters.iframe + */ +jQuery(function($, undefined) { + $.nmFilters({ + iframeForm: { + is: function(nm) { + var ret = nm._hasFilter('iframe') && nm.opener.is('form'); + if (ret) { + nm._delFilter('iframe'); + nm._delFilter('form'); + } + return ret; + }, + init: function(nm) { + nm.loadFilter = 'iframeForm'; + nm.store.iframeFormLoading = false; + nm.store.iframeFormOrgTarget = nm.opener.attr('target'); + nm.opener.off('submit.nyroModal').on('submit.nyroModal', function(e) { + if (!nm.store.iframeFormIframe) { + e.preventDefault(); + nm.opener.trigger('nyroModal'); + } else { + nm.store.iframeFormLoading = true; + } + }); + }, + load: function(nm) { + nm.store.iframeFormIframe = $(''); + nm._setCont(nm.store.iframeFormIframe); + }, + afterShowCont: function(nm) { + nm.opener + .attr('target', 'nyroModalIframeForm') + .submit(); + }, + close: function(nm) { + nm.store.iframeFormOrgTarget ? nm.opener.attr('target', nm.store.iframeFormOrgTarget) : nm.opener.removeAttr('target'); + delete(nm.store.formFileLoading); + delete(nm.store.iframeFormOrgTarget); + if (nm.store.iframeFormIframe) { + nm.store.iframeFormIframe.remove(); + nm.store.iframeFormIframe = undefined; + delete(nm.store.iframeFormIframe); + } + } + } + }); +}); +/* + * nyroModal v2.0.0 + * + * Embedly filter + * + * Depends: + * - filters.link + * + * Before: filters.iframeForm + */ +jQuery(function($, undefined) { + $.nmObj({ + embedlyUrl: 'http://api.embed.ly/1/oembed', + embedly: { + key: undefined, + wmode: 'transparent', + allowscripts: true, + format: 'json' + + /* + maxwidth: 400, + maxheight: 400, + width: 400, + nostyle: false, + autoplay: false, + videosrc: false, + words: 50, + chars: 100 + */ + } + }); + var cache = []; + $.nmFilters({ + embedly: { + is: function(nm) { + if (nm._hasFilter('link') && nm._hasFilter('iframe') && nm.opener.attr('href') && nm.embedly.key) { + if (cache[nm.opener.attr('href')]) { + nm.store.embedly = cache[nm.opener.attr('href')]; + nm._delFilter('iframe'); + return true; + } + nm.store.embedly = false; + var data = nm.embedly; + data.url = nm.opener.attr('href'); + $.ajax({ + url: nm.embedlyUrl, + dataType: 'jsonp', + data: data, + success: function(data) { + if (data.type != 'error') { + nm.store.embedly = data; + cache[nm.opener.attr('href')] = data; + nm._delFilter('iframe'); + nm.filters.push('embedly'); + nm._callFilters('initFilters'); + nm._callFilters('init'); + } + } + }); + } + return false; + }, + init: function(nm) { + nm.loadFilter = 'embedly'; + }, + load: function(nm) { + if (nm.store.embedly.type == 'photo') { + nm.filters.push('image'); + $('') + .load(function() { + nm.elts.cont.addClass('nyroModalImg'); + nm.elts.hidden.addClass('nyroModalImg'); + nm._setCont(this); + }).error(function() { + nm._error(); + }) + .attr('src', nm.store.embedly.url); + } else { + nm._setCont('
'+nm.store.embedly.html+'
'); + } + }, + size: function(nm) { + if (nm.store.embedly.width && !nm.sizes.height) { + nm.sizes.w = nm.store.embedly.width; + nm.sizes.h = nm.store.embedly.height; + } + } + } + }); +}); diff --git a/WebContent/js/jqueryNyroModal/jquery.nyroModal.custom.min.js b/WebContent/js/jqueryNyroModal/jquery.nyroModal.custom.min.js new file mode 100755 index 0000000..28b25b1 --- /dev/null +++ b/WebContent/js/jqueryNyroModal/jquery.nyroModal.custom.min.js @@ -0,0 +1,35 @@ +/* + * nyroModal v2.0.0 + * Core + * + * Commit 15acdbfd58dae7610a5456d80fa2806c9ed4e0d7 (01/19/2012) * + * + * Included parts: + * - anims.fade + * - filters.title + * - filters.gallery + * - filters.link + * - filters.dom + * - filters.data + * - filters.image + * - filters.swf + * - filters.form + * - filters.formFile + * - filters.iframe + * - filters.iframeForm + * - filters.embedly + */ + jQuery(function($,undefined){var $w=$(window),$d=$(document),$b=$('body'),baseHref=$('base').attr('href'),_nmObj={filters:[],callbacks:{},loadFilter:undefined,modal:false,closeOnEscape:true,closeOnClick:true,useKeyHandler:false,showCloseButton:true,closeButton:'
Close',stack:false,nonStackable:'form',header:undefined,footer:undefined,galleryLoop:true,galleryCounts:true,ltr:true,imageRegex:'[^\.]\.(jpg|jpeg|png|tiff|gif|bmp)\s*$',selIndicator:'nyroModalSel',swfObjectId:undefined,swf:{allowFullScreen:'true',allowscriptaccess:'always',wmode:'transparent'},store:{},errorMsg:'An error occured',elts:{all:undefined,bg:undefined,load:undefined,cont:undefined,hidden:undefined},sizes:{initW:undefined,initH:undefined,w:undefined,h:undefined,minW:undefined,minH:undefined,wMargin:undefined,hMargin:undefined},anim:{def:undefined,showBg:undefined,hideBg:undefined,showLoad:undefined,hideLoad:undefined,showCont:undefined,hideCont:undefined,showTrans:undefined,hideTrans:undefined,resize:undefined},_open:false,_bgReady:false,_opened:false,_loading:false,_animated:false,_transition:false,_nmOpener:undefined,_nbContentLoading:0,_scripts:'',_scriptsShown:'',saveObj:function(){this.opener.data('nmObj',this);},open:function(){if(this._nmOpener)this._nmOpener._close();this.getInternal()._pushStack(this.opener);this._opened=false;this._bgReady=false;this._open=true;this._initElts();this._load();this._nbContentLoading=0;this._callAnim('showBg',$.proxy(function(){this._bgReady=true;if(this._nmOpener){this._nmOpener._bgReady=false;this._nmOpener._loading=false;this._nmOpener._animated=false;this._nmOpener._opened=false;this._nmOpener._open=false;this._nmOpener.elts.cont=this._nmOpener.elts.hidden=this._nmOpener.elts.load=this._nmOpener.elts.bg=this._nmOpener.elts.all=undefined;this._nmOpener.saveObj();this._nmOpener=undefined;}this._contentLoading();},this));},resize:function(recalc){if(recalc){this.elts.hidden.append(this.elts.cont.children().first().clone());this.sizes.initW=this.sizes.w=this.elts.hidden.width();this.sizes.initH=this.sizes.h=this.elts.hidden.height();this.elts.hidden.empty();}else{this.sizes.w=this.sizes.initW;this.sizes.h=this.sizes.initH;}this._unreposition();this.size();this._callAnim('resize',$.proxy(function(){this._reposition();},this));},size:function(){var maxHeight=this.getInternal().fullSize.viewH-this.sizes.hMargin,maxWidth=this.getInternal().fullSize.viewW-this.sizes.wMargin;if(this.sizes.minW&&this.sizes.minW>this.sizes.w)this.sizes.w=this.sizes.minW;if(this.sizes.minH&&this.sizes.minH>this.sizes.h)this.sizes.h=this.sizes.minH;if(this.sizes.h>maxHeight||this.sizes.w>maxWidth){this.sizes.h=Math.min(this.sizes.h,maxHeight);this.sizes.w=Math.min(this.sizes.w,maxWidth);}this._callFilters('size');},getForNewLinks:function(elt){var ret;if(this.stack&&(!elt||this.isStackable(elt))){ret=$.extend(true,{},this);ret._nmOpener=undefined;ret.elts.all=undefined;}else{ret=$.extend({},this);ret._nmOpener=this;}ret.filters=[];ret.opener=undefined;ret._open=false;return ret;},isStackable:function(elt){return!elt.is(this.nonStackable);},keyHandle:function(e){this.keyEvent=e;this._callFilters('keyHandle');this.keyEvent=undefined;delete(this.keyEvent);},getInternal:function(){return _internal;},_close:function(){this.getInternal()._removeStack(this.opener);this._opened=false;this._open=false;this._callFilters('close');},close:function(){this._close();this._callFilters('beforeClose');var self=this;this._unreposition();self._callAnim('hideCont',function(){self._callAnim('hideLoad',function(){self._callAnim('hideBg',function(){self._callFilters('afterClose');self.elts.cont.remove();self.elts.hidden.remove();self.elts.load.remove();self.elts.bg.remove();self.elts.all.remove();self.elts.cont=self.elts.hidden=self.elts.load=self.elts.bg=self.elts.all=undefined;});});});},_initElts:function(){if(!this.stack&&this.getInternal().stack.length>1)this.elts=this.getInternal().stack[this.getInternal().stack.length-2]['nmObj'].elts;if(!this.elts.all||this.elts.all.closest('body').length==0)this.elts.all=this.elts.bg=this.elts.cont=this.elts.hidden=this.elts.load=undefined;if(!this.elts.all)this.elts.all=$('
').appendTo(this.getInternal()._container);if(!this.elts.bg)this.elts.bg=$('
').hide().appendTo(this.elts.all);if(!this.elts.cont)this.elts.cont=$('
').hide().appendTo(this.elts.all);if(!this.elts.hidden)this.elts.hidden=$('
').hide().appendTo(this.elts.all);this.elts.hidden.empty();if(!this.elts.load)this.elts.load=$('
').hide().appendTo(this.elts.all);this._callFilters('initElts');},_error:function(){this._callFilters('error');},_setCont:function(html,selector){if(selector){var tmp=[],i=0;html=html .replace(/\r\n/gi,'nyroModalLN').replace(//gi,function(x){tmp[i]=x;return '
';});var cur=$('
'+html+'
').find(selector);if(cur.length){html=cur.html().replace(/
<\/pre>/gi,function(x,y,z){return tmp[y];}).replace(/nyroModalLN/gi,"\r\n");}else{this._error();return;}}this.elts.hidden .append(this._filterScripts(html)).prepend(this.header).append(this.footer).wrapInner('
');this.sizes.initW=this.sizes.w=this.elts.hidden.width();this.sizes.initH=this.sizes.h=this.elts.hidden.height();var outer=this.getInternal()._getOuter(this.elts.cont);this.sizes.hMargin=outer.h.total;this.sizes.wMargin=outer.w.total;this.size();this.loading=false;this._callFilters('filledContent');this._contentLoading();},_filterScripts:function(data){if(typeof data!='string')return data;this._scripts=[];this._scriptsShown=[];var start=0,stStart='',endLn=stEnd.length,pos,pos2,tmp;while((pos=data.indexOf(stStart,start))>-1){pos2=data.indexOf(stEnd)+endLn;tmp=$(data.substring(pos,pos2));if(!tmp.attr('src')||tmp.attr('rel')=='forceLoad'){if(tmp.attr('rev')=='shown')this._scriptsShown.push(tmp.get(0));else this._scripts.push(tmp.get(0));}data=data.substring(0,pos)+data.substr(pos2);start=pos;}return data;},_hasFilter:function(filter){var ret=false;$.each(this.filters,function(i,f){ret=ret||f==filter;});return ret;},_delFilter:function(filter){this.filters=$.map(this.filters,function(v){if(v!=filter)return v;});},_callFilters:function(fct){this.getInternal()._debug(fct);var ret=[],self=this;$.each(this.filters,function(i,f){ret[f]=self._callFilter(f,fct);});if(this.callbacks[fct]&&$.isFunction(this.callbacks[fct]))this.callbacks[fct](this);return ret;},_callFilter:function(f,fct){if(_filters[f]&&_filters[f][fct]&&$.isFunction(_filters[f][fct]))return _filters[f][fct](this);return undefined;},_callAnim:function(fct,clb){this.getInternal()._debug(fct);this._callFilters('before'+ucfirst(fct));if(!this._animated){this._animated=true;if(!$.isFunction(clb))clb=$.noop;var set=this.anim[fct]||this.anim.def||'basic';if(!_animations[set]||!_animations[set][fct]||!$.isFunction(_animations[set][fct]))set='basic';_animations[set][fct](this,$.proxy(function(){this._animated=false;this._callFilters('after'+ucfirst(fct));clb();},this));}},_load:function(){this.getInternal()._debug('_load');if(!this.loading&&this.loadFilter){this.loading=true;this._callFilter(this.loadFilter,'load');}},_contentLoading:function(){if(!this._animated&&this._bgReady){if(!this._transition&&this.elts.cont.html().length>0)this._transition=true;this._nbContentLoading++;if(!this.loading){if(!this._opened){this._opened=true;if(this._transition){var fct=$.proxy(function(){this._writeContent();this._callFilters('beforeShowCont');this._callAnim('hideTrans',$.proxy(function(){this._transition=false;this._callFilters('afterShowCont');this.elts.cont.append(this._scriptsShown);this._reposition();},this));},this);if(this._nbContentLoading==1){this._unreposition();this._callAnim('showTrans',fct);}else{fct();}}else{this._callAnim('hideLoad',$.proxy(function(){this._writeContent();this._callAnim('showCont',$.proxy(function(){this.elts.cont.append(this._scriptsShown);this._reposition();},this));},this));}}}else if(this._nbContentLoading==1){var outer=this.getInternal()._getOuter(this.elts.load);this.elts.load .css({position:'fixed',top:(this.getInternal().fullSize.viewH-this.elts.load.height()-outer.h.margin)/2,left:(this.getInternal().fullSize.viewW-this.elts.load.width()-outer.w.margin)/2});if(this._transition){this._unreposition();this._callAnim('showTrans',$.proxy(function(){this._contentLoading();},this));}else{this._callAnim('showLoad',$.proxy(function(){this._contentLoading();},this));}}}},_writeContent:function(){this.elts.cont .empty().append(this.elts.hidden.contents()).append(this._scripts).append(this.showCloseButton?this.closeButton:'').css({position:'fixed',width:this.sizes.w,height:this.sizes.h,top:(this.getInternal().fullSize.viewH-this.sizes.h-this.sizes.hMargin)/2,left:(this.getInternal().fullSize.viewW-this.sizes.w-this.sizes.wMargin)/2});},_reposition:function(){var elts=this.elts.cont.find('.nmReposition');if(elts.length){var space=this.getInternal()._getSpaceReposition();elts.each(function(){var me=$(this),offset=me.offset();me.css({position:'fixed',top:offset.top-space.top,left:offset.left-space.left});});this.elts.cont.after(elts);}this.elts.cont.css('overflow','auto');this._callFilters('afterReposition');},_unreposition:function(){this.elts.cont.css('overflow','');var elts=this.elts.all.find('.nmReposition');if(elts.length)this.elts.cont.append(elts.removeAttr('style'));this._callFilters('afterUnreposition');}},_internal={firstInit:true,debug:false,stack:[],fullSize:{w:0,h:0,wW:0,wH:0,viewW:0,viewH:0},nyroModal:function(opts,fullObj){if(_internal.firstInit){_internal._container=$('
').appendTo($b);$w.smartresize($.proxy(_internal._resize,_internal));$d.on('keydown.nyroModal',$.proxy(_internal._keyHandler,_internal));_internal._calculateFullSize();_internal.firstInit=false;}return this.nmInit(opts,fullObj).each(function(){_internal._init($(this).data('nmObj'));});},nmInit:function(opts,fullObj){return this.each(function(){var me=$(this);if(fullObj)me.data('nmObj',$.extend(true,{opener:me},opts));else me.data('nmObj',me.data('nmObj')?$.extend(true,me.data('nmObj'),opts):$.extend(true,{opener:me},_nmObj,opts));});},nmCall:function(){return this.trigger('nyroModal');},nmManual:function(url,opts){$('').nyroModal(opts).trigger('nyroModal');},nmData:function(data,opts){this.nmManual('#',$.extend({data:data},opts));},nmObj:function(opts){$.extend(true,_nmObj,opts);},nmInternal:function(opts){$.extend(true,_internal,opts);},nmAnims:function(opts){$.extend(true,_animations,opts);},nmFilters:function(opts){$.extend(true,_filters,opts);},nmTop:function(){if(_internal.stack.length)return _internal.stack[_internal.stack.length-1]['nmObj'];return undefined;},_debug:function(msg){if(this.debug&&window.console&&window.console.log)window.console.log(msg);},_container:undefined,_init:function(nm){nm.filters=[];$.each(_filters,function(f,obj){if(obj.is&&$.isFunction(obj.is)&&obj.is(nm)){nm.filters.push(f);}});nm._callFilters('initFilters');nm._callFilters('init');nm.opener .off('nyroModal.nyroModal nmClose.nyroModal nmResize.nyroModal').on({'nyroModal.nyroModal':function(e){nm.open();return false;},'nmClose.nyroModal':function(){nm.close();return false;},'nmResize.nyroModal':function(){nm.resize();return false;}});},_scrollWidth:(function(){var scrollbarWidth;if($.browser.msie){var $textarea1=$('').css({position:'absolute',top:-1000,left:-1000}).appendTo($b),$textarea2=$('').css({position:'absolute',top:-1000,left:-1000}).appendTo($b);scrollbarWidth=$textarea1.width()-$textarea2.width();$textarea1.add($textarea2).remove();}else{var $div=$('
').css({width:100,height:100,overflow:'auto',position:'absolute',top:-1000,left:-1000}).prependTo($b).append('
').find('div').css({width:'100%',height:200});scrollbarWidth=100-$div.width();$div.parent().remove();}return scrollbarWidth;})(),_selNyroModal:function(obj){return $(obj).data('nmObj')?true:false;},_selNyroModalOpen:function(obj){var me=$(obj);return me.data('nmObj')?me.data('nmObj')._open:false;},_keyHandler:function(e){var nmTop=$.nmTop();if(nmTop&&nmTop.useKeyHandler){return nmTop.keyHandle(e);}},_pushStack:function(obj){this.stack=$.map(this.stack,function(elA){if(elA['nmOpener']!=obj.get(0))return elA;});this.stack.push({nmOpener:obj.get(0),nmObj:$(obj).data('nmObj')});},_removeStack:function(obj){this.stack=$.map(this.stack,function(elA){if(elA['nmOpener']!=obj.get(0))return elA;});},_resize:function(){var opens=$(':nmOpen').each(function(){$(this).data('nmObj')._unreposition();});this._calculateFullSize();opens.trigger('nmResize');},_calculateFullSize:function(){this.fullSize={w:$d.width(),h:$d.height(),wW:$w.width(),wH:$w.height()};this.fullSize.viewW=Math.min(this.fullSize.w,this.fullSize.wW);this.fullSize.viewH=Math.min(this.fullSize.h,this.fullSize.wH);},_getCurCSS:function(elm,name){var ret=parseInt($.curCSS(elm,name,true));return isNaN(ret)?0:ret;},_getOuter:function(elm){elm=elm.get(0);var ret={h:{margin:this._getCurCSS(elm,'marginTop')+this._getCurCSS(elm,'marginBottom'),border:this._getCurCSS(elm,'borderTopWidth')+this._getCurCSS(elm,'borderBottomWidth'),padding:this._getCurCSS(elm,'paddingTop')+this._getCurCSS(elm,'paddingBottom')},w:{margin:this._getCurCSS(elm,'marginLeft')+this._getCurCSS(elm,'marginRight'),border:this._getCurCSS(elm,'borderLeftWidth')+this._getCurCSS(elm,'borderRightWidth'),padding:this._getCurCSS(elm,'paddingLeft')+this._getCurCSS(elm,'paddingRight')}};ret.h.outer=ret.h.margin+ret.h.border;ret.w.outer=ret.w.margin+ret.w.border;ret.h.inner=ret.h.padding+ret.h.border;ret.w.inner=ret.w.padding+ret.w.border;ret.h.total=ret.h.outer+ret.h.padding;ret.w.total=ret.w.outer+ret.w.padding;return ret;},_getSpaceReposition:function(){var outer=this._getOuter($b),ie7=$.browser.msie&&$.browser.version<8&&!(screen.height<=$w.height()+23);return{top:$w.scrollTop()-(!ie7?outer.h.border/2:0),left:$w.scrollLeft()-(!ie7?outer.w.border/2:0)};},_getHash:function(url){if(typeof url=='string'){var hashPos=url.indexOf('#');if(hashPos>-1)return url.substring(hashPos);}return '';},_extractUrl:function(url){var ret={url:undefined,sel:undefined};if(url){var hash=this._getHash(url),hashLoc=this._getHash(window.location.href),curLoc=window.location.href.substring(0,window.location.href.length-hashLoc.length),req=url.substring(0,url.length-hash.length);ret.sel=hash;if(req!=curLoc&&req!=baseHref)ret.url=req;}return ret;}},_animations={basic:{showBg:function(nm,clb){nm.elts.bg.css({opacity:0.7}).show();clb();},hideBg:function(nm,clb){nm.elts.bg.hide();clb();},showLoad:function(nm,clb){nm.elts.load.show();clb();},hideLoad:function(nm,clb){nm.elts.load.hide();clb();},showCont:function(nm,clb){nm.elts.cont.show();clb();},hideCont:function(nm,clb){nm.elts.cont.hide();clb();},showTrans:function(nm,clb){nm.elts.cont.hide();nm.elts.load.show();clb();},hideTrans:function(nm,clb){nm.elts.cont.show();nm.elts.load.hide();clb();},resize:function(nm,clb){nm.elts.cont.css({width:nm.sizes.w,height:nm.sizes.h,top:(nm.getInternal().fullSize.viewH-nm.sizes.h-nm.sizes.hMargin)/2,left:(nm.getInternal().fullSize.viewW-nm.sizes.w-nm.sizes.wMargin)/2});clb();}}},_filters={basic:{is:function(nm){return true;},init:function(nm){if(nm.opener.attr('rev')=='modal')nm.modal=true;if(nm.modal)nm.closeOnEscape=nm.closeOnClick=nm.showCloseButton=false;if(nm.closeOnEscape)nm.useKeyHandler=true;},initElts:function(nm){nm.elts.bg.addClass('nyroModalBg');if(nm.closeOnClick)nm.elts.bg.off('click.nyroModal').on('click.nyroModal',function(e){e.preventDefault();nm.close();});nm.elts.cont.addClass('nyroModalCont');nm.elts.hidden.addClass('nyroModalCont nyroModalHidden');nm.elts.load.addClass('nyroModalCont nyroModalLoad');},error:function(nm){nm.elts.hidden.addClass('nyroModalError');nm.elts.cont.addClass('nyroModalError');nm._setCont(nm.errorMsg);},beforeShowCont:function(nm){nm.elts.cont .find('.nyroModal').each(function(){var cur=$(this);cur.nyroModal(nm.getForNewLinks(cur),true);}).end().find('.nyroModalClose').on('click.nyroModal',function(e){e.preventDefault();nm.close();});},keyHandle:function(nm){if(nm.keyEvent.keyCode==27&&nm.closeOnEscape){nm.keyEvent.preventDefault();nm.close();}}},custom:{is:function(nm){return true;}}};$.fn.extend({nm:_internal.nyroModal,nyroModal:_internal.nyroModal,nmInit:_internal.nmInit,nmCall:_internal.nmCall});$.extend({nmManual:_internal.nmManual,nmData:_internal.nmData,nmObj:_internal.nmObj,nmInternal:_internal.nmInternal,nmAnims:_internal.nmAnims,nmFilters:_internal.nmFilters,nmTop:_internal.nmTop});$.expr[':'].nyroModal=$.expr[':'].nm=_internal._selNyroModal;$.expr[':'].nmOpen=_internal._selNyroModalOpen;});(function($,sr){var debounce=function(func,threshold,execAsap){var timeout;return function debounced(){var obj=this,args=arguments;function delayed(){if(!execAsap)func.apply(obj,args);timeout=null;};if(timeout)clearTimeout(timeout);else if(execAsap)func.apply(obj,args);timeout=setTimeout(delayed,threshold||100);};};jQuery.fn[sr]=function(fn){return fn?this.on('resize',debounce(fn)):this.trigger(sr);};})(jQuery,'smartresize');function ucfirst(str){str+='';var f=str.charAt(0).toUpperCase();return f+str.substr(1);}; + jQuery(function($,undefined){$.nmAnims({fade:{showBg:function(nm,clb){nm.elts.bg.fadeTo(250,0.7,clb);},hideBg:function(nm,clb){nm.elts.bg.fadeOut(clb);},showLoad:function(nm,clb){nm.elts.load.fadeIn(clb);},hideLoad:function(nm,clb){nm.elts.load.fadeOut(clb);},showCont:function(nm,clb){nm.elts.cont.fadeIn(clb);},hideCont:function(nm,clb){nm.elts.cont.css('overflow','hidden').fadeOut(clb);},showTrans:function(nm,clb){nm.elts.load .css({position:nm.elts.cont.css('position'),top:nm.elts.cont.css('top'),left:nm.elts.cont.css('left'),width:nm.elts.cont.css('width'),height:nm.elts.cont.css('height'),marginTop:nm.elts.cont.css('marginTop'),marginLeft:nm.elts.cont.css('marginLeft')}).fadeIn(function(){nm.elts.cont.hide();clb();});},hideTrans:function(nm,clb){nm.elts.cont.css('visibility','hidden').show();nm.elts.load .css('position',nm.elts.cont.css('position')).animate({top:nm.elts.cont.css('top'),left:nm.elts.cont.css('left'),width:nm.elts.cont.css('width'),height:nm.elts.cont.css('height'),marginTop:nm.elts.cont.css('marginTop'),marginLeft:nm.elts.cont.css('marginLeft')},function(){nm.elts.cont.css('visibility','');nm.elts.load.fadeOut(clb);});},resize:function(nm,clb){nm.elts.cont.animate({width:nm.sizes.w,height:nm.sizes.h,top:(nm.getInternal().fullSize.viewH-nm.sizes.h-nm.sizes.hMargin)/2,left:(nm.getInternal().fullSize.viewW-nm.sizes.w-nm.sizes.wMargin)/2},clb);}}});$.nmObj({anim:{def:'fade'}});});; + jQuery(function($,undefined){$.nmFilters({title:{is:function(nm){return nm.opener.is('[title]');},beforeShowCont:function(nm){var offset=nm.elts.cont.offset();nm.store.title=$('

',{text:nm.opener.attr('title')}).addClass('nyroModalTitle nmReposition');nm.elts.cont.prepend(nm.store.title);},close:function(nm){if(nm.store.title){nm.store.title.remove();nm.store.title=undefined;delete(nm.store.title);}}}});});; + jQuery(function($,undefined){$.nmFilters({gallery:{is:function(nm){var ret=nm.opener.is('[rel]:not([rel=external], [rel=nofollow])');if(ret){var rel=nm.opener.attr('rel'),indexSpace=rel.indexOf(' '),gal=indexSpace>0?rel.substr(0,indexSpace):rel,links=$('[href][rel="'+gal+'"], [href][rel^="'+gal+' "]');if(links.length<2)ret=false;if(ret&&nm.galleryCounts&&!nm._hasFilter('title'))nm.filters.push('title');}return ret;},init:function(nm){nm.useKeyHandler=true;},keyHandle:function(nm){if(!nm._animated&&nm._opened){if(nm.keyEvent.keyCode==39||nm.keyEvent.keyCode==40){nm.keyEvent.preventDefault();nm._callFilters('galleryNext');}else if(nm.keyEvent.keyCode==37||nm.keyEvent.keyCode==38){nm.keyEvent.preventDefault();nm._callFilters('galleryPrev');}}},initElts:function(nm){var rel=nm.opener.attr('rel'),indexSpace=rel.indexOf(' ');nm.store.gallery=indexSpace>0?rel.substr(0,indexSpace):rel;nm.store.galleryLinks=$('[href][rel="'+nm.store.gallery+'"], [href][rel^="'+nm.store.gallery+' "]');nm.store.galleryIndex=nm.store.galleryLinks.index(nm.opener);},beforeShowCont:function(nm){if(nm.galleryCounts&&nm.store.title&&nm.store.galleryLinks&&nm.store.galleryLinks.length>1){var curTitle=nm.store.title.html();nm.store.title.html((curTitle.length?curTitle+' - ':'')+(nm.store.galleryIndex+1)+'/'+nm.store.galleryLinks.length);}},filledContent:function(nm){var link=this._getGalleryLink(nm,-1),append=nm.elts.hidden.find(' > div');if(link){$('',{text:'previous',href:'#'}).addClass('nyroModalPrev').on('click',function(e){e.preventDefault();nm._callFilters('galleryPrev');}).appendTo(append);}link=this._getGalleryLink(nm,1);if(link){$('',{text:'next',href:'#'}).addClass('nyroModalNext').on('click',function(e){e.preventDefault();nm._callFilters('galleryNext');}).appendTo(append);}},close:function(nm){nm.store.gallery=undefined;nm.store.galleryLinks=undefined;nm.store.galleryIndex=undefined;delete(nm.store.gallery);delete(nm.store.galleryLinks);delete(nm.store.galleryIndex);if(nm.elts.cont)nm.elts.cont.find('.nyroModalNext, .nyroModalPrev').remove();},galleryNext:function(nm){this._getGalleryLink(nm,1).nyroModal(nm.getForNewLinks(),true).click();},galleryPrev:function(nm){this._getGalleryLink(nm,-1).nyroModal(nm.getForNewLinks(),true).click();},_getGalleryLink:function(nm,dir){if(nm.store.gallery){if(!nm.ltr)dir *=-1;var index=nm.store.galleryIndex+dir;if(nm.store.galleryLinks&&index>=0&&index').load(function(){nm.elts.cont.addClass('nyroModalImg');nm.elts.hidden.addClass('nyroModalImg');nm._setCont(this);}).error(function(){nm._error();}).attr('src',url);},size:function(nm){if(nm.sizes.w!=nm.sizes.initW||nm.sizes.h!=nm.sizes.initH){var ratio=Math.min(nm.sizes.w/nm.sizes.initW,nm.sizes.h/nm.sizes.initH);nm.sizes.w=nm.sizes.initW * ratio;nm.sizes.h=nm.sizes.initH * ratio;}var img=nm.loading?nm.elts.hidden.find('img'):nm.elts.cont.find('img');img.attr({width:nm.sizes.w,height:nm.sizes.h});},close:function(nm){if(nm.elts.cont){nm.elts.cont.removeClass('nyroModalImg');nm.elts.hidden.removeClass('nyroModalImg');}}}});});; + jQuery(function($,undefined){$.nmFilters({swf:{idCounter:1,is:function(nm){return nm._hasFilter('link')&&nm.opener.is('[href$=".swf"]');},init:function(nm){nm.loadFilter='swf';},load:function(nm){if(!nm.swfObjectId)nm.swfObjectId='nyroModalSwf-'+(this.idCounter++);var url=nm.store.link.url,cont='
',tmp='';$.each(nm.swf,function(name,val){cont+='';tmp+=' '+name+'="'+val+'"';});cont+='
';nm._setCont(cont);}}});});; + jQuery(function($,undefined){$.nmFilters({form:{is:function(nm){var ret=nm.opener.is('form');if(ret)nm.store.form=nm.getInternal()._extractUrl(nm.opener.attr('action'));return ret;},init:function(nm){nm.loadFilter='form';nm.opener.off('submit.nyroModal').on('submit.nyroModal',function(e){e.preventDefault();nm.opener.trigger('nyroModal');});},load:function(nm){var data={};$.map(nm.opener.serializeArray(),function(d){data[d.name]=d.value;});if(nm.store.form.sel)data[nm.selIndicator]=nm.store.form.sel.substring(1);var ajax=$.extend(true,{type:'get',dataType:'text'},nm.ajax||{},{url:nm.store.form.url,data:data,type:nm.opener.attr('method')?nm.opener.attr('method'):undefined,success:function(data){nm._setCont(data,nm.store.form.sel);},error:function(){nm._error();}});$.ajax(ajax);}}});});; + jQuery(function($,undefined){$.nmFilters({formFile:{is:function(nm){var ret=nm.opener.is('form[enctype="multipart/form-data"]');if(ret){nm._delFilter('form');if(!nm.store.form)nm.store.form=nm.getInternal()._extractUrl(nm.opener.attr('action'));}return ret;},init:function(nm){nm.loadFilter='formFile';nm.store.formFileLoading=false;nm.opener.off('submit.nyroModal').on('submit.nyroModal',function(e){if(!nm.store.formFileIframe){e.preventDefault();nm.opener.trigger('nyroModal');}else{nm.store.formFileLoading=true;}});},initElts:function(nm){var inputSel;if(nm.store.form.sel)inputSel=$('',{'type':'hidden',name:nm.selIndicator,value:nm.store.form.sel.substring(1)}).appendTo(nm.opener);function rmFormFileElts(){if(inputSel){inputSel.remove();inputSel=undefined;delete(inputSel);}nm.store.formFileIframe.attr('src','about:blank').remove();nm.store.formFileIframe=undefined;delete(nm.store.formFileIframe);}nm.store.formFileIframe=$('').hide().load(function(){if(nm.store.formFileLoading){nm.store.formFileLoading=false;var content=nm.store.formFileIframe .off('load error').contents().find('body').not('script[src]');if(content&&content.html()&&content.html().length){rmFormFileElts();nm._setCont(content.html(),nm.store.form.sel);}else{var nbTry=0;fct=function(){nbTry++;var content=nm.store.formFileIframe .off('load error').contents().find('body').not('script[src]');if(content&&content.html()&&content.html().length){nm._setCont(content.html(),nm.store.form.sel);rmFormFileElts();}else if(nbTry<5){setTimeout(fct,25);}else{rmFormFileElts();nm._error();}};setTimeout(fct,25);}}}).error(function(){rmFormFileElts();nm._error();});nm.elts.all.append(nm.store.formFileIframe);nm.opener .attr('target','nyroModalFormFile').submit();},close:function(nm){nm.store.formFileLoading=false;if(nm.store.formFileIframe){nm.store.formFileIframe.remove();nm.store.formFileIframe=undefined;delete(nm.store.formFileIframe);}}}});});; + jQuery(function($,undefined){$.nmFilters({iframe:{is:function(nm){var target=nm.opener.attr('target')||'',rel=nm.opener.attr('rel')||'',opener=nm.opener.get(0);return!nm._hasFilter('image')&&(target.toLowerCase()=='_blank'||rel.toLowerCase().indexOf('external')>-1||(opener.hostname&&opener.hostname.replace(/:\d*$/,'')!=window.location.hostname.replace(/:\d*$/,'')));},init:function(nm){nm.loadFilter='iframe';},load:function(nm){nm.store.iframe=$('');nm._setCont(nm.store.iframe);},afterShowCont:function(nm){nm.store.iframe.attr('src',nm.opener.attr('href'));},close:function(nm){if(nm.store.iframe){nm.store.iframe.remove();nm.store.iframe=undefined;delete(nm.store.iframe);}}}});});; + jQuery(function($,undefined){$.nmFilters({iframeForm:{is:function(nm){var ret=nm._hasFilter('iframe')&&nm.opener.is('form');if(ret){nm._delFilter('iframe');nm._delFilter('form');}return ret;},init:function(nm){nm.loadFilter='iframeForm';nm.store.iframeFormLoading=false;nm.store.iframeFormOrgTarget=nm.opener.attr('target');nm.opener.off('submit.nyroModal').on('submit.nyroModal',function(e){if(!nm.store.iframeFormIframe){e.preventDefault();nm.opener.trigger('nyroModal');}else{nm.store.iframeFormLoading=true;}});},load:function(nm){nm.store.iframeFormIframe=$('');nm._setCont(nm.store.iframeFormIframe);},afterShowCont:function(nm){nm.opener .attr('target','nyroModalIframeForm').submit();},close:function(nm){nm.store.iframeFormOrgTarget?nm.opener.attr('target',nm.store.iframeFormOrgTarget):nm.opener.removeAttr('target');delete(nm.store.formFileLoading);delete(nm.store.iframeFormOrgTarget);if(nm.store.iframeFormIframe){nm.store.iframeFormIframe.remove();nm.store.iframeFormIframe=undefined;delete(nm.store.iframeFormIframe);}}}});});; + jQuery(function($,undefined){$.nmObj({embedlyUrl:'http://api.embed.ly/1/oembed',embedly:{key:undefined,wmode:'transparent',allowscripts:true,format:'json'}});var cache=[];$.nmFilters({embedly:{is:function(nm){if(nm._hasFilter('link')&&nm._hasFilter('iframe')&&nm.opener.attr('href')&&nm.embedly.key){if(cache[nm.opener.attr('href')]){nm.store.embedly=cache[nm.opener.attr('href')];nm._delFilter('iframe');return true;}nm.store.embedly=false;var data=nm.embedly;data.url=nm.opener.attr('href');$.ajax({url:nm.embedlyUrl,dataType:'jsonp',data:data,success:function(data){if(data.type!='error'){nm.store.embedly=data;cache[nm.opener.attr('href')]=data;nm._delFilter('iframe');nm.filters.push('embedly');nm._callFilters('initFilters');nm._callFilters('init');}}});}return false;},init:function(nm){nm.loadFilter='embedly';},load:function(nm){if(nm.store.embedly.type=='photo'){nm.filters.push('image');$('').load(function(){nm.elts.cont.addClass('nyroModalImg');nm.elts.hidden.addClass('nyroModalImg');nm._setCont(this);}).error(function(){nm._error();}).attr('src',nm.store.embedly.url);}else{nm._setCont('
'+nm.store.embedly.html+'
');}},size:function(nm){if(nm.store.embedly.width&&!nm.sizes.height){nm.sizes.w=nm.store.embedly.width;nm.sizes.h=nm.store.embedly.height;}}}});});; diff --git a/WebContent/js/jqueryui/jquery-1.3.2.min.js b/WebContent/js/jqueryui/jquery-1.3.2.min.js old mode 100644 new mode 100755 diff --git a/WebContent/js/jqueryui/jquery-1.4.4.min.js b/WebContent/js/jqueryui/jquery-1.4.4.min.js new file mode 100755 index 0000000..8f3ca2e --- /dev/null +++ b/WebContent/js/jqueryui/jquery-1.4.4.min.js @@ -0,0 +1,167 @@ +/*! + * jQuery JavaScript Library v1.4.4 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Thu Nov 11 19:04:53 2010 -0500 + */ +(function(E,B){function ka(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Ja.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function U(){return false}function ca(){return true}function la(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ka(a){var b,d,e,f,h,l,k,o,x,r,A,C=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h= +h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;kd)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;A=f.handleObj.origHandler.apply(f.elem,arguments);if(A===false||a.isPropagationStopped()){d=f.level;if(A===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(La, +"`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this, +e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function oa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?Pa:Qa,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a, +"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+ +a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/, +C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j, +s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this, +j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length}, +toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j=== +-1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false; +if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload", +b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&& +!F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&& +l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;H
a";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"), +k=l.appendChild(t.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false, +scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};l.disabled=true;c.support.optDisabled=!k.disabled;b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+e+"=1;"))}catch(o){}a.insertBefore(b,a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function r(){c.support.noCloneEvent= +false;d.detachEvent("onclick",r)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML="";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var r=t.createElement("div");r.style.width=r.style.paddingLeft="1px";t.body.appendChild(r);c.boxModel=c.support.boxModel=r.offsetWidth===2;if("zoom"in r.style){r.style.display="inline";r.style.zoom= +1;c.support.inlineBlockNeedsLayout=r.offsetWidth===2;r.style.display="";r.innerHTML="
";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="
t
";var A=r.getElementsByTagName("td");c.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&A[0].offsetHeight===0;r.innerHTML="";t.body.removeChild(r).style.display= +"none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?ra:a;var e=a.nodeType,f=e?a[c.expando]:null,h= +c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?ra:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando); +else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,l=e.length;h-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one"; +if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true}, +attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&& +b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0}; +c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem, +arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid= +d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+ +c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType=== +8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var l;e=a.target;var k=f.replace(X,""),o=c.nodeName(e,"a")&&k=== +"click",x=c.event.special[k]||{};if((!x._default||x._default.call(d,a)===false)&&!o&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[k]){if(l=e["on"+k])e["on"+k]=null;c.event.triggered=true;e[k]()}}catch(r){}if(l)e["on"+k]=l;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+ +d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var l=d.length;f-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired= +B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",xa(a))}},setup:function(){if(this.type=== +"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]=== +0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}}); +(function(){function a(g,i,n,m,p,q){p=0;for(var u=m.length;p0){F=y;break}}y=y[g]}m[p]=F}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,l=true;[0,0].sort(function(){l=false;return 0});var k=function(g,i,n,m){n=n||[];var p=i=i||t;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var q,u,y,F,M,N=true,O=k.isXML(i),D=[],R=g;do{d.exec("");if(q=d.exec(R)){R=q[3];D.push(q[1]);if(q[2]){F=q[3]; +break}}}while(q);if(D.length>1&&x.exec(g))if(D.length===2&&o.relative[D[0]])u=L(D[0]+D[1],i);else for(u=o.relative[D[0]]?[i]:k(D.shift(),i);D.length;){g=D.shift();if(o.relative[g])g+=D.shift();u=L(g,u)}else{if(!m&&D.length>1&&i.nodeType===9&&!O&&o.match.ID.test(D[0])&&!o.match.ID.test(D[D.length-1])){q=k.find(D.shift(),i,O);i=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(i){q=m?{expr:D.pop(),set:C(m)}:k.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&i.parentNode?i.parentNode:i,O);u=q.expr?k.filter(q.expr, +q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h= +l;g.sort(w);if(h)for(var i=1;i0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n, +m,p,q){i=g[1].replace(/\\/g,"");if(!q&&o.attrMap[i])g[1]=o.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,i);else{g=k.filter(g[3],i,n,true^p);n||m.push.apply(m,g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled=== +true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"=== +g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return in[3]-0},nth:function(g,i,n){return n[3]- +0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n=0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()=== +i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];n=o.attrHandle[n]?o.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);var m=n+"",p=i[2],q=i[4];return n==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&n!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,i,n,m){var p=o.setFilters[i[2]]; +if(p)return p(g,n,i,m)}}},x=o.match.POS,r=function(g,i){return"\\"+(i-0+1)},A;for(A in o.match){o.match[A]=RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,r))}var C=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g);return i}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(J){C=function(g,i){var n=0,m=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(m, +g);else if(typeof g.length==="number")for(var p=g.length;n";n.insertBefore(g,n.firstChild);if(t.getElementById(i)){o.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:B:[]};o.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}n.removeChild(g); +n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&& +function(){var g=k,i=t.createElement("div");i.innerHTML="

";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){k=function(m,p,q,u){p=p||t;m=m.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!u&&!k.isXML(p))if(p.nodeType===9)try{return C(p.querySelectorAll(m),q)}catch(y){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var F=p.getAttribute("id"),M=F||"__sizzle__";F||p.setAttribute("id",M);try{return C(p.querySelectorAll("#"+M+" "+m),q)}catch(N){}finally{F|| +p.removeAttribute("id")}}return g(m,p,q,u)};for(var n in g)k[n]=g[n];i=null}}();(function(){var g=t.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(t.documentElement,"[test!='']:sizzle")}catch(m){n=true}if(i)k.matchesSelector=function(p,q){q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(p))try{if(n||!o.match.PSEUDO.test(q)&&!/!=/.test(q))return i.call(p,q)}catch(u){}return k(q,null,null,[p]).length>0}})();(function(){var g= +t.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(i,n,m){if(typeof n.getElementsByClassName!=="undefined"&&!m)return n.getElementsByClassName(i[1])};g=null}}})();k.contains=t.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:t.documentElement.compareDocumentPosition? +function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};k.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var L=function(g,i){for(var n,m=[],p="",q=i.nodeType?[i]:i;n=o.match.PSEUDO.exec(g);){p+=n[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;n=0;for(var u=q.length;n0)for(var h=d;h0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h= +h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context): +c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a, +2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a, +b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Za.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||ab.test(e))&&$a.test(a))f=f.reverse();return this.pushStack(f,a,bb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&& +e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/\s]+\/)>/g,P={option:[1, +""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div
","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= +c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, +wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, +prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, +this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); +return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null; +else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1>");try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?h.cloneNode(true):h)}k.length&&c.each(k,Oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append", +prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument|| +b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]===""&&!x?r.childNodes:[];for(o=k.length- +1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script")))); +d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i, +jb=/^-?\d/,kb={position:"absolute",visibility:"hidden",display:"block"},Pa=["Left","Right"],Qa=["Top","Bottom"],W,Ga,aa,lb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true, +zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),l=a.style,k=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!k||!("set"in k)||(d=k.set(a,d))!==B)try{l[b]=d}catch(o){}}}else{if(k&&"get"in k&&(f=k.get(a,false,e))!==B)return f;return l[b]}}},css:function(a,b,d){var e,f=c.camelCase(b), +h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(hb,lb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=oa(d,b,f);else c.swap(d,kb,function(){h=oa(d,b,f)});if(h<=0){h=W(d,b,b);if(h==="0px"&&aa)h=aa(d,b,b); +if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px":h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(Fa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f= +d.filter||"";d.filter=Ea.test(f)?f.replace(Ea,e):d.filter+" "+e}};if(t.defaultView&&t.defaultView.getComputedStyle)Ga=function(a,b,d){var e;d=d.replace(ib,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(t.documentElement.currentStyle)aa=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Fa.test(f)&&jb.test(f)){d=h.left; +e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f===""?"auto":f};W=Ga||aa;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var mb=c.now(),nb=/)<[^<]*)*<\/script>/gi, +ob=/^(?:select|textarea)/i,pb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,qb=/^(?:GET|HEAD)$/,Ra=/\[\]$/,T=/\=\?(&|$)/,ja=/\?/,rb=/([?&])_=[^&]*/,sb=/^(\w+:)?\/\/([^\/?#]+)/,tb=/%20/g,ub=/#.*$/,Ha=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ha)return Ha.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b=== +"object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(l,k){if(k==="success"||k==="notmodified")h.html(f?c("
").append(l.responseText.replace(nb,"")).find(f):l.responseText);d&&h.each(d,[l.responseText,k,l])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&& +!this.disabled&&(this.checked||ob.test(this.nodeName)||pb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})}, +getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html", +script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),l=qb.test(h);b.url=b.url.replace(ub,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ja.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data|| +!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+mb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var k=E[d];E[d]=function(m){if(c.isFunction(k))k(m);else{E[d]=B;try{delete E[d]}catch(p){}}f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);r&&r.removeChild(A)}}if(b.dataType==="script"&&b.cache===null)b.cache= +false;if(b.cache===false&&l){var o=c.now(),x=b.url.replace(rb,"$1_="+o);b.url=x+(x===b.url?(ja.test(b.url)?"&":"?")+"_="+o:"")}if(b.data&&l)b.url+=(ja.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");o=(o=sb.exec(b.url))&&(o[1]&&o[1].toLowerCase()!==location.protocol||o[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&o){var r=t.getElementsByTagName("head")[0]||t.documentElement,A=t.createElement("script");if(b.scriptCharset)A.charset=b.scriptCharset; +A.src=b.url;if(!d){var C=false;A.onload=A.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);A.onload=A.onreadystatechange=null;r&&A.parentNode&&r.removeChild(A)}}}r.insertBefore(A,r.firstChild);return B}var J=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!l||a&&a.contentType)w.setRequestHeader("Content-Type", +b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}o||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(I){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&& +c.triggerGlobal(b,"ajaxSend",[w,b]);var L=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){J||c.handleComplete(b,w,e,f);J=true;if(w)w.onreadystatechange=c.noop}else if(!J&&w&&(w.readyState===4||m==="timeout")){J=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d|| +c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){w&&!J&&L("timeout")},b.timeout);try{w.send(l||b.data==null?null:b.data)}catch(n){c.handleError(b,w,null,n);c.handleComplete(b,w,e,f)}b.async||L();return w}},param:function(a,b){var d=[],e=function(h,l){l=c.isFunction(l)?l():l;d[d.length]= +encodeURIComponent(h)+"="+encodeURIComponent(l)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)da(f,a[f],b,e);return d.join("&").replace(tb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess", +[b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"), +e=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}}); +if(E.ActiveXObject)c.ajaxSettings.xhr=function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var ea={},vb=/^(?:toggle|show|hide)$/,wb=/^([+\-]=)?([\d+.\-]+)(.*)$/,ba,pa=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show", +3),a,b,d);else{d=0;for(var e=this.length;d=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b, +d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a* +Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(l){return f.step(l)} +var f=this,h=c.fx;this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;e.elem=this.elem;if(e()&&c.timers.push(e)&&!ba)ba=setInterval(h.tick,h.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true; +this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(k,o){f.style["overflow"+o]=h.overflow[k]})}this.options.hide&&c(this.elem).hide();if(this.options.hide|| +this.options.show)for(var l in this.options.curAnim)c.style(this.elem,l,this.options.orig[l]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a= +c.timers,b=0;b-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a, +e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&& +c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==B)return this.each(function(){if(h=fa(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=fa(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase(); +c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(l){var k=c(this);k[d](e.call(this,l,k[d]()))});if(c.isWindow(f))return f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b];else if(f.nodeType===9)return Math.max(f.documentElement["client"+ +b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]);else if(e===B){f=c.css(f,d);var h=parseFloat(f);return c.isNaN(h)?f:h}else return this.css(d,typeof e==="string"?e:e+"px")}})})(window); diff --git a/WebContent/js/jqueryui/jquery-1.7.2.min.js b/WebContent/js/jqueryui/jquery-1.7.2.min.js new file mode 100755 index 0000000..16ad06c --- /dev/null +++ b/WebContent/js/jqueryui/jquery-1.7.2.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.7.2 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"":"")+""),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;e=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="
"+""+"
",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="
t
",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="
",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function( +a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f +.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(;d1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]===""&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/WebContent/js/jqueryui/jquery-ui-1.7.1.custom.min.js b/WebContent/js/jqueryui/jquery-ui-1.7.1.custom.min.js old mode 100644 new mode 100755 index 3b0968e..c97d1c5 --- a/WebContent/js/jqueryui/jquery-ui-1.7.1.custom.min.js +++ b/WebContent/js/jqueryui/jquery-ui-1.7.1.custom.min.js @@ -119,7 +119,7 @@ * * Depends: * ui.core.js - */ (function($){$.extend($.ui,{datepicker:{version:"1.7.1"}});var PROP_NAME="datepicker";function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthNamesShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],dayNames:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],dayNamesShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dayNamesMin:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dateFormat:"dd/mm/yy",firstDay:0,isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:"-10:+10",showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('
')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('
'))}},_connectDatepicker:function(target,inst){var input=$(target);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){input[isRTL?"before":"after"](''+appendText+"")}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.trigger.remove();$target.siblings("."+this._appendClass).remove().end().removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDatenew Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)0&&iValue="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j0&&iValue-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormatmaxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDrawmaxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?''+prevText+"":(hideIfNoPrevNext?"":''+prevText+""));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?''+nextText+"":(hideIfNoPrevNext?"":''+nextText+""));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'":"");var buttonPanel=(showButtonPanel)?'
'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'":"")+(isRTL?"":controls)+"
":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'
';var thead="";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="=5?' class="ui-datepicker-week-end"':"")+'>'+dayNamesMin[day]+""}calender+=thead+"";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow";var tbody="";for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDatemaxDate);tbody+='";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+""}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="
=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():" "):(unselectable?''+printDate.getDate()+"":'=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+""))+"
"+(isMultiMonth?"

"+((numMonths[0]>0&&col==numMonths[1]-1)?'
':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='"}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?" ":"")}if(secondary||!changeYear){html+=''+drawYear+""}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='"}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?" ":"")+monthHtml}html+="
";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&datemaxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.1";window.DP_jQuery=$})(jQuery);;/* + */ (function($){$.extend($.ui,{datepicker:{version:"1.7.1"}});var PROP_NAME="datepicker";function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthNamesShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],dayNames:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],dayNamesShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dayNamesMin:["Dom","Seg","Ter","Qua","Qui","Sex","S�b"],dateFormat:"dd/mm/yy",firstDay:0,isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:"-10:+10",showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('
')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('
'))}},_connectDatepicker:function(target,inst){var input=$(target);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){input[isRTL?"before":"after"](''+appendText+"")}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.trigger.remove();$target.siblings("."+this._appendClass).remove().end().removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDatenew Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)0&&iValue="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j0&&iValue-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormatmaxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDrawmaxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?''+prevText+"":(hideIfNoPrevNext?"":''+prevText+""));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?''+nextText+"":(hideIfNoPrevNext?"":''+nextText+""));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'":"");var buttonPanel=(showButtonPanel)?'
'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'":"")+(isRTL?"":controls)+"
":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'
';var thead="";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="=5?' class="ui-datepicker-week-end"':"")+'>'+dayNamesMin[day]+""}calender+=thead+"";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow";var tbody="";for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDatemaxDate);tbody+='";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+""}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="
=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():" "):(unselectable?''+printDate.getDate()+"":'=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+""))+"
"+(isMultiMonth?"
"+((numMonths[0]>0&&col==numMonths[1]-1)?'
':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='"}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?" ":"")}if(secondary||!changeYear){html+=''+drawYear+""}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='"}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?" ":"")+monthHtml}html+="
";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&datemaxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.1";window.DP_jQuery=$})(jQuery);;/* * jQuery UI Progressbar 1.7.1 * * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) diff --git a/WebContent/js/managementActivity.js b/WebContent/js/managementActivity.js old mode 100644 new mode 100755 index 34eb800..cb0d81e --- a/WebContent/js/managementActivity.js +++ b/WebContent/js/managementActivity.js @@ -13,12 +13,12 @@ */ //VARI�VEIS GLOBAIS -var gDynamicOption = ''; //Internacionaliza��o -var gEditOption = ''; //Internacionaliza��o +var gDynamicOption = ''; //Internacionalização +var gEditOption = ''; //Internacionalização var editToolTip = 'Editar'; var removeToolTip = 'Remover'; -var gIdEditModule = -1;//Essa vari�vel so recebe valor em "showListActivity()", "editActivity()" e "showActivity()". by Vinicius P�dua -var MMgameURL = "" //Vari�vel do endere�o do MM de Jogos, parametrizado! package br.ufpe.cin.amadeus.amadeus_game +var gIdEditModule = -1;//Essa variável so recebe valor em "showListActivity()", "editActivity()" e "showActivity()". by Vinicius Pádua +var MMgameURL = "" //Variável do endereço do MM de Jogos, parametrizado! package br.ufpe.cin.amadeus.amadeus_game var lastMaterial = null //Usada nos materiais acessados pelo professor function ajaxLoadingConfig(div, innerHTML) { @@ -128,16 +128,26 @@ function createGame(moduleId, modulePosition){ } ); } -function editGame(idActivity){ +function editGame(positionModule, idActivity){ UtilDWR.getInclude('/editGame.do?idModule='+gIdEditModule+'&idGame='+idActivity, function(data) { - dwr.util.setValue('dynamic'+gIdEditModule, data, { escapeHtml:false }); + dwr.util.setValue('dynamic'+positionModule, data, { escapeHtml:false }); if (data.indexOf(keyError) == -1){ } } ); } + +function editGameActivity(idGame){ + UtilDWR.getInclude('', + function(data) { + } + ); + +} + + function saveGame(idActivity){ var name = trim(dwr.util.getValue("nameGame")); var url = trim(dwr.util.getValue("urlGame")); @@ -162,7 +172,7 @@ function saveGame(idActivity){ function deleteGame(idActivity){ - UtilDWR.getInclude('/deleteGame.do?method=deleteGame&idGame='+idActivity+'&idModule='+gIdEditModule, + UtilDWR.getInclude('/gameActivity.do?method=deleteGame&idGame='+idActivity+'&idModule='+gIdEditModule, function(data) { } ); @@ -188,15 +198,61 @@ function showPlayerGame(idMMJogos){ ); } -function showScoreGame(type,idMMJogos){ - +function showScoreGameGrupo(type,idMMJogos){ UtilDWR.getInclude('/changeOrderGame.do?method=changeOrderGame&type='+type+'&idMMJogos='+idMMJogos, function(data) { - dwr.util.setValue('optionGame'+gIdEditModule, data, { escapeHtml:false }); + dwr.util.setValue('percepcao'+idMMJogos, data, { escapeHtml:false }); } ); } +function showScoreGameIndividual(type,idMMJogos,idUser){ + UtilDWR.getInclude('/changeOrderGame.do?method=changeOrderGame&type='+type+'&idMMJogos='+idMMJogos+'&idUser='+idUser, + function(data) { + dwr.util.setValue('percepcao'+idMMJogos, data, { escapeHtml:false }); + } + ); +} + + +function modalGameWin(gameId) { + window.open('playGameActivity.do?method=showPlayGame&gameId='+gameId,'Game', + 'height=800,width=600,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes,directories=no'); +} + +function openGameExternal(gameUrl){ + + var external = window.open(gameUrl,'Game', + 'height=800,width=600,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes'); + + //resize para a tela não ficar preta + external.onload = resizeExternal(external); +} + +function resizeExternal(win) +{ + win.resizeTo(10,10); + win.resizeTo(811,611); +} + + +function modalVisualizacaoWin(gameId) { + if (window.showModalDialog) { + window.showModalDialog('graphicGameActivity.do?method=showGraphicGame&gameId='+gameId+'&graphic=sel',"Game Graphic", + "dialogWidth:800px;dialogHeight:600px"); + } else { + window.open('graphicGameActivity.do?method=showGraphicGame&gameId='+gameId+'&graphic=sel','Game Graphic', + 'height=800,width=600,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes'); + } +} + +function log(idGame, numFases, tempo, pontuacao, meta) +{ + window.open('saveLog.do?method=saveLog&jogo='+idGame+'&fases='+numFases+'&tempo='+tempo+'&pontuacao='+pontuacao+'&metaAlternativa='+meta,'Game Graphic', + 'height=100,width=100,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'); + +} + // ***FIM - ATIVIDADE JOGOS *** @@ -632,7 +688,23 @@ function answerForumActivity(positionModule, idForum, idPerson){ ); } +function answerForumActivityWithMessage(positionModule, idForum, idPerson, idMessage){ + var body = trim(dwr.util.getValue("answerBody")); + UtilDWR.getInclude('/answerForumActivity.do?method=answerForumActivityWithMessage&answerBody='+body+'&idForum='+idForum+'&idMessage='+idMessage, + function(data) { + if (data.indexOf(keyUserNotLogged) != -1){ + window.open(urlUserNotLogged, "_self"); + } else if (data.indexOf(keyError) != -1){ + dwr.util.setValue('answer'+positionModule, data, { escapeHtml:false }); + }else{ + dwr.util.setValue('answer'+positionModule, '', { escapeHtml:false }); + showViewListMessagesForumActivity(positionModule, 1, idForum); + } + } + ); + +} function showViewNewAnswerForumActivity(positionModule, idForum){ UtilDWR.getInclude('/forumActivity.do?method=showViewNewAnswerForumActivity&idForum='+idForum, function(data) { @@ -641,6 +713,14 @@ function showViewNewAnswerForumActivity(positionModule, idForum){ ); } +function showViewNewAnswerForumActivityWithMessage(positionModule, idForum, idMessage){ + UtilDWR.getInclude('/forumActivity.do?method=showViewNewAnswerForumActivityWithMessage&idForum='+idForum+'&idMessage='+idMessage, + function(data) { + dwr.util.setValue('answer'+positionModule, data, { escapeHtml:false }); + } + ); +} + function cancelShowAnswerForumActivity(positionModule){ dwr.util.setValue('answer'+positionModule, '', { escapeHtml:false }); } @@ -1365,6 +1445,12 @@ function deleteActivity(type, idActivity) { dwr.util.setValue('editOption'+positionModule, editLink, { escapeHtml:false }); } + function openExternalLinkAtivity(url, id){ + + window.open(url,'External Link','width=800, height=600'); + saveLogViewMaterial(id); + } + // ****************** IRIZ ************************** function getVideoURL(codigoHTMLcomScript) @@ -1435,7 +1521,9 @@ function editVideoActivity(positionModule, idVideo){ ); } -function watchVideo(url){ +function watchVideo(url, idMaterial){ + + saveLogViewVideo(idMaterial); window.open(url,'','width=800px, height=600px, directories=0, location=0, menubar=0, resizable=0, scrollbars=0, status=0'); } diff --git a/WebContent/js/managementCourse.js b/WebContent/js/managementCourse.js old mode 100644 new mode 100755 index b3eca23..4e9cd48 --- a/WebContent/js/managementCourse.js +++ b/WebContent/js/managementCourse.js @@ -26,4 +26,12 @@ function replicateCourse(courseId) { dwr.util.setValue('pContent', data, { escapeHtml:false }); } ); +} + +function changeTeacher(courseId) { + UtilDWR.getInclude('/course.do?method=viewChangeTeacher&courseId='+courseId, + function(data) { + dwr.util.setValue('pContent', data, { escapeHtml:false }); + } + ); } \ No newline at end of file diff --git a/WebContent/js/managementModule.js b/WebContent/js/managementModule.js old mode 100644 new mode 100755 index d835544..ced89c6 --- a/WebContent/js/managementModule.js +++ b/WebContent/js/managementModule.js @@ -230,5 +230,9 @@ function ajaxLoadingConfig(div, innerHTML) { function saveModulePressEnter(event,idModule, idModuleBD) { if (event.keyCode == 13) { saveModule(idModule,idModuleBD); - } + } + } + function showModuleGraphic (idModule, graphic){ + UtilDWR.getInclude('/module.do?method=getIdCourseByIdModule&idModule='+idModule, + function(data) {}); } \ No newline at end of file diff --git a/WebContent/js/messenger.js b/WebContent/js/messenger.js new file mode 100755 index 0000000..4fa9779 --- /dev/null +++ b/WebContent/js/messenger.js @@ -0,0 +1,370 @@ +/** + * By Nailson Cunha + * Scripts do sistema de mensagens inbox do Sistema Amadeus + */ + +$(document).ready(function(){ + + /* + * função de timer para verificacao de status do usuario + * Baseia-se no ID do elemento LI + */ + + function checkStatus(){ + $('ul.all-participants li').each(function(index,element){ + if( $(this).hasClass('participant-name') ) + $.get('/amadeuslms/user.do?method=userStatus&accessInfoId='+ element.id, function(data){ + if(data == 1){ + $(element).removeClass('offlineUser').addClass('onlineUser'); + } else { + $(element).removeClass('onlineUser').addClass('offlineUser'); + } + }); + }); + } + + checkStatus(); //Checa o status assim que carrega a p�gina + setInterval(function(){checkStatus();}, 15000); //Fica checando o status a cada 15 segundos + + /* Fim do timer */ + + //Funcao que recebe o objeto json, transforma em mensagem e exibe na div das mensagens + function addMessageToList(message){ + var divToInsert = '
' + + '' + message.sender + '
' + + ''+ $.datepicker.formatDate('dd-mm-yy',new Date(message.date)) +'' + + '' + + '

' + message.title + '

' + + '

' + message.content + '

' + + 'Responder' + + 'Excluir' + + ((message.toAll) ? + 'Responder a todos' + : '') + + '

' + + '
' + + '
'; + + $(divToInsert).insertBefore($('div.the-message').first()); + } + + //Verificaçao de mensagens do usuário logado. + function checkMessages(){ + var idsToIgnore = new Array(); + var courseId = $('#hidden-course-id').val(); + $('a.link-message-title').each(function(){ + idsToIgnore.push($(this).attr('id')); + }); + + var ignore = $.param({'ignoreIds':idsToIgnore}); + + $.ajax({ + type: 'GET', + url: 'messenger.do?method=getUnreadMessages&courseId='+ courseId + '&' +ignore, + dataType: 'json', + data: {}, + success: function(data){ + if( (data != null) && (data.length) ) + $.each(data, function(key, item){ + addMessageToList(item); + }); + } + }); + }; + + //Programa o timer do check mensagens + if($('div#seemessages').length){ + setInterval(function(){ + checkMessages(); + }, 30000); + } + /* Fim do check mensagens */ + + + //funcao para limpar o campo de texto mensagem + function limparCampos(){ + $('.ipt-assunto').val(''); + $('.txtarea-mensagem').val(''); + $('textarea#content-to-all').val(''); + } + + //mensagem de sucesso no envio das mensagens + function exibeMensagemSucesso(){ + var divSucesso = $('
',{ + id: 'divsucesso', + 'class': 'divsucesso', + html: 'Mensagem enviada!' + }); + divSucesso.appendTo('body'); + setTimeout(function(){ + $('#divsucesso').remove(); + },3000); + } + + //mensagem de erro, nao pode ser vazio + function exibeMensagemNaoVazio(campo){ + var divNaovazio = $('
',{ + id: 'naovazio', + 'class': 'naovazio', + html: 'Campo ' + campo + ' está vazio!' + }); + divNaovazio.appendTo('body'); + setTimeout(function(){ + $('#naovazio').remove(); + },3000); + } + + + // Exibe-oculta o form de envio de mensagens para All Participants + $('#all-participants').click(function(){ + $('.send-message').hide(); + $('.send-message-0').toggle(); + }); + + // Exibe-oculta o form de envio de mensagens para o usu�rio clicado. + $('.participant-name').click(function(){ + var elemento = $('#sendto-' + $(this).attr('id')); //Captura o elemento div com base no id do Elemento
  • clicado. + $('.send-message-0').hide(); // Oculta o div all-participants + $('.send-message[id!=' + elemento.attr('id') + ']').hide(); //Oculta todos os divs send-message exceto o que tiver a div referente ao
  • clicado + elemento.toggle(); + }); + + + //Oculta o devido form de envio de mensagem ap�s o clique no botao cancelar. + $('.btn-cancelar').click(function(e){ + $(e.target).closest('.send-message-0').hide(); + $(e.target).closest('.send-message').hide(); + limparCampos(); + }); + + //Envio da mensagem via form + $('.send-msg').submit(function(event){ + event.preventDefault(); + var tmpText = $(this).children('.txtarea-mensagem').val(); + var tempTitle = $(this).children('.ipt-assunto').val(); + var courseId = $('#hidden-course-id').val(); + + if( tmpText == '' || tmpText.replace(/\s+/, '') == '' ){ //verifica se a mensagem está vazia. + exibeMensagemNaoVazio('mensagem'); + return false; + } + if( tempTitle == '' || tempTitle.replace(/\s+/, '') == '' || tempTitle == 'Assunto' ){ //verifica se a mensagem está vazia. + exibeMensagemNaoVazio('assunto'); + return false; + } + + var metodo = 'method=saveMessage'; + var valores = $(this).serialize(); + var alldata = metodo + '&' + valores + '&' + courseId; + $.ajax({ + type: 'POST', + url: 'messenger.do', + data: alldata, + success: exibeMensagemSucesso() + }); + limparCampos(); + return false; + }); + + //Estilo do input assunto + $('.ipt-assunto').val('Assunto'); + $('.ipt-assunto').focus(function(){ + if($(this).val()=='Assunto'){ + $(this).css('color','black'); + $(this).val(''); + } + }); + $('.ipt-assunto').focusout(function(){ + if($(this).val()=='' || $(this).val().replace(/\s+/, '') == '' ){ + $(this).css('color','#ccc'); + $(this).val('Assunto'); + } + }); + + + /* + * + * Funções referentes as exibições das mensagens + * + */ + + //função que envia, via ajax, a resposta de uma determinada mensagem + //recebe do modal form um array com dois parametros como valores, o 0 é a url e o 1 são os paramentro para o request + function sendReply(parametros){ + var replyTitle = $('#reply-assunto').val(); + var replyContent = $('#reply-content').val(); + var params = { + messageTitle: replyTitle, + messageContent: replyContent + }; + + + if( replyContent == '' || replyContent.replace(/\s+/, '') == '' ){ //verifica se a mensagem está vazia. + exibeMensagemNaoVazio('mensagem'); + return false; + } + + $.ajax({ + type: 'POST', + url: parametros[0], + data: parametros[1] + '&' + $.param(params), + success: exibeMensagemSucesso() + }); + + } + + //Função que torna marca uma mensagem como lida, no banco + function setMessageAsRead(pid){ + var metodo = 'setMessageAsRead'; + $.ajax({ + type: 'POST', + url: 'messenger.do', + data: {method: metodo, messageId: pid}, + success: function(){ + setTimeout(function(){ + if(!$('a#'+pid).hasClass('lida')) + $('a#'+pid).addClass('lida'); + }, 3000); + } + }); + } + + + //Exibe ou oculta a mensagem ao se clicar no título. referente a barra lateral direita. + $('a.link-message-title').live('click',function(event){ + event.preventDefault(); + var pid = $(this).attr('id'); + + $('p#message-content-'+pid).toggle('fast'); + + setMessageAsRead(pid); + }); + + //Funcao que exibe o dialog de resposta + function showReplyDialog(title,href){ + $('#form-reply-to').load('/amadeuslms/jsp/messenger/form-reply.jsp', function(){ + if($('#reply-assunto').length){ + $('#reply-assunto').val(title); + $('#reply-content').focus(); + } + }); + + $('#form-reply-to').dialog({ + autoOpen: true, + height: 250, + width: 350, + modal: true, + resizable: false, + buttons: { + 'Enviar': function(){ + sendReply(href); + $( this ).dialog( 'close' ); + $('#form-reply-to').remove('form'); + }, + 'Cancelar': function(){ + $( this ).dialog( 'close' ); + $('#form-reply-to').remove('form'); + } + } , + close: function(){ + $('#form-reply-to').remove('form'); + } + }); + } + + //Exibição do Modal Form de resposta + $('.message-reply-link').live('click',function(event){ + event.preventDefault(); + var title = $(this).attr('title'); + var href = $(this).attr('href').split('?'); + + showReplyDialog(title,href); + }); + + /* + * Excluir mensagens + */ + + //funcao que exclui a mensagem e a remove da tela + function excluirMensagem(href,element){ + + $.ajax({ + type: 'POST', + url: href[0], + data: href[1], + success: function(){ + element.parent('.the-message-content').parent('.the-message').remove(); + } + }); + + } + + $('.message-delete-link').live('click',function(e){ + e.preventDefault(); + + var element = $(this); + var $confirmation = $('
    Confirma exclusão da mensagem?
    '); + var href = $(this).attr('href').split('?'); + + $confirmation.dialog({ + resizable: false, + height:140, + modal: true, + buttons: { + Excluir: function() { + excluirMensagem(href,element); + $( this ).dialog( 'close' ); + }, + Cancelar: function() { + $( this ).dialog( 'close' ); + } + } + }); + + }); + + /* + * Funções de enviar para todos + */ + + $('form#form-send-to-all').submit(function(e){ + e.preventDefault(); + + var action = $(this).attr('action'); + var metodo = 'method=sendMessageToAll'; + + var assuntoToAll = $('#assunto-to-all').val(); + if( assuntoToAll == '' || assuntoToAll.replace(/\s+/, '') == '' || assuntoToAll == 'Assunto' ){ //verifica se a mensagem está vazia. + exibeMensagemNaoVazio('assunto'); + return false; + } + + var contentToAll = $('textarea#content-to-all').val(); + if( contentToAll == '' || contentToAll.replace(/\s+/, '') == '' ){ //verifica se a mensagem está vazia. + exibeMensagemNaoVazio('mensagem'); + return false; + } + + var allData = metodo + '&' + $(this).serialize(); + + $.ajax({ + type: 'POST', + url: action, + data: allData, + success: exibeMensagemSucesso() + }); + limparCampos(); + return false; + }); + + //Funcao de responder a todos + $('.reply-to-all-link').live('click', function(e){ + e.preventDefault(); + var title = $(this).attr('title'); + var href = $(this).attr('href').split('?'); + + showReplyDialog(title,href); + }); + +}); \ No newline at end of file diff --git a/WebContent/js/openid.js b/WebContent/js/openid.js old mode 100644 new mode 100755 diff --git a/WebContent/js/requestAssistance.js b/WebContent/js/requestAssistance.js old mode 100644 new mode 100755 diff --git a/WebContent/js/requestTeacher.js b/WebContent/js/requestTeacher.js old mode 100644 new mode 100755 diff --git a/WebContent/js/settings.js b/WebContent/js/settings.js old mode 100644 new mode 100755 index 8407f2e..aac08c6 --- a/WebContent/js/settings.js +++ b/WebContent/js/settings.js @@ -44,7 +44,7 @@ function saveWebMailSenderSettings(){ } function saveSystemSettings(){ - var url = "/webSettingMailSender.do?method=saveWebMailSenderSettings&"+$("#formWebSettingMailSender").serialize(); + var url = "/webSettingSystem.do?method=saveSystemSettings&"+$("#formWebSettingSystem").serialize(); $("#imgMobile").show(); UtilDWR.getInclude(url, function(data) { @@ -54,9 +54,9 @@ function saveSystemSettings(){ window.open(urlAccessDenied, "_self"); } else { execScript(data); - dwr.util.setValue("mailSender", data, { escapeHtml:false }); + dwr.util.setValue("system", data, { escapeHtml:false }); } - $("#imgMobile").show(); + $("#imgMobile").hide(); }); } diff --git a/WebContent/js/tiny_mce/langs/en.js b/WebContent/js/tiny_mce/langs/en.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/license.txt b/WebContent/js/tiny_mce/license.txt old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/advhr/css/advhr.css b/WebContent/js/tiny_mce/plugins/advhr/css/advhr.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/advhr/editor_plugin.js b/WebContent/js/tiny_mce/plugins/advhr/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/advhr/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/advhr/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/advhr/js/rule.js b/WebContent/js/tiny_mce/plugins/advhr/js/rule.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/advhr/langs/en_dlg.js b/WebContent/js/tiny_mce/plugins/advhr/langs/en_dlg.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/advhr/rule.htm b/WebContent/js/tiny_mce/plugins/advhr/rule.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/advimage/css/advimage.css b/WebContent/js/tiny_mce/plugins/advimage/css/advimage.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/advimage/editor_plugin.js b/WebContent/js/tiny_mce/plugins/advimage/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/advimage/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/advimage/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/advimage/image.htm b/WebContent/js/tiny_mce/plugins/advimage/image.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/advimage/img/sample.gif b/WebContent/js/tiny_mce/plugins/advimage/img/sample.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/advimage/js/image.js b/WebContent/js/tiny_mce/plugins/advimage/js/image.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/advimage/langs/en_dlg.js b/WebContent/js/tiny_mce/plugins/advimage/langs/en_dlg.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/advlink/css/advlink.css b/WebContent/js/tiny_mce/plugins/advlink/css/advlink.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/advlink/editor_plugin.js b/WebContent/js/tiny_mce/plugins/advlink/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/advlink/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/advlink/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/advlink/js/advlink.js b/WebContent/js/tiny_mce/plugins/advlink/js/advlink.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/advlink/langs/en_dlg.js b/WebContent/js/tiny_mce/plugins/advlink/langs/en_dlg.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/advlink/link.htm b/WebContent/js/tiny_mce/plugins/advlink/link.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/autoresize/editor_plugin.js b/WebContent/js/tiny_mce/plugins/autoresize/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/autoresize/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/autoresize/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/autosave/editor_plugin.js b/WebContent/js/tiny_mce/plugins/autosave/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/autosave/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/autosave/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/bbcode/editor_plugin.js b/WebContent/js/tiny_mce/plugins/bbcode/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/bbcode/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/bbcode/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/compat2x/editor_plugin.js b/WebContent/js/tiny_mce/plugins/compat2x/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/compat2x/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/compat2x/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/contextmenu/editor_plugin.js b/WebContent/js/tiny_mce/plugins/contextmenu/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/directionality/editor_plugin.js b/WebContent/js/tiny_mce/plugins/directionality/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/directionality/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/directionality/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/editor_plugin.js b/WebContent/js/tiny_mce/plugins/emotions/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/emotions/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/emotions.htm b/WebContent/js/tiny_mce/plugins/emotions/emotions.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/img/smiley-cool.gif b/WebContent/js/tiny_mce/plugins/emotions/img/smiley-cool.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/img/smiley-cry.gif b/WebContent/js/tiny_mce/plugins/emotions/img/smiley-cry.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/img/smiley-embarassed.gif b/WebContent/js/tiny_mce/plugins/emotions/img/smiley-embarassed.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif b/WebContent/js/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/img/smiley-frown.gif b/WebContent/js/tiny_mce/plugins/emotions/img/smiley-frown.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/img/smiley-innocent.gif b/WebContent/js/tiny_mce/plugins/emotions/img/smiley-innocent.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/img/smiley-kiss.gif b/WebContent/js/tiny_mce/plugins/emotions/img/smiley-kiss.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/img/smiley-laughing.gif b/WebContent/js/tiny_mce/plugins/emotions/img/smiley-laughing.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif b/WebContent/js/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/img/smiley-sealed.gif b/WebContent/js/tiny_mce/plugins/emotions/img/smiley-sealed.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/img/smiley-smile.gif b/WebContent/js/tiny_mce/plugins/emotions/img/smiley-smile.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/img/smiley-surprised.gif b/WebContent/js/tiny_mce/plugins/emotions/img/smiley-surprised.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif b/WebContent/js/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/img/smiley-undecided.gif b/WebContent/js/tiny_mce/plugins/emotions/img/smiley-undecided.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/img/smiley-wink.gif b/WebContent/js/tiny_mce/plugins/emotions/img/smiley-wink.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/img/smiley-yell.gif b/WebContent/js/tiny_mce/plugins/emotions/img/smiley-yell.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/js/emotions.js b/WebContent/js/tiny_mce/plugins/emotions/js/emotions.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/emotions/langs/en_dlg.js b/WebContent/js/tiny_mce/plugins/emotions/langs/en_dlg.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/example/dialog.htm b/WebContent/js/tiny_mce/plugins/example/dialog.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/example/editor_plugin.js b/WebContent/js/tiny_mce/plugins/example/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/example/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/example/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/example/img/example.gif b/WebContent/js/tiny_mce/plugins/example/img/example.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/example/js/dialog.js b/WebContent/js/tiny_mce/plugins/example/js/dialog.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/example/langs/en.js b/WebContent/js/tiny_mce/plugins/example/langs/en.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/example/langs/en_dlg.js b/WebContent/js/tiny_mce/plugins/example/langs/en_dlg.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/fullpage/css/fullpage.css b/WebContent/js/tiny_mce/plugins/fullpage/css/fullpage.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/fullpage/editor_plugin.js b/WebContent/js/tiny_mce/plugins/fullpage/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/fullpage/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/fullpage/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/fullpage/fullpage.htm b/WebContent/js/tiny_mce/plugins/fullpage/fullpage.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/fullpage/js/fullpage.js b/WebContent/js/tiny_mce/plugins/fullpage/js/fullpage.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/fullpage/langs/en_dlg.js b/WebContent/js/tiny_mce/plugins/fullpage/langs/en_dlg.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/fullscreen/editor_plugin.js b/WebContent/js/tiny_mce/plugins/fullscreen/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/fullscreen/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/fullscreen/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/fullscreen/fullscreen.htm b/WebContent/js/tiny_mce/plugins/fullscreen/fullscreen.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/iespell/editor_plugin.js b/WebContent/js/tiny_mce/plugins/iespell/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/iespell/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/iespell/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/inlinepopups/editor_plugin.js b/WebContent/js/tiny_mce/plugins/inlinepopups/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/inlinepopups/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/inlinepopups/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif b/WebContent/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif b/WebContent/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif b/WebContent/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif b/WebContent/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif b/WebContent/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif b/WebContent/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif b/WebContent/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css b/WebContent/js/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/inlinepopups/template.htm b/WebContent/js/tiny_mce/plugins/inlinepopups/template.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/insertdatetime/editor_plugin.js b/WebContent/js/tiny_mce/plugins/insertdatetime/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/insertdatetime/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/insertdatetime/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/layer/editor_plugin.js b/WebContent/js/tiny_mce/plugins/layer/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/layer/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/layer/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/media/css/content.css b/WebContent/js/tiny_mce/plugins/media/css/content.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/media/css/media.css b/WebContent/js/tiny_mce/plugins/media/css/media.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/media/editor_plugin.js b/WebContent/js/tiny_mce/plugins/media/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/media/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/media/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/media/img/flash.gif b/WebContent/js/tiny_mce/plugins/media/img/flash.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/media/img/flv_player.swf b/WebContent/js/tiny_mce/plugins/media/img/flv_player.swf old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/media/img/quicktime.gif b/WebContent/js/tiny_mce/plugins/media/img/quicktime.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/media/img/realmedia.gif b/WebContent/js/tiny_mce/plugins/media/img/realmedia.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/media/img/shockwave.gif b/WebContent/js/tiny_mce/plugins/media/img/shockwave.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/media/img/trans.gif b/WebContent/js/tiny_mce/plugins/media/img/trans.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/media/img/windowsmedia.gif b/WebContent/js/tiny_mce/plugins/media/img/windowsmedia.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/media/js/embed.js b/WebContent/js/tiny_mce/plugins/media/js/embed.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/media/js/media.js b/WebContent/js/tiny_mce/plugins/media/js/media.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/media/langs/en_dlg.js b/WebContent/js/tiny_mce/plugins/media/langs/en_dlg.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/media/media.htm b/WebContent/js/tiny_mce/plugins/media/media.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/nonbreaking/editor_plugin.js b/WebContent/js/tiny_mce/plugins/nonbreaking/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/nonbreaking/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/nonbreaking/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/noneditable/editor_plugin.js b/WebContent/js/tiny_mce/plugins/noneditable/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/noneditable/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/noneditable/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/pagebreak/css/content.css b/WebContent/js/tiny_mce/plugins/pagebreak/css/content.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/pagebreak/editor_plugin.js b/WebContent/js/tiny_mce/plugins/pagebreak/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/pagebreak/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/pagebreak/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/pagebreak/img/pagebreak.gif b/WebContent/js/tiny_mce/plugins/pagebreak/img/pagebreak.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/pagebreak/img/trans.gif b/WebContent/js/tiny_mce/plugins/pagebreak/img/trans.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/paste/editor_plugin.js b/WebContent/js/tiny_mce/plugins/paste/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/paste/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/paste/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/paste/js/pastetext.js b/WebContent/js/tiny_mce/plugins/paste/js/pastetext.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/paste/js/pasteword.js b/WebContent/js/tiny_mce/plugins/paste/js/pasteword.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/paste/langs/en_dlg.js b/WebContent/js/tiny_mce/plugins/paste/langs/en_dlg.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/paste/pastetext.htm b/WebContent/js/tiny_mce/plugins/paste/pastetext.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/paste/pasteword.htm b/WebContent/js/tiny_mce/plugins/paste/pasteword.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/preview/editor_plugin.js b/WebContent/js/tiny_mce/plugins/preview/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/preview/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/preview/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/preview/example.html b/WebContent/js/tiny_mce/plugins/preview/example.html old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/preview/jscripts/embed.js b/WebContent/js/tiny_mce/plugins/preview/jscripts/embed.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/preview/preview.html b/WebContent/js/tiny_mce/plugins/preview/preview.html old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/print/editor_plugin.js b/WebContent/js/tiny_mce/plugins/print/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/print/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/print/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/safari/blank.htm b/WebContent/js/tiny_mce/plugins/safari/blank.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/safari/editor_plugin.js b/WebContent/js/tiny_mce/plugins/safari/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/safari/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/safari/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/save/editor_plugin.js b/WebContent/js/tiny_mce/plugins/save/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/save/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/save/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/searchreplace/css/searchreplace.css b/WebContent/js/tiny_mce/plugins/searchreplace/css/searchreplace.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/searchreplace/editor_plugin.js b/WebContent/js/tiny_mce/plugins/searchreplace/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/searchreplace/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/searchreplace/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/searchreplace/js/searchreplace.js b/WebContent/js/tiny_mce/plugins/searchreplace/js/searchreplace.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/searchreplace/langs/en_dlg.js b/WebContent/js/tiny_mce/plugins/searchreplace/langs/en_dlg.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/searchreplace/searchreplace.htm b/WebContent/js/tiny_mce/plugins/searchreplace/searchreplace.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/spellchecker/css/content.css b/WebContent/js/tiny_mce/plugins/spellchecker/css/content.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/spellchecker/editor_plugin.js b/WebContent/js/tiny_mce/plugins/spellchecker/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/spellchecker/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/spellchecker/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/spellchecker/img/wline.gif b/WebContent/js/tiny_mce/plugins/spellchecker/img/wline.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/style/css/props.css b/WebContent/js/tiny_mce/plugins/style/css/props.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/style/editor_plugin.js b/WebContent/js/tiny_mce/plugins/style/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/style/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/style/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/style/js/props.js b/WebContent/js/tiny_mce/plugins/style/js/props.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/style/langs/en_dlg.js b/WebContent/js/tiny_mce/plugins/style/langs/en_dlg.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/style/props.htm b/WebContent/js/tiny_mce/plugins/style/props.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/tabfocus/editor_plugin.js b/WebContent/js/tiny_mce/plugins/tabfocus/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/tabfocus/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/tabfocus/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/table/cell.htm b/WebContent/js/tiny_mce/plugins/table/cell.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/table/css/cell.css b/WebContent/js/tiny_mce/plugins/table/css/cell.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/table/css/row.css b/WebContent/js/tiny_mce/plugins/table/css/row.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/table/css/table.css b/WebContent/js/tiny_mce/plugins/table/css/table.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/table/editor_plugin.js b/WebContent/js/tiny_mce/plugins/table/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/table/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/table/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/table/js/cell.js b/WebContent/js/tiny_mce/plugins/table/js/cell.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/table/js/merge_cells.js b/WebContent/js/tiny_mce/plugins/table/js/merge_cells.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/table/js/row.js b/WebContent/js/tiny_mce/plugins/table/js/row.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/table/js/table.js b/WebContent/js/tiny_mce/plugins/table/js/table.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/table/langs/en_dlg.js b/WebContent/js/tiny_mce/plugins/table/langs/en_dlg.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/table/merge_cells.htm b/WebContent/js/tiny_mce/plugins/table/merge_cells.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/table/row.htm b/WebContent/js/tiny_mce/plugins/table/row.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/table/table.htm b/WebContent/js/tiny_mce/plugins/table/table.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/template/blank.htm b/WebContent/js/tiny_mce/plugins/template/blank.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/template/css/template.css b/WebContent/js/tiny_mce/plugins/template/css/template.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/template/editor_plugin.js b/WebContent/js/tiny_mce/plugins/template/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/template/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/template/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/template/js/template.js b/WebContent/js/tiny_mce/plugins/template/js/template.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/template/langs/en_dlg.js b/WebContent/js/tiny_mce/plugins/template/langs/en_dlg.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/template/template.htm b/WebContent/js/tiny_mce/plugins/template/template.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/visualchars/editor_plugin.js b/WebContent/js/tiny_mce/plugins/visualchars/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/visualchars/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/visualchars/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/xhtmlxtras/abbr.htm b/WebContent/js/tiny_mce/plugins/xhtmlxtras/abbr.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/xhtmlxtras/acronym.htm b/WebContent/js/tiny_mce/plugins/xhtmlxtras/acronym.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/xhtmlxtras/attributes.htm b/WebContent/js/tiny_mce/plugins/xhtmlxtras/attributes.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/xhtmlxtras/cite.htm b/WebContent/js/tiny_mce/plugins/xhtmlxtras/cite.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/xhtmlxtras/css/attributes.css b/WebContent/js/tiny_mce/plugins/xhtmlxtras/css/attributes.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/xhtmlxtras/css/popup.css b/WebContent/js/tiny_mce/plugins/xhtmlxtras/css/popup.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/xhtmlxtras/del.htm b/WebContent/js/tiny_mce/plugins/xhtmlxtras/del.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/xhtmlxtras/editor_plugin.js b/WebContent/js/tiny_mce/plugins/xhtmlxtras/editor_plugin.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js b/WebContent/js/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/xhtmlxtras/ins.htm b/WebContent/js/tiny_mce/plugins/xhtmlxtras/ins.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/xhtmlxtras/js/abbr.js b/WebContent/js/tiny_mce/plugins/xhtmlxtras/js/abbr.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/xhtmlxtras/js/acronym.js b/WebContent/js/tiny_mce/plugins/xhtmlxtras/js/acronym.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/xhtmlxtras/js/attributes.js b/WebContent/js/tiny_mce/plugins/xhtmlxtras/js/attributes.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/xhtmlxtras/js/cite.js b/WebContent/js/tiny_mce/plugins/xhtmlxtras/js/cite.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/xhtmlxtras/js/del.js b/WebContent/js/tiny_mce/plugins/xhtmlxtras/js/del.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/xhtmlxtras/js/element_common.js b/WebContent/js/tiny_mce/plugins/xhtmlxtras/js/element_common.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/xhtmlxtras/js/ins.js b/WebContent/js/tiny_mce/plugins/xhtmlxtras/js/ins.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js b/WebContent/js/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/about.htm b/WebContent/js/tiny_mce/themes/advanced/about.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/anchor.htm b/WebContent/js/tiny_mce/themes/advanced/anchor.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/charmap.htm b/WebContent/js/tiny_mce/themes/advanced/charmap.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/color_picker.htm b/WebContent/js/tiny_mce/themes/advanced/color_picker.htm old mode 100644 new mode 100755 index 90eb4c2..3767a1f --- a/WebContent/js/tiny_mce/themes/advanced/color_picker.htm +++ b/WebContent/js/tiny_mce/themes/advanced/color_picker.htm @@ -1,4 +1,5 @@ - + + {#advanced_dlg.colorpicker_title} diff --git a/WebContent/js/tiny_mce/themes/advanced/editor_template.js b/WebContent/js/tiny_mce/themes/advanced/editor_template.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/editor_template_src.js b/WebContent/js/tiny_mce/themes/advanced/editor_template_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/image.htm b/WebContent/js/tiny_mce/themes/advanced/image.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/img/colorpicker.jpg b/WebContent/js/tiny_mce/themes/advanced/img/colorpicker.jpg old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/img/icons.gif b/WebContent/js/tiny_mce/themes/advanced/img/icons.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/js/about.js b/WebContent/js/tiny_mce/themes/advanced/js/about.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/js/anchor.js b/WebContent/js/tiny_mce/themes/advanced/js/anchor.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/js/charmap.js b/WebContent/js/tiny_mce/themes/advanced/js/charmap.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/js/color_picker.js b/WebContent/js/tiny_mce/themes/advanced/js/color_picker.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/js/image.js b/WebContent/js/tiny_mce/themes/advanced/js/image.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/js/link.js b/WebContent/js/tiny_mce/themes/advanced/js/link.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/js/source_editor.js b/WebContent/js/tiny_mce/themes/advanced/js/source_editor.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/langs/en.js b/WebContent/js/tiny_mce/themes/advanced/langs/en.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/langs/en_dlg.js b/WebContent/js/tiny_mce/themes/advanced/langs/en_dlg.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/link.htm b/WebContent/js/tiny_mce/themes/advanced/link.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/skins/default/content.css b/WebContent/js/tiny_mce/themes/advanced/skins/default/content.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/skins/default/dialog.css b/WebContent/js/tiny_mce/themes/advanced/skins/default/dialog.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/skins/default/img/buttons.png b/WebContent/js/tiny_mce/themes/advanced/skins/default/img/buttons.png old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/skins/default/img/items.gif b/WebContent/js/tiny_mce/themes/advanced/skins/default/img/items.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif b/WebContent/js/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/skins/default/img/menu_check.gif b/WebContent/js/tiny_mce/themes/advanced/skins/default/img/menu_check.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/skins/default/img/progress.gif b/WebContent/js/tiny_mce/themes/advanced/skins/default/img/progress.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/skins/default/img/tabs.gif b/WebContent/js/tiny_mce/themes/advanced/skins/default/img/tabs.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/skins/default/ui.css b/WebContent/js/tiny_mce/themes/advanced/skins/default/ui.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/skins/o2k7/content.css b/WebContent/js/tiny_mce/themes/advanced/skins/o2k7/content.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/skins/o2k7/dialog.css b/WebContent/js/tiny_mce/themes/advanced/skins/o2k7/dialog.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png b/WebContent/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png b/WebContent/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png b/WebContent/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/skins/o2k7/ui.css b/WebContent/js/tiny_mce/themes/advanced/skins/o2k7/ui.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/skins/o2k7/ui_black.css b/WebContent/js/tiny_mce/themes/advanced/skins/o2k7/ui_black.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css b/WebContent/js/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/advanced/source_editor.htm b/WebContent/js/tiny_mce/themes/advanced/source_editor.htm old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/simple/editor_template.js b/WebContent/js/tiny_mce/themes/simple/editor_template.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/simple/editor_template_src.js b/WebContent/js/tiny_mce/themes/simple/editor_template_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/simple/img/icons.gif b/WebContent/js/tiny_mce/themes/simple/img/icons.gif old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/simple/langs/en.js b/WebContent/js/tiny_mce/themes/simple/langs/en.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/simple/skins/default/content.css b/WebContent/js/tiny_mce/themes/simple/skins/default/content.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/simple/skins/default/ui.css b/WebContent/js/tiny_mce/themes/simple/skins/default/ui.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/simple/skins/o2k7/content.css b/WebContent/js/tiny_mce/themes/simple/skins/o2k7/content.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png b/WebContent/js/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/themes/simple/skins/o2k7/ui.css b/WebContent/js/tiny_mce/themes/simple/skins/o2k7/ui.css old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/tiny_mce.js b/WebContent/js/tiny_mce/tiny_mce.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/tiny_mce_popup.js b/WebContent/js/tiny_mce/tiny_mce_popup.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/tiny_mce_src.js b/WebContent/js/tiny_mce/tiny_mce_src.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/utils/editable_selects.js b/WebContent/js/tiny_mce/utils/editable_selects.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/utils/form_utils.js b/WebContent/js/tiny_mce/utils/form_utils.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/utils/mctabs.js b/WebContent/js/tiny_mce/utils/mctabs.js old mode 100644 new mode 100755 diff --git a/WebContent/js/tiny_mce/utils/validate.js b/WebContent/js/tiny_mce/utils/validate.js old mode 100644 new mode 100755 diff --git a/WebContent/js/twittertool.js b/WebContent/js/twittertool.js new file mode 100755 index 0000000..3a365ff --- /dev/null +++ b/WebContent/js/twittertool.js @@ -0,0 +1,79 @@ +/** + * Author Nailson Cunha + */ + +$(document).ready(function(){ + + /* + * Exibir gif de load. + */ + + function showLoading(){ + $loading = ''; + $('#waiting').append($loading); + } + + function removeLoading(){ + $('#img-loading').remove(); + } + + // Chamada do monitorar redes sociais + $('#monitoring-start').click(function(event){ + var hashtag = $('#ipt-hashtag').val(); + + if( hashtag == '' || hashtag.replace(/\s+/, '') == ''){ + alert('Campo Hashtag Vazio!'); + $('#ipt-hashtag').val(''); + return; + } + + $.ajax({ + url: 'social.do?method=startSocialNetworkMonitoring&hashtag=' + hashtag + }); + + showLoading(); + + $(this).attr('disabled','disabled'); + $('#ipt-hashtag').attr('disabled','disabled'); + $(this).addClass('monitoring-start-disabled'); + + }); + + // Parar monitoramento das redes sociais + $('#monitoring-stop').click(function(event){ + + $.ajax({ + url: 'social.do?method=stopSocialNetworkMonitoring' + }); + + removeLoading(); + + $('#monitoring-start').removeAttr('disabled'); + $('#ipt-hashtag').removeAttr('disabled'); + $('#monitoring-start').removeClass('monitoring-start-disabled'); + + }); + + // Alerta do input Hashtag + $('#ipt-hashtag').focus(function(event){ + $('#hash-alert').html('Não utilize o #'); + }); + $('#ipt-hashtag').focusout(function(event){ + $('#hash-alert').html(''); + }); + + + // Controle do monitoramento do twitter + var urlToCheck = 'http://localhost:8080/amadeuslms/social.do?method=showViewSocialNetworkMonitoring&courseId=18'; + if(window.location == urlToCheck){ + $(window).bind('beforeunload', function(){ + if($('#monitoring-start').attr('disabled') == 'disabled'){ + return 'Existe um monitoramento em execução, pare-o antes de sair.'; + $.ajax({ + url: 'social.do?method=stopSocialNetworkMonitoring' + }); + } + }); + } + +}); \ No newline at end of file diff --git a/WebContent/js/videoChat.js b/WebContent/js/videoChat.js old mode 100644 new mode 100755 diff --git a/WebContent/jsp/amadeus/institutional_menu/cases.jsp b/WebContent/jsp/amadeus/institutional_menu/cases.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/amadeus/institutional_menu/ccte.jsp b/WebContent/jsp/amadeus/institutional_menu/ccte.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/amadeus/institutional_menu/license.jsp b/WebContent/jsp/amadeus/institutional_menu/license.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/amadeus/institutional_menu/project.jsp b/WebContent/jsp/amadeus/institutional_menu/project.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/amadeus/institutional_menu/reachUs.jsp b/WebContent/jsp/amadeus/institutional_menu/reachUs.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/conf/courseMenu.jsp b/WebContent/jsp/conf/courseMenu.jsp old mode 100644 new mode 100755 index 3854b78..002a57c --- a/WebContent/jsp/conf/courseMenu.jsp +++ b/WebContent/jsp/conf/courseMenu.jsp @@ -33,9 +33,9 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
  • Avaliações do Curso
  • Avaliações do Curso
  • - - -
  • + +
  • Módulo de Visualização
  • +
  • Módulo de Visualização
  • @@ -56,6 +56,16 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
  • -
    - +
    + + +
  • +
    + +
  • See all messages
  • + + +
  • Monitorar redes sociais
  • +
    +
    \ No newline at end of file diff --git a/WebContent/jsp/conf/footer.jsp b/WebContent/jsp/conf/footer.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/conf/header.jsp b/WebContent/jsp/conf/header.jsp old mode 100644 new mode 100755 index 865e58c..c9cfeae --- a/WebContent/jsp/conf/header.jsp +++ b/WebContent/jsp/conf/header.jsp @@ -11,31 +11,67 @@ Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. --> -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> -<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %> -<bean:message key="general.title" /> - - - - - - - - - - - - - - - - + <bean:message key="general.title"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebContent/jsp/conf/login.jsp b/WebContent/jsp/conf/login.jsp old mode 100644 new mode 100755 index bdd91f9..6be0600 --- a/WebContent/jsp/conf/login.jsp +++ b/WebContent/jsp/conf/login.jsp @@ -18,5 +18,5 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
     ${user.person.name}.
    - () + ()
    \ No newline at end of file diff --git a/WebContent/jsp/conf/logo.jsp b/WebContent/jsp/conf/logo.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/evaluation/editEvaluationActivities.jsp b/WebContent/jsp/course/content_management/activities/evaluation/editEvaluationActivities.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/evaluation/evaluationActivities.jsp b/WebContent/jsp/course/content_management/activities/evaluation/evaluationActivities.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/evaluation/questions/collumnAssociationQuestion.jsp b/WebContent/jsp/course/content_management/activities/evaluation/questions/collumnAssociationQuestion.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/evaluation/questions/deleteConfirmationQuestion.jsp b/WebContent/jsp/course/content_management/activities/evaluation/questions/deleteConfirmationQuestion.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/evaluation/questions/discursiveQuestion.jsp b/WebContent/jsp/course/content_management/activities/evaluation/questions/discursiveQuestion.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/evaluation/questions/editCollumnAssociationQuestion.jsp b/WebContent/jsp/course/content_management/activities/evaluation/questions/editCollumnAssociationQuestion.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/evaluation/questions/editDiscursiveQuestion.jsp b/WebContent/jsp/course/content_management/activities/evaluation/questions/editDiscursiveQuestion.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/evaluation/questions/editGapFillingQuestion.jsp b/WebContent/jsp/course/content_management/activities/evaluation/questions/editGapFillingQuestion.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/evaluation/questions/editMultipleChoiceQuestion.jsp b/WebContent/jsp/course/content_management/activities/evaluation/questions/editMultipleChoiceQuestion.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/evaluation/questions/editTrueFalseQuestion.jsp b/WebContent/jsp/course/content_management/activities/evaluation/questions/editTrueFalseQuestion.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/evaluation/questions/gapFillingQuestion.jsp b/WebContent/jsp/course/content_management/activities/evaluation/questions/gapFillingQuestion.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/evaluation/questions/multipleChoiceQuestion.jsp b/WebContent/jsp/course/content_management/activities/evaluation/questions/multipleChoiceQuestion.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/evaluation/questions/trueFalseQuestion.jsp b/WebContent/jsp/course/content_management/activities/evaluation/questions/trueFalseQuestion.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/evaluation/realizeEvaluation.jsp b/WebContent/jsp/course/content_management/activities/evaluation/realizeEvaluation.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/evaluation/viewEvaluationActivities.jsp b/WebContent/jsp/course/content_management/activities/evaluation/viewEvaluationActivities.jsp old mode 100644 new mode 100755 index 7fefdef..a11b486 --- a/WebContent/jsp/course/content_management/activities/evaluation/viewEvaluationActivities.jsp +++ b/WebContent/jsp/course/content_management/activities/evaluation/viewEvaluationActivities.jsp @@ -257,7 +257,9 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
    - Salvar Correção +
    diff --git a/WebContent/jsp/course/content_management/activities/evaluation/viewQuestions.jsp b/WebContent/jsp/course/content_management/activities/evaluation/viewQuestions.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/forum/answerForumActivity.jsp b/WebContent/jsp/course/content_management/activities/forum/answerForumActivity.jsp old mode 100644 new mode 100755 index 1311d41..94dcdf8 --- a/WebContent/jsp/course/content_management/activities/forum/answerForumActivity.jsp +++ b/WebContent/jsp/course/content_management/activities/forum/answerForumActivity.jsp @@ -15,19 +15,34 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título <%@ taglib uri="/WEB-INF/struts-html" prefix="html"%> <%@ taglib uri="/WEB-INF/struts-bean" prefix="bean"%> <%@ taglib uri="/WEB-INF/struts-logic" prefix="logic"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> -
    - + +

    ${message.author.name}:

    +
    +

    +
    + +
    + + + +
    + / + + + / +
    diff --git a/WebContent/jsp/course/content_management/activities/forum/editForumActivities.jsp b/WebContent/jsp/course/content_management/activities/forum/editForumActivities.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/forum/forumActivities.jsp b/WebContent/jsp/course/content_management/activities/forum/forumActivities.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/forum/listMessageForumActivity.jsp b/WebContent/jsp/course/content_management/activities/forum/listMessageForumActivity.jsp old mode 100644 new mode 100755 index 7f8db53..d129810 --- a/WebContent/jsp/course/content_management/activities/forum/listMessageForumActivity.jsp +++ b/WebContent/jsp/course/content_management/activities/forum/listMessageForumActivity.jsp @@ -30,11 +30,19 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
    + +

    Resposta:

    +
    + ${message.messageReply.author.name}:
    +

    ${message.messageReply.body}

    +
    +
    ,
      Ã s   +
    diff --git a/WebContent/jsp/course/content_management/activities/forum/viewForumActivities.jsp b/WebContent/jsp/course/content_management/activities/forum/viewForumActivities.jsp old mode 100644 new mode 100755 index 1d5225b..1910045 --- a/WebContent/jsp/course/content_management/activities/forum/viewForumActivities.jsp +++ b/WebContent/jsp/course/content_management/activities/forum/viewForumActivities.jsp @@ -42,7 +42,7 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
    -  /  +  / 
    diff --git a/WebContent/jsp/course/content_management/activities/game/closeWindow.jsp b/WebContent/jsp/course/content_management/activities/game/closeWindow.jsp new file mode 100755 index 0000000..ceb5bce --- /dev/null +++ b/WebContent/jsp/course/content_management/activities/game/closeWindow.jsp @@ -0,0 +1,12 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> + + + + +Insert title here + + + + + \ No newline at end of file diff --git a/WebContent/jsp/course/content_management/activities/game/editGameActivities.jsp b/WebContent/jsp/course/content_management/activities/game/editGameActivities.jsp old mode 100644 new mode 100755 index 58ac420..99ddb1f --- a/WebContent/jsp/course/content_management/activities/game/editGameActivities.jsp +++ b/WebContent/jsp/course/content_management/activities/game/editGameActivities.jsp @@ -15,9 +15,12 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título <%@ taglib uri="/WEB-INF/struts-html" prefix="html"%> <%@ taglib uri="/WEB-INF/struts-bean" prefix="bean"%> <%@ taglib uri="/WEB-INF/struts-logic" prefix="logic"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ page import="br.ufpe.cin.amadeus.amadeus_web.facade.Facade, - java.util.HashMap,br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Game" %> + java.util.HashMap,br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Game, + java.util.HashMap,br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Module" %> + <%int idGame=-1; %> <% @@ -26,44 +29,75 @@ idGame = Integer.parseInt(request.getParameter("idGame")); Facade facade = Facade.getInstance(); Game game = facade.getGameById(idGame); -HashMap data = new HashMap(); +HashMap dataGame = new HashMap(); +HashMap dataModule = new HashMap(); + +dataGame.put("nameGame",game.getName()); +dataGame.put("urlGame", game.getUrl()); +dataGame.put("descriptionGame", game.getDescription()); +dataGame.put("isExternal", game.getLinkExterno()); +dataGame.put("id",game.getId()); + +Module module = game.getModule(); + +dataModule.put("position", module.getPosition()); + +request.setAttribute("game", dataGame); +request.setAttribute("module", dataModule); + -data.put("nameGame",game.getName()); -data.put("urlGame", game.getUrl()); -data.put("descriptionGame", game.getDescription()); -request.setAttribute("game", data); %> - - - - - - - - - - - - - - - - - - - - - - -
    :
    -
    :
    -
    :
    - -
    - href="javascript:void(0)"> / - -
    - -
    \ No newline at end of file + + +
    + + + +
    + +
    +
    + +
    +
    + +
    +
    + + + + + + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + / + +
    +
    +
    + +
    \ No newline at end of file diff --git a/WebContent/jsp/course/content_management/activities/game/gameActivities.jsp b/WebContent/jsp/course/content_management/activities/game/gameActivities.jsp old mode 100644 new mode 100755 index e31091a..a9c35db --- a/WebContent/jsp/course/content_management/activities/game/gameActivities.jsp +++ b/WebContent/jsp/course/content_management/activities/game/gameActivities.jsp @@ -27,8 +27,12 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título } function formSubmit(){ + var courseId = document.getElementById("inputCourse").value; ajaxLoadingConfig('actions','/themes/default/imgs/ajax-loader-activity.gif />'); - document.gameActivity.submit(); + + //reload forcado pq o ajax reverso não está funcionado com fileform + setTimeout(function() {window.location.reload();},3000); + document.gameActivity.submit(); } @@ -47,22 +51,16 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
    - +
    - +
    - +
    - -
    -
    - -
    -
    - +
    diff --git a/WebContent/jsp/course/content_management/activities/game/playGameActivities.jsp b/WebContent/jsp/course/content_management/activities/game/playGameActivities.jsp new file mode 100755 index 0000000..e6a568f --- /dev/null +++ b/WebContent/jsp/course/content_management/activities/game/playGameActivities.jsp @@ -0,0 +1,61 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> + + + + + + +Game + + + + +
    + + + + + + + + +
    + + \ No newline at end of file diff --git a/WebContent/jsp/course/content_management/activities/game/viewGameActivities.jsp b/WebContent/jsp/course/content_management/activities/game/viewGameActivities.jsp old mode 100644 new mode 100755 index 7cd2c52..709757d --- a/WebContent/jsp/course/content_management/activities/game/viewGameActivities.jsp +++ b/WebContent/jsp/course/content_management/activities/game/viewGameActivities.jsp @@ -15,28 +15,53 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título <%@ taglib uri="/WEB-INF/struts-html" prefix="html"%> <%@ taglib uri="/WEB-INF/struts-bean" prefix="bean"%> <%@ taglib uri="/WEB-INF/struts-logic" prefix="logic"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    - +

    ${game.name}

    ${game.description}

    -
    -
    - / - -
    - -
    - / - -
    -
    +
    +
    + + + / + + + / + +
    +
    +
    + +
    + Dados do jogo +
    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/WebContent/jsp/course/content_management/activities/game/viewGameActivitiesScore.jsp b/WebContent/jsp/course/content_management/activities/game/viewGameActivitiesScore.jsp old mode 100644 new mode 100755 index 033d360..93fc255 --- a/WebContent/jsp/course/content_management/activities/game/viewGameActivitiesScore.jsp +++ b/WebContent/jsp/course/content_management/activities/game/viewGameActivitiesScore.jsp @@ -1,83 +1,44 @@ - - <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%> -<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean"%> +<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-logic" prefix="logic"%> +<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> -<%@ page import="java.util.List"%> - -<% -String typeScore = (String) request.getAttribute("typeScore"); -String idMMJogos = (String) request.getAttribute("idMMJogos"); -@SuppressWarnings("unchecked") -List score = (List) request.getAttribute("score"); -%> - - - - - - -

    -
      -
    • -
    • -
    • -
    -
    -
    - <%if (score.size()>0){ - if (!typeScore.equals("date")){ - String aux = score.get(0); - for (int i = 0; i < (score.size() - 1); i += 4) { - if (typeScore.equals("top5")){ %> -
    : <%=score.get(i)%>
    -
    : <%=score.get(i + 1).substring(0, 10)%>
    -
    : <%=score.get(i + 2)%>
    -
    : <%=score.get(i + 3)%>
    - <%}else{ - if (typeScore.equals("user")){ - if ((i==0)|| !aux.equals(score.get(i))){%> -
    : <%=score.get(i)%>
    - <%} aux = score.get(i); %> -
    : <%=score.get(i + 1).substring(0, 10)%>
    -
    : <%=score.get(i + 2)%>
    -
    : <%=score.get(i + 3)%>
    - <%} - } - } - }else{ - String aux = score.get(0); - for (int i = 0; i < (score.size() - 1); i += 4) { - if ((i==0)|| !aux.equals(score.get(i))){%> -
    : <%=score.get(i).substring(0, 10)%>
    - <%aux = score.get(i); - }%> -
    : <%=score.get(i+1)%>
    -
    -
      -
    • : <%=score.get(i + 2)%>
    • -
    • : <%=score.get(i + 3)%>
    • -
    -
    - <%} - } - }else{%>
    <%}%> -
    -
    \ No newline at end of file + + +
    + + /GameGrid.swf" /> + + + + + /GameGrid.swf" quality="high" bgcolor="#869ca7" + width="340" height="200" name="GameGrid" align="middle" + play="true" loop="false" quality="high" allowScriptAccess="sameDomain" + type="application/x-shockwave-flash" + pluginspage="http://www.macromedia.com/go/getflashplayer"> + + +
    +
    + +
    + + /GraficoColuna2.swf" /> + + + + /GraficoColuna2.swf" quality="high" bgcolor="#869ca7" + width="340" height="200" name="GameGrid" align="middle" + play="true" loop="false" quality="high" allowScriptAccess="sameDomain" + type="application/x-shockwave-flash" + pluginspage="http://www.macromedia.com/go/getflashplayer"> + + +
    +
    diff --git a/WebContent/jsp/course/content_management/activities/game/viewGameActivitiesScoreOld.jsp b/WebContent/jsp/course/content_management/activities/game/viewGameActivitiesScoreOld.jsp new file mode 100755 index 0000000..033d360 --- /dev/null +++ b/WebContent/jsp/course/content_management/activities/game/viewGameActivitiesScoreOld.jsp @@ -0,0 +1,83 @@ + + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%> +<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean"%> +<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic"%> + +<%@ page import="java.util.List"%> + +<% +String typeScore = (String) request.getAttribute("typeScore"); +String idMMJogos = (String) request.getAttribute("idMMJogos"); +@SuppressWarnings("unchecked") +List score = (List) request.getAttribute("score"); +%> + + + + + + +

    +
      +
    • +
    • +
    • +
    +
    +
    + <%if (score.size()>0){ + if (!typeScore.equals("date")){ + String aux = score.get(0); + for (int i = 0; i < (score.size() - 1); i += 4) { + if (typeScore.equals("top5")){ %> +
    : <%=score.get(i)%>
    +
    : <%=score.get(i + 1).substring(0, 10)%>
    +
    : <%=score.get(i + 2)%>
    +
    : <%=score.get(i + 3)%>
    + <%}else{ + if (typeScore.equals("user")){ + if ((i==0)|| !aux.equals(score.get(i))){%> +
    : <%=score.get(i)%>
    + <%} aux = score.get(i); %> +
    : <%=score.get(i + 1).substring(0, 10)%>
    +
    : <%=score.get(i + 2)%>
    +
    : <%=score.get(i + 3)%>
    + <%} + } + } + }else{ + String aux = score.get(0); + for (int i = 0; i < (score.size() - 1); i += 4) { + if ((i==0)|| !aux.equals(score.get(i))){%> +
    : <%=score.get(i).substring(0, 10)%>
    + <%aux = score.get(i); + }%> +
    : <%=score.get(i+1)%>
    +
    +
      +
    • : <%=score.get(i + 2)%>
    • +
    • : <%=score.get(i + 3)%>
    • +
    +
    + <%} + } + }else{%>
    <%}%> +
    +
    \ No newline at end of file diff --git a/WebContent/jsp/course/content_management/activities/game/viewGameGraphic.jsp b/WebContent/jsp/course/content_management/activities/game/viewGameGraphic.jsp new file mode 100755 index 0000000..7beaebf --- /dev/null +++ b/WebContent/jsp/course/content_management/activities/game/viewGameGraphic.jsp @@ -0,0 +1,206 @@ + + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic"%> +<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<%@ taglib prefix="display" uri="http://displaytag.sf.net/el" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> + + + + + + + + + + +
    +
    + +
    +
    +

    Visualização

    +
    +
    + +
    +
    +
    +
  • Pontuação via Gráfico de Colunas
  • +
  • Pontuação via Gráfico de Colunas
  • +
  • Pontuação via Gráfico Pizza
  • +
  • Pontuação via Gráfico Pizza
  • +
  • Pontuação via Gráfico TreeMap
  • +
  • Pontuação via Gráfico TreeMap
  • +
  • Level via Gráfico de Colunas
  • +
  • Level via Gráfico de Colunas
  • +
  • Level via Gráfico Pizza
  • +
  • Level via Gráfico Pizza
  • +
  • Level via Gráfico TreeMap
  • +
  • Level via Gráfico TreeMap
  • + + +
  • Tempo x Level X Pontuação
  • +
  • Tempo x Level X Pontuação
  • +
  • Tempo Total Jogado x Quantidade de Partidas
  • +
  • Tempo Total Jogado x Quantidade de Partidas
  • +
  • Level x Pontuação
  • +
  • Level x Pontuação
  • + +
    +
    + + + + + /Grafico1.swf" /> + + + + /Grafico1.swf" quality="high" bgcolor="#869ca7" + width="500" height="375" name="Grafico" align="middle" + play="true" loop="false" quality="high" allowScriptAccess="sameDomain" + type="application/x-shockwave-flash" + pluginspage="http://www.macromedia.com/go/getflashplayer"> + + + + + + /GraficoLine.swf" /> + + + + /GraficoLine.swf" quality="high" bgcolor="#869ca7" + width="500" height="375" name="Grafico" align="middle" + play="true" loop="false" quality="high" allowScriptAccess="sameDomain" + type="application/x-shockwave-flash" + pluginspage="http://www.macromedia.com/go/getflashplayer"> + + + + + + /GraficoColuna.swf" /> + + + + /GraficoColuna.swf" quality="high" bgcolor="#869ca7" + width="500" height="375" name="Grafico" align="middle" + play="true" loop="false" quality="high" allowScriptAccess="sameDomain" + type="application/x-shockwave-flash" + pluginspage="http://www.macromedia.com/go/getflashplayer"> + + + + + + /GraficoPizza.swf" /> + + + + /GraficoPizza.swf" quality="high" bgcolor="#869ca7" + width="500" height="375" name="Grafico" align="middle" + play="true" loop="false" quality="high" allowScriptAccess="sameDomain" + type="application/x-shockwave-flash" + pluginspage="http://www.macromedia.com/go/getflashplayer"> + + + + + + /GraficoTreeMap.swf" /> + + + + /GraficoTreeMap.swf" quality="high" bgcolor="#869ca7" + width="500" height="375" name="Grafico" align="middle" + play="true" loop="false" quality="high" allowScriptAccess="sameDomain" + type="application/x-shockwave-flash" + pluginspage="http://www.macromedia.com/go/getflashplayer"> + + + + + + /GraficoBolha.swf" /> + + + + /GraficoBolha.swf" quality="high" bgcolor="#869ca7" + width="500" height="375" name="Grafico" align="middle" + play="true" loop="false" quality="high" allowScriptAccess="sameDomain" + type="application/x-shockwave-flash" + pluginspage="http://www.macromedia.com/go/getflashplayer"> + + + + + + /GraficoPlot.swf" /> + + + + /GraficoPlot.swf" quality="high" bgcolor="#869ca7" + width="500" height="375" name="Grafico" align="middle" + play="true" loop="false" quality="high" allowScriptAccess="sameDomain" + type="application/x-shockwave-flash" + pluginspage="http://www.macromedia.com/go/getflashplayer"> + + + + + + /GraficoLine2.swf" /> + + + + /GraficoLine2.swf" quality="high" bgcolor="#869ca7" + width="500" height="375" name="Grafico" align="middle" + play="true" loop="false" quality="high" allowScriptAccess="sameDomain" + type="application/x-shockwave-flash" + pluginspage="http://www.macromedia.com/go/getflashplayer"> + + + + +
    +
    + +
    + + \ No newline at end of file diff --git a/WebContent/jsp/course/content_management/activities/game/viewGamePlayer.jsp b/WebContent/jsp/course/content_management/activities/game/viewGamePlayer.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/learning_object/editLearningObjectActivities.jsp b/WebContent/jsp/course/content_management/activities/learning_object/editLearningObjectActivities.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/learning_object/learningObject.jsp b/WebContent/jsp/course/content_management/activities/learning_object/learningObject.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/learning_object/learningObjectActivities.jsp b/WebContent/jsp/course/content_management/activities/learning_object/learningObjectActivities.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/learning_object/learningObjectShowStatus.jsp b/WebContent/jsp/course/content_management/activities/learning_object/learningObjectShowStatus.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/listActivities.jsp b/WebContent/jsp/course/content_management/activities/listActivities.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/listMaterials.jsp b/WebContent/jsp/course/content_management/activities/listMaterials.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/material/delivery/addMaterialName.jsp b/WebContent/jsp/course/content_management/activities/material/delivery/addMaterialName.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/material/delivery/editMaterialActivity.jsp b/WebContent/jsp/course/content_management/activities/material/delivery/editMaterialActivity.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/material/delivery/editUploadMaterialActivity.jsp b/WebContent/jsp/course/content_management/activities/material/delivery/editUploadMaterialActivity.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/material/delivery/materialActivity.jsp b/WebContent/jsp/course/content_management/activities/material/delivery/materialActivity.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/material/external_link/addExternalLink.jsp b/WebContent/jsp/course/content_management/activities/material/external_link/addExternalLink.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/material/external_link/editExternalLink.jsp b/WebContent/jsp/course/content_management/activities/material/external_link/editExternalLink.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/material/external_link/externalLinkActivity.jsp b/WebContent/jsp/course/content_management/activities/material/external_link/externalLinkActivity.jsp old mode 100644 new mode 100755 index 1589c50..42f9b79 --- a/WebContent/jsp/course/content_management/activities/material/external_link/externalLinkActivity.jsp +++ b/WebContent/jsp/course/content_management/activities/material/external_link/externalLinkActivity.jsp @@ -46,7 +46,8 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
    - / + + /
    diff --git a/WebContent/jsp/course/content_management/activities/material/request/editMaterialRequestActivities.jsp b/WebContent/jsp/course/content_management/activities/material/request/editMaterialRequestActivities.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/material/request/materialRequestActivities.jsp b/WebContent/jsp/course/content_management/activities/material/request/materialRequestActivities.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/material/request/viewMaterialRequestActivities.jsp b/WebContent/jsp/course/content_management/activities/material/request/viewMaterialRequestActivities.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/material/request/viewMaterialRequestTeacherActivities.jsp b/WebContent/jsp/course/content_management/activities/material/request/viewMaterialRequestTeacherActivities.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/poll/editPollActivities.jsp b/WebContent/jsp/course/content_management/activities/poll/editPollActivities.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/poll/pollActivities.jsp b/WebContent/jsp/course/content_management/activities/poll/pollActivities.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/poll/viewPollActivities.jsp b/WebContent/jsp/course/content_management/activities/poll/viewPollActivities.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/poll/viewResultPoll.jsp b/WebContent/jsp/course/content_management/activities/poll/viewResultPoll.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/video/iriz.jsp b/WebContent/jsp/course/content_management/activities/video/iriz.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/video/youtubeChooseVideoOrigin.jsp b/WebContent/jsp/course/content_management/activities/video/youtubeChooseVideoOrigin.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/video/youtubeEditVideo.jsp b/WebContent/jsp/course/content_management/activities/video/youtubeEditVideo.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/video/youtubeNewURL.jsp b/WebContent/jsp/course/content_management/activities/video/youtubeNewURL.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/activities/video/youtubeShowVideoStatus.jsp b/WebContent/jsp/course/content_management/activities/video/youtubeShowVideoStatus.jsp old mode 100644 new mode 100755 index 8342071..7850f3e --- a/WebContent/jsp/course/content_management/activities/video/youtubeShowVideoStatus.jsp +++ b/WebContent/jsp/course/content_management/activities/video/youtubeShowVideoStatus.jsp @@ -39,7 +39,7 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
    - / + /
    diff --git a/WebContent/jsp/course/content_management/activities/video/youtubeUpload.jsp b/WebContent/jsp/course/content_management/activities/video/youtubeUpload.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/clickNewModule.jsp b/WebContent/jsp/course/content_management/clickNewModule.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/editModule.jsp b/WebContent/jsp/course/content_management/editModule.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/listModules.jsp b/WebContent/jsp/course/content_management/listModules.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/content_management/module.jsp b/WebContent/jsp/course/content_management/module.jsp old mode 100644 new mode 100755 index 49a7b3e..660bef4 --- a/WebContent/jsp/course/content_management/module.jsp +++ b/WebContent/jsp/course/content_management/module.jsp @@ -11,13 +11,27 @@ Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. --> +<%@page import="jsx3.gui.Alerts"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ page import="br.ufpe.cin.amadeus.amadeus_web.domain.register.AccessInfo" %> +<%@ page import="br.ufpe.cin.amadeus.amadeus_web.facade.Facade" %> +<%@ page import="java.util.List" %> +<%@ page import="java.util.ArrayList" %> +<%@ page import="br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Forum" %> +<%@ page import="br.ufpe.cin.amadeus.amadeus_web.domain.content_management.PersonForum" %> +<%@ page import="br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Module" %> +<%@ page import="br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Message" %> <%@ taglib uri="/WEB-INF/struts-html" prefix="html"%> <%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + + + + + + + + + + + +
    @@ -58,7 +72,12 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
  • - + + + + + +
  • @@ -76,11 +95,37 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título id="activitiesList${module.position}" > - -
  • - -
  • + <% + Module module = (Module)request.getAttribute("module"); + List moduleforums = module.getForums(); + List personforums = (List)request.getAttribute("forunsperson"); + List alreadyloaded = new ArrayList(); + int count = 0;%> + + <% Forum forum = (Forum)pageContext.getAttribute("forum"); + for(PersonForum personforum: personforums){ + //se já pertencer ao forum + if(forum.equals(personforum.getForum())&&!alreadyloaded.contains(forum)){ + alreadyloaded.add(forum); + //incrementa o contador das mensagens não lidas + for(Message message: forum.getMessages()){ + if(message.getDate().after(personforum.getLastTimeInForum())){ + count++; + } + } + out.write("
  • "); + out.write(""+forum.getName()+" ("+count+" mensagens não lidas)"+""); + out.write("
  • "); + count = 0; + } + + }if(!alreadyloaded.contains(forum)){ + out.write("
  • "); + out.write(""+forum.getName()+""); + out.write("
  • "); + }%>
    +
  • diff --git a/WebContent/jsp/course/content_management/moduleGraphic.jsp b/WebContent/jsp/course/content_management/moduleGraphic.jsp new file mode 100755 index 0000000..f44fc11 --- /dev/null +++ b/WebContent/jsp/course/content_management/moduleGraphic.jsp @@ -0,0 +1,30 @@ + + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%> +<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + + +
    + + - + + + + - + + +
    diff --git a/WebContent/jsp/course/content_management/showModules.jsp b/WebContent/jsp/course/content_management/showModules.jsp old mode 100644 new mode 100755 index 8d053a7..72abd1e --- a/WebContent/jsp/course/content_management/showModules.jsp +++ b/WebContent/jsp/course/content_management/showModules.jsp @@ -34,6 +34,7 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título +
    @@ -52,6 +53,11 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
    + + +
    + +
    @@ -94,7 +100,9 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
    -
    +
    + +
    diff --git a/WebContent/jsp/course/editCourse.jsp b/WebContent/jsp/course/editCourse.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/insertCourseStepOne.jsp b/WebContent/jsp/course/insertCourseStepOne.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/insertCourseStepTwo.jsp b/WebContent/jsp/course/insertCourseStepTwo.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/replicateCourseStepOne.jsp b/WebContent/jsp/course/replicateCourseStepOne.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/socialInteractionMonitoring.jsp b/WebContent/jsp/course/socialInteractionMonitoring.jsp new file mode 100755 index 0000000..e078aa9 --- /dev/null +++ b/WebContent/jsp/course/socialInteractionMonitoring.jsp @@ -0,0 +1,120 @@ + + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<%@ page import="br.ufpe.cin.amadeus.amadeus_web.domain.register.AccessInfo" %> +<%@ page import="br.ufpe.cin.amadeus.amadeus_web.domain.content_management.ProfileType" %> + + + + + + + + +
    + + <% + AccessInfo user = (AccessInfo)session.getAttribute("user"); + ProfileType profile = user.getTypeProfile(); + if (!profile.equals(ProfileType.ADMIN) && !profile.equals(ProfileType.PROFESSOR)) {%> + +<% } + +%> + + + +
    +

    +
    + + +
    + + +
    +
    +
    +

    + + + +
    +
    + / + / + +
    +
    +
    + / + / + +
    +
    +
    + + Fórum + + + + Mensagem + + + + Chat + + + Twitter + +
    +
    +
    + + + + + + + + + + +
    +











    +
    + + +
    + +
    + + + +
    + + +
    diff --git a/WebContent/jsp/course/viewChangeTeacher.jsp b/WebContent/jsp/course/viewChangeTeacher.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/viewCourse.jsp b/WebContent/jsp/course/viewCourse.jsp old mode 100644 new mode 100755 index 90ac608..192e64c --- a/WebContent/jsp/course/viewCourse.jsp +++ b/WebContent/jsp/course/viewCourse.jsp @@ -50,7 +50,12 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
    -
    + + +
    + +
    +
    @@ -206,7 +211,7 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
    - +
    diff --git a/WebContent/jsp/course/viewCourseDeleteConfirmation.jsp b/WebContent/jsp/course/viewCourseDeleteConfirmation.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/viewCourseEvaluations.jsp b/WebContent/jsp/course/viewCourseEvaluations.jsp old mode 100644 new mode 100755 index 55a2318..0a3ed30 --- a/WebContent/jsp/course/viewCourseEvaluations.jsp +++ b/WebContent/jsp/course/viewCourseEvaluations.jsp @@ -50,6 +50,11 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
    + + +
    + +
    diff --git a/WebContent/jsp/course/viewCourseNotLogged.jsp b/WebContent/jsp/course/viewCourseNotLogged.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/course/viewCourseParticipants.jsp b/WebContent/jsp/course/viewCourseParticipants.jsp old mode 100644 new mode 100755 index d38f837..113b8a9 --- a/WebContent/jsp/course/viewCourseParticipants.jsp +++ b/WebContent/jsp/course/viewCourseParticipants.jsp @@ -44,6 +44,11 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
    + + +
    + +
    @@ -144,7 +149,9 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
    -
    +
    + +
    diff --git a/WebContent/jsp/course/viewCourses.jsp b/WebContent/jsp/course/viewCourses.jsp old mode 100644 new mode 100755 index eff3ed2..8d5431a --- a/WebContent/jsp/course/viewCourses.jsp +++ b/WebContent/jsp/course/viewCourses.jsp @@ -57,7 +57,7 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título if(pageNumber == null){ if (criteria == null) { - criteria = (String)request.getParameter("keyword_course"); + criteria = new String(request.getParameter("keyword_course").getBytes("ISO-8859-1"), "UTF-8"); Facade facade = Facade.getInstance(); List[] founded = facade.getCoursesByRule(criteria); numberOfResults = founded[0].size() + founded[1].size() + founded[2].size() + founded[3].size(); diff --git a/WebContent/jsp/course/viewGraphic.jsp b/WebContent/jsp/course/viewGraphic.jsp new file mode 100755 index 0000000..55e790b --- /dev/null +++ b/WebContent/jsp/course/viewGraphic.jsp @@ -0,0 +1,420 @@ + + + + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic"%> +<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<%@ taglib prefix="display" uri="http://displaytag.sf.net/el" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> + + + + + + + + + + + + + + + + +
    +
    + +
    + +
    +

    Módulo de Visualização

    +
    +
    + +
    +
    + + + + +
    + +
    +
    +
    + +
    + Vizualização: + +
    +
    + + Modulo: + + +
    +
    + + Aluno: + +
    +
    +
    +
    + + Jogo: + +
    +
    +
    +
    + + + + /GraficoPizza.swf" /> + + + + /GraficoPizza.swf" quality="high" bgcolor="#869ca7" + width="480" height="375" name="Grafico" align="middle" + play="true" loop="false" quality="high" allowScriptAccess="sameDomain" + type="application/x-shockwave-flash" + pluginspage="http://www.macromedia.com/go/getflashplayer"> + + + + + + /GraficoLine.swf" /> + + + + /GraficoLine.swf" quality="high" bgcolor="#869ca7" + width="480" height="375" name="Grafico" align="middle" + play="true" loop="false" quality="high" allowScriptAccess="sameDomain" + type="application/x-shockwave-flash" + pluginspage="http://www.macromedia.com/go/getflashplayer"> + + + + + + /CumulusTagCloud.swf" /> + + + + /CumulusTagCloud.swf" quality="high" bgcolor="#869ca7" + width="480" height="375" name="Grafico" align="middle" + play="true" loop="false" quality="high" allowScriptAccess="sameDomain" + type="application/x-shockwave-flash" + pluginspage="http://www.macromedia.com/go/getflashplayer"> + + + + + + /GraficoColuna.swf" /> + + + + /GraficoColuna.swf" quality="high" bgcolor="#869ca7" + width="480" height="375" name="Grafico" align="middle" + play="true" loop="false" quality="high" allowScriptAccess="sameDomain" + type="application/x-shockwave-flash" + pluginspage="http://www.macromedia.com/go/getflashplayer"> + + + + + + /GraficoLine.swf" /> + + + + /GraficoLine.swf" quality="high" bgcolor="#869ca7" + width="480" height="375" name="Grafico" align="middle" + play="true" loop="false" quality="high" allowScriptAccess="sameDomain" + type="application/x-shockwave-flash" + pluginspage="http://www.macromedia.com/go/getflashplayer"> + + + + + + /GraficoPlot.swf" /> + + + + /GraficoPlot.swf" quality="high" bgcolor="#869ca7" + width="480" height="375" name="Grafico" align="middle" + play="true" loop="false" quality="high" allowScriptAccess="sameDomain" + type="application/x-shockwave-flash" + pluginspage="http://www.macromedia.com/go/getflashplayer"> + + + + + + /GraficoBolha.swf" /> + + + + /GraficoBolha.swf" quality="high" bgcolor="#869ca7" + width="500" height="375" name="Grafico" align="middle" + play="true" loop="false" quality="high" allowScriptAccess="sameDomain" + type="application/x-shockwave-flash" + pluginspage="http://www.macromedia.com/go/getflashplayer"> + + + + + + /GraficoLine2.swf" /> + + + + /GraficoLine2.swf" quality="high" bgcolor="#869ca7" + width="500" height="375" name="Grafico" align="middle" + play="true" loop="false" quality="high" allowScriptAccess="sameDomain" + type="application/x-shockwave-flash" + pluginspage="http://www.macromedia.com/go/getflashplayer"> + + + + +
    +
    + +
    + + \ No newline at end of file diff --git a/WebContent/jsp/course/viewSendMail.jsp b/WebContent/jsp/course/viewSendMail.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/error/viewAccessDenied.jsp b/WebContent/jsp/error/viewAccessDenied.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/error/viewException.jsp b/WebContent/jsp/error/viewException.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/error/viewPageNotFound.jsp b/WebContent/jsp/error/viewPageNotFound.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/externalLogon.jsp b/WebContent/jsp/externalLogon.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/menu.jsp b/WebContent/jsp/menu.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/messenger/form-reply.jsp b/WebContent/jsp/messenger/form-reply.jsp new file mode 100755 index 0000000..2fe2a58 --- /dev/null +++ b/WebContent/jsp/messenger/form-reply.jsp @@ -0,0 +1,21 @@ + + +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean"%> +<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic"%> +<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<%@ taglib prefix="display" uri="http://displaytag.sf.net/el"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> + +
    +
    + +
    + + +
    + \ No newline at end of file diff --git a/WebContent/jsp/messenger/messenger.jsp b/WebContent/jsp/messenger/messenger.jsp new file mode 100755 index 0000000..c15d183 --- /dev/null +++ b/WebContent/jsp/messenger/messenger.jsp @@ -0,0 +1,90 @@ + + + + +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean"%> +<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic"%> +<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<%@ taglib prefix="display" uri="http://displaytag.sf.net/el"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> + +
    +
    +

    Participantes

    +
      + +
    • Classmates
    • +
    • +
      +
      + + + + + + +
      +
    • +
      + +
    • Professores
    • + +
    • ${teacher.name}
    • +
    • +
      +
      + + + + + +
      +
    • +
      +
      + +
    • Alunos
    • + +
    • ${participant.name}
    • +
    • +
      +
      + + + + + + +
      +
    • +
      +
      +
    +
    + + + + +
    + +
    \ No newline at end of file diff --git a/WebContent/jsp/messenger/seemessages.jsp b/WebContent/jsp/messenger/seemessages.jsp new file mode 100755 index 0000000..042a117 --- /dev/null +++ b/WebContent/jsp/messenger/seemessages.jsp @@ -0,0 +1,65 @@ + + + + +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean"%> +<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic"%> +<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<%@ taglib prefix="display" uri="http://displaytag.sf.net/el"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> + + +
    + +

    Novas Mensagens

    +
    +
    +
    + +

    Nenhuma mensagem não lida!

    +
    +
    +
    + + +
    + ${message.sender.name}
    + + +

    ${message.title}

    +

    ${message.content}

    + Responder + Excluir
    + + + Responder a todos + + +

    +
    +
    +
    +
    +
    +
    + + + +
    \ No newline at end of file diff --git a/WebContent/jsp/messenger/viewAllMessengerMessages.jsp b/WebContent/jsp/messenger/viewAllMessengerMessages.jsp new file mode 100755 index 0000000..7098441 --- /dev/null +++ b/WebContent/jsp/messenger/viewAllMessengerMessages.jsp @@ -0,0 +1,69 @@ + + + + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + + + + + + + + + + + + +
    +
    + +
    + +
    +

    +
    +
    + +
    +
    + + + + +
    + +
    +
    +
    +

    Messages

    + +
    +
    + +
    + +
    + + \ No newline at end of file diff --git a/WebContent/jsp/notAllowed.jsp b/WebContent/jsp/notAllowed.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/openid/accessDeniedOpenID.jsp b/WebContent/jsp/openid/accessDeniedOpenID.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/openid/managerOpenIDs.jsp b/WebContent/jsp/openid/managerOpenIDs.jsp old mode 100644 new mode 100755 index 06d8a6b..594a6fb --- a/WebContent/jsp/openid/managerOpenIDs.jsp +++ b/WebContent/jsp/openid/managerOpenIDs.jsp @@ -89,6 +89,11 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
  •  Google Account +
  • +
  • + +   +
  • diff --git a/WebContent/jsp/settings/admin/adminSettings.jsp b/WebContent/jsp/settings/admin/adminSettings.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/settings/admin/mobile/mobileSettings.jsp b/WebContent/jsp/settings/admin/mobile/mobileSettings.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/settings/admin/web/mailSender.jsp b/WebContent/jsp/settings/admin/web/mailSender.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/settings/admin/web/security.jsp b/WebContent/jsp/settings/admin/web/security.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/settings/admin/web/system.jsp b/WebContent/jsp/settings/admin/web/system.jsp old mode 100644 new mode 100755 index b01bd18..45f4b12 --- a/WebContent/jsp/settings/admin/web/system.jsp +++ b/WebContent/jsp/settings/admin/web/system.jsp @@ -13,7 +13,7 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> - +
    Geral
    @@ -30,8 +30,14 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
    - +
    +
    Temas
    -
    \ No newline at end of file +
    +
    +
    + +
    + \ No newline at end of file diff --git a/WebContent/jsp/twittertool/socialTest.jsp b/WebContent/jsp/twittertool/socialTest.jsp new file mode 100755 index 0000000..a23dd49 --- /dev/null +++ b/WebContent/jsp/twittertool/socialTest.jsp @@ -0,0 +1,87 @@ + + + + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + + + + + + + + + + + + + +
    +
    + +
    + +
    +

    +
    +
    + +
    +
    + + + + +
    + +
    +
    +
    + + +
    + + +
    + + \ No newline at end of file diff --git a/WebContent/jsp/twittertool/userTwitter.jsp b/WebContent/jsp/twittertool/userTwitter.jsp new file mode 100755 index 0000000..39bd7f0 --- /dev/null +++ b/WebContent/jsp/twittertool/userTwitter.jsp @@ -0,0 +1,47 @@ + + + + +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean"%> +<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic"%> +<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<%@ taglib prefix="display" uri="http://displaytag.sf.net/el"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> + + +
    + +

    + Adicione seu Twitter ao seu perfil aqui. +

    +
    + + +
    +

    Seus Ultimos Tweets

    +
      +
      + + + + +
      +
      \ No newline at end of file diff --git a/WebContent/jsp/twittertool/viewSocialNetworkMonitoring.jsp b/WebContent/jsp/twittertool/viewSocialNetworkMonitoring.jsp new file mode 100755 index 0000000..3ae0326 --- /dev/null +++ b/WebContent/jsp/twittertool/viewSocialNetworkMonitoring.jsp @@ -0,0 +1,81 @@ + + + + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + + + + + + + + + + + + +
      +
      + +
      + +
      +

      +
      +
      + +
      +
      + + + + +
      + +
      +
      +
      +
      +

      Social Network Monitoring

      +
      +
      +
      +
      + +
      + + +

      +
      +
      +
      +
      +
      + +
      + +
      + + \ No newline at end of file diff --git a/WebContent/jsp/user/RemindPassword.jsp b/WebContent/jsp/user/RemindPassword.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/user/adminPendingTasks.jsp b/WebContent/jsp/user/adminPendingTasks.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/user/assistanceRequest.jsp b/WebContent/jsp/user/assistanceRequest.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/user/editPassword.jsp b/WebContent/jsp/user/editPassword.jsp old mode 100644 new mode 100755 index 550f631..d24de84 --- a/WebContent/jsp/user/editPassword.jsp +++ b/WebContent/jsp/user/editPassword.jsp @@ -55,7 +55,12 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
    •  
    •  Google Account
    • - +
    • + +   + +
    • +
      diff --git a/WebContent/jsp/user/editUser.jsp b/WebContent/jsp/user/editUser.jsp old mode 100644 new mode 100755 index 2d4b0f5..a2a9ea8 --- a/WebContent/jsp/user/editUser.jsp +++ b/WebContent/jsp/user/editUser.jsp @@ -87,6 +87,12 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título  Google Account +
    • + +   + +
    • +
      diff --git a/WebContent/jsp/user/insertUser.jsp b/WebContent/jsp/user/insertUser.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/user/integrationSocialNetworks.jsp b/WebContent/jsp/user/integrationSocialNetworks.jsp new file mode 100755 index 0000000..da8a690 --- /dev/null +++ b/WebContent/jsp/user/integrationSocialNetworks.jsp @@ -0,0 +1,108 @@ + + + + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %> +<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %> +<%@ taglib uri="/WEB-INF/struts-nested" prefix="nested" %> +<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + + + + + + + + + + + +
      +
      + +
      + +
      +

      +
      +
      + +
      +
      +
      + +
      +
      +
      + + + +
        + +
      • +
        +
      +
      + +
      + + + + + + + +

      + + + + + + + + + + + + +
      : + +
      Ex: amadeuslms
      : + +
      Ex: amadeuslms
      + +
      + + + + \ No newline at end of file diff --git a/WebContent/jsp/user/manager/teste.jsp b/WebContent/jsp/user/manager/teste.jsp deleted file mode 100644 index e69de29..0000000 diff --git a/WebContent/jsp/user/manager/viewAllCourses.jsp b/WebContent/jsp/user/manager/viewAllCourses.jsp old mode 100644 new mode 100755 index 79ce7eb..07a9d0c --- a/WebContent/jsp/user/manager/viewAllCourses.jsp +++ b/WebContent/jsp/user/manager/viewAllCourses.jsp @@ -113,7 +113,7 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
      - + @@ -152,4 +152,4 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
      - + \ No newline at end of file diff --git a/WebContent/jsp/user/manager/viewAllUsers.jsp b/WebContent/jsp/user/manager/viewAllUsers.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/user/manager/viewEditUser.jsp b/WebContent/jsp/user/manager/viewEditUser.jsp old mode 100644 new mode 100755 index a1b0368..51e9885 --- a/WebContent/jsp/user/manager/viewEditUser.jsp +++ b/WebContent/jsp/user/manager/viewEditUser.jsp @@ -70,7 +70,9 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
      - + + + + + + + + + + + + + + +
      diff --git a/WebContent/jsp/user/manager/viewSendMail.jsp b/WebContent/jsp/user/manager/viewSendMail.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/user/manager/viewUserNew.jsp b/WebContent/jsp/user/manager/viewUserNew.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/user/manager/viewUserProfile.jsp b/WebContent/jsp/user/manager/viewUserProfile.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/user/onlineUsers.jsp b/WebContent/jsp/user/onlineUsers.jsp old mode 100644 new mode 100755 index 8e9b547..6821324 --- a/WebContent/jsp/user/onlineUsers.jsp +++ b/WebContent/jsp/user/onlineUsers.jsp @@ -62,6 +62,11 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título  Google Account + +
    • + +   +
    • diff --git a/WebContent/jsp/user/studentPendingTasks.jsp b/WebContent/jsp/user/studentPendingTasks.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/user/teacherPendingTasks.jsp b/WebContent/jsp/user/teacherPendingTasks.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/user/teachingRequest.jsp b/WebContent/jsp/user/teachingRequest.jsp old mode 100644 new mode 100755 diff --git a/WebContent/jsp/user/userClassMates.jsp b/WebContent/jsp/user/userClassMates.jsp old mode 100644 new mode 100755 index 9b50dea..30139c2 --- a/WebContent/jsp/user/userClassMates.jsp +++ b/WebContent/jsp/user/userClassMates.jsp @@ -75,6 +75,11 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título  Google Account + +
    • + +   +
    • diff --git a/WebContent/jsp/user/userPrivateData.jsp b/WebContent/jsp/user/userPrivateData.jsp old mode 100644 new mode 100755 index 39be8f0..9d14c3c --- a/WebContent/jsp/user/userPrivateData.jsp +++ b/WebContent/jsp/user/userPrivateData.jsp @@ -85,6 +85,12 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título  Google Account +
    • + +   + +
    • +
    • @@ -190,6 +196,18 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
      :
       
      :" target="_blank">http://www.twitter.com/
       
      :" target="_blank">http://www.facebook.com/
      diff --git a/WebContent/jsp/user/userPublicData.jsp b/WebContent/jsp/user/userPublicData.jsp old mode 100644 new mode 100755 index 5bc138e..42a786b --- a/WebContent/jsp/user/userPublicData.jsp +++ b/WebContent/jsp/user/userPublicData.jsp @@ -148,6 +148,17 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
    • :
       
      :" target="_blank">http://www.twitter.com/
       
      :" target="_blank">http://www.facebook.com/
      diff --git a/WebContent/jsp/welcome.jsp b/WebContent/jsp/welcome.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile.html b/WebContent/mobile.html old mode 100644 new mode 100755 diff --git a/WebContent/mobile/atividades/homeAtividades.jsp b/WebContent/mobile/atividades/homeAtividades.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/atividades/homeAtividadesModulo.jsp b/WebContent/mobile/atividades/homeAtividadesModulo.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/atividades/homeAtividadesTodosCursos.jsp b/WebContent/mobile/atividades/homeAtividadesTodosCursos.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/atividades/homeEnquete.jsp b/WebContent/mobile/atividades/homeEnquete.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/atividades/homeLearningObject.jsp b/WebContent/mobile/atividades/homeLearningObject.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/atividades/processamentoEnquete.jsp b/WebContent/mobile/atividades/processamentoEnquete.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/atividades/resultadoEnquete.jsp b/WebContent/mobile/atividades/resultadoEnquete.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/atividades/visualizarAtividadeCurso.jsp b/WebContent/mobile/atividades/visualizarAtividadeCurso.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/atividades/visualizarAtividadeModulo.jsp b/WebContent/mobile/atividades/visualizarAtividadeModulo.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/atividades/visualizarAtividadeTodosCursos.jsp b/WebContent/mobile/atividades/visualizarAtividadeTodosCursos.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/configuracoes/gerenciamentoCorDoCurso.jsp b/WebContent/mobile/configuracoes/gerenciamentoCorDoCurso.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/configuracoes/gerenciamentoCurso.jsp b/WebContent/mobile/configuracoes/gerenciamentoCurso.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/configuracoes/gerenciamentoNumeroCelular.jsp b/WebContent/mobile/configuracoes/gerenciamentoNumeroCelular.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/configuracoes/homeGerenciamento.jsp b/WebContent/mobile/configuracoes/homeGerenciamento.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/configuracoes/processamentoNumero.jsp b/WebContent/mobile/configuracoes/processamentoNumero.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/curso/gerenciamentoForum.jsp b/WebContent/mobile/curso/gerenciamentoForum.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/curso/homeAudio.jsp b/WebContent/mobile/curso/homeAudio.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/curso/homeCurso.jsp b/WebContent/mobile/curso/homeCurso.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/curso/homeForum.jsp b/WebContent/mobile/curso/homeForum.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/curso/homeInformacoes.jsp b/WebContent/mobile/curso/homeInformacoes.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/curso/homeModulo.jsp b/WebContent/mobile/curso/homeModulo.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/curso/homeModulos.jsp b/WebContent/mobile/curso/homeModulos.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/curso/homeTodosCursos.jsp b/WebContent/mobile/curso/homeTodosCursos.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/curso/processaDownloadAudio.jsp b/WebContent/mobile/curso/processaDownloadAudio.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/curso/viewForum.jsp b/WebContent/mobile/curso/viewForum.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/home/homeHtml.jsp b/WebContent/mobile/home/homeHtml.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/imgs/amadeus.JPG b/WebContent/mobile/imgs/amadeus.JPG deleted file mode 100644 index 314046c..0000000 Binary files a/WebContent/mobile/imgs/amadeus.JPG and /dev/null differ diff --git a/WebContent/mobile/imgs/amadeus.wbmp b/WebContent/mobile/imgs/amadeus.wbmp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/imgs/amadeus2.jpg b/WebContent/mobile/imgs/amadeus2.jpg old mode 100644 new mode 100755 diff --git a/WebContent/mobile/imgs/amadeus_mobile.jpg b/WebContent/mobile/imgs/amadeus_mobile.jpg deleted file mode 100644 index baae1b1..0000000 Binary files a/WebContent/mobile/imgs/amadeus_mobile.jpg and /dev/null differ diff --git a/WebContent/mobile/imgs/ico_mensagemlida.gif b/WebContent/mobile/imgs/ico_mensagemlida.gif old mode 100644 new mode 100755 diff --git a/WebContent/mobile/imgs/ico_mensagemnlida.gif b/WebContent/mobile/imgs/ico_mensagemnlida.gif old mode 100644 new mode 100755 diff --git a/WebContent/mobile/index.html b/WebContent/mobile/index.html old mode 100644 new mode 100755 diff --git a/WebContent/mobile/login/deslogarHtml.jsp b/WebContent/mobile/login/deslogarHtml.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/login/loginHtml.jsp b/WebContent/mobile/login/loginHtml.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/login/processamentoLoginHtml.jsp b/WebContent/mobile/login/processamentoLoginHtml.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/materiais/homeMateriais.jsp b/WebContent/mobile/materiais/homeMateriais.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/materiais/homeMateriaisModulo.jsp b/WebContent/mobile/materiais/homeMateriaisModulo.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/materiais/homeMateriaisTodosCursos.jsp b/WebContent/mobile/materiais/homeMateriaisTodosCursos.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/noticias/noticiasAmadeus.jsp b/WebContent/mobile/noticias/noticiasAmadeus.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/noticias/noticiasCurso.jsp b/WebContent/mobile/noticias/noticiasCurso.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/noticias/noticiasModulo.jsp b/WebContent/mobile/noticias/noticiasModulo.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/noticias/noticiasTodosCursos.jsp b/WebContent/mobile/noticias/noticiasTodosCursos.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/noticias/visualizacaoNoticia.jsp b/WebContent/mobile/noticias/visualizacaoNoticia.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/noticias/visualizacaoNoticiaAmadeus.jsp b/WebContent/mobile/noticias/visualizacaoNoticiaAmadeus.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/noticias/visualizacaoNoticiaModulo.jsp b/WebContent/mobile/noticias/visualizacaoNoticiaModulo.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile/noticias/visualizacaoNoticiaTodosCursos.jsp b/WebContent/mobile/noticias/visualizacaoNoticiaTodosCursos.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/activities/viewCourseActivities.jsp b/WebContent/mobile2/activities/viewCourseActivities.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/activities/viewHomework.jsp b/WebContent/mobile2/activities/viewHomework.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/activities/viewLearningObject.jsp b/WebContent/mobile2/activities/viewLearningObject.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/activities/viewModuleActivities.jsp b/WebContent/mobile2/activities/viewModuleActivities.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/activities/viewPoll.jsp b/WebContent/mobile2/activities/viewPoll.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/course/viewAllCourses.jsp b/WebContent/mobile2/course/viewAllCourses.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/course/viewCourse.jsp b/WebContent/mobile2/course/viewCourse.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/course/viewCourseInformation.jsp b/WebContent/mobile2/course/viewCourseInformation.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/course/viewCourseModules.jsp b/WebContent/mobile2/course/viewCourseModules.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/course/viewModule.jsp b/WebContent/mobile2/course/viewModule.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/imgs/amadeus.JPG b/WebContent/mobile2/imgs/amadeus.JPG deleted file mode 100644 index 314046c..0000000 Binary files a/WebContent/mobile2/imgs/amadeus.JPG and /dev/null differ diff --git a/WebContent/mobile2/imgs/amadeus.wbmp b/WebContent/mobile2/imgs/amadeus.wbmp old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/imgs/amadeus2.jpg b/WebContent/mobile2/imgs/amadeus2.jpg old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/imgs/amadeus_mobile.jpg b/WebContent/mobile2/imgs/amadeus_mobile.jpg deleted file mode 100644 index 7c08496..0000000 Binary files a/WebContent/mobile2/imgs/amadeus_mobile.jpg and /dev/null differ diff --git a/WebContent/mobile2/imgs/ico_mensagemlida.gif b/WebContent/mobile2/imgs/ico_mensagemlida.gif old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/imgs/ico_mensagemnlida.gif b/WebContent/mobile2/imgs/ico_mensagemnlida.gif old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/index.jsp b/WebContent/mobile2/index.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/management/viewCellPhoneNumberManagement.jsp b/WebContent/mobile2/management/viewCellPhoneNumberManagement.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/management/viewCourseColorManagement.jsp b/WebContent/mobile2/management/viewCourseColorManagement.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/management/viewCourseManagement.jsp b/WebContent/mobile2/management/viewCourseManagement.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/management/viewManagementHome.jsp b/WebContent/mobile2/management/viewManagementHome.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/materials/viewCourseMaterials.jsp b/WebContent/mobile2/materials/viewCourseMaterials.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/materials/viewModuleMaterials.jsp b/WebContent/mobile2/materials/viewModuleMaterials.jsp old mode 100644 new mode 100755 diff --git a/WebContent/mobile2/viewLogged.jsp b/WebContent/mobile2/viewLogged.jsp old mode 100644 new mode 100755 diff --git a/WebContent/modelspages/defaultPage.jsp b/WebContent/modelspages/defaultPage.jsp old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/amadeus.css b/WebContent/themes/default/css/amadeus.css old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/content_management.css b/WebContent/themes/default/css/content_management.css old mode 100644 new mode 100755 index aa3bcd8..9d4d5ea --- a/WebContent/themes/default/css/content_management.css +++ b/WebContent/themes/default/css/content_management.css @@ -141,6 +141,10 @@ background-color: #f6f6f6; } + .fQuotedText{ + background-color: #f6f6f5; + } + .fMessageAuthor{ margin-top: 10px; text-align: left; } diff --git a/WebContent/themes/default/css/css.css b/WebContent/themes/default/css/css.css old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/displaytag.css b/WebContent/themes/default/css/displaytag.css old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/error.css b/WebContent/themes/default/css/error.css old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/iriz.css b/WebContent/themes/default/css/iriz.css old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/jqueryui/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png b/WebContent/themes/default/css/jqueryui/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/jqueryui/smoothness/images/ui-bg_flat_75_ffffff_40x100.png b/WebContent/themes/default/css/jqueryui/smoothness/images/ui-bg_flat_75_ffffff_40x100.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/jqueryui/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png b/WebContent/themes/default/css/jqueryui/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/jqueryui/smoothness/images/ui-bg_glass_65_ffffff_1x400.png b/WebContent/themes/default/css/jqueryui/smoothness/images/ui-bg_glass_65_ffffff_1x400.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/jqueryui/smoothness/images/ui-bg_glass_75_dadada_1x400.png b/WebContent/themes/default/css/jqueryui/smoothness/images/ui-bg_glass_75_dadada_1x400.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/jqueryui/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png b/WebContent/themes/default/css/jqueryui/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/jqueryui/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png b/WebContent/themes/default/css/jqueryui/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/jqueryui/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/WebContent/themes/default/css/jqueryui/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/jqueryui/smoothness/images/ui-icons_222222_256x240.png b/WebContent/themes/default/css/jqueryui/smoothness/images/ui-icons_222222_256x240.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/jqueryui/smoothness/images/ui-icons_2e83ff_256x240.png b/WebContent/themes/default/css/jqueryui/smoothness/images/ui-icons_2e83ff_256x240.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/jqueryui/smoothness/images/ui-icons_454545_256x240.png b/WebContent/themes/default/css/jqueryui/smoothness/images/ui-icons_454545_256x240.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/jqueryui/smoothness/images/ui-icons_888888_256x240.png b/WebContent/themes/default/css/jqueryui/smoothness/images/ui-icons_888888_256x240.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/jqueryui/smoothness/images/ui-icons_cd0a0a_256x240.png b/WebContent/themes/default/css/jqueryui/smoothness/images/ui-icons_cd0a0a_256x240.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/jqueryui/smoothness/jquery-ui-1.7.1.custom.css b/WebContent/themes/default/css/jqueryui/smoothness/jquery-ui-1.7.1.custom.css old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/messenger.css b/WebContent/themes/default/css/messenger.css new file mode 100755 index 0000000..5c55c47 --- /dev/null +++ b/WebContent/themes/default/css/messenger.css @@ -0,0 +1,210 @@ +@CHARSET "ISO-8859-1"; + +div.send-message-0, div.send-message, div.invisible{ + display: none; +} + +div#participants { + height: 335px; + max-height:240px; + overflow-y: auto; + overflow-x: hidden; +} + +div#participants::-webkit-scrollbar { + width: 5px; +} + +div#participants::-webkit-scrollbar-track { + -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); + border-radius: 10px; +} + +div#participants::-webkit-scrollbar-thumb { + border-radius: 10px; + -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); +} + +div#participants ul { + list-style: none; + cursor: pointer; +} + +div#seemessages{ + padding: 5px; +} + +div#seemessages h2{ + margin: 9px 0; + font-size: 12px; +} + +p.the-message-content{ + background-color: #b6d7a8; + padding: 5px; +} + +div#participants h2{ + margin: 9px 0 5px 5px; + font-size: 12px; +} + +ul.all-participants{ + margin: 0 0 0 5px; + padding: 0; +} + +li#li-professores, li#li-alunos { + cursor: default; + background: #FBFBFB; + margin: 15px 0 3px 0; + padding: 2px; + color: #090; + width: 135px; + font-weight: bolder; +} + +ul.all-participants textarea{ + width: 130px; + max-width:130px; + height: 96px; + max-height: 96px; + resizable: none; +} + +li#all-participants{ + color: #090; +} + +div#messenger input { + width: 64.5px; + text-align: center; +} +div#messenger input.ipt-assunto { + width: 134px; + text-align: left; + color: #ccc; +} + +div#messenger input.btn-cancelar{ + margin-left: 4px; +} + +.alluser{ + background: url(../imgs/amadeus/onlineuser.png) no-repeat; + padding-left: 15px; +} + +div#divsucesso, div#naovazio{ + position: absolute; + top:100px; + right: 500px; + z-index: 25; + margin: 0; + float: right; + width: 200px; + height: 30px; + border: 1px solid #d6e9c6; + text-align: center; + vertical-align: middle; + color: #468847; + background-color: #dff0d8; + font-weight: bolder; + padding-top: 15px; +} + +div#naovazio { + color: #3a87ad; + background-color: #d9edf7; + border-color: #bce8f1; +} + +p.the-message-content a.message-delete-link{ + float: right; +} + +p.the-message-content a.message-reply-link, +p.the-message-content a.message-delete-link, +p.the-message-content a.reply-to-all-link{ + color: #00f; +} + +p.the-message-content a.reply-to-all-link{ + display: block; + text-align: center; + margin-top: 5px; +} + +p.the-message-content a.message-reply-link{ + margin-left: 7px; +} +p.the-message-content a.message-delete-link{ + margin-right: 7px; +} + +div.the-message .message-date, div.the-message .from-user{ + margin-bottom: 7px; +} + +div#all-messages-unread, +p.the-message-content +{ + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} + +p.the-message-content{ + display: none; +} + +div#all-messages-unread{ + padding: 5px; + background-color: #edf5ea; +} + +h3.the-message-title{ + text-align: center; + cursor: pointer; + margin-top: 5px; + clear: both; +} + +h3.the-message-title a{ + color: #00f; +} + +h3.the-message-title a.lida, h3.the-message-title a.lida-true{ + font-weight: normal; +} + +h3.the-message-title:HOVER { + text-decoration: underline; +} + +.reply-assunto{ + width: 232px; + margin-left: 11px; + margin-bottom: 10px; +} + +.reply-content{ + width: 228px; + max-width: 228px; + height: 96px; + max-height: 96px; + float: right; +} + +#label-reply-content{ + float: left; +} + +a.link-see-all-messages{ + color: #00f; +} + +div#div-link-see-all-messages{ + text-align: center; + margin-top: 10px; +} \ No newline at end of file diff --git a/WebContent/themes/default/css/module.css b/WebContent/themes/default/css/module.css old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/nyroModal.css b/WebContent/themes/default/css/nyroModal.css new file mode 100755 index 0000000..c397fe8 --- /dev/null +++ b/WebContent/themes/default/css/nyroModal.css @@ -0,0 +1,105 @@ +.nyroModalBg { + position: fixed; + overflow: hidden; + top: 0; + left: 0; + height: 100%; + width: 100%; + background: #000; + opacity: 0.7; +} +.nmReposition { + position: absolute; +} +.nyroModalCloseButton { + top: -13px; + right: -13px; + width: 12px; + height: 12px; + text-indent: -9999em; + background: url(../img/close.gif); +} +.nyroModalTitle { + top: -26px; + left: 0; + margin: 0; + font-size: 1.1em; + color: #ddd; +} +.nyroModalCont { + position: absolute; + border: 4px solid #777; + margin: 25px; + background: #fff; +} +.nyroModalCont iframe { + width: 800px; + height: 600px; +} +.nyroModalError { + border: 4px solid red; + color: red; + width: 250px; + height: 250px; +} +.nyroModalError div { + min-width: 0; + min-height: 0; + padding: 10px; +} +.nyroModalLink, .nyroModalDom, .nyroModalForm, .nyroModalFormFile { + position: relative; + padding: 10px; + min-height: 250px; + min-width: 250px; + max-width: 1000px; +} +.nyroModalImage, .nyroModalSwf, .nyroModalIframe, .nyroModalIframeForm { + position: relative; + overflow: hidden; +} +.nyroModalImage img { + vertical-align: top; +} +.nyroModalHidden { + left: -9999em; + top: -9999em; +} +.nyroModalLoad { + position: absolute; + width: 100px; + height: 100px; + background: #fff url(../img/ajaxLoader.gif) no-repeat center; + padding: 0; +} +.nyroModalPrev, .nyroModalNext { + outline: none; + position: absolute; + top: 0; + height: 60%; + width: 150px; + min-height: 50px; + max-height: 300px; + cursor: pointer; + text-indent: -9999em; + background: transparent url('data:image/gif;base64,AAAA') left 20% no-repeat; +} +.nyroModalImage .nyroModalPrev, .nyroModalImage .nyroModalNext { + height: 100%; + width: 40%; + max-height: none; +} +.nyroModalPrev { + left: 0; +} +.nyroModalPrev:hover { + background-image: url(../img/prev.gif); +} +.nyroModalNext { + right: 0; + background-position: right 20%; +} +.nyroModalNext:hover { + background-position: right 20%; + background-image: url(../img/next.gif); +} \ No newline at end of file diff --git a/WebContent/themes/default/css/qualinfo.css b/WebContent/themes/default/css/qualinfo.css old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/table.css b/WebContent/themes/default/css/table.css old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/css/twittertool.css b/WebContent/themes/default/css/twittertool.css new file mode 100755 index 0000000..4e9a792 --- /dev/null +++ b/WebContent/themes/default/css/twittertool.css @@ -0,0 +1,120 @@ +@CHARSET "UTF-8"; + +#twitter { + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + padding-left: 10px; + margin-top: 50px; +} + +#twitter h2 { + font-size: 12px; + margin-top: 15px; +} + +#twitter_t { + height: 44px; + color: #fff; + text-shadow: .5px .5px #333; + font-size: 18px; + font-family: Candara; + padding-top: 20px; + padding-left: 25px; +} + +#twitter_m { + padding: 0 15px; + background: #f7effc; +} + +#twitter_container { + min-height: 45px; + height: auto !important; + height: 40px; + padding-bottom: 5px; + padding-top: 5px; +} + +#twitter_update_list { + padding: 0; + overflow: auto; + font-family: Arial; + font-size: 11px; + font-style: italic; + color: #31353d; + /*line-height: 16px;*/ + margin-left: -13px; + margin-top: -5px; +} + +#twitter_update_list li { + list-style: none; + padding: 15px; + border-bottom: dotted 1px #ccc; +} + +#twitter_update_list li a { + color: #631891; + text-decoration: none; + font-weight: bold; +} + +#twitter_update_list li a:hover { + color: #31353d; +} + +#twitter_b { + height: 29px; +} + +/* + * Estilos da pagina social network monitoring + */ + +div#social-network-monitoring{ + border: 1px solid black; + background: #edf5ea; +} + +div#social-network-monitoring h2{ + border-bottom: 1px solid black; + padding: 7px 0 7px 15px; + background: #b6d7a8; + font-size: 12px; +} + +div#social-network-monitoring-content{ + padding: 15px; +} + +div#social-network-monitoring-content img, +div#social-network-monitoring-content #ipt-hashtag{ + margin-bottom: 20px; +} +div#social-network-monitoring-content label{ + padding: 0; +} + +div#social-network-monitoring-content #hash-alert{ + color: #f00; +} + +div#social-network-monitoring-content .monitoring-start-disabled{ + color: #999; + border: 0; +} + +div##waiting { + align:center; +} + +p.no-user-twitter{ + font-size: 12px; + padding: 7px; + margin-top: 25px; +} + +p.no-user-twitter a{ + color: #00f; +} \ No newline at end of file diff --git a/WebContent/themes/default/img/ajax-loader2.gif b/WebContent/themes/default/img/ajax-loader2.gif new file mode 100755 index 0000000..fa79248 Binary files /dev/null and b/WebContent/themes/default/img/ajax-loader2.gif differ diff --git a/WebContent/themes/default/img/ajaxLoader.gif b/WebContent/themes/default/img/ajaxLoader.gif new file mode 100755 index 0000000..2b35424 Binary files /dev/null and b/WebContent/themes/default/img/ajaxLoader.gif differ diff --git a/WebContent/themes/default/img/close.gif b/WebContent/themes/default/img/close.gif new file mode 100755 index 0000000..fa09621 Binary files /dev/null and b/WebContent/themes/default/img/close.gif differ diff --git a/WebContent/themes/default/img/glyphicons-halflings-white.png b/WebContent/themes/default/img/glyphicons-halflings-white.png new file mode 100755 index 0000000..3bf6484 Binary files /dev/null and b/WebContent/themes/default/img/glyphicons-halflings-white.png differ diff --git a/WebContent/themes/default/img/glyphicons-halflings.png b/WebContent/themes/default/img/glyphicons-halflings.png new file mode 100755 index 0000000..79bc568 Binary files /dev/null and b/WebContent/themes/default/img/glyphicons-halflings.png differ diff --git a/WebContent/themes/default/img/next.gif b/WebContent/themes/default/img/next.gif new file mode 100755 index 0000000..76e7666 Binary files /dev/null and b/WebContent/themes/default/img/next.gif differ diff --git a/WebContent/themes/default/img/prev.gif b/WebContent/themes/default/img/prev.gif new file mode 100755 index 0000000..4c4379b Binary files /dev/null and b/WebContent/themes/default/img/prev.gif differ diff --git a/WebContent/themes/default/img/twitter_icon.jpg b/WebContent/themes/default/img/twitter_icon.jpg new file mode 100755 index 0000000..d9adbb4 Binary files /dev/null and b/WebContent/themes/default/img/twitter_icon.jpg differ diff --git a/WebContent/themes/default/imgs/005.jpg b/WebContent/themes/default/imgs/005.jpg old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/ajax-loader-activity.gif b/WebContent/themes/default/imgs/ajax-loader-activity.gif old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/ajax-loader.gif b/WebContent/themes/default/imgs/ajax-loader.gif old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/amadeus/accessDenied.png b/WebContent/themes/default/imgs/amadeus/accessDenied.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/amadeus/alluser.png b/WebContent/themes/default/imgs/amadeus/alluser.png new file mode 100755 index 0000000..d29157a Binary files /dev/null and b/WebContent/themes/default/imgs/amadeus/alluser.png differ diff --git a/WebContent/themes/default/imgs/amadeus/corner16login.png b/WebContent/themes/default/imgs/amadeus/corner16login.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/amadeus/corner8.png b/WebContent/themes/default/imgs/amadeus/corner8.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/amadeus/corner_8_eeeeee.png b/WebContent/themes/default/imgs/amadeus/corner_8_eeeeee.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/amadeus/minus.png b/WebContent/themes/default/imgs/amadeus/minus.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/amadeus/offlineuser.png b/WebContent/themes/default/imgs/amadeus/offlineuser.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/amadeus/onlineuser.png b/WebContent/themes/default/imgs/amadeus/onlineuser.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/amadeus/plus.png b/WebContent/themes/default/imgs/amadeus/plus.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/amadeus/what.gif b/WebContent/themes/default/imgs/amadeus/what.gif old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/bg-mod.png b/WebContent/themes/default/imgs/bg-mod.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/bg.gif b/WebContent/themes/default/imgs/bg.gif old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/displaytag/arrow_down.png b/WebContent/themes/default/imgs/displaytag/arrow_down.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/displaytag/arrow_off.png b/WebContent/themes/default/imgs/displaytag/arrow_off.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/displaytag/arrow_up.png b/WebContent/themes/default/imgs/displaytag/arrow_up.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/displaytag/ico_file_csv.png b/WebContent/themes/default/imgs/displaytag/ico_file_csv.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/displaytag/ico_file_excel.png b/WebContent/themes/default/imgs/displaytag/ico_file_excel.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/displaytag/ico_file_pdf.png b/WebContent/themes/default/imgs/displaytag/ico_file_pdf.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/displaytag/ico_file_xml.png b/WebContent/themes/default/imgs/displaytag/ico_file_xml.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/displaytag/paginazione.png b/WebContent/themes/default/imgs/displaytag/paginazione.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/displaytag/paginazione_ahead.png b/WebContent/themes/default/imgs/displaytag/paginazione_ahead.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/displaytag/paginazione_back.png b/WebContent/themes/default/imgs/displaytag/paginazione_back.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/displaytag/valid-xhtml10.png b/WebContent/themes/default/imgs/displaytag/valid-xhtml10.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/enter.png b/WebContent/themes/default/imgs/enter.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/facebook.png b/WebContent/themes/default/imgs/facebook.png new file mode 100755 index 0000000..53eff67 Binary files /dev/null and b/WebContent/themes/default/imgs/facebook.png differ diff --git a/WebContent/themes/default/imgs/favicon.ico b/WebContent/themes/default/imgs/favicon.ico old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/favicon2.jpg b/WebContent/themes/default/imgs/favicon2.jpg old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/146.ico b/WebContent/themes/default/imgs/icons/146.ico new file mode 100755 index 0000000..15b4999 Binary files /dev/null and b/WebContent/themes/default/imgs/icons/146.ico differ diff --git a/WebContent/themes/default/imgs/icons/agt_15.png b/WebContent/themes/default/imgs/icons/agt_15.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/balloons.png b/WebContent/themes/default/imgs/icons/balloons.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/button_cancel-15.png b/WebContent/themes/default/imgs/icons/button_cancel-15.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/celphone.png b/WebContent/themes/default/imgs/icons/celphone.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/collapse-15.png b/WebContent/themes/default/imgs/icons/collapse-15.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/cross_small.png b/WebContent/themes/default/imgs/icons/cross_small.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/doc.gif b/WebContent/themes/default/imgs/icons/doc.gif old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/document_text.png b/WebContent/themes/default/imgs/icons/document_text.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/documents_exclamation.png b/WebContent/themes/default/imgs/icons/documents_exclamation.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/expand-15.png b/WebContent/themes/default/imgs/icons/expand-15.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/film.png b/WebContent/themes/default/imgs/icons/film.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/film_small.png b/WebContent/themes/default/imgs/icons/film_small.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/films_plus.png b/WebContent/themes/default/imgs/icons/films_plus.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/greenBall.gif b/WebContent/themes/default/imgs/icons/greenBall.gif old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/home.png b/WebContent/themes/default/imgs/icons/home.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/icon_grafico.gif b/WebContent/themes/default/imgs/icons/icon_grafico.gif new file mode 100755 index 0000000..c4e8a50 Binary files /dev/null and b/WebContent/themes/default/imgs/icons/icon_grafico.gif differ diff --git a/WebContent/themes/default/imgs/icons/image.png b/WebContent/themes/default/imgs/icons/image.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/information_frame.png b/WebContent/themes/default/imgs/icons/information_frame.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/material_50x50.png b/WebContent/themes/default/imgs/icons/material_50x50.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/mobile_phone.png b/WebContent/themes/default/imgs/icons/mobile_phone.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/mobile_phone_plus.png b/WebContent/themes/default/imgs/icons/mobile_phone_plus.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/music.png b/WebContent/themes/default/imgs/icons/music.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/pdf.png b/WebContent/themes/default/imgs/icons/pdf.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/pencil_small.png b/WebContent/themes/default/imgs/icons/pencil_small.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/plus.png b/WebContent/themes/default/imgs/icons/plus.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/plus_circle.png b/WebContent/themes/default/imgs/icons/plus_circle.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/ppt.gif b/WebContent/themes/default/imgs/icons/ppt.gif old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/puzzle.png b/WebContent/themes/default/imgs/icons/puzzle.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/question.png b/WebContent/themes/default/imgs/icons/question.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/tags__pencil.png b/WebContent/themes/default/imgs/icons/tags__pencil.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/user.ico b/WebContent/themes/default/imgs/icons/user.ico new file mode 100755 index 0000000..9edf98b Binary files /dev/null and b/WebContent/themes/default/imgs/icons/user.ico differ diff --git a/WebContent/themes/default/imgs/icons/weblink_16x16.png b/WebContent/themes/default/imgs/icons/weblink_16x16.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/weblink_50x50.png b/WebContent/themes/default/imgs/icons/weblink_50x50.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/icons/xls.gif b/WebContent/themes/default/imgs/icons/xls.gif old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/iriz/emoticon01-24x24.png b/WebContent/themes/default/imgs/iriz/emoticon01-24x24.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/iriz/emoticon01-96x96.png b/WebContent/themes/default/imgs/iriz/emoticon01-96x96.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/iriz/emoticon02-24x24.png b/WebContent/themes/default/imgs/iriz/emoticon02-24x24.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/iriz/emoticon02-96x96.png b/WebContent/themes/default/imgs/iriz/emoticon02-96x96.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/iriz/emoticon03-24x24.png b/WebContent/themes/default/imgs/iriz/emoticon03-24x24.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/iriz/emoticon03-96x96.png b/WebContent/themes/default/imgs/iriz/emoticon03-96x96.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/iriz/emoticon04-24x24.png b/WebContent/themes/default/imgs/iriz/emoticon04-24x24.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/iriz/emoticon04-96x96.png b/WebContent/themes/default/imgs/iriz/emoticon04-96x96.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/iriz/enviar-green.png b/WebContent/themes/default/imgs/iriz/enviar-green.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/iriz/enviar-red.png b/WebContent/themes/default/imgs/iriz/enviar-red.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/iriz/enviar-white.png b/WebContent/themes/default/imgs/iriz/enviar-white.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/manutencao.jpg b/WebContent/themes/default/imgs/manutencao.jpg deleted file mode 100644 index edb3518..0000000 Binary files a/WebContent/themes/default/imgs/manutencao.jpg and /dev/null differ diff --git a/WebContent/themes/default/imgs/menu/allow_permission-16x16.png b/WebContent/themes/default/imgs/menu/allow_permission-16x16.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/edit-16x16.png b/WebContent/themes/default/imgs/menu/edit-16x16.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/email-16x16.png b/WebContent/themes/default/imgs/menu/email-16x16.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/games.png b/WebContent/themes/default/imgs/menu/games.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/mobile.png b/WebContent/themes/default/imgs/menu/mobile.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/openid.png b/WebContent/themes/default/imgs/menu/openid.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/openid_title.png b/WebContent/themes/default/imgs/menu/openid_title.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/refresh-16x16.png b/WebContent/themes/default/imgs/menu/refresh-16x16.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/remove-16x16.png b/WebContent/themes/default/imgs/menu/remove-16x16.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/replicate-16x16.png b/WebContent/themes/default/imgs/menu/replicate-16x16.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/settings.png b/WebContent/themes/default/imgs/menu/settings.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/settings_title.png b/WebContent/themes/default/imgs/menu/settings_title.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/tvd.png b/WebContent/themes/default/imgs/menu/tvd.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/user-16x16.png b/WebContent/themes/default/imgs/menu/user-16x16.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/user-card-16x16.png b/WebContent/themes/default/imgs/menu/user-card-16x16.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/user-edit-16x16.png b/WebContent/themes/default/imgs/menu/user-edit-16x16.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/user-group-16x16.png b/WebContent/themes/default/imgs/menu/user-group-16x16.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/user-info-16x16.png b/WebContent/themes/default/imgs/menu/user-info-16x16.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/user-password-16x16.png b/WebContent/themes/default/imgs/menu/user-password-16x16.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/user-pending-tasks-16x16.png b/WebContent/themes/default/imgs/menu/user-pending-tasks-16x16.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/users-16x16.png b/WebContent/themes/default/imgs/menu/users-16x16.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/menu/web.png b/WebContent/themes/default/imgs/menu/web.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/openid/google.png b/WebContent/themes/default/imgs/openid/google.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/openid/openid.png b/WebContent/themes/default/imgs/openid/openid.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/pspb-logo.png b/WebContent/themes/default/imgs/pspb-logo.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/search.png b/WebContent/themes/default/imgs/search.png old mode 100644 new mode 100755 diff --git a/WebContent/themes/default/imgs/twitter.png b/WebContent/themes/default/imgs/twitter.png new file mode 100755 index 0000000..f7dcc35 Binary files /dev/null and b/WebContent/themes/default/imgs/twitter.png differ diff --git a/src/amadeuslms_web-FINAL.sql b/src/amadeuslms_web-FINAL.sql new file mode 100755 index 0000000..b826a8a --- /dev/null +++ b/src/amadeuslms_web-FINAL.sql @@ -0,0 +1,1741 @@ +-- +-- PostgreSQL database dump +-- + +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = off; +SET check_function_bodies = false; +SET client_min_messages = warning; +SET escape_string_warning = off; + + +-- +-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres +-- + +CREATE PROCEDURAL LANGUAGE plpgsql; + + +ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO postgres; + +SET search_path = public, pg_catalog; + +SET default_tablespace = ''; + +SET default_with_oids = false; + +-- +-- Name: accessinfo; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE accessinfo ( + id integer NOT NULL, + login character varying(255), + password character varying(255), + profile_type integer NOT NULL +); + + +ALTER TABLE public.accessinfo OWNER TO postgres; + +-- +-- Name: alternative; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE alternative ( + id integer NOT NULL, + correct boolean NOT NULL, + description character varying(8000), + question_id integer +); + + +ALTER TABLE public.alternative OWNER TO postgres; + +-- +-- Name: alternativerealized; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE alternativerealized ( + id integer NOT NULL, + answer boolean NOT NULL, + alternative_id integer, + questionrealized_id integer NOT NULL +); + + +ALTER TABLE public.alternativerealized OWNER TO postgres; + +-- +-- Name: amadeus_droid_historic; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE amadeus_droid_historic ( + id integer NOT NULL, + action_value character varying(255), + course_name character varying(255), + creation_date timestamp without time zone, + resourse_name character varying(255), + user_name character varying(255) +); + + +ALTER TABLE public.amadeus_droid_historic OWNER TO postgres; + +-- +-- Name: answer; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE answer ( + id integer NOT NULL, + answerdate timestamp without time zone, + person_id integer, + poll_id integer NOT NULL, + "position" integer +); + + +ALTER TABLE public.answer OWNER TO postgres; + +-- +-- Name: archive; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE archive ( + id integer NOT NULL, + archive bytea +); + + +ALTER TABLE public.archive OWNER TO postgres; + +-- +-- Name: association; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE association ( + questionassociation_id integer NOT NULL, + value character varying(255) NOT NULL, + _key character varying(255) NOT NULL +); + + +ALTER TABLE public.association OWNER TO postgres; + +-- +-- Name: associationrealized; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE associationrealized ( + questionrealized_id integer NOT NULL, + value character varying(255) NOT NULL, + _key character varying(255) NOT NULL +); + + +ALTER TABLE public.associationrealized OWNER TO postgres; + +-- +-- Name: choice; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE choice ( + id integer NOT NULL, + alternative character varying(255), + percentage double precision NOT NULL, + votes integer NOT NULL, + poll_id integer NOT NULL, + "position" integer +); + + +ALTER TABLE public.choice OWNER TO postgres; + +-- +-- Name: commentary; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE commentary ( + id integer NOT NULL, + description character varying(255) +); + + +ALTER TABLE public.commentary OWNER TO postgres; + +-- +-- Name: course; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE course ( + id integer NOT NULL, + content character varying(2000), + creationdate timestamp without time zone, + finalcoursedate timestamp without time zone, + finalregistrationdate timestamp without time zone, + initialcoursedate timestamp without time zone, + initialregistrationdate timestamp without time zone, + maxamountstudents integer NOT NULL, + name character varying(255), + objectives character varying(2000), + professor_id integer +); + + +ALTER TABLE public.course OWNER TO postgres; + +-- +-- Name: course_coursescores; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE course_coursescores ( + course_id integer NOT NULL, + studentsscores_id integer NOT NULL +); + + +ALTER TABLE public.course_coursescores OWNER TO postgres; + +-- +-- Name: courseevaluation; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE courseevaluation ( + id integer NOT NULL, + initdate timestamp without time zone +); + + +ALTER TABLE public.courseevaluation OWNER TO postgres; + +-- +-- Name: courseevaluation_commentary; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE courseevaluation_commentary ( + courseevaluation_id integer NOT NULL, + commentaries_id integer NOT NULL, + commentary_position integer NOT NULL +); + + +ALTER TABLE public.courseevaluation_commentary OWNER TO postgres; + +-- +-- Name: courseevaluation_criterion; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE courseevaluation_criterion ( + courseevaluation_id integer NOT NULL, + criteria_id integer NOT NULL, + criterion_position integer NOT NULL +); + + +ALTER TABLE public.courseevaluation_criterion OWNER TO postgres; + +-- +-- Name: courseevaluation_person; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE courseevaluation_person ( + courseevaluation_id integer NOT NULL, + students_id integer NOT NULL +); + + +ALTER TABLE public.courseevaluation_person OWNER TO postgres; + +-- +-- Name: coursescores; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE coursescores ( + id integer NOT NULL, + coursescore double precision NOT NULL, + student_id integer, + module_id integer NOT NULL +); + + +ALTER TABLE public.coursescores OWNER TO postgres; + +-- +-- Name: criterion; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE criterion ( + id integer NOT NULL, + ctype integer +); + + +ALTER TABLE public.criterion OWNER TO postgres; + +-- +-- Name: criterion_criterionanswers; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE criterion_criterionanswers ( + criterion_id integer NOT NULL, + answers_id integer NOT NULL +); + + +ALTER TABLE public.criterion_criterionanswers OWNER TO postgres; + +-- +-- Name: criterionanswers; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE criterionanswers ( + id integer NOT NULL, + aalmostalwaysvotes integer NOT NULL, + aalmostnevervotes integer NOT NULL, + afrequentlyvotes integer NOT NULL, + ararelyvotes integer NOT NULL, + asometimesvotes integer NOT NULL, + atotalvotes integer NOT NULL, + dalmostalwaysvotes integer NOT NULL, + dalmostnevervotes integer NOT NULL, + dfrequentlyvotes integer NOT NULL, + drarelyvotes integer NOT NULL, + dsometimesvotes integer NOT NULL, + dtotalvotes integer NOT NULL +); + + +ALTER TABLE public.criterionanswers OWNER TO postgres; + +-- +-- Name: delivery; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE delivery ( + id integer NOT NULL, + archive bytea, + date timestamp without time zone, + person_id integer, + homework_id integer +); + + +ALTER TABLE public.delivery OWNER TO postgres; + +-- +-- Name: evaluation; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE evaluation ( + id integer NOT NULL, + afterdeadlineachieved boolean NOT NULL, + description character varying(8000), + finish timestamp without time zone, + start timestamp without time zone, + module_id integer +); + + +ALTER TABLE public.evaluation OWNER TO postgres; + +-- +-- Name: evaluation_question; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE evaluation_question ( + evaluation_id integer NOT NULL, + question_id integer NOT NULL +); + + +ALTER TABLE public.evaluation_question OWNER TO postgres; + +-- +-- Name: evaluationrealized; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE evaluationrealized ( + id integer NOT NULL, + correcteddate timestamp without time zone, + grade real NOT NULL, + realizeddate timestamp without time zone, + person_id integer, + evaluation_id integer NOT NULL +); + + +ALTER TABLE public.evaluationrealized OWNER TO postgres; + +-- +-- Name: externallink; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE externallink ( + id integer NOT NULL, + creationdate date, + description character varying(1000), + name character varying(255), + url character varying(500), + module_id integer NOT NULL +); + + +ALTER TABLE public.externallink OWNER TO postgres; + +-- +-- Name: forum; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE forum ( + id integer NOT NULL, + description character varying(9000), + creationdate timestamp without time zone, + name character varying(255), + module_id integer NOT NULL +); + + +ALTER TABLE public.forum OWNER TO postgres; + +-- +-- Name: game; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE game ( + id integer NOT NULL, + creationdate timestamp without time zone, + description character varying(255), + image bytea, + maxusers integer NOT NULL, + minusers integer NOT NULL, + name character varying(255), + url character varying(255), + module_id integer NOT NULL, + linkexterno boolean DEFAULT false +); + + +ALTER TABLE public.game OWNER TO postgres; + +-- +-- Name: gapanswer; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE gapanswer ( + questionrealized_id integer NOT NULL, + answer character varying(255) NOT NULL +); + + +ALTER TABLE public.gapanswer OWNER TO postgres; + +-- +-- Name: hibernate_sequence; Type: SEQUENCE; Schema: public; Owner: postgres +-- + +CREATE SEQUENCE hibernate_sequence + INCREMENT BY 1 + NO MAXVALUE + NO MINVALUE + CACHE 1; + + +ALTER TABLE public.hibernate_sequence OWNER TO postgres; + +-- +-- Name: historylearningobject; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE historylearningobject ( + id integer NOT NULL, + dateaccess timestamp without time zone, + dateendaccess timestamp without time zone, + score character varying(255), + timeaccess time without time zone, + learning_object_id integer NOT NULL, + person_id integer NOT NULL +); + + +ALTER TABLE public.historylearningobject OWNER TO postgres; + +-- +-- Name: homework; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE homework ( + id integer NOT NULL, + allowpostponing timestamp without time zone, + deadline timestamp without time zone, + description character varying(255), + initdate timestamp without time zone, + name character varying(255), + module_id integer NOT NULL +); + + +ALTER TABLE public.homework OWNER TO postgres; + +-- +-- Name: image; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE image ( + id integer NOT NULL, + photo bytea +); + + +ALTER TABLE public.image OWNER TO postgres; + +-- +-- Name: keyword; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE keyword ( + id integer NOT NULL, + name character varying(255), + popularity integer NOT NULL +); + + +ALTER TABLE public.keyword OWNER TO postgres; + +-- +-- Name: keywordsofcourse; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE keywordsofcourse ( + course_id integer NOT NULL, + keywords_id integer NOT NULL +); + + +ALTER TABLE public.keywordsofcourse OWNER TO postgres; + +-- +-- Name: learningobject; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE learningobject ( + id integer NOT NULL, + creationdate timestamp without time zone, + description character varying(255), + name character varying(255), + url character varying(255), + module_id integer NOT NULL +); + + +ALTER TABLE public.learningobject OWNER TO postgres; + +-- +-- Name: log; Type: TABLE; Schema: public; Owner: amadeus; Tablespace: +-- + +CREATE TABLE log ( + id integer NOT NULL, + date timestamp without time zone, + person_id integer, + codigo integer, + idobjeto integer, + fases integer, + tempo integer, + pontuacao integer, + metaalternativa integer, + tamanhomensagem integer +); + + +ALTER TABLE public.log OWNER TO postgres; + +-- +-- Name: material; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE material ( + id integer NOT NULL, + allowlatedeliveries boolean NOT NULL, + archivename character varying(255), + correcteddate timestamp without time zone, + extension character varying(255), + grade real, + creationdate timestamp without time zone, + author_id integer, + archive_id integer NOT NULL, + module_id integer NOT NULL, + request_id integer +); + + +ALTER TABLE public.material OWNER TO postgres; + +-- +-- Name: materialrequest; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE materialrequest ( + id integer NOT NULL, + allowlatedeliveries boolean NOT NULL, + deliverydate timestamp without time zone, + description character varying(255), + name character varying(255), + module_id integer NOT NULL, + creationdate timestamp without time zone +); + + +ALTER TABLE public.materialrequest OWNER TO postgres; + +-- +-- Name: message; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE message ( + id integer NOT NULL, + body character varying(9000), + date timestamp without time zone, + forum_id integer NOT NULL, + author_id integer, + "position" integer +); + + +ALTER TABLE public.message OWNER TO postgres; + +-- +-- Name: module; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE module ( + id integer NOT NULL, + description character varying(1500), + name character varying(255), + "position" integer NOT NULL, + visible boolean NOT NULL, + course_id integer NOT NULL +); + + +ALTER TABLE public.module OWNER TO postgres; + +-- +-- Name: openid; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE openid ( + id integer NOT NULL, + email character varying(255), + _identity character varying(255), + name character varying(255), + provideby character varying(255), + accessinfo_id integer NOT NULL +); + + +ALTER TABLE public.openid OWNER TO postgres; + +-- +-- Name: person; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE person ( + id integer NOT NULL, + birthdate timestamp without time zone, + city character varying(255), + cpf character varying(255), + email character varying(255), + gender character(1) NOT NULL, + name character varying(255), + phonenumber character varying(255), + state character varying(255), + access_info_id integer, + image_id integer, + resume_id integer, + twitterlogin character varying(255), + facebooklogin character varying(255) +); + + +ALTER TABLE public.person OWNER TO postgres; + +-- +-- Name: person_role_course; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE person_role_course ( + id integer NOT NULL, + person_id integer, + course_id integer NOT NULL, + role_id integer +); + + +ALTER TABLE public.person_role_course OWNER TO postgres; + +-- +-- Name: poll; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE poll ( + id integer NOT NULL, + finishdate timestamp without time zone, + creationdate timestamp without time zone, + name character varying(255), + question character varying(255), + module_id integer NOT NULL +); + + +ALTER TABLE public.poll OWNER TO postgres; + +-- +-- Name: question; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE question ( + dtype character varying(31) NOT NULL, + id integer NOT NULL, + description character varying(8000), + course_id integer NOT NULL +); + + +ALTER TABLE public.question OWNER TO postgres; + +-- +-- Name: questionrealized; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE questionrealized ( + dtype character varying(31) NOT NULL, + id integer NOT NULL, + comment character varying(8000), + grade real NOT NULL, + answer character varying(8000), + question_id integer, + evaluationrealized_id integer NOT NULL +); + + +ALTER TABLE public.questionrealized OWNER TO postgres; + +-- +-- Name: resume; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE resume ( + id integer NOT NULL, + degree character varying(255), + description character varying(255), + instituition character varying(255), + year integer +); + + +ALTER TABLE public.resume OWNER TO postgres; + +-- +-- Name: role; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE role ( + id integer NOT NULL, + role_type integer NOT NULL +); + + +ALTER TABLE public.role OWNER TO postgres; + +-- +-- Name: userrequest; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE userrequest ( + id integer NOT NULL, + interest character varying(255), + status_type integer NOT NULL, + teachingrequest boolean NOT NULL, + userrequestdate timestamp without time zone, + course_id integer, + person_id integer +); + + +ALTER TABLE public.userrequest OWNER TO postgres; + +-- +-- Name: videoiriz; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- + +CREATE TABLE videoiriz ( + id integer NOT NULL, + description character varying(255), + name character varying(255), + uploaded boolean NOT NULL, + youtubeid character varying(255), + module_id integer NOT NULL, + creationdate timestamp without time zone +); + + +ALTER TABLE public.videoiriz OWNER TO postgres; + +-- +-- Name: accessinfo_login_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY accessinfo + ADD CONSTRAINT accessinfo_login_key UNIQUE (login); + + +-- +-- Name: accessinfo_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY accessinfo + ADD CONSTRAINT accessinfo_pkey PRIMARY KEY (id); + + +-- +-- Name: alternative_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY alternative + ADD CONSTRAINT alternative_pkey PRIMARY KEY (id); + + +-- +-- Name: alternativerealized_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY alternativerealized + ADD CONSTRAINT alternativerealized_pkey PRIMARY KEY (id); + + +-- +-- Name: amadeus_droid_historic_pkey; Type: CONSTRAINT; Schema: public; Owner: amadeus; Tablespace: +-- + +ALTER TABLE ONLY amadeus_droid_historic + ADD CONSTRAINT amadeus_droid_historic_pkey PRIMARY KEY (id); + + +-- +-- Name: answer_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY answer + ADD CONSTRAINT answer_pkey PRIMARY KEY (id); + + +-- +-- Name: archive_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY archive + ADD CONSTRAINT archive_pkey PRIMARY KEY (id); + + +-- +-- Name: association_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY association + ADD CONSTRAINT association_pkey PRIMARY KEY (questionassociation_id, _key); + + +-- +-- Name: associationrealized_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY associationrealized + ADD CONSTRAINT associationrealized_pkey PRIMARY KEY (questionrealized_id, _key); + + +-- +-- Name: choice_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY choice + ADD CONSTRAINT choice_pkey PRIMARY KEY (id); + + +-- +-- Name: commentary_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY commentary + ADD CONSTRAINT commentary_pkey PRIMARY KEY (id); + + +-- +-- Name: course_coursescores_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY course_coursescores + ADD CONSTRAINT course_coursescores_pkey PRIMARY KEY (course_id, studentsscores_id); + + +-- +-- Name: course_coursescores_studentsscores_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY course_coursescores + ADD CONSTRAINT course_coursescores_studentsscores_id_key UNIQUE (studentsscores_id); + + +-- +-- Name: course_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY course + ADD CONSTRAINT course_pkey PRIMARY KEY (id); + + +-- +-- Name: courseevaluation_commentary_commentaries_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY courseevaluation_commentary + ADD CONSTRAINT courseevaluation_commentary_commentaries_id_key UNIQUE (commentaries_id); + + +-- +-- Name: courseevaluation_commentary_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY courseevaluation_commentary + ADD CONSTRAINT courseevaluation_commentary_pkey PRIMARY KEY (courseevaluation_id, commentary_position); + + +-- +-- Name: courseevaluation_criterion_criteria_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY courseevaluation_criterion + ADD CONSTRAINT courseevaluation_criterion_criteria_id_key UNIQUE (criteria_id); + + +-- +-- Name: courseevaluation_criterion_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY courseevaluation_criterion + ADD CONSTRAINT courseevaluation_criterion_pkey PRIMARY KEY (courseevaluation_id, criterion_position); + + +-- +-- Name: courseevaluation_person_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY courseevaluation_person + ADD CONSTRAINT courseevaluation_person_pkey PRIMARY KEY (courseevaluation_id, students_id); + + +-- +-- Name: courseevaluation_person_students_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY courseevaluation_person + ADD CONSTRAINT courseevaluation_person_students_id_key UNIQUE (students_id); + + +-- +-- Name: courseevaluation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY courseevaluation + ADD CONSTRAINT courseevaluation_pkey PRIMARY KEY (id); + + +-- +-- Name: coursescores_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY coursescores + ADD CONSTRAINT coursescores_pkey PRIMARY KEY (id); + + +-- +-- Name: criterion_criterionanswers_answers_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY criterion_criterionanswers + ADD CONSTRAINT criterion_criterionanswers_answers_id_key UNIQUE (answers_id); + + +-- +-- Name: criterion_criterionanswers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY criterion_criterionanswers + ADD CONSTRAINT criterion_criterionanswers_pkey PRIMARY KEY (criterion_id, answers_id); + + +-- +-- Name: criterion_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY criterion + ADD CONSTRAINT criterion_pkey PRIMARY KEY (id); + + +-- +-- Name: criterionanswers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY criterionanswers + ADD CONSTRAINT criterionanswers_pkey PRIMARY KEY (id); + + +-- +-- Name: delivery_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY delivery + ADD CONSTRAINT delivery_pkey PRIMARY KEY (id); + + +-- +-- Name: evaluation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY evaluation + ADD CONSTRAINT evaluation_pkey PRIMARY KEY (id); + + +-- +-- Name: evaluationrealized_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY evaluationrealized + ADD CONSTRAINT evaluationrealized_pkey PRIMARY KEY (id); + + +-- +-- Name: externallink_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY externallink + ADD CONSTRAINT externallink_pkey PRIMARY KEY (id); + + +-- +-- Name: forum_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY forum + ADD CONSTRAINT forum_pkey PRIMARY KEY (id); + + +-- +-- Name: game_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY game + ADD CONSTRAINT game_pkey PRIMARY KEY (id); + + +-- +-- Name: historylearningobject_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY historylearningobject + ADD CONSTRAINT historylearningobject_pkey PRIMARY KEY (id); + + +-- +-- Name: homework_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY homework + ADD CONSTRAINT homework_pkey PRIMARY KEY (id); + + +-- +-- Name: image_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY image + ADD CONSTRAINT image_pkey PRIMARY KEY (id); + + +-- +-- Name: keyword_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY keyword + ADD CONSTRAINT keyword_name_key UNIQUE (name); + + +-- +-- Name: keyword_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY keyword + ADD CONSTRAINT keyword_pkey PRIMARY KEY (id); + + +-- +-- Name: keywordsofcourse_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY keywordsofcourse + ADD CONSTRAINT keywordsofcourse_pkey PRIMARY KEY (course_id, keywords_id); + + +-- +-- Name: learningobject_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY learningobject + ADD CONSTRAINT learningobject_pkey PRIMARY KEY (id); + + +-- +-- Name: log_primary_key; Type: CONSTRAINT; Schema: public; Owner: amadeus; Tablespace: +-- + +ALTER TABLE ONLY log + ADD CONSTRAINT log_primary_key PRIMARY KEY (id); + + +-- +-- Name: material_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY material + ADD CONSTRAINT material_pkey PRIMARY KEY (id); + + +-- +-- Name: materialrequest_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY materialrequest + ADD CONSTRAINT materialrequest_pkey PRIMARY KEY (id); + + +-- +-- Name: message_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY message + ADD CONSTRAINT message_pkey PRIMARY KEY (id); + + +-- +-- Name: module_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY module + ADD CONSTRAINT module_pkey PRIMARY KEY (id); + + +-- +-- Name: openid_identity_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY openid + ADD CONSTRAINT openid_identity_key UNIQUE (_identity); + + +-- +-- Name: openid_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY openid + ADD CONSTRAINT openid_pkey PRIMARY KEY (id); + + +-- +-- Name: person_email_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY person + ADD CONSTRAINT person_email_key UNIQUE (email); + + +-- +-- Name: person_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY person + ADD CONSTRAINT person_pkey PRIMARY KEY (id); + + +-- +-- Name: person_role_course_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY person_role_course + ADD CONSTRAINT person_role_course_pkey PRIMARY KEY (id); + + +-- +-- Name: poll_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY poll + ADD CONSTRAINT poll_pkey PRIMARY KEY (id); + + +-- +-- Name: primarykeyconstraint; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY evaluation_question + ADD CONSTRAINT primarykeyconstraint PRIMARY KEY (evaluation_id, question_id); + + +-- +-- Name: question_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY question + ADD CONSTRAINT question_pkey PRIMARY KEY (id); + + +-- +-- Name: questionrealized_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY questionrealized + ADD CONSTRAINT questionrealized_pkey PRIMARY KEY (id); + + +-- +-- Name: resume_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY resume + ADD CONSTRAINT resume_pkey PRIMARY KEY (id); + + +-- +-- Name: role_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY role + ADD CONSTRAINT role_pkey PRIMARY KEY (id); + + +-- +-- Name: uniquekey_person_course; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY person_role_course + ADD CONSTRAINT uniquekey_person_course UNIQUE (person_id, course_id); + + +-- +-- Name: uniquekey_person_evaluation; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY evaluationrealized + ADD CONSTRAINT uniquekey_person_evaluation UNIQUE (person_id, evaluation_id); + + +-- +-- Name: userrequest_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY userrequest + ADD CONSTRAINT userrequest_pkey PRIMARY KEY (id); + + +-- +-- Name: videoiriz_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- + +ALTER TABLE ONLY videoiriz + ADD CONSTRAINT videoiriz_pkey PRIMARY KEY (id); + + +-- +-- Name: fk1535e21440c3070c; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY gapanswer + ADD CONSTRAINT fk1535e21440c3070c FOREIGN KEY (questionrealized_id) REFERENCES questionrealized(id); + + +-- +-- Name: fk15adc9475d0e3509; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY material + ADD CONSTRAINT fk15adc9475d0e3509 FOREIGN KEY (request_id) REFERENCES materialrequest(id); + + +-- +-- Name: fk15adc947a6287150; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY material + ADD CONSTRAINT fk15adc947a6287150 FOREIGN KEY (archive_id) REFERENCES archive(id); + + +-- +-- Name: fk15adc947a7537834; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY material + ADD CONSTRAINT fk15adc947a7537834 FOREIGN KEY (author_id) REFERENCES person(id); + + +-- +-- Name: fk15adc947ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY material + ADD CONSTRAINT fk15adc947ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id); + + +-- +-- Name: fk1c3e4b288ea5370; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY criterion_criterionanswers + ADD CONSTRAINT fk1c3e4b288ea5370 FOREIGN KEY (criterion_id) REFERENCES criterion(id); + + +-- +-- Name: fk1c3e4b2c49525a3; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY criterion_criterionanswers + ADD CONSTRAINT fk1c3e4b2c49525a3 FOREIGN KEY (answers_id) REFERENCES criterionanswers(id); + + +-- +-- Name: fk21c012ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY game + ADD CONSTRAINT fk21c012ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id); + + +-- +-- Name: fk24a217aa39b57ec2; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY evaluationrealized + ADD CONSTRAINT fk24a217aa39b57ec2 FOREIGN KEY (evaluation_id) REFERENCES evaluation(id); + + +-- +-- Name: fk24a217aa823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY evaluationrealized + ADD CONSTRAINT fk24a217aa823a322a FOREIGN KEY (person_id) REFERENCES person(id); + + +-- +-- Name: fk260bdfff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY poll + ADD CONSTRAINT fk260bdfff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id); + + +-- +-- Name: fk33e78f316c6b0f66; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY courseevaluation_commentary + ADD CONSTRAINT fk33e78f316c6b0f66 FOREIGN KEY (commentaries_id) REFERENCES commentary(id); + + +-- +-- Name: fk33e78f31ed65d464; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY courseevaluation_commentary + ADD CONSTRAINT fk33e78f31ed65d464 FOREIGN KEY (courseevaluation_id) REFERENCES courseevaluation(id); + + +-- +-- Name: fk34ef8014823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY delivery + ADD CONSTRAINT fk34ef8014823a322a FOREIGN KEY (person_id) REFERENCES person(id); + + +-- +-- Name: fk34ef8014a16e7a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY delivery + ADD CONSTRAINT fk34ef8014a16e7a4 FOREIGN KEY (homework_id) REFERENCES homework(id); + + +-- +-- Name: fk40e9d01ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY forum + ADD CONSTRAINT fk40e9d01ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id); + + +-- +-- Name: fk53fbe3afc72997b7; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY associationrealized + ADD CONSTRAINT fk53fbe3afc72997b7 FOREIGN KEY (questionrealized_id) REFERENCES questionrealized(id); + + +-- +-- Name: fk56da32dddbc23d07; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY courseevaluation_person + ADD CONSTRAINT fk56da32dddbc23d07 FOREIGN KEY (students_id) REFERENCES person(id); + + +-- +-- Name: fk56da32dded65d464; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY courseevaluation_person + ADD CONSTRAINT fk56da32dded65d464 FOREIGN KEY (courseevaluation_id) REFERENCES courseevaluation(id); + + +-- +-- Name: fk57aecf8d24818534; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY alternative + ADD CONSTRAINT fk57aecf8d24818534 FOREIGN KEY (question_id) REFERENCES question(id); + + +-- +-- Name: fk5af7f43c11d61984; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY coursescores + ADD CONSTRAINT fk5af7f43c11d61984 FOREIGN KEY (student_id) REFERENCES person(id); + + +-- +-- Name: fk5af7f43cff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY coursescores + ADD CONSTRAINT fk5af7f43cff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id); + + +-- +-- Name: fk5e3284616862da32; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY association + ADD CONSTRAINT fk5e3284616862da32 FOREIGN KEY (questionassociation_id) REFERENCES question(id); + + +-- +-- Name: fk752f2bde1f427644; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY answer + ADD CONSTRAINT fk752f2bde1f427644 FOREIGN KEY (poll_id) REFERENCES poll(id); + + +-- +-- Name: fk752f2bde823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY answer + ADD CONSTRAINT fk752f2bde823a322a FOREIGN KEY (person_id) REFERENCES person(id); + + +-- +-- Name: fk784249c11f427644; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY choice + ADD CONSTRAINT fk784249c11f427644 FOREIGN KEY (poll_id) REFERENCES poll(id); + + +-- +-- Name: fk78a7cc3b83dde8d0; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY course + ADD CONSTRAINT fk78a7cc3b83dde8d0 FOREIGN KEY (professor_id) REFERENCES person(id); + + +-- +-- Name: fk867521917f54daa1; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY historylearningobject + ADD CONSTRAINT fk867521917f54daa1 FOREIGN KEY (learning_object_id) REFERENCES learningobject(id); + + +-- +-- Name: fk86752191823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY historylearningobject + ADD CONSTRAINT fk86752191823a322a FOREIGN KEY (person_id) REFERENCES person(id); + + +-- +-- Name: fk89b0928ca246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY module + ADD CONSTRAINT fk89b0928ca246b644 FOREIGN KEY (course_id) REFERENCES course(id); + + +-- +-- Name: fk8d28b1057f91492a; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY openid + ADD CONSTRAINT fk8d28b1057f91492a FOREIGN KEY (accessinfo_id) REFERENCES accessinfo(id); + + +-- +-- Name: fk8e4887752188614a; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY person + ADD CONSTRAINT fk8e4887752188614a FOREIGN KEY (image_id) REFERENCES image(id); + + +-- +-- Name: fk8e48877559d6cf33; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY person + ADD CONSTRAINT fk8e48877559d6cf33 FOREIGN KEY (access_info_id) REFERENCES accessinfo(id); + + +-- +-- Name: fk8e488775e65ce32a; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY person + ADD CONSTRAINT fk8e488775e65ce32a FOREIGN KEY (resume_id) REFERENCES resume(id); + + +-- +-- Name: fk92ba7c24823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY userrequest + ADD CONSTRAINT fk92ba7c24823a322a FOREIGN KEY (person_id) REFERENCES person(id); + + +-- +-- Name: fk92ba7c24a246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY userrequest + ADD CONSTRAINT fk92ba7c24a246b644 FOREIGN KEY (course_id) REFERENCES course(id); + + +-- +-- Name: fk99c042db49a6ea84; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY alternativerealized + ADD CONSTRAINT fk99c042db49a6ea84 FOREIGN KEY (questionrealized_id) REFERENCES questionrealized(id); + + +-- +-- Name: fk99c042db97456112; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY alternativerealized + ADD CONSTRAINT fk99c042db97456112 FOREIGN KEY (alternative_id) REFERENCES alternative(id); + + +-- +-- Name: fk9c2397e7a7537834; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY message + ADD CONSTRAINT fk9c2397e7a7537834 FOREIGN KEY (author_id) REFERENCES person(id); + + +-- +-- Name: fk9c2397e7c475de70; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY message + ADD CONSTRAINT fk9c2397e7c475de70 FOREIGN KEY (forum_id) REFERENCES forum(id); + + +-- +-- Name: fk9f19801dff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY learningobject + ADD CONSTRAINT fk9f19801dff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id); + + +-- +-- Name: fka271969c5b17a68f; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY keywordsofcourse + ADD CONSTRAINT fka271969c5b17a68f FOREIGN KEY (keywords_id) REFERENCES keyword(id); + + +-- +-- Name: fka271969ca246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY keywordsofcourse + ADD CONSTRAINT fka271969ca246b644 FOREIGN KEY (course_id) REFERENCES course(id); + + +-- +-- Name: fka9fde35cff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY evaluation + ADD CONSTRAINT fka9fde35cff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id); + + +-- +-- Name: fkb1f68a5435ce4882; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY questionrealized + ADD CONSTRAINT fkb1f68a5435ce4882 FOREIGN KEY (question_id) REFERENCES question(id); + + +-- +-- Name: fkb1f68a5473cede12; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY questionrealized + ADD CONSTRAINT fkb1f68a5473cede12 FOREIGN KEY (evaluationrealized_id) REFERENCES evaluationrealized(id); + + +-- +-- Name: fkb71889c0a246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY course_coursescores + ADD CONSTRAINT fkb71889c0a246b644 FOREIGN KEY (course_id) REFERENCES course(id); + + +-- +-- Name: fkb71889c0d1da0a67; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY course_coursescores + ADD CONSTRAINT fkb71889c0d1da0a67 FOREIGN KEY (studentsscores_id) REFERENCES coursescores(id); + + +-- +-- Name: fkb72bfe85ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY externallink + ADD CONSTRAINT fkb72bfe85ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id); + + +-- +-- Name: fkbe5ca006a246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY question + ADD CONSTRAINT fkbe5ca006a246b644 FOREIGN KEY (course_id) REFERENCES course(id); + + +-- +-- Name: fkc6e06715ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY videoiriz + ADD CONSTRAINT fkc6e06715ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id); + + +-- +-- Name: fkdde91348ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY materialrequest + ADD CONSTRAINT fkdde91348ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id); + + +-- +-- Name: fke6ef9890ff6dc8a4; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY homework + ADD CONSTRAINT fke6ef9890ff6dc8a4 FOREIGN KEY (module_id) REFERENCES module(id); + + +-- +-- Name: fkf8b89e1a823a322a; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY person_role_course + ADD CONSTRAINT fkf8b89e1a823a322a FOREIGN KEY (person_id) REFERENCES person(id); + + +-- +-- Name: fkf8b89e1a890ca6e4; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY person_role_course + ADD CONSTRAINT fkf8b89e1a890ca6e4 FOREIGN KEY (role_id) REFERENCES role(id); + + +-- +-- Name: fkf8b89e1aa246b644; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY person_role_course + ADD CONSTRAINT fkf8b89e1aa246b644 FOREIGN KEY (course_id) REFERENCES course(id); + + +-- +-- Name: fkfe0dea1982f6e1f2; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY courseevaluation_criterion + ADD CONSTRAINT fkfe0dea1982f6e1f2 FOREIGN KEY (criteria_id) REFERENCES criterion(id); + + +-- +-- Name: fkfe0dea19ed65d464; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY courseevaluation_criterion + ADD CONSTRAINT fkfe0dea19ed65d464 FOREIGN KEY (courseevaluation_id) REFERENCES courseevaluation(id); + + +-- +-- Name: log_person_foreign_key; Type: FK CONSTRAINT; Schema: public; Owner: amadeus +-- + +ALTER TABLE ONLY log + ADD CONSTRAINT log_person_foreign_key FOREIGN KEY (person_id) REFERENCES person(id); + + +-- +-- Name: public; Type: ACL; Schema: -; Owner: postgres +-- + +REVOKE ALL ON SCHEMA public FROM PUBLIC; +REVOKE ALL ON SCHEMA public FROM postgres; +GRANT ALL ON SCHEMA public TO postgres; +GRANT ALL ON SCHEMA public TO PUBLIC; + + +-- +-- PostgreSQL database dump complete +-- + diff --git a/src/br/ufpe/cin/amadeus/amadeus_game/Constantes.java b/src/br/ufpe/cin/amadeus/amadeus_game/Constantes.java old mode 100644 new mode 100755 index e201680..c6968ef --- a/src/br/ufpe/cin/amadeus/amadeus_game/Constantes.java +++ b/src/br/ufpe/cin/amadeus/amadeus_game/Constantes.java @@ -1,14 +1,14 @@ /** Copyright 2008, 2009 UFPE - Universidade Federal de Pernambuco -Este arquivo é parte do programa Amadeus Sistema de Gestão de Aprendizagem, ou simplesmente Amadeus LMS +Este arquivo é parte do programa Amadeus Sistema de Gestão de Aprendizagem, ou simplesmente Amadeus LMS -O Amadeus LMS é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como -publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença. +O Amadeus LMS é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como +publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença. -Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. +Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. -Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. **/ package br.ufpe.cin.amadeus.amadeus_game; diff --git a/src/br/ufpe/cin/amadeus/amadeus_middleware/DBWrapper.java b/src/br/ufpe/cin/amadeus/amadeus_middleware/DBWrapper.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_middleware/DBWrapper_impl.java b/src/br/ufpe/cin/amadeus/amadeus_middleware/DBWrapper_impl.java old mode 100644 new mode 100755 index 8c24bba..a97ce75 --- a/src/br/ufpe/cin/amadeus/amadeus_middleware/DBWrapper_impl.java +++ b/src/br/ufpe/cin/amadeus/amadeus_middleware/DBWrapper_impl.java @@ -1,14 +1,14 @@ /** Copyright 2008, 2009 UFPE - Universidade Federal de Pernambuco -Este arquivo é parte do programa Amadeus Sistema de Gestão de Aprendizagem, ou simplesmente Amadeus LMS +Este arquivo é parte do programa Amadeus Sistema de Gestão de Aprendizagem, ou simplesmente Amadeus LMS -O Amadeus LMS é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como -publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença. +O Amadeus LMS é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como +publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença. -Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. +Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. -Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. **/ package br.ufpe.cin.amadeus.amadeus_middleware; @@ -30,8 +30,8 @@ import br.ufpe.cin.amadeus.amadeus_web.facade.Controller; /** * Corresponde ao Facade anterior. * - * Ficará do lado "servidor" do serviço de banco de dados, - * e será invocada pelo skeleton. + * Ficará do lado "servidor" do serviço de banco de dados, + * e será invocada pelo skeleton. * * @author Bruno Barros (blbs at cin ufpe br) * diff --git a/src/br/ufpe/cin/amadeus/amadeus_middleware/DBWrapper_server.java b/src/br/ufpe/cin/amadeus/amadeus_middleware/DBWrapper_server.java old mode 100644 new mode 100755 index 7410849..ac3d880 --- a/src/br/ufpe/cin/amadeus/amadeus_middleware/DBWrapper_server.java +++ b/src/br/ufpe/cin/amadeus/amadeus_middleware/DBWrapper_server.java @@ -1,14 +1,14 @@ /** Copyright 2008, 2009 UFPE - Universidade Federal de Pernambuco -Este arquivo é parte do programa Amadeus Sistema de Gestão de Aprendizagem, ou simplesmente Amadeus LMS +Este arquivo é parte do programa Amadeus Sistema de Gestão de Aprendizagem, ou simplesmente Amadeus LMS -O Amadeus LMS é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como -publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença. +O Amadeus LMS é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como +publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença. -Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. +Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. -Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. **/ package br.ufpe.cin.amadeus.amadeus_middleware; @@ -22,14 +22,14 @@ import br.ufpe.cin.middleware.services.naming.exceptions.AlreadyBoundException; import br.ufpe.cin.middleware.util.Properties; /** - * Inicia conexão com o servidor de nomes - + * Inicia conexão com o servidor de nomes - * br.ufpe.cin.middleware.services.naming.NameServer * - enviando a interface da fachada para o mesmo, - * para que seus métodos sejam acessados pelos clientes + * para que seus métodos sejam acessados pelos clientes * - * Ficará do lado "servidor" do serviço de banco de dados, - * e será responsável por instanciar o skeleton, bem como - * a classe que contém a implementação + * Ficará do lado "servidor" do serviço de banco de dados, + * e será responsável por instanciar o skeleton, bem como + * a classe que contém a implementação * * @author Bruno Barros (blbs at cin ufpe br) * diff --git a/src/br/ufpe/cin/amadeus/amadeus_middleware/DBWrapper_skeleton.java b/src/br/ufpe/cin/amadeus/amadeus_middleware/DBWrapper_skeleton.java old mode 100644 new mode 100755 index b1768e3..f26aa26 --- a/src/br/ufpe/cin/amadeus/amadeus_middleware/DBWrapper_skeleton.java +++ b/src/br/ufpe/cin/amadeus/amadeus_middleware/DBWrapper_skeleton.java @@ -1,14 +1,14 @@ /** Copyright 2008, 2009 UFPE - Universidade Federal de Pernambuco -Este arquivo é parte do programa Amadeus Sistema de Gestão de Aprendizagem, ou simplesmente Amadeus LMS +Este arquivo é parte do programa Amadeus Sistema de Gestão de Aprendizagem, ou simplesmente Amadeus LMS -O Amadeus LMS é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como -publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença. +O Amadeus LMS é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como +publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença. -Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. +Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. -Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. **/ package br.ufpe.cin.amadeus.amadeus_middleware; @@ -17,11 +17,11 @@ import br.ufpe.cin.middleware.exceptions.AmadeusMiddlewareException; import br.ufpe.cin.middleware.proxies.Skeleton_abstract; /** - * Responsável por receber as requisições vindas - * do stub do lado cliente e delegá-las à classe - * que contém a implementação dos métodos. + * Responsável por receber as requisições vindas + * do stub do lado cliente e delegá-las à classe + * que contém a implementação dos métodos. * - * Ficará do lado "servidor" do serviço de banco de dados. + * Ficará do lado "servidor" do serviço de banco de dados. * * @author Bruno Barros (blbs at cin ufpe br) * diff --git a/src/br/ufpe/cin/amadeus/amadeus_middleware/DBWrapper_stub.java b/src/br/ufpe/cin/amadeus/amadeus_middleware/DBWrapper_stub.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_middleware/FacadeMiddleware.java b/src/br/ufpe/cin/amadeus/amadeus_middleware/FacadeMiddleware.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/AnswerMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/AnswerMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/ChoiceMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/ChoiceMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/CourseMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/CourseMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/HomeworkComparator.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/HomeworkComparator.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/HomeworkMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/HomeworkMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/KeywordMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/KeywordMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/LearningObjectMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/LearningObjectMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/MaterialMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/MaterialMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/ModuleMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/ModuleMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/NoticeComparator.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/NoticeComparator.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/NoticeMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/NoticeMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/PersonMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/PersonMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/PollMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/PollMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/UserMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/basics/UserMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/bussiness/CourseBussinessMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/bussiness/CourseBussinessMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/bussiness/HomeworkBussinessMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/bussiness/HomeworkBussinessMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/bussiness/ICourseBussinessMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/bussiness/ICourseBussinessMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/bussiness/IHomeworkBussinessMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/bussiness/IHomeworkBussinessMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/bussiness/ILoginBussinessMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/bussiness/ILoginBussinessMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/bussiness/INoticeBussinessMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/bussiness/INoticeBussinessMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/bussiness/IPoolBussinessMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/bussiness/IPoolBussinessMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/bussiness/LoginBussinessMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/bussiness/LoginBussinessMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/bussiness/NoticeBussinessMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/bussiness/NoticeBussinessMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/bussiness/PoolBussinessMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/bussiness/PoolBussinessMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/facade/AmadeusFacade.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/facade/AmadeusFacade.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/facade/FacadeMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/facade/FacadeMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/CourseRepositoryMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/CourseRepositoryMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/HomeworkRepositoryMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/HomeworkRepositoryMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/ICourseRepositoryMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/ICourseRepositoryMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/IHomeworkRepositoryMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/IHomeworkRepositoryMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/ILoginRepositoryMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/ILoginRepositoryMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/INoticeRepositoryMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/INoticeRepositoryMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/IPoolRepositoryMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/IPoolRepositoryMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/LoginRepositoryMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/LoginRepositoryMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/NoticeRepositoryMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/NoticeRepositoryMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/PoolRepositoryMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/PoolRepositoryMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/RepositoryMobile.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/repository/RepositoryMobile.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/settings/MobileSettings.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/settings/MobileSettings.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/AddCourseThread.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/AddCourseThread.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/AddHomeworkThread.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/AddHomeworkThread.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/AddMaterialThread.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/AddMaterialThread.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/AddModuleThread.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/AddModuleThread.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/AddPollThread.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/AddPollThread.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/AssistentsUpdateThread.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/AssistentsUpdateThread.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/CourseUpdateThread.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/CourseUpdateThread.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/HomeworkUpdateThread.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/HomeworkUpdateThread.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/PollUpdateThread.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/PollUpdateThread.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/Receiver.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/Receiver.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/RemoveCourseThread.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/RemoveCourseThread.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/RemoveHomeworkThread.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/RemoveHomeworkThread.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/RemoveMaterialThread.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/RemoveMaterialThread.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/RemoveModuleThread.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/RemoveModuleThread.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/RemovePollThread.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/RemovePollThread.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/Sender.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/Sender.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/TeacherUpdateThread.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/sms/TeacherUpdateThread.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_mobile/util/Conversor.java b/src/br/ufpe/cin/amadeus/amadeus_mobile/util/Conversor.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_sdmm/dao/Dao.java b/src/br/ufpe/cin/amadeus/amadeus_sdmm/dao/Dao.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_sdmm/dao/Thumbnail.java b/src/br/ufpe/cin/amadeus/amadeus_sdmm/dao/Thumbnail.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_sdmm/dao/Video.java b/src/br/ufpe/cin/amadeus/amadeus_sdmm/dao/Video.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_sdmm/dao/VideoDAO.java b/src/br/ufpe/cin/amadeus/amadeus_sdmm/dao/VideoDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_sdmm/general/ConvertXMLtoHTML.java b/src/br/ufpe/cin/amadeus/amadeus_sdmm/general/ConvertXMLtoHTML.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_sdmm/general/Sdmm.java b/src/br/ufpe/cin/amadeus/amadeus_sdmm/general/Sdmm.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/DAOFactory.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/DAOFactory.java old mode 100644 new mode 100755 index 4e13761..4e289b5 --- a/src/br/ufpe/cin/amadeus/amadeus_web/dao/DAOFactory.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/DAOFactory.java @@ -1,18 +1,22 @@ /** Copyright 2008, 2009 UFPE - Universidade Federal de Pernambuco -Este arquivo é parte do programa Amadeus Sistema de Gestão de Aprendizagem, ou simplesmente Amadeus LMS +Este arquivo � parte do programa Amadeus Sistema de Gest�o de Aprendizagem, ou simplesmente Amadeus LMS -O Amadeus LMS é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como -publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença. +O Amadeus LMS � um software livre; voc� pode redistribui-lo e/ou modifica-lo dentro dos termos da Licen�a P�blica Geral GNU como +publicada pela Funda��o do Software Livre (FSF); na vers�o 2 da Licen�a. -Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. +Este programa � distribu�do na esperan�a que possa ser �til, mas SEM NENHUMA GARANTIA; sem uma garantia impl�cita de ADEQUA��O a qualquer MERCADO ou APLICA��O EM PARTICULAR. Veja a Licen�a P�blica Geral GNU para maiores detalhes. -Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +Voc� deve ter recebido uma c�pia da Licen�a P�blica Geral GNU, sob o t�tulo "LICENCA.txt", junto com este programa, se n�o, escreva para a Funda��o do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. **/ package br.ufpe.cin.amadeus.amadeus_web.dao; +import java.util.Date; +import java.util.List; + +import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.AmadeusDroidHistoricDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.ArchiveDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.CourseDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.DeliveryDAO; @@ -22,6 +26,7 @@ import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.HistoryLearningObje import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.HomeworkDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.KeywordDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.LearningObjectDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.LogDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.MaterialDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.MaterialRequestDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.MessageDAO; @@ -30,14 +35,17 @@ import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.PersonRoleCourseDAO import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.PollDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.RoleDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.VideoIrizDAO; -import br.ufpe.cin.amadeus.amadeus_web.dao.register.AccessInfoDAO; -import br.ufpe.cin.amadeus.amadeus_web.dao.register.OpenIDDAO; -import br.ufpe.cin.amadeus.amadeus_web.dao.register.PersonDAO; -import br.ufpe.cin.amadeus.amadeus_web.dao.register.ResumeDAO; -import br.ufpe.cin.amadeus.amadeus_web.dao.register.UserRequestDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.evaluation.EvaluationDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.evaluation.EvaluationRealizedDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.externallink.ExternalLinkDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.register.AccessInfoDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.register.MessengerMessageDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.register.OpenIDDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.register.PersonDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.register.ResumeDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.register.TweetDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.register.UserRequestDAO; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.Tweet; public abstract class DAOFactory { @@ -88,5 +96,9 @@ public abstract class DAOFactory { public abstract EvaluationDAO getEvaluationDAO(); public abstract EvaluationRealizedDAO getEvaluationRealizedDAO(); public abstract ExternalLinkDAO getExternalLinkDAO(); + public abstract AmadeusDroidHistoricDAO getAmadeusDroidHistoricDAO(); + public abstract LogDAO getLogDAO(); + public abstract MessengerMessageDAO getMessengerMessageDAO(); //Added by Nailson Cunha + public abstract TweetDAO getTweetDAO(); //Added by Nailson Cunha } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/GenericDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/GenericDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/JdbcDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/JdbcDAO.java new file mode 100755 index 0000000..56ed4f6 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/JdbcDAO.java @@ -0,0 +1,96 @@ +package br.ufpe.cin.amadeus.amadeus_web.dao; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.Date; + +import br.ufpe.cin.amadeus.amadeus_web.util.TweetInteractionType; + +public class JdbcDAO { + + private static final String DATABASE_NAME = "jdbc:postgresql://localhost:5433/amadeus_web"; + private static final String DATABASE_USER = "postgres"; + private static final String DATABASE_PASSWORD = "postgres"; + + private static Connection con; + + protected static Connection getConnection() { + if (con == null) { + try { + con = DriverManager.getConnection(DATABASE_NAME, DATABASE_USER, + DATABASE_PASSWORD); + } catch (SQLException e) { + e.printStackTrace(); + } + } + return con; + } + + public void closeConnection() { + try { + getConnection().close(); + } catch (SQLException e) { + e.printStackTrace(); + } + } + + public boolean userTwitterExists(String userTwitter) { + try { + Statement stmt = getConnection().createStatement(); + stmt.setMaxRows(1); + ResultSet rs = stmt + .executeQuery("SELECT id FROM person WHERE twitterlogin='" + + userTwitter + "'"); + if (rs.next()) { + // closeConnection(); + return true; + } + } catch (SQLException e) { + e.printStackTrace(); + } + return false; + } + + public int getUserIdByScreenName(String screenName) { + int userId = 0; + try { + Statement stmt = getConnection().createStatement(); + stmt.setMaxRows(1); + ResultSet rs = stmt + .executeQuery("SELECT id FROM person WHERE twitterlogin='" + + screenName + "'"); + while (rs.next()) { + userId = rs.getInt("id"); + } + } catch (SQLException e) { + e.printStackTrace(); + } + return userId; + } + + public void saveTweet(Date dateOfTweet, TweetInteractionType tit, + String tweetText, int userSenderId, int userTargetId) { + + Connection con = getConnection(); + + String insertQuery = "INSERT INTO tweet values(nextval('hibernate_sequence'),?,?,?,?,?)"; + + try { + con.setAutoCommit(false); + PreparedStatement pst = con.prepareStatement(insertQuery); + pst.setTimestamp(1, new java.sql.Timestamp(dateOfTweet.getTime())); + pst.setInt(2, tit.ordinal()); + pst.setString(3, tweetText); + pst.setInt(4, userSenderId); + pst.setInt(5, userTargetId); + pst.executeUpdate(); + con.commit(); + } catch (SQLException e) { + e.printStackTrace(); + } + } +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/AmadeusDroidHistoricDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/AmadeusDroidHistoricDAO.java new file mode 100755 index 0000000..39eaff0 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/AmadeusDroidHistoricDAO.java @@ -0,0 +1,13 @@ +package br.ufpe.cin.amadeus.amadeus_web.dao.content_managment; + +import java.util.List; + +import br.ufpe.cin.amadeus.amadeus_web.dao.GenericDAO; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.AmadeusDroidHistoric; + +public interface AmadeusDroidHistoricDAO extends GenericDAO{ + + List getHistoric(); + + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/ArchiveDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/ArchiveDAO.java old mode 100644 new mode 100755 index 53040fa..51e4539 --- a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/ArchiveDAO.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/ArchiveDAO.java @@ -17,5 +17,7 @@ import br.ufpe.cin.amadeus.amadeus_web.dao.GenericDAO; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Archive; public interface ArchiveDAO extends GenericDAO { + + public Archive getArchiveByMaterial(int material_id); } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/CourseDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/CourseDAO.java old mode 100644 new mode 100755 index 5a42193..ef1e7ec --- a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/CourseDAO.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/CourseDAO.java @@ -26,6 +26,7 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; public interface CourseDAO extends GenericDAO { public List searchCoursesByUser(AccessInfo userInfo); + public List getCoursesByUser(AccessInfo userInfo); public List getCoursesByKeyword(Keyword key); public List getCoursesByContent(String cont); public List getCoursesByName(String name); diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/DeliveryDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/DeliveryDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/ForumDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/ForumDAO.java old mode 100644 new mode 100755 index 19b729f..0bd2d0e --- a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/ForumDAO.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/ForumDAO.java @@ -13,9 +13,13 @@ Voc package br.ufpe.cin.amadeus.amadeus_web.dao.content_managment; +import java.util.List; + import br.ufpe.cin.amadeus.amadeus_web.dao.GenericDAO; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Forum; public interface ForumDAO extends GenericDAO { + + List getListForum(); } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/GameDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/GameDAO.java old mode 100644 new mode 100755 index dacf78b..08376de --- a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/GameDAO.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/GameDAO.java @@ -13,9 +13,12 @@ Voc package br.ufpe.cin.amadeus.amadeus_web.dao.content_managment; +import java.util.List; + import br.ufpe.cin.amadeus.amadeus_web.dao.GenericDAO; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Game; public interface GameDAO extends GenericDAO { - + public List getAllGameFromCourse(Course course); } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/HistoryLearningObjectDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/HistoryLearningObjectDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/HomeworkDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/HomeworkDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/KeywordDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/KeywordDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/LearningObjectDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/LearningObjectDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/LogDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/LogDAO.java new file mode 100755 index 0000000..d1e432e --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/LogDAO.java @@ -0,0 +1,15 @@ +/** + * + */ +package br.ufpe.cin.amadeus.amadeus_web.dao.content_managment; + +import br.ufpe.cin.amadeus.amadeus_web.dao.GenericDAO; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Log; + +/** + * @author Pedro + * + */ +public interface LogDAO extends GenericDAO { + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/MaterialDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/MaterialDAO.java old mode 100644 new mode 100755 index 7131192..2b68ea1 --- a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/MaterialDAO.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/MaterialDAO.java @@ -21,5 +21,6 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; public interface MaterialDAO extends GenericDAO { Material getMaterial(Person person, MaterialRequest materialRequest); - + Material getMaterialByID(int material_id); + } \ No newline at end of file diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/MaterialRequestDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/MaterialRequestDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/MessageDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/MessageDAO.java old mode 100644 new mode 100755 index aff2b02..8a553cf --- a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/MessageDAO.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/MessageDAO.java @@ -21,6 +21,8 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Message; public interface MessageDAO extends GenericDAO { - public List searchMessageByPaging(int tamanhoBloco, int qtdBloco, Forum forum); - public int getSizeSearchMessageByForum(Forum forum); + List searchMessageByPaging(int tamanhoBloco, int qtdBloco, Forum forum); + int getSizeSearchMessageByForum(Forum forum); + Message getLastMessage(); + } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/ModuleDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/ModuleDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/MultimediaDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/MultimediaDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/PersonRoleCourseDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/PersonRoleCourseDAO.java old mode 100644 new mode 100755 index 9c9c922..3ce505b --- a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/PersonRoleCourseDAO.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/PersonRoleCourseDAO.java @@ -19,6 +19,7 @@ import br.ufpe.cin.amadeus.amadeus_web.dao.GenericDAO; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.PersonRoleCourse; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Role; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.AccessInfo; import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; public interface PersonRoleCourseDAO extends GenericDAO{ @@ -31,4 +32,5 @@ public interface PersonRoleCourseDAO extends GenericDAO getPossibleTeacherOrAssistantsInCourse(Person person, Role roleA, Role roleT, Course course); public List getByRoleInCourse(Person person, Course course, Role role); public List getStudentRolesCourses(int studentId); + public List getStudentByUser(AccessInfo accessInfo); } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/PollDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/PollDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/RoleDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/RoleDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/VideoIrizDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/VideoIrizDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/evaluation/EvaluationDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/evaluation/EvaluationDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/evaluation/EvaluationRealizedDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/evaluation/EvaluationRealizedDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/externallink/ExternalLinkDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/content_managment/externallink/ExternalLinkDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/GenericHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/GenericHibernateDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/HibernateDAOFactory.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/HibernateDAOFactory.java old mode 100644 new mode 100755 index 6dfca1d..4b2e635 --- a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/HibernateDAOFactory.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/HibernateDAOFactory.java @@ -1,21 +1,25 @@ /** Copyright 2008, 2009 UFPE - Universidade Federal de Pernambuco -Este arquivo é parte do programa Amadeus Sistema de Gestão de Aprendizagem, ou simplesmente Amadeus LMS +Este arquivo � parte do programa Amadeus Sistema de Gest�o de Aprendizagem, ou simplesmente Amadeus LMS -O Amadeus LMS é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como -publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença. +O Amadeus LMS � um software livre; voc� pode redistribui-lo e/ou modifica-lo dentro dos termos da Licen�a P�blica Geral GNU como +publicada pela Funda��o do Software Livre (FSF); na vers�o 2 da Licen�a. -Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. +Este programa � distribu�do na esperan�a que possa ser �til, mas SEM NENHUMA GARANTIA; sem uma garantia impl�cita de ADEQUA��O a qualquer MERCADO ou APLICA��O EM PARTICULAR. Veja a Licen�a P�blica Geral GNU para maiores detalhes. -Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +Voc� deve ter recebido uma c�pia da Licen�a P�blica Geral GNU, sob o t�tulo "LICENCA.txt", junto com este programa, se n�o, escreva para a Funda��o do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. **/ package br.ufpe.cin.amadeus.amadeus_web.dao.hibernate; +import java.util.Date; +import java.util.List; + import org.hibernate.Session; import br.ufpe.cin.amadeus.amadeus_web.dao.DAOFactory; +import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.AmadeusDroidHistoricDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.ArchiveDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.CourseDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.DeliveryDAO; @@ -25,6 +29,7 @@ import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.HistoryLearningObje import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.HomeworkDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.KeywordDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.LearningObjectDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.LogDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.MaterialDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.MaterialRequestDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.MessageDAO; @@ -36,6 +41,7 @@ import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.VideoIrizDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.evaluation.EvaluationDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.evaluation.EvaluationRealizedDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.externallink.ExternalLinkDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.AmadeusDroidHistoricHibernateDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.ArchiveHibernateDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.CourseHibernateDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.DeliveryHibernateDAO; @@ -45,6 +51,7 @@ import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.HistoryLe import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.HomeworkHibernateDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.KeywordHibernateDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.LearningObjectHibernateDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.LogHibernateDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.MaterialHibernateDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.MaterialRequestHibernateDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.MessageHibernateDAO; @@ -57,15 +64,20 @@ import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.evaluatio import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.evaluation.EvaluationRealizedHibernateDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.externallink.ExternalLinkHibernateDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.register.AccessInfoHibernateDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.register.MessengerMessageHibernateDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.register.OpenIDHibernateDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.register.PersonHibernateDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.register.ResumeHibernateDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.register.TweetHibernateDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.register.UserRequestHibernateDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.register.AccessInfoDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.register.MessengerMessageDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.register.OpenIDDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.register.PersonDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.register.ResumeDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.register.TweetDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.register.UserRequestDAO; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.Tweet; public class HibernateDAOFactory extends DAOFactory { @@ -116,7 +128,7 @@ public class HibernateDAOFactory extends DAOFactory { dao.setSession(getCurrentSession()); return dao; } catch (Exception ex) { - throw new RuntimeException("Can not instantiate DAO: " + daoClass, ex); + throw new RuntimeException("Can not instantiate DAO: " + daoClass + ", " + ex.getMessage(), ex); } } @@ -184,6 +196,31 @@ public class HibernateDAOFactory extends DAOFactory { public ExternalLinkDAO getExternalLinkDAO(){ return (ExternalLinkDAO) instantiateDAO(ExternalLinkHibernateDAO.class); } + + + public AmadeusDroidHistoricDAO getAmadeusDroidHistoricDAO() { + return (AmadeusDroidHistoricDAO) instantiateDAO(AmadeusDroidHistoricHibernateDAO.class); + } + + @Override + public LogDAO getLogDAO() { + return (LogDAO) instantiateDAO(LogHibernateDAO.class); + } + + /** + * Método que retorna o MessengerMessageDAO + * @author Nailson Cunha + */ + @Override + public MessengerMessageDAO getMessengerMessageDAO() { + return (MessengerMessageDAO)instantiateDAO(MessengerMessageHibernateDAO.class); + } + + @Override + public TweetDAO getTweetDAO() { + return (TweetDAO) instantiateDAO(TweetHibernateDAO.class); + } + } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/HibernateUtil.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/HibernateUtil.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/NotNullOrBlankPropertySelector.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/NotNullOrBlankPropertySelector.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/AmadeusDroidHistoricHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/AmadeusDroidHistoricHibernateDAO.java new file mode 100755 index 0000000..d1fa47d --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/AmadeusDroidHistoricHibernateDAO.java @@ -0,0 +1,83 @@ +package br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment; + +import java.util.List; + +import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.AmadeusDroidHistoricDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.GenericHibernateDAO; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.AmadeusDroidHistoric; + +public class AmadeusDroidHistoricHibernateDAO extends GenericHibernateDAO implements + AmadeusDroidHistoricDAO { + + @Override + public AmadeusDroidHistoric findById(Integer id, boolean lock) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findAll() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByExample( + AmadeusDroidHistoric exampleInstance) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByExample( + AmadeusDroidHistoric exampleInstance, String[] excludeProperty) { + // TODO Auto-generated method stub + return null; + } + + @Override + public AmadeusDroidHistoric findUniqueByExample( + AmadeusDroidHistoric exampleInstance, String[] excludeProperty) { + // TODO Auto-generated method stub + return null; + } + + @Override + public AmadeusDroidHistoric findUniqueByExample( + AmadeusDroidHistoric exampleInstance) { + // TODO Auto-generated method stub + return null; + } + + @Override + public AmadeusDroidHistoric makePersistent(AmadeusDroidHistoric historic) { + if (historic.getId() == 0) { + getSession().save(historic); + }else{ + getSession().merge(historic); + } + return historic; + } + + @Override + public AmadeusDroidHistoric merge(AmadeusDroidHistoric entity) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void makeTransient(AmadeusDroidHistoric entity) { + // TODO Auto-generated method stub + + } + + @Override + public List getHistoric() { + StringBuilder hql = new StringBuilder(); + hql.append("From AmadeusDroidHistoric"); + + List result = getSession().createQuery(hql.toString()).list(); + return result; + } + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/ArchiveHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/ArchiveHibernateDAO.java old mode 100644 new mode 100755 index c703add..3636fd0 --- a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/ArchiveHibernateDAO.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/ArchiveHibernateDAO.java @@ -19,6 +19,19 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Archive; public class ArchiveHibernateDAO extends GenericHibernateDAO implements ArchiveDAO { + + public Archive getArchiveByMaterial(int material_id){ + + StringBuilder hql = new StringBuilder(); + hql.append("select a from Archive a, " + + "Material m " + + "where m.archive.id = a.id " + + "and m.id = " + material_id); + + Archive result = (Archive) getSession().createQuery(hql.toString()).uniqueResult(); + + return result; + } } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/CourseHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/CourseHibernateDAO.java old mode 100644 new mode 100755 index 4e799ac..50d9ee1 --- a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/CourseHibernateDAO.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/CourseHibernateDAO.java @@ -28,8 +28,11 @@ import org.hibernate.criterion.Restrictions; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.CourseDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.GenericHibernateDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.NotNullOrBlankPropertySelector; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Archive; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Keyword; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Material; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Module; import br.ufpe.cin.amadeus.amadeus_web.domain.register.AccessInfo; import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; import br.ufpe.cin.middleware.services.session.Key; @@ -57,6 +60,25 @@ public class CourseHibernateDAO extends GenericHibernateDAO } + @Override + public List getCoursesByUser(AccessInfo userInfo) { + + StringBuilder hql = new StringBuilder(); + hql.append("select c from Course c, " + + "PersonRoleCourse prc, " + + "Person p, " + + "AccessInfo aci " + + "where prc.course.id = c.id " + + "and prc.person.id = p.id " + + "and p.accessInfo.id = aci.id " + + "and aci.login = '"+userInfo.getLogin()+"' " + + "and aci.password = '"+userInfo.getPassword()+"'"); + + List results = getSession().createQuery(hql.toString()).list(); + + return results; + } + @SuppressWarnings("unchecked") public List getCoursesByKeyword(Keyword key){ @@ -277,4 +299,5 @@ public class CourseHibernateDAO extends GenericHibernateDAO } } + } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/DeliveryHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/DeliveryHibernateDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/ForumHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/ForumHibernateDAO.java old mode 100644 new mode 100755 index 83af007..44020c8 --- a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/ForumHibernateDAO.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/ForumHibernateDAO.java @@ -13,10 +13,23 @@ Voc package br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment; +import java.util.List; + import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.ForumDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.GenericHibernateDAO; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Forum; public class ForumHibernateDAO extends GenericHibernateDAO implements ForumDAO { + @Override + public List getListForum() { + + StringBuilder hql = new StringBuilder(); + hql.append("Select f from Forum f"); + + List results = getSession().createQuery(hql.toString()).list(); + + return results; + } + } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/GameHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/GameHibernateDAO.java old mode 100644 new mode 100755 index d28f478..270b499 --- a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/GameHibernateDAO.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/GameHibernateDAO.java @@ -13,11 +13,25 @@ Voc package br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment; +import java.util.List; + import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.GameDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.GenericHibernateDAO; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Game; public class GameHibernateDAO extends GenericHibernateDAO implements GameDAO { + @SuppressWarnings("unchecked") + @Override + public List getAllGameFromCourse(Course course) { + // TODO Auto-generated method stub + String hqlQuery = "select g from Course c join c.modules m join Game g" + + " where c.id = "+course.getId(); + List game = getSession().createQuery(hqlQuery).list(); + + return game; + } + } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/HistoryLearningObjectHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/HistoryLearningObjectHibernateDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/HomeworkHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/HomeworkHibernateDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/KeywordHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/KeywordHibernateDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/LearningObjectHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/LearningObjectHibernateDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/LogHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/LogHibernateDAO.java new file mode 100755 index 0000000..42e5788 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/LogHibernateDAO.java @@ -0,0 +1,19 @@ +/** + * + */ +package br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment; + +import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.LogDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.GenericHibernateDAO; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Log; + +/** + * @author Pedro + * + */ +public class LogHibernateDAO extends GenericHibernateDAO implements + LogDAO { + + + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/MaterialHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/MaterialHibernateDAO.java old mode 100644 new mode 100755 index 6cb1ded..02acad6 --- a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/MaterialHibernateDAO.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/MaterialHibernateDAO.java @@ -33,6 +33,19 @@ public class MaterialHibernateDAO extends GenericHibernateDAO return (Material) crit.uniqueResult(); } + + @Override + public + Material getMaterialByID(int material_id){ + + StringBuilder hql = new StringBuilder(); + hql.append("select m from Material m " + + "where m.id = " + material_id); + + Material material = (Material) getSession().createQuery(hql.toString()).uniqueResult(); + + return material; + } } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/MaterialRequestHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/MaterialRequestHibernateDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/MessageHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/MessageHibernateDAO.java old mode 100644 new mode 100755 index f7ad2e0..4a76f75 --- a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/MessageHibernateDAO.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/MessageHibernateDAO.java @@ -51,4 +51,14 @@ public class MessageHibernateDAO extends GenericHibernateDAO int size = forum.getMessages().size(); return size; } + + @Override + public Message getLastMessage() { + StringBuilder hql = new StringBuilder(); + hql.append("Select m from Message m where m.id = (Select max(id) from Message)"); + + Message result = (Message) getSession().createQuery(hql.toString()).uniqueResult(); + return result; + } + } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/ModuleHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/ModuleHibernateDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/MultimediaHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/MultimediaHibernateDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/PersonRoleCourseHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/PersonRoleCourseHibernateDAO.java old mode 100644 new mode 100755 index b22fb3c..d6dfc2b --- a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/PersonRoleCourseHibernateDAO.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/PersonRoleCourseHibernateDAO.java @@ -23,6 +23,7 @@ import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.GenericHibernateDAO; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.PersonRoleCourse; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Role; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.AccessInfo; import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; public class PersonRoleCourseHibernateDAO extends GenericHibernateDAO implements PersonRoleCourseDAO { @@ -42,6 +43,24 @@ public class PersonRoleCourseHibernateDAO extends GenericHibernateDAO getStudentByUser(AccessInfo userInfo){ + + + StringBuilder hql = new StringBuilder(); + hql.append("select prc from PersonRoleCourse prc, " + + "Person p, " + + "AccessInfo aci " + + "where prc.person.id = p.id " + + "and p.accessInfo.id = aci.id " + + "and aci.login = '"+userInfo.getLogin()+"' " + + "and aci.password = '"+userInfo.getPassword()+"'"); + + @SuppressWarnings("unchecked") + List results = getSession().createQuery(hql.toString()).list(); + + return results; + } + public int getNumberOfStudentsInCourse(Course course, Role role){ int result = this.findUsersRegisteredInCourseByRole(course, role).size(); return result; diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/PollHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/PollHibernateDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/RoleHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/RoleHibernateDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/VideoIrizHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/VideoIrizHibernateDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/evaluation/EvaluationHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/evaluation/EvaluationHibernateDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/evaluation/EvaluationRealizedHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/evaluation/EvaluationRealizedHibernateDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/externallink/ExternalLinkHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/content_managment/externallink/ExternalLinkHibernateDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/register/AccessInfoHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/register/AccessInfoHibernateDAO.java old mode 100644 new mode 100755 index daf4aa9..e67938a --- a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/register/AccessInfoHibernateDAO.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/register/AccessInfoHibernateDAO.java @@ -73,5 +73,13 @@ public class AccessInfoHibernateDAO extends return query.list(); } + + @SuppressWarnings("unchecked") + public List searchUsers(Integer userType) { + String hql = "from AccessInfo as a where"; + hql += " a.typeProfile = "+userType; + Query query = getSession().createQuery(hql); + return query.list(); + } } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/register/MessengerMessageHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/register/MessengerMessageHibernateDAO.java new file mode 100755 index 0000000..42943ef --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/register/MessengerMessageHibernateDAO.java @@ -0,0 +1,41 @@ +package br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.register; + +import java.util.List; + +import org.hibernate.Criteria; +import org.hibernate.criterion.Order; +import org.hibernate.criterion.Restrictions; + +import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.GenericHibernateDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.register.MessengerMessageDAO; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.MessengerMessage; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; + +/** + * Classe que contém os métodos específicos de acesso ao banco para a classe MessengerMessage + * @author Nailson Cunha + * + */ +public class MessengerMessageHibernateDAO extends GenericHibernateDAO + implements MessengerMessageDAO{ + + @SuppressWarnings("unchecked") + @Override + public List getAllUnreadFromPerson(Person person) { + Criteria criteria = getSession().createCriteria(MessengerMessage.class); + criteria.add(Restrictions.eq("receiver", person)) + .add(Restrictions.eq("read", false)); + criteria.addOrder(Order.desc("date")); + return (List) criteria.list(); + } + + @SuppressWarnings("unchecked") + @Override + public List getAllMessengerMessageByPerson(Person person) { + Criteria criteria = getSession().createCriteria(MessengerMessage.class); + criteria.add(Restrictions.eq("receiver", person)); + criteria.addOrder(Order.desc("date")); + return (List) criteria.list(); + } + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/register/OpenIDHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/register/OpenIDHibernateDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/register/PersonHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/register/PersonHibernateDAO.java old mode 100644 new mode 100755 index 01abcfb..75c13f1 --- a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/register/PersonHibernateDAO.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/register/PersonHibernateDAO.java @@ -9,10 +9,15 @@ publicada pela Funda��o do Software Livre (FSF); na vers�o 2 da Licen�a. Este programa � distribu�do na esperan�a que possa ser �til, mas SEM NENHUMA GARANTIA; sem uma garantia impl�cita de ADEQUA��O a qualquer MERCADO ou APLICA��O EM PARTICULAR. Veja a Licen�a P�blica Geral GNU para maiores detalhes. Voc� deve ter recebido uma c�pia da Licen�a P�blica Geral GNU, sob o t�tulo "LICENCA.txt", junto com este programa, se n�o, escreva para a Funda��o do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -**/ + **/ package br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.register; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; import java.util.List; import org.hibernate.Criteria; @@ -26,15 +31,17 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Role; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Status; import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; +import br.ufpe.cin.amadeus.amadeus_web.syncronize.AccessInfo; + +public class PersonHibernateDAO extends GenericHibernateDAO + implements PersonDAO { -public class PersonHibernateDAO extends GenericHibernateDAO implements PersonDAO{ - public PersonHibernateDAO() { super(); } @SuppressWarnings("unchecked") - public List getTeachersByName(String name){ + public List getTeachersByName(String name) { Criteria crit = getSession().createCriteria(Person.class); crit.add(Restrictions.ilike("name", name, MatchMode.ANYWHERE)); List results = crit.list(); @@ -43,16 +50,19 @@ public class PersonHibernateDAO extends GenericHibernateDAO impl @SuppressWarnings("unchecked") public List getAssistanceInCourse(Course course, Role role) { -/*old: List results = getSession().createSQLQuery("SELECT * from person where " + - "id in (SELECT person_id from person_role_course where course_id = " + course.getId() + " AND role_id = " + role.getId() + ")").addEntity(Person.class).list(); -*/ - String hqlQuary = "select p from Person as p, PersonRoleCourse as prc" + - " where p.id = prc.person.id" + - " and prc.course.id = " + course.getId()+ - " and prc.role.id = " + role.getId(); - + /* + * old: List results = + * getSession().createSQLQuery("SELECT * from person where " + + * "id in (SELECT person_id from person_role_course where course_id = " + * + course.getId() + " AND role_id = " + role.getId() + + * ")").addEntity(Person.class).list(); + */ + String hqlQuary = "select p from Person as p, PersonRoleCourse as prc" + + " where p.id = prc.person.id" + " and prc.course.id = " + + course.getId() + " and prc.role.id = " + role.getId(); + List results = getSession().createQuery(hqlQuary).list(); - + return results; } @@ -64,4 +74,47 @@ public class PersonHibernateDAO extends GenericHibernateDAO impl return emails; } + @Override + public Person getPersonByLogin(String login) { + + StringBuilder hql = new StringBuilder(); + hql.append("select p from Person p " + "where p.accessInfo.login = '" + + login + "'"); + + Person person = (Person) getSession().createQuery(hql.toString()) + .uniqueResult(); + return person; + } + + @Override + public Person getPersonByUserName(String userName) { + StringBuilder hql = new StringBuilder(); + hql.append("select p from Person p where p.name = '" + userName + "'"); + Person person = (Person) getSession().createQuery(hql.toString()) + .uniqueResult(); + return person; + } + + /** + * By Nailson Cunha + */ + @Override + public int getPersonByTwitterLogin(String screenName) { + try { + Connection con = DriverManager.getConnection( + "jdbc:postgresql://localhost:5432/amadeus_web", "postgres", + "postgres"); + Statement stmt = con.createStatement(); + ResultSet rs = stmt.executeQuery("SELECT id FROM person WHERE twitterlogin='" + screenName + "'"); + while(rs.next()){ + int id = rs.getInt("id"); + return id; + } + con.close(); + } catch (SQLException e) { + e.printStackTrace(); + } + return 0; + } + } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/register/ResumeHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/register/ResumeHibernateDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/register/TweetHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/register/TweetHibernateDAO.java new file mode 100755 index 0000000..2ca40d5 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/register/TweetHibernateDAO.java @@ -0,0 +1,32 @@ +package br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.register; + +import java.util.Date; +import java.util.List; + +import org.hibernate.Criteria; +import org.hibernate.criterion.Restrictions; + +import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.GenericHibernateDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.register.TweetDAO; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.Tweet; + +/** + * Classe que contém os métodos específicos de acesso ao banco para a classe + * Tweet + * + * @author Nailson Cunha + * + */ +public class TweetHibernateDAO extends GenericHibernateDAO + implements TweetDAO { + + @SuppressWarnings("unchecked") + @Override + public List getTweetBetweenDates(Date inicio, Date fim) { + Criteria criteria = getSession().createCriteria(Tweet.class); + criteria.add(Restrictions.between("dateOfTweet", inicio,fim)); + return (List) criteria.list(); + + } + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/register/UserRequestHibernateDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/hibernate/register/UserRequestHibernateDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/register/AccessInfoDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/register/AccessInfoDAO.java old mode 100644 new mode 100755 index fdc1e97..005b235 --- a/src/br/ufpe/cin/amadeus/amadeus_web/dao/register/AccessInfoDAO.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/register/AccessInfoDAO.java @@ -21,5 +21,6 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.register.AccessInfo; public interface AccessInfoDAO extends GenericDAO{ public List getUsersByLogin(String login); public List searchUsers(String userName, Integer userType, Integer courseId); + public List searchUsers(Integer userType); public List getAllUserOrderByName(); } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/register/MessengerMessageDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/register/MessengerMessageDAO.java new file mode 100755 index 0000000..5d9dde1 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/register/MessengerMessageDAO.java @@ -0,0 +1,19 @@ +package br.ufpe.cin.amadeus.amadeus_web.dao.register; + +import java.util.List; + +import br.ufpe.cin.amadeus.amadeus_web.dao.GenericDAO; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.MessengerMessage; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; + +/** + * Interface que define os métodos específicos de acesso ao banco para a classe MessengerMessage + * @author Nailson Cunha + * + */ +public interface MessengerMessageDAO extends GenericDAO { + + public List getAllUnreadFromPerson(Person person); + + public List getAllMessengerMessageByPerson(Person person); +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/register/OpenIDDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/register/OpenIDDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/register/PersonDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/register/PersonDAO.java old mode 100644 new mode 100755 index e474195..a2ce49b --- a/src/br/ufpe/cin/amadeus/amadeus_web/dao/register/PersonDAO.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/register/PersonDAO.java @@ -19,10 +19,14 @@ import br.ufpe.cin.amadeus.amadeus_web.dao.GenericDAO; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Role; import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; +import br.ufpe.cin.amadeus.amadeus_web.syncronize.AccessInfo; public interface PersonDAO extends GenericDAO { public List getTeachersByName(String name); public List getAssistanceInCourse(Course course, Role role); public List getAllEmails(); + public Person getPersonByLogin(String login); + public Person getPersonByUserName(String userName); + public int getPersonByTwitterLogin(String screenName); } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/register/ResumeDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/register/ResumeDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/register/TweetDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/register/TweetDAO.java new file mode 100755 index 0000000..8aca21b --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/dao/register/TweetDAO.java @@ -0,0 +1,20 @@ +package br.ufpe.cin.amadeus.amadeus_web.dao.register; + +import java.util.Date; +import java.util.List; + +import br.ufpe.cin.amadeus.amadeus_web.dao.GenericDAO; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.Tweet; + +/** + * Interface que define os métodos específicos de acesso ao banco para a classe + * Tweet + * + * @author Nailson Cunha + * + */ +public interface TweetDAO extends GenericDAO { + + List getTweetBetweenDates(Date inicio, Date fim); + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/dao/register/UserRequestDAO.java b/src/br/ufpe/cin/amadeus/amadeus_web/dao/register/UserRequestDAO.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/AmadeusDroidHistoric.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/AmadeusDroidHistoric.java new file mode 100755 index 0000000..ff67395 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/AmadeusDroidHistoric.java @@ -0,0 +1,96 @@ +package br.ufpe.cin.amadeus.amadeus_web.domain.content_management; + +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.xml.bind.annotation.XmlRootElement; + +@Entity +@XmlRootElement +@Table(name = "AMADEUS_DROID_HISTORIC") +public class AmadeusDroidHistoric { + + @Id @GeneratedValue(strategy=GenerationType.AUTO) + private int id; + + @Column(name="COURSE_NAME") + private String courseName; + + @Column(name="USER_NAME") + private String userName; + + private transient String userLogin; + + @Column(name="ACTION_VALUE") + private String actionValue; + + @Column(name="RESOURSE_NAME") + private String resourceName; + + @Column(name="CREATION_DATE") + private Date creationDate; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getCourseName() { + return courseName; + } + + public void setCourseName(String courseName) { + this.courseName = courseName; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getActionValue() { + return actionValue; + } + + public void setActionValue(String actionValue) { + this.actionValue = actionValue; + } + + public String getResourceName() { + return resourceName; + } + + public void setResourceName(String resourceName) { + this.resourceName = resourceName; + } + + public Date getCreationDate() { + return creationDate; + } + + public void setCreationDate(Date creationDate) { + this.creationDate = creationDate; + } + + public String getUserLogin() { + return userLogin; + } + + public void setUserLogin(String userLogin) { + this.userLogin = userLogin; + } + + + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Answer.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Answer.java old mode 100644 new mode 100755 index 215d156..0f92bbb --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Answer.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Answer.java @@ -23,6 +23,7 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToOne; +import javax.xml.bind.annotation.XmlRootElement; import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; @@ -36,6 +37,7 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; @SuppressWarnings("serial") @Entity +@XmlRootElement public class Answer implements Serializable { @Id @GeneratedValue(strategy=GenerationType.AUTO) diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Archive.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Archive.java old mode 100644 new mode 100755 index 5d72ff4..7b0c002 --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Archive.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Archive.java @@ -15,14 +15,23 @@ package br.ufpe.cin.amadeus.amadeus_web.domain.content_management; import java.io.Serializable; +import javax.persistence.CascadeType; import javax.persistence.Entity; +import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.OneToOne; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; @SuppressWarnings("serial") @Entity +@XmlRootElement +@XmlAccessorType(XmlAccessType.FIELD) public class Archive implements Serializable { @Id @GeneratedValue(strategy=GenerationType.AUTO) diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Choice.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Choice.java old mode 100644 new mode 100755 index 617e1ed..9d28286 --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Choice.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Choice.java @@ -21,6 +21,7 @@ import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; +import javax.xml.bind.annotation.XmlRootElement; /** * Classe que encapsula os dados de uma opção de uma enquete @@ -31,6 +32,7 @@ import javax.persistence.ManyToOne; @SuppressWarnings("serial") @Entity +@XmlRootElement public class Choice implements Serializable { @Id @GeneratedValue(strategy=GenerationType.AUTO) diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Commentary.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Commentary.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Course.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Course.java old mode 100644 new mode 100755 index e5b48eb..da64546 --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Course.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Course.java @@ -36,6 +36,7 @@ import javax.persistence.ManyToMany; import javax.persistence.OneToMany; import javax.persistence.OneToOne; import javax.persistence.Transient; +import javax.xml.bind.annotation.XmlRootElement; import org.apache.commons.beanutils.BeanComparator; diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/CourseEvaluation.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/CourseEvaluation.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/CourseScores.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/CourseScores.java old mode 100644 new mode 100755 index 8e53ad0..781cef3 --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/CourseScores.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/CourseScores.java @@ -22,6 +22,7 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToOne; +import javax.xml.bind.annotation.XmlRootElement; import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; /** @@ -33,6 +34,7 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; @SuppressWarnings("serial") @Entity +@XmlRootElement public class CourseScores implements Serializable{ @Id @GeneratedValue(strategy=GenerationType.AUTO) diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Criterion.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Criterion.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/CriterionAnswers.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/CriterionAnswers.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/CriterionType.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/CriterionType.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Delivery.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Delivery.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/ExternalLink.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/ExternalLink.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Forum.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Forum.java old mode 100644 new mode 100755 index a3d42e4..dd96ff8 --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Forum.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Forum.java @@ -19,6 +19,7 @@ import java.util.Date; import java.util.List; import javax.persistence.CascadeType; +import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; @@ -27,6 +28,13 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; +import javax.xml.bind.annotation.XmlRootElement; + +import org.apache.commons.collections.MultiHashMap; +import org.apache.commons.collections.MultiMap; +import org.hibernate.annotations.Cascade; + + /** * Classe que encapsula os dados de um forum * @@ -36,18 +44,19 @@ import javax.persistence.OneToMany; @SuppressWarnings("serial") @Entity +@XmlRootElement public class Forum implements Serializable{ @Id @GeneratedValue(strategy=GenerationType.AUTO) private int id; private String name; - + @Column(length=9000) private String description; private Date creationDate; - @OneToMany(cascade = CascadeType.ALL, fetch=FetchType.LAZY) + @OneToMany(cascade = CascadeType.ALL, fetch=FetchType.EAGER) @JoinColumn(name = "FORUM_ID", nullable = false) @org.hibernate.annotations.IndexColumn(name = "POSITION", base = 0) @org.hibernate.annotations.Cascade( @@ -59,6 +68,12 @@ public class Forum implements Serializable{ updatable = false, insertable = false) private Module module; + @OneToMany(fetch = FetchType.LAZY, mappedBy = "pk.forum", + cascade = { CascadeType.PERSIST, CascadeType.MERGE }) + @Cascade( { org.hibernate.annotations.CascadeType.SAVE_UPDATE, + org.hibernate.annotations.CascadeType.DELETE_ORPHAN }) + private List foruns = new ArrayList(); + public Forum() { } @@ -111,4 +126,12 @@ public class Forum implements Serializable{ this.module = module; } + public List getForuns() { + return foruns; + } + + public void setForuns(List foruns) { + this.foruns = foruns; + } + } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Game.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Game.java old mode 100644 new mode 100755 index a9dcddd..d46c9d0 --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Game.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Game.java @@ -49,7 +49,9 @@ public class Game implements Serializable{ private byte[] image; - private Date creationDate; + private Date creationDate; + + private boolean linkExterno; public int getId() { return id; @@ -128,4 +130,12 @@ public class Game implements Serializable{ this.creationDate = creationDate; } + public void setLinkExterno(boolean linkExterno) { + this.linkExterno = linkExterno; + } + + public boolean getLinkExterno() { + return linkExterno; + } + } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/HistoryLearningObject.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/HistoryLearningObject.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Homework.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Homework.java old mode 100644 new mode 100755 index ed37c2c..7cc478d --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Homework.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Homework.java @@ -22,6 +22,7 @@ import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; +import javax.xml.bind.annotation.XmlRootElement; /** * Classe que encapsula os dados de uma atividade para casa * @@ -31,6 +32,7 @@ import javax.persistence.ManyToOne; @SuppressWarnings("serial") @Entity +@XmlRootElement public class Homework implements Serializable{ @Id @GeneratedValue(strategy=GenerationType.AUTO) diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Keyword.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Keyword.java old mode 100644 new mode 100755 index 7337867..df443dc --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Keyword.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Keyword.java @@ -20,6 +20,7 @@ import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Transient; +import javax.xml.bind.annotation.XmlRootElement; /** * Classe que encapsula os dados de uma keyword * @@ -27,6 +28,7 @@ import javax.persistence.Transient; * */ @Entity +@XmlRootElement public class Keyword implements Comparable, Serializable{ private static final long serialVersionUID = 1L; diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/LearningObject.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/LearningObject.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Log.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Log.java new file mode 100755 index 0000000..07b6529 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Log.java @@ -0,0 +1,146 @@ +package br.ufpe.cin.amadeus.amadeus_web.domain.content_management; + +import java.io.Serializable; +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.OneToOne; + +import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; + +@SuppressWarnings("serial") +@Entity +public class Log implements Serializable{ + + @Id @GeneratedValue (strategy=GenerationType.AUTO) + private int id; + + private Date date; + + @OneToOne + @JoinColumn(name="PERSON_ID") + private Person idUser; + private Integer codigo; + private Integer idObjeto; + private Integer fases; + private Integer tempo; + private Integer pontuacao; + private Integer tamanhoMensagem; + @Column(name="metaalternativa") + private Integer metaAlternativa; + + public static int LOG_CODIGO_LOGIN = 1; //Ok + public static int LOG_CODIGO_LOGOUT = 2; //Ok + public static int LOG_CODIGO_FORUM_POST = 3; //Ok - postagens em foruns + public static int LOG_CODIGO_FORUM_TOPICO = 4; //Ok - visualizacoes de topicos + public static int LOG_CODIGO_VISUALIZACAO_MATERIAL = 5; //Ok - abertura de materias dos modulos + public static int LOG_CODIGO_RESPOSTA_ENQUETE = 6; //Ok + public static int LOG_CODIGO_ABRIR_JOGO = 7; //Ok + public static int LOG_CODIGO_JOGAR = 8; //Ok + public static int LOG_CODIGO_ENTREGAR_MATERIAL = 9; //Ok + public static int LOG_CODIGO_VISUALIZACAO_VIDEO = 10; + + public Log (){ + + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public Date getDate() { + return date; + } + + public void setDate(Date date) { + this.date = date; + } + + public Person getIdUser() { + return idUser; + } + + public void setIdUser(Person idUser) { + this.idUser = idUser; + } + + public void setCodigo(int codigo) { + this.codigo = codigo; + } + + public Integer getCodigo() { + return codigo; + } + + public Integer getIdObjeto() { + return idObjeto; + } + + public void setIdObjeto(Integer idObjeto) { + this.idObjeto = idObjeto; + } + + public Integer getFases() { + return fases; + } + + public void setFases(Integer fases) { + this.fases = fases; + } + + public Integer getTempo() { + return tempo; + } + + public void setTempo(Integer tempo) { + this.tempo = tempo; + } + + public Integer getPontuacao() { + return pontuacao; + } + + public void setPontuacao(Integer pontuacao) { + this.pontuacao = pontuacao; + } + + public void setCodigo(Integer codigo) { + this.codigo = codigo; + } + + /** + * Metodo que cria um log ja com a data de criacao setada. + * @return + */ + public static Log getLog(){ + Log log = new Log(); + log.setDate(new Date()); + return log; + } + + + public Integer getTamanhoMensagem() { + return tamanhoMensagem; + } + + public void setTamanhoMensagem(Integer tamanhoMensagem) { + this.tamanhoMensagem = tamanhoMensagem; + } + + public Integer getMetaAlternativa() { + return metaAlternativa; + } + + public void setMetaAlternativa(Integer metaAlternativa) { + this.metaAlternativa = metaAlternativa; + } +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Material.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Material.java old mode 100644 new mode 100755 index 58b49f5..61fbf45 --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Material.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Material.java @@ -25,6 +25,7 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToOne; +import javax.xml.bind.annotation.XmlRootElement; import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; /** @@ -34,6 +35,7 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; */ @SuppressWarnings("serial") @Entity +@XmlRootElement public class Material implements Serializable{ @@ -42,7 +44,7 @@ public class Material implements Serializable{ private static final int MAX_FILE_SIZE = 500000; - @OneToOne(cascade= CascadeType.ALL, fetch = FetchType.LAZY) + @OneToOne(cascade= CascadeType.ALL, fetch = FetchType.EAGER) @JoinColumn (name="ARCHIVE_ID", nullable = false) @org.hibernate.annotations.Cascade( value = org.hibernate.annotations.CascadeType.DELETE_ORPHAN ) diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/MaterialRequest.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/MaterialRequest.java old mode 100644 new mode 100755 index 8138be0..ead46c6 --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/MaterialRequest.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/MaterialRequest.java @@ -27,9 +27,11 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; +import javax.xml.bind.annotation.XmlRootElement; @SuppressWarnings("serial") @Entity +@XmlRootElement public class MaterialRequest implements Serializable{ @Id @GeneratedValue(strategy=GenerationType.AUTO) diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Message.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Message.java old mode 100644 new mode 100755 index e57a9d4..5c50550 --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Message.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Message.java @@ -40,8 +40,12 @@ public class Message { @Column(length=2000) private String body; - + private Date date; + + @OneToOne + @JoinColumn (name="MESSAGEREPLY_ID") + private Message messageReply; @OneToOne @JoinColumn (name="AUTHOR_ID") @@ -96,4 +100,13 @@ public class Message { this.forum = forum; } + public Message getMessageReply() { + return messageReply; + } + + public void setMessageReply(Message messageReply) { + this.messageReply = messageReply; + } + + } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Module.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Module.java old mode 100644 new mode 100755 index 8c112e7..2a25603 --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Module.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Module.java @@ -28,6 +28,9 @@ import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.OrderBy; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.Evaluation; /** @@ -39,6 +42,8 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.Eval @SuppressWarnings("serial") @Entity +@XmlRootElement +@XmlAccessorType(XmlAccessType.FIELD) public class Module implements Serializable { @Id @GeneratedValue(strategy=GenerationType.AUTO) diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Multimedia.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Multimedia.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/PersonForum.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/PersonForum.java new file mode 100755 index 0000000..e18fe55 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/PersonForum.java @@ -0,0 +1,78 @@ +package br.ufpe.cin.amadeus.amadeus_web.domain.content_management; + +import java.util.Date; + +import javax.persistence.AssociationOverride; +import javax.persistence.AssociationOverrides; +import javax.persistence.Column; +import javax.persistence.EmbeddedId; +import javax.persistence.Entity; +import javax.persistence.Table; +import javax.persistence.JoinColumn; +import javax.persistence.Transient; + +import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; + +@Entity +@Table(name = "personforum") +@AssociationOverrides( + { @AssociationOverride(name = "pk.person", joinColumns = @JoinColumn(name = "person_id")), + @AssociationOverride(name = "pk.forum", joinColumns = @JoinColumn(name = "forum_id")) }) + +public class PersonForum { + @EmbeddedId + private PersonForumPK pk = new PersonForumPK(); + + @Column(name="lasttimeinforum") + private Date lastTimeInForum; + + public PersonForumPK getPk() { + return pk; + } + + public void setPk(PersonForumPK pk) { + this.pk = pk; + } + + public Date getLastTimeInForum() { + return lastTimeInForum; + } + + public void setLastTimeInForum(Date lastTimeInForum) { + this.lastTimeInForum = lastTimeInForum; + } + + @Transient + public Person getPerson() { + return this.getPk().getPerson(); + } + + @Transient + public Forum getForum() { + return this.getPk().getForum(); + } + + + public boolean equals(Object o) { + if (this == o) + return true; + if (o == null || getClass() != o.getClass()) + return false; + + PersonForum that = (PersonForum) o; + + if (getPk() != null ? !getPk().equals(that.getPk()) : that.getPk() != null) + + return false; + + return true; + + } + + public int hashCode() { + return (getPk() != null ? getPk().hashCode() : 0); + } + + + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/PersonForumPK.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/PersonForumPK.java new file mode 100755 index 0000000..6ae1568 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/PersonForumPK.java @@ -0,0 +1,68 @@ +package br.ufpe.cin.amadeus.amadeus_web.domain.content_management; + +import java.io.Serializable; + +import javax.persistence.Embeddable; +import javax.persistence.FetchType; +import javax.persistence.ManyToOne; + +import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; + +@Embeddable +public class PersonForumPK implements Serializable { + + private static final long serialVersionUID = -5869094934725857817L; + @ManyToOne(fetch = FetchType.LAZY, optional = false) + private Person person; + @ManyToOne(fetch = FetchType.LAZY, optional = false) + private Forum forum; + + // Precisamos implementar corretamente o equals() na classe de Id composta. + public boolean equals(Object o) { + if (this == o) + return true; + if (o == null || getClass() != o.getClass()) + return false; + if (!(o instanceof PersonForumPK)) + return false; + + PersonForumPK that = (PersonForumPK) o; + + if (this.person != null ? !this.person.equals(that.person) : that.person != null) + return false; + if (this.forum != null ? !this.forum.equals(that.forum) : that.forum != null) + return false; + + return true; + } + + public int hashCode() { + int result; + result = (this.person != null ? this.person.hashCode() : 0); + result = 31 * result + (this.forum != null ? this.forum.hashCode() : 0); + return result; + } + +public Person getPerson() { + return person; +} + +public void setPerson(Person person) { + this.person = person; +} + +public Forum getForum() { + return forum; +} + +public void setForum(Forum forum) { + this.forum = forum; +} + +public static long getSerialversionuid() { + return serialVersionUID; +} + + +} + diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/PersonRoleCourse.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/PersonRoleCourse.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Poll.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Poll.java old mode 100644 new mode 100755 index 78dc38e..5dd5316 --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Poll.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Poll.java @@ -27,6 +27,7 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; +import javax.xml.bind.annotation.XmlRootElement; /** * Classe que encapsula os dados de uma enquete * @@ -36,6 +37,7 @@ import javax.persistence.OneToMany; @SuppressWarnings("serial") @Entity +@XmlRootElement public class Poll implements Serializable{ @Id @GeneratedValue (strategy=GenerationType.AUTO) diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/ProfileType.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/ProfileType.java old mode 100644 new mode 100755 index 6c651d5..d8cdfcc --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/ProfileType.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/ProfileType.java @@ -13,6 +13,9 @@ Voc� deve ter recebido uma c�pia da Licen�a P�blica Geral GNU, sob o t package br.ufpe.cin.amadeus.amadeus_web.domain.content_management; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement public enum ProfileType { ADMIN, STUDENT, PROFESSOR, INACTIVE } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Role.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Role.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/RoleType.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/RoleType.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Status.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/Status.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/VideoIriz.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/VideoIriz.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/Alternative.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/Alternative.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/Evaluation.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/Evaluation.java old mode 100644 new mode 100755 index d06992e..f92262d --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/Evaluation.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/Evaluation.java @@ -32,6 +32,7 @@ import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; +import javax.xml.bind.annotation.XmlRootElement; import org.apache.commons.beanutils.BeanComparator; @@ -47,6 +48,7 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.real @SuppressWarnings("serial") @Entity +@XmlRootElement public class Evaluation implements Serializable{ @Id @GeneratedValue(strategy=GenerationType.AUTO) diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/EvaluationQuestion.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/EvaluationQuestion.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/Question.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/Question.java old mode 100644 new mode 100755 index 3bb7f7d..b04778b --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/Question.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/Question.java @@ -28,6 +28,7 @@ import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.ManyToOne; +import javax.xml.bind.annotation.XmlRootElement; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; /** @@ -38,6 +39,7 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; */ @Entity +@XmlRootElement @Inheritance(strategy = InheritanceType.SINGLE_TABLE) public abstract class Question { diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/QuestionAlternativable.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/QuestionAlternativable.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/QuestionAssociation.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/QuestionAssociation.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/QuestionDiscursive.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/QuestionDiscursive.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/QuestionGap.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/QuestionGap.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/QuestionMultiple.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/QuestionMultiple.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/QuestionTrueFalse.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/QuestionTrueFalse.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/realized/AlternativeRealized.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/realized/AlternativeRealized.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/realized/EvaluationRealized.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/realized/EvaluationRealized.java old mode 100644 new mode 100755 index 6d6e496..450cf6e --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/realized/EvaluationRealized.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/realized/EvaluationRealized.java @@ -29,6 +29,7 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; +import javax.xml.bind.annotation.XmlRootElement; import org.apache.commons.beanutils.BeanComparator; @@ -44,6 +45,7 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; @SuppressWarnings("serial") @Entity +@XmlRootElement public class EvaluationRealized implements Serializable{ @Id @GeneratedValue(strategy=GenerationType.AUTO) diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/realized/QuestionAlternativableRealized.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/realized/QuestionAlternativableRealized.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/realized/QuestionAssociationRealized.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/realized/QuestionAssociationRealized.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/realized/QuestionDiscursiveRealized.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/realized/QuestionDiscursiveRealized.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/realized/QuestionGapRealized.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/realized/QuestionGapRealized.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/realized/QuestionRealized.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/realized/QuestionRealized.java old mode 100644 new mode 100755 index 008884d..648f10d --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/realized/QuestionRealized.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/content_management/evaluation/realized/QuestionRealized.java @@ -22,6 +22,7 @@ import javax.persistence.Inheritance; import javax.persistence.InheritanceType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; +import javax.xml.bind.annotation.XmlRootElement; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.Question; /** @@ -32,6 +33,7 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.Ques */ @Entity +@XmlRootElement @Inheritance(strategy = InheritanceType.SINGLE_TABLE) public abstract class QuestionRealized { diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/AccessInfo.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/AccessInfo.java old mode 100644 new mode 100755 index ac68231..1d07db6 --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/AccessInfo.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/AccessInfo.java @@ -16,6 +16,7 @@ package br.ufpe.cin.amadeus.amadeus_web.domain.register; import java.io.Serializable; import java.util.ArrayList; +import java.util.Date; import java.util.List; import javax.persistence.CascadeType; @@ -30,6 +31,7 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.OneToMany; import javax.persistence.OneToOne; +import javax.xml.bind.annotation.XmlRootElement; import org.hibernate.annotations.Cascade; @@ -44,6 +46,7 @@ import br.ufpe.cin.amadeus.amadeus_web.util.Cryptography; */ @SuppressWarnings("serial") @Entity +@XmlRootElement public class AccessInfo implements Serializable{ @Id @GeneratedValue(strategy=GenerationType.AUTO) @@ -127,6 +130,6 @@ public class AccessInfo implements Serializable{ public void setOpenIDs(List openIDs) { this.openIDs = openIDs; - } + } } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/Image.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/Image.java old mode 100644 new mode 100755 index cf0d904..5d72484 --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/Image.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/Image.java @@ -20,10 +20,12 @@ import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToOne; +import javax.xml.bind.annotation.XmlRootElement; @SuppressWarnings("serial") @Entity +@XmlRootElement public class Image implements Serializable { @Id @GeneratedValue(strategy=GenerationType.AUTO) diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/MessengerMessage.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/MessengerMessage.java new file mode 100755 index 0000000..6916d44 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/MessengerMessage.java @@ -0,0 +1,136 @@ +package br.ufpe.cin.amadeus.amadeus_web.domain.register; + +import java.io.Serializable; +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * Classe responsável por representar a mensagem no sistema de comunicação via + * mensagens assíncronas do amadeus. + * + * @author Nailson Cunha + * + */ +@SuppressWarnings("serial") +@Entity +@XmlRootElement +@org.hibernate.annotations.Entity(dynamicUpdate = true) +public class MessengerMessage implements Serializable { + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private int id; + + private Date date; + + @Column(nullable=true) + private int responseTo; + + private String title; + private String content; + private boolean read; + private boolean toAll; + + @ManyToOne + @JoinColumn(name = "SENDER_ID", nullable = true, + updatable = false, insertable = false) + private Person sender; + + @ManyToOne + @JoinColumn(name = "RECEIVER_ID", nullable = true, + updatable = false, insertable = false) + private Person receiver; + + public MessengerMessage() { + this.read = false; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public Date getDate() { + return date; + } + + public void setDate(Date date) { + this.date = date; + } + + public int getResponseTo() { + return responseTo; + } + + public void setResponseTo(int responseTo) { + this.responseTo = responseTo; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public boolean isRead() { + return read; + } + + public void setRead(boolean read) { + this.read = read; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getTitle() { + return title; + } + + public Person getSender() { + return sender; + } + + public void setSender(Person sender) { + this.sender = sender; + } + + public Person getReceiver() { + return receiver; + } + + public void setReceiver(Person receiver) { + this.receiver = receiver; + } + + public boolean isToAll() { + return toAll; + } + + public void setToAll(boolean toAll) { + this.toAll = toAll; + } + + @Override + public String toString() { + return "MessengerMessage [date=" + date + ", responseTo=" + responseTo + + ", title=" + title + ", read=" + read; + } + + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/OnlineUser.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/OnlineUser.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/OpenID.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/OpenID.java old mode 100644 new mode 100755 index d948ee0..699a800 --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/OpenID.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/OpenID.java @@ -22,11 +22,13 @@ import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; +import javax.xml.bind.annotation.XmlRootElement; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; @SuppressWarnings("serial") @Entity +@XmlRootElement public class OpenID implements Serializable { @Id @GeneratedValue (strategy=GenerationType.AUTO) diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/Person.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/Person.java old mode 100644 new mode 100755 index 8147a57..b1bcf1c --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/Person.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/Person.java @@ -14,16 +14,25 @@ Voc� deve ter recebido uma c�pia da Licen�a P�blica Geral GNU, sob o t package br.ufpe.cin.amadeus.amadeus_web.domain.register; import java.io.Serializable; +import java.util.ArrayList; import java.util.Date; +import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; +import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; +import javax.persistence.OneToMany; import javax.persistence.OneToOne; +import javax.xml.bind.annotation.XmlRootElement; + +import org.hibernate.annotations.Cascade; + +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.PersonForum; /** * Classe que encapsula os dados de um usuário do sistema @@ -34,6 +43,7 @@ import javax.persistence.OneToOne; @SuppressWarnings("serial") @Entity +@XmlRootElement @org.hibernate.annotations.Entity (dynamicUpdate = true) public class Person implements Serializable{ @@ -57,6 +67,10 @@ public class Person implements Serializable{ private char gender; + private String twitterLogin; + + private String facebookLogin; + @OneToOne (cascade = CascadeType.ALL) @JoinColumn(name="ACCESS_INFO_ID") private AccessInfo accessInfo; @@ -68,9 +82,25 @@ public class Person implements Serializable{ @OneToOne(cascade = CascadeType.ALL) @JoinColumn(name="IMAGE_ID") private Image image; + + @OneToMany(cascade = CascadeType.ALL) + @JoinColumn(name = "SENDER_ID", nullable = true) + private List sent; + + @OneToMany(cascade = CascadeType.ALL) + @JoinColumn(name = "RECEIVER_ID", nullable = true) + private List received; + + @OneToMany(fetch = FetchType.LAZY, mappedBy = "pk.person", + cascade = { CascadeType.PERSIST, CascadeType.MERGE }) + @Cascade( { org.hibernate.annotations.CascadeType.SAVE_UPDATE, + org.hibernate.annotations.CascadeType.DELETE_ORPHAN }) + private List foruns = new ArrayList(); public Person() { gender = ' '; + this.sent = new ArrayList(); + this.received = new ArrayList(); } public Date getBirthDate() { @@ -166,11 +196,11 @@ public class Person implements Serializable{ return result; } - public int hashCode(){ + /*public int hashCode(){ StringBuilder builder = new StringBuilder(); builder.append(this); return builder.toString().hashCode(); - } + }*/ public Resume getResume() { return resume; @@ -188,4 +218,44 @@ public class Person implements Serializable{ this.image = image; } + public String getTwitterLogin() { + return twitterLogin; + } + + public void setTwitterLogin(String twitterLogin) { + this.twitterLogin = twitterLogin; + } + + public String getFacebookLogin() { + return facebookLogin; + } + + public void setFacebookLogin(String facebookLogin) { + this.facebookLogin = facebookLogin; + } + + public List getForuns() { + return foruns; + } + + public void setForuns(List foruns) { + this.foruns = foruns; + } + + public List getReceived() { + return received; + } + + public void setReceived(List received) { + this.received = received; + } + + public List getSent() { + return sent; + } + + public void setSent(List sent) { + this.sent = sent; + } + } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/Resume.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/Resume.java old mode 100644 new mode 100755 index 100dbf5..953c0f1 --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/Resume.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/Resume.java @@ -19,10 +19,12 @@ import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToOne; +import javax.xml.bind.annotation.XmlRootElement; @SuppressWarnings("serial") @Entity +@XmlRootElement public class Resume implements Serializable{ @Id @GeneratedValue(strategy=GenerationType.AUTO) diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/Thumbnail.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/Thumbnail.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/Tweet.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/Tweet.java new file mode 100755 index 0000000..2f7653e --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/Tweet.java @@ -0,0 +1,105 @@ +package br.ufpe.cin.amadeus.amadeus_web.domain.register; + +import java.util.Date; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.xml.bind.annotation.XmlRootElement; + +import br.ufpe.cin.amadeus.amadeus_web.util.TweetInteractionType; + +/** + * Classe responsável por representar os Tweets monitorados através da + * ferramenta de Interação Social. Desenvolvida em trabalho conjunto com o Prof. + * Petrônio do IFPB. + * + * @author Nailson Cunha + * + */ + +@Entity +@XmlRootElement +@org.hibernate.annotations.Entity(dynamicUpdate = true) +public class Tweet { + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private int Id; + + @ManyToOne + @JoinColumn(name = "sender", nullable = true) + private Person userSender; + + @ManyToOne + @JoinColumn(name = "targetid", nullable = true) + private Person userTarget; + + private Date dateOfTweet; + private TweetInteractionType interactionType; + private String tweetText; + + public String getTweetText() { + return tweetText; + } + + public void setTweetText(String tweetText) { + this.tweetText = tweetText; + } + + public Tweet() { + + } + + public int getId() { + return Id; + } + + public void setId(int id) { + Id = id; + } + + public Person getUserSender() { + return userSender; + } + + public void setUserSender(Person useSender) { + this.userSender = useSender; + } + + public Date getDateOfTweet() { + return dateOfTweet; + } + + public void setDateOfTweet(Date dateOfTweet) { + this.dateOfTweet = dateOfTweet; + } + + public TweetInteractionType getInteractionType() { + return interactionType; + } + + public void setInteractionType(TweetInteractionType interactionType) { + this.interactionType = interactionType; + } + + public Person getUserTarget() { + return userTarget; + } + + public void setUserTarget(Person userTarget) { + this.userTarget = userTarget; + } + + @Override + public String toString() { + return "Tweet [Id=" + Id + ", userSender=" + userSender.getName() + + ", userTarget=" + userTarget.getName() + ", dateOfTweet=" + dateOfTweet + + ", interactionType=" + interactionType + ", tweetText=" + + tweetText + "]"; + } + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/UserRequest.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/UserRequest.java old mode 100644 new mode 100755 index 78f2aec..3a2abf7 --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/UserRequest.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/register/UserRequest.java @@ -27,12 +27,14 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToOne; +import javax.xml.bind.annotation.XmlRootElement; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Status; @SuppressWarnings("serial") @Entity +@XmlRootElement public class UserRequest implements Serializable { @Id @GeneratedValue(strategy=GenerationType.AUTO) diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/settings/MobileSettings.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/settings/MobileSettings.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/settings/OpenIDSettings.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/settings/OpenIDSettings.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/domain/settings/WebSettings.java b/src/br/ufpe/cin/amadeus/amadeus_web/domain/settings/WebSettings.java old mode 100644 new mode 100755 index a542652..6f58833 --- a/src/br/ufpe/cin/amadeus/amadeus_web/domain/settings/WebSettings.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/domain/settings/WebSettings.java @@ -92,6 +92,9 @@ public class WebSettings extends XMLConfiguration { } public void setSystemGeneralDomain(String systemGeneralDomain) { + this.setAutoSave(true); + this.setProperty("system.general..domain", systemGeneralDomain); + this.setAutoSave(false); this.systemGeneralDomain= systemGeneralDomain; } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/exception/CourseInvalidException.java b/src/br/ufpe/cin/amadeus/amadeus_web/exception/CourseInvalidException.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/exception/InvalidCurrentPasswordException.java b/src/br/ufpe/cin/amadeus/amadeus_web/exception/InvalidCurrentPasswordException.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/exception/InvalidLogonException.java b/src/br/ufpe/cin/amadeus/amadeus_web/exception/InvalidLogonException.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/exception/InvalidMaterialException.java b/src/br/ufpe/cin/amadeus/amadeus_web/exception/InvalidMaterialException.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/exception/InvalidQuestionException.java b/src/br/ufpe/cin/amadeus/amadeus_web/exception/InvalidQuestionException.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/exception/InvalidSocialCredencialsException.java b/src/br/ufpe/cin/amadeus/amadeus_web/exception/InvalidSocialCredencialsException.java new file mode 100755 index 0000000..3de1a99 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/exception/InvalidSocialCredencialsException.java @@ -0,0 +1,19 @@ +/** +Copyright 2008, 2009 UFPE - Universidade Federal de Pernambuco + +Este arquivo é parte do programa Amadeus Sistema de Gestão de Aprendizagem, ou simplesmente Amadeus LMS + +O Amadeus LMS é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como +publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença. + +Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. + +Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +**/ + +package br.ufpe.cin.amadeus.amadeus_web.exception; + +@SuppressWarnings("serial") +public class InvalidSocialCredencialsException extends Exception { + +} \ No newline at end of file diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/exception/InvalidUserException.java b/src/br/ufpe/cin/amadeus/amadeus_web/exception/InvalidUserException.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/exception/InvalidVideoException.java b/src/br/ufpe/cin/amadeus/amadeus_web/exception/InvalidVideoException.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/exception/RequestException.java b/src/br/ufpe/cin/amadeus/amadeus_web/exception/RequestException.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/facade/Controller.java b/src/br/ufpe/cin/amadeus/amadeus_web/facade/Controller.java old mode 100644 new mode 100755 index ff6d249..e7be28f --- a/src/br/ufpe/cin/amadeus/amadeus_web/facade/Controller.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/facade/Controller.java @@ -14,7 +14,7 @@ Voc� deve ter recebido uma c�pia da Licen�a P�blica Geral GNU, sob o t package br.ufpe.cin.amadeus.amadeus_web.facade; import java.io.IOException; - +import java.math.BigInteger; import java.util.ArrayList; import java.util.Calendar; import java.util.Collections; @@ -22,9 +22,7 @@ import java.util.Date; import java.util.GregorianCalendar; import java.util.Iterator; import java.util.List; -import java.util.Map; import java.util.Set; -import java.util.TreeMap; import javax.mail.MessagingException; @@ -33,6 +31,8 @@ import org.apache.struts.action.ActionMessages; import org.apache.struts.upload.FormFile; import br.ufpe.cin.amadeus.amadeus_web.dao.DAOFactory; +import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.AmadeusDroidHistoricDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.ArchiveDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.CourseDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.ForumDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.GameDAO; @@ -40,6 +40,7 @@ import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.HistoryLearningObje import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.HomeworkDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.KeywordDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.LearningObjectDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.LogDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.MaterialDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.MaterialRequestDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.MessageDAO; @@ -53,10 +54,12 @@ import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.evaluation.Evaluati import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.externallink.ExternalLinkDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.HibernateUtil; import br.ufpe.cin.amadeus.amadeus_web.dao.register.AccessInfoDAO; +import br.ufpe.cin.amadeus.amadeus_web.dao.register.MessengerMessageDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.register.OpenIDDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.register.PersonDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.register.ResumeDAO; import br.ufpe.cin.amadeus.amadeus_web.dao.register.UserRequestDAO; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.AmadeusDroidHistoric; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.ExternalLink; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Forum; @@ -65,6 +68,7 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.HistoryLearning import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Homework; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Keyword; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.LearningObject; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Log; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Material; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.MaterialRequest; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Message; @@ -86,9 +90,11 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.Ques import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.realized.EvaluationRealized; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.realized.QuestionDiscursiveRealized; import br.ufpe.cin.amadeus.amadeus_web.domain.register.AccessInfo; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.MessengerMessage; import br.ufpe.cin.amadeus.amadeus_web.domain.register.OpenID; import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; import br.ufpe.cin.amadeus.amadeus_web.domain.register.Resume; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.Tweet; import br.ufpe.cin.amadeus.amadeus_web.domain.register.UserRequest; import br.ufpe.cin.amadeus.amadeus_web.exception.CourseInvalidException; import br.ufpe.cin.amadeus.amadeus_web.exception.InvalidCurrentPasswordException; @@ -98,6 +104,7 @@ import br.ufpe.cin.amadeus.amadeus_web.exception.InvalidUserException; import br.ufpe.cin.amadeus.amadeus_web.exception.InvalidVideoException; import br.ufpe.cin.amadeus.amadeus_web.exception.RequestException; import br.ufpe.cin.amadeus.amadeus_web.struts.messages.Messages; +import br.ufpe.cin.amadeus.amadeus_web.syncronize.Archive; import br.ufpe.cin.amadeus.amadeus_web.util.Cryptography; import br.ufpe.cin.amadeus.amadeus_web.util.DateConstructor; import br.ufpe.cin.amadeus.amadeus_web.util.MailSender; @@ -205,6 +212,13 @@ public class Controller { } CourseDAO courseRep = factory.getCourseDAO(); result = courseRep.makePersistent(c); + LogDAO logRep = factory.getLogDAO(); + Log log = new Log(); + log.setDate(new Date()); + PersonDAO personDAO = factory.getPersonDAO(); + Person person = personDAO.findById(4, false); + log.setIdUser(person); + logRep.makePersistent(log); } catch (RuntimeException e) { throw e; } @@ -343,6 +357,29 @@ public class Controller { } return person; } + + public Person getPersonByLogin(String login){ + Person person = null; + try { + PersonDAO personDAO = factory.getPersonDAO(); + person = personDAO.getPersonByLogin(login); + } catch (RuntimeException e) { + throw e; + } + return person; + } + + public Person getPersonByUserName(String userName){ + Person person = null; + try { + PersonDAO personDAO = factory.getPersonDAO(); + person = personDAO.getPersonByUserName(userName); + } catch (RuntimeException e) { + throw e; + } + return person; + } + public String remindPassword(String email) throws MessagingException, IOException { @@ -624,18 +661,18 @@ public class Controller { if (person.getResume().getYear() != null) { yearTitulation = person.getResume().getYear(); } - - + System.out.println(person.getEmail()); + System.out.println(person.getId()); + if (this.existEmail(person.getEmail()) && !(this.getPersonByID(person.getId()).getEmail().equals(person.getEmail()))) { + throw new InvalidUserException("errors.email.alreadyExists"); + } + System.out.println("CHAMOUUUUU"); try { - + if (person.getResume().getYear() == null || yearTitulation <= yearNowadays) { - - if (this.verifyEmail(person)) { - PersonDAO personDAO = factory.getPersonDAO(); - personDAO.merge(person); - } else { - throw new Exception("errors.email.alreadyExists"); - } + System.out.println("CHAMOUUUUU2"); + PersonDAO personDAO = factory.getPersonDAO(); + personDAO.merge(person); } else { throw new Exception("errors.yearTitulation"); } @@ -675,6 +712,29 @@ public class Controller { return result; } + + public boolean validateUser(AccessInfo accessInfo){ + boolean validate = true; + + AccessInfo aInfo = null; + try { + if (accessInfo.getLogin() != null && accessInfo.getPassword() != null) { + aInfo = this.searchUserByLogin(accessInfo.getLogin()); + if(aInfo != null) + if(aInfo.getTypeProfile() == (ProfileType.INACTIVE)){ + validate = false; + } + if ((aInfo == null) + || (!accessInfo.getPassword().equals(aInfo.getPassword()))) + validate = false; + + } + } catch (RuntimeException e) { + throw e; + } + + return validate; + } public AccessInfo logon(AccessInfo accesssInfo) throws InvalidLogonException { @@ -789,7 +849,163 @@ public class Controller { return courses; } - + + public List getStudentByUser(AccessInfo userInfo){ + List prcList; + List newPrcList = + new ArrayList(); + try { + PersonRoleCourseDAO prcDAO = factory.getPersonRoleCourseDAO(); + prcList = prcDAO.getStudentByUser(userInfo); + for (PersonRoleCourse prc : prcList) { + br.ufpe.cin.amadeus.amadeus_web.syncronize.PersonRoleCourse obj = new br.ufpe.cin.amadeus.amadeus_web.syncronize.PersonRoleCourse(); + obj.setId(prc.getId()); + obj.setCourse(new br.ufpe.cin.amadeus.amadeus_web.syncronize.Course()); + obj.getCourse().setId(prc.getCourse().getId()); + obj.setPerson(new br.ufpe.cin.amadeus.amadeus_web.syncronize.Person()); + obj.getPerson().setId(prc.getPerson().getId()); + obj.getPerson().setName(prc.getPerson().getName()); + obj.setRole(new br.ufpe.cin.amadeus.amadeus_web.syncronize.Role()); + obj.getRole().setId(prc.getRole().getId()); + + if (prc.getRole().getRoleType().equals(RoleType.ADMIN)) { + obj.getRole().setRoleType(0); + }else if (prc.getRole().getRoleType().equals(RoleType.STUDENT)) { + obj.getRole().setRoleType(1); + }else if (prc.getRole().getRoleType().equals(RoleType.ASSISTANT)) { + obj.getRole().setRoleType(2); + }else if (prc.getRole().getRoleType().equals(RoleType.TEACHER)) { + obj.getRole().setRoleType(3); + } + newPrcList.add(obj); + } + + return newPrcList; + } catch (RuntimeException e) { + throw e; + } + } + + public Archive getArchiveByMaterial(int material_id){ + + ArchiveDAO arcDao = factory.getArchiveDAO(); + br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Archive oldArchive = arcDao.getArchiveByMaterial(material_id); + Archive newArchive = new Archive(); + newArchive.setId(oldArchive.getId()); + newArchive.setArchive(oldArchive.getArchive()); + + return newArchive; + } + + public Material findMaterialById(int material_id) { + MaterialDAO matDAO = factory.getMaterialDAO(); + return matDAO.getMaterialByID(material_id); + } + + public List getCoursesByUser(AccessInfo userInfo) { + List courses = null; + List newListCourse = new ArrayList(); + List newListMaterial = null; + List newListForum = null; + br.ufpe.cin.amadeus.amadeus_web.syncronize.AccessInfo newAccessInfo = null; + br.ufpe.cin.amadeus.amadeus_web.syncronize.Person newPerson = null; + + try { + CourseDAO courseRequest = factory.getCourseDAO(); + courses = courseRequest.getCoursesByUser(userInfo); + for (Course course : courses) { + newListMaterial = new ArrayList(); + newListForum = new ArrayList(); + + br.ufpe.cin.amadeus.amadeus_web.syncronize.Course c = new br.ufpe.cin.amadeus.amadeus_web.syncronize.Course(); + c.setContent(course.getContent()); + c.setFinalCourseDate(course.getFinalCourseDate()); + c.setFinalRegistrationDate(course.getFinalRegistrationDate()); + c.setId(course.getId()); + c.setInitialCourseDate(course.getInitialCourseDate()); + c.setInitialRegistrationDate(course.getInitialRegistrationDate()); + c.setMaxAmountStudents(course.getMaxAmountStudents()); + c.setName(course.getName()); + c.setNumberOfStudentsInCourse(course.getNumberOfStudentsInCourse()); + c.setObjectives(course.getObjectives()); + + newPerson = new br.ufpe.cin.amadeus.amadeus_web.syncronize.Person(); + newPerson.setBirthDate(course.getProfessor().getBirthDate()); + newPerson.setCity(course.getProfessor().getCity()); + newPerson.setCpf(course.getProfessor().getCpf()); + newPerson.setEmail(course.getProfessor().getEmail()); + newPerson.setGender(course.getProfessor().getGender()); + newPerson.setId(course.getProfessor().getId()); + newPerson.setName(course.getProfessor().getName()); + newPerson.setPhoneNumber(course.getProfessor().getPhoneNumber()); + newPerson.setState(course.getProfessor().getState()); + newAccessInfo = new br.ufpe.cin.amadeus.amadeus_web.syncronize.AccessInfo(); + newAccessInfo.setId(course.getProfessor().getAccessInfo().getId()); + newAccessInfo.setPassword(course.getProfessor().getAccessInfo().getPassword()); + newAccessInfo.setLogin(course.getProfessor().getAccessInfo().getLogin()); + + newPerson.setAccessInfo(newAccessInfo); + c.setProfessor(newPerson); + + List modules = course.getModules(); + for (Module module : modules) { + + List materials = module.getMaterials(); + for (Material material : materials) { + br.ufpe.cin.amadeus.amadeus_web.syncronize.Material mat = new br.ufpe.cin.amadeus.amadeus_web.syncronize.Material(); + mat.setId(material.getId()); + mat.setGrade(material.getGrade()); + mat.setExtension(material.getExtension()); + mat.setCreationDate(material.getCreationDate()); + mat.setCorrectedDate(material.getCorrectedDate()); + mat.setArchiveName(material.getArchiveName()); + mat.setCourse_id(c.getId()); + + newListMaterial.add(mat); + } + + List foruns = module.getForums(); + for (Forum obj : foruns) { + br.ufpe.cin.amadeus.amadeus_web.syncronize.Forum forum = new br.ufpe.cin.amadeus.amadeus_web.syncronize.Forum(); + forum.setId(obj.getId()); + forum.setName(obj.getName()); + forum.setDescription(obj.getDescription()); + forum.setCreationDate(obj.getCreationDate()); + forum.setModule_id(module.getId()); + + List newListMessage = + new ArrayList(); + List messages = obj.getMessages(); + for (Message obj2 : messages) { + br.ufpe.cin.amadeus.amadeus_web.syncronize.Message message = new br.ufpe.cin.amadeus.amadeus_web.syncronize.Message(); + message.setId(obj2.getId()); + message.setBody(obj2.getBody()); + message.setDate(obj2.getDate()); + message.setForum_id(obj2.getForum().getId()); + message.setPersonName(obj2.getAuthor().getName()); + message.setPersonLogin(obj2.getAuthor().getAccessInfo().getLogin()); + + newListMessage.add(message); + } + + forum.setMessages(newListMessage); + newListForum.add(forum); + } + + } + + c.setMaterials(newListMaterial); + c.setForuns(newListForum); + newListCourse.add(c); + } + + } catch (RuntimeException e) { + throw e; + } + + return newListCourse; + } + private void initializeSystem() { try { RoleDAO roleRep = factory.getRoleDAO(); @@ -907,6 +1123,23 @@ public class Controller { } } + + public void integrationSocialNetworks(AccessInfo accessInfo, String twitterLogin, + String facebookLogin) + { + Person person = accessInfo.getPerson(); + try { + PersonDAO personDAO = factory.getPersonDAO(); + + person.setTwitterLogin(twitterLogin); + person.setFacebookLogin(facebookLogin); + personDAO.makePersistent(person); + + } catch (RuntimeException e) { + throw e; + } + + } public int getNumberOfStudentsInCourse(Course c) { int result = 0; @@ -963,6 +1196,28 @@ public class Controller { } return result; } + + public AmadeusDroidHistoric insertSocialHitory(AmadeusDroidHistoric historic){ + AmadeusDroidHistoric result; + try { + AmadeusDroidHistoricDAO historyDAO = factory.getAmadeusDroidHistoricDAO(); + result = historyDAO.makePersistent(historic); + } catch (RuntimeException e) { + throw e; + } + return result; + } + + public List getSocialHistory(){ + List result; + try { + AmadeusDroidHistoricDAO historyDAO = factory.getAmadeusDroidHistoricDAO(); + result = historyDAO.getHistoric(); + } catch (RuntimeException e) { + throw e; + } + return result; + } public void updateModule(Module module) { try { @@ -1104,9 +1359,9 @@ public class Controller { } public void confirmRegistry(AccessInfo accinfo) { - String subject = "Confirma��o de cadastro na Plataforma de Educa��o a Dist�ncia Amadeus"; - String message = "Parab�ns "+ accinfo.getPerson().getName() +",\n"; - message += "Seu cadastro na plataforma de de Educa��o a dist�ncia Amadeus foi realizado com sucesso. \n"; + String subject = "Confirmação de cadastro na Plataforma de Educação a Distância Amadeus"; + String message = "Parabéns "+ accinfo.getPerson().getName() +",\n"; + message += "Seu cadastro na plataforma de de Educação a distância Amadeus foi realizado com sucesso. \n"; message += "Seguem seus dados cadastrais: \n"; message += "\n"; message += "Nome: " + accinfo.getPerson().getName() + "\n"; @@ -1603,6 +1858,56 @@ public class Controller { ForumDAO forum = factory.getForumDAO(); return forum.findById(forumId, false); } + + public Message getMessageById(int idMessage) { + MessageDAO messageDao = factory.getMessageDAO(); + return messageDao.findById(idMessage, false); + } + + public List getListForum(){ + List listForum = new ArrayList(); + ForumDAO forum = factory.getForumDAO(); + + List forumList = forum.getListForum(); + for (Forum obj : forumList) { + br.ufpe.cin.amadeus.amadeus_web.syncronize.Forum f = new br.ufpe.cin.amadeus.amadeus_web.syncronize.Forum(); + f.setId(obj.getId()); + f.setName(obj.getName()); + f.setDescription(obj.getDescription()); + f.setCreationDate(obj.getCreationDate()); + List listMessage = + new ArrayList(); + List messages = obj.getMessages(); + for (Message message : messages) { + br.ufpe.cin.amadeus.amadeus_web.syncronize.Message m = new br.ufpe.cin.amadeus.amadeus_web.syncronize.Message(); + m.setId(message.getId()); + m.setBody(message.getBody()); + m.setDate(message.getDate()); + m.setPersonName(message.getAuthor().getName()); + m.setForum_id(obj.getId()); + m.setPersonLogin(message.getAuthor().getAccessInfo().getLogin()); + listMessage.add(m); + } + f.setMessages(listMessage); + listForum.add(f); + } + + return listForum; + } + + public br.ufpe.cin.amadeus.amadeus_web.syncronize.Message getLastMessage(){ + MessageDAO mDAO = factory.getMessageDAO(); + + Message m = mDAO.getLastMessage(); + br.ufpe.cin.amadeus.amadeus_web.syncronize.Message message = new br.ufpe.cin.amadeus.amadeus_web.syncronize.Message(); + message.setId(m.getId()); + message.setBody(m.getBody()); + message.setDate(m.getDate()); + message.setForum_id(m.getForum().getId()); + message.setPersonName(m.getAuthor().getName()); + + return message; + } public List searchMessageByPaging(int tamanhoBloco, int qtdBloco, Forum forum) { qtdBloco = qtdBloco - 1; @@ -1611,6 +1916,15 @@ public class Controller { MessageDAO request = factory.getMessageDAO(); return request.searchMessageByPaging(tamanhoBloco, qtdBloco, forum); } + + public void saveMessage(Message message){ + try { + MessageDAO request = factory.getMessageDAO(); + request.makePersistent(message); + } catch (RuntimeException e) { + throw(e); + } + } public int getSizeSearchMessageByForum(Forum forum) { MessageDAO request = factory.getMessageDAO(); @@ -1707,11 +2021,11 @@ public class Controller { if ( c.equals("a") || c.equals("e") || c.equals("i") || c.equals("o") || c.equals("u")){ - if(i == length - 1 && length > 1){ // quando é o último char + if(i == length - 1 && length > 1){ // quando � o �ltimo char newString = newString.substring(0, i) + "%"; - } else if (i == 0 && length > 1) { // quando é o primeiro + } else if (i == 0 && length > 1) { // quando � o primeiro newString = "%" + newString.substring(1, length); } else { // no meio da string @@ -2007,7 +2321,6 @@ public class Controller { } count++; - content += ""+k.getName()+""; if (count <= keywords.size() - 1) { content +=", "; @@ -2236,6 +2549,11 @@ public class Controller { return accessInfoDAO.searchUsers(userName, userType, courseId); } + public List searchUsers(Integer userType) { + AccessInfoDAO accessInfoDAO = factory.getAccessInfoDAO(); + return accessInfoDAO.searchUsers(userType); + } + //external link public ExternalLink getExternalLinkById(int idLink){ @@ -2251,4 +2569,1167 @@ public class Controller { externalLinkDAO.makeTransient(externalLink); } + //Log + public void saveLog(Log log){ + LogDAO logRep = factory.getLogDAO(); + logRep.makePersistent(log); + } + + public Log getLog() throws Exception { + LogDAO logRep = factory.getLogDAO(); + Log log = new Log(); + log.setDate(new Date()); + PersonDAO personDAO = factory.getPersonDAO(); + Person pessoa = personDAO.findById(4, false); + log.setIdUser(pessoa); + logRep.makePersistent(log); + + return log; + } + + @SuppressWarnings("unchecked") + public String getJSONArrayGameScore(int idGame) + { + List gameScores = HibernateUtil.getSessionFactory().getCurrentSession(). + createSQLQuery("SELECT p.name, (MAX( l.pontuacao)) as pontuacao FROM log l, person p "+ + "WHERE l.codigo = " + Log.LOG_CODIGO_JOGAR + " "+ + "AND idobjeto = " + idGame + " " + + "AND l.person_id = p.id " + + "GROUP BY p.name").list(); + + String array = ""; + + for(int i=0; imaxScore) + { + maxScore = tempScore; + } + if(tempScore"; + } + array+=""; + + return array; + } + + @SuppressWarnings("unchecked") + public String getJSONArrayGameLevel(int idGame) + { + List gameLevel = HibernateUtil.getSessionFactory().getCurrentSession(). + createSQLQuery("SELECT p.name, (MAX( l.fases)) as pontuacao FROM log l, person p "+ + "WHERE l.codigo = " + Log.LOG_CODIGO_JOGAR + " "+ + "AND idobjeto = " + idGame + " " + + "AND l.person_id = p.id " + + "GROUP BY p.name").list(); + + String array = ""; + + for(int i=0; imaxScore) + { + maxScore = tempScore; + } + if(tempScore"; + } + array+=""; + + return array; + } + + + @SuppressWarnings("unchecked") + public String getJSONArrayModuleGameTotalTime(int idModule) + { + List moduleGameTime = HibernateUtil.getSessionFactory().getCurrentSession(). + createSQLQuery("SELECT g.name, (SUM( l.tempo)) as pontuacao FROM log l, game g, module m " + + "WHERE l.codigo = " + Log.LOG_CODIGO_JOGAR + " " + + "AND m.id = " +idModule + " " + + "AND g.module_id = m.id " + + "AND l.idobjeto = g.id " + + "GROUP BY g.name").list(); + + String array = ""; + + for(int i=0; i3 " + + "GROUP BY word " + + "ORDER BY count DESC " + + "LIMIT 20 "; + + List tags = HibernateUtil.getSessionFactory().getCurrentSession(). + createSQLQuery(select).list(); + + if(tags.size()>0) + { + Object[] temp = (Object[]) tags.get(0); + + int tempSize = 0; + + if(temp[1].getClass().equals(BigInteger.class)) + { + tempSize = ((BigInteger)temp[1]).intValue(); + } + else if(temp[1].getClass().equals(Integer.class)) + { + tempSize = ((Integer)temp[1]).intValue(); + } + + double max = tempSize; + + temp = (Object[]) tags.get(tags.size()-1); + + tempSize = 0; + + if(temp[1].getClass().equals(BigInteger.class)) + { + tempSize = ((BigInteger)temp[1]).intValue(); + } + else if(temp[1].getClass().equals(Integer.class)) + { + tempSize = ((Integer)temp[1]).intValue(); + } + + double min = tempSize; + + String array = "{\"tags\":{\"tag\":["; + + for(int i=0; imetade) + { + retorno = (val-metade)/(max-metade); + } + else if(val0) + { + temp = (Object[]) gameScores.get(gameScores.size()-1); + } + + int tempLevel = 0; + int anteriorLevel = 0; + + for(int i=0; i0) + { + while(tempLevel < atualLevel) + { + array+=",{\"" + eixoX +"\":"+tempLevel+"}"; + tempLevel++; + } + } + else + { + if(temp[1].getClass().equals(BigInteger.class)) + { + tempLevel = ((BigInteger)temp[1]).intValue(); + } + else if(temp[1].getClass().equals(Integer.class)) + { + tempLevel = ((Integer)temp[1]).intValue(); + } + } + if(anteriorLevel!=0) + { + if(anteriorLevel==tempLevel) + { + array+=",\""+temp[0]+"\":" + temp[2] + ""; + } + else + { + array+=",{\""+temp[0]+"\":" + temp[2] + ",\"" + eixoX + "\":"+temp[1]; + anteriorLevel = tempLevel; + } + } + else + { + array+="{\""+temp[0]+"\":" + temp[2] + ",\"" + eixoX + "\":"+temp[1]; + anteriorLevel = tempLevel; + } + } + array+="}]}"; + + return array; + } + + @SuppressWarnings("unchecked") + public String getJSONObjectQuantidadeTamanhoMSG(int idModule) + { + List gameScores = HibernateUtil.getSessionFactory().getCurrentSession(). + createSQLQuery("SELECT p.name, (SUM(tamanhomensagem)/COUNT(p.name)) as tamanho_msg, COUNT(p.name) as qdt_msg " + + "FROM log l, person p, message m, forum f " + + "WHERE l.person_id = p.id AND l.codigo = " + Log.LOG_CODIGO_FORUM_POST + " " + + "AND l.idobjeto = m.id AND m.forum_id = f.id AND f.module_id = " + idModule + " " + + "GROUP BY p.name;").list(); + String eixoX = "Tamanho"; + String eixoY = "Quantidade"; + + String array = "[[{\"eixoX\":\"" + eixoX + "\",\"eixoY\":\"" + eixoY + "\", \"titulo\":\"Tamanho Medio das Mensagens x Quantidade de Mensagens\"}]"; + + for(int i=0; i listaTempo = new ArrayList(); + ArrayList listaNomes = new ArrayList(); + ArrayList listaID = new ArrayList(); + + for(int i=0; i -1 && + listaTempo.get(listaID.lastIndexOf(listaID.lastIndexOf((Integer)temp[0]))) != null) + { + if(listaTempo.get(listaID.lastIndexOf(listaID.lastIndexOf((Integer)temp[0])))== null) + { + listaTempo.set(listaID.lastIndexOf(listaID.lastIndexOf((Integer)temp[0])), segunda.getTime() - primeira.getTime()); + + }else + { + listaTempo.set(listaID.lastIndexOf(listaID.lastIndexOf((Integer)temp[0])), listaTempo.get(listaID.lastIndexOf((Integer)temp[0]))+ (segunda.getTime() - primeira.getTime())); + } + }else + { + listaTempo.add(segunda.getTime() - primeira.getTime()); + } + } + + + } + for(int i=0; i getAllUnreadByPerson(Person person) { + MessengerMessageDAO mmd = factory.getMessengerMessageDAO(); + return mmd.getAllUnreadFromPerson(person); + } + + /** + * Método que retorna uma mensagem com base em seu ID + * @param idMensagemLida + * @return A mensagem encontrada + */ + public MessengerMessage getMessengerMessageById(int idMensagem) { + MessengerMessageDAO mmd = factory.getMessengerMessageDAO(); + MessengerMessage message = mmd.findById(idMensagem, false); + return message; + } + + public MessengerMessage saveOnlyMessage(MessengerMessage message) { + MessengerMessageDAO mmd = factory.getMessengerMessageDAO(); + return mmd.makePersistent(message); + } + + /** + * Método que exclui a mensagem recebida como parametro + * @param message + */ + public void deleteMessengerMessage(MessengerMessage message) { + try { + MessengerMessageDAO mmd = factory.getMessengerMessageDAO(); + mmd.makeTransient(message); + } catch (RuntimeException e) { + throw e; + } + + } + + /** + * Método que retorna todas as Mensagems de uma determinada pessoa + * @param person + * @return + */ + public List getAllMessengerMessageByPerson(Person person) { + MessengerMessageDAO mmd = factory.getMessengerMessageDAO(); + return mmd.getAllMessengerMessageByPerson(person); + } + + public List getAllPersons() { + PersonDAO pd = factory.getPersonDAO(); + return pd.findAll(); + } + + public int getPersonByTwitterLogin(String screenName) { + PersonDAO personDAO = factory.getPersonDAO(); + return personDAO.getPersonByTwitterLogin(screenName); + } + + public List getAllTweets() { + return factory.getTweetDAO().findAll(); + } + + public List getTweetBetweenDates(Date inicio, Date fim) { + return factory.getTweetDAO().getTweetBetweenDates(inicio,fim); + } + } \ No newline at end of file diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/facade/Facade.java b/src/br/ufpe/cin/amadeus/amadeus_web/facade/Facade.java old mode 100644 new mode 100755 index 923d2c7..60177f3 --- a/src/br/ufpe/cin/amadeus/amadeus_web/facade/Facade.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/facade/Facade.java @@ -23,6 +23,7 @@ import javax.mail.MessagingException; import org.apache.struts.action.ActionMessages; import org.apache.struts.upload.FormFile; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.AmadeusDroidHistoric; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.ExternalLink; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Forum; @@ -31,6 +32,7 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.HistoryLearning import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Homework; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Keyword; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.LearningObject; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Log; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Material; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.MaterialRequest; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Message; @@ -49,17 +51,21 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.Ques import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.realized.EvaluationRealized; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.realized.QuestionDiscursiveRealized; import br.ufpe.cin.amadeus.amadeus_web.domain.register.AccessInfo; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.MessengerMessage; import br.ufpe.cin.amadeus.amadeus_web.domain.register.OpenID; import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; import br.ufpe.cin.amadeus.amadeus_web.domain.register.Resume; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.Tweet; import br.ufpe.cin.amadeus.amadeus_web.domain.register.UserRequest; import br.ufpe.cin.amadeus.amadeus_web.exception.CourseInvalidException; import br.ufpe.cin.amadeus.amadeus_web.exception.InvalidCurrentPasswordException; import br.ufpe.cin.amadeus.amadeus_web.exception.InvalidLogonException; import br.ufpe.cin.amadeus.amadeus_web.exception.InvalidMaterialException; +import br.ufpe.cin.amadeus.amadeus_web.exception.InvalidSocialCredencialsException; import br.ufpe.cin.amadeus.amadeus_web.exception.InvalidUserException; import br.ufpe.cin.amadeus.amadeus_web.exception.InvalidVideoException; import br.ufpe.cin.amadeus.amadeus_web.exception.RequestException; +import br.ufpe.cin.amadeus.amadeus_web.syncronize.Archive; public class Facade { @@ -245,6 +251,9 @@ public class Facade { return this.controller.logon(accessInfo); } + public boolean validateUser(AccessInfo accessInfo){ + return this.controller.validateUser(accessInfo); + } /** * this method return the number of pending tasks given the access info of a user @@ -259,6 +268,18 @@ public class Facade { return this.controller.searchCoursesByAccessInfo(userInfo); } + public List getCoursesByUserSyncronize(AccessInfo userInfo) { + return this.controller.getCoursesByUser(userInfo); + } + + public Archive getArchiveByMaterial(int material_id){ + return this.controller.getArchiveByMaterial(material_id); + } + + public List getStudentByUser(AccessInfo userInfo) { + return this.controller.getStudentByUser(userInfo); + } + public AccessInfo updateUser(AccessInfo ai){ return this.controller.updateUser(ai); } @@ -292,6 +313,11 @@ public class Facade { } + public void integrationSocialNetworks(AccessInfo accessInfo, String twitterLogin, String facebookLogin) throws InvalidSocialCredencialsException{ + this.controller.integrationSocialNetworks(accessInfo, twitterLogin, facebookLogin); + + } + public List getTeachersByCourse(Course c){ return this.controller.getTeachersByCourse(c); } @@ -305,6 +331,14 @@ public class Facade { return this.controller.getPersonByID(id); } + public Person getPersonByLogin(String login){ + return this.controller.getPersonByLogin(login); + } + + public Person getPersonByUserName(String userName){ + return this.controller.getPersonByUserName(userName); + } + public List getKeywordsByCourse(Course course) { return this.controller.getKeywordsByCourse(course); } @@ -333,6 +367,13 @@ public class Facade { public Module insertModule(Module module) { return this.controller.insertModule(module); } + public AmadeusDroidHistoric insertSocialHistory(AmadeusDroidHistoric historic){ + return this.controller.insertSocialHitory(historic); + } + + public List getSocialHistory(){ + return this.controller.getSocialHistory(); + } public boolean canRegisterUser(AccessInfo user, Course course){ return this.controller.canRegisterUser(user, course); } @@ -479,10 +520,22 @@ public class Facade { return this.controller.getForumById(forumId); } + public Message getMessageById(int idMessage){ + return this.controller.getMessageById(idMessage); + } + + public List getListForumSyncronize(){ + return this.controller.getListForum(); + } + public List searchMessageByPaging(int tamanhoBloco, int qtdBloco, Forum forum) { return this.controller.searchMessageByPaging(tamanhoBloco, qtdBloco, forum); } + public void saveMessage(Message message){ + this.controller.saveMessage(message); + } + public int getSizeSearchMessageByForum(Forum forum) { return this.controller.getSizeSearchMessageByForum(forum); } @@ -691,6 +744,10 @@ public class Facade { return this.controller.searchUsers(userName, userType, courseId); } + public List searchUsersByType(Integer userType) { + return this.controller.searchUsers(userType); + } + //external link public ExternalLink getExternalLinkById(int idLink){ @@ -699,6 +756,205 @@ public class Facade { public Person editPerson(Person person) throws Exception { return this.controller.editUser(person); + } + + //Log + public void saveLog(Log log){ + this.controller.saveLog(log); + } + + public void saveLog(){ + + } + + public void answerForumActivity(Integer idForum, String message, String login){ + Forum forum = this.getForumById(idForum); + Message msg = new Message(); + msg.setBody(message); + Date date = new Date(); + + AccessInfo user = this.searchUserByLogin(login); + + msg.setDate(date); + msg.setAuthor(user.getPerson()); + + forum.getMessages().add(msg); + + if (forum.getMessages().size() < 2) { + forum.setCreationDate(date); + } + + this.flush(); + + + } + + public Material findMaterialByID(int material_id) { + return this.controller.findMaterialById(material_id); + } + + public Log getLog() throws Exception { + return this.controller.getLog(); + } + + public br.ufpe.cin.amadeus.amadeus_web.syncronize.Message getLastMessage() { + return this.controller.getLastMessage(); + } + + public String getJSONArrayGameScore(int idGame){ + return this.controller.getJSONArrayGameScore(idGame); + } + + public String getJSONArrayGameScoreVisualizacao(int idGame){ + return this.controller.getJSONArrayGameScoreVisualizacao(idGame); + } + + public String getXmlGameScore(int idGame){ + return this.controller.getXmlGameScore(idGame); + } + + public String getJSONArrayGameLevel(int idGame){ + return this.controller.getJSONArrayGameLevel(idGame); + } + + public String getXmlGameLevel(int idGame){ + return this.controller.getXmlGameLevel(idGame); + } + + public String getJSONArrayModuleGameTimePerDay (int idModule){ + return this.controller.getJSONArrayModuleGameTimePerDay(idModule); + } + + public String getJSONArrayModuleGameTotalTime (int idModule){ + return this.controller.getJSONArrayModuleGameTotalTime(idModule); + } + + public String getJSONArrayGameGrid(int idGame){ + return this.controller.getJSONArrayGameGrid(idGame); + } + + public String getJSONArrayGameGridByUser(int idGame, int idUser) { + return this.controller.getJSONArrayGameGridByUser(idGame, idUser); + } + + public String getJSONArrayTagCloudForum(int idModule){ + return this.controller.getJSONArrayTagCloudForum(idModule); + } + + public String getJSONArrayPostsPerModule(int idModule){ + return this.controller.getJSONArrayPostsPerModule(idModule); + } + + public String getJSONArraySizeMessagePerModule(int idModule){ + return this.controller.getJSONArraySizeMessagePerModule(idModule); + } + + public String getJSONArrayPersonGameTimePerModule(int idPerson, int idModule){ + return this.controller.getJSONArrayPersonGameTimePerModule(idPerson, idModule); + } + + public String getJSONObjectTempoLevelPontuacao(int idGame) + { + return this.controller.getJSONObjectTempoLevelPontuacao(idGame); + } + + public String getJSONObjectTempoQuantidadePartidas(int idGame) + { + return this.controller.getJSONObjectTempoQuantidadePartidas(idGame); + } + + public String getJSONObjectQuantidadeTamanhoMSG(int idModule) + { + return this.controller.getJSONObjectQuantidadeTamanhoMSG(idModule); + } + + public String getJSONObjectLevelPontuacao(int idGame) + { + return this.controller.getJSONObjectLevelPontuacao(idGame); + } + + public String getJSONArrayGameMeta(int idGame){ + return this.controller.getJSONArrayGameMeta(idGame); + } + + public String getJSONArrayPersonTimeOnline(int idPerson){ + return this.controller.getJSONArrayPersonTimeOnline(idPerson); + } + + public String getJSONArrayForumVisualizacao(int idModule, int idAluno){ + return this.controller.getJSONArrayForumVisualizacao(idModule, idAluno); + } + public String getJSONArrayPostsPerUser(int idModule, int idUser){ + return this.controller.getJSONArrayPostsPerUser(idModule, idUser); + } + public String getJSONArrayMaterialView(int idUsuario, int idModule){ + return this.controller.getJSONArrayMaterialView(idUsuario, idModule); + } + public String getJSONArrayPollAnswered(int moduleID, int idAluno){ + return this.controller.getJSONArrayPollAnswered(moduleID, idAluno); + } + public String getJSONArrayGameOpen(int idModule, int idAluno){ + return this.controller.getJSONArrayGameOpen(idModule, idAluno); + } + + /** + * Método criado para persistir as mensagens enviadas, como primeira mensagem (não resposta a outra) + * Recebe como parâmetro a mensagem, o pessoa que enviou e a pessoa que vai receber a mensagem. + * @author Nailson Cunha + * @param message + * @param from + * @param to + */ + public MessengerMessage saveMessengerMessage(MessengerMessage message, Person from, + Person to) { + return this.controller.saveMessengerMessage(message, from, to); + } + + /** + * Método que retorna a lista de mensagens não ligas de uma determinada pessoa + * @author Nailson Cunha + * @param person A pessoa que solicita as mensagens não lidas. + * @return retorna a lista de mensagens ainda não lidas. + */ + public List getAllUnreadByPerson(Person person) { + return this.controller.getAllUnreadByPerson(person); + } + + public MessengerMessage getMessengerMessageById(int idMensagem) { + return this.controller.getMessengerMessageById(idMensagem); + } + + public MessengerMessage saveOnlyMessage(MessengerMessage message) { + return this.controller.saveOnlyMessage(message); + } + + public void deleteMessengerMessage(MessengerMessage message) { + this.controller.deleteMessengerMessage(message); + } + + public List getAllMessengerMessageByPerson(Person person) { + + return this.controller.getAllMessengerMessageByPerson(person); + } + + /** + * Método que retorna todas as Persons do banco de dados + * @return A lista de pessoas. + */ + public List getAllPersons() { + return this.controller.getAllPersons(); + } + + public int getPersonByTwitterLogin(String screenName) { + return this.controller.getPersonByTwitterLogin(screenName); + } + + public List getAllTweets() { + return this.controller.getAllTweets(); + } + + public List getTweetBetweenDates(Date inicio, Date fim) { + return this.controller.getTweetBetweenDates(inicio,fim); } } \ No newline at end of file diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/permissions/content_management/CoursePermissions.java b/src/br/ufpe/cin/amadeus/amadeus_web/permissions/content_management/CoursePermissions.java old mode 100644 new mode 100755 index 8c8439d..3aa87b4 --- a/src/br/ufpe/cin/amadeus/amadeus_web/permissions/content_management/CoursePermissions.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/permissions/content_management/CoursePermissions.java @@ -112,6 +112,25 @@ public class CoursePermissions { return userCanSendMailForCourseParticipants; } + + public static boolean userCanViewGraphic(HttpServletRequest request, Course course) { + boolean userCanViewGraphic = false; + + AccessInfo user = (AccessInfo) request.getSession().getAttribute("user"); + + Role userRoleInCourse; + + try { + userRoleInCourse = Facade.getInstance().getRoleByPersonInCourse(user.getPerson(), course); + if(userRoleInCourse != null) { + userCanViewGraphic = true; + } + } catch (Exception e) { + e.printStackTrace(); + } + + return userCanViewGraphic; + } } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/permissions/register/UserPermissions.java b/src/br/ufpe/cin/amadeus/amadeus_web/permissions/register/UserPermissions.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/permissions/settings/WebSettingsPermissions.java b/src/br/ufpe/cin/amadeus/amadeus_web/permissions/settings/WebSettingsPermissions.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/services/UserResource.java b/src/br/ufpe/cin/amadeus/amadeus_web/services/UserResource.java new file mode 100755 index 0000000..c9d91f1 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/services/UserResource.java @@ -0,0 +1,336 @@ +package br.ufpe.cin.amadeus.amadeus_web.services; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.ws.rs.FormParam; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.AmadeusDroidHistoric; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Forum; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Material; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Message; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.AccessInfo; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; +import br.ufpe.cin.amadeus.amadeus_web.facade.Facade; +import br.ufpe.cin.amadeus.amadeus_web.syncronize.Course; +import br.ufpe.cin.amadeus.amadeus_web.syncronize.PersonRoleCourse; +import br.ufpe.cin.amadeus.amadeus_web.syncronize.Service; + +@Path("/user") +public class UserResource{ + + @GET + @Path("/validate/{login}/{password}") + @Produces(MediaType.APPLICATION_JSON) + public List validateUser(@PathParam("login") String login, @PathParam("password") String password){ + + Service service = new Service(); + AccessInfo userInfo = new AccessInfo(); + userInfo.setLogin(login); + userInfo.setPassword(password); + + boolean test = Facade.getInstance().validateUser(userInfo); + if (test) { + service.setValidAccessInfo(true); + }else{ + service.setValidAccessInfo(false); + } + + List services = new ArrayList(); + services.add(service); + return services; + } + + @GET + @Path("/countcourses/{login}/{password}") + @Produces(MediaType.APPLICATION_JSON) + public List countCourses(@PathParam("login") String login, @PathParam("password") String password){ + Service service = new Service(); + AccessInfo userInfo = new AccessInfo(); + userInfo.setLogin(login); + userInfo.setPassword(password); + + List listCourses = Facade.getInstance().getCoursesByUserSyncronize(userInfo); + service.setCountCourses(listCourses.size()); + + List services = new ArrayList(); + services.add(service); + return services; + } + + @GET + @Path("/service/{login}/{password}") + @Produces(MediaType.APPLICATION_JSON) + public List getCoursesByUser(@PathParam("login") String login, @PathParam("password") String password){ + + Service service = new Service(); + AccessInfo userInfo = new AccessInfo(); + userInfo.setLogin(login); + userInfo.setPassword(password); + + List listCourses = Facade.getInstance().getCoursesByUserSyncronize(userInfo); + List prcList = Facade.getInstance().getStudentByUser(userInfo); + + List services = new ArrayList(); + service.setListCourses(listCourses); + service.setListPersons(prcList); + services.add(service); + + + return services; + } + + @GET + @Path("/material/{id}") + @Produces("application/pdf") + public Response getMaterial(@PathParam("id") String material_id) { + + Material material = Facade.getInstance().findMaterialByID(Integer.parseInt(material_id)); + + byte[] pdfContent = material.getArchive().getArchive(); + + return Response.ok().entity(pdfContent).header("Content-Disposition","attachment; filename="+ material.getExtension()).build(); + + } + + @GET + @Path("/material/sound/mp3/{id}") + @Produces("audio/mpeg") + public Response getMaterialSoundMp3(@PathParam("id") String material_id) { + + Material material = Facade.getInstance().findMaterialByID(Integer.parseInt(material_id)); + + byte[] mp3Content = material.getArchive().getArchive(); + + return Response.ok().entity(mp3Content).header("Content-Disposition","attachment; filename="+ material.getExtension()).build(); + + } + + @GET + @Path("/material/sound/wav/{id}") + @Produces("audio/vnd.wave") + public Response getMaterialSoundWav(@PathParam("id") String material_id) { + + Material material = Facade.getInstance().findMaterialByID(Integer.parseInt(material_id)); + + byte[] wavContent = material.getArchive().getArchive(); + + return Response.ok().entity(wavContent).header("Content-Disposition","attachment; filename="+ material.getExtension()).build(); + + } + + @GET + @Path("/material/ppt/{id}") + @Produces("application/vnd.ms-powerpoint") + public Response getMaterialPPT(@PathParam("id") String material_id){ + + Material material = Facade.getInstance().findMaterialByID(Integer.parseInt(material_id)); + + byte[] materialPPT = material.getArchive().getArchive(); + + return Response.ok().entity(materialPPT).header("Content-Disposition","attachment; filename="+ material.getExtension()).build(); + } + + @GET + @Path("/material/pptx/{id}") + @Produces("application/vnd.openxmlformats-officedocument.presentationml.presentation") + public Response getMaterialPPTX(@PathParam("id") String material_id){ + + Material material = Facade.getInstance().findMaterialByID(Integer.parseInt(material_id)); + + byte[] materialPPTX = material.getArchive().getArchive(); + + return Response.ok().entity(materialPPTX).header("Content-Disposition","attachment; filename="+ material.getExtension()).build(); + } + + @GET + @Path("/material/ppsx/{id}") + @Produces("application/vnd.openxmlformats-officedocument.presentationml.slideshow") + public Response getMaterialPPSX(@PathParam("id") String material_id){ + + Material material = Facade.getInstance().findMaterialByID(Integer.parseInt(material_id)); + + byte[] materialPPSX = material.getArchive().getArchive(); + + return Response.ok().entity(materialPPSX).header("Content-Disposition","attachment; filename="+ material.getExtension()).build(); + } + + @GET + @Path("/material/doc/{id}") + @Produces("application/msword") + public Response getMaterialDOC(@PathParam("id") String material_id){ + + Material material = Facade.getInstance().findMaterialByID(Integer.parseInt(material_id)); + + byte[] materialDOC = material.getArchive().getArchive(); + + return Response.ok().entity(materialDOC).header("Content-Disposition","attachment; filename="+ material.getExtension()).build(); + } + + @GET + @Path("/material/docx/{id}") + @Produces("application/vnd.openxmlformats-officedocument.wordprocessingml.document") + public Response getMaterialDOCX(@PathParam("id") String material_id){ + + Material material = Facade.getInstance().findMaterialByID(Integer.parseInt(material_id)); + + byte[] materialDOCX = material.getArchive().getArchive(); + + return Response.ok().entity(materialDOCX).header("Content-Disposition","attachment; filename="+ material.getExtension()).build(); + } + + @GET + @Path("/material/jpg/{id}") + @Produces("image/jpeg") + public Response getMaterialJPG(@PathParam("id") String material_id){ + + Material material = Facade.getInstance().findMaterialByID(Integer.parseInt(material_id)); + + byte[] materialJPG = material.getArchive().getArchive(); + + return Response.ok().entity(materialJPG).header("Content-Disposition","attachment; filename="+ material.getExtension()).build(); + } + + @GET + @Path("/material/png/{id}") + @Produces("image/png") + public Response getMaterialPNG(@PathParam("id") String material_id){ + + Material material = Facade.getInstance().findMaterialByID(Integer.parseInt(material_id)); + + byte[] materialPNG = material.getArchive().getArchive(); + + return Response.ok().entity(materialPNG).header("Content-Disposition","attachment; filename="+ material.getExtension()).build(); + } + + @GET + @Path("/photo/{login}") + @Produces("image/png") + public Response getPhoto(@PathParam("login") String login) { + + Person person = Facade.getInstance().getPersonByLogin(login); + + byte[] photoContent = null; + + try { + photoContent = person.getImage().getPhoto(); + } catch (Exception e) { + + } + + return Response.ok().entity(photoContent).header("Content-Disposition","attachment; filename=image_user.png").build(); + + } + + @POST + @Path("/socialHistory") + @Produces(MediaType.APPLICATION_JSON) + public List insertSocialHistory(@FormParam("course_name") String course_name, + @FormParam("user_name") String user_name, @FormParam("action_value") String actionValue, + @FormParam("resource_name") String resource_name, @FormParam("creation_date") String creationDate){ + + + AmadeusDroidHistoric historic = new AmadeusDroidHistoric(); + historic.setId(0); + historic.setCourseName(course_name); + historic.setUserName(user_name); + historic.setResourceName(resource_name); + historic.setActionValue(actionValue); + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); + Date data = null; + try { + data = dateFormat.parse(creationDate); + } catch (ParseException e) { + e.printStackTrace(); + } + historic.setCreationDate(data); + + Service service = new Service(); + List services = new ArrayList(); + + List listHistoric = new ArrayList(); + AmadeusDroidHistoric result = Facade.getInstance().insertSocialHistory(historic); + listHistoric.add(result); + service.setListHistoric(listHistoric); + + return services; + } + + @POST + @Path("/message") + @Produces(MediaType.APPLICATION_JSON) + public List saveForumMessage(@FormParam("body") String body, + @FormParam("person") String person_id, + @FormParam("forum") String forum_id){ + + Service service = new Service(); + List services = new ArrayList(); + + Message message = new Message(); + message.setBody(body); + message.setDate(new Date()); + Person author = new Person(); + author.setId(Integer.parseInt(person_id)); + message.setAuthor(author); + + Forum forum = Facade.getInstance().getForumById(Integer.parseInt(forum_id)); + message.setForum(forum); + + forum.getMessages().add(message); + Facade.getInstance().updateForum(forum); + br.ufpe.cin.amadeus.amadeus_web.syncronize.Message msg = Facade.getInstance().getLastMessage(); + service.setMessage(msg); + services.add(service); + + return services; + } + + @GET + @Path("/history") + @Produces(MediaType.APPLICATION_JSON) + public List getListSocialHistory(){ + List retrn = new ArrayList(); + Service service = new Service(); + List services = new ArrayList(); + + List result = Facade.getInstance().getSocialHistory(); + for (AmadeusDroidHistoric obj : result) { + Person p = Facade.getInstance().getPersonByUserName(obj.getUserName()); + obj.setUserLogin(p.getAccessInfo().getLogin()); + retrn.add(obj); + } + service.setListHistoric(retrn); + services.add(service); + + return services; + } + + @GET + @Path("/forumMessages") + @Produces(MediaType.APPLICATION_JSON) + public List getForumMessagesList(){ + Service service = new Service(); + List services = new ArrayList(); + + List listForum = Facade.getInstance().getListForumSyncronize(); + service.setListForum(listForum); + services.add(service); + + return services; + } + +} + + + + diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/CourseActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/CourseActions.java old mode 100644 new mode 100755 index ac00791..ce91a3a --- a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/CourseActions.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/CourseActions.java @@ -13,12 +13,12 @@ Voc� deve ter recebido uma c�pia da Licen�a P�blica Geral GNU, sob o t package br.ufpe.cin.amadeus.amadeus_web.struts.action; +import java.io.File; +import java.io.FileInputStream; import java.io.IOException; -import java.text.DateFormat; -import java.text.ParseException; -import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; +import java.util.Collection; import java.util.Date; import java.util.GregorianCalendar; import java.util.HashMap; @@ -27,12 +27,15 @@ import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.Vector; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.poi.hssf.record.formula.functions.Evaluate; +import org.apache.commons.collections.MultiHashMap; +import org.apache.commons.collections.MultiMap; +import org.apache.commons.collections.map.MultiValueMap; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; @@ -50,6 +53,7 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.LearningObject; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Material; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.MaterialRequest; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Module; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.PersonForum; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.PersonRoleCourse; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Poll; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.ProfileType; @@ -59,18 +63,20 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.VideoIriz; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.Alternative; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.Evaluation; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.Question; -import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.QuestionAlternativable; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.QuestionAssociation; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.QuestionDiscursive; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.QuestionGap; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.QuestionMultiple; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.QuestionTrueFalse; import br.ufpe.cin.amadeus.amadeus_web.domain.register.AccessInfo; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.MessengerMessage; import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; import br.ufpe.cin.amadeus.amadeus_web.exception.CourseInvalidException; import br.ufpe.cin.amadeus.amadeus_web.facade.Facade; import br.ufpe.cin.amadeus.amadeus_web.permissions.content_management.CoursePermissions; import br.ufpe.cin.amadeus.amadeus_web.util.DateValidator; +import br.ufpe.cin.amadeus.amadeus_web.util.SocialInteractionMethods; +import br.ufpe.cin.amadeus.amadeus_web.util.SocialInteractions; public class CourseActions extends SystemActions { @@ -81,13 +87,16 @@ public class CourseActions extends SystemActions { private final String FORWARD_SHOW_VIEW_CHANGE_TEACHER = "fShowViewChangeTeacher"; private final String FORWARD_SHOW_VIEW_COURSE_NOT_LOGGED = "fShowViewCourseNotLogged"; private final String FORWARD_SHOW_VIEW_COURSE_PARTICIPANTS = "fShowViewCourseParticipants"; - private final String FORWARD_SHOW_VIEW_SHOW_MODULES = "fShowViewShowModules"; + private final String FORWARD_SHOW_VIEW_SHOW_MODULES = "fShowViewShowModules"; private final String FORWARD_SHOW_VIEW_EDIT_COURSE = "fShowViewEditCourse"; private final String FORWARD_SHOW_VIEW_COURSE_EVALUATIONS = "fShowViewCourseEvaluations"; private final String FORWARD_SHOW_VIEW_SEND_MAIL = "fShowViewSendMail"; private final String FORWARD_SHOW_VIEW_NEW_EXTERNAL_LINK = "fshowViewNewExternalLink"; private final String FORWARD_SHOW_VIEW_REPLICATE_COURSE = "fReplicateCourseStepOne"; - + private final String FORWARD_SHOW_VIEW_GRAPHIC = "fShowViewGraphic"; + private final String FORWARD_SHOW_VIEW_SOCIAL_INTERACTION_MONITORING = "fShowViewSocialInteractionMonitoring"; + private final String FORWARD_SHOW_VIEW_SOCIAL_INTERACTION_MONITORING_REPORTS = "fShowViewSocialInteractionMonitoringReports"; + @Override protected Map getKeyMethodMap() { Map map = new HashMap(); @@ -99,6 +108,7 @@ public class CourseActions extends SystemActions { map.put("course.viewChangeTeacher", "viewChangeTeacher"); map.put("general.register", "insertCourseStepTwo"); map.put("general.update", "editCourse"); + map.put("general.generatepdfreport", "socialInteractionMonitoring"); map.put("general.cancel", "cancelEdition"); map.put("viewCourse.registration", "viewCourse"); map.put("course.delete", "deleteCourse"); @@ -111,11 +121,16 @@ public class CourseActions extends SystemActions { map.put("course.showViewCourse", "showViewCourse"); map.put("course.showViewCourseNotLogged", "showViewCourseNotLogged"); map.put("course.showViewEditCourse", "showViewEditCourse"); + map.put("course.showViewSocialInteractionMonitoring", "showViewSocialInteractionMonitoring"); + map.put("course.showViewSocialInteractionMonitoringReports", "showViewSocialInteractionMonitoringReports"); + map.put("course.showViewEditCourse", "showViewEditCourse"); map.put("course.showViewShowModules", "showViewShowModules"); map.put("course.showViewCourseEvaluations", "showViewCourseEvaluations"); + map.put("course.showViewGraphic", "showViewGraphic"); map.put("course.showViewSendMail", "showViewSendMail"); map.put("course.sendMailForCourseParticipants", "sendMailForCourseParticipants"); - map.put("course.changeTeacher", "changeTeacher"); + map.put("course.changeTeacher", "changeTeacher"); + map.put("course.viewChangeTeacher", "viewChangeTeacher"); map.put("course.sendMailForCourseParticipants", "sendMailForCourseParticipants"); return map; @@ -598,7 +613,7 @@ public class CourseActions extends SystemActions { isOwner = true; } if(isOwner){ - ArrayList teacherList = (ArrayList) facade.searchUsers("", 2, 0); + ArrayList teacherList = (ArrayList) facade.searchUsersByType(2); System.out.println("########: " + teacherList.get(0).getLogin()); request.setAttribute("teacherList", teacherList); request.setAttribute("courseId", courseId); @@ -680,7 +695,7 @@ public class CourseActions extends SystemActions { throws Exception { DynaActionForm dyna = (DynaActionForm) form; String courseName = dyna.getString("courseName").trim(); - + System.out.println("LALA"); List[] results = null; if (!courseName.equals("") && courseName != null) { results = facade.getCoursesByRule(courseName); @@ -862,6 +877,141 @@ public class CourseActions extends SystemActions { return null; } + + public ActionForward socialInteractionMonitoring(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) + throws Exception { + MultiMap interactions = new MultiValueMap(); + SocialInteractionMethods sim = new SocialInteractionMethods(); + DynaActionForm myForm = (DynaActionForm) form; + ActionMessages messages = new ActionMessages(); + + String initialMonitoringDay = (String) myForm.get("initialMonitoringDay"); + String initialMonitoringMonth = (String) myForm.get("initialMonitoringMonth"); + String initialMonitoringYear = (String) myForm.get("initialMonitoringYear"); + String finalMonitoringDay = (String) myForm.get("finalMonitoringDay"); + String finalMonitoringMonth = (String) myForm.get("finalMonitoringMonth"); + String finalMonitoringYear = (String) myForm.get("finalMonitoringYear"); + + DateValidator im = new DateValidator(messages, initialMonitoringDay, initialMonitoringMonth, initialMonitoringYear, true); + DateValidator fm = new DateValidator(messages, finalMonitoringDay, finalMonitoringMonth, finalMonitoringYear, true); + + //Pegando o valor do curso + int id = Integer.valueOf(request.getParameter("id")); + Course c = facade.getCoursesById(id); + + //Pegando valor do combobox + int method = Integer.parseInt((String)myForm.get("socialMethod")); + + + //Preenchendo o list com os participantes + ArrayList ar = new ArrayList(); + + for(Person p: facade.listStudentsByCourse(c)){ + ar.add(p.getName()); + } + + //Pegando os valores do checkbox e concatenando o MultiMap + String twitter = request.getParameter("twitter"); + System.out.println(twitter); + String forum = request.getParameter("forum"); + System.out.println(forum); + String message = request.getParameter("message"); + System.out.println(message); + String chat = request.getParameter("chat"); + System.out.println(chat); + + if(forum != null){ + MultiMap interactionsForum = SocialInteractions.getSocialInteractionsFromForumsByCourseAndData(c, im.getDate(), fm.getDate()); + interactions.putAll(interactionsForum); + + } + + if(twitter != null){ + MultiMap interactionsTwitter = SocialInteractions.getSocialInteractionsFromTwitterTool(im.getDate(), fm.getDate()); + interactions.putAll(interactionsTwitter); + + } + + if(message != null){ + MultiMap interactionsMessenger = SocialInteractions.getSocialInteractionsFromMessenger(c, im.getDate(), fm.getDate()); + interactions.putAll(interactionsMessenger); + + } + + //interactions = SocialInteractions.getSocialInteractionsFromForumsByCourseAndData(c, im.getDate(), fm.getDate()); + + String nomearquivo = "c:/" + Math.random() + ".pdf"; + + switch (method){ + case 0: response.sendRedirect("course.do?method=showViewCourse&courseId="+c.getId()); + break; + case 1: SocialInteractions.generateReport(sim.cohesionGroup(ar, interactions), nomearquivo); + break; + case 2: SocialInteractions.generateReport(sim.heterogeneityGroup(ar, interactions), nomearquivo); + break; + case 3: SocialInteractions.generateReport(sim.visibilityPerStudent(ar, interactions), nomearquivo); + break; + case 4: SocialInteractions.generateReport(sim.isolationPerStudent(ar, interactions), nomearquivo); + break; + case 5: SocialInteractions.generateReport(sim.engagementPerStudent(ar, interactions), nomearquivo); + break; + case 6: SocialInteractions.generateReport(sim.informationIntermediationPerStudent(ar, interactions), nomearquivo); + break; + case 7: SocialInteractions.generateReport(sim.prestigePerStudent(ar, interactions), nomearquivo); + break; + } + + + + //return an application file instead of html page + response.setContentType("application/octet-stream"); + response.setHeader("Content-Disposition","attachment;filename=Relatorio.pdf"); + + try + { + //Get it from file system + FileInputStream in = + new FileInputStream(new File(nomearquivo)); + + ServletOutputStream out = response.getOutputStream(); + + byte[] outputByte = new byte[4096]; + //copy binary content to output stream + while(in.read(outputByte, 0, 4096) != -1){ + out.write(outputByte, 0, 4096); + } + in.close(); + out.flush(); + out.close(); + + }catch(Exception e){ + e.printStackTrace(); + } + //response.setContentType("text/html"); + //response.setHeader("",""); + //response.sendRedirect("course.do?method=showViewCourse&courseId="+c.getId()); + //response.sendRedirect("/Users/dvpereira/Documents/workspace/amadeuslms/WebContent/reports/PDF_LinhaCodigo.pdf"); + + return null; + } + + public ActionForward socialInteractionMonitoringReports(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) + throws Exception { + + + + DynaActionForm myForm = (DynaActionForm) form; + ActionMessages messages = new ActionMessages(); + int id = (Integer) myForm.get("id"); + + Course c = facade.getCoursesById(id); + + response.sendRedirect("course.do?method=showViewCourse&courseId="+c.getId()); + + return null; + } public ActionForward cancelEdition(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) @@ -1018,6 +1168,8 @@ public class CourseActions extends SystemActions { Course course = facade.getCoursesById(courseId); List teachers = facade.getTeachersByCourse(course); List assistants = facade.listAssistantsByCourse(course); + List participants = facade.listStudentsByCourse(course); //added by Nailson + List messagesUnread = facade.getAllUnreadByPerson(facade.getPersonByLogin(user.getLogin())); //added by Nailson int studentsNumber = facade.getNumberOfStudentsInCourse(course); course.setNumberOfStudentsInCourse(studentsNumber); @@ -1025,19 +1177,26 @@ public class CourseActions extends SystemActions { Set keywords = course.getKeywords(); boolean canRegisterUser = false; + boolean canMonitorSocialInteractions = false; if (facade.canRegisterUser(user, course)) { canRegisterUser = true; } + if(course.getProfessor().equals(user.getPerson())){ + canMonitorSocialInteractions = true; + } Role userRoleInCourse = Facade.getInstance().getRoleByPersonInCourse(user.getPerson(), course); SystemActions.setMenuPermissionsForUserInRequest(request, course); request.setAttribute("userRoleInCourse", ( userRoleInCourse != null) ? userRoleInCourse.getRoleType() : null ); request.setAttribute("canRegisterUser", canRegisterUser); + request.setAttribute("canMonitorSocialInteractions", canMonitorSocialInteractions); request.setAttribute("course", course); request.setAttribute("teachers", teachers); request.setAttribute("assistants", assistants); + request.setAttribute("participants", participants); //added by Nailson + request.setAttribute("messagesUnread", messagesUnread); //added by Nailson request.setAttribute("keywords", keywords); forward = mapping.findForward(FORWARD_SHOW_VIEW_COURSE); @@ -1089,6 +1248,7 @@ public class CourseActions extends SystemActions { List participants = facade.listStudentsByCourse(course); List teachers = facade.listTeachersByCourse(course); List assistants = facade.listAssistantsByCourse(course); + List messagesUnread = facade.getAllUnreadByPerson(facade.getPersonByLogin(user.getLogin())); //added by Nailson SystemActions.setMenuPermissionsForUserInRequest(request, course); @@ -1097,6 +1257,7 @@ public class CourseActions extends SystemActions { request.setAttribute("teachers", teachers); request.setAttribute("assistants", assistants); request.setAttribute("userRoleInCourse", userRoleInCourse); + request.setAttribute("messagesUnread", messagesUnread); //added by Nailson forward = mapping.findForward(FORWARD_SHOW_VIEW_COURSE_PARTICIPANTS); } else { @@ -1126,15 +1287,15 @@ public class CourseActions extends SystemActions { //System.out.println("########: " + teacherList.get(0).getLogin()); Set keywords = course.getKeywords(); - Iterator ikeywords = keywords.iterator(); + Iterator ikeywords = keywords.iterator(); String keywordsStr = ""; int counter = 1; while(ikeywords.hasNext()){ if(counter < keywords.size()){ - keywordsStr = keywordsStr + ((Keyword)ikeywords.next()).getName() + ", "; + keywordsStr = keywordsStr + ikeywords.next().getName() + ", "; counter++; } else { - keywordsStr = keywordsStr + ((Keyword)ikeywords.next()).getName(); + keywordsStr = keywordsStr + ikeywords.next().getName(); } } @@ -1181,6 +1342,79 @@ public class CourseActions extends SystemActions { return forward; } + public ActionForward showViewSocialInteractionMonitoring(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) throws Exception { + + ActionForward forward = null; + + if(SystemActions.isLoggedUser(request)) { + String courseIdStr = request.getParameter("courseId"); + + if(courseIdStr == null){ + courseIdStr = request.getParameter("id"); + } + + int courseId = Integer.parseInt(courseIdStr); + + Course course = facade.getCoursesById(courseId); + + AccessInfo loggedUser = (AccessInfo) request.getSession().getAttribute("user"); + loggedUser = facade.searchUserById(loggedUser.getId()); + boolean canMonitorSocialInteractions = false; + + if(!facade.isStudent(loggedUser.getPerson(), course)){ + canMonitorSocialInteractions = true; + } + + request.setAttribute("canMonitorSocialInteractions", canMonitorSocialInteractions); + + request.setAttribute("course", course); + + forward = mapping.findForward(FORWARD_SHOW_VIEW_SOCIAL_INTERACTION_MONITORING); + } else { + forward = new SystemActions().showViewWelcome(mapping, form, request, response); + } + + return forward; + } + + public ActionForward showViewSocialInteractionMonitoringReports(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) throws Exception { + + ActionForward forward = null; + + if(SystemActions.isLoggedUser(request)) { + String courseIdStr = request.getParameter("courseId"); + + if(courseIdStr == null){ + courseIdStr = request.getParameter("id"); + } + + int courseId = Integer.parseInt(courseIdStr); + + Course course = facade.getCoursesById(courseId); + + AccessInfo loggedUser = (AccessInfo) request.getSession().getAttribute("user"); + loggedUser = facade.searchUserById(loggedUser.getId()); + + boolean canMonitorSocialInteractions = false; + + if(!facade.isStudent(loggedUser.getPerson(), course)){ + canMonitorSocialInteractions = true; + } + + request.setAttribute("canMonitorSocialInteractions", canMonitorSocialInteractions); + + request.setAttribute("course", course); + + forward = mapping.findForward(FORWARD_SHOW_VIEW_SOCIAL_INTERACTION_MONITORING_REPORTS); + } else { + forward = new SystemActions().showViewWelcome(mapping, form, request, response); + } + + return forward; + } + public ActionForward showViewShowModules(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { @@ -1199,14 +1433,25 @@ public class CourseActions extends SystemActions { List modules = course.getModules(); + List forunsperson = user.getPerson().getForuns(); + List assistances = facade.getAssistanceInCourse(course); + List teachers = facade.getTeachersByCourse(course); //added by Nailson + List participants = facade.listStudentsByCourse(course); //added by Nailson + List messagesUnread = facade.getAllUnreadByPerson(facade.getPersonByLogin(user.getLogin())); //added by Nailson SystemActions.setMenuPermissionsForUserInRequest(request, course); request.setAttribute("userRoleInCourse", ( userRoleInCourse != null) ? userRoleInCourse.getRoleType() : null ); request.setAttribute("course", course); request.setAttribute("modules", modules); + request.setAttribute("forunsperson",forunsperson); request.setAttribute("assistants", assistances); + request.setAttribute("teachers", teachers); //added by Nailson + request.setAttribute("participants", participants); //added by Nailson + request.setAttribute("messagesUnread", messagesUnread); //added by Nailson + + forward = mapping.findForward(FORWARD_SHOW_VIEW_SHOW_MODULES); } else { forward = SystemActions.showViewAccessDenied(mapping, form, request, response); @@ -1300,4 +1545,328 @@ public class CourseActions extends SystemActions { return forward; } + + public ActionForward showViewGraphic(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) throws Exception { + + ActionForward forward = null; + + if(SystemActions.isLoggedUser(request)) { + + int courseId = Integer.parseInt(request.getParameter("courseId")); + Course course = facade.getCoursesById(courseId); + + + if(CoursePermissions.userCanViewGraphic(request, course)) { + SystemActions.setMenuPermissionsForUserInRequest(request, course); + + String graphic = request.getParameter("graphic"); + Integer moduleSel = Integer.parseInt(request.getParameter("moduleSel")); + Integer idAluno = Integer.parseInt(request.getParameter("idAluno")); + Integer idGame = Integer.parseInt(request.getParameter("idGame")); + Integer idForum;// = Integer.parseInt(request.getParameter("idForum")); + + request.setAttribute("course", course); + request.setAttribute("graphic", graphic); + request.setAttribute("moduleSel", moduleSel); + request.setAttribute("idAluno", idAluno); + request.setAttribute("idGame", idGame); + //request.setAttribute("idForum", idForum); + + if(graphic.equals("g1")) + { + request.setAttribute("modules", course.getModules()); + + if(moduleSel!=-1) + { + String data = facade.getJSONArrayModuleGameTotalTime(moduleSel); + request.setAttribute("xml", data); + } + } + else if(graphic.equals("g2")) + { + request.setAttribute("modules", course.getModules()); + + if(moduleSel!=-1) + { + String data = facade.getJSONArrayModuleGameTimePerDay(moduleSel); + request.setAttribute("xml", data); + } + } + else if(graphic.equals("g3")) + { + request.setAttribute("modules", course.getModules()); + + if(moduleSel!=-1) + { + String data = facade.getJSONArrayTagCloudForum(moduleSel); + request.setAttribute("xml", data); + } + } + else if(graphic.equals("g4")) + { + request.setAttribute("modules", course.getModules()); + + if(moduleSel!=-1) + { + String data = facade.getJSONArrayPostsPerModule(moduleSel); + request.setAttribute("xml", data); + } + } + else if(graphic.equals("g5")) + { + request.setAttribute("modules", course.getModules()); + + if(moduleSel!=-1) + { + String data = facade.getJSONArraySizeMessagePerModule(moduleSel); + request.setAttribute("xml", data); + } + } + else if(graphic.equals("g6")) + { + request.setAttribute("modules", course.getModules()); + + + if(moduleSel!=-1) + { + List participants = facade.listStudentsByCourse(course); + request.setAttribute("alunos", participants); + + if(idAluno!=-1) + { + String data = facade.getJSONArrayPersonGameTimePerModule(idAluno, moduleSel); + // String data = "[{\"Aluno\":\"GameTest\",\"Tempo\":18}]"; + request.setAttribute("xml", data); + } + + } + } + //Código dos Gráficos de Danilo Começa aqui + //Tempo de permanência no sistema - Diferença entre os horários de login e logout. + else if(graphic.equals("g7")) + { + request.setAttribute("modules", course.getModules()); + + + if(moduleSel!=-1) + { + List participants = facade.listStudentsByCourse(course); + request.setAttribute("alunos", participants); + + if(idAluno!=-1) + { + String data = facade.getJSONArrayPersonGameTimePerModule(idAluno, moduleSel); + request.setAttribute("xml", data); + } + + } + } + //Quantidade de visualizações dos fóruns - Número de vezes que o usuário abriu um fórum de determinado módulo. + else if(graphic.equals("g8")) + { + request.setAttribute("modules", course.getModules()); + + if(moduleSel!=-1) + { + List participants = facade.listStudentsByCourse(course); + request.setAttribute("alunos", participants); + + if(idAluno!=-1) + { + String data = facade.getJSONArrayForumVisualizacao(moduleSel, idAluno); + request.setAttribute("xml", data); + } + } + + } + //Quantidade de posts em um fórum - Número de vezes que o usuário respondeu ao fórum. + else if(graphic.equals("g9")) + { + request.setAttribute("modules", course.getModules()); + + + if(moduleSel!=-1) + { + List participants = facade.listStudentsByCourse(course); + request.setAttribute("alunos", participants); + + if(idAluno!=-1) + { + String data = facade.getJSONArrayPostsPerUser(moduleSel, idAluno); + request.setAttribute("xml", data); + } + } + } + //Quantidade de acessos à materiais - Número de vezes que o usuário abriu um material presente no módulo. + else if(graphic.equals("g10")) + { + request.setAttribute("modules", course.getModules()); + + if(moduleSel!=-1) + { + List participants = facade.listStudentsByCourse(course); + request.setAttribute("alunos", participants); + + if(idAluno!=-1) + { + String data = facade.getJSONArrayMaterialView(idAluno, moduleSel); + request.setAttribute("xml", data); + } + + } + } + //Quantidade de enquetes respondidas - Número de repostas a enquetes de um módulo feitas pelo usuário. + else if(graphic.equals("g11")) + { + request.setAttribute("modules", course.getModules()); + + + if(moduleSel!=-1) + { + List participants = facade.listStudentsByCourse(course); + request.setAttribute("alunos", participants); + + if(idAluno!=-1) + { + String data = facade.getJSONArrayPollAnswered(moduleSel, idAluno); + request.setAttribute("xml", data); + } + + } + } + //Quantidade de acesso aos jogos - Número de vezes que o usuário abriu um jogo do módulo. + else if(graphic.equals("g12")) + { + request.setAttribute("modules", course.getModules()); + + if(moduleSel!=-1) + { + List participants = facade.listStudentsByCourse(course); + request.setAttribute("alunos", participants); + + if(idAluno!=-1) + { + String data = facade.getJSONArrayGameOpen(moduleSel, idAluno); + request.setAttribute("xml", data); + } + + } + } + else if(graphic.equals("g13")) + { + request.setAttribute("modules", course.getModules()); + + if(moduleSel!=-1) + { + String data = facade.getJSONObjectQuantidadeTamanhoMSG(moduleSel); + request.setAttribute("xml", data); + } + } + //Graficos do jogo + //Pontuação + else if(graphic.equals("g14")||graphic.equals("g15")) + { + request.setAttribute("modules", course.getModules()); + + if(moduleSel!=-1) + { + Module module = facade.getModuleById(moduleSel.intValue()); + request.setAttribute("games", module.getGames()); + + if(idGame!=-1) + { + String data = facade.getJSONArrayGameScore(idGame); + request.setAttribute("xml", data); + } + + } + } + //Level + else if(graphic.equals("g16")||graphic.equals("g17")) + { + request.setAttribute("modules", course.getModules()); + + if(moduleSel!=-1) + { + Module module = facade.getModuleById(moduleSel.intValue()); + request.setAttribute("games", module.getGames()); + + if(idGame!=-1) + { + String data = facade.getJSONArrayGameLevel(idGame); + request.setAttribute("xml", data); + } + + } + } + //tempo X level X pontuacao + else if(graphic.equals("g18")) + { + request.setAttribute("modules", course.getModules()); + + if(moduleSel!=-1) + { + Module module = facade.getModuleById(moduleSel.intValue()); + request.setAttribute("games", module.getGames()); + + if(idGame!=-1) + { + String data = facade.getJSONObjectTempoLevelPontuacao(idGame); + request.setAttribute("xml", data); + } + + } + } + // tempo X quantidade de partidas + else if(graphic.equals("g19")) + { + request.setAttribute("modules", course.getModules()); + + if(moduleSel!=-1) + { + Module module = facade.getModuleById(moduleSel.intValue()); + request.setAttribute("games", module.getGames()); + + if(idGame!=-1) + { + String data = facade.getJSONObjectTempoQuantidadePartidas(idGame); + request.setAttribute("xml", data); + } + + } + } + //level X pontuacao + else if(graphic.equals("g20")) + { + request.setAttribute("modules", course.getModules()); + + if(moduleSel!=-1) + { + Module module = facade.getModuleById(moduleSel.intValue()); + request.setAttribute("games", module.getGames()); + + if(idGame!=-1) + { + String data = facade.getJSONObjectLevelPontuacao(idGame); + request.setAttribute("xml", data); + } + + } + + } + + request.setAttribute("domain", SystemActions.webSettings.getSystemGeneralDomain()); + forward = mapping.findForward(FORWARD_SHOW_VIEW_GRAPHIC); + } else { + forward = SystemActions.showViewAccessDenied(mapping, form, request, response); + } + } else { + forward = this.showViewWelcome(mapping, form, request, response); + } + + return forward; + + } + } \ No newline at end of file diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/LogActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/LogActions.java new file mode 100755 index 0000000..5c1a1b6 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/LogActions.java @@ -0,0 +1,94 @@ +/** + * + */ +package br.ufpe.cin.amadeus.amadeus_web.struts.action; + +import java.util.HashMap; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.DynaActionForm; +import org.apache.tools.ant.types.CommandlineJava.SysProperties; + +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Log; + +/** + * @author Pedro + * + */ +public class LogActions extends SystemActions { + + @Override + protected Map getKeyMethodMap() { + Map map = new HashMap(); + + //System.out.println("mapeamento solicitado"); + map.put("log.saveLog", "saveLog"); + map.put("log.saveLogViewMaterial", "saveLogViewMaterial"); + map.put("log.saveLogViewVideo", "saveLogViewVideo"); + + return map; + } + + public ActionForward saveLog(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) + { + //System.out.println("metodo para salvar o log chamado."); + if(SystemActions.isLoggedUser(request)) { + + //TODO - LOG - Partida em Jogo - OK + Log log = SystemActions.getLogUser(request); + log.setCodigo(Log.LOG_CODIGO_JOGAR); + + DynaActionForm myForm = (DynaActionForm) form; + + log.setIdObjeto((Integer)myForm.get("jogo")); + log.setFases((Integer)myForm.get("fases")); + log.setTempo((Integer)myForm.get("tempo")); + log.setPontuacao((Integer)myForm.get("pontuacao")); + log.setMetaAlternativa((Integer)myForm.get("metaAlternativa")); + + facade.saveLog(log); + } + + return mapping.findForward("fcloseWindow"); + } + + public ActionForward saveLogViewMaterial(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) + { + DynaActionForm myForm = (DynaActionForm) form; + + //TODO - LOG - Visualizacao de Material - OK + Log log = SystemActions.getLogUser(request); + log.setCodigo(Log.LOG_CODIGO_VISUALIZACAO_MATERIAL); + log.setIdObjeto((Integer)myForm.get("idMaterial")); + facade.saveLog(log); + + System.out.println("LOG - saveLogViewMaterial - external link"); + + return null; + } + + public ActionForward saveLogViewVideo(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) + { + DynaActionForm myForm = (DynaActionForm) form; + + //TODO - LOG - Visualizacao de Video - OK + Log log = SystemActions.getLogUser(request); + log.setCodigo(Log.LOG_CODIGO_VISUALIZACAO_VIDEO); + log.setIdObjeto((Integer)myForm.get("idMaterial")); + facade.saveLog(log); + + return null; + } +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/MessengerActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/MessengerActions.java new file mode 100755 index 0000000..415990e --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/MessengerActions.java @@ -0,0 +1,436 @@ +package br.ufpe.cin.amadeus.amadeus_web.struts.action; + +import java.io.PrintWriter; +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; + +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Role; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.AccessInfo; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.MessengerMessage; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; +import br.ufpe.cin.amadeus.amadeus_web.facade.Facade; +import br.ufpe.cin.amadeus.amadeus_web.util.MessengerMessageMirror; + +import com.google.gson.Gson; +import com.google.gson.reflect.TypeToken; + +/** + * Classe quem centraliza todas as ações referentes as mensagens vindas do + * sistema de mensagem assíncrono. + * + * @author Nailson Cunha + * + */ +public class MessengerActions extends SystemActions { + + private final String FORWARD_SHOW_VIEW_ALL_MESSENGER_MESSAGES = "fshowViewAllMessengerMessages"; + + @Override + protected Map getKeyMethodMap() { + Map map = new HashMap(); + + map.put("messenger.saveMessage", "saveMessage"); + map.put("messenger.getUnreadMessages", "getUnreadMessages"); + map.put("messenger.replyMessage", "replyMessage"); + map.put("messenger.setMessageAsRead", "setMessageAsRead"); + map.put("messenger.deleteMessage", "deleteMessage"); + map.put("messenger.sendMessageToAll", "sendMessageToAll"); + map.put("messenger.replyMessageToAll", "replyMessageToAll"); + map.put("messenger.showViewAllMessengerMessages", "showViewAllMessengerMessages"); + + return map; + } + + /** + * Action que monta a mensagem e a repassa para a persistência. + * + * @param mapping + * @param form + * @param request + * @param response + * @return null pois a requisição é via ajax + * @throws Exception + */ + public ActionForward saveMessage(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) + throws Exception { + + Person from = this.getUserInRequest(request); + Person to = facade.getPersonByID(Integer.parseInt(request + .getParameter("para"))); + + MessengerMessage message = prepareMessage( + request.getParameter("assunto"), + request.getParameter("txtarea-mensagem"), from, to, 0, false); + + facade.saveMessengerMessage(message, from, to); + + return null; + } + + /** + * Método que retorna o json com a as mensagens não lidas de um determinado + * usuário + * + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws Exception + */ + public ActionForward getUnreadMessages(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws Exception { + + Person person = this.getUserInRequest(request); + List lm = facade.getAllUnreadByPerson(person); + + if (lm == null || lm.isEmpty()) // Se não houver mensagens não lidas, + return null; // pare por aqui! + + + List mmm = new ArrayList(); + String[] str = request.getParameterValues("ignoreIds[]"); + int courseId = Integer.parseInt(request.getParameter("courseId")); + + if (str != null || str.length > 0) { + List lint = new ArrayList(); + for (String s : str) { + lint.add(Integer.parseInt(s)); + } + + for (MessengerMessage m : lm) { + if (!lint.contains(m.getId())) + mmm.add(prepareMessageMirror(m, courseId)); + } + } else + for (MessengerMessage m : lm) + mmm.add(prepareMessageMirror(m, courseId)); + + response.setContentType("application/json"); + PrintWriter out = response.getWriter(); + out.print(messagesToJson(mmm)); + + return null; + } + + /** + * Método que serializa um List de MessengerMessageMirror para uma string + * json + * + * @param mmm + * A lista a ser serializada + * @return Uma string representando a lista no formato json + */ + private String messagesToJson(List mmm) { + Gson gson = new Gson(); + Type tipo = new TypeToken>() { + }.getType(); + return gson.toJson(mmm, tipo); + } + + /** + * Método que espelha um MessengerMessage pra um MessengerMessageMirror, recebe também um int como + * id do curso. Usada para o caso de reply-to-all + * @param message A mensagem a ser espelhada. + * @param courseId o Id do curso corrente + * @return A mensagem espelhada + */ + private MessengerMessageMirror prepareMessageMirror(MessengerMessage message, int courseId) { + + MessengerMessageMirror messageMirror = new MessengerMessageMirror(); + messageMirror.setTitle(message.getTitle()); + messageMirror.setContent(message.getContent()); + messageMirror.setDate(message.getDate()); + messageMirror.setId(message.getId()); + messageMirror.setSender(message.getSender().getName()); + messageMirror.setSenderId(message.getSender().getId()); + messageMirror.setToAll(message.isToAll()); + messageMirror.setCourseId(courseId); + + return messageMirror; + } + + /** + * Método que salva uma messagem como resposta a outra. Recebe na requisição + * o Id da mensagem a qual está sendo respondida + * + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws Exception + */ + public ActionForward replyMessage(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) + throws Exception { + + Person from = this.getUserInRequest(request); + Person to = facade.getPersonByID(Integer.parseInt(request + .getParameter("senderId"))); + + MessengerMessage message = prepareMessage( + request.getParameter("messageTitle"), + request.getParameter("messageContent"), from, to, + Integer.parseInt(request.getParameter("messageId")), + false); + + facade.saveMessengerMessage(message, from, to); + + return null; + } + + /** + * Método que marca a mensagem como lida + * + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws Exception + */ + public ActionForward setMessageAsRead(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws Exception { + + int idMensagemLida = Integer + .parseInt(request.getParameter("messageId")); + MessengerMessage message = facade + .getMessengerMessageById(idMensagemLida); + message.setRead(true); + + facade.saveOnlyMessage(message); + + return null; + } + + /** + * Método que exlui uma determinada mensagem, baseada em seu ID. Inlcui uma + * restrição que só quem apaga a mensagem é quem a recebeu. + * + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws Exception + */ + public ActionForward deleteMessage(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) + throws Exception { + + if (!request.getMethod().equals("POST")) { + System.out.println("Não pode apagar essa mensagem via GET!"); + return null; + } + + Person receiver = this.getUserInRequest(request); + + int messageId = Integer.parseInt(request.getParameter("messageId")); + MessengerMessage message = facade.getMessengerMessageById(messageId); + + if (receiver.getId() == message.getReceiver().getId()) + facade.deleteMessengerMessage(message); + else + System.out.println("Não pode apagar essa mensagem!"); + + return null; + } + + /** + * Metodo que cria a mensagem e seus relacionamentos e a retorna para + * persistência + * + * @param title + * O título ou assunto da mensagem + * @param content + * O conteudo da mensagem + * @param from + * O rementente da mensagem + * @param to + * O destinatário da mensagem + * @param respondTo + * um inteiro que representa a mensagem respondida. Passar 0 caso + * não esteja respondendo nenhuma + * @return A mensagem pronta. + */ + private MessengerMessage prepareMessage(String title, String content, + Person from, Person to, int respondTo, boolean toAll) { + MessengerMessage message = new MessengerMessage(); + message.setTitle(title); + message.setContent(content); + message.setDate(new Date()); + message.setResponseTo(respondTo); + message.setSender(from); + message.setReceiver(to); + message.setToAll(toAll); + return message; + } + + /** + * Método que envia uma MessengerMessage recebida, a todos os participantes de um curso + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws Exception + */ + public ActionForward sendMessageToAll(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) + throws Exception { + + Course course = facade.getCoursesById(Integer + .parseInt(request.getParameter("courseId"))); + String assunto = "All: " + request.getParameter("assunto-to-all"); + String content = request.getParameter("content-to-all"); + + Person from = this.getUserInRequest(request); + + List personInCourse = facade.listStudentsByCourse(course); + personInCourse.addAll(facade.listTeachersByCourse(course)); + + this.finalizeSendToAll(personInCourse, from, assunto, content, 0); + + return null; + } + + /** + * Método que faz o processamento final de envio de mensagens para todos. Tanto serve para mensagens + * iniciais (que não respondem nenhuma) quanto para mensagens de resposta a todos. + * + * @param personInCourse A lista de pessoas no curso + * @param from A pessoa que está respondendo + * @param assunto O título da mensagem + * @param content O conteúdo da mensagem + * @param respondTo O id da mensagem que está sendo respondida + */ + private void finalizeSendToAll(List personInCourse, Person from, + String assunto, String content, int respondTo) { + + for(Person p : personInCourse){ + if(p.getId() != from.getId()){ + MessengerMessage message = prepareMessage(assunto, content, from, p, respondTo, true); + facade.saveMessengerMessage(message, from, p); + } + } + + } + + /** + * Método que retorna a Person que está na sessão da requisição HTTP + * @param request um HttpServletRequest + * @return a pessoa - Person - encontrada + */ + private Person getUserInRequest(HttpServletRequest request){ + AccessInfo accessInfo = null; + if (SystemActions.isLoggedUser(request)) { + accessInfo = (AccessInfo) request.getSession().getAttribute("user"); + accessInfo = facade.searchUserById(accessInfo.getId()); + } + Person person = facade.getPersonByLogin(accessInfo.getLogin()); + return person; + } + + /** + * Método que envia a resposta de uma mensagem a todos os usuarios do curso. + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws Exception + */ + public ActionForward replyMessageToAll(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) + throws Exception { + + if (!request.getMethod().equals("POST")) { + System.out.println("Não pode responder GET!"); + return null; + } + + Person from = this.getUserInRequest(request); + String assunto = request.getParameter("messageTitle"); + String content = request.getParameter("messageContent"); + int respondTo = Integer.parseInt(request.getParameter("messageId")); + + Course course = facade.getCoursesById(Integer + .parseInt(request.getParameter("courseId"))); + List personInCourse = facade.listStudentsByCourse(course); + personInCourse.addAll(facade.listTeachersByCourse(course)); + + this.finalizeSendToAll(personInCourse, from, assunto, content, respondTo); + + return null; + } + + /** + * Método que prepara e exibe a view Show All Messenger Messages. + * Exibe uma página que contém todas as mensagens de um determinado usuário + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws Exception + */ + public ActionForward showViewAllMessengerMessages(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) + throws Exception { + + ActionForward forward = null; + + Person person = this.getUserInRequest(request); + if(person != null){ + + AccessInfo user = (AccessInfo) request.getSession().getAttribute("user"); + user = facade.searchUserById(user.getId()); + + int courseId = Integer.parseInt(request.getParameter("courseId")); + Course course = facade.getCoursesById(courseId); + boolean canRegisterUser = false; + + if (facade.canRegisterUser(user, course)) { + canRegisterUser = true; + } + + Role userRoleInCourse = Facade.getInstance().getRoleByPersonInCourse(user.getPerson(), course); + SystemActions.setMenuPermissionsForUserInRequest(request, course); + + List teachers = facade.getTeachersByCourse(course); + List assistants = facade.listAssistantsByCourse(course); + List participants = facade.listStudentsByCourse(course); //added by Nailson + List messagesUnread = facade.getAllMessengerMessageByPerson(person); + + request.setAttribute("userRoleInCourse", ( userRoleInCourse != null) ? userRoleInCourse.getRoleType() : null ); + request.setAttribute("canRegisterUser", canRegisterUser); + request.setAttribute("course", course); + request.setAttribute("teachers", teachers); + request.setAttribute("assistants", assistants); + request.setAttribute("participants", participants); //added by Nailson + request.setAttribute("messagesUnread", messagesUnread); + request.setAttribute("pageSeeAll", true); + + forward = mapping.findForward(FORWARD_SHOW_VIEW_ALL_MESSENGER_MESSAGES); + } + return forward; + } + + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/SettingsActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/SettingsActions.java old mode 100644 new mode 100755 index 75db786..b4d388f --- a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/SettingsActions.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/SettingsActions.java @@ -12,6 +12,7 @@ import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionMessage; import org.apache.struts.action.ActionMessages; +import br.ufpe.cin.amadeus.amadeus_web.domain.settings.WebSettings; import br.ufpe.cin.amadeus.amadeus_web.facade.Facade; import br.ufpe.cin.amadeus.amadeus_web.permissions.settings.WebSettingsPermissions; @@ -32,6 +33,7 @@ public class SettingsActions extends SystemActions { map.put("settingsActions.saveWebSecuritySettings", "saveWebSecuritySettings"); map.put("settingsActions.showViewWebMailSenderSettings", "showViewWebMailSenderSettings"); map.put("settingsActions.saveWebMailSenderSettings", "saveWebMailSenderSettings"); + map.put("settingsActions.saveSystemSettings", "saveSystemSettings"); map.put("settingsActions.showViewMobileSettings", "showViewMobileSettings"); map.put("settingsActions.saveMobileSettings", "saveMobileSettings"); return map; @@ -151,6 +153,29 @@ public class SettingsActions extends SystemActions { return forward; } + public ActionForward saveSystemSettings(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) throws Exception { + + ActionForward forward = null; + + if(SystemActions.isLoggedUser(request)){ + if(WebSettingsPermissions.userCanSaveWebMailSenderSettings(request)){ + /*ActionMessages messages = new ActionMessages();*/ + String domain = request.getParameter("domain").trim(); + System.out.println("LALA: "+domain); + request.setAttribute("success", true); + SystemActions.webSettings.setSystemGeneralDomain(domain); + forward = this.showViewWebMailSenderSettings(mapping, form, request, response); + } else { + forward = SystemActions.showViewAccessDenied(mapping, form, request, response); + } + } else { + forward = this.showViewWelcome(mapping, form, request, response); + } + + return forward; + } + public ActionForward saveWebMailSenderSettings(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/SystemActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/SystemActions.java old mode 100644 new mode 100755 index 1405589..3c368db --- a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/SystemActions.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/SystemActions.java @@ -13,6 +13,7 @@ Voc� deve ter recebido uma c�pia da Licen�a P�blica Geral GNU, sob o t package br.ufpe.cin.amadeus.amadeus_web.struts.action; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -25,7 +26,10 @@ import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.actions.LookupDispatchAction; +import repository.User; + import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Log; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.ProfileType; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Role; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.RoleType; @@ -74,7 +78,7 @@ public class SystemActions extends LookupDispatchAction { public ActionForward showViewWelcome(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { - + System.out.println("ShowViewWelcome"); ActionForward forward = null; if(!SystemActions.isLoggedUser(request)) { @@ -148,6 +152,20 @@ public class SystemActions extends LookupDispatchAction { return isLoggedUser; } + public static Log getLogUser(HttpServletRequest request) { + + AccessInfo accessInfo = (AccessInfo) request.getSession().getAttribute("user"); + + Log log = null; + + if(accessInfo != null) { + log = Log.getLog(); + log.setIdUser(accessInfo.getPerson()); + } + + return log; + } + public static ActionForward showViewAccessDenied(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { @@ -162,6 +180,9 @@ public class SystemActions extends LookupDispatchAction { boolean canViewCourseEvaluations = CoursePermissions.userCanShowViewCourseEvaluations(request, course); boolean canAssistanceRequest = false; boolean canViewCourseContent = false; + boolean canViewGraphic = true; + boolean canMonitoringHashtag = false; + boolean canSendToClassmates = false; AccessInfo user = (AccessInfo) request.getSession().getAttribute("user"); @@ -173,9 +194,14 @@ public class SystemActions extends LookupDispatchAction { canEditCourse = true; canDeleteCourse = true; canViewCourseContent = true; + canMonitoringHashtag = true; + canSendToClassmates = true; + } else if (userRoleInCourse != null) { if( userProfileType == ProfileType.PROFESSOR) { canInsertCourse = true; + canMonitoringHashtag = true; + canSendToClassmates = true; } if( userRoleInCourse.getRoleType() == RoleType.TEACHER || @@ -185,6 +211,8 @@ public class SystemActions extends LookupDispatchAction { if( userRoleInCourse.getRoleType() == RoleType.TEACHER) { canDeleteCourse = true; + canMonitoringHashtag = true; + canSendToClassmates = true; } if( userRoleInCourse.getRoleType() == RoleType.TEACHER || @@ -204,5 +232,8 @@ public class SystemActions extends LookupDispatchAction { request.setAttribute("canViewCourseEvaluations", canViewCourseEvaluations); request.setAttribute("canViewCourseContent", canViewCourseContent); request.setAttribute("canAssistanceRequest", canAssistanceRequest); + request.setAttribute("canViewGraphic", canViewGraphic); + request.setAttribute("canMonitoringHashtag", canMonitoringHashtag); + request.setAttribute("canSendToClassmates", canSendToClassmates); } } \ No newline at end of file diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/TwitterActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/TwitterActions.java new file mode 100755 index 0000000..8c34b79 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/TwitterActions.java @@ -0,0 +1,424 @@ +package br.ufpe.cin.amadeus.amadeus_web.struts.action; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.collections.MultiMap; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; + +import twitter4j.FilterQuery; +import twitter4j.StallWarning; +import twitter4j.Status; +import twitter4j.StatusDeletionNotice; +import twitter4j.StatusListener; +import twitter4j.TwitterStream; +import twitter4j.TwitterStreamFactory; +import twitter4j.UserMentionEntity; +import twitter4j.conf.ConfigurationBuilder; +import br.ufpe.cin.amadeus.amadeus_web.dao.JdbcDAO; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Keyword; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Role; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.AccessInfo; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.MessengerMessage; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.Tweet; +import br.ufpe.cin.amadeus.amadeus_web.facade.Facade; +import br.ufpe.cin.amadeus.amadeus_web.util.SocialInteractions; +import br.ufpe.cin.amadeus.amadeus_web.util.TweetInteractionType; + +/** + * Classe responsável por centralizar as ações referentes ao monitoramento da + * ferramenta do twitter + * + * @author Nailson Cunha + * + */ +public class TwitterActions extends SystemActions { + + private final String FORWARD_SHOW_VIEW_SOCIAL_NETWORK_MONITORING = "fshowViewSocialNetworkMonitoring"; + private final String FORWARD_SHOW_VIEW_SOCIAL_TEST_TOOLS = "fshowViewTestTools"; + + private final String CONSUMER_KEY = "lZJGjiuAdYjiRvuNqBp5kg"; + private final String CONSUMER_SECRET = "ygeVV2WVXjYMyL8HkH065WmVC985RtSufYUpSA"; + private final String ACESS_TOKEN = "248676552-gaRX2FU7IGcqXxLoGZfFROQ9jTymfYWySoWtHhBG"; + private final String ACESS_TOKEN_SECRET = "7MxIfOc2lfn9NP2TaIQaIDl9A6kEqtc3J5myLgJfRY"; + private final String ACESS_TOKEN_URL = "https://api.twitter.com/oauth/access_token"; + private final String ACESS_TOKEN_AUTHORIZATION = "https://api.twitter.com/oauth/authorize"; + + private static TwitterStream twitterStream; + + @Override + protected Map getKeyMethodMap() { + Map map = new HashMap(); + + map.put("social.showViewSocialNetworkMonitoring","showViewSocialNetworkMonitoring"); + map.put("social.startSocialNetworkMonitoring","startSocialNetworkMonitoring"); + map.put("social.stopSocialNetworkMonitoring","stopSocialNetworkMonitoring"); + map.put("social.testMessageTool","testMessageTool"); + map.put("social.testTwitterTool","testTwitterTool"); + map.put("social.showViewTestTools","showViewTestTools"); + + return map; + } + + /** + * Action que retorna a visualização da página de Monitoramento de + * Interações Sociais do Twitter. + * + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws Exception + */ + public ActionForward showViewSocialNetworkMonitoring(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws Exception { + + ActionForward forward = null; + + if (SystemActions.isLoggedUser(request)) { + AccessInfo user = (AccessInfo) request.getSession().getAttribute( + "user"); + user = facade.searchUserById(user.getId()); + + int courseId; + + if (request.getParameter("courseId") == null) { + courseId = (Integer) request.getAttribute("courseId"); + } else { + courseId = Integer.parseInt(request.getParameter("courseId")); + } + + Course course = facade.getCoursesById(courseId); + List teachers = facade.getTeachersByCourse(course); + List assistants = facade.listAssistantsByCourse(course); + List participants = facade.listStudentsByCourse(course); + List messagesUnread = facade + .getAllUnreadByPerson(facade.getPersonByLogin(user + .getLogin())); + + int studentsNumber = facade.getNumberOfStudentsInCourse(course); + course.setNumberOfStudentsInCourse(studentsNumber); + + Set keywords = course.getKeywords(); + + boolean canRegisterUser = false; + + if (facade.canRegisterUser(user, course)) { + canRegisterUser = true; + } + + Role userRoleInCourse = Facade.getInstance() + .getRoleByPersonInCourse(user.getPerson(), course); + + SystemActions.setMenuPermissionsForUserInRequest(request, course); + request.setAttribute("userRoleInCourse", + (userRoleInCourse != null) ? userRoleInCourse.getRoleType() + : null); + request.setAttribute("canRegisterUser", canRegisterUser); + request.setAttribute("course", course); + request.setAttribute("teachers", teachers); + request.setAttribute("assistants", assistants); + request.setAttribute("participants", participants); + request.setAttribute("messagesUnread", messagesUnread); + request.setAttribute("keywords", keywords); + + forward = mapping + .findForward(FORWARD_SHOW_VIEW_SOCIAL_NETWORK_MONITORING); + } + + return forward; + } + + /** + * Método que inicia o monitoramento do twitter + * + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws Exception + */ + public ActionForward startSocialNetworkMonitoring(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws Exception { + + if (!SystemActions.isLoggedUser(request)) + return null; + + ConfigurationBuilder cb = new ConfigurationBuilder(); + cb.setDebugEnabled(true); + cb.setOAuthConsumerKey(CONSUMER_KEY); + cb.setOAuthConsumerSecret(CONSUMER_SECRET); + cb.setOAuthAccessToken(ACESS_TOKEN); + cb.setOAuthAccessTokenSecret(ACESS_TOKEN_SECRET); + cb.setOAuthAccessTokenURL(ACESS_TOKEN_URL); + cb.setOAuthAuthorizationURL(ACESS_TOKEN_AUTHORIZATION); + + twitterStream = new TwitterStreamFactory(cb.build()).getInstance(); + StatusListener listener = new StatusListener() { + @Override + public void onException(Exception arg0) { + } + + @Override + public void onTrackLimitationNotice(int arg0) { + } + + @Override + public void onStatus(Status status) { + System.out.println(status.getUser().getScreenName() + " - " + status.getText()); + if (new JdbcDAO().userTwitterExists(status.getUser() + .getScreenName())) { + if (status.isRetweet()) { + saveAsRetweet(status); + } else if (status.getInReplyToScreenName() != null) { + saveAsReply(status); + } else if (status.getUserMentionEntities() != null) { + saveAsMention(status); + } + } + } + + @Override + public void onStallWarning(StallWarning arg0) { + } + + @Override + public void onScrubGeo(long arg0, long arg1) { + } + + @Override + public void onDeletionNotice(StatusDeletionNotice arg0) { + } + }; + + String[] hashtag = new String[1]; + hashtag[0] = "#" + request.getParameter("hashtag"); + + FilterQuery fq = new FilterQuery(); + fq.track(hashtag); + twitterStream.addListener(listener); + twitterStream.filter(fq); + + return null; + } + + /** + * Método que para as threads que estão monitorando alguma hashtag no twitter. + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws Exception + */ + public ActionForward stopSocialNetworkMonitoring(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws Exception { + + TwitterStream ts = getTwitterStream(); + + if (ts != null) + ts.shutdown(); + + List tweets = facade.getAllTweets(); + for(Tweet t : tweets){ + System.out.println(t); + } + + return null; + } + + private TwitterStream getTwitterStream() { + if (twitterStream != null) + return twitterStream; + return null; + } + + /** + * Método que salva os tweets como retweet + * @param status + */ + private void saveAsRetweet(Status status) { + JdbcDAO jd = new JdbcDAO(); + + // Se o dono do tweet não estiver cadastrado + if (!jd.userTwitterExists(status.getUser().getScreenName())) + return; + + // Se o usuario retweetado não estiver cadastrado + int idUserRetweeted = jd.getUserIdByScreenName(status + .getRetweetedStatus().getUser().getScreenName()); + if (idUserRetweeted == 0) + return; + + Date dateOfTweet = status.getCreatedAt(); + TweetInteractionType tit = TweetInteractionType.RETWEET; + String tweetText = status.getText(); + int userSenderId = jd.getUserIdByScreenName(status.getUser() + .getScreenName()); + int userTargetId = jd.getUserIdByScreenName(status.getRetweetedStatus() + .getUser().getScreenName()); + + jd.saveTweet(dateOfTweet, tit, tweetText, userSenderId, userTargetId); + } + + /** + * Método que salva os tweets como reply + * @param status + */ + private void saveAsReply(Status status) { + JdbcDAO jd = new JdbcDAO(); + + // Se o usuario principal nao existe + if (!jd.userTwitterExists(status.getUser().getScreenName())) + return; + + // Se o usuario replied nao existir + if (!jd.userTwitterExists(status.getInReplyToScreenName())) + return; + + Date dateOfTweet = status.getCreatedAt(); + TweetInteractionType tit = TweetInteractionType.REPLY; + String tweetText = status.getText(); + int userSenderId = jd.getUserIdByScreenName(status.getUser() + .getScreenName()); + int userTargetId = jd.getUserIdByScreenName(status + .getInReplyToScreenName()); + + jd.saveTweet(dateOfTweet, tit, tweetText, userSenderId, userTargetId); + + UserMentionEntity[] umes = status.getUserMentionEntities(); + if (umes != null && umes.length > 1) { + for(int i = 1; i <= status.getUserMentionEntities().length; i++){ + if(jd.userTwitterExists(umes[i].getScreenName())){ + userTargetId = jd.getUserIdByScreenName(umes[i].getScreenName()); + tit = TweetInteractionType.MENTION; + jd.saveTweet(dateOfTweet, tit, tweetText, userSenderId, userTargetId); + } + } + } + + } + + /** + * Método que salva os tweets como mention + * @param status + */ + private void saveAsMention(Status status) { + JdbcDAO jd = new JdbcDAO(); + + // Se o usuario principal nao existe + if (!jd.userTwitterExists(status.getUser().getScreenName())) + return; + + int userTargetId; + + Date dateOfTweet = status.getCreatedAt(); + TweetInteractionType tit = TweetInteractionType.MENTION; + String tweetText = status.getText(); + int userSenderId = jd.getUserIdByScreenName(status.getUser() + .getScreenName()); + + UserMentionEntity[] umes = status.getUserMentionEntities(); + if (umes != null) { + for(UserMentionEntity ume : umes){ + if(jd.userTwitterExists(ume.getScreenName())){ + userTargetId = jd.getUserIdByScreenName(ume.getScreenName()); + jd.saveTweet(dateOfTweet, tit, tweetText, userSenderId, userTargetId); + } + } + } + } + + + //Métodos de testes das ferramentas de Interações Sociais + /** + * Redireciona para a página de teste das ferramentas. + */ + public ActionForward showViewTestTools(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws Exception{ + + if (!SystemActions.isLoggedUser(request)) + return null; + + ActionForward forward = mapping + .findForward(FORWARD_SHOW_VIEW_SOCIAL_TEST_TOOLS); + + return forward; + + } + + /** + * Método criado pra teste do método getSocialInteractions da ferramenta de mensagens + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws Exception + */ + public ActionForward testMessageTool(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws Exception{ + + System.out.println("Testando MessageTool"); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + String inicio = "2012-12-10"; + String fim = "2013-02-05"; + + Date dataIni = sdf.parse(inicio); + Date dataFim = sdf.parse(fim); + Course curso = facade.getCoursesById(18); + MultiMap map = SocialInteractions.getSocialInteractionsFromMessenger(curso, dataIni, dataFim); + + for(Object o : map.values()) + System.out.println(o); + + return null; + + } + + + /** + * Método criado pra teste do método getSocialInteractions da ferramenta do twitter + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws Exception + */ + public ActionForward testTwitterTool(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws Exception{ + + System.out.println("Testando TwitterTool"); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + String inicio = "2013-03-03"; + String fim = "2013-03-05"; + Date dataIni = sdf.parse(inicio); + Date dataFim = sdf.parse(fim); + MultiMap map = SocialInteractions.getSocialInteractionsFromTwitterTool(dataIni,dataFim); + for(Object o : map.values()) + System.out.println(o); + return null; + + } + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/UserActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/UserActions.java old mode 100644 new mode 100755 index f1e817f..647f3f0 --- a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/UserActions.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/UserActions.java @@ -29,6 +29,7 @@ import javax.mail.MessagingException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +//import org.GNOME.Accessibility.AccessUtil; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; @@ -39,6 +40,7 @@ import org.apache.struts.upload.FormFile; import org.apache.struts.util.LabelValueBean; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Log; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.MaterialRequest; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.ProfileType; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.evaluation.Evaluation; @@ -51,6 +53,7 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.register.Thumbnail; import br.ufpe.cin.amadeus.amadeus_web.domain.register.UserRequest; import br.ufpe.cin.amadeus.amadeus_web.exception.InvalidCurrentPasswordException; import br.ufpe.cin.amadeus.amadeus_web.exception.InvalidLogonException; +import br.ufpe.cin.amadeus.amadeus_web.exception.InvalidSocialCredencialsException; import br.ufpe.cin.amadeus.amadeus_web.exception.InvalidUserException; import br.ufpe.cin.amadeus.amadeus_web.permissions.register.UserPermissions; import br.ufpe.cin.amadeus.amadeus_web.struts.action.content_management.video.VideoChatAction; @@ -72,6 +75,7 @@ public class UserActions extends SystemActions { private final String FORWARD_SHOW_VIEW_TEACHER_PENDING_TASKS = "fShowViewTeacherPendingTasks"; private final String FORWARD_SHOW_VIEW_STUDENT_PENDING_TASKS = "fShowViewStudentPendingTasks"; private final String FORWARD_SHOW_VIEW_ONLINE_USERS = "fShowViewOnlineUsers"; + private final String FORWARD_SHOW_VIEW_INTEGRATION_SOCIAL_NETWORKS = "fShowViewIntegrationSocialNetworks"; private final String FORWARD_SHOW_VIEW_ALL_USERS_IN_MANAGER_USERS = "fShowViewAllUsersInManagerUsers"; private final String FORWARD_SHOW_VIEW_USER_NEW_IN_MANAGER_USERS = "fShowViewUserNewInManagerUsers"; @@ -98,6 +102,7 @@ public class UserActions extends SystemActions { map.put("assistanceRequest.sendRequest", "assistanceRequest"); map.put("editUser.heading", "viewEditUser"); map.put("editUser.reportError", "reportError"); + map.put("integrationSocialNetworks.integrate", "integrationSocialNetworks"); map.put("user.showViewInsertUser", "showViewInsertUser"); map.put("user.showViewEditPassword", "showViewEditPassword"); @@ -111,6 +116,7 @@ public class UserActions extends SystemActions { map.put("user.countOnlineUser", "countOnlineUser"); map.put("user.userStatus", "userStatus"); map.put("user.showViewOnlineUsers", "showViewOnlineUsers"); + map.put("user.showViewIntegrationSocialNetworks", "showViewIntegrationSocialNetworks"); // MAP MANAGER USERS map.put("user.showViewAllUsersInManagerUsers", "showViewAllUsersInManagerUsers"); @@ -118,6 +124,7 @@ public class UserActions extends SystemActions { map.put("user.showViewUserNewInManagerUsers", "showViewUserNewInManagerUsers"); map.put("user.showViewEditUserInManagerUsers", "showViewEditUserInManagerUsers"); map.put("user.userNewInManagerUsers", "userNewInManagerUsers"); + map.put("user.userEditInManagerUsers", "userEditInManagerUsers"); map.put("user.showViewUserProfileInManagerUsers", "showViewUserProfileInManagerUsers"); map.put("user.showViewSendMailInManagerUsers", "showViewSendMailInManagerUsers"); map.put("user.sendMailInManagerUsers", "sendMailInManagerUsers"); @@ -141,6 +148,8 @@ public class UserActions extends SystemActions { return forward; } + + public ActionForward viewEditUser(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) @@ -264,6 +273,10 @@ public class UserActions extends SystemActions { myForm.set("passwordConfirmation", ""); } else { forward = this.showViewMenu(mapping, myForm, request, response); + //TODO - LOG - Login - OK + Log log = SystemActions.getLogUser(request); + log.setCodigo(Log.LOG_CODIGO_LOGIN); + this.facade.saveLog(log); } return forward; @@ -337,6 +350,12 @@ public class UserActions extends SystemActions { request.getSession().removeAttribute("user"); request.getSession().setAttribute("user", accessInfo); aForward = mapping.findForward("success"); + + //TODO - LOG - Login - OK + Log log = SystemActions.getLogUser(request); + log.setCodigo(Log.LOG_CODIGO_LOGIN); + this.facade.saveLog(log); + } catch (InvalidLogonException e1) { messages.add("invalidLogin", new ActionMessage( "errors.auth.invalid")); @@ -365,7 +384,6 @@ public class UserActions extends SystemActions { public ActionForward editUser(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { - System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>editUSER"); ActionForward forward = null; if (SystemActions.isLoggedUser(request)) { @@ -375,7 +393,7 @@ public class UserActions extends SystemActions { .getAttribute("user"); Person person = accessInfo.getPerson(); - + DynaActionForm dynaForm = (DynaActionForm) form; person.setName(dynaForm.getString("name")); @@ -383,19 +401,16 @@ public class UserActions extends SystemActions { person.setState(dynaForm.getString("state")); person.setCpf(dynaForm.getString("cpf")); person.setPhoneNumber(dynaForm.getString("phoneNumber")); - System.out.println("email novo>>>>>>>>>>>>> " + dynaForm.getString("email")); + //person.setEmail(dynaForm.getString("email")); Date dataAnivesario = null; DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); - dataAnivesario = formatter.parse((String) dynaForm.get("birthDate")); if (!dynaForm.getString("birthDate").trim().equals("")) { + dataAnivesario = formatter.parse((String) dynaForm.get("birthDate")); if(dataAnivesario.compareTo(getNowDateTime()) > 0){ messages.add("error", new ActionMessage("errors.date.birthDataIsAfterNow")); - System.out.println(accessInfo.getPerson().getBirthDate().toString()); - System.out.println(getNowDateTime().toString()); }else{ - person.setBirthDate(dataAnivesario); } } else { @@ -457,10 +472,9 @@ public class UserActions extends SystemActions { } catch (Exception e) { messages.add("editError", new ActionMessage(e.getMessage())); } - + System.out.println("Novo: "+dynaForm.getString("email")+" Velho: "+person.getEmail()); if (!dynaForm.getString("email").equals(person.getEmail())) { if (facade.existEmail(dynaForm.getString("email"))) { - System.out.println("email anterior>>>>"+person.getEmail()); messages.add("error", new ActionMessage( "errors.email.alreadyExists")); } else { @@ -494,17 +508,33 @@ public class UserActions extends SystemActions { public ActionForward signOut(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { - try { - VideoChatAction.logoffChatMain(mapping, form, request, response); - } catch (Exception e) { - System.out.println("signOut Chat"); + if (SystemActions.isLoggedUser(request)) { + + //TODO - LOG - Logout - OK + Log log = SystemActions.getLogUser(request); + + try { + VideoChatAction.logoffChatMain(mapping, form, request, response); + + + } catch (Exception e) { + log.setCodigo(Log.LOG_CODIGO_LOGOUT); + System.out.println("signOut Chat"); + } + + + response.setHeader("Cache-Control", "no-cache"); // HTTP 1.1 + response.setHeader("Pragma", "no-cache"); // HTTP 1.0 + response.setDateHeader("Expires", 0); + request.getSession().invalidate(); + + if(log.getCodigo() != null) + { + this.facade.saveLog(log); + System.out.println("registrou o log de logout."); + } } - - response.setHeader("Cache-Control", "no-cache"); // HTTP 1.1 - response.setHeader("Pragma", "no-cache"); // HTTP 1.0 - response.setDateHeader("Expires", 0); - request.getSession().invalidate(); - + return mapping.findForward(FORWARD_SUCCESS); } @@ -933,7 +963,7 @@ public class UserActions extends SystemActions { public ActionForward showViewEditPassword(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { - + ActionForward forward = null; if (SystemActions.isLoggedUser(request)) { @@ -951,8 +981,7 @@ public class UserActions extends SystemActions { .getPerson()); request.setAttribute("isTeacher", isTeacher); - request.setAttribute("canRequestTeaching", canRequestTeaching); - + request.setAttribute("canRequestTeaching", canRequestTeaching); forward = mapping.findForward(FORWARD_SHOW_VIEW_EDIT_PASSWORD); } else { forward = new SystemActions().showViewWelcome(mapping, form, @@ -1224,6 +1253,38 @@ public class UserActions extends SystemActions { return forward; } + + public ActionForward showViewIntegrationSocialNetworks(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws Exception { + + ActionForward forward = null; + + if (SystemActions.isLoggedUser(request)) { + AccessInfo accessInfo = (AccessInfo) request.getSession() + .getAttribute("user"); + + accessInfo = facade.searchUserById(accessInfo.getId()); + + HashMap socialProfiles = new HashMap(); + + socialProfiles.put("id", String.valueOf(accessInfo.getId())); + socialProfiles.put("name", accessInfo.getPerson().getName()); + socialProfiles.put("amadeusLogin",accessInfo.getLogin()); + socialProfiles.put("twitterLogin", accessInfo.getPerson().getTwitterLogin()); + socialProfiles.put("facebookLogin", accessInfo.getPerson().getFacebookLogin()); + + + request.setAttribute("person", accessInfo.getPerson()); + request.setAttribute("socialProfiles", socialProfiles); + + forward = mapping.findForward(FORWARD_SHOW_VIEW_INTEGRATION_SOCIAL_NETWORKS); + } else { + forward = this.showViewWelcome(mapping, form, request, response); + } + + return forward; + } public ActionForward showViewAllCoursesInManagerUsers( ActionMapping mapping, ActionForm form, HttpServletRequest request, @@ -1326,9 +1387,8 @@ public class UserActions extends SystemActions { ActionMessages messages = new ActionMessages(); DynaActionForm dynaForm = (DynaActionForm) form; - Person person = new Person(); - + //person.setId(Integer.parseInt(request.getParameter("userId"))); person.setName(dynaForm.getString("name")); person.setCity(dynaForm.getString("city")); person.setState(dynaForm.getString("state")); @@ -1371,8 +1431,9 @@ public class UserActions extends SystemActions { AccessInfo accessInfo = new AccessInfo(); accessInfo.setLogin(dynaForm.getString("login")); accessInfo.setPassword(dynaForm.getString("password")); - + String profileType = dynaForm.getString("userType"); + System.out.println(dynaForm.getString("userType")); if (profileType.equals("ADMIN")) { accessInfo.setTypeProfile(ProfileType.ADMIN); @@ -1385,7 +1446,7 @@ public class UserActions extends SystemActions { accessInfo.setPerson(person); person.setAccessInfo(accessInfo); - + person.setEmail(dynaForm.getString("email")); Resume resume = new Resume(); @@ -1411,13 +1472,19 @@ public class UserActions extends SystemActions { messages.add("error", new ActionMessage( "errors.login.alreadyExists")); } - if (facade.existEmail(person.getEmail())) { + /*if (facade.existEmail(person.getEmail())) { messages.add("error", new ActionMessage( "errors.email.alreadyExists")); - } + }*/ if (messages.isEmpty()) { + System.out.println("Antes: "+person.getCity()); + System.out.println("Antes: "+person.getCpf()); + System.out.println("Antes: "+person.getEmail()); person = facade.insertPerson(person); + System.out.println("Depois: "+person.getCity()); + System.out.println("Depois: "+person.getCpf()); + System.out.println("Depois: "+person.getEmail()); facade.confirmRegistry(person.getAccessInfo()); request.setAttribute("userId", person.getAccessInfo() .getId()); @@ -1438,6 +1505,136 @@ public class UserActions extends SystemActions { return forward; } + + public ActionForward userEditInManagerUsers(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws Exception { + + ActionForward forward = null; + if (SystemActions.isLoggedUser(request)) { + if (UserPermissions.userCanUserNewInManagerUsers(request)) { + ActionMessages messages = new ActionMessages(); + + DynaActionForm dynaForm = (DynaActionForm) form; + + Person person = new Person(); + + //person.getAccessInfo().setId(Integer.parseInt(request.getParameter("userId"))); + AccessInfo accessInfoOld = facade.searchUserById(Integer.parseInt(request.getParameter("userId"))); + person.setId(accessInfoOld.getPerson().getId()); + person.setName(dynaForm.getString("name")); + person.setCity(dynaForm.getString("city")); + person.setState(dynaForm.getString("state")); + person.setCpf(dynaForm.getString("cpf")); + + if (!dynaForm.getString("phoneNumber").trim().equals("")) { + person.setPhoneNumber(dynaForm.getString("phoneNumber")); + } + if (!dynaForm.getString("birthDate").trim().equals("")) { + DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + person.setBirthDate((Date) formatter + .parse((String) dynaForm.get("birthDate"))); + } + if (!dynaForm.getString("gender").trim().equals("")) { + person.setGender(((String) dynaForm.getString("gender")) + .charAt(0)); + } + + FormFile myFile = (FormFile) dynaForm.get("image"); + + // photo validation + try { + if (!myFile.getFileName().equals("")) { + if (myFile.getFileSize() < 500000) { // if the photo has + // less than + // 500KB + Image image = new Image(); + Thumbnail thumb = new Thumbnail(); + byte[] photo = thumb.resize(myFile.getFileData()); + image.setPhoto(photo); + person.setImage(image); + } else + messages.add("requestError", new ActionMessage( + "errors.photoSize")); + } + } catch (Exception e) { + messages.add("editError", new ActionMessage(e.getMessage())); + } + + AccessInfo accessInfo = new AccessInfo(); + accessInfo.setLogin(accessInfoOld.getLogin()); + accessInfo.setTypeProfile(accessInfoOld.getTypeProfile()); + accessInfo.setPassword(dynaForm.getString("password")); + + String profileType = request.getParameter("userType"); + + if (profileType.equals("ADMIN")) { + accessInfo.setTypeProfile(ProfileType.ADMIN); + } else if (profileType.equals("STUDENT")) { + accessInfo.setTypeProfile(ProfileType.STUDENT); + } else if (profileType.equals("PROFESSOR")) { + accessInfo.setTypeProfile(ProfileType.PROFESSOR); + } + + accessInfo.setPerson(person); + + person.setAccessInfo(accessInfo); + + + + person.setEmail(dynaForm.getString("email")); + + Resume resume = new Resume(); + + if (!dynaForm.getString("degree").trim().equals("")) { + resume.setDegree(dynaForm.getString("degree")); + } + if (!dynaForm.getString("instituition").trim().equals("")) { + resume.setInstituition(dynaForm.getString("instituition")); + } + if (!dynaForm.getString("description").trim().equals("")) { + resume.setDescription(dynaForm.getString("description")); + } + if (!dynaForm.get("year").equals("")) { + resume.setYear(Integer.parseInt(dynaForm.getString("year"))); + } + + resume.setPerson(person); + + person.setResume(resume); + + /*if (facade.existLogin(person.getAccessInfo().getLogin())) { + messages.add("error", new ActionMessage( + "errors.login.alreadyExists")); + }*/ + /*if (facade.existEmail(person.getEmail())) { + messages.add("error", new ActionMessage( + "errors.email.alreadyExists")); + }*/ + + if (messages.isEmpty()) { + person = facade.editUser(person); + facade.confirmRegistry(person.getAccessInfo()); + request.setAttribute("userId", person.getAccessInfo() + .getId()); + forward = this.showViewUserProfileInManagerUsers(mapping, + dynaForm, request, response); + } else { + saveErrors(request, messages); + forward = this.showViewUserNewInManagerUsers(mapping, + dynaForm, request, response); + } + } else { + forward = SystemActions.showViewAccessDenied(mapping, form, + request, response); + } + } else { + forward = this.showViewWelcome(mapping, form, request, response); + } + + return forward; + } + public ActionForward showViewEditUserInManagerUsers(ActionMapping mapping, ActionForm form, HttpServletRequest request, @@ -1494,6 +1691,7 @@ public class UserActions extends SystemActions { accessInfo.getPerson().getResume() != null ? String .valueOf(accessInfo.getPerson().getResume() .getYear()) : null); + userProfile.put("twitterLogin", accessInfo.getPerson().getTwitterLogin()); request.setAttribute("personId", accessInfo.getPerson().getId()); request.setAttribute("userProfile", userProfile); @@ -1652,5 +1850,34 @@ public class UserActions extends SystemActions { return null; } + + public ActionForward integrationSocialNetworks(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + + DynaActionForm myForm = (DynaActionForm) form; + ActionMessages messages = new ActionMessages(); + + AccessInfo userAccessInfo = (AccessInfo) request.getSession() + .getAttribute("user"); + + String twitterLogin = myForm.getString("twitterLogin"); + String facebookLogin = myForm.getString("facebookLogin"); + + try { + facade.integrationSocialNetworks(userAccessInfo, twitterLogin, facebookLogin); + } catch (InvalidSocialCredencialsException e) { + messages.add("twitterLogin", new ActionMessage( + "errors.invalidTwitterLogin")); + } + + if (!messages.isEmpty()) { + saveErrors(request, messages); + return mapping.getInputForward(); + } + + myForm.initialize(mapping); + + return mapping.findForward(FORWARD_SUCCESS); + } } \ No newline at end of file diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/ModuleActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/ModuleActions.java old mode 100644 new mode 100755 index 01911b1..4be653a --- a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/ModuleActions.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/ModuleActions.java @@ -17,6 +17,7 @@ import org.apache.struts.action.DynaActionForm; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Module; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.PersonForum; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Role; import br.ufpe.cin.amadeus.amadeus_web.domain.register.AccessInfo; import br.ufpe.cin.amadeus.amadeus_web.facade.Facade; @@ -88,8 +89,8 @@ public class ModuleActions extends SystemActions { int positionModule = facade.getNextPositionModule(course); Module module = new Module(); - module.setName("Nome do M�dulo - "+(positionModule)); - module.setDescription("Descri��o"); + module.setName("Nome do Módulo - "+(positionModule)); + module.setDescription("Descrição"); module.setVisible(true); module.setPosition(positionModule); module.setCourse(course); @@ -216,7 +217,7 @@ public class ModuleActions extends SystemActions { Module module = facade.getModuleById(idModule); Course course = module.getCourse(); - //Impede estouro de mem�ria. + //Impede estouro de memória. for (int i = (module.getMaterials().size() -1); i >= 0; i--) { module.getMaterials().remove(i); facade.flush(); @@ -256,7 +257,9 @@ public class ModuleActions extends SystemActions { Role userRoleInCourse = Facade.getInstance().getRoleByPersonInCourse(user.getPerson(), course); List modules = course.getModules(); + List forunsperson= user.getPerson().getForuns(); + request.setAttribute("forunsperson", forunsperson); request.setAttribute("positionModule", 0); request.setAttribute("modules", modules); request.setAttribute("course", course); @@ -285,7 +288,8 @@ public class ModuleActions extends SystemActions { Course course = module.getCourse(); Role userRoleInCourse = facade.getRoleByPersonInCourse(user.getPerson(), course); - + List forunsperson = user.getPerson().getForuns(); + request.setAttribute("forunsperson", forunsperson); request.setAttribute("module", module); request.setAttribute("userRoleInCourse", userRoleInCourse); request.getSession().setAttribute("course", course); diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/UtilActivities.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/UtilActivities.java old mode 100644 new mode 100755 index ead74da..d4f119a --- a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/UtilActivities.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/UtilActivities.java @@ -246,7 +246,9 @@ public class UtilActivities { type.equalsIgnoreCase("png")){ cssClass = "imageFile"; - }else if(type.equalsIgnoreCase("avi") || + }else if(type.equalsIgnoreCase("avi") || + type.equalsIgnoreCase("swf") || + type.equalsIgnoreCase("flv") || type.equalsIgnoreCase("mov") || type.equalsIgnoreCase("mpg") || type.equalsIgnoreCase("mpeg")){ @@ -269,7 +271,7 @@ public class UtilActivities { } private static String getFileType(String extension) { - int length = extension.length(); + /*int length = extension.length(); int dotChar = length - 6; String subString = extension.substring(dotChar); @@ -278,7 +280,8 @@ public class UtilActivities { subString = extension.substring(dotChar); } - return extension.substring(dotChar + 1); + return extension.substring(dotChar + 1);*/ + return extension; } public static String getVideoId(String longId){ diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/evaluation/EvaluationActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/evaluation/EvaluationActions.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/evaluation/EvaluationRealizedActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/evaluation/EvaluationRealizedActions.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/evaluation/QuestionActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/evaluation/QuestionActions.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/external_link/ExternalLinkActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/external_link/ExternalLinkActions.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/forum/ForumActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/forum/ForumActions.java old mode 100644 new mode 100755 index 288d3f0..daee4ad --- a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/forum/ForumActions.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/forum/ForumActions.java @@ -9,10 +9,11 @@ publicada pela Funda��o do Software Livre (FSF); na vers�o 2 da Licen�a. Este programa � distribu�do na esperan�a que possa ser �til, mas SEM NENHUMA GARANTIA; sem uma garantia impl�cita de ADEQUA��O a qualquer MERCADO ou APLICA��O EM PARTICULAR. Veja a Licen�a P�blica Geral GNU para maiores detalhes. Voc� deve ter recebido uma c�pia da Licen�a P�blica Geral GNU, sob o t�tulo "LICENCA.txt", junto com este programa, se n�o, escreva para a Funda��o do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -**/ + **/ package br.ufpe.cin.amadeus.amadeus_web.struts.action.content_management.forum; +import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -21,6 +22,8 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.collections.MultiHashMap; +import org.apache.commons.collections.MultiMap; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; @@ -28,13 +31,15 @@ import org.apache.struts.action.ActionMessage; import org.apache.struts.action.ActionMessages; import org.apache.struts.action.DynaActionForm; -import sun.security.provider.SystemSigner; +//import sun.security.provider.SystemSigner; import br.ufpe.cin.amadeus.amadeus_mobile.sms.Receiver; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Forum; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Log; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Message; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Module; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.PersonForum; import br.ufpe.cin.amadeus.amadeus_web.domain.register.AccessInfo; import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; import br.ufpe.cin.amadeus.amadeus_web.struts.action.SettingsActions; @@ -52,58 +57,91 @@ public class ForumActions extends SystemActions { @Override protected Map getKeyMethodMap() { Map map = new HashMap(); - + map.put("forumActivity.showViewForumActivity", "showViewForumActivity"); - map.put("forumActivity.showViewNewForumActivity", "showViewNewForumActivity"); + map.put("forumActivity.showViewNewForumActivity", + "showViewNewForumActivity"); map.put("forumActivity.newForumActivity", "newForumActivity"); - map.put("forumActivity.showViewEditForumActivity", "showViewEditForumActivity"); + map.put("forumActivity.showViewEditForumActivity", + "showViewEditForumActivity"); map.put("forumActivity.editForumActivity", "editForumActivity"); map.put("forumActivity.deleteForumActivity", "deleteForumActivity"); - map.put("forumActivity.showViewListMessagesForumActivity", "showViewListMessagesForumActivity"); - map.put("forumActivity.showViewNewAnswerForumActivity", "showViewNewAnswerForumActivity"); + map.put("forumActivity.showViewListMessagesForumActivity", + "showViewListMessagesForumActivity"); + map.put("forumActivity.showViewNewAnswerForumActivity", + "showViewNewAnswerForumActivity"); + map.put("forumActivity.showViewNewAnswerForumActivityWithMessage", + "showViewNewAnswerForumActivityWithMessage"); map.put("forumActivity.answerForumActivity", "answerForumActivity"); - + map.put("forumActivity.answerForumActivityWithMessage", + "answerForumActivityWithMessage"); + return map; } - - public ActionForward showViewForumActivity(ActionMapping mapping, ActionForm form, - HttpServletRequest request, HttpServletResponse response) { - + + public ActionForward showViewForumActivity(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + int idForum = Integer.parseInt(request.getParameter("idForum")); - + AccessInfo loggedUser = (AccessInfo) request.getSession() + .getAttribute("user"); + AccessInfo user = facade.searchUserById(loggedUser.getId()); + Forum forum = facade.getForumById(idForum); Module module = forum.getModule(); - //Course course = module.getCourse(); - //boolean canAnswerForum = facade.isValidationDataToAnswerForum(forum, course); + PersonForum personForum = new PersonForum(); + personForum.getPk().setForum(forum); + personForum.getPk().setPerson(user.getPerson()); + if(user.getPerson().getForuns().contains(personForum)){ + System.out.println("REGISTRADO NO FORUM"); + user.getPerson().getForuns().remove(personForum); + this.facade.flush(); + personForum.setLastTimeInForum(new Date()); + user.getPerson().getForuns().add(personForum); + } + // Course course = module.getCourse(); + + // boolean canAnswerForum = facade.isValidationDataToAnswerForum(forum, + // course); + request.setAttribute("forum", forum); request.setAttribute("module", module); - //request.setAttribute("canAnswerForum", canAnswerForum); - + // request.setAttribute("canAnswerForum", canAnswerForum); + + // TODO - LOG - Visualizacao de um topico - OK + Log log = SystemActions.getLogUser(request); + log.setCodigo(Log.LOG_CODIGO_FORUM_TOPICO); + log.setIdObjeto(forum.getId()); + facade.saveLog(log); + return mapping.findForward(FORWARD_SHOW_VIEW_FORUM_ACTIVITY); } - - public ActionForward showViewNewForumActivity(ActionMapping mapping, ActionForm form, - HttpServletRequest request, HttpServletResponse response) { - + + public ActionForward showViewNewForumActivity(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + int idModule = Integer.parseInt(request.getParameter("idModule")); - + Module module = facade.getModuleById(idModule); - + request.setAttribute("module", module); - + return mapping.findForward(FORWARD_SHOW_VIEW_NEW_FORUM_ACTIVITY); } - - public ActionForward newForumActivity(ActionMapping mapping, ActionForm form, - HttpServletRequest request, HttpServletResponse response) { - + + public ActionForward newForumActivity(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + DynaActionForm myForm = (DynaActionForm) form; ActionMessages messages = new ActionMessages(); int idModule = Integer.parseInt(request.getParameter("idModule")); - + Module module = facade.getModuleById(idModule); Course course = module.getCourse(); @@ -127,7 +165,7 @@ public class ForumActions extends SystemActions { module.getForums().add(f); facade.flush(); - if(SettingsActions.mobileSettings.getSmsForum().equals("on")){ + if (SettingsActions.mobileSettings.getSmsForum().equals("on")) { Receiver receiver = new Receiver(); receiver.addMaterial(course.getId(), module.getId(), f.getId()); } @@ -138,9 +176,10 @@ public class ForumActions extends SystemActions { } - public ActionForward showViewEditForumActivity(ActionMapping mapping, ActionForm form, - HttpServletRequest request, HttpServletResponse response) { - + public ActionForward showViewEditForumActivity(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + int idForum = Integer.parseInt(request.getParameter("idForum")); Forum forum = facade.getForumById(idForum); @@ -149,60 +188,65 @@ public class ForumActions extends SystemActions { HashMap data = new HashMap(); data.put("idForum", forum.getId()); - data.put("nameForum",forum.getName()); + data.put("nameForum", forum.getName()); data.put("descriptionForum", forum.getDescription()); request.setAttribute("forum", data); request.setAttribute("module", module); - + return mapping.findForward(FORWARD_SHOW_VIEW_EDIT_FORUM_ACTIVITY); } - - public ActionForward editForumActivity(ActionMapping mapping, ActionForm form, - HttpServletRequest request, HttpServletResponse response) { + + public ActionForward editForumActivity(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) { DynaActionForm myForm = (DynaActionForm) form; int idForum = Integer.parseInt(request.getParameter("idForum")); - + Forum forum = facade.getForumById(idForum); - + forum.setName(myForm.getString("topicForum")); forum.setDescription(myForm.getString("descriptionForum")); facade.flush(); - + // AJAX REVERSO UtilActivities.eraseAndWriteNameActivity(forum.getModule().getId()); return null; } - public ActionForward deleteForumActivity(ActionMapping mapping, ActionForm form, - HttpServletRequest request, HttpServletResponse response) { + public ActionForward deleteForumActivity(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) { int idForum = Integer.parseInt(request.getParameter("idForum")); - + Forum forum = facade.getForumById(idForum); Module module = forum.getModule(); Course course = module.getCourse(); - + module.getForums().remove(forum); - + facade.flush(); - - //ENVIO SMS COMENTADO - /*Receiver receiver = new Receiver(); - receiver.removeMaterial(course.getId(), module.getId(), idForum);*/ - + + // ENVIO SMS COMENTADO + /* + * Receiver receiver = new Receiver(); + * receiver.removeMaterial(course.getId(), module.getId(), idForum); + */ + UtilActivities.eraseAndWriteNameActivity(module.getId()); return null; } - public ActionForward showViewListMessagesForumActivity(ActionMapping mapping, - ActionForm form, HttpServletRequest request, HttpServletResponse response) { - + public ActionForward showViewListMessagesForumActivity( + ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + int idForum = Integer.parseInt(request.getParameter("idForum")); - Forum forum = facade.getForumById(idForum); - + Forum forum = facade.getForumById(idForum); + int maxResultado = 5; int qtdIdPorPag = 10; int pivo; @@ -213,74 +257,83 @@ public class ForumActions extends SystemActions { int menos = 0; int mais = 0; int numeroDePagina = 0; - - pivo = (int)Math.ceil((double)qtdIdPorPag/(double)2); - + + pivo = (int) Math.ceil((double) qtdIdPorPag / (double) 2); + int totalResultado = facade.getSizeSearchMessageByForum(forum); if (request.getParameter("pagina") == null) { - pagina = 1; + pagina = 1; } else { - pagina = Integer.parseInt((request.getParameter("pagina")).toString()); - - if (pagina < 1){ - pagina = (int)Math.ceil((double)totalResultado/(double)maxResultado);; + pagina = Integer.parseInt((request.getParameter("pagina")) + .toString()); + + if (pagina < 1) { + pagina = (int) Math.ceil((double) totalResultado + / (double) maxResultado); + ; } } int inicio = pagina; - - if (totalResultado == 0){ - + + if (totalResultado == 0) { + } else { - messages = (List)facade.searchMessageByPaging(maxResultado, inicio, forum); + messages = (List) facade.searchMessageByPaging( + maxResultado, inicio, forum); } - + if (totalResultado > 1) { // Calculando pagina anterior menos = pagina - 1; // Calculando pagina posterior mais = pagina + 1; - numeroDePagina = (int)Math.ceil((double)totalResultado/(double)maxResultado); + numeroDePagina = (int) Math.ceil((double) totalResultado + / (double) maxResultado); } - - if ((pagina-pivo) < 1 ) { - anterior = 1; + + if ((pagina - pivo) < 1) { + anterior = 1; } else { - anterior = pagina-pivo; + anterior = pagina - pivo; } - - if ((pagina+pivo) > numeroDePagina ) { - posterior = numeroDePagina; + + if ((pagina + pivo) > numeroDePagina) { + posterior = numeroDePagina; } else { - posterior = pagina + pivo; + posterior = pagina + pivo; } - - request.setAttribute("maxResultado",maxResultado); - request.setAttribute("qtdIdPorPag",qtdIdPorPag); - request.setAttribute("pivo",pivo); - request.setAttribute("pagina",pagina); - request.setAttribute("anterior",anterior); - request.setAttribute("posterior",posterior); - request.setAttribute("menos",menos); - request.setAttribute("mais",mais); - request.setAttribute("numeroDePagina",numeroDePagina); - request.setAttribute("messages",messages); + + request.setAttribute("maxResultado", maxResultado); + request.setAttribute("qtdIdPorPag", qtdIdPorPag); + request.setAttribute("pivo", pivo); + request.setAttribute("pagina", pagina); + request.setAttribute("anterior", anterior); + request.setAttribute("posterior", posterior); + request.setAttribute("menos", menos); + request.setAttribute("mais", mais); + request.setAttribute("numeroDePagina", numeroDePagina); + request.setAttribute("messages", messages); request.setAttribute("totalResultado", totalResultado); request.setAttribute("forum", forum); - - return mapping.findForward(FORWARD_SHOW_VIEW_LIST_MESSAGES_FORUM_ACTIVITY); + request.setAttribute("module", forum.getModule()); + + return mapping + .findForward(FORWARD_SHOW_VIEW_LIST_MESSAGES_FORUM_ACTIVITY); } - - public ActionForward showViewNewAnswerForumActivity(ActionMapping mapping, ActionForm form, - HttpServletRequest request, HttpServletResponse response) { - + + public ActionForward showViewNewAnswerForumActivity(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + int idForum = Integer.parseInt(request.getParameter("idForum")); - + Forum forum = facade.getForumById(idForum); Module module = forum.getModule(); - - AccessInfo user = (AccessInfo)request.getSession().getAttribute("user"); + + AccessInfo user = (AccessInfo) request.getSession() + .getAttribute("user"); user = facade.searchUserById(user.getId()); Person person = user.getPerson(); @@ -288,15 +341,39 @@ public class ForumActions extends SystemActions { request.setAttribute("module", module); request.setAttribute("forum", forum); request.setAttribute("person", person); - + return mapping.findForward(FORWARD_SHOW_VIEW_NEW_ANSWER_FORUM_ACTIVITY); } - + + public ActionForward showViewNewAnswerForumActivityWithMessage( + ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + int idForum = Integer.parseInt(request.getParameter("idForum")); + int idMessage = Integer.parseInt(request.getParameter("idMessage")); + + Forum forum = facade.getForumById(idForum); + Message message = facade.getMessageById(idMessage); + Module module = forum.getModule(); + + AccessInfo user = (AccessInfo) request.getSession() + .getAttribute("user"); + user = facade.searchUserById(user.getId()); + + Person person = user.getPerson(); + + request.setAttribute("message", message); + request.setAttribute("module", module); + request.setAttribute("forum", forum); + request.setAttribute("person", person); + + return mapping.findForward(FORWARD_SHOW_VIEW_NEW_ANSWER_FORUM_ACTIVITY); + } + public ActionForward answerForumActivity(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionForward forward = null; - if(SystemActions.isLoggedUser(request)) { DynaActionForm myForm = (DynaActionForm) form; @@ -316,17 +393,107 @@ public class ForumActions extends SystemActions { forum.getMessages().add(msg); + PersonForum personForum = new PersonForum(); + personForum.getPk().setForum(forum); + personForum.getPk().setPerson(user.getPerson()); + + //se for o primeiro post do usuário + if(!user.getPerson().getForuns().contains(personForum)){ + personForum.setLastTimeInForum(date); + user.getPerson().getForuns().add(personForum); + }else{ + user.getPerson().getForuns().remove(personForum); + this.facade.flush(); + personForum.setLastTimeInForum(date); + user.getPerson().getForuns().add(personForum); + } + + // se for a primeira resposta set a data como a atual. if (forum.getMessages().size() < 2) { forum.setCreationDate(date); } facade.flush(); + + //TODO - LOG - Nova resposta para um topico - OK + Log log = SystemActions.getLogUser(request); + log.setCodigo(Log.LOG_CODIGO_FORUM_POST); + log.setIdObjeto(msg.getId()); + log.setTamanhoMensagem(msg.getBody().length()); + facade.saveLog(log); + } else { forward = new SystemActions().showViewWelcome(mapping, form, request, response); } return forward; } + + public ActionForward answerForumActivityWithMessage(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws Exception { + + ActionForward forward = null; + + if (SystemActions.isLoggedUser(request)) { + DynaActionForm myForm = (DynaActionForm) form; + int idMessage = Integer.parseInt(request.getParameter("idMessage")); + int idForum = Integer.parseInt(request.getParameter("idForum")); + Forum forum = facade.getForumById(idForum); + Message messagereply = facade.getMessageById(idMessage); + AccessInfo loggedUser = (AccessInfo) request.getSession() + .getAttribute("user"); + AccessInfo user = facade.searchUserById(loggedUser.getId()); + + Message msg = new Message(); + msg.setMessageReply(messagereply); + msg.setBody(myForm.getString("answerBody")); + + Date date = new Date(); + + msg.setDate(date); + msg.setAuthor(user.getPerson()); + + forum.getMessages().add(msg); + + PersonForum personForum = new PersonForum(); + personForum.getPk().setForum(forum); + personForum.getPk().setPerson(user.getPerson()); + + //se for o primeiro post do usuário + if(!user.getPerson().getForuns().contains(personForum)){ + personForum.setLastTimeInForum(date); + user.getPerson().getForuns().add(personForum); + }else{ + user.getPerson().getForuns().remove(personForum); + this.facade.flush(); + personForum.setLastTimeInForum(date); + user.getPerson().getForuns().add(personForum); + } + + // se for a primeira resposta set a data como a atual. + if (forum.getMessages().size() < 2) { + forum.setCreationDate(date); + } + + facade.flush(); + + // TODO - LOG - Nova resposta para um topico - OK + Log log = SystemActions.getLogUser(request); + log.setCodigo(Log.LOG_CODIGO_FORUM_POST); + log.setIdObjeto(msg.getId()); + log.setTamanhoMensagem(msg.getBody().length()); + facade.saveLog(log); + + } else { + forward = new SystemActions().showViewWelcome(mapping, form, + request, response); + } + + return forward; + } + + } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/game/GameActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/game/GameActions.java old mode 100644 new mode 100755 index b93878c..4054e7c --- a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/game/GameActions.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/game/GameActions.java @@ -1,32 +1,44 @@ /** Copyright 2008, 2009 UFPE - Universidade Federal de Pernambuco -Este arquivo � parte do programa Amadeus Sistema de Gest�o de Aprendizagem, ou simplesmente Amadeus LMS +Este arquivo � parte do programa Amadeus Sistema de Gest�o de Aprendizagem, ou simplesmente Amadeus LMS -O Amadeus LMS � um software livre; voc� pode redistribui-lo e/ou modifica-lo dentro dos termos da Licen�a P�blica Geral GNU como -publicada pela Funda��o do Software Livre (FSF); na vers�o 2 da Licen�a. +O Amadeus LMS � um software livre; voc� pode redistribui-lo e/ou modifica-lo dentro dos termos da Licen�a P�blica Geral GNU como +publicada pela Funda��o do Software Livre (FSF); na vers�o 2 da Licen�a. -Este programa � distribu�do na esperan�a que possa ser �til, mas SEM NENHUMA GARANTIA; sem uma garantia impl�cita de ADEQUA��O a qualquer MERCADO ou APLICA��O EM PARTICULAR. Veja a Licen�a P�blica Geral GNU para maiores detalhes. +Este programa � distribu�do na esperan�a que possa ser �til, mas SEM NENHUMA GARANTIA; sem uma garantia impl�cita de ADEQUA��O a qualquer MERCADO ou APLICA��O EM PARTICULAR. Veja a Licen�a P�blica Geral GNU para maiores detalhes. -Voc� deve ter recebido uma c�pia da Licen�a P�blica Geral GNU, sob o t�tulo "LICENCA.txt", junto com este programa, se n�o, escreva para a Funda��o do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +Voc� deve ter recebido uma c�pia da Licen�a P�blica Geral GNU, sob o t�tulo "LICENCA.txt", junto com este programa, se n�o, escreva para a Funda��o do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. **/ package br.ufpe.cin.amadeus.amadeus_web.struts.action.content_management.game; import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; import java.io.IOException; +import java.io.InputStream; import java.io.InputStreamReader; import java.io.ObjectOutputStream; +import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; -import java.net.URLEncoder; +import java.nio.MappedByteBuffer; +import java.nio.channels.FileChannel; +import java.nio.channels.FileChannel.MapMode; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; +import java.util.HashMap; import java.util.Iterator; import java.util.List; +import java.util.Map; +import javax.servlet.ServletContext; +import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; @@ -38,22 +50,29 @@ import org.apache.struts.action.ActionMessage; import org.apache.struts.action.ActionMessages; import org.apache.struts.action.DynaActionForm; import org.apache.struts.upload.FormFile; -import org.jdom.Attribute; import org.jdom.Document; import org.jdom.Element; import org.jdom.JDOMException; import org.jdom.input.SAXBuilder; +import com.sun.image.codec.jpeg.JPEGCodec; +import com.sun.image.codec.jpeg.JPEGImageEncoder; +import com.sun.tools.javac.util.Context; + +import antlr.Parser; import br.ufpe.cin.amadeus.amadeus_mobile.sms.Receiver; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Game; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Log; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Module; import br.ufpe.cin.amadeus.amadeus_web.domain.register.AccessInfo; import br.ufpe.cin.amadeus.amadeus_web.domain.register.Image; import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; import br.ufpe.cin.amadeus.amadeus_web.domain.register.Thumbnail; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.UserRequest; +import br.ufpe.cin.amadeus.amadeus_web.domain.settings.WebSettings; import br.ufpe.cin.amadeus.amadeus_web.facade.Facade; -import br.ufpe.cin.amadeus.amadeus_web.struts.action.SettingsActions; +import br.ufpe.cin.amadeus.amadeus_web.struts.action.SystemActions; import br.ufpe.cin.amadeus.amadeus_web.struts.action.content_management.UtilActivities; import br.ufpe.cin.amadeus.amadeus_web.util.AmadeusSessionListener; @@ -65,7 +84,9 @@ public class GameActions extends org.apache.struts.actions.DispatchAction { private final String FORWARD_SHOW_VIEW_NEW_GAME_ACTIVITY = "fShowViewNewGameActivity"; private final String FORWARD_SHOW_VIEW_GAME = "fShowGame"; - + private final String FORWARD_SHOW_PLAY_GAME = "fShowPlayGame"; + private final String FORWARD_SHOW_GRAPHIC_GAME = "fShowGraphicGame"; + public ActionForward showGame(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { @@ -76,9 +97,23 @@ public class GameActions extends org.apache.struts.actions.DispatchAction { Game game = facade.getGameById(gameID); request.getSession().setAttribute("game", game); + + //TODO - LOG - Abertura do Jogo - OK + Log log = SystemActions.getLogUser(request); + log.setCodigo(Log.LOG_CODIGO_ABRIR_JOGO); + log.setIdObjeto(game.getId()); + this.facade.saveLog(log); return mapping.findForward(FORWARD_SHOW_VIEW_GAME); } + + protected Map getKeyMethodMap() { + Map map = new HashMap(); + + map.put("activities.game.changeOrderGame", "changeOrderGame"); + + return map; + } public ActionForward listGames(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { @@ -180,138 +215,304 @@ public class GameActions extends org.apache.struts.actions.DispatchAction { public ActionForward newGame(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { + DynaActionForm myForm = (DynaActionForm) form; ActionMessages messages = new ActionMessages(); Game game = new Game(); game.setName(myForm.getString("nameGame")); - game.setUrl(myForm.getString("urlGame")); game.setDescription(myForm.getString("descriptionGame")); game.setCreationDate(new Date()); - //number validation - try{ - Integer maxUsers = Integer.parseInt(myForm.getString("maxUsers")); - Integer minUsers = Integer.parseInt(myForm.getString("minUsers")); - game.setMaxUsers(maxUsers); - game.setMinUsers(minUsers); - } catch (Exception e){ - messages.add("editError",new ActionMessage(e.getMessage())); - } FormFile myFile = (FormFile) myForm.get("image"); - //photo validation + //Salvando a imagem try { - if(!myFile.getFileName().equals("")){ - if (myFile.getFileSize() < 500000){ //if the photo has less than 500KB - Image image = new Image(); - Thumbnail thumb = new Thumbnail(); - byte[] photo = thumb.resize(myFile.getFileData()); - game.setImage(photo); - }else messages.add("requestError", new ActionMessage("errors.photoSize")); + byte[] byteImagem = myFile.getFileData(); + if(byteImagem.length>0) + { + game.setImage(byteImagem); } - } catch (Exception e) { - messages.add("editError", new ActionMessage(e.getMessage())); + else + { + //Caso não seja informado imagem carrega uma imagem padrão + String classPath = request.getRealPath("/"); + + File f = new File(classPath+"themes/default/imgs/005.jpg"); + FileInputStream fin = null; + FileChannel ch = null; + try { + fin = new FileInputStream(f); + byte fileContent[] = new byte[(int)f.length()]; + fin.read(fileContent); + game.setImage(fileContent); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } finally { + try { + if (fin != null) { + fin.close(); + } + if (ch != null) { + ch.close(); + } + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + } + } catch (FileNotFoundException e1) { + messages.add("editError", new ActionMessage(e1.getMessage())); + } catch (IOException e1) { + messages.add("editError", new ActionMessage(e1.getMessage())); } - - - int moduleId = Integer.parseInt(request.getParameter("moduleId")); Module module = facade.getModuleById(moduleId); - StringBuffer caminho = new StringBuffer(); + + //Salvando o jogo + myFile = (FormFile) myForm.get("urlGame"); + FileOutputStream fout = null; + try { + + byte[] bytes = myFile.getFileData(); + + if(bytes.length>0) + { + String path= request.getRealPath("/"); + String path2 = "/games/"; + String path3 = game.getName()+".swf"; + + //pasta do curso + path2 += "course" + module.getCourse().getId(); + + File f = new File(path+path2); + + if(!f.exists()) + { + f.mkdir(); + } + + //pasta do modulo + path2 += "/module" + moduleId; + + f = new File(path+path2); + + if(!f.exists()) + { + f.mkdir(); + } + + path2 += "/"; + + //Arquivo do jogo + f = new File(path+path2+path3); + int i = 0; + + //caso exista arquivo com mesmo nome + while(f.exists()) + { + path3 = game.getName()+i+".swf"; + f = new File(path+path2+path3); + i++; + } + + fout = new FileOutputStream(f); + fout.write(bytes); + + //ajustar link com host correto + game.setUrl("http://"+SystemActions.webSettings.getSystemGeneralDomain()+path2+path3); + } + else + { + //caso seja link externo + game.setUrl(myForm.getString("externalUrlGame")); + game.setLinkExterno(true); + } - try { - caminho.append("http://" - + request.getServerName() - + ":" - + request.getServerPort() - + "/AmadeusGames" - + "/newgame.do?" - + URLEncoder.encode("nmJogo", "ISO-8859-1") - + "=" - + URLEncoder.encode(game.getName(), "ISO-8859-1") - + "&" - + URLEncoder.encode("caminho", "ISO-8859-1") - + "=" - + URLEncoder.encode(game.getUrl(), "ISO-8859-1") - + "&" - + URLEncoder.encode("comentario", "ISO-8859-1") - + "=" - + URLEncoder.encode(game.getDescription(), "ISO-8859-1") - + "&" - + URLEncoder.encode("curso", "ISO-8859-1") - + "=" - + URLEncoder.encode(Integer.toString(module.getCourse() - .getId()), "ISO-8859-1")); - - URL url = new URL(caminho.toString()); - HttpURLConnection urlcon = (HttpURLConnection) url.openConnection(); - urlcon.setRequestMethod("POST"); - urlcon.setRequestProperty("Content-type", "text/xml;charset=UTF8"); - urlcon.setDoInput(true); - urlcon.setDoOutput(false); - - BufferedReader in = new BufferedReader(new InputStreamReader(urlcon - .getInputStream())); - - SAXBuilder sb = new SAXBuilder(); - - Document docXML = sb.build(new InputStreamReader(urlcon - .getInputStream())); - - in.close(); - urlcon.disconnect(); - - Element root = docXML.getRootElement(); - Attribute result = root.getAttribute("result"); - if (result.getValue().equals("true")) { - List elements = root.getChildren(); - Iterator i = elements.iterator(); - Element element = (Element) i.next(); - // game.setIdMMJogos(Integer.parseInt(element.getText())); - - } else { - messages.add("confirmation", new ActionMessage( + } catch (IOException e) { + e.printStackTrace(); + System.out.println("Erro de leitura do arquivo"); + messages.add("confirmation", new ActionMessage( + "activities.game.serverOut")); + } finally { + try { + if(fout != null) { + fout.close(); + } + } catch (IOException e) { + System.out.println("Erro de fechamento do arquivo"); + messages.add("confirmation", new ActionMessage( "activities.game.serverOut")); - } - - } catch (MalformedURLException e) { - System.out.println("URL mal feita!" + e.getMessage()); - messages.add("confirmation", new ActionMessage( - "activities.game.serverOut")); - } catch (IOException e) { - System.out.println("URL n�o existe!" + e.getMessage()); - messages.add("confirmation", new ActionMessage( - "activities.game.serverOut")); - } catch (JDOMException e) { - System.out.println("Erro na convers�o para XML" + e.getMessage()); - messages.add("confirmation", new ActionMessage( - "activities.game.serverOut")); - } - + } + } + if (!messages.isEmpty()) { saveErrors(request, messages); return mapping.getInputForward(); } else { - game.setModule(module); module.getGames().add(game); facade.flush(); - if(SettingsActions.mobileSettings.getSmsGame().equals("on")){ - Receiver receiver = new Receiver(); - receiver.addMaterial(module.getCourse().getId(), module.getId(), - game.getId()); - } + UtilActivities.eraseAndWriteNameActivity(module.getId()); + + return mapping.findForward("fShowViewNewGameActivity"); + } + } + + public ActionForward editGame(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + + DynaActionForm myForm = (DynaActionForm) form; + ActionMessages messages = new ActionMessages(); + + int idGame = Integer.parseInt(request.getParameter("idGame")); + + facade = Facade.getInstance(); + //alerando tipos simples + Game game = facade.getGameById(idGame); + game.setName(myForm.getString("nameGame")); + game.setDescription(myForm.getString("descriptionGame")); + + //alterar imagem + FormFile myFile = (FormFile) myForm.get("image"); + + try { + byte[] byteImagem = myFile.getFileData(); + if(byteImagem.length>0) + { + game.setImage(byteImagem); + } + } catch (FileNotFoundException e1) { + messages.add("editError", new ActionMessage(e1.getMessage())); + } catch (IOException e1) { + messages.add("editError", new ActionMessage(e1.getMessage())); + } + + Module module = game.getModule(); + + //aletrando url + myFile = (FormFile) myForm.get("urlGame"); + FileOutputStream fout = null; + try { + + byte[] bytes = myFile.getFileData(); + + if(bytes.length>0) + { + // deletando swf antigo + if(!game.getLinkExterno()) + { + String path= request.getRealPath("/"); + String path3 = game.getUrl().substring(33); + + File file = new File(path+path3); + + file.delete(); + } + //salvando o novo + String path= request.getRealPath("/"); + String path2 = "//games//"; + String path3 = game.getName()+".swf"; + + + //pasta do curso + path2 += "course" + module.getCourse().getId(); + + File f = new File(path+path2); + + if(!f.exists()) + { + f.mkdir(); + } + + //pasta do modulo + path2 += "/module" + module.getId(); + + f = new File(path+path2); + + if(!f.exists()) + { + f.mkdir(); + } + + path2 += "/"; + + f = new File(path+path2+path3); + int i = 0; + + while(f.exists()) + { + path3 = game.getName()+i+".swf"; + f = new File(path+path2+path3); + i++; + } + + fout = new FileOutputStream(f); + fout.write(bytes); + + //ajustar link com host correto + game.setUrl("http://"+SystemActions.webSettings.getSystemGeneralDomain()+path2+path3); + game.setLinkExterno(false); + } + else + { + String externalLink = myForm.getString("externalUrlGame"); + if(!externalLink.equals("")) + { + // deletando swf antigo + if(!game.getLinkExterno()) + { + String path= request.getRealPath("/"); + String path3 = game.getUrl().substring(33); + + File file = new File(path+path3); + + file.delete(); + } + //atualinado link externo + game.setUrl(externalLink); + game.setLinkExterno(true); + } + } + + } catch (IOException e) { + e.printStackTrace(); + System.out.println("Erro de leitura do arquivo"); + messages.add("confirmation", new ActionMessage( + "activities.game.serverOut")); + } finally { + try { + if(fout != null) { + fout.close(); + } + } catch (IOException e) { + System.out.println("Erro de fechamento do arquivo"); + messages.add("confirmation", new ActionMessage( + "activities.game.serverOut")); + } + } + + if (!messages.isEmpty()) { + saveErrors(request, messages); + } else { + + module.getGames().add(game); + + facade.flush(); UtilActivities.eraseAndWriteNameActivity(module.getId()); - return null; } + return null; } public ActionForward saveGame(ActionMapping mapping, ActionForm form, @@ -379,7 +580,7 @@ public class GameActions extends org.apache.struts.actions.DispatchAction { messages.add("confirmation", new ActionMessage( "activities.game.serverOut")); } catch (IOException e) { - System.out.println("URL n�o existe!" + e.getMessage()); + System.out.println("URL n�o existe!" + e.getMessage()); messages.add("confirmation", new ActionMessage( "activities.game.serverOut")); } @@ -393,66 +594,31 @@ public class GameActions extends org.apache.struts.actions.DispatchAction { public ActionForward deleteGame(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { + Facade facade = Facade.getInstance(); - ActionMessages messages = new ActionMessages(); - int idModule = Integer.parseInt(request.getParameter("idModule")) - 1; +// ActionMessages messages = new ActionMessages(); int idGame = Integer.parseInt(request.getParameter("idGame")); - - Course courseSession = (Course) request.getSession().getAttribute( - "course"); - int idCourse = courseSession.getId(); - int idModuleBD = courseSession.getModules().get(idModule).getId(); - - Module module = facade.getModuleById(idModuleBD); - + Game game = facade.getGameById(idGame); - module.getGames().remove(game); - facade.updateModule(module); - Course courseResult = facade.getCoursesById(idCourse); - - StringBuffer caminho = new StringBuffer(); - - try { - // caminho.append( - // "http://" + request.getServerName() + ":" + - // request.getServerPort() + "/AmadeusGames" - // + "/removegame.do?" - // + URLEncoder.encode("id", "ISO-8859-1") - // + "=" - // + URLEncoder.encode(Integer.toString(game.getIdMMJogos()), - // "ISO-8859-1") - // ); - - URL url = new URL(caminho.toString()); - HttpURLConnection urlcon = (HttpURLConnection) url.openConnection(); - urlcon.setRequestMethod("POST"); - urlcon.setRequestProperty("Content-type", "text/xml;charset=UTF8"); - urlcon.setDoInput(true); - urlcon.setDoOutput(false); - - BufferedReader in = new BufferedReader(new InputStreamReader(urlcon - .getInputStream())); - - in.close(); - urlcon.disconnect(); - - } catch (MalformedURLException e) { - System.out.println("URL mal feita!" + e.getMessage()); - messages.add("confirmation", new ActionMessage( - "activities.game.serverOut")); - } catch (IOException e) { - System.out.println("URL n�o existe!" + e.getMessage()); - messages.add("confirmation", new ActionMessage( - "activities.game.serverOut")); + + if(!game.getLinkExterno()) + { + String path= request.getRealPath("/");//System.getProperty("catalina.base"); + String path2 = ""; + String path3 = game.getUrl().substring(33); + + File file = new File(path+path2+path3); + + file.delete(); } + Module module = game.getModule(); + int idModule = module.getId(); + + module.getGames().remove(game); + + facade.flush(); - request.getSession().removeAttribute("course"); - request.getSession().setAttribute("course", courseResult); - - /*Receiver receiver = new Receiver(); - receiver - .addMaterial(courseResult.getId(), module.getId(), game.getId());*/ UtilActivities.eraseAndWriteNameActivity(idModule); return null; @@ -464,133 +630,142 @@ public class GameActions extends org.apache.struts.actions.DispatchAction { String type = (String) request.getParameter("type"); int idMMJogos = Integer.parseInt(request.getParameter("idMMJogos")); - ActionMessages messages = new ActionMessages(); - int typeId = 0; - if (type.equals("top5")) { - typeId = 1; + + String data = ""; + if (type.equals("grupo")) { + data = facade.getJSONArrayGameGrid(idMMJogos); } - if (type.equals("date")) { - typeId = 2; + else if (type.equals("individual")) { + int idUser = Integer.parseInt(request.getParameter("idUser")); + data = facade.getJSONArrayGameGridByUser(idMMJogos, idUser); } - if (type.equals("user")) { - typeId = 3; + else if (type.equals("visualizacao")) { + data = facade.getJSONArrayGameScoreVisualizacao(idMMJogos); } - - StringBuffer caminho = new StringBuffer(); - Document docXML = null; - caminho.append("http://" + request.getServerName() + ":" - + request.getServerPort() + "/AmadeusGames" - + "/score.jsp?type=" + typeId + "&idjogo=" + idMMJogos); - - List score = new ArrayList(); - - try { - URL url = new URL(caminho.toString()); - HttpURLConnection urlcon = (HttpURLConnection) url.openConnection(); - urlcon.setRequestMethod("GET"); - urlcon.setRequestProperty("Content-type", "text/xml;charset=UTF8"); - urlcon.setDoInput(true); - urlcon.setDoOutput(false); - - BufferedReader in = new BufferedReader(new InputStreamReader(urlcon - .getInputStream())); - - SAXBuilder sb = new SAXBuilder(); - - docXML = sb.build(new InputStreamReader(urlcon.getInputStream())); - - in.close(); - urlcon.disconnect(); - - } catch (MalformedURLException e) { - System.out.println("URL mal feita!" + e.getMessage()); - messages.add("confirmation", new ActionMessage( - "activities.game.serverOut")); - } catch (IOException e) { - System.out.println("URL n�o existe!" + e.getMessage()); - messages.add("confirmation", new ActionMessage( - "activities.game.serverOut")); - } catch (JDOMException e) { - System.out.println("Erro na convers�o para XML" + e.getMessage()); - messages.add("confirmation", new ActionMessage( - "activities.game.serverOut")); - } - - if (!messages.isEmpty()) { - saveErrors(request, messages); - return mapping.getInputForward(); - } else { - - // TODO arrumar data na exibi��o (MM JOGOS) - SimpleDateFormat formater = new SimpleDateFormat("dd/MM/yyyy"); - - Element m = docXML.getRootElement(); - List elements = m.getChildren(); - Iterator i = elements.iterator(); - if (i.hasNext()) { - Element element = (Element) i.next();// Pega o tipo do - // score - // System.out.println(element.getAttributeValue("type")+"\n"); - - if (type.equals("top5")) { - elements = element.getChildren(); - i = elements.iterator(); - while (i.hasNext()) { - element = (Element) i.next(); - score.add(element.getText()); - score.add(element.getAttributeValue("dt_entrada")); - score.add(element.getAttributeValue("tempo")); - score.add(element.getAttributeValue("score")); - } - } else { - if (type.equals("user") || type.equals("date")) { - elements = element.getChildren(); - i = elements.iterator(); - while (i.hasNext()) { - element = (Element) i.next(); - - List user = element.getChildren(); - Iterator ii = user.iterator(); - while (ii.hasNext()) { - Element userElement = (Element) ii.next(); - if (type.equals("user")) { - score - .add(element - .getAttributeValue("user")); - score.add(userElement - .getAttributeValue("dt_entrada")); - score.add(userElement - .getAttributeValue("tempo")); - score.add(userElement.getText());// Score - } else { - score - .add(element - .getAttributeValue("date")); - score.add(userElement.getText());// Jogador - score.add(userElement - .getAttributeValue("tempo")); - score.add(userElement - .getAttributeValue("score")); - } - } - } - - } - } - } - } - - request.removeAttribute("score"); - request.setAttribute("score", score); - - request.removeAttribute("typeScore"); - request.setAttribute("typeScore", type); - - request.removeAttribute("idMMJogos"); - request.setAttribute("idMMJogos", Integer.toString(idMMJogos)); + + request.setAttribute("data", data); + request.setAttribute("type", type); + request.setAttribute("domain", SystemActions.webSettings.getSystemGeneralDomain()); return mapping.findForward("fShowViewScoreGames"); + +// StringBuffer caminho = new StringBuffer(); +// Document docXML = null; +// caminho.append("http://" + request.getServerName() + ":" +// + request.getServerPort() + "/AmadeusGames" +// + "/score.jsp?type=" + typeId + "&idjogo=" + idMMJogos); +// +// List score = new ArrayList(); +// +// try { +// URL url = new URL(caminho.toString()); +// HttpURLConnection urlcon = (HttpURLConnection) url.openConnection(); +// urlcon.setRequestMethod("GET"); +// urlcon.setRequestProperty("Content-type", "text/xml;charset=UTF8"); +// urlcon.setDoInput(true); +// urlcon.setDoOutput(false); +// +// BufferedReader in = new BufferedReader(new InputStreamReader(urlcon +// .getInputStream())); +// +// SAXBuilder sb = new SAXBuilder(); +// +// docXML = sb.build(new InputStreamReader(urlcon.getInputStream())); +// +// in.close(); +// urlcon.disconnect(); +// +// } catch (MalformedURLException e) { +// System.out.println("URL mal feita!" + e.getMessage()); +// messages.add("confirmation", new ActionMessage( +// "activities.game.serverOut")); +// } catch (IOException e) { +// System.out.println("URL n�o existe!" + e.getMessage()); +// messages.add("confirmation", new ActionMessage( +// "activities.game.serverOut")); +// } catch (JDOMException e) { +// System.out.println("Erro na convers�o para XML" + e.getMessage()); +// messages.add("confirmation", new ActionMessage( +// "activities.game.serverOut")); +// } +// +// if (!messages.isEmpty()) { +// saveErrors(request, messages); +// return mapping.getInputForward(); +// } else { +// +// // TODO arrumar data na exibi��o (MM JOGOS) +// SimpleDateFormat formater = new SimpleDateFormat("dd/MM/yyyy"); +// +// Element m = docXML.getRootElement(); +// List elements = m.getChildren(); +// Iterator i = elements.iterator(); +// if (i.hasNext()) { +// Element element = (Element) i.next();// Pega o tipo do +// // score +// // System.out.println(element.getAttributeValue("type")+"\n"); +// +// if (type.equals("top5")) { +// elements = element.getChildren(); +// i = elements.iterator(); +// while (i.hasNext()) { +// element = (Element) i.next(); +// score.add(element.getText()); +// score.add(element.getAttributeValue("dt_entrada")); +// score.add(element.getAttributeValue("tempo")); +// score.add(element.getAttributeValue("score")); +// } +// } else { +// if (type.equals("user") || type.equals("date")) { +// elements = element.getChildren(); +// i = elements.iterator(); +// while (i.hasNext()) { +// element = (Element) i.next(); +// +// List user = element.getChildren(); +// Iterator ii = user.iterator(); +// while (ii.hasNext()) { +// Element userElement = (Element) ii.next(); +// if (type.equals("user")) { +// score +// .add(element +// .getAttributeValue("user")); +// score.add(userElement +// .getAttributeValue("dt_entrada")); +// score.add(userElement +// .getAttributeValue("tempo")); +// score.add(userElement.getText());// Score +// } else { +// score +// .add(element +// .getAttributeValue("date")); +// score.add(userElement.getText());// Jogador +// score.add(userElement +// .getAttributeValue("tempo")); +// score.add(userElement +// .getAttributeValue("score")); +// } +// } +// } +// +// } +// } +// } +// } +// +// score.add("50"); +// +// request.removeAttribute("score"); +// request.setAttribute("score", score); +// +// request.removeAttribute("typeScore"); +// request.setAttribute("typeScore", type); +// +// request.removeAttribute("idMMJogos"); +// request.setAttribute("idMMJogos", Integer.toString(idMMJogos)); +// + } public ActionForward showPlayerGame(ActionMapping mapping, ActionForm form, @@ -631,11 +806,11 @@ public class GameActions extends org.apache.struts.actions.DispatchAction { messages.add("confirmation", new ActionMessage( "activities.game.serverOut")); } catch (IOException e) { - System.out.println("URL n�o existe!" + e.getMessage()); + System.out.println("URL n�o existe!" + e.getMessage()); messages.add("confirmation", new ActionMessage( "activities.game.serverOut")); } catch (JDOMException e) { - System.out.println("Erro na convers�o para XML" + e.getMessage()); + System.out.println("Erro na convers�o para XML" + e.getMessage()); messages.add("confirmation", new ActionMessage( "activities.game.serverOut")); } @@ -672,5 +847,136 @@ public class GameActions extends org.apache.struts.actions.DispatchAction { return mapping.findForward("fshowPlayerGame"); } - + + public ActionForward playGame(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) throws Exception { + + int gameId = Integer.parseInt(request.getParameter("gameId")); + Game game = facade.getGameById(gameId); + + request.setAttribute("game", game); + + //TODO - LOG - Jogo - OK + Log log = SystemActions.getLogUser(request); + log.setCodigo(Log.LOG_CODIGO_ABRIR_JOGO); + log.setIdObjeto(game.getId()); + this.facade.saveLog(log); + + return mapping.findForward(FORWARD_SHOW_PLAY_GAME); + } + + public ActionForward showGraphicGame(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) throws Exception { + + int gameId = Integer.parseInt(request.getParameter("gameId")); + Game game = facade.getGameById(gameId); + String graphic = request.getParameter("graphic"); + + + request.setAttribute("game", game); + request.setAttribute("graphic", graphic); + + + String data = calcGameGraphicData(graphic, gameId); + request.setAttribute("xml", data); + request.setAttribute("domain", SystemActions.webSettings.getSystemGeneralDomain()); + + return mapping.findForward(FORWARD_SHOW_GRAPHIC_GAME); + } + + + private String calcGameGraphicData(String graphic, int idGame) + { + String data = ""; + + if(graphic.equals("g1")) + { + data = + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""+ + ""; + } + else if(graphic.equals("g2")) + { + data = "[{\"Profit\":2000,\"Expenses\":1500,\"Amount\":450,\"Month\":\"Jan\"},{\"Profit\":1000,\"Expenses\":200,\"Amount\":600,\"Month\":\"Feb\"},{\"Profit\":1500,\"Expenses\":500,\"Amount\":300,\"Month\":\"Mar\"},{\"Profit\":1800,\"Expenses\":1200,\"Amount\":900,\"Month\":\"Apr\"},{\"Profit\":2400,\"Expenses\":575,\"Amount\":500,\"Month\":\"May\"}]"; + } + else if(graphic.equals("g3")) + { + data = facade.getJSONArrayGameScore(idGame); + } + else if(graphic.equals("g4")) + { + data = facade.getJSONArrayGameScore(idGame); + } + else if(graphic.equals("g5")) + { + data = facade.getXmlGameScore(idGame); + } + else if(graphic.equals("g6")) + { + data = facade.getJSONArrayGameLevel(idGame); + } + else if(graphic.equals("g7")) + { + data = facade.getJSONArrayGameLevel(idGame); + } + else if(graphic.equals("g8")) + { + data = facade.getXmlGameLevel(idGame); + } + else if(graphic.equals("g9")) + { + data = facade.getJSONArrayGameMeta(idGame); + } + else if(graphic.equals("g10")) + { + data = facade.getJSONObjectTempoLevelPontuacao(idGame); + } + else if(graphic.equals("g11")) + { + data = facade.getJSONObjectTempoQuantidadePartidas(idGame); + } + else if(graphic.equals("g12")) + { + data = facade.getJSONObjectLevelPontuacao(idGame); + } + return data; + } + + + public void viewImage(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) throws Exception { + + int gameId = Integer.parseInt(request.getParameter("gameId")); + Game game = facade.getGameById(gameId); + + response.setContentType("image/jpeg"); + response.getOutputStream().write(game.getImage()); + response.getOutputStream().flush(); + response.getOutputStream().close(); + } + } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/learning_object/HistoryLearningObjectActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/learning_object/HistoryLearningObjectActions.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/learning_object/LearningObjectActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/learning_object/LearningObjectActions.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/material/MaterialActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/material/MaterialActions.java old mode 100644 new mode 100755 index 18fb620..3397730 --- a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/material/MaterialActions.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/material/MaterialActions.java @@ -19,6 +19,7 @@ import java.io.PrintWriter; import java.util.Calendar; import java.util.Date; import java.util.List; +import java.util.Date; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -38,6 +39,7 @@ import org.apache.struts.util.ModuleUtils; import br.ufpe.cin.amadeus.amadeus_mobile.sms.Receiver; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Archive; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Log; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Material; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.MaterialRequest; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Module; @@ -114,7 +116,14 @@ public class MaterialActions extends org.apache.struts.actions.DispatchAction { Archive a = new Archive(); a.setArchive(archive.getFileData()); material.setArchive(a); - material.setExtension(archive.getFileName()); + String fileName = archive.getFileName(); + String[] extension = fileName.split("\\."); + System.out.println(archive.getFileSize()); + if (extension.length == 0) { + new InvalidMaterialException("editError"); + }else { + material.setExtension(extension[extension.length - 1]); + } } catch (InvalidMaterialException e) { messages.add("editError", new ActionMessage(e.getMessage())); } catch (Exception e) { @@ -222,6 +231,12 @@ public class MaterialActions extends org.apache.struts.actions.DispatchAction { script.append(""); + //TODO - LOG - Entrega de atividade - OK + Log log = SystemActions.getLogUser(request); + log.setCodigo(Log.LOG_CODIGO_ENTREGAR_MATERIAL); + log.setIdObjeto(material.getId()); + this.facade.saveLog(log); + out.print(script.toString()); return null; @@ -604,7 +619,7 @@ public class MaterialActions extends org.apache.struts.actions.DispatchAction { Material material = facade.getMaterialByID(idActivity); response.addHeader("Content-Disposition", - "attachment; filename=" + material.getExtension().replace(' ', '_')); + "attachment; filename=" + material.getArchiveName()+ "." + material.getExtension().replace(' ', '_')); response.setContentType(UtilActivities.defineContentType(material.getExtension())); OutputStream out; @@ -618,7 +633,12 @@ public class MaterialActions extends org.apache.struts.actions.DispatchAction { } catch (IOException e) { e.printStackTrace(); - } + } + //TODO - LOG - Visualizacao de Material - OK + Log log = SystemActions.getLogUser(request); + log.setCodigo(Log.LOG_CODIGO_VISUALIZACAO_MATERIAL); + log.setIdObjeto(material.getId()); + this.facade.saveLog(log); return null; } @@ -653,6 +673,7 @@ public class MaterialActions extends org.apache.struts.actions.DispatchAction { return forward; } + public ActionForward saveMaterialGrade(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/mobile/MobileActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/mobile/MobileActions.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/poll/PollActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/poll/PollActions.java old mode 100644 new mode 100755 index ab117e3..f645302 --- a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/poll/PollActions.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/poll/PollActions.java @@ -31,6 +31,7 @@ import br.ufpe.cin.amadeus.amadeus_mobile.sms.Receiver; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Answer; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Choice; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Log; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Module; import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Poll; import br.ufpe.cin.amadeus.amadeus_web.domain.register.AccessInfo; @@ -321,6 +322,12 @@ public class PollActions extends org.apache.struts.actions.DispatchAction{ answerPollBD(idAlternative, idPoll, loggedUser); + //TODO - LOG - Reposta enquete - OK + Log log = SystemActions.getLogUser(request); + log.setCodigo(Log.LOG_CODIGO_RESPOSTA_ENQUETE); + log.setIdObjeto(idPoll); + this.facade.saveLog(log); + return null; } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/video/NewVideoIrizFromURLAction.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/video/NewVideoIrizFromURLAction.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/video/NewVideoIrizUploadStep1Action.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/video/NewVideoIrizUploadStep1Action.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/video/OpenEditVideoIrizAction.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/video/OpenEditVideoIrizAction.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/video/ShowVideoIrizStatusAction.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/video/ShowVideoIrizStatusAction.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/video/VideoActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/video/VideoActions.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/video/VideoChatAction.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/content_management/video/VideoChatAction.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/manager/ManagerUserActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/manager/ManagerUserActions.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/openid/OpenIDActions.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/action/openid/OpenIDActions.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/messages/MessageResources_en_US.properties b/src/br/ufpe/cin/amadeus/amadeus_web/struts/messages/MessageResources_en_US.properties old mode 100644 new mode 100755 index 45cc909..1e7cec7 --- a/src/br/ufpe/cin/amadeus/amadeus_web/struts/messages/MessageResources_en_US.properties +++ b/src/br/ufpe/cin/amadeus/amadeus_web/struts/messages/MessageResources_en_US.properties @@ -53,6 +53,8 @@ general.email=E-mail general.login=Login general.password=Password general.send=Send +general.generatepdfreport=Generate PDF report +general.tools=Tools #-- User account -- userRegistrationForm.heading=New account @@ -88,7 +90,7 @@ editUserForm.stateCity=State and city editUserForm.stateCityDescription=Your state and city editUserForm.photo=Photo editUserForm.photoDescription=Select an image to your photo -editUserForm.edit=Save +editUserForm.edit=editUser editUserForm.requiredFields=* Required fields #-- This part also includes a request for monitoring and teaching-- @@ -154,6 +156,8 @@ userPrivateData.degree=Degree userPrivateData.year=Year userPrivateData.institution=Institution userPrivateData.description=Resume +userPrivateData.twitterLink=Twitter Link +userPrivateData.facebookLink=Facebook Link # -- User Public Data -- userPublicData.heading=Profile of @@ -175,7 +179,9 @@ sideMenu.myProfile=My Profile sideMenu.listParticipants=Participants sideMenu.deleteCourse=Delete Course sideMenu.onlineUser=Online Users - +sideMenu.integrationSocialNetworks=Integration With Social Networks +sideMenu.socialInteractionMonitoring = Social Interaction Monitoring +sideMenu.socialInteractionMonitoringReports = Reports - Social Interaction Monitoring # -- teaching request teachingRequest.title=Request Teaching teachingRequest.heading=Request Teaching @@ -191,8 +197,8 @@ pendingTasks.notHave=No pendings pendingTasks.justification=Justification approveAssistanceRequest=Approve disapproveAssistanceRequest=Disapprove -approveTeachingRequest=Approve -disapproveTeachingRequest=Disapprove +approveTeachingRequest=Aprovacao +disapproveTeachingRequest=Reprovacao justificationAssistanceRequest=You must write a justification # -- general request @@ -262,6 +268,11 @@ courseForm.keywords=Keywords courseForm.stepTwoDescription=Enter keywords related to the course (separated by commas) courseForm.nextStep=Next courseForm.course=Course +courseForm.socialInteractionMonitoring=Social Interaction Monitoring +courseForm.socialInteractionMonitoringInitialDay=Initial Day +courseForm.socialInteractionMonitoringFinalDay=Final Day +courseForm.socialInteractionMonitoringReports=Reports - Social Interaction Monitoring +courseForm.socialInteractionMonitoringMetrics=Métrics #-- View Course -- viewCourse.courseName=Course name @@ -366,10 +377,13 @@ activities.forum.topic=Topic activities.forum.description=Description activities.forum.message=Forum message activities.forum.dateOpen=Open date: -activities.forum.answer=Answer +activities.forum.answer=Reply to this post activities.forum.dateFormat=mm/dd/yyyy activities.forum.send=Send activities.forum.cancel=Cancel +activities.forum.newpost=New Post +activities.forum.inreplyauthor=Originally posted by +activities.forum.inreplyto=In response to the text originally posted by #-- Video activities -- activities.video.name=Title @@ -397,6 +411,14 @@ errors.video.URL.invalid=Video address is invalid errors.video.URL.tooLong=Video address can have up to 255 characters errors.video.videoFile.required=File is required +# -- integrationSocialNetworks.jsp -- +integrationSocialNetworks.heading=Integrate with Social Networks +integrationSocialNetworks.twitterLogin=Twitter Login +integrationSocialNetworks.facebookLogin=Facebook Login +integrationSocialNetworks.edit=Edit +integrationSocialNetworks.success=Profiles of social networking successfully updated +integrationSocialNetworks.integrate=Save + #-- Material Activities -- activities.material.archive=File activities.material.name=Name @@ -446,7 +468,7 @@ activities.game.name=Game name activities.game.maxUsers=Max. Users activities.game.minUsers=Min. Users activities.game.image=Image -activities.game.URL=URL +activities.game.URL=SWF activities.game.URL.help= URL must start with "http://" and must be a Java Server Page (".jsp") for games activities.game.description=Description activities.game.playersOnline=On-Line players @@ -461,6 +483,7 @@ activities.game.score.user=User activities.game.score.date=Data activities.game.noScore=No score activities.game.serverOut=Games server is out! +activities.game.changeOrderGame=changeOrderGame #-- Learning Objects Activities -- activities.learningObject.title=Add new media @@ -629,6 +652,7 @@ errors.invalidDate.day=Invalid day errors.invalidDate.month=Invalid month errors.invalidDate.year=Invalid year errors.module.nameExists=There is already a module with that name. +errors.invalidTwitterLogin=Twitter Login too big # -- list courses listCourses.title=Search result @@ -728,10 +752,12 @@ user.showViewAllCoursesInManagerUsers=showViewAllCoursesInManagerUsers user.showViewUserNewInManagerUsers=showViewUserNewInManagerUsers user.showViewEditUserInManagerUsers=showViewEditUserInManagerUsers user.userNewInManagerUsers=userNewInManagerUsers +user.userEditInManagerUsers=userEditInManagerUsers user.showViewUserProfileInManagerUsers=showViewUserProfileInManagerUsers user.showViewSendMailInManagerUsers=showViewSendMailInManagerUsers user.sendMailInManagerUsers=sendMailInManagerUsers user.verifyEmail=verifyEmail +user.showViewIntegrationSocialNetworks=showViewIntegrationSocialNetworks #-- MAP Action method course -- course.viewDeleteConfirmation=viewDeleteConfirmation @@ -740,11 +766,16 @@ course.showViewCourse=showViewCourse course.showViewCourseNotLogged=showViewCourseNotLogged course.showViewCourseParticipants=showViewCourseParticipants course.showViewEditCourse=showViewEditCourse +course.showViewSocialInteractionMonitoring=showViewSocialInteractionMonitoring +course.showViewSocialInteractionMonitoringReports=showViewSocialInteractionMonitoringReports course.showViewShowModules=showViewShowModules course.showViewCourseEvaluations=showViewCourseEvaluations course.showViewSendMail=showViewSendMail course.sendMailForCourseParticipants=sendMailForCourseParticipants course.changeTeacher=changeTeacher +course.viewChangeTeacher=viewChangeTeacher +course.showViewGraphic=showViewGraphic +course.showPlayGame=showPlayGame #-- MAP Action method module -- module.showViewEditModule=showViewEditModule @@ -769,7 +800,9 @@ forumActivity.editForumActivity=editForumActivity forumActivity.deleteForumActivity=deleteForumActivity forumActivity.showViewListMessagesForumActivity=showViewListMessagesForumActivity forumActivity.showViewNewAnswerForumActivity=showViewNewAnswerForumActivity +forumActivity.showViewNewAnswerForumActivityWithMessage=showViewNewAnswerForumActivityWithMessage forumActivity.answerForumActivity=answerForumActivity +forumActivity.answerForumActivityWithMessage=answerForumActivityWithMessage #-- Map Action method EXTERNAL LINK material -- externalLinkMaterial.showViewExternalLink=showViewExternalLink @@ -785,6 +818,22 @@ manager.user.searchUsers=searchUsers manager.user.removeUser=removeUser manager.user.allowUserLogon=allowUserLogon +#-- Map Action method message ADD BY Nailson Cunha +messenger.saveMessage=saveMessage +messenger.getUnreadMessages=getUnreadMessages +messenger.replyMessage=replyMessage +messenger.setMessageAsRead=setMessageAsRead +messenger.deleteMessage=deleteMessage +messenger.sendMessageToAll=sendMessageToAll +messenger.replyMessageToAll=replyMessageToAll +messenger.showViewAllMessengerMessages=showViewAllMessengerMessages +social.showViewSocialNetworkMonitoring=showViewSocialNetworkMonitoring +social.startSocialNetworkMonitoring=startSocialNetworkMonitoring +social.stopSocialNetworkMonitoring=stopSocialNetworkMonitoring +social.testMessageTool=testMessageTool +social.testTwitterTool=testTwitterTool +social.showViewTestTools=showViewTestTools + #-- OpenID -- openID.youAlreadyHaveThisOpenID=You already have this OpenID associated to your Amadeus account. openID.googleAccount=Google Account @@ -821,4 +870,9 @@ managerUsers.profileType=*Profile type: managerUsers.profileType.type=Type managerUsers.profileType.admin=Administrator managerUsers.profileType.student=Student -managerUsers.profileType.professor=Teacher \ No newline at end of file +managerUsers.profileType.professor=Teacher + +#-- Log -- +log.saveLog=saveLog +log.saveLogViewMaterial=saveLogViewMaterial +log.saveLogViewVideo=saveLogViewVideo \ No newline at end of file diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/messages/MessageResources_es.properties b/src/br/ufpe/cin/amadeus/amadeus_web/struts/messages/MessageResources_es.properties old mode 100644 new mode 100755 index a7ed658..58e9c37 --- a/src/br/ufpe/cin/amadeus/amadeus_web/struts/messages/MessageResources_es.properties +++ b/src/br/ufpe/cin/amadeus/amadeus_web/struts/messages/MessageResources_es.properties @@ -150,6 +150,8 @@ userPrivateData.degree=Titulo userPrivateData.year=Año userPrivateData.institution=Institución userPrivateData.description=Currículo +userPrivateData.twitterLink=Twitter Link +userPrivateData.facebookLink=Facebook Link #Datos del grado: userPrivateData.degree.degree1=Ed. General Básica @@ -180,6 +182,7 @@ sideMenu.editCourse=Editar Curso sideMenu.myProfile=Mi Perfil sideMenu.listParticipants=Listar Participantes sideMenu.deleteCourse=Eliminar Curso +sideMenu.integrationSocialNetworks=Integración con redes sociales # -- teaching request teachingRequest.title=Solicitar Docencia @@ -362,12 +365,15 @@ activities.forum.topic=Tópico del Foro activities.forum.description=Descripción del Foro activities.forum.message=Mensage del Foro activities.forum.dateOpen=Apertura: -activities.forum.answer=Responder +activities.forum.answer=Responder a este mensaje activities.forum.close=Cerrar activities.forum.send=Enviar activities.forum.cancel=Cancelar activities.forum.back=Volver activities.forum.dateFormat=dd/mm/aaaa +activities.forum.newpost=Publicar Nuevo +activities.forum.inreplyauthor=Originalmente publicado por +activities.forum.inreplyto=En respuesta al texto originalmente publicado por #-- Video atividades -- @@ -462,7 +468,7 @@ activities.game.score.user=Usuario activities.game.score.date=Fecha activities.game.noScore=Sin datos activities.game.serverOut=Micro-Mundo de Juegos fuera de servicio! - +activities.game.changeOrderGame=changeOrderGame #-- Learning Objects Atividades -- activities.learningObject.title=Agregar nueva media para celular @@ -599,6 +605,7 @@ errors.invalidDate.day=Día invalido errors.invalidDate.month=Mes invalido errors.invalidDate.year=Año invalido errors.module.nameExists=Ya existe un módulo con este nombre. +errors.invalidTwitterLogin=Login do Twitter demasiado grande # -- list courses listCourses.title=Resultado de la Busqueda @@ -716,3 +723,8 @@ help.faq.first.ans=Amadeus es un sistema Web para la gestión de contenido help.modules.desc=Te ayudamos a utilizar y acceder a las diversas actividades de los Módulos que se encuentran dentro de los cursos. + +#-- Log -- +log.saveLog=saveLog +log.saveLogViewMaterial=saveLogViewMaterial +log.saveLogViewVideo=saveLogViewVideo \ No newline at end of file diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/messages/MessageResources_pt_BR.properties b/src/br/ufpe/cin/amadeus/amadeus_web/struts/messages/MessageResources_pt_BR.properties old mode 100644 new mode 100755 index c808624..5d675be --- a/src/br/ufpe/cin/amadeus/amadeus_web/struts/messages/MessageResources_pt_BR.properties +++ b/src/br/ufpe/cin/amadeus/amadeus_web/struts/messages/MessageResources_pt_BR.properties @@ -21,7 +21,7 @@ general.managerCourse=Gerenciar Cursos general.title=Projeto Amadeus general.heading=Projeto Amadeus_MM general.submit=Entrar -general.leave=Sair +general.leave=Quit general.register=Cadastrar general.update=Atualizar general.search=Buscar @@ -51,6 +51,8 @@ general.email=E-mail general.login=Login general.password=Senha general.send=Enviar +general.generatepdfreport=Gerar relatório em PDF +general.tools=Ferramentas #-- cadastroUsuario -- userRegistrationForm.heading=Nova conta @@ -87,7 +89,7 @@ editUserForm.stateCity=Estado e Cidade editUserForm.stateCityDescription=Seu estado e cidade editUserForm.photo=Foto editUserForm.photoDescription=Selecione uma imagem para ser sua foto -editUserForm.edit=Salvar +editUserForm.edit=editUser editUserForm.requiredFields=* Campos de Preenchimento Obrigatório #-- Essa parte também inclui solicitação de monitoria e docência-- @@ -132,6 +134,14 @@ editPassword.newPasswordConfirmationDescription=Confirme sua nova senha editPassword.edit=Editar editPassword.success=Senha alterada com sucesso +# -- integrationSocialNetworks.jsp -- +integrationSocialNetworks.heading=Integrar com redes sociais +integrationSocialNetworks.twitterLogin=Login do Twitter +integrationSocialNetworks.facebookLogin=Login do Facebook +integrationSocialNetworks.edit=Editar +integrationSocialNetworks.success=Cadastro de redes sociais atualizado com sucesso +integrationSocialNetworks.integrate=Salvar + #-- Dados do usuário -- userPrivateData.title=Visualizar Dados Pessoais de Outro userPrivateData.title2=Meu Perfil @@ -153,6 +163,8 @@ userPrivateData.degree=Titula userPrivateData.year=Ano userPrivateData.institution=Instituição userPrivateData.description=Currículo +userPrivateData.twitterLink=Link do Twitter +userPrivateData.facebookLink=Link do Facebook # -- Dados Publicos do Usuario -- userPublicData.heading=Perfil de @@ -174,7 +186,9 @@ sideMenu.myProfile=Meu Perfil sideMenu.listParticipants=Participantes sideMenu.deleteCourse=Remover Curso sideMenu.onlineUser=Usuários Online - +sideMenu.integrationSocialNetworks=Integrar Com Redes Sociais +sideMenu.socialInteractionMonitoring = Monitoramento de interações sociais +sideMenu.socialInteractionMonitoringReports = Relatórios - Monitoramento de interações sociais # -- teaching request teachingRequest.title=Solicitar Docência teachingRequest.heading=Solicitar Docência @@ -225,6 +239,7 @@ assistanceRequest.amadeus=Plataforma de Educa #Erros requisicao errors.request=Ocorreu algum problema no processamento +errors.date.birthDataIsAfterNow=A data de nascimento está inválida! @@ -265,6 +280,10 @@ courseForm.stepTwoDescription=Insira as palavras-chave referentes ao curso separ courseForm.nextStep=Avançar courseForm.nextStepReplication=Avançar Replicação courseForm.course=Curso +courseForm.socialInteractionMonitoring=Monitoramento de Interações Sociais +courseForm.socialInteractionMonitoringInitialDay=Data início +courseForm.socialInteractionMonitoringFinalDay=Data fim +courseForm.socialInteractionMonitoringMetrics=Métricas #-- Visualizar Curso -- viewCourse.courseName=Nome do curso @@ -370,10 +389,13 @@ activities.forum.topic=T activities.forum.description=Descrição activities.forum.message=Mensagem do Fórum activities.forum.dateOpen=Abertura: -activities.forum.answer=Responder +activities.forum.answer=Responder a esta postagem activities.forum.dateFormat=dd/mm/aaaa activities.forum.send=Enviar activities.forum.cancel=Cancelar +activities.forum.newpost=Novo Post +activities.forum.inreplyauthor=Originalmente postado por +activities.forum.inreplyto=Em resposta ao texto originalmente postado por #-- Video atividades -- @@ -452,7 +474,7 @@ activities.game.name=Nome do Jogo activities.game.maxUsers=Max. Usuários activities.game.minUsers=Min. Usuários activities.game.image=Imagem -activities.game.url=Url +activities.game.url=SWF activities.game.url.help= Toda URL deve iniciar com "http://" e no caso do jogo precisa ser uma Java Server Page, ou seja, ter terminação ".jsp" activities.game.description=Descrição activities.game.playersOnline=Jogadores On-Line @@ -467,7 +489,7 @@ activities.game.score.user=Usu activities.game.score.date=Data activities.game.noScore=Sem dados activities.game.serverOut=Micro-Mundo de Jogos fora do Ar! - +activities.game.changeOrderGame=changeOrderGame #-- Learning Objects Atividades -- activities.learningObject.title=Adicionar nova mídia para celular @@ -620,6 +642,7 @@ errors.invalidDate.day=Dia inv errors.invalidDate.month=Mês inválido errors.invalidDate.year=Ano inválido errors.module.nameExists="Já existe um módulo com este nome. +errors.invalidTwitterLogin=Login do Twitter muito grande # -- list courses listCourses.title=Resultado da Busca @@ -720,10 +743,12 @@ user.showViewAllCoursesInManagerUsers=showViewAllCoursesInManagerUsers user.showViewUserNewInManagerUsers=showViewUserNewInManagerUsers user.showViewEditUserInManagerUsers=showViewEditUserInManagerUsers user.userNewInManagerUsers=userNewInManagerUsers +user.userEditInManagerUsers=userEditInManagerUsers user.showViewUserProfileInManagerUsers=showViewUserProfileInManagerUsers user.showViewSendMailInManagerUsers=showViewSendMailInManagerUsers user.sendMailInManagerUsers=sendMailInManagerUsers user.verifyEmail=verifyEmail +user.showViewIntegrationSocialNetworks=showViewIntegrationSocialNetworks #-- MAP Action method course -- course.viewDeleteConfirmation=viewDeleteConfirmation @@ -735,12 +760,16 @@ course.showViewCourseNotLogged=showViewCourseNotLogged course.showViewCourseParticipants=showViewCourseParticipants course.unregisterStudentCourse=unregisterStudentCourse course.showViewEditCourse=showViewEditCourse +course.showViewSocialInteractionMonitoring=showViewSocialInteractionMonitoring +course.showViewSocialInteractionMonitoringReports=showViewSocialInteractionMonitoringReports course.showViewShowModules=showViewShowModules course.showViewCourseEvaluations=showViewCourseEvaluations course.showViewSendMail=showViewSendMail course.sendMailForCourseParticipants=sendMailForCourseParticipants -course.changeTeacher=changeTeacher +course.changeTeacher=changeTeacher +course.viewChangeTeacher=viewChangeTeacher course.sendMailForCourseParticipants=sendMailForCourseParticipants +course.showViewGraphic=showViewGraphic #-- MAP Action method module -- module.showViewEditModule=showViewEditModule @@ -765,7 +794,9 @@ forumActivity.editForumActivity=editForumActivity forumActivity.deleteForumActivity=deleteForumActivity forumActivity.showViewListMessagesForumActivity=showViewListMessagesForumActivity forumActivity.showViewNewAnswerForumActivity=showViewNewAnswerForumActivity +forumActivity.showViewNewAnswerForumActivityWithMessage=showViewNewAnswerForumActivityWithMessage forumActivity.answerForumActivity=answerForumActivity +forumActivity.answerForumActivityWithMessage=answerForumActivityWithMessage #-- Map Action method EXTERNAL LINK material -- externalLinkMaterial.showViewExternalLink=showViewExternalLink @@ -784,6 +815,23 @@ manager.user.removeUser=removeUser manager.user.allowUserLogon=allowUserLogon manager.course.advancedSearchCourse=advancedSearchCourse +#-- Map Action method message ADD BY Nailson Cunha +messenger.saveMessage=saveMessage +messenger.getUnreadMessages=getUnreadMessages +messenger.replyMessage=replyMessage +messenger.setMessageAsRead=setMessageAsRead +messenger.deleteMessage=deleteMessage +messenger.sendMessageToAll=sendMessageToAll +messenger.replyMessageToAll=replyMessageToAll +messenger.showViewAllMessengerMessages=showViewAllMessengerMessages +social.showViewSocialNetworkMonitoring=showViewSocialNetworkMonitoring +social.startSocialNetworkMonitoring=startSocialNetworkMonitoring +social.stopSocialNetworkMonitoring=stopSocialNetworkMonitoring +social.testMessageTool=testMessageTool +social.testTwitterTool=testTwitterTool +social.showViewTestTools=showViewTestTools + + #-- OpenID -- openID.youAlreadyHaveThisOpenID=Voc\u00EA j\u00E1 tem esse OpenID associado a sua conta do Amadeus. openID.googleAccount=Google Account @@ -794,6 +842,7 @@ onlineUser.title=Usu\u00E1rios Online #-- SettingsActions -- settingsActions.showViewSettings=showViewSettings +settingsActions.saveSystemSettings=saveSystemSettings settingsActions.saveWebSecuritySettings=saveWebSecuritySettings settingsActions.showViewWebMailSenderSettings=showViewWebMailSenderSettings settingsActions.saveWebMailSenderSettings=saveWebMailSenderSettings @@ -820,4 +869,9 @@ managerUsers.profileType=*Tipo de Perfil: managerUsers.profileType.type=Tipo managerUsers.profileType.admin=Administrador managerUsers.profileType.student=Aluno -managerUsers.profileType.professor=Professor \ No newline at end of file +managerUsers.profileType.professor=Professor + +#-- Log -- +log.saveLog=saveLog +log.saveLogViewMaterial=saveLogViewMaterial +log.saveLogViewVideo=saveLogViewVideo \ No newline at end of file diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/messages/Messages.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/messages/Messages.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/struts/validation/Validator.java b/src/br/ufpe/cin/amadeus/amadeus_web/struts/validation/Validator.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/AccessInfo.java b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/AccessInfo.java new file mode 100755 index 0000000..e6a81ba --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/AccessInfo.java @@ -0,0 +1,43 @@ +package br.ufpe.cin.amadeus.amadeus_web.syncronize; + +import java.io.Serializable; + +import javax.xml.bind.annotation.XmlRootElement; + +@SuppressWarnings("serial") +@XmlRootElement +public class AccessInfo implements Serializable{ + + private int id; + private String login; + private String password; + //private ProfileType typeProfile; + + public int getId() { + return id; + } + public void setId(int id) { + this.id = id; + } + + public String getLogin() { + return login; + } + public void setLogin(String login) { + this.login = login; + } + public String getPassword() { + return password; + } + public void setPassword(String password) { + this.password = password; + } + /*public ProfileType getTypeProfile() { + return typeProfile; + } + public void setTypeProfile(ProfileType typeProfile) { + this.typeProfile = typeProfile; + }*/ + + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Archive.java b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Archive.java new file mode 100755 index 0000000..6f0799a --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Archive.java @@ -0,0 +1,43 @@ +package br.ufpe.cin.amadeus.amadeus_web.syncronize; + +import java.io.Serializable; + +import javax.xml.bind.annotation.XmlRootElement; + +@SuppressWarnings("serial") +@XmlRootElement +public class Archive implements Serializable{ + + private int id; + + private byte[] archive; + + private String archiveName; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public byte[] getArchive() { + return archive; + } + + public void setArchive(byte[] archive) { + this.archive = archive; + } + + public String getArchiveName() { + return archiveName; + } + + public void setArchiveName(String archiveName) { + this.archiveName = archiveName; + } + + + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Course.java b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Course.java new file mode 100755 index 0000000..d9a4873 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Course.java @@ -0,0 +1,156 @@ +package br.ufpe.cin.amadeus.amadeus_web.syncronize; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.xml.bind.annotation.XmlRootElement; + +@SuppressWarnings("serial") +@XmlRootElement +public class Course implements Serializable{ + + private int id; + + private int maxAmountStudents; + + private int numberOfStudentsInCourse; + + private String name; + + private String objectives; + + private String content; + + private Date creationDate; + + private Date initialRegistrationDate; + + private Date finalRegistrationDate; + + private Date initialCourseDate; + + private Date finalCourseDate; + + private Person professor; + + private List materials = new ArrayList(); + + private List foruns = new ArrayList(); + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public int getMaxAmountStudents() { + return maxAmountStudents; + } + + public void setMaxAmountStudents(int maxAmountStudents) { + this.maxAmountStudents = maxAmountStudents; + } + + public int getNumberOfStudentsInCourse() { + return numberOfStudentsInCourse; + } + + public void setNumberOfStudentsInCourse(int numberOfStudentsInCourse) { + this.numberOfStudentsInCourse = numberOfStudentsInCourse; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getObjectives() { + return objectives; + } + + public void setObjectives(String objectives) { + this.objectives = objectives; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public Date getCreationDate() { + return creationDate; + } + + public void setCreationDate(Date creationDate) { + this.creationDate = creationDate; + } + + public Date getInitialRegistrationDate() { + return initialRegistrationDate; + } + + public void setInitialRegistrationDate(Date initialRegistrationDate) { + this.initialRegistrationDate = initialRegistrationDate; + } + + public Date getFinalRegistrationDate() { + return finalRegistrationDate; + } + + public void setFinalRegistrationDate(Date finalRegistrationDate) { + this.finalRegistrationDate = finalRegistrationDate; + } + + public Date getInitialCourseDate() { + return initialCourseDate; + } + + public void setInitialCourseDate(Date initialCourseDate) { + this.initialCourseDate = initialCourseDate; + } + + public Date getFinalCourseDate() { + return finalCourseDate; + } + + public void setFinalCourseDate(Date finalCourseDate) { + this.finalCourseDate = finalCourseDate; + } + + + public Person getProfessor() { + return professor; + } + + public void setProfessor(Person professor) { + this.professor = professor; + } + + public List getMaterials() { + return materials; + } + + public void setMaterials(List materials) { + this.materials = materials; + } + + public List getForuns() { + return foruns; + } + + public void setForuns(List foruns) { + this.foruns = foruns; + } + + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Forum.java b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Forum.java new file mode 100755 index 0000000..0bd5c82 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Forum.java @@ -0,0 +1,76 @@ +package br.ufpe.cin.amadeus.amadeus_web.syncronize; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.xml.bind.annotation.XmlRootElement; + +@SuppressWarnings("serial") +@XmlRootElement +public class Forum implements Serializable{ + + private int id; + + private String name; + + private String description; + + private Date creationDate; + + private int module_id; + + private List messages = new ArrayList(); + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Date getCreationDate() { + return creationDate; + } + + public void setCreationDate(Date creationDate) { + this.creationDate = creationDate; + } + + public int getModule_id() { + return module_id; + } + + public void setModule_id(int module_id) { + this.module_id = module_id; + } + + public List getMessages() { + return messages; + } + + public void setMessages(List messages) { + this.messages = messages; + } + + + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Image.java b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Image.java new file mode 100755 index 0000000..270acb2 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Image.java @@ -0,0 +1,29 @@ +package br.ufpe.cin.amadeus.amadeus_web.syncronize; + +import java.io.Serializable; + +import javax.xml.bind.annotation.XmlRootElement; + +@SuppressWarnings("serial") +@XmlRootElement +public class Image implements Serializable{ + + private int id; + private byte[] photo; + + public int getId() { + return id; + } + public void setId(int id) { + this.id = id; + } + public byte[] getPhoto() { + return photo; + } + public void setPhoto(byte[] photo) { + this.photo = photo; + } + + + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Material.java b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Material.java new file mode 100755 index 0000000..6277d3d --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Material.java @@ -0,0 +1,121 @@ +package br.ufpe.cin.amadeus.amadeus_web.syncronize; + +import java.io.Serializable; +import java.util.Date; + +import javax.xml.bind.annotation.XmlRootElement; + +@SuppressWarnings("serial") +@XmlRootElement +public class Material implements Serializable{ + + private int id; + + private static final int MAX_FILE_SIZE = 500000; + + private Archive archive; + + private String archiveName; + + private String extension; + + private Module module; + + private boolean allowLateDeliveries; + + private Date creationDate; + + private Date correctedDate; + + private Float grade; + + private int course_id; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public Archive getArchive() { + return archive; + } + + public void setArchive(Archive archive) { + this.archive = archive; + } + + public String getArchiveName() { + return archiveName; + } + + public void setArchiveName(String archiveName) { + this.archiveName = archiveName; + } + + public String getExtension() { + return extension; + } + + public void setExtension(String extension) { + this.extension = extension; + } + + public boolean isAllowLateDeliveries() { + return allowLateDeliveries; + } + + public void setAllowLateDeliveries(boolean allowLateDeliveries) { + this.allowLateDeliveries = allowLateDeliveries; + } + + public Date getCreationDate() { + return creationDate; + } + + public void setCreationDate(Date creationDate) { + this.creationDate = creationDate; + } + + public Date getCorrectedDate() { + return correctedDate; + } + + public void setCorrectedDate(Date correctedDate) { + this.correctedDate = correctedDate; + } + + public Float getGrade() { + return grade; + } + + public void setGrade(Float grade) { + this.grade = grade; + } + + public static int getMaxFileSize() { + return MAX_FILE_SIZE; + } + + public Module getModule() { + return module; + } + + public void setModule(Module module) { + this.module = module; + } + + public int getCourse_id() { + return course_id; + } + + public void setCourse_id(int course_id) { + this.course_id = course_id; + } + + + + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Message.java b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Message.java new file mode 100755 index 0000000..7459fb1 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Message.java @@ -0,0 +1,58 @@ +package br.ufpe.cin.amadeus.amadeus_web.syncronize; + +import java.io.Serializable; +import java.util.Date; + +import javax.xml.bind.annotation.XmlRootElement; + +@SuppressWarnings("serial") +@XmlRootElement +public class Message implements Serializable{ + + private int id; + private String body; + private Date date; + private String personName; + private String personLogin; + private int forum_id; + + public int getId() { + return id; + } + public void setId(int id) { + this.id = id; + } + public String getBody() { + return body; + } + public void setBody(String body) { + this.body = body; + } + public Date getDate() { + return date; + } + public void setDate(Date date) { + this.date = date; + } + + public String getPersonName() { + return personName; + } + public void setPersonName(String personName) { + this.personName = personName; + } + public int getForum_id() { + return forum_id; + } + public void setForum_id(int forum_id) { + this.forum_id = forum_id; + } + public String getPersonLogin() { + return personLogin; + } + public void setPersonLogin(String personLogin) { + this.personLogin = personLogin; + } + + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Module.java b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Module.java new file mode 100755 index 0000000..31255af --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Module.java @@ -0,0 +1,63 @@ +package br.ufpe.cin.amadeus.amadeus_web.syncronize; + +import java.io.Serializable; +import javax.xml.bind.annotation.XmlRootElement; + +@SuppressWarnings("serial") +@XmlRootElement +public class Module implements Serializable{ + + private int id; + + private int countMaterials; + + private String name; + + private String description; + + private boolean visible; + + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public boolean isVisible() { + return visible; + } + + public void setVisible(boolean visible) { + this.visible = visible; + } + + + public int getCountMaterials() { + return countMaterials; + } + + public void setCountMaterials(int countMaterials) { + this.countMaterials = countMaterials; + } + + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Person.java b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Person.java new file mode 100755 index 0000000..d0ebe91 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Person.java @@ -0,0 +1,114 @@ +package br.ufpe.cin.amadeus.amadeus_web.syncronize; + +import java.io.Serializable; +import java.util.Date; + +import javax.xml.bind.annotation.XmlRootElement; + +@SuppressWarnings("serial") +@XmlRootElement +public class Person implements Serializable{ + + private int id; + + private String name; + + private String city; + + private String state; + + private String email; + + private String cpf; + + private String phoneNumber; + + private Date birthDate; + + private char gender; + + private AccessInfo accessInfo; + + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + public String getState() { + return state; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public void setState(String state) { + this.state = state; + } + + public String getCpf() { + return cpf; + } + + public void setCpf(String cpf) { + this.cpf = cpf; + } + + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + public Date getBirthDate() { + return birthDate; + } + + public void setBirthDate(Date birthDate) { + this.birthDate = birthDate; + } + + public char getGender() { + return gender; + } + + public void setGender(char gender) { + this.gender = gender; + } + + public AccessInfo getAccessInfo() { + return accessInfo; + } + + public void setAccessInfo(AccessInfo accessInfo) { + this.accessInfo = accessInfo; + } + + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/PersonRoleCourse.java b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/PersonRoleCourse.java new file mode 100755 index 0000000..522b031 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/PersonRoleCourse.java @@ -0,0 +1,42 @@ +package br.ufpe.cin.amadeus.amadeus_web.syncronize; + +import java.io.Serializable; + +import javax.xml.bind.annotation.XmlRootElement; + +@SuppressWarnings("serial") +@XmlRootElement +public class PersonRoleCourse implements Serializable{ + + private int id; + private Person person; + private Course course; + private Role role; + + public int getId() { + return id; + } + public void setId(int id) { + this.id = id; + } + public Person getPerson() { + return person; + } + public void setPerson(Person person) { + this.person = person; + } + public Course getCourse() { + return course; + } + public void setCourse(Course course) { + this.course = course; + } + public Role getRole() { + return role; + } + public void setRole(Role role) { + this.role = role; + } + + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/ProfileType.java b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/ProfileType.java new file mode 100755 index 0000000..0467ebc --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/ProfileType.java @@ -0,0 +1,10 @@ +package br.ufpe.cin.amadeus.amadeus_web.syncronize; + +import java.io.Serializable; + +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement +public enum ProfileType implements Serializable{ + ADMIN, STUDENT, PROFESSOR, INACTIVE +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Role.java b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Role.java new file mode 100755 index 0000000..2896259 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Role.java @@ -0,0 +1,29 @@ +package br.ufpe.cin.amadeus.amadeus_web.syncronize; + +import java.io.Serializable; + +import javax.xml.bind.annotation.XmlRootElement; + +@SuppressWarnings("serial") +@XmlRootElement +public class Role implements Serializable{ + + private int id; + private int roleType; + + public int getId() { + return id; + } + public void setId(int id) { + this.id = id; + } + public int getRoleType() { + return roleType; + } + public void setRoleType(int roleType) { + this.roleType = roleType; + } + + + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Service.java b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Service.java new file mode 100755 index 0000000..277fcf0 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/syncronize/Service.java @@ -0,0 +1,77 @@ +package br.ufpe.cin.amadeus.amadeus_web.syncronize; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlRootElement; + +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.AmadeusDroidHistoric; + +@SuppressWarnings("serial") +@XmlRootElement +public class Service implements Serializable{ + + private List listCourses = new ArrayList(); + private List listPersons = new ArrayList(); + private Archive archive; + private boolean validAccessInfo; + private int countCourses; + private List listHistoric; + private List listForum; + private Message message; + + public List getListCourses() { + return listCourses; + } + public void setListCourses(List listCourses) { + this.listCourses = listCourses; + } + + public boolean isValidAccessInfo() { + return validAccessInfo; + } + public void setValidAccessInfo(boolean validAccessInfo) { + this.validAccessInfo = validAccessInfo; + } + public int getCountCourses() { + return countCourses; + } + public void setCountCourses(int countCourses) { + this.countCourses = countCourses; + } + public List getListPersons() { + return listPersons; + } + public void setListPersons(List listPersons) { + this.listPersons = listPersons; + } + public Archive getArchive() { + return archive; + } + public void setArchive(Archive archive) { + this.archive = archive; + } + public List getListHistoric() { + return listHistoric; + } + public void setListHistoric(List listHistoric) { + this.listHistoric = listHistoric; + } + public List getListForum() { + return listForum; + } + public void setListForum(List listForum) { + this.listForum = listForum; + } + public Message getMessage() { + return message; + } + public void setMessage(Message message) { + this.message = message; + } + + + + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/util/AmadeusCharSetFilter.java b/src/br/ufpe/cin/amadeus/amadeus_web/util/AmadeusCharSetFilter.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/util/AmadeusSessionListener.java b/src/br/ufpe/cin/amadeus/amadeus_web/util/AmadeusSessionListener.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/util/CrossScriptingFilter.java b/src/br/ufpe/cin/amadeus/amadeus_web/util/CrossScriptingFilter.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/util/Cryptography.java b/src/br/ufpe/cin/amadeus/amadeus_web/util/Cryptography.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/util/DateConstructor.java b/src/br/ufpe/cin/amadeus/amadeus_web/util/DateConstructor.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/util/DateValidator.java b/src/br/ufpe/cin/amadeus/amadeus_web/util/DateValidator.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/util/ExportBD.java b/src/br/ufpe/cin/amadeus/amadeus_web/util/ExportBD.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/util/HibernateSessionRequestFilter.java b/src/br/ufpe/cin/amadeus/amadeus_web/util/HibernateSessionRequestFilter.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/util/MailMessage.java b/src/br/ufpe/cin/amadeus/amadeus_web/util/MailMessage.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/util/MailSender.java b/src/br/ufpe/cin/amadeus/amadeus_web/util/MailSender.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/util/MessengerMessageMirror.java b/src/br/ufpe/cin/amadeus/amadeus_web/util/MessengerMessageMirror.java new file mode 100755 index 0000000..77e5638 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/util/MessengerMessageMirror.java @@ -0,0 +1,86 @@ +package br.ufpe.cin.amadeus.amadeus_web.util; + +import java.util.Date; + +/** + * Classe criada para servir como espelho da classe MessengerMessage afim de + * facilitar a serializacao para json + * + * @author Nailson Cunha + * + */ +public class MessengerMessageMirror { + + private int id; + private Date date; + private String title; + private String content; + private String sender; + private int senderId; + private boolean toAll; + private int courseId; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public Date getDate() { + return date; + } + + public void setDate(Date date) { + this.date = date; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getSender() { + return sender; + } + + public void setSender(String sender) { + this.sender = sender; + } + + public int getSenderId() { + return senderId; + } + + public void setSenderId(int senderId) { + this.senderId = senderId; + } + + public boolean isToAll() { + return toAll; + } + + public void setToAll(boolean toAll) { + this.toAll = toAll; + } + + public int getCourseId() { + return courseId; + } + + public void setCourseId(int courseId) { + this.courseId = courseId; + } +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/util/RequestWrapper.java b/src/br/ufpe/cin/amadeus/amadeus_web/util/RequestWrapper.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/util/SocialInteractionMethods.java b/src/br/ufpe/cin/amadeus/amadeus_web/util/SocialInteractionMethods.java new file mode 100755 index 0000000..98c5da2 --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/util/SocialInteractionMethods.java @@ -0,0 +1,934 @@ +package br.ufpe.cin.amadeus.amadeus_web.util; + +import java.io.FileWriter; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.Map; + +import org.apache.commons.collections.MultiMap; +import org.apache.commons.collections.map.MultiValueMap; + +import edu.uci.ics.jung.algorithms.importance.BetweennessCentrality; +import edu.uci.ics.jung.algorithms.scoring.ClosenessCentrality; +import edu.uci.ics.jung.graph.DirectedSparseMultigraph; +import edu.uci.ics.jung.graph.util.EdgeType; +import edu.uci.ics.jung.io.GraphMLWriter; + +public class SocialInteractionMethods { + /* + * Criação do grafo dirigido a partir das interações sociais nas ferramentas de comunicação Amadeus + */ + public DirectedSparseMultigraph generateGhaph(ArrayList actors, MultiMap interactions){ + + DirectedSparseMultigraph graph = new DirectedSparseMultigraph(); + ArrayList edges; + + for (String i:actors){ + graph.addVertex(i); + } + + for (String j:actors){ + edges = (ArrayList)interactions.get(j); + if (edges != null){ + for (String i:edges){ + graph.addEdge("edge" + j + "" + i, j, i, EdgeType.DIRECTED); + } + } + + } + + //System.out.println(graph.getEdgeCount()); + //System.out.println(graph); + return graph; + } + + + /* + * Método que calcula a coesão do grupo da rede social através da aplicação + * da métrica densidade de Análise de Redes Sociais + */ + + public String cohesionGroup(ArrayList actors, MultiMap interactions){ + + DirectedSparseMultigraph graph = this.generateGhaph(actors, interactions); + + Collection edges = graph.getEdges(); + + double numArcs = (double)edges.size(); + + double numActors = (double)actors.size(); + + double density = (numArcs / (numActors * (numActors - 1))); + + Double density1 = new Double(density); + + double p = Math.pow(10, 4); + + Double densityFormated = Math.round(density1 * p) / p; + + // Save graph + + this.saveGraph(graph); + + return this.reportCohesion(densityFormated.toString()); + + } + + /* + * Método que gera o relatório que será oferecido ao professor sobre a coesão dos alunos da turma + */ + + public String reportCohesion(String density){ + + DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); + Date date = new Date(); + String data = dateFormat.format(date); + + String head = "**Grau de Coesão** " + data + "\n"+ "\n"+ "É uma medida usada para avaliar o quão coeso está um grupo social. Também indica o nível de interatividade do grupo e oferece ao professor um diagnóstico da coesividade do grupo de alunos. Oferece também uma indicação do nível geral de engajamento do grupo social."; + + String result = "Grau de Coesão: " + density; + + double densityDouble = Double.parseDouble(density); + + String diagnosis = this.cohesionScale(densityDouble); + + String intervention = "Se o grau de coesão apresenta nenhuma coesão ou fraca coesão, o professor deve promover mais colaboração nas ferramentas de comunicação. As sugestões propostas nas métricas de comportamento social individuais visibilidade, isolamento e engajamento, quando aplicadas, devem promover um aumento da coesão do grupo social. Professores devem regularmente monitorar esta métrica e comparar os resultados considerando o tempo."; + + return head + "\n" +"\n" + result + "\n" +"\n" + "Diagnóstico: " + diagnosis + "\n" + "\n" + "Sugestões: " + "\n" + intervention ; + + } + + /* + * Método que retorna o grau de coesão do grupo baseado na densidade calculada + */ + public String cohesionScale(double density){ + + if (density == 0.0){ + return "Grupo não coeso"; + } else if (density > 0.0 && density <= 0.2){ + return "Grupo fracamente coeso"; + } else if (density > 0.2 && density <= 0.5){ + return "Grupo coeso"; + } else if (density > 0.5 && density <= 1){ + return "Grupo fortemente coeso"; + } else { + return "Grupo completamente coeso"; + } + + } + + + + /* + * Método, invocado pela interface de monitoramento de interações sociais, que calcula e analisa + * o prestígio dos estudantes de uma rede social + */ + public String prestigePerStudent(ArrayList actors, MultiMap interactions){ + + + Map indegreeValues = this.prestigeStudentsValued(actors, interactions); + + + Map sortedMap = this.sortMap(indegreeValues); + + // Save graph + + DirectedSparseMultigraph graph = this.generateGhaph(actors, interactions); + + this.saveGraph(graph); + + return this.reportPrestige(sortedMap); + + } + + + /* + * Método que gera o relatório que será oferecido ao professor sobre o prestígio dos alunos do curso + */ + + public String reportPrestige(Map indegreeValue){ + + DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); + Date date = new Date(); + String data = dateFormat.format(date); + + String head = "**Grau de Prestígio** "+ data + "\n"+ "\n"+ "É uma medida usada para quantificar o prestígio dos estudantes perante seus colegas, baseado nas respostas as suas mensagens e comentários dos seus posts. Essa métrica oferece ao professor uma forma de indentificar o interesse dos colegas da turma em cada estudante."; + + String result = "Grau de prestígio: "; + + // Print Map (Strudent - Prestige) + + Collection unsorted = indegreeValue.keySet(); + + String[] array = (String[]) unsorted.toArray(new String[unsorted.size()]); + + for (String key : array) { + + result += "\n"+ key + " - "+ indegreeValue.get(key) + " "; + + } + + //Arredonda para cima + int qtdInteractions = (int)Math.ceil((20 * unsorted.size())/100.0); + + + String diagnosis = "Os estudantes "+ this.bigger(array, qtdInteractions) + " tem um maior prestígio em relação a seus colegas, enquanto os estudantes "+ this.smaller(array, qtdInteractions) + " tem menos prestígio em relação aos seus colegas" ; + + String intervention = "O prestígio em grupos sociais surge através da quantidade e qualidade das discussões propostas e comentários realizados. Abordar os estudantes com menor prestígio e sugerir que os mesmos criem novos posts tratando de assuntos relacionados aos estudados. Propor que sempre responda os comentários aos posts criados inicialmente, apresentando respostas, comportando-se como um intermediador."; + + return head + "\n" +"\n" + result + "\n" +"\n" + "Diagnóstico: " + "\n" + diagnosis + "\n" + "\n" + "Sugestões:" + "\n" + intervention ; + + } + + + /* + * Método que recebe um MultiMap com as interacoes sociais dos estudantes e retorna o prestígio + * de cada estudante baseado na quantidade de interações que finalizam no estudante.São consideradas + * as interações repetidas entre os estudantes, diferentemente do método indegree da classe DirectedSparseMultigraph + */ + public Map prestigeStudentsValued(ArrayList actors, MultiMap interactions){ + + Map prestige = new HashMap(); + int cont = 0; + + Collection col = interactions.values(); + ArrayList interactionsEnd = new ArrayList(col); + + for (String i:actors){ + for (String j:interactionsEnd){ + if (i.equals(j)){ + cont++; + } + } + prestige.put(i, cont); + cont = 0; + } + + return prestige; + + } + + /* + * Método, invocado pela interface de monitoramento de interações sociais, que calcula e analisa + * o engajamento dos estudantes de uma rede social + */ + public String engagementPerStudent(ArrayList actors, MultiMap interactions){ + + Map outdegreeValues = this.engagementStudentsValued(actors, interactions); + + Map sortedMap = this.sortMap(outdegreeValues); + + // Save graph + + DirectedSparseMultigraph graph = this.generateGhaph(actors, interactions); + + this.saveGraph(graph); + + return this.reportEngagement(sortedMap); + + + } + + /* + * Método que recebe um MultiMap com as interacoes sociais dos estudantes e retorna o grau de engajamento + * de cada estudante baseado na quantidade de interações que começam com o estudante.São consideradas + * as interações repetidas entre os estudantes, diferentemente do método outdegree da classe DirectedSparseMultigraph + */ + public Map engagementStudentsValued(ArrayList actors, MultiMap interac){ + + MultiValueMap interactions = (MultiValueMap)interac; + Map engagement = new HashMap(); + int cont = 0; + + for (String i:actors){ + cont = interactions.size(i); + engagement.put(i, cont); + cont = 0; + //System.out.println("Engajamento: " + engagement); + } + + return engagement; + + } + + /* + * Método que gera o relatório que será oferecido ao professor sobre o prestígio dos alunos do curso + */ + + public String reportEngagement(Map indegreeValue){ + + DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); + Date date = new Date(); + String data = dateFormat.format(date); + + String head = "**Grau de Engajamento** "+ data + "\n"+ "\n"+ "O engajamento de um estudante corresponde ao número de interações sociais nas ferramentas de comunicação e descreve o quão ativo e central é ou está o estudante perante o grupo. Estudantes engajados são canais importantes por onde fluem as informações. "; + + String result = "Grau de Engajamento: "; + + Collection unsorted = indegreeValue.keySet(); + + String[] array = (String[]) unsorted.toArray(new String[unsorted.size()]); + + for (String key : array) { + + result += "\n"+ key + " - "+ indegreeValue.get(key) + " "; + + } + + //Arredonda para cima + int qtdInteractions = (int)Math.ceil((20 * unsorted.size())/100.0); + + + String diagnosis = "Os estudantes "+ this.bigger(array, qtdInteractions) + " tem um maior engajamento em relação aos seus colegas, enquanto "+ this.smaller(array, qtdInteractions) + " têm um menor engajamento em relação aos seus colegas" ; + + String intervention = "Para aumentar o engajamento, o professor deve encorajar atitudes ativas dos estudantes, sempre instigando-os, especialmente os que possuem um baixo grau de engajamento. Pensando nos estudantes de forma geral, o professor deve propor atividades e trabalhos desafiadores, que necessitem pesquisas fora do Amadeus e que promovam discussões, reflexões e construção do conhecimento colaborativamente entre os estudantes do curso. Como ações diretas, enviar mensagens para os estudantes com baixo grau de engajamento e pedir que eles teçam suas opiniões, sugiram soluções ou indiquem fontes de pesquisa sobre determinado assunto nas ferramentas de comunicação do Amadeus e assim tornem-se mais centrais e visíveis aos outros estudantes. Iniciar discussõees sobre assuntos indiretamente relacionados ao assunto estudado, ensejando que os estudantes se identifiquem com interesses pessoais e profissionais e naturalmente se envolvam mais."; + + return head + "\n" +"\n" + result + "\n" +"\n" + "Diagnóstico: " + "\n" + diagnosis + "\n" + "\n" + "Sugestões:" + "\n" + intervention ; + + } + + /* + * Método, invocado pela interface de monitoramento de interações sociais, que calcula e analisa + * a visibilidade ou amplitude da interatividade dos estudantes de uma rede social + */ + public String visibilityPerStudent(ArrayList actors, MultiMap interactions){ + + Map outdegreeValues = this.outdegree(actors, interactions); + + + Map sortedMap = this.sortMap(outdegreeValues); + + + Map visibilityResult = centralityPerStudent(sortedMap); + + + return this.reportVisibility(visibilityResult); + + + } + + /* + * Método que recebe o outdegree de todos os estudantes na forma de um Map e retorna, também através, + * de um Map o grau de centralidade de cada estudante do curso. + */ + public Map centralityPerStudent(Map outdegree){ + + ArrayList centralities = new ArrayList(); + + ArrayList outdegrees = new ArrayList(outdegree.values()); + + Map centralityList = new LinkedHashMap(); + + Collection keys = outdegree.keySet(); + ArrayList keysList = new ArrayList(keys); + + int groupSize = outdegrees.size() - 1; + double groupSizeDouble = (double)groupSize; + + //System.out.println(groupSizeDouble); + + double p; + Double centralityFormated; + double outdegreeValues; + int cont = 0; + for (int i:outdegrees){ + outdegreeValues = (double)outdegrees.get(cont)/groupSizeDouble; + p = Math.pow(10, 4); + centralityFormated = Math.round(outdegreeValues * p) / p; + //System.out.println(outdegreeValues); + centralities.add(centralityFormated); + centralityList.put(keysList.get(cont), centralities.get(cont)); + cont++; + } + + return centralityList; + + } + + /* + * Método que gera o relatório que será oferecido ao professor sobre o visibilidade (nível de interatividade) dos alunos do curso + */ + + public String reportVisibility(Map indegreeValue){ + + DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); + Date date = new Date(); + String data = dateFormat.format(date); + + String head = "**Grau de Visibilidade** "+ data + "\n"+ "\n"+ "A visibilidade é uma métrica usada para medir a quantidade de interações sociais oriundas e que terminam em cada estudante dentro de uma rede social (normalizada). Esta métrica fornece informações acerca da posição do estudante em relação a troca de informações e comunicação dentro do grupo. Através dela pode-se perceber se as interações estão centralizadas em um pequeno grupo de estudantes ou distribuídas mais uniformemente. "; + + String result = "Grau de Visibilidade: "; + + Collection unsorted = indegreeValue.keySet(); + + String[] array = (String[]) unsorted.toArray(new String[unsorted.size()]); + + for (String key : array) { + + result += "\n"+ key + " - "+ indegreeValue.get(key) + " "; + + } + + //Arredonda para cima + int qtdInteractions = (int)Math.ceil((20 * unsorted.size())/100.0); + + + String diagnosis = "Os estudantes "+ this.bigger(array, qtdInteractions) + " tem maior grau de visibilidade perante seus colegas, enquanto "+ this.smaller(array, qtdInteractions) + " tem menor grau de visibilidade perante seus colegas." ; + + String intervention = "Para aumentar a visibilidade o professor deve encorajar, especialmente estudantes com baixo grau de visibilidade, a utilização das diferentes ferramentas de comunicação disponíveis no Amadeus. Sugerir aos alunos com baixa visibilidade a criação de novos posts nos fóruns ao invés de somente comentar posts existentes, isso fará com que o mesmo atinja uma maior visibilidade. Citar alunos ou comentários de alunos com baixa visibilidade nos posts das diferentes ferramentas de comunicação de modo a tornar esses estudantes mais visíveis. "; + + return head + "\n" +"\n" + result + "\n" +"\n" + "Diagnóstico: " + "\n" + diagnosis + "\n" + "\n" + "Sugestões:" + "\n" + intervention ; + + } + + /* + * Método, invocado pela interface de monitoramento de interações sociais, que calcula e analisa + * a heterogeneidade de um grupo de estudantes de uma rede social. + */ + public String heterogeneityGroup(ArrayList actors, MultiMap interactions){ + + Map outdegreeValues = this.outdegree(actors, interactions); + + + Map sortedMap = this.sortMap(outdegreeValues); + + + Map visibilityResult = centralityPerStudent(sortedMap); + + + Map biggerCentralityMinusCentralities = this.calculateDifferenceBetweenBiggerAndOthers(visibilityResult); + + + Double heterogeneityDegree = this.calculateHeterogeneityDegree(biggerCentralityMinusCentralities); + + + return this.reportHeterogeneity(heterogeneityDegree); + + + } + + /* + * Método que calcula a diferença do estudante com maior centralidade da centralidade de todos os estudantes, armazenando + * em um Map, que é retornado. Parte do cálculo do grau de heterogeneidade do grupo. + */ + public Map calculateDifferenceBetweenBiggerAndOthers(Map visibilityDegree){ + + ArrayList centralities = new ArrayList(); + + ArrayList biggerMinusCentralities = new ArrayList(visibilityDegree.values()); + + Map centralityList = new LinkedHashMap(); + + Double bigCentrality = biggerMinusCentralities.get(0); + + Collection keys = visibilityDegree.keySet(); + + ArrayList keysList = new ArrayList(keys); + + double centralityValues; + int cont = 0; + for (double i:biggerMinusCentralities){ + centralityValues = bigCentrality - biggerMinusCentralities.get(cont); + centralities.add(centralityValues); + centralityList.put(keysList.get(cont), centralities.get(cont)); + cont++; + } + + return centralityList; + + } + + /* + * Método que calcula o grau de heterogeneidade do grupo. + */ + public Double calculateHeterogeneityDegree(Map visibilityDegree){ + + ArrayList biggerMinusCentralities = new ArrayList(visibilityDegree.values()); + + int groupSize = visibilityDegree.size() - 1; + double groupSizeDouble = (double)groupSize; + + Double sumCentralities = biggerMinusCentralities.get(0); + + int cont = 0; + for (double i:biggerMinusCentralities){ + sumCentralities += biggerMinusCentralities.get(cont++); + } + + return sumCentralities/(Math.pow(groupSizeDouble, 2)); + + } + + /* + * Método que gera o relatório que será oferecido ao professor sobre a coesão dos alunos da turma + */ + + public String reportHeterogeneity(Double heterogeneity){ + + DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); + Date date = new Date(); + String data = dateFormat.format(date); + + String head = "**Grau de Heterogeneidade** "+ data + "\n"+ "\n"+ "É uma medida usada para descobrir o grau de variabilidade das interações dos estudantes em um curso. Oferece ao professor uma indicação da heterogeneidade do grupo, baseado nas interações sociais, através de uma única medida."; + + // Formatar o grau de heterogeneidade + + double p = Math.pow(10, 4); + + Double heterogeneityFormated = Math.round(heterogeneity * p) / p; + + String result = "Grau de Heterogeneidade: " + heterogeneityFormated; + + + String diagnosis = "O grau de heterogeneidade varia de 0 a 1, onde quanto mais próximo de zero mais heterogeneo é ou está o grupo. Se o grau de heterogeneidade se aproxima de 1, significa que poucos estudantes são centrais, enquanto a maioria estão localizados estruturalmente de forma periférica na rede social."; + + String intervention = "O professor deve promover, de forma geral, mais colaboração nas ferramentas de comunicação do Amadeus. As sugestões propostas nas métricas de comportamento social individuais visibilidade, isolamento e engajamento, quando aplicadas, devem promover um aumento da heterogeneidade do grupo social. Professores devem regularmente monitorar esta métrica e comparar os resultados considerando o tempo."; + + return head + "\n" +"\n" + result + "\n" +"\n" + "Diagnóstico: " + "\n" + diagnosis + "\n" + "\n" + "Sugestões:" + "\n" + intervention ; + + } + + /* + * Método, invocado pela interface de monitoramento de interações sociais, que calcula e analisa + * o grau de intermediação da informação dos estudantes (individualmente) de uma rede social + */ + public String informationIntermediationPerStudent(ArrayList actors, MultiMap interactions){ + + int sizeGroup = actors.size(); + + Map betweenness = new HashMap(); + + Map betweennessSorted = new HashMap(); + + DirectedSparseMultigraph graph = this.generateGhaph(actors, interactions); + + BetweennessCentrality ranker = new BetweennessCentrality(graph); + + ranker.setRemoveRankScoresOnFinalize(false); + + ranker.evaluate(); + + //ranker.printRankings(true, false); + + double bet, finalBet, p; + Double intermediationFormated; + + for (String actor:actors){ + + bet = ranker.getVertexRankScore(actor); + finalBet = bet/((sizeGroup-2) * (sizeGroup-1)); + p = Math.pow(10, 4); + + intermediationFormated = Math.round(finalBet * p) / p; + betweenness.put(actor, intermediationFormated); + + } + + betweennessSorted = this.sortMapDouble(betweenness); + + // Save graph + + this.saveGraph(graph); + + return this.reportIntermediationInformation(betweennessSorted); + + } + + /* + * Método que gera o relatório que será oferecido ao professor sobre o visibilidade (nível de interatividade) dos alunos do curso + */ + + public String reportIntermediationInformation(Map indegreeValue){ + + DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); + Date date = new Date(); + String data = dateFormat.format(date); + + String head = "**Grau de Intermediação da Informação** "+ data + "\n"+ "\n"+ "É uma medida usada para determinar a quantidade de caminhos mínimos entre todos os estudantes, que passam por cada estudante especificamente. No contexto de interação social entre estudantes, o estudante pode até não ter um alto grau de interação direta com seus colegas ou mesmo estabelecer laços fortes dentro da rede social, mas pode ser primordial para mediar a informação entre estudantes não adjacentes. "; + + String result = "Grau de Intermediação da Informação: "; + + Collection unsorted = indegreeValue.keySet(); + + String[] array = (String[]) unsorted.toArray(new String[unsorted.size()]); + + for (String key : array) { + + result += "\n"+ key + " - "+ indegreeValue.get(key) + " "; + + } + + //Arredonda para cima + int qtdInteractions = (int)Math.ceil((20 * unsorted.size())/100.0); + + + String diagnosis = "Os estudantes "+ this.bigger(array, qtdInteractions) + " têm maiores graus de intermediação de informação perante seus colegas, enquanto os seus colegas "+ this.smaller(array, qtdInteractions) + " tem menores graus de intermediação perante seus colegas. Esta métrica oferece ao professor a identificação dos estudantes, que caso se ausentem do grupo, quebram o ciclo de transmissão de informações, levando o grupo a ser dividido em subgrupos isolados." ; + + String intervention = "Duas ações podem e devem ser tomadas, a primeira deve-se garantir que os estudantes intermediadores de informação continuem assim e não se isolem gerando formação de subgrupos, a outra é buscar um aumento da quantidade de estudantes intermediadores de informação. Para manter os estudantes já nesta posição, o professor pode visualizar no grafo gerado pelo Amadeus os subgrupos cujo intermediário das informações é o estudante e sugerir atividades em pares unindo o estudante em questão e estudantes de diferentes subgrupos ou isolados. Para que novos estudantes passem a integrar o grupo de estudantes com alto grau de intermediação da informação, além da motivação geral nas ferramentas de comunicação do Amadeus, empreender uma atenção especial aos estudantes com baixo ou nenhum grau de intermadiação da informação, utilizando a ferramenta de mensagens diretas."; + + return head + "\n" +"\n" + result + "\n" +"\n" + "Diagnóstico: " + "\n" + diagnosis + "\n" + "\n" + "Sugestões:" + "\n" + intervention ; + + } + + /* + * Método, invocado pela interface de monitoramento de interações sociais, que calcula e analisa + * o grau de intermediação da informação dos estudantes (individualmente) de uma rede social + */ + public String isolationPerStudent(ArrayList actors, MultiMap interactions){ + + int sizeGroup = actors.size(); + + Map closeness = new HashMap(); + + Map closenessSorted = new HashMap(); + + DirectedSparseMultigraph graph = this.generateGhaph(actors, interactions); + + System.out.println("Grafo: " + graph); + + ClosenessCentrality ranker = new ClosenessCentrality(graph); + + + double bet, finalBet, p; + Double intermediationFormated; + + for (String actor:actors){ + + bet = ranker.getVertexScore(actor); + p = Math.pow(10, 4); + + intermediationFormated = Math.round(bet * p) / p; + closeness.put(actor, intermediationFormated); + + } + + closenessSorted = this.sortMapDouble(closeness); + + // Save graph + + this.saveGraph(graph); + + return this.reportIsolation(closenessSorted); + + } + + /* + * Método que gera o relatório que será oferecido ao professor sobre o visibilidade (nível de interatividade) dos alunos do curso + */ + + public String reportIsolation (Map indegreeValue){ + + DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); + Date date = new Date(); + String data = dateFormat.format(date); + + String head = "**Grau de Isolamento** "+ data + "\n"+ "\n"+ " É uma medida que determina a menor distância (geodésica) entre cada estudante e todos os outros colegas do curso, ou seja, o quão próximo ou distante cada estudante está dos demais. No contexto da interação social entre estudantes, esta métrica oferece ao professor uma indicação de possíveis estudantes isolados."; + + String result = "Grau de Isolamento: "; + + Collection unsorted = indegreeValue.keySet(); + + String[] array = (String[]) unsorted.toArray(new String[unsorted.size()]); + + for (String key : array) { + + result += "\n"+ key + " - "+ indegreeValue.get(key) + " "; + + } + + //Arredonda para cima + int qtdInteractions = (int)Math.ceil((20 * unsorted.size())/100.0); + + + String diagnosis = "Os estudantes "+ this.bigger(array, qtdInteractions) + " têm um menor grau de isolamento em relação a seus colegas, enquanto os estudantes "+ this.smaller(array, qtdInteractions) + " tem um maior grau de isolamento, ou seja, estão mais próximos dos seus colegas. É possível identificar dificuldade de comunicação entre estudantes causadas pela total ou parcial isolamento do grupo." ; + + String intervention = "Iniciar discussões a partir de estudantes com menor grau de isolamento, uma vez que estando mais próximos dos outros estudantes, essas informações atingirão mais rapidamente o grupo como um todo. Sugerir trabalhos em grupo agrupando estudantes com alto e baixo graus de isolamento. Resgatar estudantes completamente isolados através de mensagens individuais e sugestão de trabalhos diferenciados."; + + return head + "\n" +"\n" + result + "\n" +"\n" + "Diagnóstico: " + "\n" + diagnosis + "\n" + "\n" + "Sugestões:" + "\n" + intervention ; + + } + + /* + * Método, que deve ser invocado por todas os comportamentos (métricas) relacionadas a cada ator + * que retorna na forma de uma String, os nomes dos estudantes (%) com maior grau + */ + public String bigger(String[] array, int size){ + + String list = " "; + + for (int i = 0; i < size; i++){ + list += array[i] + ", "; + } + + + return list; + + } + + /* + * Método, que deve ser invocado por todas os comportamentos (métricas) relacionadas a cada ator + * que retorna na forma de uma String, os nomes dos estudantes (%) com maior grau + */ + public String smaller(String[] array, int size){ + + String list = " "; + + for (int i = array.length-1; i >= (array.length - size); i--){ + list += array[i] + ", "; + } + + + return list; + + } + + /* + * Ordena os estudantes, em ordem decrescente, baseado em alguma métrica de Análise de Redes Sociais. Este método será + * chamado por todas as métricas representadas por Integer no momento de gerar o relatório. + */ + + public Map sortMap(Map indegreeValue){ + + Map newIndegreeValue = new LinkedHashMap(); + // Local variables + Integer currentValue; + int cont; + String next; + String bigKey; + Integer bigValue; + Collection col; + ArrayList noSortedValues; + Collection unsortedKeys; + Iterator it; + String[] array; + int sizeMap = indegreeValue.size(); + + for (int i = 0; i< sizeMap; i++){ + + col = indegreeValue.values(); + + noSortedValues = new ArrayList(col); + + unsortedKeys = indegreeValue.keySet(); + + it = unsortedKeys.iterator(); + + array = (String[]) unsortedKeys.toArray(new String[unsortedKeys.size()]); + + //Encontrar o maior valor + cont = 0; + next= (String)it.next(); + bigKey = next; + //bigIndex = cont; + bigValue = noSortedValues.get(cont); + while (it.hasNext()){ + cont++; + next = (String)it.next(); + //currentValue = indegreeValue.get(noSortedValues.get(cont)); + currentValue = noSortedValues.get(cont); + if (currentValue.intValue() >= bigValue){ + //bigIndex = cont; + bigValue = currentValue; + bigKey = next; + } + } + + indegreeValue.remove(bigKey); + newIndegreeValue.put(bigKey, bigValue); + + } + + return newIndegreeValue; + + } + + /* + * Ordena os estudantes, em ordem decrescente, baseado em alguma métrica de Análise de Redes Sociais. Este método será + * chamado por todas as métricas representadas por Double no momento de gerar o relatório. + */ + + public Map sortMapDouble(Map indegreeValue){ + + Map newIndegreeValue = new LinkedHashMap(); + // Local variables + Double currentValue; + int cont; + String next; + String bigKey; + Double bigValue; + Collection col; + ArrayList noSortedValues; + Collection unsortedKeys; + Iterator it; + String[] array; + int sizeMap = indegreeValue.size(); + + for (int i = 0; i< sizeMap; i++){ + + col = indegreeValue.values(); + + noSortedValues = new ArrayList(col); + + unsortedKeys = indegreeValue.keySet(); + + it = unsortedKeys.iterator(); + + array = (String[]) unsortedKeys.toArray(new String[unsortedKeys.size()]); + + //Encontrar o maior valor + cont = 0; + next= (String)it.next(); + bigKey = next; + //bigIndex = cont; + bigValue = noSortedValues.get(cont); + while (it.hasNext()){ + cont++; + next = (String)it.next(); + //currentValue = indegreeValue.get(noSortedValues.get(cont)); + currentValue = noSortedValues.get(cont); + if (currentValue >= bigValue){ + //bigIndex = cont; + bigValue = currentValue; + bigKey = next; + } + } + + indegreeValue.remove(bigKey); + newIndegreeValue.put(bigKey, bigValue); + + } + + return newIndegreeValue; + + } + + /* + * Método que calcula o índice indegree de cada estudante da rede social através da aplicação + * da métrica indegree de Análise de Redes Sociais e retorna um Map com o nome do estudante + * e o indegree. + */ + + public Map indegree(ArrayList actors, MultiMap interactions){ + + DirectedSparseMultigraph graph = this.generateGhaph(actors, interactions); + + Collection vertices = graph.getVertices(); + + Map indegreeValue = new HashMap(); + + int in; + + for (String student:vertices){ + in = graph.inDegree(student); + indegreeValue.put(student, in); + } + + // Save graph + + this.saveGraph(graph); + + return indegreeValue; + } + + /* + * Método que calcula o índice outdegree de cada estudante da rede social através da aplicação + * da métrica outdegree de Análise de Redes Sociais e retorna um Map com o nome do estudante + * e o outdegree. + */ + + public Map outdegree(ArrayList actors, MultiMap interactions){ + + DirectedSparseMultigraph graph = this.generateGhaph(actors, interactions); + + Collection vertices = graph.getVertices(); + + Map outdegreeValue = new HashMap(); + + int in; + + for (String student:vertices){ + in = graph.outDegree(student); + outdegreeValue.put(student, in); + } + + // Save graph + + this.saveGraph(graph); + + return outdegreeValue; + } + + /* + * Gera um arquivo .graphml do grafo com o objetivo de ser plotado em ferramentas de visualização como Gephi e Pajek + */ + + public void saveGraph(DirectedSparseMultigraph graph){ + + DateFormat dateFormat = new SimpleDateFormat("ddMMyyyy_hhmmss"); + Date date = new Date(); + String data = dateFormat.format(date); + + FileWriter file = null; + try{ + file = new FileWriter(data + "graph.graphml"); + GraphMLWriter graphml = new GraphMLWriter(); + graphml.save(graph, file); + }catch(Exception e) {System.out.println(e);}; + } + + /* + * Método que não está sendo utilizado pois o grafo já se comporta dessa maneira + */ + + public MultiMap noDuplicatedInteractions(ArrayList actors, MultiMap interactions){ + + MultiMap clone = new MultiValueMap(); + ArrayList edges = new ArrayList(); + + for (String j:actors){ + edges = (ArrayList)interactions.get(j); + if (edges != null){ + for (String i:edges){ + if (!(tuplaExist(i,(ArrayList)clone.get(j)))){ + clone.put(j, i); + } + } + } + + } + + System.out.println(clone); + + return clone; + + } + + /* + * Método que compara se há tuplas duplicadas no MultiMap. + * Método que não está sendo utilizado pois o grafo já se comporta dessa maneira. + */ + + public boolean tuplaExist(String x, ArrayList list){ + + boolean exist = false; + + if (list != null){ + for (String i:list){ + if (x.equals(i)){ + exist = true; + } + } + } + + return exist; + + } + + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/util/SocialInteractions.java b/src/br/ufpe/cin/amadeus/amadeus_web/util/SocialInteractions.java new file mode 100755 index 0000000..8aca71e --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/util/SocialInteractions.java @@ -0,0 +1,174 @@ +package br.ufpe.cin.amadeus.amadeus_web.util; + +import java.util.Collection; +import java.io.FileOutputStream; +import java.io.FileWriter; +import java.io.IOException; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.*; + + +import java.util.Set; + +import org.apache.commons.collections.MultiMap; +import org.apache.commons.collections.map.MultiValueMap; + +import com.lowagie.text.Document; +import com.lowagie.text.DocumentException; +import com.lowagie.text.Paragraph; +import com.lowagie.text.pdf.PdfWriter; + + +import edu.uci.ics.jung.algorithms.importance.BetweennessCentrality; +import edu.uci.ics.jung.algorithms.scoring.ClosenessCentrality; +import edu.uci.ics.jung.graph.DirectedSparseMultigraph; +import edu.uci.ics.jung.graph.util.EdgeType; +import edu.uci.ics.jung.io.GraphMLWriter; + + +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Forum; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Message; +import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Module; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.MessengerMessage; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person; +import br.ufpe.cin.amadeus.amadeus_web.domain.register.Tweet; +import br.ufpe.cin.amadeus.amadeus_web.facade.Facade; + +/** + * Classe responsável por centralizar os métodos que retornarão as interações + * sociais das ferramentas do amadeus. + * + * @author Nailson Cunha + * + */ +public final class SocialInteractions { + + private SocialInteractions() { + + } + + /** + * Método que retorna as interações sociais referentes a ferramenta de mensagens assíncronas. + * @return Um multimap que representa as interações sociais. + * Dessa forma Person "key" interage com os Persons "values" + * @throws Exception Lancada caso a data de fim venha antes da data de início + */ + @SuppressWarnings("unchecked") + public static MultiValueMap getSocialInteractionsFromMessenger(Course course, Date inicio, Date fim) throws Exception { + + if(fim.before(inicio)) + throw new Exception("Data fim menor que a Data início."); + + MultiMap interactions = new MultiValueMap(); + Facade facade = Facade.getInstance(); + + List teachers = facade.getTeachersByCourse(course); + List persons = facade.listStudentsByCourse(course); + + for (Person p : persons) { + for (MessengerMessage m : p.getSent()) { + if( (isBetweenDates(m, inicio, fim)) && ( persons.contains(m.getReceiver()) || teachers.contains(m.getReceiver()) ) ) + interactions.put(p.getName(), m.getReceiver().getName()); + } + } + + Set keys = interactions.keySet(); + System.out.println("Cheguei"); + for(Object k : keys){ + System.out.println(k + " : " + interactions.get(k)); + } + + return (MultiValueMap) interactions; + } + + + /** + * Método que retorna as interações sociais referentes a ferramenta de monitoramento + * do twitter. + * @param inicio + * @param fim + * @return + */ + public static MultiMap getSocialInteractionsFromTwitterTool(Date inicio, Date fim){ + Facade facade = Facade.getInstance(); + List tweets = facade.getTweetBetweenDates(inicio, fim); + MultiMap map = new MultiValueMap(); + for(Tweet t : tweets){ + if(t.getDateOfTweet().after(inicio) && t.getDateOfTweet().before(fim)) + map.put(t.getUserSender().getName(), t.getUserTarget().getName()); + } + Set keys = map.keySet(); + for(Object k : keys){ + System.out.println(k + " : " + map.get(k)); + } + return map; + } + + + /** + * Método que retorna as interações sociais referentes a ferramenta de forum. + * @return Um multimap que representa as interações sociais. + * Dessa forma Person "key" interage com os Persons "values" paramterizado pelas datas iniciais e finais. + */ + @SuppressWarnings("unchecked") + public static MultiValueMap getSocialInteractionsFromForumsByCourseAndData(Course course, Date dataini, Date datafim) { + MultiMap mhm = new MultiValueMap(); + Facade facade = Facade.getInstance(); + + Course crs = facade.getCoursesById(course.getId()); + List mdls = crs.getModules(); + for (Module m : mdls) { + for(Forum f: m.getForums()){ + for(Message msg: f.getMessages()){ + if(msg.getMessageReply()!=null &&msg.getDate().after(dataini)&&msg.getDate().before(datafim)&&!msg.getAuthor().equals(msg.getMessageReply().getAuthor())){ + mhm.put(msg.getAuthor().getName(), msg.getMessageReply().getAuthor().getName()); + }else if(msg.getMessageReply() == null && msg.getDate().after(dataini) && msg.getDate().before(datafim)){ + mhm.put(msg.getAuthor().getName(), "EmptyUserReply"); + + } + + + + } + + } + } + + Iterator it2 = mhm.keySet().iterator(); + while(it2.hasNext()){ + System.out.println("Retornando chaves:"+it2.next().toString()); + } + + Iterator it = mhm.values().iterator(); + while(it.hasNext()){ + System.out.println("Retornando valores:"+it.next().toString()); + } + + return (MultiValueMap) mhm; + } + + + private static boolean isBetweenDates(MessengerMessage message, Date inicio, Date fim){ + return (message.getDate().after(inicio) && message.getDate().before(fim)); + } + + public static void generateReport(String texto, String nomearquivo){ + Document document = new Document(); + try { + PdfWriter.getInstance(document, new FileOutputStream(nomearquivo)); + document.open(); + document.add(new Paragraph(texto)); + } + catch(DocumentException de) { + System.err.println(de.getMessage()); + } + catch(IOException ioe) { + System.err.println(ioe.getMessage()); + } document.close(); + + } + + +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/util/Test.java b/src/br/ufpe/cin/amadeus/amadeus_web/util/Test.java old mode 100644 new mode 100755 index 7ac188d..8536d14 --- a/src/br/ufpe/cin/amadeus/amadeus_web/util/Test.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/util/Test.java @@ -3,11 +3,16 @@ package br.ufpe.cin.amadeus.amadeus_web.util; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; import javax.crypto.BadPaddingException; import javax.crypto.IllegalBlockSizeException; import javax.crypto.NoSuchPaddingException; +import org.apache.commons.collections.MultiMap; + public class Test { /** @@ -21,7 +26,20 @@ public class Test { */ public static void main(String[] args) throws InvalidKeyException, BadPaddingException, NoSuchPaddingException, IllegalBlockSizeException, NoSuchAlgorithmException, InvalidAlgorithmParameterException { // TODO Auto-generated method stub - System.out.println(Cryptography.encrypt("25093692")); +// System.out.println(Cryptography.encrypt("25093692")); + + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); + try { + Date inicio = format.parse("2012-11-23"); + Date fim = format.parse("2012-11-26"); + System.out.println("Chegou aqui"); + } catch (ParseException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } } } diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/util/TweetInteractionType.java b/src/br/ufpe/cin/amadeus/amadeus_web/util/TweetInteractionType.java new file mode 100755 index 0000000..52f095a --- /dev/null +++ b/src/br/ufpe/cin/amadeus/amadeus_web/util/TweetInteractionType.java @@ -0,0 +1,14 @@ +package br.ufpe.cin.amadeus.amadeus_web.util; + +/** + * Enum criado para diferenciar o tipo de interação da ferramenta de + * monitoramento do Twitter + * + * @author Nailson Cunha + * + */ +public enum TweetInteractionType { + REPLY, + MENTION, + RETWEET +} diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/util/UtilDWR.java b/src/br/ufpe/cin/amadeus/amadeus_web/util/UtilDWR.java old mode 100644 new mode 100755 index a500377..b59c657 --- a/src/br/ufpe/cin/amadeus/amadeus_web/util/UtilDWR.java +++ b/src/br/ufpe/cin/amadeus/amadeus_web/util/UtilDWR.java @@ -36,11 +36,20 @@ public class UtilDWR { @SuppressWarnings("unchecked") public static Util getUtil(){ - WebContext wctx = WebContextFactory.get(); - String page = wctx.getCurrentPage(); - Collection sessions = wctx.getScriptSessionsByPage(page); - Util u = new Util(sessions); - return u; + WebContext wctx = WebContextFactory.get(); + + if(wctx != null) { + String page = wctx.getCurrentPage(); + Collection sessions = wctx.getScriptSessionsByPage(page); + Util u = new Util(sessions); + return u; + } + else + { + Util u = new Util(); + return u; + } + } } \ No newline at end of file diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/webservices/entities/CourseRemote.java b/src/br/ufpe/cin/amadeus/amadeus_web/webservices/entities/CourseRemote.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/amadeus_web/webservices/services/CourseServiceWS.java b/src/br/ufpe/cin/amadeus/amadeus_web/webservices/services/CourseServiceWS.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/data_service/Main.java b/src/br/ufpe/cin/amadeus/data_service/Main.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/data_service/controllers/CtrlResquest.java b/src/br/ufpe/cin/amadeus/data_service/controllers/CtrlResquest.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/data_service/exception/ServiceException.java b/src/br/ufpe/cin/amadeus/data_service/exception/ServiceException.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/data_service/xml/DSElement.java b/src/br/ufpe/cin/amadeus/data_service/xml/DSElement.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/data_service/xml/basic/ActivityXMLBuilder.java b/src/br/ufpe/cin/amadeus/data_service/xml/basic/ActivityXMLBuilder.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/data_service/xml/basic/CourseXMLBuilder.java b/src/br/ufpe/cin/amadeus/data_service/xml/basic/CourseXMLBuilder.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/data_service/xml/basic/MaterialXMLBuilder.java b/src/br/ufpe/cin/amadeus/data_service/xml/basic/MaterialXMLBuilder.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/data_service/xml/basic/ModuleXMLBuilder.java b/src/br/ufpe/cin/amadeus/data_service/xml/basic/ModuleXMLBuilder.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/data_service/xml/basic/Util.java b/src/br/ufpe/cin/amadeus/data_service/xml/basic/Util.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/data_service/xml/message/DataMessage.java b/src/br/ufpe/cin/amadeus/data_service/xml/message/DataMessage.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/data_service/xml/message/ErrorMessage.java b/src/br/ufpe/cin/amadeus/data_service/xml/message/ErrorMessage.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/data_service/xml/message/RequestMessage.java b/src/br/ufpe/cin/amadeus/data_service/xml/message/RequestMessage.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/data_service/xml/server/AcceptConnections.java b/src/br/ufpe/cin/amadeus/data_service/xml/server/AcceptConnections.java old mode 100644 new mode 100755 diff --git a/src/br/ufpe/cin/amadeus/data_service/xml/server/Connection.java b/src/br/ufpe/cin/amadeus/data_service/xml/server/Connection.java old mode 100644 new mode 100755 diff --git a/src/displaytag.properties b/src/displaytag.properties old mode 100644 new mode 100755 diff --git a/src/displaytag_en_US.properties b/src/displaytag_en_US.properties old mode 100644 new mode 100755 diff --git a/src/hibernate.cfg.xml b/src/hibernate.cfg.xml old mode 100644 new mode 100755 index 409392f..8aff02a --- a/src/hibernate.cfg.xml +++ b/src/hibernate.cfg.xml @@ -9,9 +9,11 @@ org.hibernate.dialect.PostgreSQLDialect org.postgresql.Driver jdbc:postgresql://localhost:5432/amadeus_web - amadeus - amadeus - thread + postgres + postgres + thread + + update 10 2 @@ -32,8 +34,11 @@ + + + @@ -60,6 +65,7 @@ + @@ -78,6 +84,7 @@ + diff --git a/src/log4j.properties b/src/log4j.properties old mode 100644 new mode 100755 diff --git a/src/settings/amadeus.games.settings.xml b/src/settings/amadeus.games.settings.xml old mode 100644 new mode 100755 diff --git a/src/settings/amadeus.mobile.settings.xml b/src/settings/amadeus.mobile.settings.xml old mode 100644 new mode 100755 index b407b11..506f095 --- a/src/settings/amadeus.mobile.settings.xml +++ b/src/settings/amadeus.mobile.settings.xml @@ -2,9 +2,9 @@ org.postgresql.Driver - jdbc:postgresql://localhost:5432/amadeus_mobile_teste + jdbc:postgresql://localhost:5432/amadeus_mobile_droid amadeus - amadeus + d0rfl3x login diff --git a/src/settings/amadeus.openid.settings.xml b/src/settings/amadeus.openid.settings.xml old mode 100644 new mode 100755 diff --git a/src/settings/amadeus.web.settings.xml b/src/settings/amadeus.web.settings.xml old mode 100644 new mode 100755 index 9ce1573..6e6a993 --- a/src/settings/amadeus.web.settings.xml +++ b/src/settings/amadeus.web.settings.xml @@ -1,15 +1,16 @@ - + - 00.95.00 - Português-Brasil + 00.96.60 + Português-Brasil UTF-8 default + localhost:8080/amadeuslms - Conta de e-mail padrão - projetoamadeus@gmail.com - Joplin05 + Conta de e-mail padrão + exemploamadeus@gmail.com + amadeus2012! smtp.gmail.com true false @@ -22,7 +23,7 @@ false - projetoamadeus@gmail.com + exemploamadeus@gmail.com