Changeset 17951
- Timestamp:
- 08/26/08 09:00:23 (3 months ago)
- Files:
-
- trunk/core/db/oracle/create-scripts/versions/8.5.0/prm_db_patch_8.5.0.sql (modified) (1 diff)
- trunk/core/db/oracle/create-scripts/versions/8.5.0/tables/alter_pn_wiki_history.sql (added)
- trunk/core/db/oracle/create-scripts/versions/8.5.0/tables/alter_pn_wiki_page.sql (added)
- trunk/core/db/oracle/create-scripts/versions/8.5.0/update_system_properties.sql (modified) (1 diff)
- trunk/core/src/net/project/hibernate/model/PnWikiHistory.hbm.xml (modified) (1 diff)
- trunk/core/src/net/project/hibernate/model/PnWikiHistory.java (modified) (2 diffs)
- trunk/core/src/net/project/hibernate/model/PnWikiPage.hbm.xml (modified) (1 diff)
- trunk/core/src/net/project/hibernate/model/PnWikiPage.java (modified) (2 diffs)
- trunk/core/src/net/project/hibernate/service/impl/WikiProviderImpl.java (modified) (1 diff)
- trunk/core/src/net/project/view/components/WikiMenu.java (modified) (7 diffs)
- trunk/core/src/net/project/view/pages/wiki/EditWikiPage.java (modified) (6 diffs)
- trunk/core/src/net/project/view/pages/wiki/Welcome.java (modified) (9 diffs)
- trunk/core/src/net/project/view/pages/wiki/WikiHistory.java (modified) (5 diffs)
- trunk/core/src/net/project/wiki/ExtWikiModel.java (modified) (4 diffs)
- trunk/core/web/css/wiki.css (modified) (1 diff)
- trunk/core/web/html/resource/management/components/WikiMenu.html (modified) (5 diffs)
- trunk/core/web/html/wiki/EditWikiPage.html (modified) (1 diff)
- trunk/core/web/html/wiki/Welcome.html (modified) (4 diffs)
- trunk/core/web/html/wiki/WikiHistory.html (modified) (2 diffs)
- trunk/core/web/images/popup.png (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/core/db/oracle/create-scripts/versions/8.5.0/prm_db_patch_8.5.0.sql
r17947 r17951 24 24 COMMIT; 25 25 26 PROMPT Altering PN_WIKI_PAGE table 27 @versions/8.5.0/tables/alter_pn_wiki_page.sql 28 COMMIT; 29 26 30 PROMPT Altering PN_PERSON_PROFILE table 27 31 @versions/8.5.0/tables/alter_pn_person_profile.sql 32 COMMIT; 33 34 PROMPT Altering PN_WIKI_HISTORY table 35 @versions/8.5.0/tables/alter_pn_wiki_history.sql 28 36 COMMIT; 29 37 trunk/core/db/oracle/create-scripts/versions/8.5.0/update_system_properties.sql
r17946 r17951 254 254 values (2000,'en','text','prm.wiki.edit.describe.label','Edit summary (describe the changes you have made):','','A',0,1); 255 255 256 insert into pn_property (CONTEXT_ID, LANGUAGE, PROPERTY_TYPE, PROPERTY, PROPERTY_VALUE, PROPERTY_VALUE_CLOB,RECORD_STATUS,IS_SYSTEM_PROPERTY,IS_TRANSLATABLE_PROPERTY) 257 values (2000,'en','text','prm.wiki.attach.image.describe.label','Select image to attach to this page:','','A',0,1); 258 259 insert into pn_property (CONTEXT_ID, LANGUAGE, PROPERTY_TYPE, PROPERTY, PROPERTY_VALUE, PROPERTY_VALUE_CLOB,RECORD_STATUS,IS_SYSTEM_PROPERTY,IS_TRANSLATABLE_PROPERTY) 260 values (2000,'en','text','prm.wiki.menu.pageLinks.label','What Links Here','','A',0,1); 261 262 insert into pn_property (CONTEXT_ID, LANGUAGE, PROPERTY_TYPE, PROPERTY, PROPERTY_VALUE, PROPERTY_VALUE_CLOB,RECORD_STATUS,IS_SYSTEM_PROPERTY,IS_TRANSLATABLE_PROPERTY) 263 values (2000,'en','text','prm.wiki.menu.changeHistory.label','Change History','','A',0,1); 264 265 insert into pn_property (CONTEXT_ID, LANGUAGE, PROPERTY_TYPE, PROPERTY, PROPERTY_VALUE, PROPERTY_VALUE_CLOB,RECORD_STATUS,IS_SYSTEM_PROPERTY,IS_TRANSLATABLE_PROPERTY) 266 values (2000,'en','text','prm.wiki.menu.pageIndex.label','Index By Title','','A',0,1); 267 268 insert into pn_property (CONTEXT_ID, LANGUAGE, PROPERTY_TYPE, PROPERTY, PROPERTY_VALUE, PROPERTY_VALUE_CLOB,RECORD_STATUS,IS_SYSTEM_PROPERTY,IS_TRANSLATABLE_PROPERTY) 269 values (2000,'en','text','prm.wiki.menu.recentChanges.label','Recent Changes','','A',0,1); 270 256 271 insert into PN_PROPERTY (CONTEXT_ID, LANGUAGE, PROPERTY_TYPE, PROPERTY, PROPERTY_VALUE, RECORD_STATUS, IS_SYSTEM_PROPERTY, IS_TRANSLATABLE_PROPERTY, PROPERTY_VALUE_CLOB) 257 272 values (2000, 'en', 'text', 'prm.personal.assignments.defaultpagesize.value', '50', 'A', 0, 1, null); trunk/core/src/net/project/hibernate/model/PnWikiHistory.hbm.xml
r17784 r17951 37 37 column="COMMENT_TEXT" 38 38 type="java.lang.String" 39 not-null=" true"39 not-null="false" 40 40 /> 41 41 trunk/core/src/net/project/hibernate/model/PnWikiHistory.java
r17565 r17951 49 49 * Constructor for required fields 50 50 */ 51 public PnWikiHistory(java.lang.Integer wikiHistoryId, java.lang.String content, java.lang.String commentText,51 public PnWikiHistory(java.lang.Integer wikiHistoryId, java.lang.String content, //FIX Uros: java.lang.String commentText, 52 52 net.project.hibernate.model.PnPerson editedBy, java.util.Date editDate, 53 53 net.project.hibernate.model.PnWikiPage wikiPageId) { … … 55 55 this.setWikiHistoryId(wikiHistoryId); 56 56 this.setContent(content); 57 this.setCommentText(commentText);57 // this.setCommentText(commentText); 58 58 this.setEditedBy(editedBy); 59 59 this.setEditDate(editDate); trunk/core/src/net/project/hibernate/model/PnWikiPage.hbm.xml
r17566 r17951 55 55 not-null="false" 56 56 /> 57 58 <property 59 name="commentText" 60 column="COMMENT_TEXT" 61 type="java.lang.String" 62 not-null="false" 63 /> 57 64 58 65 <!-- Associations --> trunk/core/src/net/project/hibernate/model/PnWikiPage.java
r17565 r17951 29 29 30 30 private java.lang.String recordStatus; 31 32 private String commentText; 31 33 32 34 // many to one … … 227 229 } 228 230 231 /** 232 * @return the commentText 233 */ 234 public String getCommentText() { 235 return commentText; 236 } 237 238 /** 239 * @param commentText the text for describing edits 240 */ 241 public void setCommentText(String commentText) { 242 this.commentText = commentText; 243 } 244 229 245 } trunk/core/src/net/project/hibernate/service/impl/WikiProviderImpl.java
r17914 r17951 229 229 //added for categories rendering 230 230 htmlFormat.append(wikiModel.parseCategories("") + "\n"); 231 htmlFormat.append(wikiModel.parseAttachedImages(parentPage, SessionManager.getUser()) + "\n"); 231 if ( !isPreview ) { //added not to show attachment list while on preview mode 232 htmlFormat.append(wikiModel.parseAttachedImages(parentPage, SessionManager.getUser()) + "\n"); 233 } 234 232 235 htmlFormat.append(wikiModel.render(wikiModel.getLinksFormated()) + "\n"); 233 236 trunk/core/src/net/project/view/components/WikiMenu.java
r17872 r17951 5 5 6 6 import net.project.base.Module; 7 import net.project.base.property.PropertyProvider; 7 8 import net.project.hibernate.model.PnProjectSpace; 8 9 import net.project.hibernate.model.PnProjectSpaceMetaProp; … … 96 97 private boolean welcomePage; 97 98 99 private boolean historyPage; 100 98 101 @Persist 99 102 private String currentPageName; 100 103 101 104 private boolean showUploadLink; 105 106 private String whatLinksHereLabel; 107 108 private String changeHistoryLabel; 109 110 private String indexByTitleLabel; 111 112 private String recentChangesLabel; 102 113 103 114 public WikiMenu() { … … 107 118 pnWikiPageService = ServiceFactory.getInstance().getPnWikiPageService(); 108 119 pnWikiAttachmentService = ServiceFactory.getInstance().getPnWikiAttachmentService(); 120 // menu item labels 121 whatLinksHereLabel = PropertyProvider.get("prm.wiki.menu.pageLinks.label"); 122 changeHistoryLabel = PropertyProvider.get("prm.wiki.menu.changeHistory.label"); 123 indexByTitleLabel = PropertyProvider.get("prm.wiki.menu.pageIndex.label"); 124 recentChangesLabel = PropertyProvider.get("prm.wiki.menu.recentChanges.label"); 109 125 } catch (Exception ex) { 110 126 log.error("Error occured while getting property values in WikiMenu page : " + ex.getMessage()); … … 122 138 123 139 if( menuType.toLowerCase().equals("welcome") ) { 124 setWelcomePage(true); 125 setFromHistory(welcome.getFromHistory()); 126 setEditLinkHref(welcome.getEditLinkHref()); 127 setExist(welcome.getExist()); 128 setHistoryLink(welcome.getHistoryLink()); 129 setParentPage(welcome.getParentPage()); 130 setProjectManager(welcome.getProjectManager()); 131 setProjectName(welcome.getWikiForProject()); 132 setShowParent(welcome.isShowParent()); 133 setParentPageLink(welcome.getParentPageLink()); 134 //setAttachLinkHref(welcome.); 135 setUploadLinkHref(welcome.getUploadLinkHref()); 136 setImageDetails(welcome.isImageDetails()); 137 setCurrentPageName(welcome.getRootPage()); 138 139 setShowUploadLink(true); 140 // start - added for not showing menu on previewing history revision of page 141 if( welcome.getFromHistory() ) { 142 setHistoryPage(true); 143 setWelcomePage(false); 144 setUploadPage(true); 145 setEditPage(false); 146 } else { 147 // end 148 setWelcomePage(true); 149 setFromHistory(welcome.getFromHistory()); 150 setEditLinkHref(welcome.getEditLinkHref()); 151 setExist(welcome.getExist()); 152 setHistoryLink(welcome.getHistoryLink()); 153 setParentPage(welcome.getParentPage()); 154 setProjectManager(welcome.getProjectManager()); 155 setProjectName(welcome.getWikiForProject()); 156 setShowParent(welcome.isShowParent()); 157 setParentPageLink(welcome.getParentPageLink()); 158 //setAttachLinkHref(welcome.); 159 setUploadLinkHref(welcome.getUploadLinkHref()); 160 setImageDetails(welcome.isImageDetails()); 161 setCurrentPageName(welcome.getRootPage()); 162 163 setShowUploadLink(true); 164 // start 165 } 166 // end 167 140 168 } else if ( menuType.toLowerCase().equals("edit") ) { 141 169 setEditPage(true); … … 148 176 setUploadPage(true); 149 177 setEditPage(false); 178 setHistoryPage(false); 150 179 setParentPage(wikiUpload.getParentPage()); 151 180 setParentPageLink(wikiUpload.getParentPageLink()); … … 154 183 setShowUploadLink(false); 155 184 } else if ( menuType.toLowerCase().equals("history") ) { 185 setHistoryPage(true); 156 186 setUploadPage(true); 157 187 setEditPage(false); … … 387 417 } 388 418 419 public String getChangeHistoryLabel() { 420 return changeHistoryLabel; 421 } 422 423 public void setChangeHistoryLabel(String changeHistoryLabel) { 424 this.changeHistoryLabel = changeHistoryLabel; 425 } 426 427 public String getIndexByTitleLabel() { 428 return indexByTitleLabel; 429 } 430 431 public void setIndexByTitleLabel(String indexByTitleLabel) { 432 this.indexByTitleLabel = indexByTitleLabel; 433 } 434 435 public String getRecentChangesLabel() { 436 return recentChangesLabel; 437 } 438 439 public void setRecentChangesLabel(String recentChangesLabel) { 440 this.recentChangesLabel = recentChangesLabel; 441 } 442 443 public String getWhatLinksHereLabel() { 444 return whatLinksHereLabel; 445 } 446 447 public void setWhatLinksHereLabel(String whatLinksHereLabel) { 448 this.whatLinksHereLabel = whatLinksHereLabel; 449 } 450 451 public boolean isHistoryPage() { 452 return historyPage; 453 } 454 455 public void setHistoryPage(boolean historyPage) { 456 this.historyPage = historyPage; 457 } 458 389 459 } trunk/core/src/net/project/view/pages/wiki/EditWikiPage.java
r17914 r17951 118 118 private String describeEditLabel; 119 119 120 private String desc iption;120 private String description; 121 121 122 122 /** … … 267 267 pnWikiPage = new PnWikiPage(); 268 268 pnWikiPage.setContent(getContent()); 269 //added for edit description270 271 // 269 //start added for edit description 270 pnWikiPage.setCommentText(getDescription()); 271 //end 272 272 pnWikiPage.setEditDate(currentDate); 273 273 pnWikiPage.setEditedBy(pnPerson); … … 289 289 pnWikiPage = new PnWikiPage(); 290 290 pnWikiPage.setContent(getContent()); 291 // start added for edit description 292 pnWikiPage.setCommentText(getDescription()); 293 // end 291 294 pnWikiPage.setPageName(getRootPage()); 292 295 pnWikiPage.setParentPageName(getParentPage()); … … 320 323 pnWikiHistory = new PnWikiHistory(); 321 324 pnWikiHistory.setContent(pnWikiPage.getContent()); 322 pnWikiHistory.setCommentText("updated"); 325 // start added edit description 326 pnWikiHistory.setCommentText(pnWikiPage.getCommentText()); 327 // end 323 328 pnWikiHistory.setEditDate(pnWikiPage.getEditDate()); 324 329 PnPerson pnPerson2 = pnWikiPage.getEditedBy(); … … 331 336 // updating the wiki page contents 332 337 pnWikiPage.setContent(getContent()); 338 //start 339 System.out.println("DESCRIPTION is: " + getDescription()); 340 pnWikiPage.setCommentText(getDescription()); 341 //end 333 342 pnWikiPage.setEditDate(currentDate); 334 343 pnWikiPage.setEditedBy(pnPerson); … … 657 666 } 658 667 659 public String getDesc iption() {660 return desc iption;661 } 662 663 public void setDesc iption(String desciption) {664 this.desc iption = desciption;668 public String getDescription() { 669 return description; 670 } 671 672 public void setDescription(String description) { 673 this.description = description; 665 674 } 666 675 } trunk/core/src/net/project/view/pages/wiki/Welcome.java
r17914 r17951 178 178 179 179 private String wikiRecentChanges; 180 181 private String imageAttachLabel; 182 183 //added for changing menu while spreviewing old revision 184 private boolean previewingOldRevision; 180 185 181 186 //added to process after selecting image to attach from selectObject. … … 221 226 jSPRootURL = SessionManager.getJSPRootURL(); 222 227 viewTitle = PropertyProvider.get("prm.wiki.view.viewTitle"); 228 imageAttachLabel = PropertyProvider.get("prm.wiki.attach.image.describe.label"); 223 229 pnProjectSpaceService = ServiceFactory.getInstance().getPnProjectSpaceService(); 224 230 pnWikiPageService = ServiceFactory.getInstance().getPnWikiPageService(); … … 426 432 */ 427 433 void onActivate(Integer wikiHistoryId, Integer wikiPageId, String referrer) { 434 System.out.println("Welcome / onActivate(Integer wikiHistoryId, Integer wikiPageId, String referrer)"); 428 435 if (isExecute()) { 429 436 String wikiPageContents = null; … … 455 462 wikiPageContents = pnWikiPageService.get(wikiPageId).getContent(); 456 463 } 457 setContent(wikiProvider.convertToHtmlNew(wikiPageContents, getProjectName(), false)); //convertToHTML464 setContent(wikiProvider.convertToHtmlNew(wikiPageContents, getProjectName(), true)); //FIX: false is set to true not to follow links while previewing old revision 458 465 setExecute(false); 466 setPreviewingOldRevision(true); 459 467 } catch (Exception e) { 460 468 log.error(e.getMessage()); … … 463 471 } 464 472 465 //method to activate selected wiki history revision473 /* //method to activate selected wiki history revision 466 474 Object onActionFromActivateHistoryRevision(Integer historyPgId) { 467 475 Object obj = null; … … 501 509 return obj; 502 510 } 503 511 */ 504 512 // detach/delete image functionality in Attachment list 505 513 Object onActivate(String actionType) { … … 539 547 540 548 } else if( actionType.equalsIgnoreCase("delete") ) { // deleting block 541 if ( action.equalsIgnoreCase("page") ) { // deleting wiki page (note: root page can not be deleted) 549 if ( action.equalsIgnoreCase("page") ) { // deleting wiki page (note: root page can not be deleted) 542 550 System.out.println(" Deleting wiki page " + wikiPage.getPageName() + " ..."); 543 551 //pnWikiPageService. … … 551 559 } 552 560 561 } 562 } else if(actionType.equalsIgnoreCase("activateRevision")) { //added for activating some history revision 563 System.out.println("\nactivateRevision block!"); 564 String historyPgId = request.getParameter("historyPgId"); 565 566 Object obj = null; 567 pnWikiHistoryService = ServiceFactory.getInstance().getPnWikiHistoryService(); 568 pnWikiHistory = pnWikiHistoryService.get(Integer.valueOf(historyPgId)); 569 //added to fix start 570 PnWikiPage currWikiPage = pnWikiHistory.getWikiPageId(); 571 System.out.println("wiki page we are activating is: " + currWikiPage.getPageName()); 572 //added to fix end 573 //commented: PnWikiPage currWikiPage = pnWikiPageService.getWikiPageWithName(getRootPage(), getProjectId()); 574 PnPerson person = ServiceFactory.getInstance().getPnPersonService().getPerson(Integer.valueOf(SessionManager.getUser().getID()) ); 575 if( currWikiPage != null ) { 576 if( pnWikiHistory != null ) { 577 //add current version to history 578 PnWikiHistory newHistoryPage = new PnWikiHistory(); 579 newHistoryPage.setContent(currWikiPage.getContent()); 580 newHistoryPage.setCommentText(currWikiPage.getCommentText()); 581 newHistoryPage.setEditDate(currWikiPage.getEditDate()); 582 newHistoryPage.setEditedBy(currWikiPage.getEditedBy()); 583 newHistoryPage.setWikiPageId(currWikiPage); 584 Integer result = pnWikiHistoryService.save(newHistoryPage); 585 586 System.out.println("Saved new HISTORY record: " + result); 587 //update active version with old one 588 currWikiPage.setContent(pnWikiHistory.getContent()); 589 currWikiPage.setEditDate(new Date()); 590 currWikiPage.setEditedBy(person); 591 currWikiPage.setRecordStatus("A"); 592 currWikiPage.setCommentText(pnWikiHistory.getCommentText() + " (reactivated)"); 593 pnWikiPageService.update(currWikiPage); 594 setFromHistory(false); 595 //return to welcome page 596 obj = welcome; 597 } 553 598 } 554 599 } … … 1106 1151 this.wikiRecentChanges = wikiRecentChanges; 1107 1152 } 1153 1154 public String getImageAttachLabel() { 1155 return imageAttachLabel; 1156 } 1157 1158 public void setImageAttachLabel(String imageAttachLabel) { 1159 this.imageAttachLabel = imageAttachLabel; 1160 } 1161 1162 public boolean isPreviewingOldRevision() { 1163 return previewingOldRevision; 1164 } 1165 1166 public void setPreviewingOldRevision(boolean previewingOldRevision) { 1167 this.previewingOldRevision = previewingOldRevision; 1168 } 1169 1108 1170 } trunk/core/src/net/project/view/pages/wiki/WikiHistory.java
r17914 r17951 85 85 86 86 private IWikiProvider wikiProvider; 87 88 private String jsonResult;89 90 private TextStreamResponse gridData;91 87 92 88 /** … … 111 107 */ 112 108 void onActivate(String projectName, Integer projectID) { 109 System.out.println("WikiHistory / onActivate(String projectName, Integer projectID)"); 113 110 setModule(Module.PROJECT_SPACE); 114 111 setProjectName(projectName); … … 132 129 historyContent.setVersionNo(version); 133 130 historyContent.setWikiHistoryId(wikiHistory.getWikiHistoryId()); 134 historyContent.setEditDate(userDateFormat.parseDateString(userDateFormat.formatDate(wikiHistory 135 .getEditDate(), historyDateFormat), historyDateFormat)); 131 historyContent.setEditDate(userDateFormat.parseDateString(userDateFormat.formatDate(wikiHistory.getEditDate(), historyDateFormat), historyDateFormat)); 136 132 historyContent.setEditedBy(wikiHistory.getEditedBy()); 133 //added edit description filed 134 historyContent.setCommentText(wikiHistory.getCommentText()); 137 135 historyFormatedList.add(historyContent); 138 136 } … … 142 140 } 143 141 } 144 145 Object onActivate(String projectName, Integer projectID, String action) {146 System.out.println("\n\nWikiHistory / onActivate(String projectName, Integer projectID, String action)\n");147 HttpServletRequest request = requestGlobals.getHTTPServletRequest();148 setProjectName(projectName);149 setObjectId(projectID);150 pnWikiPage = pnWikiPageService.getWikiPageWithName(projectName, projectID);151 152 if(action != null){153 if(action.equalsIgnoreCase("revisions")){154 StringBuffer arrayStr = new StringBuffer("");155 ///////////////////////////////156 try {157 pnWikiPage.setEditDate(pnWikiPage.getEditDate());158 welcomePage.setProjectId(pnWikiPage.getOwnerObjectId().getObjectId());159 wikiHistoryList = new ArrayList<PnWikiHistory>();160 wikiHistoryList = pnWikiHistoryService.findHistoryWithPageId(pnWikiPage.getWikiPageId());161 historyFormatedList = new ArrayList<PnWikiHistory>();162 int version = wikiHistoryList.size() + 1;163 arrayStr.append("[");164 for (int index = wikiHistoryList.size() - 1; index >= 0; index--) {165 version = version - 1;166 PnWikiHistory wikiHistory = wikiHistoryList.get(index);167 PnWikiHistory historyContent = new PnWikiHistory();168 historyContent.setVersionNo(version);169 historyContent.setWikiHistoryId(wikiHistory.getWikiHistoryId());170 historyContent.setEditDate(wikiHistory.getEditDate());171 historyContent.setEditedBy(wikiHistory.getEditedBy());172 historyContent.setCommentText(wikiHistory.getCommentText());173 historyContent.setContent(wikiHistory.getContent());174 historyFormatedList.add(historyContent);175 176 arrayStr.append("['" + version + "', ");177 arrayStr.append("'" + wikiHistory.getEditedBy().getDisplayName() + "', ");178 arrayStr.append("'" + wikiHistory.getCommentText() + "', ");179 arrayStr.append("'" + wikiHistory.getEditDate() + "', ");180 //arrayStr.append("'" + StringEscapeUtils.escapeJavaScript(wikiHistory.getContent()) + "']");181 arrayStr.append("'" + StringEscapeUtils.escapeJavaScript(wikiHistory.getContent()) + "',");182 arrayStr.append("'" + wikiHistory.getWikiHistoryId() + "'] ");183 if( index != 0) {184 arrayStr.append(",");185 }186 }187 arrayStr.append("]");188 welcomePage.setExecute(true);189 } catch (Exception e) {190 log.error("Error in parsing :" + e.getMessage());191 }192 193 //System.out.println("\nARRAY:\n" + arrayStr.toString());194 setJsonResult(arrayStr.toString());195 }196 }197 return null;198 199 }200 142 201 143 /** … … 420 362 this.requestGlobals = requestGlobals; 421 363 } 422 423 public String getJsonResult() {424 return jsonResult;425 }426 427 public void setJsonResult(String jsonResult) {428 this.jsonResult = jsonResult;429 }430 431 public TextStreamResponse getGridData() {432 return gridData;433 }434 435 public void setGridData(TextStreamResponse gridData) {436 this.gridData = gridData;437 }438 364 } trunk/core/src/net/project/wiki/ExtWikiModel.java
r17914 r17951 88 88 else 89 89 first = false; 90 result.append("<span dir=\"ltr \"><a title=\"Category:" + str+90 result.append("<span dir=\"ltr\"><a title=\"Category:" + str+ 91 91 "\" href=\"" + urlRoot + "Category:" + str.replace(" ","_") + "\">" + str + 92 92 "</a></span>"); … … 113 113 append(aTagNode); 114 114 aTagNode.addAttribute("href", link); 115 aTagNode.addAttribute("class", " externallink");115 aTagNode.addAttribute("class", "popup"); //"externallink" 116 116 aTagNode.addAttribute("title", link); 117 117 aTagNode.addAttribute("rel", "nofollow"); … … 149 149 first = false; 150 150 try { 151 result.append("<span dir=\"ltr\"><li>\"<a title=\"Image:" + str.getAttachmentName().replaceAll(" ", "_") + 152 "\" href=" +SessionManager.getJSPRootURL() + 153 "/wiki/EditWikiPage/" + 154 URLEncoder.encode("Image:" + str.getAttachmentName().replaceAll(" ","_") , SessionManager.getCharacterEncoding()) + 155 "/" + 156 wikiPageName + 157 "/" + 158 URLEncoder.encode(user.getCurrentSpace().getID(), SessionManager.getCharacterEncoding()) + "/" + 159 URLEncoder.encode(user.getID(), SessionManager.getCharacterEncoding()) + 160 "?module=" + Module.PROJECT_SPACE + ">" + 161 str.getAttachmentName().replaceAll(" ", "_") + 162 "</a>\", added by <b>" + str.getAttachedBy().getDisplayName() + "</b> on <i>" + SessionManager.getUser().getDateFormatter().formatDate(str.getAttachedOnDate(), "EEE, MMM dd, yyyy hh:mm:ss") + ".</i>"); 151 //start 152 //result.append("<span dir=\"ltr\"><li>\"<a title=\"Image:" + str.getAttachmentName().replaceAll(" ", "_") + 153 result.append("<span dir=\"ltr\"><li>\""); 154 if( wikiPageName.startsWith("Image:") ) { 155 result.append("<b>"); 156 } else { 157 result.append("<a title=\"Image:" + str.getAttachmentName().replaceAll(" ", "_") + 158 "\" href=" +SessionManager.getJSPRootURL() + 159 "/wiki/EditWikiPage/" + 160 URLEncoder.encode("Image:" + str.getAttachmentName().replaceAll(" ","_") , SessionManager.getCharacterEncoding()) + 161 "/" + 162 wikiPageName + 163 "/" + 164 URLEncoder.encode(user.getCurrentSpace().getID(), SessionManager.getCharacterEncoding()) + "/" + 165 URLEncoder.encode(user.getID(), SessionManager.getCharacterEncoding()) + 166 "?module=" + Module.PROJECT_SPACE + ">"); 167 } 168 result.append(str.getAttachmentName().replaceAll(" ", "_")); 169 if( wikiPageName.startsWith("Image:") ) { 170 result.append("</b>"); 171 } else { 172
