Author: trong.tran
Date: 2010-04-01 22:52:52 -0400 (Thu, 01 Apr 2010)
New Revision: 2461
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UINotification.js
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/workspace/UIPortalApplication.gtmpl
Log:
Logging ability with Javascript in developing mode
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UINotification.js
===================================================================
---
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UINotification.js 2010-04-01
22:00:42 UTC (rev 2460)
+++
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UINotification.js 2010-04-02
02:52:52 UTC (rev 2461)
@@ -84,7 +84,6 @@
if (elapsed > this.slideAniLen)
this.endSlide(objectName);
else {
- var before = "before:" + this.object[objectName].id + "-" +
this.object[objectName].style.height + "-";
var d =Math.round(elapsed / this.slideAniLen * this.endHeight[objectName]);
if(this.dir[objectName] == "up")
d = this.endHeight[objectName] - d;
@@ -161,16 +160,16 @@
var UIMessageContent = document.createElement('div');
this.totalCurrentMessage++;
- this.flagNoti[currMessageBoxId] = flag;
- if(!flag) {
+ this.flagNoti[currMessageBoxId] = !flag;
+ if(flag) {
this.importantNoti[this.numImptNoti] = currMessageBoxId;
this.numImptNoti++;
}
UIMessageContent.id = currMessageBoxId;
- UIMessageContent.style.height = "75px";
+ UIMessageContent.style.height = "35px";
UIMessageContent.style.display = "none";
UIMessageContent.className = "Item";
- UIMessageContent.innerHTML = "<div id='UIMessageContent'>" +
messageContent + "</div>";
+ UIMessageContent.innerHTML = "<div>" + messageContent +
"</div>";
var UINotification = document.getElementById("UINotification");
if (UINotification == null) {
document.body.appendChild(document.createElement('div')).id =
"UINotification";
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo.js 2010-04-01 22:00:42
UTC (rev 2460)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo.js 2010-04-02 02:52:52
UTC (rev 2461)
@@ -132,3 +132,11 @@
window.clearTimeout(eXo.session.itvObj) ;
eXo.session.itvObj = null ;
} ;
+
+eXo.debug = function(message) {
+ if(!eXo.developing) return;
+ if(eXo.webui.UINotification) {
+ message = "DEBUG: " + message;
+ eXo.webui.UINotification.addMessage(message);
+ }
+}
\ No newline at end of file
Modified:
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/workspace/UIPortalApplication.gtmpl
===================================================================
---
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/workspace/UIPortalApplication.gtmpl 2010-04-01
22:00:42 UTC (rev 2460)
+++
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/workspace/UIPortalApplication.gtmpl 2010-04-02
02:52:52 UTC (rev 2461)
@@ -56,9 +56,12 @@
<%if(org.exoplatform.commons.utils.PropertyManager.isDevelopping()) {
for(path in scriptsPaths) { %>
<script type="text/javascript"
src="<%=path%>"></script>
- <% }
- } else {
- %>
+ <%}%>
+ <script type="text/javascript">
+ eXo.developing = true ;
+ </script>
+
+ <%} else {%>
<script type="text/javascript"
src="<%=docBase%>/javascript/merged.js"></script>
<%}%>
<script type="text/javascript">
Show replies by date