Index: lams_admin/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_admin/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_admin/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_central/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_central/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_central/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_gradebook/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_gradebook/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_gradebook/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_learning/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_learning/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_learning/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_monitoring/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_monitoring/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_monitoring/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_assessment/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_assessment/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_assessment/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_chat/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_chat/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_chat/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_daco/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_daco/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_daco/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_doku/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_doku/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_doku/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_forum/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_forum/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_forum/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_gmap/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_gmap/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_gmap/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_images/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_images/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_images/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_imscc/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_imscc/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_imscc/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_lamc/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_lamc/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_lamc/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_laqa/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_laqa/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_laqa/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_larsrc/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_larsrc/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_larsrc/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_leader/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_leader/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_leader/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_mindmap/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_mindmap/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_mindmap/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_nb/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_nb/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_nb/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_notebook/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_notebook/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_notebook/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_pixlr/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_pixlr/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_pixlr/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_preview/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_preview/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_preview/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_sbmt/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_sbmt/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_sbmt/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_scratchie/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_scratchie/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_scratchie/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_scribe/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_scribe/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_scribe/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_spreadsheet/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_spreadsheet/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_spreadsheet/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_survey/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_survey/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_survey/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_task/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_task/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_task/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_vote/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_vote/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_vote/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_wiki/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_wiki/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_wiki/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_tool_zoom/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_tool_zoom/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_tool_zoom/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}
Index: lams_www/web/WEB-INF/tags/Etherpad.tag
===================================================================
diff -u -r47af8921ff7d63addfeff2b9624c23fa0602bf63 -r4005c7c30f6bc8d76c65153755c56aba27cb375f
--- lams_www/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 47af8921ff7d63addfeff2b9624c23fa0602bf63)
+++ lams_www/web/WEB-INF/tags/Etherpad.tag (.../Etherpad.tag) (revision 4005c7c30f6bc8d76c65153755c56aba27cb375f)
@@ -11,6 +11,8 @@
<%@ taglib uri="tags-function" prefix="fn" %>
<%@ attribute name="groupId" required="true" rtexprvalue="true" %>
+
+<%@ attribute name="padId" required="false" rtexprvalue="true" %>
<%@ attribute name="showControls" required="false" rtexprvalue="true" %>
<%@ attribute name="showChat" required="false" rtexprvalue="true" %>
<%@ attribute name="height" required="false" rtexprvalue="true" %>
@@ -60,36 +62,50 @@
});
+ let initPad = function(padId) {
+ // proper initialisation
+ $('#etherpad-container-${groupId}').pad({
+ 'padId': padId,
+ 'host':'${etherpadServerUrl}',
+ 'lang':'${fn:toLowerCase(localeLanguage)}',
+ 'showControls':${empty showControls ? false : showControls},
+ 'showChat': ${empty showChat ? false : showChat},
+ 'height': ${empty height ? 'undefined' : height}
+
+
+ ,'userName':''
+
+ }).addClass('initialised');
+ }
+
window.setTimeout(function(){
- $.ajax({
- url: 'etherpad/getPad.do',
- cache : false,
- type: "GET",
- data: {
- groupId : '${groupId}',
- content : $('#etherpad-initial-content-${groupId}').html()
- },
- dataType : 'text',
- success: function(padId, status, xhr) {
- if ( status == "error" ) {
- console.log( xhr.status + " " + xhr.statusText );
- } else {
- // proper initialisation
- $('#etherpad-container-${groupId}').pad({
- 'padId': padId,
- 'host':'${etherpadServerUrl}',
- 'lang':'${fn:toLowerCase(localeLanguage)}',
- 'showControls':${empty showControls ? false : showControls},
- 'showChat': ${empty showChat ? false : showChat},
- 'height': ${empty height ? 'undefined' : height}
-
-
- ,'userName':''
-
- }).addClass('initialised');
- }
- }
- });
+
+
+
+ <%-- If pad ID was not provided, fetch it from back end --%>
+ $.ajax({
+ url: 'etherpad/getPad.do',
+ cache : false,
+ type: "GET",
+ data: {
+ groupId : '${groupId}',
+ content : $('#etherpad-initial-content-${groupId}').html()
+ },
+ dataType : 'text',
+ success: function(padId, status, xhr) {
+ if ( status == "error" ) {
+ console.log( xhr.status + " " + xhr.statusText );
+ } else {
+ initPad(padId);
+ }
+ }
+ });
+
+
+ initPad('${padId}');
+
+
+
// wait for other pad on the page to initialise
}, delayBeforeInitialise);
}