client show scope button + do not show all comments on startup
authorreno
Wed, 25 Nov 2009 18:19:17 +0100
changeset 8 1a495fcc40f9
parent 7 548c727b8dc2
child 9 e88f92bd69d4
client show scope button + do not show all comments on startup
src/cm/media/css/site/text_view_comments/c-style-comment.css
src/cm/media/css/site/text_view_comments/c-style-notelike.css
src/cm/media/js/client/c_icomment.js
src/cm/media/js/site/c_text_view_comments.js
--- a/src/cm/media/css/site/text_view_comments/c-style-comment.css	Wed Nov 25 09:34:10 2009 +0100
+++ b/src/cm/media/css/site/text_view_comments/c-style-comment.css	Wed Nov 25 18:19:17 2009 +0100
@@ -75,12 +75,9 @@
     float:right;
 }
 
-.yui-widget-hd a.c-close {
-/*  background: transparent url(../../../img/close_comment.png) no-repeat scroll 0 0;*/
-    background: transparent url(../../../img/c_spr.png) no-repeat scroll 0 -30px;
+.yui-widget-hd a.c-close, .yui-widget-hd a.c-show-scope  {
     position: absolute;
-    right: 5px;
-	top: 5px;
+    top: 5px;
     height: 14px;
     text-indent: -999px;
     width: 14px;
@@ -90,12 +87,20 @@
     text-decoration: none;
     font-size:77%;
 }
+.yui-widget-hd a.c-close  {
+    background: transparent url(../../../img/c_spr.png) no-repeat scroll 0 -30px;
+    right: 5px;
+}
+.yui-widget-hd a.c-show-scope {
+    background: transparent url(../../../img/c_spr2.png) no-repeat scroll 0 -30px;
+    right: 21px;
+}
 
-.c-comment a.c-iclose {
+.c-comment a.c-iclose, .c-comment a.c-show-iscope  {
     background-position: 0 -30px;
 }
 
-.c-comment a.c-iclose-focus {
+.c-comment a.c-iclose-focus, .c-comment a.c-show-iscope-focus {
     background-position: 0 -74px;
 }
 input[type="text"], input[type="password"], textarea {
--- a/src/cm/media/css/site/text_view_comments/c-style-notelike.css	Wed Nov 25 09:34:10 2009 +0100
+++ b/src/cm/media/css/site/text_view_comments/c-style-notelike.css	Wed Nov 25 18:19:17 2009 +0100
@@ -8,7 +8,7 @@
     background-color:#FCFC6B;
 }
 
-.c-comment a.c-iclose {
+.c-comment a.c-iclose, .c-comment a.c-show-iscope  {
     background-position: 0 -162px ;
 	/*background: transparent url(../../../img/close_comment_notelike.png) no-repeat scroll 0 0;*/
     
--- a/src/cm/media/js/client/c_icomment.js	Wed Nov 25 09:34:10 2009 +0100
+++ b/src/cm/media/js/client/c_icomment.js	Wed Nov 25 18:19:17 2009 +0100
@@ -25,6 +25,7 @@
 	var edit = gettext("edit") ;
 	var del = gettext("delete") ;
 	var close = gettext("close") ;
+	var showScope = gettext("show scope") ;
 	
 	// no header, no body yet 
 	this.overlay = new CY.Overlay( {
@@ -46,6 +47,7 @@
 								'<a class="c-state-unapproved c-action" title="' + changeToUnapprove + '" alt="' + changeToUnapprove + '">'+ unapproved +'</a>' + " " +  
 								'<a class="c-state-cancel c-action" title="' + cancelChange + '" alt="' + cancelChange + '">' + cancel +'</a>' + " " +  
 							'</div>' + 
+							'<a class="c-show-scope c-show-iscope c-action" title="'+ showScope + '" alt="' + showScope + '"><em>-</em></a>' +
 							'<a class="c-close c-iclose c-action" title="'+ close + '" alt="' + close + '"><em>X</em></a>' +
 						'</div>',
 		bodyContent :	'<div class="icomment-body">' +
@@ -212,6 +214,8 @@
 		this.overlay.get('boundingBox').addClass('c-focus-comment') ;
 		this.overlay.get('contentBox').query(".c-close").addClass('c-iclose-focus') ;
 		this.overlay.get('contentBox').query(".c-close").removeClass('c-iclose') ;
+		this.overlay.get('contentBox').query(".c-show-scope").addClass('c-show-iscope-focus') ;
+		this.overlay.get('contentBox').query(".c-show-scope").removeClass('c-show-iscope') ;
 		
 	},
 	
@@ -221,6 +225,8 @@
 		this.overlay.get('boundingBox').removeClass('c-focus-comment') ;
 		this.overlay.get('contentBox').query(".c-close").addClass('c-iclose') ;
 		this.overlay.get('contentBox').query(".c-close").removeClass('c-iclose-focus') ;
+		this.overlay.get('contentBox').query(".c-show-scope").addClass('c-show-iscope') ;
+		this.overlay.get('contentBox').query(".c-show-scope").removeClass('c-show-iscope-focus') ;
 		
 	},
 	hide:function() {
--- a/src/cm/media/js/site/c_text_view_comments.js	Wed Nov 25 09:34:10 2009 +0100
+++ b/src/cm/media/js/site/c_text_view_comments.js	Wed Nov 25 18:19:17 2009 +0100
@@ -286,10 +286,10 @@
 					gSync.showSingleComment(topParentComment) ;
 				}
 			}
-			// else show all
-			else {
-				gSync.showAllComments() ;
-			}
+			
+//			else {
+//			gSync.showAllComments() ;// show all
+//			}
 		}
 	});
 	q1.run();