Commits

Juan Carlos Picado Herrera committed 82c8ee1

Comments (0)

Files changed (6)

encuestame-war/src/main/webapp/WEB-INF/layouts/standard/footer.jsp

         Powered By <a href="http://www.encuestame.org" target="_blank">Encuestame</a>
     </div>
     <%=EnMePlaceHolderConfigurer.getProperty("app.version")%>
-    <div class="errorDialog">
-        <div id="sessionHandler"></div>
-        <div id="errorHandler"></div>
-        <div id="errorConexionHandler"></div>
-    </div>
+<!--     <div class="errorDialog"> -->
+<!--         <div id="sessionHandler"></div> -->
+<!--         <div id="errorHandler"></div> -->
+<!--         <div id="errorConexionHandler"></div> -->
+<!--     </div> -->
 </div>

encuestame-war/src/main/webapp/resource/css/public.css

     margin-bottom: 15px;
 }
 
+
 /* tweetpoll info detail */
 
 div.web-tweetpoll-detail div.web-tweetPoll-info-detail {
   max-height: 16px;
   text-align: center;
   width: 100z%;
+}
+
+
+div.comments{
+    overflow: auto;
+}
+
+div.comments div.comment-wrapper{
+    margin: 3px;
+}
+
+div.comments div.comment-wrapper div.comment{
+    padding: 5px;
+    clear: both;
+}
+
+div.comments div.comment-wrapper div.comment div.comment-image{
+    float: left;
+    width: 45px;
+}
+
+div.comments div.comment-wrapper div.comment div.comment-data{
+    float: left;
+    width: 980px;
+}
+
+div.comments div.comment-wrapper div.comment div.comment-data div.comment-info-data{
+    padding: 1px;
+    font-weight: bold;
+}
+
+div.comments div.comment-wrapper div.comment div.comment-data div.comment-date{
+    padding: 1px;
+}
+
+div.comments div.comment-wrapper div.comment div.comment-data div.comment-body{
+        padding: 3px;
 }

encuestame-war/src/main/webapp/resource/js/encuestame/org/core/comments/Comments.js

 
       templatePath: dojo.moduleUrl("encuestame.org.core.comments", "templates/comments.html"),
 
-      type : ""
+      type : "",
 
+      widgetsInTemplate: true,
 
-});
+      /*
+       *
+       */
+      postCreate : function(){
+          this._loadComments();
+      },
+
+      /*
+       * load comments.
+       */
+      _loadComments : function() {
+          var comments = [1,2,3,4,5,6,7,8,9,10];
+          dojo.forEach(comments,
+                  dojo.hitch(this,function(item) {
+                      var widget = new encuestame.org.core.comments.Comment({});
+                      this._items.appendChild(widget.domNode);
+          }));
+      }
+
+
+});
+
+dojo.declare(
+        "encuestame.org.core.comments.Comment",
+        [dijit._Widget, dijit._Templated],{
+
+          templatePath: dojo.moduleUrl("encuestame.org.core.comments", "templates/comment.html"),
+
+          widgetsInTemplate: true,
+
+          type : ""
+    });

encuestame-war/src/main/webapp/resource/js/encuestame/org/core/comments/templates/comment.html

+<div class="comment">
+    <div class="comment-image">
+        <a dojoType="encuestame.org.core.shared.utils.AccountPicture" username="admin"></a>
+    </div>
+    <div class="comment-data">
+        <div class="comment-info-data">Rossen Stotch says:</div>
+        <div class="comment-date">Added on <a href="#">Jhon april 10th, 2010</a></div>
+        <div class="comment-body">
+            Test comment Test comment Test comment Test comment Test comment Test comment Test comment Test comment
+            Test comment Test comment Test comment Test comment Test comment Test comment Test comment Test comment
+            Test comment Test comment Test comment Test comment Test comment Test comment Test comment Test comment
+            Test comment Test comment Test comment Test comment Test comment Test comment Test comment Test comment
+            Test comment Test comment Test comment Test comment Test comment Test comment.
+        </div>
+    </div>
+</div>

encuestame-war/src/main/webapp/resource/js/encuestame/org/core/comments/templates/comments.html

 <div class="comments">
-    COMMENTS
+    <div class="comment-wrapper" dojoAttachPoint="_items">
+
+    </div>
 </div>

encuestame-war/src/main/webapp/resource/js/encuestame/org/core/commons.js

                 switch (ioargs.xhr.status) {
                 case 200:
                     message = "Good request.";
-                    if (encuestame.error.dialog != null) {
-                        encuestame.error.clear();
-                    }
+                    //if (encuestame.error.dialog != null) {
+                     //   encuestame.error.clear();
+                    //}
                     break;
                 case 404:
                     message = "The page you requested was not found.";
-                    encuestame.error.createDialog(message, message);
+                    //encuestame.error.createDialog(message, message);
                     break;
                 case 400:
                     message = "Bad Request";
-                    encuestame.error.createDialog(message, message);
+                    //encuestame.error.createDialog(message, message);
                     break;
                 case 500:
                     break;
                     message = "Service temporarily unavailable.";
-                    encuestame.error.createDialog(message, message);
+                    //encuestame.error.createDialog(message, message);
                     break;
                 case 407:
                     message = "You need to authenticate with a proxy.";
-                    encuestame.error.createDialog(message, message);
+                    //encuestame.error.createDialog(message, message);
                     break;
                 case 0:
                     message = "A network error occurred. Check that you are connected to the internet.";
-                    encuestame.error.conexion(message);
+                    //encuestame.error.conexion(message);
                     break;
                 default:
                     message = "An unknown error occurred";
-                    encuestame.error.unknown(message, ioargs.xhr.status);
+                    //encuestame.error.unknown(message, ioargs.xhr.status);
                 }
               }
           });