r258 - in trunk/bow-ui/src/main: java/org/chorem/bow/action resources webapp/jsp/inc
Author: bpoussin Date: 2011-04-22 16:42:51 +0200 (Fri, 22 Apr 2011) New Revision: 258 Url: http://chorem.org/repositories/revision/bow/258 Log: suppression de l'action DeleteTag qui ne sert plus maintenant qu'on a une popup d'edition Removed: trunk/bow-ui/src/main/java/org/chorem/bow/action/DeleteTagAction.java Modified: trunk/bow-ui/src/main/resources/struts.xml trunk/bow-ui/src/main/webapp/jsp/inc/bookmark.jsp Deleted: trunk/bow-ui/src/main/java/org/chorem/bow/action/DeleteTagAction.java =================================================================== --- trunk/bow-ui/src/main/java/org/chorem/bow/action/DeleteTagAction.java 2011-04-22 12:59:26 UTC (rev 257) +++ trunk/bow-ui/src/main/java/org/chorem/bow/action/DeleteTagAction.java 2011-04-22 14:42:51 UTC (rev 258) @@ -1,129 +0,0 @@ -/* - * #%L - * bow - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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% - */ -package org.chorem.bow.action; - -import org.chorem.bow.BowBookmark; -import org.chorem.bow.BowUtils; -import org.nuiton.wikitty.WikittyProxy; - -import static org.nuiton.i18n.I18n.n_; - -/** - * Supprime un tag d'un bookmark - * - * @author poussin - */ -public class DeleteTagAction extends BowBaseAction { - private static final long serialVersionUID = -6174966873862161966L; - protected String bookmarkId; - protected String deleteTag; - protected String redirectTo; - protected String searchLine; - protected String fullTextLine; - - /** - * @return the bookmarkId - */ - public String getBookmarkId() { - return bookmarkId; - } - /** - * @param bookmarkId the bookmarkId to set - */ - public void setBookmarkId(String bookmarkId) { - this.bookmarkId = bookmarkId; - } - /** - * @return the deleteTag - */ - public String getDeleteTag() { - return deleteTag; - } - /** - * @param deleteTag the deleteTag to set - */ - public void setDeleteTag(String deleteTag) { - this.deleteTag = deleteTag; - } - - /** - * @return the searchLine - */ - public String getSearchLine() { - return searchLine; - } - - /** - * @param searchLine the searchLine to set - */ - public void setSearchLine(String searchLine) { - this.searchLine = searchLine; - } - - /** - * @return the fullTextLine - */ - public String getFullTextLine() { - return fullTextLine; - } - - /** - * @param fullTextLine the fullTextLine to set - */ - public void setFullTextLine(String fullTextLine) { - this.fullTextLine = fullTextLine; - } - - /** - * @return the redirectTo - */ - public String getRedirectTo() { - return redirectTo; - } - - /** - * Deletes a bookmark's tag - */ - public String execute() { - try { - if (deleteTag != null && bookmarkId != null) { - if (!bookmarkId.isEmpty()) { - WikittyProxy proxy = getBowProxy(); - BowBookmark bookmark = proxy.restore(BowBookmark.class, bookmarkId); - - if (bookmark != null) { - bookmark.removeLabels(deleteTag); - proxy.store(bookmark); - addActionMessage(getText(n_("bow.bookmark.tag.deleted"))); - } - } - } - redirectTo = BowUtils.redirectTo(searchLine, fullTextLine); - } catch (Exception e) { - addActionError(getText(n_("bow.error.internal"))); - log.error(e.getMessage(), e); - } - return SUCCESS; - } -} \ No newline at end of file Modified: trunk/bow-ui/src/main/resources/struts.xml =================================================================== --- trunk/bow-ui/src/main/resources/struts.xml 2011-04-22 12:59:26 UTC (rev 257) +++ trunk/bow-ui/src/main/resources/struts.xml 2011-04-22 14:42:51 UTC (rev 258) @@ -214,13 +214,6 @@ <interceptor-ref name="loginStack"/> <result type="redirectAction">preferences</result> </action> - <action name="deleteTag" class="org.chorem.bow.action.DeleteTagAction"> - <interceptor-ref name="store"> - <param name="operationMode">STORE</param> - </interceptor-ref> - <interceptor-ref name="loginStack"/> - <result type="redirect">${redirectTo}</result> - </action> <action name="redirectToUrl" class="org.chorem.bow.action.RedirectToUrlAction"> <interceptor-ref name="loginStack"/> <result name="error" type="redirectAction">home</result> Modified: trunk/bow-ui/src/main/webapp/jsp/inc/bookmark.jsp =================================================================== --- trunk/bow-ui/src/main/webapp/jsp/inc/bookmark.jsp 2011-04-22 12:59:26 UTC (rev 257) +++ trunk/bow-ui/src/main/webapp/jsp/inc/bookmark.jsp 2011-04-22 14:42:51 UTC (rev 258) @@ -137,22 +137,6 @@ <p class="tags"> <strong><s:text name="bow.bookmark.tags" /> :</strong> <s:iterator value="#request.bookmark.labels"> - <s:url var="deleteTag" action="deleteTag"> - <s:param name="bookmarkId"><s:property value="%{#wikittyId}" /></s:param> - <s:param name="deleteTag"><s:property /></s:param> - <s:param name="searchLine"><s:property value="%{#searchLine}" /></s:param> - <s:param name="fullTextLine"><s:property value="%{#fullTextLine}" /></s:param> - </s:url> - <s:if test="%{!(formBookmarkId == null || !formBookmarkId.equals(wikittyId))}"> - <s:a cssStyle="text-decoration:none;" href="%{deleteTag}"> - <img style="border:none;" src="img/delete.png" alt="Delete tag" title="Delete" /> - </s:a> - </s:if> - <s:else> - <s:a name="%{#wikittyId}" cssStyle="display:none; text-decoration:none;" href="%{#deleteTag}"> - <img style="border:none;" src="img/delete.png" alt="Delete tag" title="Delete" /> - </s:a> - </s:else> <s:url var="search" action="search"> <s:param name="searchLine"><s:property /></s:param> </s:url>
participants (1)
-
bpoussin@users.chorem.org