r244 - in trunk: . bow-ui bow-ui/src/main/java/org/chorem/bow/action bow-ui/src/main/resources bow-ui/src/main/resources/i18n bow-ui/src/main/webapp/css bow-ui/src/main/webapp/jsp
Author: bpoussin Date: 2011-04-19 19:34:39 +0200 (Tue, 19 Apr 2011) New Revision: 244 Url: http://chorem.org/repositories/revision/bow/244 Log: Evolution #217: Administrate all tags - replace all tab with space in css - use css to add background in preference and login page (before image is used) - use Wikitty 3.1 snapshot with new indexation multivalued field and without -impl module suffix Modified: trunk/bow-ui/pom.xml trunk/bow-ui/src/main/java/org/chorem/bow/action/BowBaseAction.java trunk/bow-ui/src/main/java/org/chorem/bow/action/PreferencesAction.java trunk/bow-ui/src/main/resources/i18n/bow-ui_en_GB.properties trunk/bow-ui/src/main/resources/i18n/bow-ui_fr_FR.properties trunk/bow-ui/src/main/resources/struts.xml trunk/bow-ui/src/main/webapp/css/bookmark.css trunk/bow-ui/src/main/webapp/css/connexion.css trunk/bow-ui/src/main/webapp/css/global.css trunk/bow-ui/src/main/webapp/jsp/admin.jsp trunk/bow-ui/src/main/webapp/jsp/forgotPassword.jsp trunk/bow-ui/src/main/webapp/jsp/login.jsp trunk/bow-ui/src/main/webapp/jsp/preferences.jsp trunk/bow-ui/src/main/webapp/jsp/register.jsp trunk/pom.xml Modified: trunk/bow-ui/pom.xml =================================================================== --- trunk/bow-ui/pom.xml 2011-04-19 06:36:50 UTC (rev 243) +++ trunk/bow-ui/pom.xml 2011-04-19 17:34:39 UTC (rev 244) @@ -110,13 +110,13 @@ <dependency> <groupId>org.nuiton.wikitty</groupId> - <artifactId>wikitty-jdbc-impl</artifactId> + <artifactId>wikitty-jdbc</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>org.nuiton.wikitty</groupId> - <artifactId>wikitty-solr-impl</artifactId> + <artifactId>wikitty-solr</artifactId> <scope>runtime</scope> </dependency> Modified: trunk/bow-ui/src/main/java/org/chorem/bow/action/BowBaseAction.java =================================================================== --- trunk/bow-ui/src/main/java/org/chorem/bow/action/BowBaseAction.java 2011-04-19 06:36:50 UTC (rev 243) +++ trunk/bow-ui/src/main/java/org/chorem/bow/action/BowBaseAction.java 2011-04-19 17:34:39 UTC (rev 244) @@ -46,6 +46,8 @@ protected static final Log log = LogFactory.getLog(BowBaseAction.class); + final static protected String CONTEXT_ACTION_KEY = "action"; + public static final String UNTRANSLATED_MARKER = "???"; protected Map<String, Object> session; Modified: trunk/bow-ui/src/main/java/org/chorem/bow/action/PreferencesAction.java =================================================================== --- trunk/bow-ui/src/main/java/org/chorem/bow/action/PreferencesAction.java 2011-04-19 06:36:50 UTC (rev 243) +++ trunk/bow-ui/src/main/java/org/chorem/bow/action/PreferencesAction.java 2011-04-19 17:34:39 UTC (rev 244) @@ -23,17 +23,33 @@ */ package org.chorem.bow.action; -import java.util.Date; +import org.chorem.bow.BookmarkUtils; +import org.chorem.bow.BowBookmark; +import org.chorem.bow.BowInit; +import org.chorem.bow.BowPreference; +import org.chorem.bow.BowProxy; +import org.chorem.bow.BowUser; +import com.opensymphony.xwork2.ActionContext; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; +import java.util.TreeSet; import javax.servlet.http.HttpServletRequest; +import org.apache.commons.lang.StringUtils; import org.apache.struts2.interceptor.ServletRequestAware; -import org.chorem.bow.*; import org.nuiton.util.StringUtil; +import org.nuiton.wikitty.WikittyProxy; +import org.nuiton.wikitty.entities.Wikitty; +import org.nuiton.wikitty.entities.WikittyLabel; import org.nuiton.wikitty.search.Criteria; import org.nuiton.wikitty.search.FacetTopic; +import org.nuiton.wikitty.search.FacetTopicNameComparator; +import org.nuiton.wikitty.search.PagedResult; import org.nuiton.wikitty.search.Search; import static org.nuiton.i18n.I18n.n_; @@ -45,6 +61,10 @@ */ public class PreferencesAction extends BowBaseAction implements ServletRequestAware { private static final long serialVersionUID = -58341106356599721L; + + static public PreferencesAction getAction() { + return (PreferencesAction)ActionContext.getContext().get(CONTEXT_ACTION_KEY); + } protected String colors; protected String tagsNb; protected String bookmarksHomePage; @@ -58,7 +78,36 @@ protected Map<String, Integer> bookmarksImportDate; protected HttpServletRequest request; + protected Set<FacetTopic> labels; + protected String[] selectedLabels; + protected String rename; + protected String delete; + protected String newLabel; + + public String getNewLabel() { + return newLabel; + } + + public void setNewLabel(String newLabel) { + this.newLabel = newLabel; + } + public void setRename(String rename) { + this.rename = rename; + } + + public String getRename() { + return rename; + } + + public void setDelete(String delete) { + this.delete = delete; + } + + public String getDelete() { + return delete; + } + /** * @return the colors */ @@ -213,6 +262,18 @@ this.bookmarksImportDate = bookmarksImportDate; } + public Set<FacetTopic> getLabels() { + return labels; + } + + public String[] getSelectedLabels() { + return selectedLabels; + } + + public void setSelectedLabels(String[] selectedLabels) { + this.selectedLabels = selectedLabels; + } + @Override public void setServletRequest(HttpServletRequest request) { this.request = request; @@ -253,6 +314,79 @@ } /** + * Charge dans la variable labels tous les labels de l'utilisateur + * @param proxy + */ + protected void loadLabels(WikittyProxy proxy) { + BowUser user = getBowSession().getUser(); + String userId = user.getWikittyId(); + + Criteria c = Search.query() + .exteq(BowBookmark.EXT_WIKITTYLABEL) + .eq(BowBookmark.FQ_FIELD_BOWBOOKMARK_BOWUSER, userId) + .criteria().setEndIndex(0) + .addFacetField(BowBookmark.FQ_FIELD_WIKITTYLABEL_LABELS); + PagedResult<Wikitty> result = proxy.findAllByCriteria(c); + List<FacetTopic> topics = result.getTopic( + BowBookmark.FQ_FIELD_WIKITTYLABEL_LABELS); + labels = new TreeSet<FacetTopic>(new FacetTopicNameComparator(true)); + labels.addAll(topics); + } + + /** + * Fait les modification demandé par l'utilisateur dans l'interface de + * preference: renome ou supprime des labels. Si l'utilisateur demande le + * remplacement de label on indiquant pas de nouveau label, alors la chaine + * vide est utilisee. + * + * @return + */ + public String adminlabels() { + String result = SUCCESS; + try { + if (log.isDebugEnabled()) { + log.debug("Selected labels: " + Arrays.toString(selectedLabels)); + log.debug("action delete: " + delete + " rename: " + rename); + } + + List<String> selectedLabelsList = Arrays.asList(selectedLabels); + boolean isRename = !StringUtils.isEmpty(rename); + + BowProxy proxy = getBowProxy(); + BowUser user = getBowSession().getUser(); + String userId = user.getWikittyId(); + + Criteria c = Search.query() + .in(BowBookmark.FQ_FIELD_WIKITTYLABEL_LABELS, selectedLabelsList) + .eq(BowBookmark.FQ_FIELD_BOWBOOKMARK_BOWUSER, userId) + .criteria(); + PagedResult<WikittyLabel> searchResult = + proxy.findAllByCriteria(WikittyLabel.class, c); + + List<WikittyLabel> toStore = new ArrayList<WikittyLabel>(); + for (WikittyLabel label : searchResult) { + toStore.add(label); + Set<String> l = label.getLabels(); + if (l != null) { + // on fait une copie, car l retourne est non modifiable + l = new HashSet<String>(l); + l.removeAll(selectedLabelsList); + if (isRename) { + l.add(newLabel); + } + label.setLabels(l); + } + } + proxy.store(toStore); + } catch (Exception eee) { + addActionError(getText(n_("bow.error.internal"))); + log.error(eee.getMessage(), eee); + } + return result; + + } + + /** * Changes the user preferences */ public String execute() { @@ -263,6 +397,7 @@ // BowPreference extends BowUser, donc on l'utilise pour tout BowPreference preference = getBowSession().getPreference(); + loadLabels(proxy); Map<String,Integer> bookmarksByImportDate = BookmarkUtils.getBookmarksByImportDate(request, preference); if (log.isDebugEnabled()) { @@ -302,7 +437,7 @@ setTagsNb(String.valueOf(preference.getTags())); setBookmarksHomePage(String.valueOf(preference.getBookmarks())); setSearchEngineUrlSuggestions(preference.getSearchEngineUrlSuggestions()); - setSearchEngineUrlResults(preference.getSearchEngineUrlResults()); + setSearchEngineUrlResults(preference.getSearchEngineUrlResults()); } // retrieve last reference preference = getBowSession().getPreference(); Modified: trunk/bow-ui/src/main/resources/i18n/bow-ui_en_GB.properties =================================================================== --- trunk/bow-ui/src/main/resources/i18n/bow-ui_en_GB.properties 2011-04-19 06:36:50 UTC (rev 243) +++ trunk/bow-ui/src/main/resources/i18n/bow-ui_en_GB.properties 2011-04-19 17:34:39 UTC (rev 244) @@ -67,6 +67,10 @@ bow.preferences.import.submit=Import bow.preferences.importExport=Import / Export bow.preferences.importedBookmarks=Imported bookmarks +bow.preferences.labels=Labels administration +bow.preferences.labels.delete.submit=Delete +bow.preferences.labels.name.field=new name +bow.preferences.labels.rename.submit=Rename bow.preferences.newPassword=New password bow.preferences.noImportedBookmarks=No imported bookmarks bow.preferences.regenPermToken=Regenerate permanent token Modified: trunk/bow-ui/src/main/resources/i18n/bow-ui_fr_FR.properties =================================================================== --- trunk/bow-ui/src/main/resources/i18n/bow-ui_fr_FR.properties 2011-04-19 06:36:50 UTC (rev 243) +++ trunk/bow-ui/src/main/resources/i18n/bow-ui_fr_FR.properties 2011-04-19 17:34:39 UTC (rev 244) @@ -8,7 +8,6 @@ bow.admin.home=Retour sur la page d''accueil bow.admin.panel=Panneau d''administration bow.admin.reIndexationDone=Les donn\u00E9es ont bien \u00E9t\u00E9 r\u00E9index\u00E9es -bow.alias.alread.exists= bow.alias.already.exists=L''alias {0} existe d\u00E9j\u00E0 bow.alias.bookmarkId.unknown=Il n''y a pas de marque-page correspondant \u00E0 l''identifiant {0} bow.bookmark.add.successful=Marque-page ajout\u00E9 avec succ\u00E8s @@ -67,6 +66,10 @@ bow.preferences.import.submit=Importer bow.preferences.importExport=Import / Export bow.preferences.importedBookmarks=Marque-pages import\u00E9s +bow.preferences.labels=Gestion des labels +bow.preferences.labels.delete.submit=Supprimer +bow.preferences.labels.name.field=Nouveau nom +bow.preferences.labels.rename.submit=Renomer bow.preferences.newPassword=Nouveau mot de passe bow.preferences.noImportedBookmarks=Aucun marque-page import\u00E9 bow.preferences.regenPermToken=Reg\u00E9n\u00E9rer le token permanent Modified: trunk/bow-ui/src/main/resources/struts.xml =================================================================== --- trunk/bow-ui/src/main/resources/struts.xml 2011-04-19 06:36:50 UTC (rev 243) +++ trunk/bow-ui/src/main/resources/struts.xml 2011-04-19 17:34:39 UTC (rev 244) @@ -241,6 +241,11 @@ <action name="*Xml"> <result>/jsp/{1}Xml.jsp</result> </action> + + <action name="adminlabels" class="org.chorem.bow.action.PreferencesAction" method="adminlabels"> + <result type="redirectAction">preferences</result> + </action> + <action name="preferences" class="org.chorem.bow.action.PreferencesAction"> <interceptor-ref name="store"> <param name="operationMode">STORE</param> Modified: trunk/bow-ui/src/main/webapp/css/bookmark.css =================================================================== --- trunk/bow-ui/src/main/webapp/css/bookmark.css 2011-04-19 06:36:50 UTC (rev 243) +++ trunk/bow-ui/src/main/webapp/css/bookmark.css 2011-04-19 17:34:39 UTC (rev 244) @@ -21,60 +21,60 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * #L% - */ +*/ #page{ - background-color:#9EDCF8; - float:left; - left:77%; - position:relative; - width:100%; - margin-bottom:50px; + background-color:#9EDCF8; + float:left; + left:77%; + position:relative; + width:100%; + margin-bottom:50px; } #header{ - background:#fff url('../img/fondhead.jpg') repeat-x 0 0; - float:left; - position:absolute; - right:85%; - top:0; - height:100px; - width:100%; + background:#fff url('../img/fondhead.jpg') repeat-x 0 0; + float:left; + position:absolute; + right:85%; + top:0; + height:100px; + width:100%; } #header a.logo{ - background:transparent url('../img/logobow.jpg') repeat scroll 0 0; - display:block; - height:100px; - text-indent:-99999px; - width:290px; - float:left; - left:8%; - position:relative; + background:transparent url('../img/logobow.jpg') repeat scroll 0 0; + display:block; + height:100px; + text-indent:-99999px; + width:290px; + float:left; + left:8%; + position:relative; } #main{ - margin-top:120px; - float:left; + margin-top:120px; + float:left; position:relative; - right:69%; - width:59%; - clear:both; + right:69%; + width:59%; + clear:both; } .content{ width:100%; float:left; - background-color:#fff; - margin-bottom: 25px; + background-color:#fff; + margin-bottom: 25px; } #side { - clear:right; - float:right; - position:relative; - right:73%; - width:27%; + clear:right; + float:right; + position:relative; + right:73%; + width:27%; } .bookmark{ @@ -84,18 +84,18 @@ } .bookmark .bookmarkhead{ - width:100%; - height:32px; - background-color:#bf8a9c; - border-bottom:2px solid #9EDCF8; - position:relative; - clear:both; + width:100%; + height:32px; + background-color:#bf8a9c; + border-bottom:2px solid #9EDCF8; + position:relative; + clear:both; } .bookmark .bookmarkcontenu{ - clear:both; - padding-top:5px; - padding-right: 152px; + clear:both; + padding-top:5px; + padding-right: 152px; } .bookmark .bookmarkhead .date{ @@ -107,42 +107,42 @@ .bookmark .bookmarkhead .edit{ background:url('../img/edit.jpg') no-repeat; - width:31px; - height:32px; - position:absolute; - top:0; - right:32px; + width:31px; + height:32px; + position:absolute; + top:0; + right:32px; } .bookmark .bookmarkhead .supprim{ background:url('../img/croix.jpg') no-repeat; - width:31px; - height:32px; - position:absolute; - top:0; - right:0; + width:31px; + height:32px; + position:absolute; + top:0; + right:0; } .bookmark .bookmarkhead a{ - color:#FFF; - font-weight:bold; - font-size:14px; - line-height:32px; - padding-left:40px; - background:url('../img/ptit_livre.jpg') no-repeat; - height:32px; - display:block; - text-decoration:none; - float:left; - margin-right:3%; - margin-left:3%; + color:#FFF; + font-weight:bold; + font-size:14px; + line-height:32px; + padding-left:40px; + background:url('../img/ptit_livre.jpg') no-repeat; + height:32px; + display:block; + text-decoration:none; + float:left; + margin-right:3%; + margin-left:3%; } .bookmark .bookmarkhead .alias{ float:left; margin-right:15px; display:block; -/* background:url('../img/ptit-livre.jpg') no-repeat; */ + /* background:url('../img/ptit-livre.jpg') no-repeat; */ } .bookmark .screenshot{ @@ -181,67 +181,67 @@ } .bookmark .click{ - background:transparent url('../img/click.jpg') no-repeat scroll 0 0; - float:right; - height:27px; - margin:10px -25px 5px 5px; - padding-top:31px; - position:relative; - right:-120px; - width:31px; - text-align:center; + background:transparent url('../img/click.jpg') no-repeat scroll 0 0; + float:right; + height:27px; + margin:10px -25px 5px 5px; + padding-top:31px; + position:relative; + right:-120px; + width:31px; + text-align:center; } .nobookmarks{ - font-size: large; - padding-left: 5px; + font-size: large; + padding-left: 5px; } #logoutDiv{ - float:right; - position:relative; - right:67%; - width:33%; - background:#BF8A9C url('../img/moyen-livre.jpg') no-repeat scroll 7% 44%; - height:100px; + float:right; + position:relative; + right:67%; + width:33%; + background:#BF8A9C url('../img/moyen-livre.jpg') no-repeat scroll 7% 44%; + height:100px; } #logoutDiv a.help{ - background:transparent url('../img/aide.jpg') no-repeat scroll 0 0; - display:block; - height:34px; - text-indent:-99999px; - width:34px; - margin-left:15%; - margin-top:12%; - float:left; + background:transparent url('../img/aide.jpg') no-repeat scroll 0 0; + display:block; + height:34px; + text-indent:-99999px; + width:34px; + margin-left:15%; + margin-top:12%; + float:left; } #logoutDiv form input{ - background:transparent url('../img/fondbouton.jpg') repeat-x scroll 0 0; - border:medium none; - color:#9C7186; - font-size:12px; - font-weight:bold; - height:27px; - line-height:27px; - display:block; - text-decoration:none; - text-align:center; - width:72px; - float:left; - margin-left:25%; - margin-top:6%; + background:transparent url('../img/fondbouton.jpg') repeat-x scroll 0 0; + border:medium none; + color:#9C7186; + font-size:12px; + font-weight:bold; + height:27px; + line-height:27px; + display:block; + text-decoration:none; + text-align:center; + width:72px; + float:left; + margin-left:25%; + margin-top:6%; } #side #colonneD{ - font-size:14px; - color:#9edcf8; + font-size:14px; + color:#9edcf8; } #colonneD{ - overflow-x:auto; - background-color:#804561; + overflow-x:auto; + background-color:#804561; } #colonneD a{ @@ -299,13 +299,13 @@ } #colonneD h2{ - color:#9edcf8; - font-size:140%; - font-weight:normal; + color:#9edcf8; + font-size:140%; + font-weight:normal; } #colonneD #add{ - height:auto; + height:auto; } #colonneD #add form{ @@ -320,65 +320,66 @@ height:22px; width:50%; border:none; - height:28px; - padding-left:4px; + height:28px; + padding-left:4px; } #colonneD #add form label{ - display:inline-block; - padding-right:9%; - text-align:right; - width:45px; + display:inline-block; + padding-right:9%; + text-align:right; + width:45px; } #colonneD form input[type="submit"]{ - background:transparent url('../img/fondbouton.jpg') repeat-x scroll 0 0; - border:medium none; - color:#9C7186; - display:block; - float:right; - font-size:12px; - font-weight:bold; - height:28px; - line-height:28px; - position:relative; - right:20%; - text-align:center; - text-decoration:none; - width:25%; + background:transparent url('../img/fondbouton.jpg') repeat-x scroll 0 0; + border:medium none; + color:#9C7186; + display:block; + float:right; + font-size:12px; + font-weight:bold; + height:28px; + line-height:28px; + position:relative; + right:20%; + text-align:center; + text-decoration:none; + width:25%; } #colonneD #nuage{ - padding-right:80px; + padding-right:80px; min-height:100px; text-align:justify; } .colonnebas img{ - width:86%; - height:auto; - display:block; - position:relative; + width:86%; + height:auto; + display:block; + position:relative; } #import .input input{ - width:90%; - margin-bottom:10px; + width:90%; + margin-bottom:10px; } + + .formFrame{ - width:400px; - height:315px; - background:url('../img/fondconnexion.jpg') no-repeat; + min-width:400px; + min-height: 315px; position:relative; margin-top:20px; - margin-bottom:20px; - margin-right:100px; - margin-left:100px; - padding-top:10px; - padding-bottom:10px; - padding-left:40px; - padding-right:70px; + margin-bottom:20px; + margin-right:100px; + margin-left:100px; + padding-top:10px; + padding-bottom:10px; + padding-left:40px; + padding-right:70px; } .formFrame h1{ @@ -401,7 +402,6 @@ } .formFrame input[type="submit"]{ - float:left; margin-top:20px; background:url('../img/fdboutonV.jpg') repeat-x; height:31px; @@ -414,7 +414,7 @@ } .formFrame p a{ - position:absolute; + position:absolute; color:#804561; left:75px; font-weight:bold; @@ -424,84 +424,84 @@ .formFrame #homePage, .formFrame #regenPermToken{ - bottom:50px; - left:185px; - font-size:10px; + bottom:50px; + left:185px; + font-size:10px; } .formFrame p input, td input{ - margin-bottom:2px; + margin-bottom:2px; } .deleteImport{ - width:100%; - height:32px; - border:1px solid black; - margin-bottom:4px; - padding-top:10px; - padding-left:15px; + width:100%; + height:32px; + border:1px solid black; + margin-bottom:4px; + padding-top:10px; + padding-left:15px; } .deleteImportPink{ - background-color:#BF8A9C; + background-color:#BF8A9C; } .deleteImportWhite{ - background-color:white; - margin-left:30px; + background-color:white; + margin-left:30px; } .deleteImport span{ - color:blue; - font-size:large; + color:blue; + font-size:large; } .deleteImport .deleteImportButton{ background:url('../img/croixtr.png') no-repeat; - width:31px; - height:32px; - float:right; - margin-right:15px; - position:relative; - top:-5px; + width:31px; + height:32px; + float:right; + margin-right:15px; + position:relative; + top:-5px; } #deleteSearchResultsButton{ - background:url('../img/croixtr.png') no-repeat; - width:31px; - height:32px; - float:right; - margin-left:25px; - margin-right:11px; + background:url('../img/croixtr.png') no-repeat; + width:31px; + height:32px; + float:right; + margin-left:25px; + margin-right:11px; } .input label{ - color:#9edcf8; - font-size:20px; - font-weight:normal; - font-style:normal; - float:left; - margin-bottom:20px; - width:100%; + color:#9edcf8; + font-size:20px; + font-weight:normal; + font-style:normal; + float:left; + margin-bottom:20px; + width:100%; } #bookmarkForm label{ - margin-top:12px; - font-style:normal; + margin-top:12px; + font-style:normal; } #add h2{ - margin-bottom:20px; + margin-bottom:20px; } #adminActions li{ - list-style-type:none; + list-style-type:none; padding-bottom:15px; } #adminActions li a{ - text-decoration:none; + text-decoration:none; color:#804561; font-size:11px; font-weight:bold; -} \ No newline at end of file +} Modified: trunk/bow-ui/src/main/webapp/css/connexion.css =================================================================== --- trunk/bow-ui/src/main/webapp/css/connexion.css 2011-04-19 06:36:50 UTC (rev 243) +++ trunk/bow-ui/src/main/webapp/css/connexion.css 2011-04-19 17:34:39 UTC (rev 244) @@ -24,7 +24,7 @@ */ #header{ - background:#FFFFFF url('../img/fondhead.jpg') repeat-x; + background:#FFFFFF url('../img/fondhead.jpg') repeat-x; width:100%; float:left; height:100px; @@ -34,13 +34,13 @@ } #header a.logo{ - background:transparent url('../img/logobow.jpg') repeat scroll 0 0; - display:block; - height:100px; - text-indent:-99999px; - width:290px; - float:left; - position:relative; + background:transparent url('../img/logobow.jpg') repeat scroll 0 0; + display:block; + height:100px; + text-indent:-99999px; + width:290px; + float:left; + position:relative; } #main{ @@ -51,7 +51,7 @@ } #main .menu{ - margin-top: 25px; + margin-top: 25px; } #page{ @@ -70,7 +70,7 @@ #formFrame{ width:225px; height:315px; - background:url('../img/fondconnexion.jpg') no-repeat; +/* background:url('../img/fondconnexion.jpg') no-repeat; */ position:relative; margin:100px auto; padding:10px 70px; @@ -96,7 +96,7 @@ } #formFrame a{ - position: absolute; + position: absolute; color:#804561; left:75px; font-weight:bold; @@ -114,9 +114,9 @@ } #formFrame #homePage{ - bottom: 50px; - left: 200px; - font-size: 10px; + bottom: 50px; + left: 200px; + font-size: 10px; } input[type="submit"]{ @@ -133,15 +133,15 @@ } #formFrame input[type="submit"]{ - position:absolute; - bottom:40px; - right:30px; + position:absolute; + bottom:40px; + right:30px; } #forgotPassword{ - margin-top:30px; + margin-top:30px; } #register{ - margin-top:20px; + margin-top:20px; } \ No newline at end of file Modified: trunk/bow-ui/src/main/webapp/css/global.css =================================================================== --- trunk/bow-ui/src/main/webapp/css/global.css 2011-04-19 06:36:50 UTC (rev 243) +++ trunk/bow-ui/src/main/webapp/css/global.css 2011-04-19 17:34:39 UTC (rev 244) @@ -8,7 +8,7 @@ * %% * Copyright (C) 2010 CodeLutin * %% - * This program is free software: you can redistribute it and/or modify +* This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. @@ -21,7 +21,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * #L% - */ +*/ *{ padding:0; @@ -47,51 +47,51 @@ } #wrap{ - clear:both; - float:left; - overflow-x:hidden; - overflow-y:visible; - position:relative; - width:100%; - background-color:#9EDCF8; + clear:both; + float:left; + overflow-x:hidden; + overflow-y:visible; + position:relative; + width:100%; + background-color:#9EDCF8; } #main .menu{ - width:90%; - height:35px; - background:#804561 url('../img/pointemenu.jpg') no-repeat right; - margin-bottom:15px; - padding:0 40px; - line-height:35px; - clear:both; + width:90%; + height:35px; + background:#804561 url('../img/pointemenu.jpg') no-repeat right; + margin-bottom:15px; + padding:0 40px; + line-height:35px; + clear:both; } #main div[class="menu clearfix"] h2{ - color:#9edcf8; - font-size:18px; - font-weight:normal; - float:left; + color:#9edcf8; + font-size:18px; + font-weight:normal; + float:left; } #main .menu form{ - float:right; - color:#9edcf8; - font-size:12px; + float:right; + color:#9edcf8; + font-size:12px; } #import .input input{ - width:90%; - margin-bottom:10px; + width:90%; + margin-bottom:10px; } .error{ - float:left; - color:red; - font-size:medium; - background-color:white; - overflow:auto; - margin-bottom:25px; - padding:4px; + float:left; + color:red; + font-size:medium; + background-color:white; + overflow:auto; + margin-bottom:25px; + padding:4px; } #footer{ @@ -100,7 +100,7 @@ } #footer a{ - color:#bf8a9c; + color:#bf8a9c; } #footer p{ @@ -131,4 +131,13 @@ #actionmessageHeader ul, #actionerrorHeader ul{ list-style-type:none; +} + +.fond { + -ms-filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#dbdbdb'); + background-image: -moz-linear-gradient(top, #fff, #dbdbdb); + background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#dbdbdb)); + + -webkit-border-radius: 0.5em; + -moz-border-radius: 0.5em; } \ No newline at end of file Modified: trunk/bow-ui/src/main/webapp/jsp/admin.jsp =================================================================== --- trunk/bow-ui/src/main/webapp/jsp/admin.jsp 2011-04-19 06:36:50 UTC (rev 243) +++ trunk/bow-ui/src/main/webapp/jsp/admin.jsp 2011-04-19 17:34:39 UTC (rev 244) @@ -37,7 +37,7 @@ <div class="menu clearfix"> <h2><s:text name="bow.admin.panel" /></h2> </div> - <div class="formFrame"> + <div class="formFrame fond"> <br /><br /> <s:if test="#session.BowSession.isAdmin()"> Modified: trunk/bow-ui/src/main/webapp/jsp/forgotPassword.jsp =================================================================== --- trunk/bow-ui/src/main/webapp/jsp/forgotPassword.jsp 2011-04-19 06:36:50 UTC (rev 243) +++ trunk/bow-ui/src/main/webapp/jsp/forgotPassword.jsp 2011-04-19 17:34:39 UTC (rev 244) @@ -35,7 +35,7 @@ </head> <body> <div id="content"> - <div id="formFrame"> + <div id="formFrame fond"> <h1><s:text name="bow.forgotpwd.title" /></h1> <s:form action="forgotPassword"> <p> Modified: trunk/bow-ui/src/main/webapp/jsp/login.jsp =================================================================== --- trunk/bow-ui/src/main/webapp/jsp/login.jsp 2011-04-19 06:36:50 UTC (rev 243) +++ trunk/bow-ui/src/main/webapp/jsp/login.jsp 2011-04-19 17:34:39 UTC (rev 244) @@ -34,7 +34,7 @@ </head> <body> <div id="content"> - <div id="formFrame"> + <div id="formFrame" class="fond"> <h1><s:text name="bow.login.title" /></h1> <s:actionerror /> <s:form action="login"> Modified: trunk/bow-ui/src/main/webapp/jsp/preferences.jsp =================================================================== --- trunk/bow-ui/src/main/webapp/jsp/preferences.jsp 2011-04-19 06:36:50 UTC (rev 243) +++ trunk/bow-ui/src/main/webapp/jsp/preferences.jsp 2011-04-19 17:34:39 UTC (rev 244) @@ -1,3 +1,5 @@ +<%@page import="org.nuiton.wikitty.search.FacetTopic"%> +<%@page import="org.chorem.bow.action.PreferencesAction"%> <!-- #%L bow @@ -24,6 +26,10 @@ <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <%@taglib prefix="s" uri="/struts-tags" %> +<% +PreferencesAction action = PreferencesAction.getAction(); +%> + <html xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" xmlns:jsp="http://java.sun.com/JSP/Page"> <head> @@ -39,7 +45,7 @@ </div> <s:actionerror/> <s:form action="preferences"> - <div class="formFrame"> + <div class="formFrame fond"> <h3><s:text name="bow.preferences.userInfo"/></h3> <p> @@ -74,7 +80,7 @@ <s:text name="bow.preferences.regenPermToken"/> </s:a> </div> - <div class="formFrame"> + <div class="formFrame fond"> <h3><s:text name="bow.preferences.siteLook"/></h3> <p> @@ -97,7 +103,31 @@ </div> </s:form> - <div class="formFrame"> + <div class="formFrame fond"> + <h3><s:text name="bow.preferences.labels"/></h3> + <s:form action="adminlabels" method="post"> + <ul> + <% for (FacetTopic topic : action.getLabels()) { %> + <div> + <%-- impossible de mettre un <s:checkbox, a priori erreur soit + disant que la tld ne permet pas d'expression :(. Comme + ca marche tres bien en HTML pure, vive le HTML :) --%> + <input type="checkbox" name="selectedLabels" + value="<%=topic.getTopicName()%>"> + <%=topic.getTopicName()%>(<%=topic.getCount()%>) + </input> + </div> + <% } %> + <div> + <s:textfield name="newLabel" key="bow.preferences.labels.name.field" /> + <s:submit name="rename" key="bow.preferences.labels.rename.submit" /> + <s:submit name="delete" key="bow.preferences.labels.delete.submit" /> + </div> + </ul> + </s:form> + </div> + + <div class="formFrame fond"> <s:a action="exportBookmarks"><s:text name="bow.preferences.export.bookmarks"/></s:a> <br/> Modified: trunk/bow-ui/src/main/webapp/jsp/register.jsp =================================================================== --- trunk/bow-ui/src/main/webapp/jsp/register.jsp 2011-04-19 06:36:50 UTC (rev 243) +++ trunk/bow-ui/src/main/webapp/jsp/register.jsp 2011-04-19 17:34:39 UTC (rev 244) @@ -29,25 +29,25 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <head> <title><s:text name="bow.register.title" /></title> - <s:url var="css" value="/css/connexion.css" /> + <s:url var="css" value="/css/connexion.css" /> <link href="${css}" rel="stylesheet" type="text/css" /> <s:head /> </head> <body> - <div id="content"> - <div id="formFrame"> - <h1><s:text name="bow.register.title" /></h1> - <s:form action="register"> - <s:actionerror /> - <p> - <s:textfield key="bow.login.email" name="email" labelposition="top" labelSeparator=" :" /> - <s:password key="bow.login.password" name="password" labelposition="top" labelSeparator=" :" /> - <s:password key="bow.login.repeatPassword" name="repeatPassword" labelposition="top" labelSeparator=" :" /> - <s:submit key="bow.register.submit" name="submit" /> - </p> - </s:form> - <s:a action="login_input" id="loginLink"><s:text name="bow.login.title" /></s:a> - </div> - </div> + <div id="content"> + <div id="formFrame" class="fond"> + <h1><s:text name="bow.register.title" /></h1> + <s:form action="register"> + <s:actionerror /> + <p> + <s:textfield key="bow.login.email" name="email" labelposition="top" labelSeparator=" :" /> + <s:password key="bow.login.password" name="password" labelposition="top" labelSeparator=" :" /> + <s:password key="bow.login.repeatPassword" name="repeatPassword" labelposition="top" labelSeparator=" :" /> + <s:submit key="bow.register.submit" name="submit" /> + </p> + </s:form> + <s:a action="login_input" id="loginLink"><s:text name="bow.login.title" /></s:a> + </div> + </div> </body> </html> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2011-04-19 06:36:50 UTC (rev 243) +++ trunk/pom.xml 2011-04-19 17:34:39 UTC (rev 244) @@ -52,7 +52,7 @@ <eugenePluginVersion>2.3.2</eugenePluginVersion> <nuitonUtilsVersion>2.1.1</nuitonUtilsVersion> <nuitonI18nVersion>2.3.1</nuitonI18nVersion> - <wikittyVersion>3.0.5</wikittyVersion> + <wikittyVersion>3.1-SNAPSHOT</wikittyVersion> <slf4jVersion>1.6.1</slf4jVersion> <struts2Version>2.1.8.1</struts2Version> <xWorkCoreVersion>2.1.6</xWorkCoreVersion> @@ -128,14 +128,14 @@ <dependency> <groupId>org.nuiton.wikitty</groupId> - <artifactId>wikitty-jdbc-impl</artifactId> + <artifactId>wikitty-jdbc</artifactId> <version>${wikittyVersion}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.nuiton.wikitty</groupId> - <artifactId>wikitty-solr-impl</artifactId> + <artifactId>wikitty-solr</artifactId> <version>${wikittyVersion}</version> </dependency>
participants (1)
-
bpoussin@users.chorem.org