diff --git a/src/main/webapp/static/js/functions.js b/src/main/webapp/static/js/functions.js index c09b1ffc4c359c1dff01cffdae7a63ac3d11c61a..b174dcb22aad22d58eddb5065c83e3cef4541142 100644 --- a/src/main/webapp/static/js/functions.js +++ b/src/main/webapp/static/js/functions.js @@ -563,6 +563,24 @@ function o_ainvoke(r) { } } + var bTooltips = jQuery('body>div.tooltip.in'); + for(var u=0; u<bTooltips.length; u++) { + try { + jQuery(bTooltips.get(u)).remove(); + } catch(e) { + if(window.console) console.log(e); + } + } + + var jTooltips = jQuery('body>div.ui-tooltip'); + for(var v=0; v<jTooltips.length; v++) { + try { + jQuery(jTooltips.get(v)).remove(); + } catch(e) { + if(window.console) console.log(e); + } + } + if(civis) { // needed only for ie 6/7 bug where an empty div requires space on screen newc.css('display','');//.style.display="";//reset? } else { diff --git a/src/main/webapp/static/js/js.plugins.min.js b/src/main/webapp/static/js/js.plugins.min.js index e9bc77bd0bd1a32f718cd1a5c162767b44713e1d..ff81396678a1fb8e0fac118b2d2729c714e1521c 100644 --- a/src/main/webapp/static/js/js.plugins.min.js +++ b/src/main/webapp/static/js/js.plugins.min.js @@ -5,7 +5,7 @@ * Dual licensed under the MIT or GPL Version 2 licenses. * */ -jQuery.periodic=function(l,h){if(jQuery.isFunction(l)){h=l;l={}}var c=jQuery.extend({},jQuery.periodic.defaults,{ajax_complete:j,increment:g,reset:f,cancel:i},l);c.cur_period=c.period;c.tid=false;var e="";b();return c;function b(){i();c.tid=setTimeout(function(){h.call(c);g();if(c.tid){b()}},c.cur_period)}function j(n,m){if(m==="success"&&e!==n.responseText){e=n.responseText;f()}}function g(){c.cur_period*=c.decay;if(c.cur_period<c.period){f()}else{if(c.cur_period>c.max_period){c.cur_period=c.max_period;if(c.on_max!==undefined){c.on_max.call(c)}}}}function f(){c.cur_period=c.period;b()}function i(){clearTimeout(c.tid);c.tid=null}function k(){}function a(){}function d(){}};jQuery.periodic.defaults={period:4000,max_period:1800000,decay:1.5,on_max:undefined};var Hashtable=(function(){var p="function";var n=(typeof Array.prototype.splice==p)?function(s,r){s.splice(r,1)}:function(u,t){var s,v,r;if(t===u.length-1){u.length=t}else{s=u.slice(t+1);u.length=t;for(v=0,r=s.length;v<r;++v){u[t+v]=s[v]}}};function a(t){var r;if(typeof t=="string"){return t}else{if(typeof t.hashCode==p){r=t.hashCode();return(typeof r=="string")?r:a(r)}else{if(typeof t.toString==p){return t.toString()}else{try{return String(t)}catch(s){return Object.prototype.toString.call(t)}}}}}function g(r,s){return r.equals(s)}function e(r,s){return(typeof s.equals==p)?s.equals(r):(r===s)}function c(r){return function(s){if(s===null){throw new Error("null is not a valid "+r)}else{if(typeof s=="undefined"){throw new Error(r+" must not be undefined")}}}}var q=c("key"),l=c("value");function d(u,s,t,r){this[0]=u;this.entries=[];this.addEntry(s,t);if(r!==null){this.getEqualityFunction=function(){return r}}}var h=0,j=1,f=2;function o(r){return function(t){var s=this.entries.length,v,u=this.getEqualityFunction(t);while(s--){v=this.entries[s];if(u(t,v[0])){switch(r){case h:return true;case j:return v;case f:return[s,v[1]]}}}return false}}function k(r){return function(u){var v=u.length;for(var t=0,s=this.entries.length;t<s;++t){u[v+t]=this.entries[t][r]}}}d.prototype={getEqualityFunction:function(r){return(typeof r.equals==p)?g:e},getEntryForKey:o(j),getEntryAndIndexForKey:o(f),removeEntryForKey:function(s){var r=this.getEntryAndIndexForKey(s);if(r){n(this.entries,r[0]);return r[1]}return null},addEntry:function(r,s){this.entries[this.entries.length]=[r,s]},keys:k(0),values:k(1),getEntries:function(s){var u=s.length;for(var t=0,r=this.entries.length;t<r;++t){s[u+t]=this.entries[t].slice(0)}},containsKey:o(h),containsValue:function(s){var r=this.entries.length;while(r--){if(s===this.entries[r][1]){return true}}return false}};function m(s,t){var r=s.length,u;while(r--){u=s[r];if(t===u[0]){return r}}return null}function i(r,s){var t=r[s];return(t&&(t instanceof d))?t:null}function b(t,r){var w=this;var v=[];var u={};var x=(typeof t==p)?t:a;var s=(typeof r==p)?r:null;this.put=function(B,C){q(B);l(C);var D=x(B),E,A,z=null;E=i(u,D);if(E){A=E.getEntryForKey(B);if(A){z=A[1];A[1]=C}else{E.addEntry(B,C)}}else{E=new d(D,B,C,s);v[v.length]=E;u[D]=E}return z};this.get=function(A){q(A);var B=x(A);var C=i(u,B);if(C){var z=C.getEntryForKey(A);if(z){return z[1]}}return null};this.containsKey=function(A){q(A);var z=x(A);var B=i(u,z);return B?B.containsKey(A):false};this.containsValue=function(A){l(A);var z=v.length;while(z--){if(v[z].containsValue(A)){return true}}return false};this.clear=function(){v.length=0;u={}};this.isEmpty=function(){return !v.length};var y=function(z){return function(){var A=[],B=v.length;while(B--){v[B][z](A)}return A}};this.keys=y("keys");this.values=y("values");this.entries=y("getEntries");this.remove=function(B){q(B);var C=x(B),z,A=null;var D=i(u,C);if(D){A=D.removeEntryForKey(B);if(A!==null){if(!D.entries.length){z=m(v,C);n(v,z);delete u[C]}}}return A};this.size=function(){var A=0,z=v.length;while(z--){A+=v[z].entries.length}return A};this.each=function(C){var z=w.entries(),A=z.length,B;while(A--){B=z[A];C(B[0],B[1])}};this.putAll=function(H,C){var B=H.entries();var E,F,D,z,A=B.length;var G=(typeof C==p);while(A--){E=B[A];F=E[0];D=E[1];if(G&&(z=w.get(F))){D=C(F,z,D)}w.put(F,D)}};this.clone=function(){var z=new b(t,r);z.putAll(w);return z}}return b})();(function(b){b.fn.ooTranslator=function(){var d=null;b(document).each(function(){d=b(document).data("_ooTranslator");if(d==undefined){d=new a();b(document).data("_ooTranslator",d)}});return d};function a(){return this}a.prototype={mapperUrl:null,translators:null,initialize:function(d){this.mapperUrl=d;this.translators=new Object()},getTranslator:function(d,f){if(this.translators[d]==null){this.translators[d]=new Object()}if(this.translators[d][f]==null){var e=this.mapperUrl+"/"+d+"/"+f+"/translations.js";jQuery.ajax(e,{async:false,dataType:"json",success:function(g,i,h){jQuery(document).ooTranslator()._createTranslator(g,d,f)}})}return this.translators[d][f]},_createTranslator:function(e,d,f){this.translators[d][f]=new c().initialize(e,d,f)}};function c(){return this}c.prototype={localizationData:null,bundle:null,locale:null,initialize:function(f,d,e){this.bundle=e;this.locale=d;this.localizationData=f;return this},translate:function(d){if(this.localizationData[d]){return this.localizationData[d]}else{return this.bundle+":"+d}}}})(jQuery);+function(b){var a=function(){this.addExtraElements();this.state={busy:false,brandW:0,sitesW:0,sitesDirty:false,sites:{collapsed:this.isSitesCollapsed(),extended:this.isSitesExtended},tabsW:0,tabsDirty:false,tabs:{collapsed:this.isTabsCollapsed(),extended:this.isTabsExtended()},toolsW:0,toolsDirty:false,tools:{collapsed:this.isToolsCollapsed(),extended:this.isToolsExtended()},offCanvasWidth:0,moreW:0};var c=b("#o_offcanvas_right").css("width");if(c){this.state.offCanvasWidth=parseInt(c.replace(/[^\d.]/g,""));this.initListners();this.calculateWidth();this.optimize()}};a.prototype.initListners=function(){b(window).resize(b.proxy(this.onResizeCallback,this));b(document).on("oo.nav.sites.modified",b.proxy(function(){this.state.sitesDirty=true},this));b(document).on("oo.nav.tabs.modified",b.proxy(function(){this.state.tabsDirty=true},this));b(document).on("oo.nav.tools.modified",b.proxy(function(){this.state.toolsDirty=true},this));b(document).on("oo.dom.replacement.after",b.proxy(this.onDOMreplacementCallback,this));b(window).on("orientationchange",b.proxy(this.hideRight,this));b("#o_navbar_right-toggle").on("click",b.proxy(this.toggleRight,this));b("#o_offcanvas_right .o_offcanvas_close").on("click",b.proxy(this.hideRight,this));b("#o_navbar_more").on("shown.bs.dropdown",this.onDropdownShown);b("#o_navbar_more").on("hidden.bs.dropdown",this.onDropdownHidden)};a.prototype.onResizeCallback=function(){if(!this.state.busy){this.state.busy=true;this.calculateWidth();this.optimize();this.state.busy=false}};a.prototype.onPageWidthChangeCallback=function(){if(!this.state.busy){this.state.busy=true;this.cleanupMoreDropdown();this.calculateWidth();this.optimize();this.state.sitesDirty=false;this.state.tabsDirty=false;this.state.toolsDirty=false;this.state.busy=false}};a.prototype.onDOMreplacementCallback=function(){if(!this.state.busy&&(this.state.sitesDirty||this.state.tabsDirty||this.state.toolsDirty)){this.state.busy=true;this.cleanupMoreDropdown();this.calculateWidth();this.optimize();this.state.sitesDirty=false;this.state.tabsDirty=false;this.state.toolsDirty=false;this.state.busy=false}};a.prototype.onDropdownShown=function(c){var f=b("#o_navbar_more .dropdown-menu");if(f.length){var d=f.offset().left;if(d<0){f.removeClass("dropdown-menu-right")}}};a.prototype.onDropdownHidden=function(c){var d=b("#o_navbar_more .dropdown-menu");d.addClass("dropdown-menu-right")};a.prototype.calculateWidth=function(){var c=b("#o_navbar_container .o_navbar-collapse");this.state.navbarW=c.innerWidth();this.state.brandW=b(".o_navbar-brand").outerWidth(true);this.state.sitesW=this.getSites().outerWidth(true);this.state.tabsW=this.getTabs().outerWidth(true);this.state.toolsW=this.getTools().outerWidth(false);var d=b("#o_navbar_more:visible");this.state.moreW=(d.length>0?d.outerWidth(true):0)};a.prototype.getOverflow=function(c){var d=this.state.navbarW;d-=this.state.sitesW;d-=this.state.tabsW;d-=this.state.toolsW;d-=this.state.brandW;d-=this.state.moreW;d-=25;return -d};a.prototype.optimize=function(h){var c=this.getOverflow();var k=this.getSites();var l=this.getTabs();var g=this.getTools();var n=this.getMoreDropdown();var f=this.getOffcanvasRight();this.updateState();while(c>0&&(!this.state.tabs.collapsed||!this.state.sites.collapsed||!this.state.tools.collapsed)){if(!this.state.tabs.collapsed){this.collapse(l,n,"li","o_dropdown_tab")}else{if(!this.state.sites.collapsed){this.collapse(k,n,"li","o_dropdown_site")}else{if(!this.state.tools.collapsed){this.collapse(g,f,".o_navbar_tool:not(#o_navbar_imclient, #o_navbar_search_opener, #o_navbar_my_menu)","o_tool_right")}}}this.calculateWidth();c=this.getOverflow();this.updateState()}while(c<0&&(!this.state.tabs.extended||!this.state.sites.extended||!this.state.tools.extended)){if(!this.state.tools.extended){var m=this.extend(f,g.children("#o_navbar_imclient, #o_navbar_search_opener, #o_navbar_my_menu").first(),".o_tool_right","o_tool_right",true);if(!m){break}}if(!this.state.sites.extended){var j=this.extend(n,k,"li","o_dropdown_site");if(!j){break}}else{if(!this.state.tabs.extended){var d=this.extend(n,l,"li","o_dropdown_tab");if(!d){break}}}this.calculateWidth();c=this.getOverflow();this.updateState()}if(this.state.sites.extended&&this.state.tabs.extended){var i=b("#o_navbar_more");i.css("display","none")}this.checkToolsOrder()};a.prototype.updateState=function(){this.state.sites.collapsed=this.isSitesCollapsed();this.state.sites.extended=this.isSitesExtended();this.state.tabs.collapsed=this.isTabsCollapsed();this.state.tabs.extended=this.isTabsExtended();this.state.tools.collapsed=this.isToolsCollapsed();this.state.tools.extended=this.isToolsExtended()};a.prototype.collapse=function(g,d,c,f){var e=g.find(c);if(e.length){e=e.last()}if(e.length){f&&e.addClass(f);if(d){e.prependTo(d)}}this.updateDropdownToggle(d)};a.prototype.extend=function(g,d,c,i,f){var e=g.find(c);if(e.length){e=e.first()}var j=false;if(e.length){if(d&&d.length){if(f){d.before(e)}else{e.appendTo(d)}this.updateDropdownToggle(g);this.calculateWidth();var h=this.getOverflow();if(h>0){e.prependTo(g)}else{i&&e.removeClass(i);j=true}}}this.updateDropdownToggle(g);return j};a.prototype.updateDropdownToggle=function(c){var d=c.parents(".o_dropdown_toggle");if(!d.length){return}if(c.children().length){d.css("display","block")}else{d.css("display","none")}};a.prototype.addExtraElements=function(){var d=b("#o_navbar_container .o_navbar-collapse");var c=b("#o_navbar_more");if(c.length==0){c=b('<ul id="o_navbar_more" class="nav o_navbar-nav o_dropdown_toggle"><li><a class="dropdown-toggle" data-toggle="dropdown" href="#"">'+o_info.i18n_topnav_more+' <b class="caret"></b></a><ul class="dropdown-menu dropdown-menu-right"></ul></li></ul>');c.appendTo(d)}this.getSites().append('<li class="divider o_dropdown_site"></li>');b("#o_navbar_help .o_icon, #o_navbar_print .o_icon").addClass("o_icon-fw")};a.prototype.cleanupMoreDropdown=function(){if(!this.state.sitesDirty){var f=this.getSites();var d=this.getMoreDropdown().children(".o_dropdown_site");d.appendTo(f)}else{this.getSites().append('<li class="divider o_dropdown_site"></li>')}if(!this.state.tabsDirty){var e=this.getTabs();var c=this.getMoreDropdown().children(".o_dropdown_tab");c.prependTo(e)}this.getMoreDropdown().empty()};a.prototype.checkToolsOrder=function(){var f=this.getTools();var e=f.find("#o_navbar_help");var d=f.find("#o_navbar_print");var c=f.find("#o_navbar_imclient");if(c&&d){c.after(d)}if(c&&e){c.after(e)}};a.prototype.showRight=function(){if(!this.isOffcanvasVisible()&&!this.offcanvasTransitioning){this.offcanvasTransitioning=true;var d=this;var c=b("#o_offcanvas_right");c.show().transition({x:-d.state.offCanvasWidth},function(){b("body").addClass("o_offcanvas_right_visible");var e=b.proxy(d.hideRightOnClick,d);setTimeout(function(){b("html").on("click",e);d.offcanvasTransitioning=false},10)})}};a.prototype.hideRightOnClick=function(c){if("INPUT"!=c.target.nodeName){this.hideRight()}};a.prototype.hideRight=function(){if(this.isOffcanvasVisible()&&!this.offcanvasTransitioning){this.offcanvasTransitioning=true;b("html").off("click",b.proxy(this.hideRight,this));var d=this;var c=b("#o_offcanvas_right");c.transition({x:d.state.offCanvasWidth},function(){c.hide();b("body").removeClass("o_offcanvas_right_visible");d.offcanvasTransitioning=false})}};a.prototype.toggleRight=function(){if(this.isOffcanvasVisible()){this.hideRight()}else{this.showRight()}};a.prototype.isOffcanvasVisible=function(){return b("#o_offcanvas_right:visible").length};a.prototype.getSites=function(){return b("#o_navbar_container .o_navbar_sites")};a.prototype.getTabs=function(){return b("#o_navbar_container .o_navbar_tabs")};a.prototype.getTools=function(){return b("#o_navbar_container #o_navbar_tools_permanent")};a.prototype.getMoreDropdown=function(){return b("#o_navbar_more .dropdown-menu")};a.prototype.getOffcanvasRight=function(){return b("#o_offcanvas_right_container .o_navbar-right")};a.prototype.isSitesCollapsed=function(){return !this.getSites().children("li").not(".divider").length};a.prototype.isSitesExtended=function(){return !this.getMoreDropdown().children(".o_dropdown_site").not(".divider").length};a.prototype.isTabsCollapsed=function(){return !this.getTabs().children("li").length};a.prototype.isTabsExtended=function(){return !this.getMoreDropdown().children(".o_dropdown_tab").length};a.prototype.isToolsCollapsed=function(){return !this.getTools().children(".o_navbar_tool").not("#o_navbar_imclient, #o_navbar_search_opener, #o_navbar_my_menu").length};a.prototype.isToolsExtended=function(){return !this.getOffcanvasRight().children(".o_tool_right").length};b(document).ready(function(){var d=b("#o_navbar_wrapper");if(d){var c=new a();window.OPOL.navbar=c}})}(jQuery);+function(b){b.fn.ooBgCarrousel=function(){return new a()};var a=function(){};a.prototype.initCarrousel=function(g){this.settings=b.extend({query:null,images:[],shuffle:false,shuffleFirst:false,durationshow:5000,durationout:500,durationin:500,easeout:"ease",easein:"ease"},g);this.pos=null;if(this.settings.query==null||this.settings.images.length==0){return}this.initialImage=this.settings.images[0];if(this.settings.shuffle){var f=this.settings.images;for(var d,c,e=f.length;e;d=parseInt(Math.random()*e),c=f[--e],f[e]=f[d],f[d]=c){}}if(this.settings.shuffleFirst){this._replaceImage()}this.rotate()};a.prototype.rotate=function(){setTimeout(b.proxy(this._hideCurrent,this),this.settings.durationshow)};a.prototype._hideCurrent=function(){var c=b(this.settings.query);if(c&&c.length>0){c.transition({opacity:0,duration:this.settings.durationout,easing:this.settings.easeout},b.proxy(this._showNext,this))}};a.prototype._replaceImage=function(d){if(!d){d=b(this.settings.query)}if(d&&d.length>0){this.newImg="";this.oldImg="";if(this.pos==null){this.pos=1;this.oldImg=this.initialImage}else{this.oldImg=this.settings.images[this.pos];this.pos++;if(this.settings.images.length==this.pos){this.pos=0}}this.newImg=this.settings.images[this.pos];var c=d.css("background-image");if(c.indexOf(this.oldImg)==-1){d.transition({opacity:1,duration:0});return}var e=c.replace(this.oldImg,this.newImg);d.css("background-image",e)}};a.prototype._showNext=function(){var c=b(this.settings.query);this._replaceImage(c);c.transition({opacity:1,duration:this.settings.durationin,easing:this.settings.easein},b.proxy(this.rotate,this))}}(jQuery);!function(e){function t(){function t(e){"remove"===e&&this.each(function(e,t){var n=i(t);n&&n.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(e,t){var n=tinymce.get(t.id.replace(/_parent$/,""));n&&n.remove()})}function r(e){var n,r=this;if(null!=e)t.call(r),r.each(function(t,n){var r;(r=tinymce.get(n.id))&&r.setContent(e)});else if(r.length>0&&(n=tinymce.get(r[0].id)))return n.getContent()}function i(e){var t=null;return e&&e.id&&a.tinymce&&(t=tinymce.get(e.id)),t}function o(e){return!!(e&&e.length&&a.tinymce&&e.is(":tinymce"))}var s={};e.each(["text","html","val"],function(t,a){var l=s[a]=e.fn[a],c="text"===a;e.fn[a]=function(t){var a=this;if(!o(a))return l.apply(a,arguments);if(t!==n)return r.call(a.filter(":tinymce"),t),l.apply(a.not(":tinymce"),arguments),a;var s="",u=arguments;return(c?a:a.eq(0)).each(function(t,n){var r=i(n);s+=r?c?r.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):r.getContent({save:!0}):l.apply(e(n),u)}),s}}),e.each(["append","prepend"],function(t,r){var a=s[r]=e.fn[r],l="prepend"===r;e.fn[r]=function(e){var t=this;return o(t)?e!==n?("string"==typeof e&&t.filter(":tinymce").each(function(t,n){var r=i(n);r&&r.setContent(l?e+r.getContent():r.getContent()+e)}),a.apply(t.not(":tinymce"),arguments),t):void 0:a.apply(t,arguments)}}),e.each(["remove","replaceWith","replaceAll","empty"],function(n,r){var i=s[r]=e.fn[r];e.fn[r]=function(){return t.call(this,r),i.apply(this,arguments)}}),s.attr=e.fn.attr,e.fn.attr=function(t,a){var l=this,c=arguments;if(!t||"value"!==t||!o(l))return a!==n?s.attr.apply(l,c):s.attr.apply(l,c);if(a!==n)return r.call(l.filter(":tinymce"),a),s.attr.apply(l.not(":tinymce"),c),l;var u=l[0],d=i(u);return d?d.getContent({save:!0}):s.attr.apply(e(u),c)}}var n,r,i,o=[],a=window;e.fn.tinymce=function(n){function s(){var r=[],o=0;i||(t(),i=!0),d.each(function(e,t){var i,a=t.id,s=n.oninit;a||(t.id=a=tinymce.DOM.uniqueId()),tinymce.get(a)||(i=new tinymce.Editor(a,n,tinymce.EditorManager),r.push(i),i.on("init",function(){var e,t=s;d.css("visibility",""),s&&++o==r.length&&("string"==typeof t&&(e=t.indexOf(".")===-1?null:tinymce.resolve(t.replace(/\.\w+$/,"")),t=tinymce.resolve(t)),t.apply(e||tinymce,r))}))}),e.each(r,function(e,t){t.render()})}var l,c,u,d=this,f="";if(!d.length)return d;if(!n)return window.tinymce?tinymce.get(d[0].id):null;if(d.css("visibility","hidden"),a.tinymce||r||!(l=n.script_url))1===r?o.push(s):s();else{r=1,c=l.substring(0,l.lastIndexOf("/")),l.indexOf(".min")!=-1&&(f=".min"),a.tinymce=a.tinyMCEPreInit||{base:c,suffix:f},l.indexOf("gzip")!=-1&&(u=n.language||"en",l=l+(/\?/.test(l)?"&":"?")+"js=true&core=true&suffix="+escape(f)+"&themes="+escape(n.theme||"modern")+"&plugins="+escape(n.plugins||"")+"&languages="+(u||""),a.tinyMCE_GZ||(a.tinyMCE_GZ={start:function(){function t(e){tinymce.ScriptLoader.markDone(tinymce.baseURI.toAbsolute(e))}t("langs/"+u+".js"),t("themes/"+n.theme+"/theme"+f+".js"),t("themes/"+n.theme+"/langs/"+u+".js"),e.each(n.plugins.split(","),function(e,n){n&&(t("plugins/"+n+"/plugin"+f+".js"),t("plugins/"+n+"/langs/"+u+".js"))})},end:function(){}}));var p=document.createElement("script");p.type="text/javascript",p.onload=p.onreadystatechange=function(t){t=t||window.event,2===r||"load"!=t.type&&!/complete|loaded/.test(p.readyState)||(tinymce.dom.Event.domLoaded=1,r=2,n.script_loaded&&n.script_loaded(),s(),e.each(o,function(e,t){t()}))},p.src=l,document.body.appendChild(p)}return d},e.extend(e.expr[":"],{tinymce:function(e){var t;return!!(e.id&&"tinymce"in window&&(t=tinymce.get(e.id),t&&t.editorManager===tinymce))}})}(jQuery);OPOL={};var o2c=0;var o3c=new Array();o_info.guibusy=false;o_info.linkbusy=false;o_info.scrolling=false;o_info.debug=true;o_info.drakes=new Array();var BLoader={_ajaxLoadedJS:new Array(),_isAlreadyLoadedJS:function(b){var a=true;jQuery("head script[src]").each(function(d,c){if(jQuery(c).attr("src").indexOf(b)!=-1){a=false}});if(jQuery.inArray(b,this._ajaxLoadedJS)!=-1){a=false}return !a},loadJS:function(b,c,a){if(!this._isAlreadyLoadedJS(b)){if(o_info.debug){o_log("BLoader::loadJS: loading ajax::"+a+" url::"+b)}if(a){jQuery.ajax(b,{async:false,dataType:"script",cache:true,success:function(d,f,e){}});this._ajaxLoadedJS.push(b)}else{jQuery.getScript(b)}if(o_info.debug){o_log("BLoader::loadJS: loading DONE url::"+b)}}else{if(o_info.debug){o_log("BLoader::loadJS: already loaded url::"+b)}}},executeGlobalJS:function(jsString,contextDesc){try{if(window.execScript){window.execScript(jsString)}else{window.eval(jsString)}}catch(e){if(window.console){console.log(contextDesc,"cannot execute js",jsString)}if(o_info.debug){o_logerr("BLoader::executeGlobalJS: Error when executing JS code in contextDesc::"+contextDesc+' error::"'+showerror(e)+" for: "+escape(jsString))}if(window.location.href.indexOf("o_winrndo")!=-1){window.location.reload()}else{window.location.href=window.location.href+(window.location.href.indexOf("?")!=-1?"&":"?")+"o_winrndo=1"}}},loadCSS:function(b,o,q){var r=window.document;try{if(r.createStyleSheet){var g=r.styleSheets;var d=0;var p=0;for(i=0;i<g.length;i++){var m=g[i];var f=m.href;if(f==b){d++;if(m.disabled){m.disabled=false;return}else{if(o_info.debug){o_logwarn("BLoader::loadCSS: style: "+b+" already in document and not disabled! (duplicate add)")}return}}if(m.id=="o_theme_css"){p=i}}if(d>1&&o_info.debug){o_logwarn("BLoader::loadCSS: apply styles: num of stylesheets found was not 0 or 1:"+d)}if(q){p=g.length}r.createStyleSheet(b,p)}else{var c=jQuery("#"+o);if(c&&c.length>0){if(o_info.debug){o_logwarn("BLoader::loadCSS: stylesheet already found in doc when trying to add:"+b+", with id "+o)}}else{var a=jQuery('<link id="'+o+'" rel="stylesheet" type="text/css" href="'+b+'">');if(q){a.insertBefore(jQuery("#o_fontSize_css"))}else{a.insertBefore(jQuery("#o_theme_css"))}}}}catch(n){if(window.console){console.log(n)}if(o_info.debug){o_logerr("BLoader::loadCSS: Error when loading CSS from URL::"+b)}}},unLoadCSS:function(a,n){var o=window.document;try{if(o.createStyleSheet){var f=o.styleSheets;var d=0;var p=a;var b=window.location.href.substring(0,window.location.href.indexOf("/",8));if(a.indexOf(b)==0){p=a.substring(b.length)}for(i=0;i<f.length;i++){var g=f[i].href;if(g==a||g==p){d++;if(!f[i].disabled){f[i].disabled=true}else{if(o_info.debug){o_logwarn("stylesheet: when removing: matching url, but already disabled! url:"+g)}}}}if(d!=1&&o_info.debug){o_logwarn("stylesheet: when removeing: num of stylesheets found was not 1:"+d)}}else{var c=jQuery("#"+n);if(c){c.href="";c.remove();c=null;return}else{if(o_info.debug){o_logwarn("no link with id found to remove, id:"+n+", url "+a)}}}}catch(m){if(o_info.debug){o_logerr("BLoader::unLoadCSS: Error when unloading CSS from URL::"+a)}}}};var BFormatter={formatLatexFormulas:function(b){try{if(typeof MathJax==="undefined"){o_mathjax()}else{if(MathJax&&MathJax.isReady){jQuery(function(){MathJax.Hub.Queue(function(){if(jQuery("#"+b+" .MathJax").length==0){MathJax.Hub.Typeset(b)}})})}else{setTimeout(function(){BFormatter.formatLatexFormulas(b)},100)}}}catch(a){if(window.console){console.log("error in BFormatter.formatLatexFormulas: ",a)}}},alignTableColumns:function(a){try{var b=new Array();jQuery(a).each(function(){for(j=0;j<jQuery(this)[0].rows[0].cells.length;j++){var d=jQuery(this)[0].rows[0].cells[j];if(!b[j]||b[j]<d.clientWidth){b[j]=d.clientWidth}}});jQuery(a).each(function(){for(j=0;j<jQuery(this)[0].rows[0].cells.length;j++){jQuery(this)[0].rows[0].cells[j].style.width=b[j]+"px"}})}catch(c){if(window.console){console.log("error in BFormatter.alignTableColumns: ",c)}}}};function o_init(){try{o_getMainWin().o_afterserver();if(window.location.href&&window.location.href!=null&&window.location.href.indexOf("%3A")<0){var a=window.location.href;if(a!=null&&!(a.lastIndexOf("http",0)===0)&&!(a.lastIndexOf("https",0)===0)){a=o_info.serverUri+a}o_info.businessPath=a;if(!(typeof o_shareActiveSocialUrl==="undefined")){o_shareActiveSocialUrl()}}}catch(b){if(o_info.debug){o_log("error in o_init: "+showerror(b))}}}function o_initEmPxFactor(){o_info.emPxFactor=jQuery("#o_width_1em").width();if(o_info.emPxFactor==0||o_info.emPxFactor=="undefined"){o_info.emPxFactor=12}}function o_getMainWin(){try{if(window.OPOL){return window}else{if(window.opener&&window.opener.OPOL){return window.opener}}}catch(a){if(o_info.debug){o_logerr('Exception while getting main window. rror::"'+showerror(a))}if(window.console){console.log('Exception while getting main window. rror::"'+showerror(a),"functions.js");console.log(a)}}throw"Can not find main OpenOLAT window"}function o_beforeserver(){o_info.linkbusy=true;showAjaxBusy();if(window.suppressOlatOnUnloadOnce){window.suppressOlatOnUnloadOnce=false}else{if(window.olatonunload){olatonunload()}}}function o_afterserver(){o2c=0;o_info.linkbusy=false;removeAjaxBusy()}function o2cl(){try{if(o_info.linkbusy){return false}else{var b=(o2c==0||confirm(o_info.dirty_form));if(b){o_beforeserver()}return b}}catch(a){if(window.console){console.log(a)}return false}}function o2cl_dirtyCheckOnly(){try{if(o_info.linkbusy){return false}else{return(o2c==0||confirm(o_info.dirty_form))}}catch(a){if(window.console){console.log(a)}return false}}function o2cl_noDirtyCheck(){if(o_info.linkbusy){return false}else{o_beforeserver();return true}}function o3cl(d){if(o_info.linkbusy){return false}else{var b=o3c1.indexOf(d)>-1;var a=(b&&o3c1.length>1)||o3c1.length>0;var c=(!a||confirm(o_info.dirty_form));if(c){o_beforeserver()}return c}}function o_onc(a){var b=a.responseText;BLoader.executeGlobalJS("o_info.last_o_onc="+b+";","o_onc");o_ainvoke(o_info.last_o_onc,false)}function o_allowNextClick(){o_info.linkbusy=false;removeAjaxBusy()}function removeBusyAfterDownload(c,b,a){o2c=0;o_afterserver()}Array.prototype.search=function(c,d){var a=this.length;for(var b=0;b<a;b++){if(this[b].constructor==Array){if(this[b].search(c,d)){return true;break}}else{if(d){if(this[b].indexOf(c)!=-1){return true;break}}else{if(this[b]==c){return true;break}}}}return false};if(!Function.prototype.curry){Function.prototype.curry=function(){if(arguments.length<1){return this}var a=this;var b=Array.prototype.slice.call(arguments);return function(){return a.apply(this,b.concat(Array.prototype.slice.call(arguments)))}}}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(c){if(this==null){throw new TypeError()}var d=Object(this);var a=d.length>>>0;if(a===0){return -1}var e=0;if(arguments.length>1){e=Number(arguments[1]);if(e!=e){e=0}else{if(e!=0&&e!=Infinity&&e!=-Infinity){e=(e>0||-1)*Math.floor(Math.abs(e))}}}if(e>=a){return -1}var b=e>=0?e:Math.max(a-Math.abs(e),0);for(;b<a;b++){if(b in d&&d[b]===c){return b}}return -1}}var b_onDomReplacementFinished_callbacks=new Array();function b_AddOnDomReplacementFinishedCallback(a){b_onDomReplacementFinished_callbacks.push(a)}var b_changedDomEl=new Array();function b_AddOnDomReplacementFinishedUniqueCallback(a){if(a.constructor==Array){if(b_onDomReplacementFinished_callbacks.search(a[0])){return}}b_AddOnDomReplacementFinishedCallback(a)}var o_debug_trid=0;function o_ainvoke(M){if(M==undefined){return}o_info.inainvoke=true;var H=M.cmdcnt;if(H>0){jQuery(document).trigger("oo.dom.replacement.before");b_changedDomEl=new Array();if(o_info.debug){o_debug_trid++}var y=M.cmds;for(var S=0;S<H;S++){var I=y[S];var A=I.cmd;var Q=I.cda;var T=I.w;var c=this.window;var J;if(c){switch(A){case 1:var L=Q.e;BLoader.executeGlobalJS(L,"o_ainvoker::jsexec");if(o_info.debug){o_log("c1: execute jscode: "+L)}case 2:var u=Q.cc;var E=Q.cps;for(var P=0;P<u;P++){var m=E[P];var h=m.cid;var O=m.cidvis;var G=m.cw;var x=m.hfrag;var N=m.jsol;var g=m.hdr;if(o_info.debug){o_log("c2: redraw: "+m.cname+" ("+h+") "+m.hfragsize+" bytes, listener(s): "+m.clisteners)}var V=g+"\n\n"+x;var R=false;var D="o_c"+h;var B=jQuery("#"+D);if(B==null||B.length==0){D="o_fi"+h;B=jQuery("#"+D);R=true}if(B!=null){var w=jQuery("div.o_richtext_mce textarea",B);for(var K=0;K<w.length;K++){try{var a=jQuery(w.get(K)).attr("id");if(typeof top.tinymce!=undefined){top.tinymce.remove("#"+a)}}catch(Y){if(window.console){console.log(Y)}}}if(O){B.css("display","")}else{B.css("display","none")}if(R||!G){B.replaceWith(V)}else{try{B.empty().html(V);if(V.length>0&&B.get(0).innerHTML==""){B.get(0).innerHTML=V}}catch(Y){if(window.console){console.log(Y)}if(window.console){console.log("Fragment",V)}}b_changedDomEl.push(D)}B=null;checkDrakes();if(N!=""){BLoader.executeGlobalJS(N,"o_ainvoker::jsol")}}}break;case 3:c.o2c=0;var W=Q.rurl;c.o_afterserver();c.document.location.replace(W);break;case 5:c.o2c=0;var W=Q.rurl;c.o_afterserver();c.document.location.replace(W);break;case 6:c.o2c=0;c.o_afterserver();break;case 7:var o=c.document.location;var z=o.protocol+"//"+o.hostname;if(o.port!=""){z+=":"+o.port}var v=Q.cssrm;for(P=0;P<v.length;P++){var C=v[P];var F=C.id;var f=z+C.url;BLoader.unLoadCSS(f,F);if(o_info.debug){o_log("c7: rm css: id:"+F+" ,url:'"+f+"'")}}var U=Q.cssadd;for(k=0;k<U.length;k++){var C=U[k];var F=C.id;var f=z+C.url;var n=C.pt;BLoader.loadCSS(f,F,n);if(o_info.debug){o_log("c7: add css: id:"+F+" ,url:'"+f+"'")}}var p=Q.jsadd;for(l=0;l<p.length;l++){var C=p[l];var X=C.before;if(jQuery.type(X)==="string"){BLoader.executeGlobalJS(X,"o_ainvoker::preJsAdd")}var f=C.url;var q=C.enc;if(jQuery.type(f)==="string"){BLoader.loadJS(f,q,true)}if(o_info.debug){o_log("c7: add js: "+f)}}break;default:if(o_info.debug){o_log("?: unknown command "+A)}break}}else{if(o_info.debug){o_log("could not find window??")}}}var b=b_onDomReplacementFinished_callbacks.length;for(mycounter=0;b>mycounter;mycounter++){if(mycounter>50){break}var s=b_onDomReplacementFinished_callbacks.shift();if(typeof s.length==="number"){if(s[0]=="glosshighlighter"){var d=s[1];s=d}}s()}jQuery(document).trigger("oo.dom.replacement.after")}o_info.inainvoke=false}function clearAfterAjaxIframeCall(){if(o_info.linkbusy){o_afterserver()}}function showAjaxBusy(){setTimeout(function(){if(o_info.linkbusy){try{if(jQuery("#o_ajax_busy_backdrop").length==0){jQuery("#o_body").addClass("o_ajax_busy");jQuery("#o_ajax_busy").modal({show:true,backdrop:"static",keyboard:"false"});jQuery("#o_ajax_busy").after('<div id="o_ajax_busy_backdrop" class="modal-backdrop in"></div>');jQuery("#o_ajax_busy>.modal-backdrop").remove();jQuery("#o_ajax_busy_backdrop").css({"z-index":1200})}}catch(a){if(window.console){console.log(a)}}}},700)}function removeAjaxBusy(){try{jQuery("#o_body").removeClass("o_ajax_busy");jQuery("#o_ajax_busy_backdrop").remove();jQuery("#o_ajax_busy").modal("hide")}catch(a){if(window.console){console.log(a)}}}function setFormDirty(c){o2c=1;var a=document.getElementById(c);if(a!=null){var b=a.olat_fosm_0;if(b==null){b=a.olat_fosm}if(b){b.className="btn o_button_dirty"}}}function contextHelpWindow(a){helpWindow=window.open(a,"HelpWindow","height=760, width=940, left=0, top=0, location=no, menubar=no, resizable=yes, scrollbars=yes, toolbar=no");helpWindow.focus()}function o_openPopUp(b,d,c,a,f){attributes="height="+a+", width="+c+", resizable=yes, scrollbars=yes, left=100, top=100, ";if(f){attributes+="location=yes, menubar=yes, status=yes, toolbar=yes"}else{attributes+="location=no, menubar=no, status=no, toolbar=no"}var h;try{h=window.open(b,d,attributes)}catch(g){h=window.open(b,"OpenOLAT",attributes)}h.focus();if(o_info.linkbusy){o_afterserver()}}function o_openTab(a){var b=window.open(a,"_blank");b.focus();if(o_info.linkbusy){o_afterserver()}}function b_handleFileUploadFormChange(m,b,g){m.setCustomValidity("");if(m.hasAttribute("data-max-size")){var p=m.getAttribute("data-max-size");if(p){var d=formInputFileSize(m);if(d>p){var q=jQuery(document).ooTranslator().getTranslator(o_info.locale,"org.olat.modules.forms.ui");var h=q.translate("file.upload.error.limit.exeeded");var o=q.translate("file.upload.limit");var n;if(p<250*1024){n=(p/1024).toFixed(1)+" KB"}else{if(p<250*1024*1024){n=(p/1024/1024).toFixed(1)+" MB"}else{n=(p/1024/1024/1024).toFixed(1)+" GB"}}m.setCustomValidity(h+" ("+o+": "+n+")")}}}var f=m.value;var e=f.lastIndexOf("/");if(e!=-1){f=f.substring(e+1)}e=f.lastIndexOf("\\");if(e!=-1){f=f.substring(e+1)}b.value=f;if(g){g.className="o_button_dirty"}var a=m.form.elements;for(i=0;i<a.length;i++){var c=a[i];if(c.name==b.name&&i+1<a.length){a[i+1].focus()}}}function formInputFileSize(c){try{if(!window.FileReader){return -1}if(!c||!c.files){return -1}var a=c.files[0];if(!a){return -1}return a.size}catch(b){o_logerr("form input file size check failed: "+b)}return -1}function gotonode(a){try{if(typeof o_activateCourseNode!="undefined"){o_activateCourseNode(a)}else{if(opener&&typeof opener.o_activateCourseNode!="undefined"){opener.o_activateCourseNode(a)}}}catch(b){alert("Goto node error:"+b)}}function o_viewportHeight(){var a=jQuery(document).height();if(a>0){return a}else{return 600}}OPOL.getMainColumnsMaxHeight=function(){var m=0,f=0,a=0,c=0,h=0,b,g=jQuery("#o_main_left_content"),e=jQuery("#o_main_right_content"),d=jQuery("#o_main_center_content");if(g!="undefined"&&g!=null){m=g.outerHeight(true)}if(e!="undefined"&&e!=null){f=e.outerHeight(true)}if(d!="undefined"&&d!=null){a=d.outerHeight(true)}c=(m>f?m:f);c=(c>a?c:a);if(c>0){return c}b=jQuery("#o_main");if(b!="undefined"&&b!=null){h=b.height()}if(b>0){return b}return o_viewportHeight()};OPOL.adjustHeight=function(){try{var a=jQuery("#o_main_left_content");var m=a.length==0?0:a.outerHeight(true);var h=jQuery("#o_main_right_content");var f=h.length==0?0:h.outerHeight(true);var b=jQuery("#o_main_center_content");var d=b.length==0?0:b.outerHeight(true);var c=Math.max(m,f,d);if(a.length>0){jQuery("#o_main_left").css({"min-height":c+"px"})}if(h.length>0){jQuery("#o_main_right").css({"min-height":c+"px"})}if(b.length>0){jQuery("#o_main_center").css({"min-height":c+"px"})}}catch(g){if(window.console){console.log(g)}}};OPOL.setContainerFullWidth=function(a){if(a){jQuery("body").addClass("o_width_full")}else{jQuery("body").removeClass("o_width_full")}jQuery.proxy(OPOL.navbar.onPageWidthChangeCallback,OPOL.navbar)()};jQuery(window).resize(function(){clearTimeout(o_info.resizeId);o_info.resizeId=setTimeout(function(){jQuery(document).trigger("oo.window.resize.after")},500)});jQuery(document).on("oo.window.resize.after",OPOL.adjustHeight);jQuery(document).on("oo.dom.replacement.after",OPOL.adjustHeight);jQuery().ready(OPOL.adjustHeight);function o_scrollToElement(a){try{o_info.scrolling=true;jQuery("html, body").animate({scrollTop:jQuery(a).offset().top},333,function(d,c){o_info.scrolling=false})}catch(b){}}function o_popover(c,b,a){if(typeof(a)==="undefined"){a="bottom"}jQuery("#"+c).popover({placement:a,html:true,trigger:"click",container:"body",content:function(){return jQuery("#"+b).clone().html()}}).on("shown.bs.popover",function(){var d=function(f){jQuery("#"+c).popover("hide");jQuery("body").unbind("click",d)};setTimeout(function(){jQuery("body").on("click",d)},5)})}function o_popoverWithTitle(e,d,c,b){if(typeof(b)==="undefined"){b="bottom"}var a=jQuery("#"+e).popover({placement:b,html:true,title:c,trigger:"click",container:"body",content:function(){return jQuery("#"+d).clone().html()}});a.on("shown.bs.popover",function(){var f=function(g){jQuery("#"+e).popover("hide");jQuery("body").unbind("click",f)};setTimeout(function(){jQuery("body").on("click",f)},5)});return a}function o_shareLinkPopup(d,c,b){if(typeof(b)==="undefined"){b="top"}var a=jQuery("#"+d);a.popover({placement:b,html:true,trigger:"click",container:"body",content:c}).on("shown.bs.popover",function(){var e=function(f){if(jQuery(f.target).data("toggle")!=="popover"&&jQuery(f.target).parents(".popover.in").length===0){jQuery("#"+d).popover("hide");jQuery("body").unbind("click",e)}};setTimeout(function(){jQuery("body").on("click",e)},5)});a.attr("title",a.attr("data-original-title"))}function o_QRCodePopup(d,c,b){if(typeof(b)==="undefined"){b="top"}var a=jQuery("#"+d);a.popover({placement:b,html:true,trigger:"click",container:"body",content:'<div id="'+d+'_pop" class="o_qrcode"></div>'}).on("shown.bs.popover",function(){o_info.qr=o_QRCode(d+"_pop",(jQuery.isFunction(c)?c():c));var e=function(f){if(jQuery(f.target).data("toggle")!=="popover"&&jQuery(f.target).parents(".popover.in").length===0){jQuery("#"+d).popover("hide");jQuery("body").unbind("click",e)}};setTimeout(function(){jQuery("body").on("click",e)},5)}).on("hidden.bs.popover",function(){try{o_info.qr.clear();delete o_info.qr}catch(f){}});a.attr("title",a.attr("data-original-title"))}function o_QRCode(c,b){try{BLoader.loadJS(o_info.o_baseURI+"/js/jquery/qrcodejs/qrcode.min.js","utf8",true);return new QRCode(document.getElementById(c),b)}catch(a){return null}}function b_resizeIframeToMainMaxHeight(e){var d=jQuery("#"+e);if(d!="undefined"&&d!=null){var c=OPOL.getMainColumnsMaxHeight()-110;var b=o_viewportHeight()-100;b=b-d.offset().top;var a=(b>c?b:c);d.height(a)}}var o_debu_oldcn,o_debu_oldtt;function o_debu_show(b,a){if(o_debu_oldcn){o_debu_hide(o_debu_oldcn,o_debu_oldtt)}jQuery(b).addClass("o_dev_m");jQuery(a).show();o_debu_oldtt=a;o_debu_oldcn=b}function o_debu_hide(b,a){jQuery(a).hide();jQuery(b).removeClass("o_dev_m")}function o_dbg_mark(a){var b=jQuery("#"+a);if(b){b.css("background-color","#FCFCB8");b.css("border","3px solid #00F")}}function o_dbg_unmark(a){var b=jQuery("#"+a);if(b){b.css("border","");b.css("background-color","")}}function o_clearConsole(){o_log_all="";o_log(null)}var o_log_all="";function o_log(b){if(b){o_log_all="\n"+o_debug_trid+"> "+b+o_log_all;o_log_all=o_log_all.substr(0,4000)}var a=jQuery("#o_debug_cons");if(a){if(o_log_all.length==4000){o_log_all=o_log_all+"\n... (stripped: to long)... "}a.value=o_log_all}if(!jQuery.type(window.console)==="undefined"){window.console.log(b)}}function o_logerr(a){o_log("ERROR:"+a)}function o_logwarn(a){o_log("WARN:"+a)}function showerror(c){var a="";for(var b in c){a+=b+": "+c[b]+"\n"}return"error detail:\n"+a}function o_ffEvent(g,f,d,o,p){var h,m,b,a;h=document.getElementById(f);m=h.value;h.value=d;b=document.getElementById(o);a=b.value;b.value=p;var c=jQuery("#"+g);var e=true;jQuery("#"+g+" input[type=file]").filter(function(q,r){return !r.checkValidity()}).each(function(q,s){var t=s.getAttribute("id")+"_validation_error";var r=document.getElementById(t);if(!r){r=document.createElement("div");r.setAttribute("class","o_error");r.setAttribute("id",t);s.parentNode.parentNode.appendChild(r)}r.innerHTML=s.validationMessage;e=false});if(e){var n=c.attr("enctype");if(n&&n.indexOf("multipart")==0){o_XHRSubmitMultipart(g)}else{if(document.forms[g].onsubmit()){document.forms[g].submit()}}}h.value=m;b.value=a}function o_IQEvent(a){if(document.forms[a].onsubmit()){document.forms[a].submit()}}function o_TableMultiActionEvent(a,c){var b=jQuery("#o_mai_"+a);b.val(c);if(document.forms[a].onsubmit()){document.forms[a].submit()}b.val("")}function o_XHRSubmit(h){if(o_info.linkbusy){return false}o_beforeserver();var o=true;var a=jQuery("#"+h);var n=a.attr("enctype");if(n&&n.indexOf("multipart")==0){var g="openolat-submit-"+(""+Math.random()).substr(2);var d=o_createIFrame(g);document.body.appendChild(d);a.attr("target",d.name);return true}else{var f=a.serializeArray();if(arguments.length>1){var m=arguments.length;for(var e=1;e<m;e=e+2){if(m>e+1){var c=new Object();c.name=arguments[e];c.value=arguments[e+1];f[f.length]=c}}}var b=a.attr("action");jQuery.ajax(b,{type:"POST",data:f,cache:false,dataType:"json",success:function(s,v,r){try{o_ainvoke(s);if(o){var p=s.businessPath;var q=s.documentTitle;var u=s.historyPointId;if(p){o_pushState(u,q,p)}}}catch(t){if(window.console){console.log(t)}}finally{o_afterserver()}},error:o_onXHRError});return false}}function o_XHRSubmitMultipart(a){var c=jQuery("#"+a);var d="openolat-submit-"+(""+Math.random()).substr(2);var b=o_createIFrame(d);document.body.appendChild(b);c.attr("target",b.name);c.submit();c.attr("target","")}function o_createIFrame(b){var a=jQuery('<iframe name="'+b+'" id="'+b+'" src="about:blank" style="position: absolute; top: -9999px; left: -9999px;"></iframe>');return a[0]}function o_removeIframe(a){jQuery("#"+a).remove()}function o_showFormDirtyDialog(a){o_scrollToElement("#o_top");jQuery("#o_form_dirty_message").modal("show");jQuery("#o_form_dirty_message .o_form_dirty_ignore").on("click",function(){jQuery("#o_form_dirty_message").modal("hide");jQuery("#o_form_dirty_message .o_form_dirty_ignore").off();a()});return false}function o_ffXHREvent(h,e,s,g,p,t,f,m){if(t&&o2c==1){var d=Array.prototype.slice.call(arguments);d[5]=false;var u=function(){o_ffXHREvent.apply(window,d)};return o_showFormDirtyDialog(u)}else{if(!o2cl_noDirtyCheck()){return false}}o_beforeserver();var v=new Object();if(m){var b=jQuery("#"+h);var q=b.serializeArray();var o=q.length;for(var r=0;r<o;r++){var n=q[r];if(n.name!="dispatchuri"&&n.name!="dispatchevent"){v[n.name]=n.value}}}v.dispatchuri=s;v.dispatchevent=p;if(arguments.length>8){var a=arguments.length;for(var r=8;r<a;r=r+2){if(a>r+1){v[arguments[r]]=arguments[r+1]}}}var c=jQuery("#"+h).attr("action");jQuery.ajax(c,{type:"POST",data:v,cache:false,dataType:"json",success:function(z,C,y){try{o_ainvoke(z);if(f){var w=z.businessPath;var x=z.documentTitle;var B=z.historyPointId;if(w){o_pushState(B,x,w)}}}catch(A){if(window.console){console.log(A)}}finally{o_afterserver()}},error:o_onXHRError})}function o_ffXHRNFEvent(f,e,a,h,m){var c=new Object();c.dispatchuri=a;c.dispatchevent=m;if(arguments.length>5){var g=arguments.length;for(var d=5;d<g;d=d+2){if(g>d+1){c[arguments[d]]=arguments[d+1]}}}var b=jQuery("#"+f).attr("action");jQuery.ajax(b,{type:"POST",data:c,cache:false,dataType:"json",success:function(o,p,n){}})}function o_XHRWikiEvent(b){var a=jQuery(b).attr("href");if(a.indexOf(o_info.serverUri)==0){a=a.substring(o_info.serverUri.length,a.length)}o_XHREvent(a,false,true);return false}function o_XHREvent(h,f,c){if(f&&o2c==1){var b=Array.prototype.slice.call(arguments);b[1]=false;var a=function(){o_XHREvent.apply(window,b)};return o_showFormDirtyDialog(a)}else{if(!o2cl_noDirtyCheck()){return false}}o_beforeserver();var e=new Object();if(arguments.length>3){var g=arguments.length;for(var d=3;d<g;d=d+2){if(g>d+1){e[arguments[d]]=arguments[d+1]}}}jQuery.ajax(h,{type:"POST",data:e,cache:false,dataType:"json",success:function(p,s,o){try{if(c){try{var m=p.businessPath;var n=p.documentTitle;var r=p.historyPointId;if(m){o_pushState(r,n,m)}}catch(q){if(window.console){console.log(q)}}}o_ainvoke(p)}catch(q){if(window.console){console.log(q)}}finally{o_afterserver()}},error:o_onXHRError});return false}function o_XHRNFEvent(d){var b=new Object();if(arguments.length>1){var c=arguments.length;for(var a=1;a<c;a=a+2){if(c>a+1){b[arguments[a]]=arguments[a+1]}}}jQuery.ajax(d,{type:"POST",data:b,cache:false,dataType:"json",success:function(f,g,e){},error:o_onXHRError})}function o_onXHRError(a,d,b){o_afterserver();if(401==a.status){var c=o_info.oo_noresponse.replace("reload.html",window.document.location.href);showMessageBox("error",o_info.oo_noresponse_title,c,undefined)}else{if(window.console){console.log("Error status 2",d,b,a.responseText);console.log(a)}}}function o_pushState(d,f,a){try{var b=new Object();b.businessPath=a;b.historyPointId=d;if(a!=null&&!(a.lastIndexOf("http",0)===0)&&!(a.lastIndexOf("https",0)===0)){a=o_info.serverUri+a}o_info.businessPath=a;if(!(typeof o_shareActiveSocialUrl==="undefined")){o_shareActiveSocialUrl()}if(window.history&&!(typeof window.history==="undefined")&&window.history.pushState){window.history.pushState(b,f,a)}else{window.location.hash=d}}catch(c){if(window.console){console.log(c,a)}}}function o_toggleMark(a){var b=jQuery("i",a).attr("class");if(b.indexOf("o_icon_bookmark_add")>=0){jQuery("i",a).removeClass("o_icon_bookmark_add").addClass("o_icon_bookmark")}else{jQuery("i",a).removeClass("o_icon_bookmark").addClass("o_icon_bookmark_add")}}function registerDrake(a){o_info.drakes.push(a);return a}function destroyDrakes(){if(o_info.drakes!=="undefined"&&o_info.drakes!=null&&o_info.drakes.length>0){for(var a=o_info.drakes.length;a-->0;){try{o_info.drakes[a].destroy()}catch(b){if(window.console){console.log(b)}}o_info.drakes.pop()}}}function checkDrakes(){if(o_info.drakes!=="undefined"&&o_info.drakes!=null&&o_info.drakes.length>0){if(jQuery(".o_drake").length==0){destroyDrakes()}}}function o_normalizeFilename(b){b=b.replace(/\s/g,"_");var f=["/",",",":","(",")"];for(var c=f.length;c-->0;){b=b.split(f[c]).join("_")}var a=["\u00C4","\u00D6","\u00DC","\u00E4","\u00F6","\u00E6","\u00FC","\u00DF","\u00F8","\u2205"],d=["Ae","Oe","Ue","ae","oe","ae","ue","ss","o","o"];for(var c=a.length;c-->0;){b=b.split(a[c]).join(d[c])}try{b=b.normalize("NFKD");b=b.replace("/p{InCombiningDiacriticalMarks}+/g","");b=b.replace("/W+/g","")}catch(g){if(window.console){console.log(g)}}return b}function setFlexiFormDirtyByListener(a){setFlexiFormDirty(a.data.formId,a.data.hideMessage)}function setFlexiFormDirty(b,c){var a=o3c.indexOf(b)>-1;if(!a){o3c.push(b)}jQuery("#"+b).each(function(){var d=jQuery(this).data("FlexiSubmit");if(d!=null){jQuery("#"+d).addClass("btn o_button_dirty");o2c=(c?0:1)}})}function o_ffRegisterSubmit(b,a){jQuery("#"+b).data("FlexiSubmit",a)}function dismissInfoBox(a){javascript:jQuery("#"+a).remove();return true}function showInfoBox(g,d){var c=Math.floor(Math.random()*65536).toString(16);var f='<div id="'+c+'" class="o_alert_info"><div class="alert alert-info clearfix o_sel_info_message"><a class="o_alert_close o_sel_info_close" href="javascript:;" onclick="dismissInfoBox(\''+c+'\')"><i class="o_icon o_icon_close"> </i></a><h3><i class="o_icon o_icon_info"> </i> '+g+"</h3><p>"+d+"</p></div></div>";var a=jQuery("#o_messages").prepend(f);var e=(d.length>150)?8000:((d.length>70)?6000:4000);var b=function(){jQuery("#"+c).transition({top:"-100%"},333,function(){jQuery("#"+c).remove()})};o_info.scrolling=true;jQuery("#"+c).show().transition({top:0},333);jQuery("#"+c).click(function(h){b()});o_scrollToElement("#o_top");g=null;d=null;a=null;setTimeout(function(){try{b()}catch(h){}},e)}function showMessageBox(b,f,d,a){if(b=="info"){showInfoBox(f,d);return null}else{var c='<div id="myFunctionalModal" class="modal fade" role="dialog"><div class="modal-dialog"><div class="modal-content">';c+='<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>';c+='<h4 class="modal-title">'+f+"</h4></div>";c+='<div class="modal-body alert ';if("warn"==b){c+="alert-warning"}else{if("error"==b){c+="alert-danger"}else{c+="alert-info"}}c+='"><p>'+d+"</p></div></div></div></div>";jQuery("#myFunctionalModal").remove();jQuery("body").append(c);var e=jQuery("#myFunctionalModal").modal("show").on("hidden.bs.modal",function(g){jQuery("#myFunctionalModal").remove()});o_scrollToElement("#o_top");return e}}function o_table_toggleCheck(d,c){var a=document.forms[d].elements.tb_ms;len=a.length;if(typeof(len)=="undefined"){a.checked=c}else{var b;for(b=0;b<len;b++){a[b].checked=c}}}function onTreeStartDrag(a,b){jQuery(a.target).addClass("o_dnd_proxy")}function onTreeStopDrag(a,b){jQuery(a.target).removeClass("o_dnd_proxy")}function onTreeDrop(g,h){var a=jQuery(h.draggable[0]);var f=jQuery(this);f.css({position:"",width:""});var c=f.droppable("option","endUrl");if(c.lastIndexOf("/")==(c.length-1)){c=c.substring(0,c.length-1)}var e=a.attr("id");var b=e.substring(2,e.length);c+="%3Atnidle%3A"+b;var d=f.attr("id");if(d.indexOf("ds")==0){c+="%3Asne%3Ayes"}else{if(d.indexOf("dt")==0){c+="%3Asne%3Aend"}}jQuery(".ui-droppable").each(function(m,n){jQuery(n).droppable("disable")});o_XHREvent(c+"/",false,false)}function treeAcceptDrop(a){return true}function treeAcceptDrop_notWithChildren(a){var c=false;var b=jQuery(a);var e=b.attr("id");if(e!=undefined&&(e.indexOf("dd")==0||e.indexOf("ds")==0||e.indexOf("dt")==0||e.indexOf("da")==0||e.indexOf("row")==0)){var g=jQuery(this);var m=g.attr("id");var d=e.substring(2,e.length);var f=m.substring(2,m.length);if(d!=f){var h=jQuery("#dd"+d).parents("li");if(h.length>0&&jQuery(h.get(0)).find("#dd"+f).length==0){c=true}}}return c}function treeAcceptDrop_portfolio(b){var d=false;var c=jQuery(b);var f=c.attr("id");if(treeNode_isDragNode(f)){var h=jQuery(this);var o=h.attr("id");var e=f.substring(2,f.length);var g=o.substring(2,o.length);var n=f.indexOf("ds")==0||f.indexOf("dt")==0;if(e!=g){var m=treeNode_portfolioType(c);var a=treeNode_portfolioType(h);if(m=="artefact"){if(a=="page"||a=="struct"||a=="artefact"){d=true}}else{if(m=="struct"){if(a=="page"||a=="struct"){d=true}}else{if(m=="page"){if(a=="map"||a=="page"){d=true}}}}}}return d}function treeNode_portfolioType(e){var c=jQuery(e.get(0));var d=treeNode_portfolioTypes(c);if(d==null){var a=c.parent("a");if(a.length>0){d=treeNode_portfolioTypes(jQuery(a.get(0)))}else{if(c.attr("id").indexOf("ds")==0){var b=c.prev("div");if(b.length>0){d=treeNode_portfolioTypes(b)}}else{if(c.attr("id").indexOf("dt")==0){var b=c.next("div");if(b.length>0){d=treeNode_portfolioTypes(b)}}}}}return d}function treeNode_portfolioTypes(a){if(a.find===undefined){return null}else{if(a.find(".o_ep_icon_struct").length>0||a.hasClass("o_ep_icon_struct")){return"struct"}else{if(a.find(".o_ep_icon_page").length>0||a.hasClass("o_ep_icon_page")){return"page"}else{if(a.find(".o_ep_icon_map").length>0||a.hasClass("o_ep_icon_map")){return"map"}else{if(a.find(".o_ep_artefact").length>0||a.hasClass("o_ep_artefact")){return"artefact"}}}}}return null}function treeNode_isDragNode(a){if(a!=undefined&&(a.indexOf("dd")==0||a.indexOf("ds")==0||a.indexOf("dt")==0||a.indexOf("da")==0||a.indexOf("row")==0)){return true}return false}function o_choice_toggleCheck(c,b){var d=document.forms[c].elements;len=d.length;if(typeof(len)=="undefined"){d.checked=b}else{var a;for(a=0;a<len;a++){if(d[a].type=="checkbox"&&d[a].getAttribute("class")=="o_checkbox"){d[a].checked=b}}}}function b_briefcase_isChecked(c,e){var b;var a=document.getElementById(c);var d=0;for(b=0;a.elements[b];b++){if(a.elements[b].type=="checkbox"&&a.elements[b].name=="paths"&&a.elements[b].checked){d++}}if(d<1){alert(e);return false}return true}function b_briefcase_toggleCheck(d,c){var a=document.getElementById(d);len=a.elements.length;var b;for(b=0;b<len;b++){if(a.elements[b].name=="paths"){a.elements[b].checked=c}}}function o_doPrint(){var d=jQuery("div.o_iframedisplay iframe");if(d.length>0){try{var a=d[0];frames[a.name].focus();frames[a.name].print();return}catch(c){for(i=0;frames.length>i;i++){a=frames[i];if(a.name=="oaa0"){continue}var b=document.getElementsByName(a.name)[0];if(b&&b.getAttribute("class")=="ext-shim"){continue}if(a.name!=""){try{frames[a.name].focus();frames[a.name].print()}catch(c){window.print()}return}}window.print()}}else{window.print()}}function b_attach_i18n_inline_editing(){jQuery("span.o_translation_i18nitem").hover(function(){jQuery(this.firstChild).show()},function(){jQuery("a.o_translation_i18nitem_launcher").hide()});jQuery("a.o_translation_i18nitem_launcher").hover(function(){var a=jQuery(this).parent("span.o_translation_i18nitem");a.effect("highlight")});b_AddOnDomReplacementFinishedCallback(b_attach_i18n_inline_editing)}function b_hideExtMessageBox(){}var BDebugger={_lastDOMCount:0,_lastObjCount:0,_knownGlobalOLATObjects:["o_afterserver","o_onc","o_getMainWin","o_ainvoke","o_info","o_beforeserver","o_ffEvent","o_openPopUp","o_debu_show","o_logwarn","o_dbg_unmark","o_ffRegisterSubmit","o_clearConsole","o_init","o_log","o_allowNextClick","o_dbg_mark","o_debu_hide","o_logerr","o_debu_oldcn","o_debu_oldtt","o_debug_trid","o_log_all"],_countDOMElements:function(){return document.getElementsByTagName("*").length},_countGlobalObjects:function(){var a=0;for(prop in window){a++}return a},logDOMCount:function(){var b=BDebugger;var a=b._countDOMElements();var c=a-b._lastDOMCount;console.log((c>0?"+":"")+c+" \t"+a+" \tDOM element count after DOM replacement");b._lastDOMCount=a;a=null},logGlobalObjCount:function(){var b=BDebugger;var a=b._countGlobalObjects();var c=a-b._lastObjCount;console.log((c>0?"+":"")+c+" \t"+a+" \tGlobal object count after DOM replacement");b._lastObjCount=a;a=null},logGlobalOLATObjects:function(){var b=BDebugger;var a=new Array();for(prop in window){if(prop.indexOf("o_")==0&&b._knownGlobalOLATObjects.indexOf(prop)==-1){a.push(prop)}}if(a.length>0){console.log(a.length+" global OLAT objects found:");a.each(function(c){console.log("\t"+typeof window[c]+" \t"+c)})}}};var OOEdusharing={start:function(){if(o_info.edusharing_enabled){OOEdusharing.render();jQuery(document).on("oo.dom.replacement.after",OOEdusharing.render);OOEdusharing.enableMetadataToggler()}},replaceWithSpinner:function(d,c,a){var b="<div style='";if(c>0){b+="width:"+c+"px;"}if(a>0){b+="height:"+a+"px;"}b+="'>";b+="<div class='edusharing_spinner_inner'><div class='edusharing_spinner1'></div></div>";b+="<div class='edusharing_spinner_inner'><div class='edusharing_spinner2'></div></div>";b+="<div class='edusharing_spinner_inner'><div class='edusharing_spinner3'></div></div>";b+="</div>";var e=jQuery(b);d.before(e);d.remove();return e},replaceGoTo:function(c,b){var a=o_info.uriprefix.replace("auth","edusharing")+"goto?identifier="+b;c=c.replace("{{{LMS_INLINE_HELPER_SCRIPT}}}",a);return c},replaceWithRendered:function(e,m,c,o,d,f,g,n){var b=o_info.uriprefix.replace("auth","edusharing")+"render?identifier="+m;if(c>0){b=b+"&width="+c}if(o){b=b+"&height="+o}var h="<div class='o_edusharing_container";if(typeof d!="undefined"){h+=" "+d}if(n){h+=" o_in_iframe"}if("hide"===f){h+=" o_hide_license"}if("hide"===g){h+=" o_hide_infos"}h+="'>";h+="</div>";var a=jQuery(h);jQuery.ajax({type:"GET",url:b,dataType:"html",success:function(r){var q=OOEdusharing.replaceGoTo(r,m);var p=a.append(q);e.replaceWith(p)},error:function(p,r,q){e.replaceWith("<div class='o_warning'>edu-sharing not available</div>")}})},replace:function(c,g){var f=c.data("es_identifier");var a=c.attr("width");var m=c.attr("height");var b=c.attr("class");var d=c.data("es_show_license");var e=c.data("es_show_infos");var h=OOEdusharing.replaceWithSpinner(c,a,m);OOEdusharing.replaceWithRendered(h,f,a,m,b,d,e,g)},render:function(){var a=jQuery("[data-es_identifier]");if(a.length>0){a.each(function(){var c=jQuery(this);OOEdusharing.replace(c,false)})}var b=jQuery(".o_iframe_rel");if(b.length>0){b.each(function(){var c=jQuery(this);c.on("load",function(){c.contents().on("click",OOEdusharing.toggleMetadata);var d=c.contents().find("[data-es_identifier]");if(d.length>0){d.each(function(){var e=jQuery(this);OOEdusharing.replace(e,true)})}})})}},toggleMetadata:function(a){if(jQuery(a.target).closest(".edusharing_metadata").length){}else{if(jQuery(a.target).closest(".edusharing_metadata_toggle_button").length){jQuery(".edusharing_metadata").hide();toggle_button=jQuery(a.target);metadata=toggle_button.parent().find(".edusharing_metadata");if(metadata.hasClass("open")){metadata.toggleClass("open");metadata.hide()}else{jQuery(".edusharing_metadata").removeClass("open");metadata.toggleClass("open");metadata.show()}}else{jQuery(".edusharing_metadata").hide();jQuery(".edusharing_metadata").removeClass("open")}}},enableMetadataToggler:function(){jQuery(document).click(OOEdusharing.toggleMetadata)}};jQuery(document).ready(function(){OOEdusharing.start()});/*! +jQuery.periodic=function(l,h){if(jQuery.isFunction(l)){h=l;l={}}var c=jQuery.extend({},jQuery.periodic.defaults,{ajax_complete:j,increment:g,reset:f,cancel:i},l);c.cur_period=c.period;c.tid=false;var e="";b();return c;function b(){i();c.tid=setTimeout(function(){h.call(c);g();if(c.tid){b()}},c.cur_period)}function j(n,m){if(m==="success"&&e!==n.responseText){e=n.responseText;f()}}function g(){c.cur_period*=c.decay;if(c.cur_period<c.period){f()}else{if(c.cur_period>c.max_period){c.cur_period=c.max_period;if(c.on_max!==undefined){c.on_max.call(c)}}}}function f(){c.cur_period=c.period;b()}function i(){clearTimeout(c.tid);c.tid=null}function k(){}function a(){}function d(){}};jQuery.periodic.defaults={period:4000,max_period:1800000,decay:1.5,on_max:undefined};var Hashtable=(function(){var p="function";var n=(typeof Array.prototype.splice==p)?function(s,r){s.splice(r,1)}:function(u,t){var s,v,r;if(t===u.length-1){u.length=t}else{s=u.slice(t+1);u.length=t;for(v=0,r=s.length;v<r;++v){u[t+v]=s[v]}}};function a(t){var r;if(typeof t=="string"){return t}else{if(typeof t.hashCode==p){r=t.hashCode();return(typeof r=="string")?r:a(r)}else{if(typeof t.toString==p){return t.toString()}else{try{return String(t)}catch(s){return Object.prototype.toString.call(t)}}}}}function g(r,s){return r.equals(s)}function e(r,s){return(typeof s.equals==p)?s.equals(r):(r===s)}function c(r){return function(s){if(s===null){throw new Error("null is not a valid "+r)}else{if(typeof s=="undefined"){throw new Error(r+" must not be undefined")}}}}var q=c("key"),l=c("value");function d(u,s,t,r){this[0]=u;this.entries=[];this.addEntry(s,t);if(r!==null){this.getEqualityFunction=function(){return r}}}var h=0,j=1,f=2;function o(r){return function(t){var s=this.entries.length,v,u=this.getEqualityFunction(t);while(s--){v=this.entries[s];if(u(t,v[0])){switch(r){case h:return true;case j:return v;case f:return[s,v[1]]}}}return false}}function k(r){return function(u){var v=u.length;for(var t=0,s=this.entries.length;t<s;++t){u[v+t]=this.entries[t][r]}}}d.prototype={getEqualityFunction:function(r){return(typeof r.equals==p)?g:e},getEntryForKey:o(j),getEntryAndIndexForKey:o(f),removeEntryForKey:function(s){var r=this.getEntryAndIndexForKey(s);if(r){n(this.entries,r[0]);return r[1]}return null},addEntry:function(r,s){this.entries[this.entries.length]=[r,s]},keys:k(0),values:k(1),getEntries:function(s){var u=s.length;for(var t=0,r=this.entries.length;t<r;++t){s[u+t]=this.entries[t].slice(0)}},containsKey:o(h),containsValue:function(s){var r=this.entries.length;while(r--){if(s===this.entries[r][1]){return true}}return false}};function m(s,t){var r=s.length,u;while(r--){u=s[r];if(t===u[0]){return r}}return null}function i(r,s){var t=r[s];return(t&&(t instanceof d))?t:null}function b(t,r){var w=this;var v=[];var u={};var x=(typeof t==p)?t:a;var s=(typeof r==p)?r:null;this.put=function(B,C){q(B);l(C);var D=x(B),E,A,z=null;E=i(u,D);if(E){A=E.getEntryForKey(B);if(A){z=A[1];A[1]=C}else{E.addEntry(B,C)}}else{E=new d(D,B,C,s);v[v.length]=E;u[D]=E}return z};this.get=function(A){q(A);var B=x(A);var C=i(u,B);if(C){var z=C.getEntryForKey(A);if(z){return z[1]}}return null};this.containsKey=function(A){q(A);var z=x(A);var B=i(u,z);return B?B.containsKey(A):false};this.containsValue=function(A){l(A);var z=v.length;while(z--){if(v[z].containsValue(A)){return true}}return false};this.clear=function(){v.length=0;u={}};this.isEmpty=function(){return !v.length};var y=function(z){return function(){var A=[],B=v.length;while(B--){v[B][z](A)}return A}};this.keys=y("keys");this.values=y("values");this.entries=y("getEntries");this.remove=function(B){q(B);var C=x(B),z,A=null;var D=i(u,C);if(D){A=D.removeEntryForKey(B);if(A!==null){if(!D.entries.length){z=m(v,C);n(v,z);delete u[C]}}}return A};this.size=function(){var A=0,z=v.length;while(z--){A+=v[z].entries.length}return A};this.each=function(C){var z=w.entries(),A=z.length,B;while(A--){B=z[A];C(B[0],B[1])}};this.putAll=function(H,C){var B=H.entries();var E,F,D,z,A=B.length;var G=(typeof C==p);while(A--){E=B[A];F=E[0];D=E[1];if(G&&(z=w.get(F))){D=C(F,z,D)}w.put(F,D)}};this.clone=function(){var z=new b(t,r);z.putAll(w);return z}}return b})();(function(b){b.fn.ooTranslator=function(){var d=null;b(document).each(function(){d=b(document).data("_ooTranslator");if(d==undefined){d=new a();b(document).data("_ooTranslator",d)}});return d};function a(){return this}a.prototype={mapperUrl:null,translators:null,initialize:function(d){this.mapperUrl=d;this.translators=new Object()},getTranslator:function(d,f){if(this.translators[d]==null){this.translators[d]=new Object()}if(this.translators[d][f]==null){var e=this.mapperUrl+"/"+d+"/"+f+"/translations.js";jQuery.ajax(e,{async:false,dataType:"json",success:function(g,i,h){jQuery(document).ooTranslator()._createTranslator(g,d,f)}})}return this.translators[d][f]},_createTranslator:function(e,d,f){this.translators[d][f]=new c().initialize(e,d,f)}};function c(){return this}c.prototype={localizationData:null,bundle:null,locale:null,initialize:function(f,d,e){this.bundle=e;this.locale=d;this.localizationData=f;return this},translate:function(d){if(this.localizationData[d]){return this.localizationData[d]}else{return this.bundle+":"+d}}}})(jQuery);+function(b){var a=function(){this.addExtraElements();this.state={busy:false,brandW:0,sitesW:0,sitesDirty:false,sites:{collapsed:this.isSitesCollapsed(),extended:this.isSitesExtended},tabsW:0,tabsDirty:false,tabs:{collapsed:this.isTabsCollapsed(),extended:this.isTabsExtended()},toolsW:0,toolsDirty:false,tools:{collapsed:this.isToolsCollapsed(),extended:this.isToolsExtended()},offCanvasWidth:0,moreW:0};var c=b("#o_offcanvas_right").css("width");if(c){this.state.offCanvasWidth=parseInt(c.replace(/[^\d.]/g,""));this.initListners();this.calculateWidth();this.optimize()}};a.prototype.initListners=function(){b(window).resize(b.proxy(this.onResizeCallback,this));b(document).on("oo.nav.sites.modified",b.proxy(function(){this.state.sitesDirty=true},this));b(document).on("oo.nav.tabs.modified",b.proxy(function(){this.state.tabsDirty=true},this));b(document).on("oo.nav.tools.modified",b.proxy(function(){this.state.toolsDirty=true},this));b(document).on("oo.dom.replacement.after",b.proxy(this.onDOMreplacementCallback,this));b(window).on("orientationchange",b.proxy(this.hideRight,this));b("#o_navbar_right-toggle").on("click",b.proxy(this.toggleRight,this));b("#o_offcanvas_right .o_offcanvas_close").on("click",b.proxy(this.hideRight,this));b("#o_navbar_more").on("shown.bs.dropdown",this.onDropdownShown);b("#o_navbar_more").on("hidden.bs.dropdown",this.onDropdownHidden)};a.prototype.onResizeCallback=function(){if(!this.state.busy){this.state.busy=true;this.calculateWidth();this.optimize();this.state.busy=false}};a.prototype.onPageWidthChangeCallback=function(){if(!this.state.busy){this.state.busy=true;this.cleanupMoreDropdown();this.calculateWidth();this.optimize();this.state.sitesDirty=false;this.state.tabsDirty=false;this.state.toolsDirty=false;this.state.busy=false}};a.prototype.onDOMreplacementCallback=function(){if(!this.state.busy&&(this.state.sitesDirty||this.state.tabsDirty||this.state.toolsDirty)){this.state.busy=true;this.cleanupMoreDropdown();this.calculateWidth();this.optimize();this.state.sitesDirty=false;this.state.tabsDirty=false;this.state.toolsDirty=false;this.state.busy=false}};a.prototype.onDropdownShown=function(c){var f=b("#o_navbar_more .dropdown-menu");if(f.length){var d=f.offset().left;if(d<0){f.removeClass("dropdown-menu-right")}}};a.prototype.onDropdownHidden=function(c){var d=b("#o_navbar_more .dropdown-menu");d.addClass("dropdown-menu-right")};a.prototype.calculateWidth=function(){var c=b("#o_navbar_container .o_navbar-collapse");this.state.navbarW=c.innerWidth();this.state.brandW=b(".o_navbar-brand").outerWidth(true);this.state.sitesW=this.getSites().outerWidth(true);this.state.tabsW=this.getTabs().outerWidth(true);this.state.toolsW=this.getTools().outerWidth(false);var d=b("#o_navbar_more:visible");this.state.moreW=(d.length>0?d.outerWidth(true):0)};a.prototype.getOverflow=function(c){var d=this.state.navbarW;d-=this.state.sitesW;d-=this.state.tabsW;d-=this.state.toolsW;d-=this.state.brandW;d-=this.state.moreW;d-=25;return -d};a.prototype.optimize=function(h){var c=this.getOverflow();var k=this.getSites();var l=this.getTabs();var g=this.getTools();var n=this.getMoreDropdown();var f=this.getOffcanvasRight();this.updateState();while(c>0&&(!this.state.tabs.collapsed||!this.state.sites.collapsed||!this.state.tools.collapsed)){if(!this.state.tabs.collapsed){this.collapse(l,n,"li","o_dropdown_tab")}else{if(!this.state.sites.collapsed){this.collapse(k,n,"li","o_dropdown_site")}else{if(!this.state.tools.collapsed){this.collapse(g,f,".o_navbar_tool:not(#o_navbar_imclient, #o_navbar_search_opener, #o_navbar_my_menu)","o_tool_right")}}}this.calculateWidth();c=this.getOverflow();this.updateState()}while(c<0&&(!this.state.tabs.extended||!this.state.sites.extended||!this.state.tools.extended)){if(!this.state.tools.extended){var m=this.extend(f,g.children("#o_navbar_imclient, #o_navbar_search_opener, #o_navbar_my_menu").first(),".o_tool_right","o_tool_right",true);if(!m){break}}if(!this.state.sites.extended){var j=this.extend(n,k,"li","o_dropdown_site");if(!j){break}}else{if(!this.state.tabs.extended){var d=this.extend(n,l,"li","o_dropdown_tab");if(!d){break}}}this.calculateWidth();c=this.getOverflow();this.updateState()}if(this.state.sites.extended&&this.state.tabs.extended){var i=b("#o_navbar_more");i.css("display","none")}this.checkToolsOrder()};a.prototype.updateState=function(){this.state.sites.collapsed=this.isSitesCollapsed();this.state.sites.extended=this.isSitesExtended();this.state.tabs.collapsed=this.isTabsCollapsed();this.state.tabs.extended=this.isTabsExtended();this.state.tools.collapsed=this.isToolsCollapsed();this.state.tools.extended=this.isToolsExtended()};a.prototype.collapse=function(g,d,c,f){var e=g.find(c);if(e.length){e=e.last()}if(e.length){f&&e.addClass(f);if(d){e.prependTo(d)}}this.updateDropdownToggle(d)};a.prototype.extend=function(g,d,c,i,f){var e=g.find(c);if(e.length){e=e.first()}var j=false;if(e.length){if(d&&d.length){if(f){d.before(e)}else{e.appendTo(d)}this.updateDropdownToggle(g);this.calculateWidth();var h=this.getOverflow();if(h>0){e.prependTo(g)}else{i&&e.removeClass(i);j=true}}}this.updateDropdownToggle(g);return j};a.prototype.updateDropdownToggle=function(c){var d=c.parents(".o_dropdown_toggle");if(!d.length){return}if(c.children().length){d.css("display","block")}else{d.css("display","none")}};a.prototype.addExtraElements=function(){var d=b("#o_navbar_container .o_navbar-collapse");var c=b("#o_navbar_more");if(c.length==0){c=b('<ul id="o_navbar_more" class="nav o_navbar-nav o_dropdown_toggle"><li><a class="dropdown-toggle" data-toggle="dropdown" href="#"">'+o_info.i18n_topnav_more+' <b class="caret"></b></a><ul class="dropdown-menu dropdown-menu-right"></ul></li></ul>');c.appendTo(d)}this.getSites().append('<li class="divider o_dropdown_site"></li>');b("#o_navbar_help .o_icon, #o_navbar_print .o_icon").addClass("o_icon-fw")};a.prototype.cleanupMoreDropdown=function(){if(!this.state.sitesDirty){var f=this.getSites();var d=this.getMoreDropdown().children(".o_dropdown_site");d.appendTo(f)}else{this.getSites().append('<li class="divider o_dropdown_site"></li>')}if(!this.state.tabsDirty){var e=this.getTabs();var c=this.getMoreDropdown().children(".o_dropdown_tab");c.prependTo(e)}this.getMoreDropdown().empty()};a.prototype.checkToolsOrder=function(){var f=this.getTools();var e=f.find("#o_navbar_help");var d=f.find("#o_navbar_print");var c=f.find("#o_navbar_imclient");if(c&&d){c.after(d)}if(c&&e){c.after(e)}};a.prototype.showRight=function(){if(!this.isOffcanvasVisible()&&!this.offcanvasTransitioning){this.offcanvasTransitioning=true;var d=this;var c=b("#o_offcanvas_right");c.show().transition({x:-d.state.offCanvasWidth},function(){b("body").addClass("o_offcanvas_right_visible");var e=b.proxy(d.hideRightOnClick,d);setTimeout(function(){b("html").on("click",e);d.offcanvasTransitioning=false},10)})}};a.prototype.hideRightOnClick=function(c){if("INPUT"!=c.target.nodeName){this.hideRight()}};a.prototype.hideRight=function(){if(this.isOffcanvasVisible()&&!this.offcanvasTransitioning){this.offcanvasTransitioning=true;b("html").off("click",b.proxy(this.hideRight,this));var d=this;var c=b("#o_offcanvas_right");c.transition({x:d.state.offCanvasWidth},function(){c.hide();b("body").removeClass("o_offcanvas_right_visible");d.offcanvasTransitioning=false})}};a.prototype.toggleRight=function(){if(this.isOffcanvasVisible()){this.hideRight()}else{this.showRight()}};a.prototype.isOffcanvasVisible=function(){return b("#o_offcanvas_right:visible").length};a.prototype.getSites=function(){return b("#o_navbar_container .o_navbar_sites")};a.prototype.getTabs=function(){return b("#o_navbar_container .o_navbar_tabs")};a.prototype.getTools=function(){return b("#o_navbar_container #o_navbar_tools_permanent")};a.prototype.getMoreDropdown=function(){return b("#o_navbar_more .dropdown-menu")};a.prototype.getOffcanvasRight=function(){return b("#o_offcanvas_right_container .o_navbar-right")};a.prototype.isSitesCollapsed=function(){return !this.getSites().children("li").not(".divider").length};a.prototype.isSitesExtended=function(){return !this.getMoreDropdown().children(".o_dropdown_site").not(".divider").length};a.prototype.isTabsCollapsed=function(){return !this.getTabs().children("li").length};a.prototype.isTabsExtended=function(){return !this.getMoreDropdown().children(".o_dropdown_tab").length};a.prototype.isToolsCollapsed=function(){return !this.getTools().children(".o_navbar_tool").not("#o_navbar_imclient, #o_navbar_search_opener, #o_navbar_my_menu").length};a.prototype.isToolsExtended=function(){return !this.getOffcanvasRight().children(".o_tool_right").length};b(document).ready(function(){var d=b("#o_navbar_wrapper");if(d){var c=new a();window.OPOL.navbar=c}})}(jQuery);+function(b){b.fn.ooBgCarrousel=function(){return new a()};var a=function(){};a.prototype.initCarrousel=function(g){this.settings=b.extend({query:null,images:[],shuffle:false,shuffleFirst:false,durationshow:5000,durationout:500,durationin:500,easeout:"ease",easein:"ease"},g);this.pos=null;if(this.settings.query==null||this.settings.images.length==0){return}this.initialImage=this.settings.images[0];if(this.settings.shuffle){var f=this.settings.images;for(var d,c,e=f.length;e;d=parseInt(Math.random()*e),c=f[--e],f[e]=f[d],f[d]=c){}}if(this.settings.shuffleFirst){this._replaceImage()}this.rotate()};a.prototype.rotate=function(){setTimeout(b.proxy(this._hideCurrent,this),this.settings.durationshow)};a.prototype._hideCurrent=function(){var c=b(this.settings.query);if(c&&c.length>0){c.transition({opacity:0,duration:this.settings.durationout,easing:this.settings.easeout},b.proxy(this._showNext,this))}};a.prototype._replaceImage=function(d){if(!d){d=b(this.settings.query)}if(d&&d.length>0){this.newImg="";this.oldImg="";if(this.pos==null){this.pos=1;this.oldImg=this.initialImage}else{this.oldImg=this.settings.images[this.pos];this.pos++;if(this.settings.images.length==this.pos){this.pos=0}}this.newImg=this.settings.images[this.pos];var c=d.css("background-image");if(c.indexOf(this.oldImg)==-1){d.transition({opacity:1,duration:0});return}var e=c.replace(this.oldImg,this.newImg);d.css("background-image",e)}};a.prototype._showNext=function(){var c=b(this.settings.query);this._replaceImage(c);c.transition({opacity:1,duration:this.settings.durationin,easing:this.settings.easein},b.proxy(this.rotate,this))}}(jQuery);!function(e){function t(){function t(e){"remove"===e&&this.each(function(e,t){var n=i(t);n&&n.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(e,t){var n=tinymce.get(t.id.replace(/_parent$/,""));n&&n.remove()})}function r(e){var n,r=this;if(null!=e)t.call(r),r.each(function(t,n){var r;(r=tinymce.get(n.id))&&r.setContent(e)});else if(r.length>0&&(n=tinymce.get(r[0].id)))return n.getContent()}function i(e){var t=null;return e&&e.id&&a.tinymce&&(t=tinymce.get(e.id)),t}function o(e){return!!(e&&e.length&&a.tinymce&&e.is(":tinymce"))}var s={};e.each(["text","html","val"],function(t,a){var l=s[a]=e.fn[a],c="text"===a;e.fn[a]=function(t){var a=this;if(!o(a))return l.apply(a,arguments);if(t!==n)return r.call(a.filter(":tinymce"),t),l.apply(a.not(":tinymce"),arguments),a;var s="",u=arguments;return(c?a:a.eq(0)).each(function(t,n){var r=i(n);s+=r?c?r.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):r.getContent({save:!0}):l.apply(e(n),u)}),s}}),e.each(["append","prepend"],function(t,r){var a=s[r]=e.fn[r],l="prepend"===r;e.fn[r]=function(e){var t=this;return o(t)?e!==n?("string"==typeof e&&t.filter(":tinymce").each(function(t,n){var r=i(n);r&&r.setContent(l?e+r.getContent():r.getContent()+e)}),a.apply(t.not(":tinymce"),arguments),t):void 0:a.apply(t,arguments)}}),e.each(["remove","replaceWith","replaceAll","empty"],function(n,r){var i=s[r]=e.fn[r];e.fn[r]=function(){return t.call(this,r),i.apply(this,arguments)}}),s.attr=e.fn.attr,e.fn.attr=function(t,a){var l=this,c=arguments;if(!t||"value"!==t||!o(l))return a!==n?s.attr.apply(l,c):s.attr.apply(l,c);if(a!==n)return r.call(l.filter(":tinymce"),a),s.attr.apply(l.not(":tinymce"),c),l;var u=l[0],d=i(u);return d?d.getContent({save:!0}):s.attr.apply(e(u),c)}}var n,r,i,o=[],a=window;e.fn.tinymce=function(n){function s(){var r=[],o=0;i||(t(),i=!0),d.each(function(e,t){var i,a=t.id,s=n.oninit;a||(t.id=a=tinymce.DOM.uniqueId()),tinymce.get(a)||(i=new tinymce.Editor(a,n,tinymce.EditorManager),r.push(i),i.on("init",function(){var e,t=s;d.css("visibility",""),s&&++o==r.length&&("string"==typeof t&&(e=t.indexOf(".")===-1?null:tinymce.resolve(t.replace(/\.\w+$/,"")),t=tinymce.resolve(t)),t.apply(e||tinymce,r))}))}),e.each(r,function(e,t){t.render()})}var l,c,u,d=this,f="";if(!d.length)return d;if(!n)return window.tinymce?tinymce.get(d[0].id):null;if(d.css("visibility","hidden"),a.tinymce||r||!(l=n.script_url))1===r?o.push(s):s();else{r=1,c=l.substring(0,l.lastIndexOf("/")),l.indexOf(".min")!=-1&&(f=".min"),a.tinymce=a.tinyMCEPreInit||{base:c,suffix:f},l.indexOf("gzip")!=-1&&(u=n.language||"en",l=l+(/\?/.test(l)?"&":"?")+"js=true&core=true&suffix="+escape(f)+"&themes="+escape(n.theme||"modern")+"&plugins="+escape(n.plugins||"")+"&languages="+(u||""),a.tinyMCE_GZ||(a.tinyMCE_GZ={start:function(){function t(e){tinymce.ScriptLoader.markDone(tinymce.baseURI.toAbsolute(e))}t("langs/"+u+".js"),t("themes/"+n.theme+"/theme"+f+".js"),t("themes/"+n.theme+"/langs/"+u+".js"),e.each(n.plugins.split(","),function(e,n){n&&(t("plugins/"+n+"/plugin"+f+".js"),t("plugins/"+n+"/langs/"+u+".js"))})},end:function(){}}));var p=document.createElement("script");p.type="text/javascript",p.onload=p.onreadystatechange=function(t){t=t||window.event,2===r||"load"!=t.type&&!/complete|loaded/.test(p.readyState)||(tinymce.dom.Event.domLoaded=1,r=2,n.script_loaded&&n.script_loaded(),s(),e.each(o,function(e,t){t()}))},p.src=l,document.body.appendChild(p)}return d},e.extend(e.expr[":"],{tinymce:function(e){var t;return!!(e.id&&"tinymce"in window&&(t=tinymce.get(e.id),t&&t.editorManager===tinymce))}})}(jQuery);OPOL={};var o2c=0;var o3c=new Array();o_info.guibusy=false;o_info.linkbusy=false;o_info.scrolling=false;o_info.debug=true;o_info.drakes=new Array();var BLoader={_ajaxLoadedJS:new Array(),_isAlreadyLoadedJS:function(b){var a=true;jQuery("head script[src]").each(function(d,c){if(jQuery(c).attr("src").indexOf(b)!=-1){a=false}});if(jQuery.inArray(b,this._ajaxLoadedJS)!=-1){a=false}return !a},loadJS:function(b,c,a){if(!this._isAlreadyLoadedJS(b)){if(o_info.debug){o_log("BLoader::loadJS: loading ajax::"+a+" url::"+b)}if(a){jQuery.ajax(b,{async:false,dataType:"script",cache:true,success:function(d,f,e){}});this._ajaxLoadedJS.push(b)}else{jQuery.getScript(b)}if(o_info.debug){o_log("BLoader::loadJS: loading DONE url::"+b)}}else{if(o_info.debug){o_log("BLoader::loadJS: already loaded url::"+b)}}},executeGlobalJS:function(jsString,contextDesc){try{if(window.execScript){window.execScript(jsString)}else{window.eval(jsString)}}catch(e){if(window.console){console.log(contextDesc,"cannot execute js",jsString)}if(o_info.debug){o_logerr("BLoader::executeGlobalJS: Error when executing JS code in contextDesc::"+contextDesc+' error::"'+showerror(e)+" for: "+escape(jsString))}if(window.location.href.indexOf("o_winrndo")!=-1){window.location.reload()}else{window.location.href=window.location.href+(window.location.href.indexOf("?")!=-1?"&":"?")+"o_winrndo=1"}}},loadCSS:function(b,o,q){var r=window.document;try{if(r.createStyleSheet){var g=r.styleSheets;var d=0;var p=0;for(i=0;i<g.length;i++){var m=g[i];var f=m.href;if(f==b){d++;if(m.disabled){m.disabled=false;return}else{if(o_info.debug){o_logwarn("BLoader::loadCSS: style: "+b+" already in document and not disabled! (duplicate add)")}return}}if(m.id=="o_theme_css"){p=i}}if(d>1&&o_info.debug){o_logwarn("BLoader::loadCSS: apply styles: num of stylesheets found was not 0 or 1:"+d)}if(q){p=g.length}r.createStyleSheet(b,p)}else{var c=jQuery("#"+o);if(c&&c.length>0){if(o_info.debug){o_logwarn("BLoader::loadCSS: stylesheet already found in doc when trying to add:"+b+", with id "+o)}}else{var a=jQuery('<link id="'+o+'" rel="stylesheet" type="text/css" href="'+b+'">');if(q){a.insertBefore(jQuery("#o_fontSize_css"))}else{a.insertBefore(jQuery("#o_theme_css"))}}}}catch(n){if(window.console){console.log(n)}if(o_info.debug){o_logerr("BLoader::loadCSS: Error when loading CSS from URL::"+b)}}},unLoadCSS:function(a,n){var o=window.document;try{if(o.createStyleSheet){var f=o.styleSheets;var d=0;var p=a;var b=window.location.href.substring(0,window.location.href.indexOf("/",8));if(a.indexOf(b)==0){p=a.substring(b.length)}for(i=0;i<f.length;i++){var g=f[i].href;if(g==a||g==p){d++;if(!f[i].disabled){f[i].disabled=true}else{if(o_info.debug){o_logwarn("stylesheet: when removing: matching url, but already disabled! url:"+g)}}}}if(d!=1&&o_info.debug){o_logwarn("stylesheet: when removeing: num of stylesheets found was not 1:"+d)}}else{var c=jQuery("#"+n);if(c){c.href="";c.remove();c=null;return}else{if(o_info.debug){o_logwarn("no link with id found to remove, id:"+n+", url "+a)}}}}catch(m){if(o_info.debug){o_logerr("BLoader::unLoadCSS: Error when unloading CSS from URL::"+a)}}}};var BFormatter={formatLatexFormulas:function(b){try{if(typeof MathJax==="undefined"){o_mathjax()}else{if(MathJax&&MathJax.isReady){jQuery(function(){MathJax.Hub.Queue(function(){if(jQuery("#"+b+" .MathJax").length==0){MathJax.Hub.Typeset(b)}})})}else{setTimeout(function(){BFormatter.formatLatexFormulas(b)},100)}}}catch(a){if(window.console){console.log("error in BFormatter.formatLatexFormulas: ",a)}}},alignTableColumns:function(a){try{var b=new Array();jQuery(a).each(function(){for(j=0;j<jQuery(this)[0].rows[0].cells.length;j++){var d=jQuery(this)[0].rows[0].cells[j];if(!b[j]||b[j]<d.clientWidth){b[j]=d.clientWidth}}});jQuery(a).each(function(){for(j=0;j<jQuery(this)[0].rows[0].cells.length;j++){jQuery(this)[0].rows[0].cells[j].style.width=b[j]+"px"}})}catch(c){if(window.console){console.log("error in BFormatter.alignTableColumns: ",c)}}}};function o_init(){try{o_getMainWin().o_afterserver();if(window.location.href&&window.location.href!=null&&window.location.href.indexOf("%3A")<0){var a=window.location.href;if(a!=null&&!(a.lastIndexOf("http",0)===0)&&!(a.lastIndexOf("https",0)===0)){a=o_info.serverUri+a}o_info.businessPath=a;if(!(typeof o_shareActiveSocialUrl==="undefined")){o_shareActiveSocialUrl()}}}catch(b){if(o_info.debug){o_log("error in o_init: "+showerror(b))}}}function o_initEmPxFactor(){o_info.emPxFactor=jQuery("#o_width_1em").width();if(o_info.emPxFactor==0||o_info.emPxFactor=="undefined"){o_info.emPxFactor=12}}function o_getMainWin(){try{if(window.OPOL){return window}else{if(window.opener&&window.opener.OPOL){return window.opener}}}catch(a){if(o_info.debug){o_logerr('Exception while getting main window. rror::"'+showerror(a))}if(window.console){console.log('Exception while getting main window. rror::"'+showerror(a),"functions.js");console.log(a)}}throw"Can not find main OpenOLAT window"}function o_beforeserver(){o_info.linkbusy=true;showAjaxBusy();if(window.suppressOlatOnUnloadOnce){window.suppressOlatOnUnloadOnce=false}else{if(window.olatonunload){olatonunload()}}}function o_afterserver(){o2c=0;o_info.linkbusy=false;removeAjaxBusy()}function o2cl(){try{if(o_info.linkbusy){return false}else{var b=(o2c==0||confirm(o_info.dirty_form));if(b){o_beforeserver()}return b}}catch(a){if(window.console){console.log(a)}return false}}function o2cl_dirtyCheckOnly(){try{if(o_info.linkbusy){return false}else{return(o2c==0||confirm(o_info.dirty_form))}}catch(a){if(window.console){console.log(a)}return false}}function o2cl_noDirtyCheck(){if(o_info.linkbusy){return false}else{o_beforeserver();return true}}function o3cl(d){if(o_info.linkbusy){return false}else{var b=o3c1.indexOf(d)>-1;var a=(b&&o3c1.length>1)||o3c1.length>0;var c=(!a||confirm(o_info.dirty_form));if(c){o_beforeserver()}return c}}function o_onc(a){var b=a.responseText;BLoader.executeGlobalJS("o_info.last_o_onc="+b+";","o_onc");o_ainvoke(o_info.last_o_onc,false)}function o_allowNextClick(){o_info.linkbusy=false;removeAjaxBusy()}function removeBusyAfterDownload(c,b,a){o2c=0;o_afterserver()}Array.prototype.search=function(c,d){var a=this.length;for(var b=0;b<a;b++){if(this[b].constructor==Array){if(this[b].search(c,d)){return true;break}}else{if(d){if(this[b].indexOf(c)!=-1){return true;break}}else{if(this[b]==c){return true;break}}}}return false};if(!Function.prototype.curry){Function.prototype.curry=function(){if(arguments.length<1){return this}var a=this;var b=Array.prototype.slice.call(arguments);return function(){return a.apply(this,b.concat(Array.prototype.slice.call(arguments)))}}}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(c){if(this==null){throw new TypeError()}var d=Object(this);var a=d.length>>>0;if(a===0){return -1}var e=0;if(arguments.length>1){e=Number(arguments[1]);if(e!=e){e=0}else{if(e!=0&&e!=Infinity&&e!=-Infinity){e=(e>0||-1)*Math.floor(Math.abs(e))}}}if(e>=a){return -1}var b=e>=0?e:Math.max(a-Math.abs(e),0);for(;b<a;b++){if(b in d&&d[b]===c){return b}}return -1}}var b_onDomReplacementFinished_callbacks=new Array();function b_AddOnDomReplacementFinishedCallback(a){b_onDomReplacementFinished_callbacks.push(a)}var b_changedDomEl=new Array();function b_AddOnDomReplacementFinishedUniqueCallback(a){if(a.constructor==Array){if(b_onDomReplacementFinished_callbacks.search(a[0])){return}}b_AddOnDomReplacementFinishedCallback(a)}var o_debug_trid=0;function o_ainvoke(S){if(S==undefined){return}o_info.inainvoke=true;var L=S.cmdcnt;if(L>0){jQuery(document).trigger("oo.dom.replacement.before");b_changedDomEl=new Array();if(o_info.debug){o_debug_trid++}var C=S.cmds;for(var Y=0;Y<L;Y++){var M=C[Y];var E=M.cmd;var W=M.cda;var Z=M.w;var d=this.window;var N;if(d){switch(E){case 1:var R=W.e;BLoader.executeGlobalJS(R,"o_ainvoker::jsexec");if(o_info.debug){o_log("c1: execute jscode: "+R)}case 2:var x=W.cc;var I=W.cps;for(var V=0;V<x;V++){var n=I[V];var m=n.cid;var U=n.cidvis;var K=n.cw;var B=n.hfrag;var T=n.jsol;var h=n.hdr;if(o_info.debug){o_log("c2: redraw: "+n.cname+" ("+m+") "+n.hfragsize+" bytes, listener(s): "+n.clisteners)}var ab=h+"\n\n"+B;var X=false;var H="o_c"+m;var F=jQuery("#"+H);if(F==null||F.length==0){H="o_fi"+m;F=jQuery("#"+H);X=true}if(F!=null){var A=jQuery("div.o_richtext_mce textarea",F);for(var Q=0;Q<A.length;Q++){try{var a=jQuery(A.get(Q)).attr("id");if(typeof top.tinymce!=undefined){top.tinymce.remove("#"+a)}}catch(ae){if(window.console){console.log(ae)}}}var c=jQuery("body>div.tooltip.in");for(var P=0;P<c.length;P++){try{jQuery(c.get(P)).remove()}catch(ae){if(window.console){console.log(ae)}}}var z=jQuery("body>div.ui-tooltip");for(var O=0;O<z.length;O++){try{jQuery(z.get(O)).remove()}catch(ae){if(window.console){console.log(ae)}}}if(U){F.css("display","")}else{F.css("display","none")}if(X||!K){F.replaceWith(ab)}else{try{F.empty().html(ab);if(ab.length>0&&F.get(0).innerHTML==""){F.get(0).innerHTML=ab}}catch(ae){if(window.console){console.log(ae)}if(window.console){console.log("Fragment",ab)}}b_changedDomEl.push(H)}F=null;checkDrakes();if(T!=""){BLoader.executeGlobalJS(T,"o_ainvoker::jsol")}}}break;case 3:d.o2c=0;var ac=W.rurl;d.o_afterserver();d.document.location.replace(ac);break;case 5:d.o2c=0;var ac=W.rurl;d.o_afterserver();d.document.location.replace(ac);break;case 6:d.o2c=0;d.o_afterserver();break;case 7:var p=d.document.location;var D=p.protocol+"//"+p.hostname;if(p.port!=""){D+=":"+p.port}var y=W.cssrm;for(V=0;V<y.length;V++){var G=y[V];var J=G.id;var g=D+G.url;BLoader.unLoadCSS(g,J);if(o_info.debug){o_log("c7: rm css: id:"+J+" ,url:'"+g+"'")}}var aa=W.cssadd;for(k=0;k<aa.length;k++){var G=aa[k];var J=G.id;var g=D+G.url;var o=G.pt;BLoader.loadCSS(g,J,o);if(o_info.debug){o_log("c7: add css: id:"+J+" ,url:'"+g+"'")}}var q=W.jsadd;for(l=0;l<q.length;l++){var G=q[l];var ad=G.before;if(jQuery.type(ad)==="string"){BLoader.executeGlobalJS(ad,"o_ainvoker::preJsAdd")}var g=G.url;var s=G.enc;if(jQuery.type(g)==="string"){BLoader.loadJS(g,s,true)}if(o_info.debug){o_log("c7: add js: "+g)}}break;default:if(o_info.debug){o_log("?: unknown command "+E)}break}}else{if(o_info.debug){o_log("could not find window??")}}}var b=b_onDomReplacementFinished_callbacks.length;for(mycounter=0;b>mycounter;mycounter++){if(mycounter>50){break}var w=b_onDomReplacementFinished_callbacks.shift();if(typeof w.length==="number"){if(w[0]=="glosshighlighter"){var f=w[1];w=f}}w()}jQuery(document).trigger("oo.dom.replacement.after")}o_info.inainvoke=false}function clearAfterAjaxIframeCall(){if(o_info.linkbusy){o_afterserver()}}function showAjaxBusy(){setTimeout(function(){if(o_info.linkbusy){try{if(jQuery("#o_ajax_busy_backdrop").length==0){jQuery("#o_body").addClass("o_ajax_busy");jQuery("#o_ajax_busy").modal({show:true,backdrop:"static",keyboard:"false"});jQuery("#o_ajax_busy").after('<div id="o_ajax_busy_backdrop" class="modal-backdrop in"></div>');jQuery("#o_ajax_busy>.modal-backdrop").remove();jQuery("#o_ajax_busy_backdrop").css({"z-index":1200})}}catch(a){if(window.console){console.log(a)}}}},700)}function removeAjaxBusy(){try{jQuery("#o_body").removeClass("o_ajax_busy");jQuery("#o_ajax_busy_backdrop").remove();jQuery("#o_ajax_busy").modal("hide")}catch(a){if(window.console){console.log(a)}}}function setFormDirty(c){o2c=1;var a=document.getElementById(c);if(a!=null){var b=a.olat_fosm_0;if(b==null){b=a.olat_fosm}if(b){b.className="btn o_button_dirty"}}}function contextHelpWindow(a){helpWindow=window.open(a,"HelpWindow","height=760, width=940, left=0, top=0, location=no, menubar=no, resizable=yes, scrollbars=yes, toolbar=no");helpWindow.focus()}function o_openPopUp(b,d,c,a,f){attributes="height="+a+", width="+c+", resizable=yes, scrollbars=yes, left=100, top=100, ";if(f){attributes+="location=yes, menubar=yes, status=yes, toolbar=yes"}else{attributes+="location=no, menubar=no, status=no, toolbar=no"}var h;try{h=window.open(b,d,attributes)}catch(g){h=window.open(b,"OpenOLAT",attributes)}h.focus();if(o_info.linkbusy){o_afterserver()}}function o_openTab(a){var b=window.open(a,"_blank");b.focus();if(o_info.linkbusy){o_afterserver()}}function b_handleFileUploadFormChange(m,b,g){m.setCustomValidity("");if(m.hasAttribute("data-max-size")){var p=m.getAttribute("data-max-size");if(p){var d=formInputFileSize(m);if(d>p){var q=jQuery(document).ooTranslator().getTranslator(o_info.locale,"org.olat.modules.forms.ui");var h=q.translate("file.upload.error.limit.exeeded");var o=q.translate("file.upload.limit");var n;if(p<250*1024){n=(p/1024).toFixed(1)+" KB"}else{if(p<250*1024*1024){n=(p/1024/1024).toFixed(1)+" MB"}else{n=(p/1024/1024/1024).toFixed(1)+" GB"}}m.setCustomValidity(h+" ("+o+": "+n+")")}}}var f=m.value;var e=f.lastIndexOf("/");if(e!=-1){f=f.substring(e+1)}e=f.lastIndexOf("\\");if(e!=-1){f=f.substring(e+1)}b.value=f;if(g){g.className="o_button_dirty"}var a=m.form.elements;for(i=0;i<a.length;i++){var c=a[i];if(c.name==b.name&&i+1<a.length){a[i+1].focus()}}}function formInputFileSize(c){try{if(!window.FileReader){return -1}if(!c||!c.files){return -1}var a=c.files[0];if(!a){return -1}return a.size}catch(b){o_logerr("form input file size check failed: "+b)}return -1}function gotonode(a){try{if(typeof o_activateCourseNode!="undefined"){o_activateCourseNode(a)}else{if(opener&&typeof opener.o_activateCourseNode!="undefined"){opener.o_activateCourseNode(a)}}}catch(b){alert("Goto node error:"+b)}}function o_viewportHeight(){var a=jQuery(document).height();if(a>0){return a}else{return 600}}OPOL.getMainColumnsMaxHeight=function(){var m=0,f=0,a=0,c=0,h=0,b,g=jQuery("#o_main_left_content"),e=jQuery("#o_main_right_content"),d=jQuery("#o_main_center_content");if(g!="undefined"&&g!=null){m=g.outerHeight(true)}if(e!="undefined"&&e!=null){f=e.outerHeight(true)}if(d!="undefined"&&d!=null){a=d.outerHeight(true)}c=(m>f?m:f);c=(c>a?c:a);if(c>0){return c}b=jQuery("#o_main");if(b!="undefined"&&b!=null){h=b.height()}if(b>0){return b}return o_viewportHeight()};OPOL.adjustHeight=function(){try{var a=jQuery("#o_main_left_content");var m=a.length==0?0:a.outerHeight(true);var h=jQuery("#o_main_right_content");var f=h.length==0?0:h.outerHeight(true);var b=jQuery("#o_main_center_content");var d=b.length==0?0:b.outerHeight(true);var c=Math.max(m,f,d);if(a.length>0){jQuery("#o_main_left").css({"min-height":c+"px"})}if(h.length>0){jQuery("#o_main_right").css({"min-height":c+"px"})}if(b.length>0){jQuery("#o_main_center").css({"min-height":c+"px"})}}catch(g){if(window.console){console.log(g)}}};OPOL.setContainerFullWidth=function(a){if(a){jQuery("body").addClass("o_width_full")}else{jQuery("body").removeClass("o_width_full")}jQuery.proxy(OPOL.navbar.onPageWidthChangeCallback,OPOL.navbar)()};jQuery(window).resize(function(){clearTimeout(o_info.resizeId);o_info.resizeId=setTimeout(function(){jQuery(document).trigger("oo.window.resize.after")},500)});jQuery(document).on("oo.window.resize.after",OPOL.adjustHeight);jQuery(document).on("oo.dom.replacement.after",OPOL.adjustHeight);jQuery().ready(OPOL.adjustHeight);function o_scrollToElement(a){try{o_info.scrolling=true;jQuery("html, body").animate({scrollTop:jQuery(a).offset().top},333,function(d,c){o_info.scrolling=false})}catch(b){}}function o_popover(c,b,a){if(typeof(a)==="undefined"){a="bottom"}jQuery("#"+c).popover({placement:a,html:true,trigger:"click",container:"body",content:function(){return jQuery("#"+b).clone().html()}}).on("shown.bs.popover",function(){var d=function(f){jQuery("#"+c).popover("hide");jQuery("body").unbind("click",d)};setTimeout(function(){jQuery("body").on("click",d)},5)})}function o_popoverWithTitle(e,d,c,b){if(typeof(b)==="undefined"){b="bottom"}var a=jQuery("#"+e).popover({placement:b,html:true,title:c,trigger:"click",container:"body",content:function(){return jQuery("#"+d).clone().html()}});a.on("shown.bs.popover",function(){var f=function(g){jQuery("#"+e).popover("hide");jQuery("body").unbind("click",f)};setTimeout(function(){jQuery("body").on("click",f)},5)});return a}function o_shareLinkPopup(d,c,b){if(typeof(b)==="undefined"){b="top"}var a=jQuery("#"+d);a.popover({placement:b,html:true,trigger:"click",container:"body",content:c}).on("shown.bs.popover",function(){var e=function(f){if(jQuery(f.target).data("toggle")!=="popover"&&jQuery(f.target).parents(".popover.in").length===0){jQuery("#"+d).popover("hide");jQuery("body").unbind("click",e)}};setTimeout(function(){jQuery("body").on("click",e)},5)});a.attr("title",a.attr("data-original-title"))}function o_QRCodePopup(d,c,b){if(typeof(b)==="undefined"){b="top"}var a=jQuery("#"+d);a.popover({placement:b,html:true,trigger:"click",container:"body",content:'<div id="'+d+'_pop" class="o_qrcode"></div>'}).on("shown.bs.popover",function(){o_info.qr=o_QRCode(d+"_pop",(jQuery.isFunction(c)?c():c));var e=function(f){if(jQuery(f.target).data("toggle")!=="popover"&&jQuery(f.target).parents(".popover.in").length===0){jQuery("#"+d).popover("hide");jQuery("body").unbind("click",e)}};setTimeout(function(){jQuery("body").on("click",e)},5)}).on("hidden.bs.popover",function(){try{o_info.qr.clear();delete o_info.qr}catch(f){}});a.attr("title",a.attr("data-original-title"))}function o_QRCode(c,b){try{BLoader.loadJS(o_info.o_baseURI+"/js/jquery/qrcodejs/qrcode.min.js","utf8",true);return new QRCode(document.getElementById(c),b)}catch(a){return null}}function b_resizeIframeToMainMaxHeight(e){var d=jQuery("#"+e);if(d!="undefined"&&d!=null){var c=OPOL.getMainColumnsMaxHeight()-110;var b=o_viewportHeight()-100;b=b-d.offset().top;var a=(b>c?b:c);d.height(a)}}var o_debu_oldcn,o_debu_oldtt;function o_debu_show(b,a){if(o_debu_oldcn){o_debu_hide(o_debu_oldcn,o_debu_oldtt)}jQuery(b).addClass("o_dev_m");jQuery(a).show();o_debu_oldtt=a;o_debu_oldcn=b}function o_debu_hide(b,a){jQuery(a).hide();jQuery(b).removeClass("o_dev_m")}function o_dbg_mark(a){var b=jQuery("#"+a);if(b){b.css("background-color","#FCFCB8");b.css("border","3px solid #00F")}}function o_dbg_unmark(a){var b=jQuery("#"+a);if(b){b.css("border","");b.css("background-color","")}}function o_clearConsole(){o_log_all="";o_log(null)}var o_log_all="";function o_log(b){if(b){o_log_all="\n"+o_debug_trid+"> "+b+o_log_all;o_log_all=o_log_all.substr(0,4000)}var a=jQuery("#o_debug_cons");if(a){if(o_log_all.length==4000){o_log_all=o_log_all+"\n... (stripped: to long)... "}a.value=o_log_all}if(!jQuery.type(window.console)==="undefined"){window.console.log(b)}}function o_logerr(a){o_log("ERROR:"+a)}function o_logwarn(a){o_log("WARN:"+a)}function showerror(c){var a="";for(var b in c){a+=b+": "+c[b]+"\n"}return"error detail:\n"+a}function o_ffEvent(g,f,d,o,p){var h,m,b,a;h=document.getElementById(f);m=h.value;h.value=d;b=document.getElementById(o);a=b.value;b.value=p;var c=jQuery("#"+g);var e=true;jQuery("#"+g+" input[type=file]").filter(function(q,r){return !r.checkValidity()}).each(function(q,s){var t=s.getAttribute("id")+"_validation_error";var r=document.getElementById(t);if(!r){r=document.createElement("div");r.setAttribute("class","o_error");r.setAttribute("id",t);s.parentNode.parentNode.appendChild(r)}r.innerHTML=s.validationMessage;e=false});if(e){var n=c.attr("enctype");if(n&&n.indexOf("multipart")==0){o_XHRSubmitMultipart(g)}else{if(document.forms[g].onsubmit()){document.forms[g].submit()}}}h.value=m;b.value=a}function o_IQEvent(a){if(document.forms[a].onsubmit()){document.forms[a].submit()}}function o_TableMultiActionEvent(a,c){var b=jQuery("#o_mai_"+a);b.val(c);if(document.forms[a].onsubmit()){document.forms[a].submit()}b.val("")}function o_XHRSubmit(h){if(o_info.linkbusy){return false}o_beforeserver();var o=true;var a=jQuery("#"+h);var n=a.attr("enctype");if(n&&n.indexOf("multipart")==0){var g="openolat-submit-"+(""+Math.random()).substr(2);var d=o_createIFrame(g);document.body.appendChild(d);a.attr("target",d.name);return true}else{var f=a.serializeArray();if(arguments.length>1){var m=arguments.length;for(var e=1;e<m;e=e+2){if(m>e+1){var c=new Object();c.name=arguments[e];c.value=arguments[e+1];f[f.length]=c}}}var b=a.attr("action");jQuery.ajax(b,{type:"POST",data:f,cache:false,dataType:"json",success:function(s,v,r){try{o_ainvoke(s);if(o){var p=s.businessPath;var q=s.documentTitle;var u=s.historyPointId;if(p){o_pushState(u,q,p)}}}catch(t){if(window.console){console.log(t)}}finally{o_afterserver()}},error:o_onXHRError});return false}}function o_XHRSubmitMultipart(a){var c=jQuery("#"+a);var d="openolat-submit-"+(""+Math.random()).substr(2);var b=o_createIFrame(d);document.body.appendChild(b);c.attr("target",b.name);c.submit();c.attr("target","")}function o_createIFrame(b){var a=jQuery('<iframe name="'+b+'" id="'+b+'" src="about:blank" style="position: absolute; top: -9999px; left: -9999px;"></iframe>');return a[0]}function o_removeIframe(a){jQuery("#"+a).remove()}function o_showFormDirtyDialog(a){o_scrollToElement("#o_top");jQuery("#o_form_dirty_message").modal("show");jQuery("#o_form_dirty_message .o_form_dirty_ignore").on("click",function(){jQuery("#o_form_dirty_message").modal("hide");jQuery("#o_form_dirty_message .o_form_dirty_ignore").off();a()});return false}function o_ffXHREvent(h,e,s,g,p,t,f,m){if(t&&o2c==1){var d=Array.prototype.slice.call(arguments);d[5]=false;var u=function(){o_ffXHREvent.apply(window,d)};return o_showFormDirtyDialog(u)}else{if(!o2cl_noDirtyCheck()){return false}}o_beforeserver();var v=new Object();if(m){var b=jQuery("#"+h);var q=b.serializeArray();var o=q.length;for(var r=0;r<o;r++){var n=q[r];if(n.name!="dispatchuri"&&n.name!="dispatchevent"){v[n.name]=n.value}}}v.dispatchuri=s;v.dispatchevent=p;if(arguments.length>8){var a=arguments.length;for(var r=8;r<a;r=r+2){if(a>r+1){v[arguments[r]]=arguments[r+1]}}}var c=jQuery("#"+h).attr("action");jQuery.ajax(c,{type:"POST",data:v,cache:false,dataType:"json",success:function(z,C,y){try{o_ainvoke(z);if(f){var w=z.businessPath;var x=z.documentTitle;var B=z.historyPointId;if(w){o_pushState(B,x,w)}}}catch(A){if(window.console){console.log(A)}}finally{o_afterserver()}},error:o_onXHRError})}function o_ffXHRNFEvent(f,e,a,h,m){var c=new Object();c.dispatchuri=a;c.dispatchevent=m;if(arguments.length>5){var g=arguments.length;for(var d=5;d<g;d=d+2){if(g>d+1){c[arguments[d]]=arguments[d+1]}}}var b=jQuery("#"+f).attr("action");jQuery.ajax(b,{type:"POST",data:c,cache:false,dataType:"json",success:function(o,p,n){}})}function o_XHRWikiEvent(b){var a=jQuery(b).attr("href");if(a.indexOf(o_info.serverUri)==0){a=a.substring(o_info.serverUri.length,a.length)}o_XHREvent(a,false,true);return false}function o_XHREvent(h,f,c){if(f&&o2c==1){var b=Array.prototype.slice.call(arguments);b[1]=false;var a=function(){o_XHREvent.apply(window,b)};return o_showFormDirtyDialog(a)}else{if(!o2cl_noDirtyCheck()){return false}}o_beforeserver();var e=new Object();if(arguments.length>3){var g=arguments.length;for(var d=3;d<g;d=d+2){if(g>d+1){e[arguments[d]]=arguments[d+1]}}}jQuery.ajax(h,{type:"POST",data:e,cache:false,dataType:"json",success:function(p,s,o){try{if(c){try{var m=p.businessPath;var n=p.documentTitle;var r=p.historyPointId;if(m){o_pushState(r,n,m)}}catch(q){if(window.console){console.log(q)}}}o_ainvoke(p)}catch(q){if(window.console){console.log(q)}}finally{o_afterserver()}},error:o_onXHRError});return false}function o_XHRNFEvent(d){var b=new Object();if(arguments.length>1){var c=arguments.length;for(var a=1;a<c;a=a+2){if(c>a+1){b[arguments[a]]=arguments[a+1]}}}jQuery.ajax(d,{type:"POST",data:b,cache:false,dataType:"json",success:function(f,g,e){},error:o_onXHRError})}function o_onXHRError(a,d,b){o_afterserver();if(401==a.status){var c=o_info.oo_noresponse.replace("reload.html",window.document.location.href);showMessageBox("error",o_info.oo_noresponse_title,c,undefined)}else{if(window.console){console.log("Error status 2",d,b,a.responseText);console.log(a)}}}function o_pushState(d,f,a){try{var b=new Object();b.businessPath=a;b.historyPointId=d;if(a!=null&&!(a.lastIndexOf("http",0)===0)&&!(a.lastIndexOf("https",0)===0)){a=o_info.serverUri+a}o_info.businessPath=a;if(!(typeof o_shareActiveSocialUrl==="undefined")){o_shareActiveSocialUrl()}if(window.history&&!(typeof window.history==="undefined")&&window.history.pushState){window.history.pushState(b,f,a)}else{window.location.hash=d}}catch(c){if(window.console){console.log(c,a)}}}function o_toggleMark(a){var b=jQuery("i",a).attr("class");if(b.indexOf("o_icon_bookmark_add")>=0){jQuery("i",a).removeClass("o_icon_bookmark_add").addClass("o_icon_bookmark")}else{jQuery("i",a).removeClass("o_icon_bookmark").addClass("o_icon_bookmark_add")}}function registerDrake(a){o_info.drakes.push(a);return a}function destroyDrakes(){if(o_info.drakes!=="undefined"&&o_info.drakes!=null&&o_info.drakes.length>0){for(var a=o_info.drakes.length;a-->0;){try{o_info.drakes[a].destroy()}catch(b){if(window.console){console.log(b)}}o_info.drakes.pop()}}}function checkDrakes(){if(o_info.drakes!=="undefined"&&o_info.drakes!=null&&o_info.drakes.length>0){if(jQuery(".o_drake").length==0){destroyDrakes()}}}function o_normalizeFilename(b){b=b.replace(/\s/g,"_");var f=["/",",",":","(",")"];for(var c=f.length;c-->0;){b=b.split(f[c]).join("_")}var a=["\u00C4","\u00D6","\u00DC","\u00E4","\u00F6","\u00E6","\u00FC","\u00DF","\u00F8","\u2205"],d=["Ae","Oe","Ue","ae","oe","ae","ue","ss","o","o"];for(var c=a.length;c-->0;){b=b.split(a[c]).join(d[c])}try{b=b.normalize("NFKD");b=b.replace("/p{InCombiningDiacriticalMarks}+/g","");b=b.replace("/W+/g","")}catch(g){if(window.console){console.log(g)}}return b}function setFlexiFormDirtyByListener(a){setFlexiFormDirty(a.data.formId,a.data.hideMessage)}function setFlexiFormDirty(b,c){var a=o3c.indexOf(b)>-1;if(!a){o3c.push(b)}jQuery("#"+b).each(function(){var d=jQuery(this).data("FlexiSubmit");if(d!=null){jQuery("#"+d).addClass("btn o_button_dirty");o2c=(c?0:1)}})}function o_ffRegisterSubmit(b,a){jQuery("#"+b).data("FlexiSubmit",a)}function dismissInfoBox(a){javascript:jQuery("#"+a).remove();return true}function showInfoBox(g,d){var c=Math.floor(Math.random()*65536).toString(16);var f='<div id="'+c+'" class="o_alert_info"><div class="alert alert-info clearfix o_sel_info_message"><a class="o_alert_close o_sel_info_close" href="javascript:;" onclick="dismissInfoBox(\''+c+'\')"><i class="o_icon o_icon_close"> </i></a><h3><i class="o_icon o_icon_info"> </i> '+g+"</h3><p>"+d+"</p></div></div>";var a=jQuery("#o_messages").prepend(f);var e=(d.length>150)?8000:((d.length>70)?6000:4000);var b=function(){jQuery("#"+c).transition({top:"-100%"},333,function(){jQuery("#"+c).remove()})};o_info.scrolling=true;jQuery("#"+c).show().transition({top:0},333);jQuery("#"+c).click(function(h){b()});o_scrollToElement("#o_top");g=null;d=null;a=null;setTimeout(function(){try{b()}catch(h){}},e)}function showMessageBox(b,f,d,a){if(b=="info"){showInfoBox(f,d);return null}else{var c='<div id="myFunctionalModal" class="modal fade" role="dialog"><div class="modal-dialog"><div class="modal-content">';c+='<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>';c+='<h4 class="modal-title">'+f+"</h4></div>";c+='<div class="modal-body alert ';if("warn"==b){c+="alert-warning"}else{if("error"==b){c+="alert-danger"}else{c+="alert-info"}}c+='"><p>'+d+"</p></div></div></div></div>";jQuery("#myFunctionalModal").remove();jQuery("body").append(c);var e=jQuery("#myFunctionalModal").modal("show").on("hidden.bs.modal",function(g){jQuery("#myFunctionalModal").remove()});o_scrollToElement("#o_top");return e}}function o_table_toggleCheck(d,c){var a=document.forms[d].elements.tb_ms;len=a.length;if(typeof(len)=="undefined"){a.checked=c}else{var b;for(b=0;b<len;b++){a[b].checked=c}}}function onTreeStartDrag(a,b){jQuery(a.target).addClass("o_dnd_proxy")}function onTreeStopDrag(a,b){jQuery(a.target).removeClass("o_dnd_proxy")}function onTreeDrop(g,h){var a=jQuery(h.draggable[0]);var f=jQuery(this);f.css({position:"",width:""});var c=f.droppable("option","endUrl");if(c.lastIndexOf("/")==(c.length-1)){c=c.substring(0,c.length-1)}var e=a.attr("id");var b=e.substring(2,e.length);c+="%3Atnidle%3A"+b;var d=f.attr("id");if(d.indexOf("ds")==0){c+="%3Asne%3Ayes"}else{if(d.indexOf("dt")==0){c+="%3Asne%3Aend"}}jQuery(".ui-droppable").each(function(m,n){jQuery(n).droppable("disable")});o_XHREvent(c+"/",false,false)}function treeAcceptDrop(a){return true}function treeAcceptDrop_notWithChildren(a){var c=false;var b=jQuery(a);var e=b.attr("id");if(e!=undefined&&(e.indexOf("dd")==0||e.indexOf("ds")==0||e.indexOf("dt")==0||e.indexOf("da")==0||e.indexOf("row")==0)){var g=jQuery(this);var m=g.attr("id");var d=e.substring(2,e.length);var f=m.substring(2,m.length);if(d!=f){var h=jQuery("#dd"+d).parents("li");if(h.length>0&&jQuery(h.get(0)).find("#dd"+f).length==0){c=true}}}return c}function treeAcceptDrop_portfolio(b){var d=false;var c=jQuery(b);var f=c.attr("id");if(treeNode_isDragNode(f)){var h=jQuery(this);var o=h.attr("id");var e=f.substring(2,f.length);var g=o.substring(2,o.length);var n=f.indexOf("ds")==0||f.indexOf("dt")==0;if(e!=g){var m=treeNode_portfolioType(c);var a=treeNode_portfolioType(h);if(m=="artefact"){if(a=="page"||a=="struct"||a=="artefact"){d=true}}else{if(m=="struct"){if(a=="page"||a=="struct"){d=true}}else{if(m=="page"){if(a=="map"||a=="page"){d=true}}}}}}return d}function treeNode_portfolioType(e){var c=jQuery(e.get(0));var d=treeNode_portfolioTypes(c);if(d==null){var a=c.parent("a");if(a.length>0){d=treeNode_portfolioTypes(jQuery(a.get(0)))}else{if(c.attr("id").indexOf("ds")==0){var b=c.prev("div");if(b.length>0){d=treeNode_portfolioTypes(b)}}else{if(c.attr("id").indexOf("dt")==0){var b=c.next("div");if(b.length>0){d=treeNode_portfolioTypes(b)}}}}}return d}function treeNode_portfolioTypes(a){if(a.find===undefined){return null}else{if(a.find(".o_ep_icon_struct").length>0||a.hasClass("o_ep_icon_struct")){return"struct"}else{if(a.find(".o_ep_icon_page").length>0||a.hasClass("o_ep_icon_page")){return"page"}else{if(a.find(".o_ep_icon_map").length>0||a.hasClass("o_ep_icon_map")){return"map"}else{if(a.find(".o_ep_artefact").length>0||a.hasClass("o_ep_artefact")){return"artefact"}}}}}return null}function treeNode_isDragNode(a){if(a!=undefined&&(a.indexOf("dd")==0||a.indexOf("ds")==0||a.indexOf("dt")==0||a.indexOf("da")==0||a.indexOf("row")==0)){return true}return false}function o_choice_toggleCheck(c,b){var d=document.forms[c].elements;len=d.length;if(typeof(len)=="undefined"){d.checked=b}else{var a;for(a=0;a<len;a++){if(d[a].type=="checkbox"&&d[a].getAttribute("class")=="o_checkbox"){d[a].checked=b}}}}function b_briefcase_isChecked(c,e){var b;var a=document.getElementById(c);var d=0;for(b=0;a.elements[b];b++){if(a.elements[b].type=="checkbox"&&a.elements[b].name=="paths"&&a.elements[b].checked){d++}}if(d<1){alert(e);return false}return true}function b_briefcase_toggleCheck(d,c){var a=document.getElementById(d);len=a.elements.length;var b;for(b=0;b<len;b++){if(a.elements[b].name=="paths"){a.elements[b].checked=c}}}function o_doPrint(){var d=jQuery("div.o_iframedisplay iframe");if(d.length>0){try{var a=d[0];frames[a.name].focus();frames[a.name].print();return}catch(c){for(i=0;frames.length>i;i++){a=frames[i];if(a.name=="oaa0"){continue}var b=document.getElementsByName(a.name)[0];if(b&&b.getAttribute("class")=="ext-shim"){continue}if(a.name!=""){try{frames[a.name].focus();frames[a.name].print()}catch(c){window.print()}return}}window.print()}}else{window.print()}}function b_attach_i18n_inline_editing(){jQuery("span.o_translation_i18nitem").hover(function(){jQuery(this.firstChild).show()},function(){jQuery("a.o_translation_i18nitem_launcher").hide()});jQuery("a.o_translation_i18nitem_launcher").hover(function(){var a=jQuery(this).parent("span.o_translation_i18nitem");a.effect("highlight")});b_AddOnDomReplacementFinishedCallback(b_attach_i18n_inline_editing)}function b_hideExtMessageBox(){}var BDebugger={_lastDOMCount:0,_lastObjCount:0,_knownGlobalOLATObjects:["o_afterserver","o_onc","o_getMainWin","o_ainvoke","o_info","o_beforeserver","o_ffEvent","o_openPopUp","o_debu_show","o_logwarn","o_dbg_unmark","o_ffRegisterSubmit","o_clearConsole","o_init","o_log","o_allowNextClick","o_dbg_mark","o_debu_hide","o_logerr","o_debu_oldcn","o_debu_oldtt","o_debug_trid","o_log_all"],_countDOMElements:function(){return document.getElementsByTagName("*").length},_countGlobalObjects:function(){var a=0;for(prop in window){a++}return a},logDOMCount:function(){var b=BDebugger;var a=b._countDOMElements();var c=a-b._lastDOMCount;console.log((c>0?"+":"")+c+" \t"+a+" \tDOM element count after DOM replacement");b._lastDOMCount=a;a=null},logGlobalObjCount:function(){var b=BDebugger;var a=b._countGlobalObjects();var c=a-b._lastObjCount;console.log((c>0?"+":"")+c+" \t"+a+" \tGlobal object count after DOM replacement");b._lastObjCount=a;a=null},logGlobalOLATObjects:function(){var b=BDebugger;var a=new Array();for(prop in window){if(prop.indexOf("o_")==0&&b._knownGlobalOLATObjects.indexOf(prop)==-1){a.push(prop)}}if(a.length>0){console.log(a.length+" global OLAT objects found:");a.each(function(c){console.log("\t"+typeof window[c]+" \t"+c)})}}};var OOEdusharing={start:function(){if(o_info.edusharing_enabled){OOEdusharing.render();jQuery(document).on("oo.dom.replacement.after",OOEdusharing.render);OOEdusharing.enableMetadataToggler()}},replaceWithSpinner:function(d,c,a){var b="<div style='";if(c>0){b+="width:"+c+"px;"}if(a>0){b+="height:"+a+"px;"}b+="'>";b+="<div class='edusharing_spinner_inner'><div class='edusharing_spinner1'></div></div>";b+="<div class='edusharing_spinner_inner'><div class='edusharing_spinner2'></div></div>";b+="<div class='edusharing_spinner_inner'><div class='edusharing_spinner3'></div></div>";b+="</div>";var e=jQuery(b);d.before(e);d.remove();return e},replaceGoTo:function(c,b){var a=o_info.uriprefix.replace("auth","edusharing")+"goto?identifier="+b;c=c.replace("{{{LMS_INLINE_HELPER_SCRIPT}}}",a);return c},replaceWithRendered:function(e,m,c,o,d,f,g,n){var b=o_info.uriprefix.replace("auth","edusharing")+"render?identifier="+m;if(c>0){b=b+"&width="+c}if(o){b=b+"&height="+o}var h="<div class='o_edusharing_container";if(typeof d!="undefined"){h+=" "+d}if(n){h+=" o_in_iframe"}if("hide"===f){h+=" o_hide_license"}if("hide"===g){h+=" o_hide_infos"}h+="'>";h+="</div>";var a=jQuery(h);jQuery.ajax({type:"GET",url:b,dataType:"html",success:function(r){var q=OOEdusharing.replaceGoTo(r,m);var p=a.append(q);e.replaceWith(p)},error:function(p,r,q){e.replaceWith("<div class='o_warning'>edu-sharing not available</div>")}})},replace:function(c,g){var f=c.data("es_identifier");var a=c.attr("width");var m=c.attr("height");var b=c.attr("class");var d=c.data("es_show_license");var e=c.data("es_show_infos");var h=OOEdusharing.replaceWithSpinner(c,a,m);OOEdusharing.replaceWithRendered(h,f,a,m,b,d,e,g)},render:function(){var a=jQuery("[data-es_identifier]");if(a.length>0){a.each(function(){var c=jQuery(this);OOEdusharing.replace(c,false)})}var b=jQuery(".o_iframe_rel");if(b.length>0){b.each(function(){var c=jQuery(this);c.on("load",function(){c.contents().on("click",OOEdusharing.toggleMetadata);var d=c.contents().find("[data-es_identifier]");if(d.length>0){d.each(function(){var e=jQuery(this);OOEdusharing.replace(e,true)})}})})}},toggleMetadata:function(a){if(jQuery(a.target).closest(".edusharing_metadata").length){}else{if(jQuery(a.target).closest(".edusharing_metadata_toggle_button").length){jQuery(".edusharing_metadata").hide();toggle_button=jQuery(a.target);metadata=toggle_button.parent().find(".edusharing_metadata");if(metadata.hasClass("open")){metadata.toggleClass("open");metadata.hide()}else{jQuery(".edusharing_metadata").removeClass("open");metadata.toggleClass("open");metadata.show()}}else{jQuery(".edusharing_metadata").hide();jQuery(".edusharing_metadata").removeClass("open")}}},enableMetadataToggler:function(){jQuery(document).click(OOEdusharing.toggleMetadata)}};jQuery(document).ready(function(){OOEdusharing.start()});/*! * jQuery Transit - CSS3 transitions and transformations * (c) 2011-2014 Rico Sta. Cruz * MIT Licensed. diff --git a/src/test/java/org/olat/selenium/CourseTest.java b/src/test/java/org/olat/selenium/CourseTest.java index 60d6d21181cc48e5cfcaa4aaf2be16cacf5bd3c0..92376b3d788b45bbc90b4399c9f9f756ad9af671 100644 --- a/src/test/java/org/olat/selenium/CourseTest.java +++ b/src/test/java/org/olat/selenium/CourseTest.java @@ -266,11 +266,11 @@ public class CourseTest extends Deployments { List<WebElement> nodes = browser.findElements(nodeBy); Assert.assertEquals(5, nodes.size()); for(int i=0; i<5; i++) { - By linkBy = By.xpath("//div[contains(@class,'o_tree')]//li[" + (i+1) + "]/div/span[contains(@class,'o_tree_link')]/a[span]"); + By linkBy = By.xpath("//div[contains(@class,'o_tree')]//li[" + (i+1) + "]/div/span[contains(@class,'o_tree_link')][contains(@class,'o_tree_l1')][contains(@class,'o_tree_level_label_leaf')]/a[span]"); OOGraphene.waitElement(linkBy, browser); browser.findElement(linkBy).click(); OOGraphene.waitBusy(browser); - By activeLinkBy = By.xpath("//div[contains(@class,'o_tree')]//li[" + (i+1) + "][contains(@class,'active')]/div/span[contains(@class,'o_tree_link')]/a[span]"); + By activeLinkBy = By.xpath("//div[contains(@class,'o_tree')]//li[" + (i+1) + "][contains(@class,'active')]/div/span[contains(@class,'o_tree_link')][contains(@class,'o_tree_l1')][contains(@class,'o_tree_level_label_leaf')]/a[span]"); OOGraphene.waitElement(activeLinkBy, browser); } } diff --git a/src/test/java/org/olat/selenium/page/core/ContactPage.java b/src/test/java/org/olat/selenium/page/core/ContactPage.java index 6362daeb02a12207dc6988b4579eb0d3df83e449..b1625badf308a30f04b9e4f35be810b98f91309b 100644 --- a/src/test/java/org/olat/selenium/page/core/ContactPage.java +++ b/src/test/java/org/olat/selenium/page/core/ContactPage.java @@ -26,6 +26,7 @@ import org.olat.selenium.page.graphene.OOGraphene; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.firefox.FirefoxDriver; /** * @@ -62,6 +63,9 @@ public class ContactPage { public ContactPage send() { By sendBy = By.cssSelector("fieldset.o_sel_contact_form button.btn-primary"); + if(browser instanceof FirefoxDriver) { + OOGraphene.scrollTo(sendBy, browser); + } OOGraphene.moveAndClick(sendBy, browser); OOGraphene.moveTop(browser); OOGraphene.waitAndCloseBlueMessageWindow(browser); diff --git a/src/test/java/org/olat/selenium/page/course/CourseWizardPage.java b/src/test/java/org/olat/selenium/page/course/CourseWizardPage.java index 486058cbf8f427834a6ddf8ca39e9848733f6e71..864c9582cb5c56d243d4bcd5b20691cd08e529a3 100644 --- a/src/test/java/org/olat/selenium/page/course/CourseWizardPage.java +++ b/src/test/java/org/olat/selenium/page/course/CourseWizardPage.java @@ -26,6 +26,7 @@ import org.olat.selenium.page.graphene.OOGraphene; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; +import org.openqa.selenium.firefox.FirefoxDriver; /** * @@ -67,7 +68,7 @@ public class CourseWizardPage { public CourseWizardPage nextCatalog() { OOGraphene.nextStep(browser); OOGraphene.closeBlueMessageWindow(browser); - OOGraphene.waitElement(By.cssSelector("fieldset.o_sel_repo_access_configuration"), 5, browser); + OOGraphene.waitElement(By.cssSelector("fieldset.o_sel_repo_access_configuration"), browser); return this; } @@ -76,6 +77,10 @@ public class CourseWizardPage { * @return this */ public CourseWizardPage finish() { + if(browser instanceof FirefoxDriver) { + OOGraphene.waitingALittleLonger(); + OOGraphene.scrollTo(OOGraphene.wizardFooterBy, browser); + } OOGraphene.finishStep(browser); return this; } diff --git a/src/test/java/org/olat/selenium/page/course/GroupTaskPage.java b/src/test/java/org/olat/selenium/page/course/GroupTaskPage.java index a970154ccfb2510969944b5a38f609367d7d0846..2def3854dc3f31f71d9f1b3362431a9ab39a1619 100644 --- a/src/test/java/org/olat/selenium/page/course/GroupTaskPage.java +++ b/src/test/java/org/olat/selenium/page/course/GroupTaskPage.java @@ -98,18 +98,26 @@ public class GroupTaskPage { } public GroupTaskPage submitFile(File file) { + moveToSubmit(By.id("o_step_submit_content")); return uploadFile("o_step_submit_content", file); } public GroupTaskPage submitRevisedFile(File file) { + moveToSubmit(By.id("o_step_revision_content")); + return uploadFile("o_step_revision_content", file); + } + + /** + * Firefox need to wait a little longer, but why? + * + * @param submitBy The step to move by + */ + private void moveToSubmit(By submitBy) { if(browser instanceof FirefoxDriver) { - // Firefox need to wait a little longer, but why? - By submitBy = By.id("o_step_revision_content"); OOGraphene.waitElement(submitBy, browser); OOGraphene.waitingALittleLonger(); OOGraphene.moveTo(submitBy, browser); } - return uploadFile("o_step_revision_content", file); } private GroupTaskPage uploadFile(String stepId, File file) { diff --git a/src/test/java/org/olat/selenium/page/graphene/OOGraphene.java b/src/test/java/org/olat/selenium/page/graphene/OOGraphene.java index 83440992e3340c903ae24ebfcf05a110d856ea8a..b0903d4c47f615540108ff5cf5308d02d6bc29cc 100644 --- a/src/test/java/org/olat/selenium/page/graphene/OOGraphene.java +++ b/src/test/java/org/olat/selenium/page/graphene/OOGraphene.java @@ -62,6 +62,7 @@ public class OOGraphene { private static final By closeBlueBoxButtonBy = By.cssSelector("div.o_alert_info div.o_sel_info_message a.o_alert_close.o_sel_info_close"); + public static final By wizardFooterBy = By.xpath("//div[contains(@class,'modal')]//div[contains(@class,'modal-footer')]"); public static final By wizardNextBy = By.xpath("//div[contains(@class,'modal-footer')]//a[contains(@class,'o_wizard_button_next')]"); public static final By wizardFinishBy = By.xpath("//div[contains(@class,'modal-footer')]//a[contains(@class,'o_wizard_button_finish') and not(contains(@class,'o_disabled'))]"); diff --git a/src/test/java/org/olat/selenium/page/qti/QTI21Page.java b/src/test/java/org/olat/selenium/page/qti/QTI21Page.java index 226e14213ed34be6860e88f7d4466c3ade3b433e..7faa721a0f86f774c631babe0ea747aa147923a9 100644 --- a/src/test/java/org/olat/selenium/page/qti/QTI21Page.java +++ b/src/test/java/org/olat/selenium/page/qti/QTI21Page.java @@ -173,6 +173,7 @@ public class QTI21Page { if(browser instanceof FirefoxDriver) { String coords = areaEl.getAttribute("coords"); By hotspotBy = By.xpath("//div[contains(@class,'hotspotInteraction')]/div/div/img"); + OOGraphene.waitElementPresence(hotspotBy, 5, browser); WebElement element = browser.findElement(hotspotBy); Dimension dim = element.getSize(); Position pos = Position.valueOf(coords, dim, browser); @@ -628,12 +629,12 @@ public class QTI21Page { */ public QTI21Page saveGraphicAnswer() { By saveAnswerBy = By.cssSelector("button.o_sel_assessment_item_submit"); - browser.findElement(saveAnswerBy).click(); if(browser instanceof FirefoxDriver) { - OOGraphene.clickAndWait(saveAnswerBy, browser); + OOGraphene.moveAndClick(saveAnswerBy, browser); } else { - OOGraphene.waitBusy(browser); + browser.findElement(saveAnswerBy).click(); } + OOGraphene.waitBusy(browser); return this; }