You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by br...@apache.org on 2008/11/29 19:57:35 UTC

svn commit: r721702 - in /incubator/jspwiki/trunk: ./ etc/i18n/templates/ src/com/ecyrd/jspwiki/ src/webdocs/scripts/ src/webdocs/templates/default/ src/webdocs/templates/default/skins/OrderedList/ src/webdocs/templates/default/skins/PlainVanilla 1024x...

Author: brushed
Date: Sat Nov 29 10:57:35 2008
New Revision: 721702

URL: http://svn.apache.org/viewvc?rev=721702&view=rev
Log:
v3.0.0-svn-14: 
        * [JSPWIKI-288] CSS fix for the rendering of hash-links.
        * [JSPWIKI-318] You can now show/hide the left-menu, with a click of the mouse. 
        * [JSPWIKI-429] The Slimbox icon has been changed to a magnifying glass.

Modified:
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/etc/i18n/templates/default.properties
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java
    incubator/jspwiki/trunk/src/webdocs/scripts/jspwiki-common.js
    incubator/jspwiki/trunk/src/webdocs/templates/default/ProfileTab.jsp
    incubator/jspwiki/trunk/src/webdocs/templates/default/jspwiki.css
    incubator/jspwiki/trunk/src/webdocs/templates/default/skins/OrderedList/skin.css
    incubator/jspwiki/trunk/src/webdocs/templates/default/skins/PlainVanilla 1024x768/skin.css

Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=721702&r1=721701&r2=721702&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Sat Nov 29 10:57:35 2008
@@ -1,3 +1,22 @@
+2008-11-29  Dirk Frederickx <di...@gmail.com>
+
+        * 3.0.0-svn-14 
+        
+        * [JSPWIKI-288] CSS fix for the rendering of hash-links.
+        
+        * [JSPWIKI-318] You can now show/hide the left-menu, with a click
+          of the mouse. The status of the left-menu is saved in the 
+          user-pref cookie.
+          
+          New localization resources:
+          javascript.favorites.hide=Click to hide the Favorites
+          javascript.favorites.show=Chick to show the Favorites
+          
+          * [JSPWIKI-429] The Slimbox icon has been changed to a magnifying 
+          glass. If you don't know what this is, check out the attachement
+          tab. Clicking the slimbox icon provides you with a sneak preview 
+          of images like png, gif, jpg.
+
 2008-11-29 Harry Metske <me...@apache.org>
 
         * 3.0.0-svn-13

Modified: incubator/jspwiki/trunk/etc/i18n/templates/default.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/etc/i18n/templates/default.properties?rev=721702&r1=721701&r2=721702&view=diff
==============================================================================
--- incubator/jspwiki/trunk/etc/i18n/templates/default.properties (original)
+++ incubator/jspwiki/trunk/etc/i18n/templates/default.properties Sat Nov 29 10:57:35 2008
@@ -623,8 +623,8 @@
 javascript.edit.areyousure=Without clicking the Save button, your changes will be lost. \
     Are you sure you want to exit this page?
 
-javascript.favs.show=Click to show Favorites
-javascript.favs.hide=Click to hide Favorites
+javascript.favorites.show=Click to show the Favorites
+javascript.favorites.hide=Click to hide the Favorites
 
 javascript.quick.edit=[Edit]
 javascript.quick.edit.title=Edit section {0}...

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java?rev=721702&r1=721701&r2=721702&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java Sat Nov 29 10:57:35 2008
@@ -77,7 +77,7 @@
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "13";
+    public static final String     BUILD         = "14";
     
     /**
      *  This is the generic version string you should use

Modified: incubator/jspwiki/trunk/src/webdocs/scripts/jspwiki-common.js
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/scripts/jspwiki-common.js?rev=721702&r1=721701&r2=721702&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/scripts/jspwiki-common.js (original)
+++ incubator/jspwiki/trunk/src/webdocs/scripts/jspwiki-common.js Sat Nov 29 10:57:35 2008
@@ -250,9 +250,16 @@
 		this.makeMenuFx('morebutton', 'morepopup');
 		this.addEditLinks();
 
-		var p = $('page'); if(p) this.renderPage(p, Wiki.PageName);
-		var f = $('favorites'); if(f) this.renderPage(f, "Favorites");
+		var p = $('page'),
+			f = $('favorites'); 
+		
+		if(p) this.renderPage(p, Wiki.PageName);
+		if(f) this.renderPage(f, "Favorites");
+		
+		this.addCollapsableFavs();
 	},
+
+
 	/* show popup alert, which allows any html msg to be displayed */
 	alert: function(msg){
 		return alert(msg); //standard js
@@ -307,7 +314,6 @@
 		$('wikibody')
 			.removeClass('fav-left').removeClass('fav-right')
 			.addClass(fav);
-		//$('collapseFavs').fireEvent('click').fireEvent('click'); //refresh sliding favorites
 	},
 
 	/* make hover menu with fade effect */
@@ -354,6 +360,8 @@
 				TabbedSection.click.apply($('menu-'+el.id));
 			} else if( el.hasClass('tab') ){
 				/* accordion -- need to find accordion toggle object */
+				el.fireEvent('onShow');
+				
 			} else if( el.hasClass('collapsebody') ){
 				/* collapsible box -- need to find the toggle button */
 			} else if(!el.visible() ){
@@ -389,20 +397,51 @@
 		return Wiki.submitOnce(form);
 	},
 
+	addCollapsableFavs: function(){
+
+		var body = $('wikibody'),
+			$pref = 'fav-slide',
+			pref = Wiki.prefs.get('ToggleFav'),
+			renderBullet = function(el){
+				if(el.hasClass('collapseOpen')){
+					el.setProperty('title','favorites.show'.localize()).setHTML('-'); /* &raquo; */
+				} else {
+					el.setProperty('title','favorites.hide'.localize()).setHTML('+'); /* &laquo; */
+				}
+			};
+		
+		//FIXME: cookie is not loaded into server Preferences automatically, so body class not yet set
+		//Should better move server side, for faster rendering. wf-stripes
+		(pref==$pref) ? body.addClass($pref) : body.removeClass($pref);		
+		
+		renderBullet( new Element('a', { 
+			'id':'favoriteToggle',
+			'class': (pref==$pref) ? 'collapseOpen':'collapseClose',
+			'events': {
+				'click': function(){
+					this.toggleClass('collapseOpen').toggleClass('collapseClose');
+					body.toggleClass($pref);
+					renderBullet(this);
+					Wiki.prefs.set('ToggleFav', body.hasClass($pref) ? $pref:'' );
+
+				}
+			}
+		}).injectTop('page') );
+ 
+	},
+
 	addEditLinks: function(){
 		if( $("previewcontent") || !this.PermissionEdit || this.prefs.get('SectionEditing') != 'on') return;
 
 		var url = this.EditUrl;
 		url = url + (url.contains('?') ? '&' : '?') + 'section=';
 
-		var aa = new Element('a').setHTML('quick.edit'.localize()), 
-			ee = new Element('span',{'class':'editsection'}).adopt(aa),
+		var aa = new Element('a',{'class':'editsection'}).setHTML('quick.edit'.localize()), 
 			i = 0;
 
 		$$('#pagecontent *[id^=section]').each(function(el){
 			if(el.id=='section-TOC') return;
-			aa.set({'href':url + i++ });
-			el.adopt(ee.clone());
+			el.adopt(aa.set({'href':url + i++ }).clone());
 		});
 	},
 
@@ -452,7 +491,7 @@
 					'href':href, 
 					'rel':group+' '+rel,
 					'title':el.alt||el.getText()
-				}).injectBefore(el);
+				}).injectAfter(el);//.injectBefore(el);
 
 				if(el.src) el.replaceWith(new Element('a',{
 					'class':'attachment',

Modified: incubator/jspwiki/trunk/src/webdocs/templates/default/ProfileTab.jsp
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/templates/default/ProfileTab.jsp?rev=721702&r1=721701&r2=721702&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/templates/default/ProfileTab.jsp (original)
+++ incubator/jspwiki/trunk/src/webdocs/templates/default/ProfileTab.jsp Sat Nov 29 10:57:35 2008
@@ -85,7 +85,7 @@
        <td>
          <input type="text" name="fullname" id="fullname"
                 size="20" value="<wiki:UserProfile property='fullname'/>" />
-         <span class="formhelp"><fmt:message key="prefs.fullname.description"/></span>
+         <div class="formhelp"><fmt:message key="prefs.fullname.description"/></div>
        </td>
      </tr>
 
@@ -95,7 +95,7 @@
        <td>
          <input type="text" name="email" id="email"
                 size="20" value="<wiki:UserProfile property='email' />" />
-         <span class="formhelp"><fmt:message key="prefs.email.description"/></span>
+         <div class="formhelp"><fmt:message key="prefs.email.description"/></div>
        </td>
      </tr>
 

Modified: incubator/jspwiki/trunk/src/webdocs/templates/default/jspwiki.css
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/templates/default/jspwiki.css?rev=721702&r1=721701&r2=721702&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/templates/default/jspwiki.css (original)
+++ incubator/jspwiki/trunk/src/webdocs/templates/default/jspwiki.css Sat Nov 29 10:57:35 2008
@@ -179,25 +179,29 @@
 	line-height:1.2;
 }
 h2 { font-size: 150%; }
-h2 .editsection, h2 .hashlink { font-size: 67%; padding-left:1em;}
+h2 .editsection, h2 .hashlink { font-size: 67%; }
 h3 { font-size: 132%; }
-h3 .editsection, h3 .hashlink { font-size: 76%; padding-left:1em;}
+h3 .editsection, h3 .hashlink { font-size: 76%; }
 h4 { font-size: 116%; }
-h4 .editsection, h4 .hashlink { font-size: 86%; padding-left:1em;}
-.editsection {
+h4 .editsection, h4 .hashlink { font-size: 86%; }
+a.editsection, a.hashlink {	
 	font-weight:normal;
 	line-height:1.2;
-}
-.editsection a {
 	padding:0.25em;
 	text-decoration:none;
-	color:grey; /*transparent*/
-	/*background:url('images/pencil.png') no-repeat center;*/
+	color:grey; 
 }
-.editsection a:hover {
+a.editsection:hover, a.hashlink:hover {
 	background-color:#eee;
-	color:blue;
+	color:blue !important;
+}
+h2:hover a.hashlink, h3:hover a.hashlink, h4:hover a.hashlink {
+	color: #ccc;
+}
+a.hashlink {
+	color:white; /* tranparent nok in ie -- use background color */
 }
+
 b, i {
 	color:inherit;
 }
@@ -348,17 +352,7 @@
 a.infolink img {
 	display:none;
 }*/
-/* hashlink */
-a.hashlink {
-	color:transparent;
-	line-height:1.2;
-	padding:0.25em;
-	text-decoration:none;
-}
-a.hashlink:hover {
-	background-color:#eee;
-	color:blue;
-}
+
 /* +++ 260 Image styles +++ */
 img {
 	border:none;
@@ -818,6 +812,44 @@
 
 
 /* +++ 440 Favorites +++ */
+#favoriteToggle {
+	float:left;
+	margin-bottom:-1px;
+	padding:0.25em 0.5em;
+	font:inherit;
+	font-weight:bold;
+	height:auto; /* undo collapseOpen font settings */
+	overflow:hidden;
+	width:16px;
+	text-indent:2em;
+}
+#favoriteToggle.collapseOpen {
+	background:url(images/favopen.gif) no-repeat center;
+}
+#favoriteToggle.collapseClose {
+	background:url(images/favclose.gif) no-repeat center;
+}
+/*
+#favoriteToggle.collapseOpen {
+	background:url(images/layout_none.gif) no-repeat center;
+}
+#wikibody.fav-right #favoriteToggle.collapseClose {
+	background:url(images/layout_right.gif) no-repeat center;
+}
+#wikibody.fav-left #favoriteToggle.collapseClose {
+	background:url(images/layout_left.gif) no-repeat center;
+}
+#wikibody.fav-left #favoriteToggle.collapseOpen:hover {
+	background:#eee url(images/layout_left.gif) no-repeat center;
+}
+#wikibody.fav-right #favoriteToggle.collapseOpen:hover {
+	background:#eee url(images/layout_right.gif) no-repeat center;
+}
+#favoriteToggle.collapseClose:hover {
+	background:#eee url(images/layout_none.gif) no-repeat center !important;
+}
+*/
+
 /* fixme
 #collapseFavs {
 	position:absolute; 
@@ -1710,14 +1742,16 @@
 a.slimbox {
 	font-weight:bold;
 	font-size:1.3em;
-	padding:0 0.2em;
+	padding:0 0.25em;
+	color:transparent;
+	background: url(images/slimbox.gif) no-repeat center;
 }
 a.slimbox:visited, a.slimbox:active, a.slimbox:link {
 	text-decoration:none;
 	border:none;
 }
 a.slimbox:hover {
-	background:#eee;
+	background-color:#eee;
 }
 
 #lbOverlay {

Modified: incubator/jspwiki/trunk/src/webdocs/templates/default/skins/OrderedList/skin.css
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/templates/default/skins/OrderedList/skin.css?rev=721702&r1=721701&r2=721702&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/templates/default/skins/OrderedList/skin.css (original)
+++ incubator/jspwiki/trunk/src/webdocs/templates/default/skins/OrderedList/skin.css Sat Nov 29 10:57:35 2008
@@ -217,6 +217,12 @@
 }
 
 /* +++ 440 Favorites +++ */
+#favoriteToggle {
+	padding:0.25em 0.25em 0.25em 0.75em;
+}
+#favoriteToggle:hover {
+	background-color:transparent;
+}
 .userbox {
 	background:#3f464a;
 	padding:0;

Modified: incubator/jspwiki/trunk/src/webdocs/templates/default/skins/PlainVanilla 1024x768/skin.css
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/webdocs/templates/default/skins/PlainVanilla%201024x768/skin.css?rev=721702&r1=721701&r2=721702&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/webdocs/templates/default/skins/PlainVanilla 1024x768/skin.css (original)
+++ incubator/jspwiki/trunk/src/webdocs/templates/default/skins/PlainVanilla 1024x768/skin.css Sat Nov 29 10:57:35 2008
@@ -35,7 +35,7 @@
 #wikibody.fav-slide #page {
 	width:960px;
 }
-
+/*
 #header .userbox {
 	display:none;
 }
@@ -43,6 +43,7 @@
 	display:block;
 	border:2px solid #ddd;
 }
+*/
 #pagecontent {
 	width:100%;
 }