Changeset 17951

Show
Ignore:
Timestamp:
08/26/08 09:00:23 (3 months ago)
Author:
uroslates
Message:

- added commenting feature while editing wiki page (edit description),
- preview mode without attachment list,
- history revision previewing in 'preview mode' (without attachment list, not linkable),
- some testing observation list issues fixed (refreshing after deleting image, some uploading issues...).
- css change (external links css changed).

Files:

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  
    2424COMMIT; 
    2525 
     26PROMPT Altering PN_WIKI_PAGE table 
     27@versions/8.5.0/tables/alter_pn_wiki_page.sql 
     28COMMIT; 
     29 
    2630PROMPT Altering PN_PERSON_PROFILE table 
    2731@versions/8.5.0/tables/alter_pn_person_profile.sql 
     32COMMIT; 
     33 
     34PROMPT Altering PN_WIKI_HISTORY table 
     35@versions/8.5.0/tables/alter_pn_wiki_history.sql 
    2836COMMIT; 
    2937 
  • trunk/core/db/oracle/create-scripts/versions/8.5.0/update_system_properties.sql

    r17946 r17951  
    254254values (2000,'en','text','prm.wiki.edit.describe.label','Edit summary (describe the changes you have made):','','A',0,1); 
    255255 
     256insert into pn_property (CONTEXT_ID, LANGUAGE, PROPERTY_TYPE, PROPERTY, PROPERTY_VALUE, PROPERTY_VALUE_CLOB,RECORD_STATUS,IS_SYSTEM_PROPERTY,IS_TRANSLATABLE_PROPERTY)  
     257values (2000,'en','text','prm.wiki.attach.image.describe.label','Select image to attach to this page:','','A',0,1); 
     258 
     259insert into pn_property (CONTEXT_ID, LANGUAGE, PROPERTY_TYPE, PROPERTY, PROPERTY_VALUE, PROPERTY_VALUE_CLOB,RECORD_STATUS,IS_SYSTEM_PROPERTY,IS_TRANSLATABLE_PROPERTY)  
     260values (2000,'en','text','prm.wiki.menu.pageLinks.label','What Links Here','','A',0,1); 
     261 
     262insert into pn_property (CONTEXT_ID, LANGUAGE, PROPERTY_TYPE, PROPERTY, PROPERTY_VALUE, PROPERTY_VALUE_CLOB,RECORD_STATUS,IS_SYSTEM_PROPERTY,IS_TRANSLATABLE_PROPERTY)  
     263values (2000,'en','text','prm.wiki.menu.changeHistory.label','Change History','','A',0,1); 
     264 
     265insert into pn_property (CONTEXT_ID, LANGUAGE, PROPERTY_TYPE, PROPERTY, PROPERTY_VALUE, PROPERTY_VALUE_CLOB,RECORD_STATUS,IS_SYSTEM_PROPERTY,IS_TRANSLATABLE_PROPERTY)  
     266values (2000,'en','text','prm.wiki.menu.pageIndex.label','Index By Title','','A',0,1); 
     267 
     268insert into pn_property (CONTEXT_ID, LANGUAGE, PROPERTY_TYPE, PROPERTY, PROPERTY_VALUE, PROPERTY_VALUE_CLOB,RECORD_STATUS,IS_SYSTEM_PROPERTY,IS_TRANSLATABLE_PROPERTY)  
     269values (2000,'en','text','prm.wiki.menu.recentChanges.label','Recent Changes','','A',0,1); 
     270 
    256271insert into PN_PROPERTY (CONTEXT_ID, LANGUAGE, PROPERTY_TYPE, PROPERTY, PROPERTY_VALUE, RECORD_STATUS, IS_SYSTEM_PROPERTY, IS_TRANSLATABLE_PROPERTY, PROPERTY_VALUE_CLOB) 
    257272values (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  
    3737                          column="COMMENT_TEXT"            
    3838                          type="java.lang.String" 
    39                           not-null="true"               
     39                          not-null="false"              
    4040                /> 
    4141 
  • trunk/core/src/net/project/hibernate/model/PnWikiHistory.java

    r17565 r17951  
    4949         * Constructor for required fields 
    5050         */ 
    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, 
    5252                        net.project.hibernate.model.PnPerson editedBy, java.util.Date editDate,  
    5353                        net.project.hibernate.model.PnWikiPage wikiPageId) { 
     
    5555                this.setWikiHistoryId(wikiHistoryId); 
    5656                this.setContent(content); 
    57               this.setCommentText(commentText); 
     57//            this.setCommentText(commentText); 
    5858                this.setEditedBy(editedBy); 
    5959                this.setEditDate(editDate); 
  • trunk/core/src/net/project/hibernate/model/PnWikiPage.hbm.xml

    r17566 r17951  
    5555                          not-null="false" 
    5656                /> 
     57                 
     58                <property 
     59                          name="commentText" 
     60                          column="COMMENT_TEXT"            
     61                          type="java.lang.String" 
     62                          not-null="false"                
     63                /> 
    5764                                 
    5865                <!-- Associations --> 
  • trunk/core/src/net/project/hibernate/model/PnWikiPage.java

    r17565 r17951  
    2929 
    3030        private java.lang.String recordStatus; 
     31         
     32        private String commentText; 
    3133 
    3234        // many to one 
     
    227229        } 
    228230 
     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 
    229245} 
  • trunk/core/src/net/project/hibernate/service/impl/WikiProviderImpl.java

    r17914 r17951  
    229229                //added for categories rendering 
    230230                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                 
    232235                htmlFormat.append(wikiModel.render(wikiModel.getLinksFormated()) + "\n"); 
    233236                 
  • trunk/core/src/net/project/view/components/WikiMenu.java

    r17872 r17951  
    55 
    66import net.project.base.Module; 
     7import net.project.base.property.PropertyProvider; 
    78import net.project.hibernate.model.PnProjectSpace; 
    89import net.project.hibernate.model.PnProjectSpaceMetaProp; 
     
    9697        private boolean welcomePage; 
    9798         
     99        private boolean historyPage; 
     100         
    98101        @Persist 
    99102        private String currentPageName; 
    100103         
    101104        private boolean showUploadLink; 
     105         
     106        private String whatLinksHereLabel; 
     107         
     108        private String changeHistoryLabel; 
     109         
     110        private String indexByTitleLabel; 
     111         
     112        private String recentChangesLabel; 
    102113 
    103114        public WikiMenu() { 
     
    107118                        pnWikiPageService = ServiceFactory.getInstance().getPnWikiPageService(); 
    108119                        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"); 
    109125                } catch (Exception ex) { 
    110126                        log.error("Error occured while getting property values in WikiMenu page : " + ex.getMessage());                  
     
    122138                 
    123139                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                                 
    140168                } else if ( menuType.toLowerCase().equals("edit") ) { 
    141169                        setEditPage(true); 
     
    148176                        setUploadPage(true); 
    149177                        setEditPage(false); 
     178                        setHistoryPage(false); 
    150179                        setParentPage(wikiUpload.getParentPage()); 
    151180                        setParentPageLink(wikiUpload.getParentPageLink()); 
     
    154183                        setShowUploadLink(false); 
    155184                } else if ( menuType.toLowerCase().equals("history") ) { 
     185                        setHistoryPage(true); 
    156186                        setUploadPage(true); 
    157187                        setEditPage(false); 
     
    387417        } 
    388418 
     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 
    389459} 
  • trunk/core/src/net/project/view/pages/wiki/EditWikiPage.java

    r17914 r17951  
    118118        private String describeEditLabel; 
    119119         
    120         private String desciption; 
     120        private String description; 
    121121         
    122122        /** 
     
    267267                                pnWikiPage = new PnWikiPage(); 
    268268                                pnWikiPage.setContent(getContent()); 
    269 //added for edit description 
    270  
    271 // 
     269                               //start added for edit description 
     270                                pnWikiPage.setCommentText(getDescription()); 
     271                                //end 
    272272                                pnWikiPage.setEditDate(currentDate); 
    273273                                pnWikiPage.setEditedBy(pnPerson); 
     
    289289                                                pnWikiPage = new PnWikiPage(); 
    290290                                                pnWikiPage.setContent(getContent()); 
     291                                                // start added for edit description 
     292                                                pnWikiPage.setCommentText(getDescription()); 
     293                                                // end 
    291294                                                pnWikiPage.setPageName(getRootPage()); 
    292295                                                pnWikiPage.setParentPageName(getParentPage()); 
     
    320323                                                pnWikiHistory = new PnWikiHistory(); 
    321324                                                pnWikiHistory.setContent(pnWikiPage.getContent()); 
    322                                                 pnWikiHistory.setCommentText("updated"); 
     325                                                // start        added edit description 
     326                                                pnWikiHistory.setCommentText(pnWikiPage.getCommentText()); 
     327                                                // end 
    323328                                                pnWikiHistory.setEditDate(pnWikiPage.getEditDate()); 
    324329                                                PnPerson pnPerson2 = pnWikiPage.getEditedBy(); 
     
    331336                                        // updating the wiki page contents 
    332337                                        pnWikiPage.setContent(getContent()); 
     338//start 
     339                                        System.out.println("DESCRIPTION is: " + getDescription()); 
     340                                        pnWikiPage.setCommentText(getDescription()); 
     341//end 
    333342                                        pnWikiPage.setEditDate(currentDate); 
    334343                                        pnWikiPage.setEditedBy(pnPerson); 
     
    657666        } 
    658667 
    659         public String getDesciption() { 
    660                 return desciption; 
    661         } 
    662  
    663         public void setDesciption(String desciption) { 
    664                 this.desciption = desciption; 
     668        public String getDescription() { 
     669                return description; 
     670        } 
     671 
     672        public void setDescription(String description) { 
     673                this.description = description; 
    665674        } 
    666675} 
  • trunk/core/src/net/project/view/pages/wiki/Welcome.java

    r17914 r17951  
    178178         
    179179        private String wikiRecentChanges; 
     180         
     181        private String imageAttachLabel; 
     182         
     183        //added for changing menu while spreviewing old revision 
     184        private boolean previewingOldRevision; 
    180185         
    181186        //added to process after selecting image to attach from selectObject. 
     
    221226                        jSPRootURL = SessionManager.getJSPRootURL(); 
    222227                        viewTitle = PropertyProvider.get("prm.wiki.view.viewTitle"); 
     228                        imageAttachLabel = PropertyProvider.get("prm.wiki.attach.image.describe.label"); 
    223229                        pnProjectSpaceService = ServiceFactory.getInstance().getPnProjectSpaceService(); 
    224230                        pnWikiPageService = ServiceFactory.getInstance().getPnWikiPageService(); 
     
    426432         */ 
    427433        void onActivate(Integer wikiHistoryId, Integer wikiPageId, String referrer) { 
     434System.out.println("Welcome / onActivate(Integer wikiHistoryId, Integer wikiPageId, String referrer)"); 
    428435                if (isExecute()) { 
    429436                        String wikiPageContents = null; 
     
    455462                                        wikiPageContents = pnWikiPageService.get(wikiPageId).getContent(); 
    456463                                } 
    457                                 setContent(wikiProvider.convertToHtmlNew(wikiPageContents, getProjectName(), false));  //convertToHTML 
     464                                setContent(wikiProvider.convertToHtmlNew(wikiPageContents, getProjectName(), true));   //FIX: false is set to true not to follow links while previewing old revision 
    458465                                setExecute(false); 
     466                                setPreviewingOldRevision(true); 
    459467                        } catch (Exception e) { 
    460468                                log.error(e.getMessage()); 
     
    463471        } 
    464472         
    465       //method to activate selected wiki history revision 
     473/*    //method to activate selected wiki history revision 
    466474        Object onActionFromActivateHistoryRevision(Integer historyPgId) { 
    467475                Object obj = null; 
     
    501509                return obj; 
    502510        } 
    503  
     511*/ 
    504512        // detach/delete image functionality in Attachment list 
    505513        Object onActivate(String actionType) { 
     
    539547                                 
    540548                        } 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) 
    542550                                        System.out.println("  Deleting wiki page " + wikiPage.getPageName() + " ..."); 
    543551                                        //pnWikiPageService. 
     
    551559                                        } 
    552560                                         
     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                                        } 
    553598                                } 
    554599                        } 
     
    11061151                this.wikiRecentChanges = wikiRecentChanges; 
    11071152        } 
     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 
    11081170} 
  • trunk/core/src/net/project/view/pages/wiki/WikiHistory.java

    r17914 r17951  
    8585         
    8686        private IWikiProvider wikiProvider; 
    87          
    88         private String jsonResult; 
    89          
    90         private TextStreamResponse gridData; 
    9187         
    9288        /** 
     
    111107         */ 
    112108        void onActivate(String projectName, Integer projectID) { 
     109System.out.println("WikiHistory / onActivate(String projectName, Integer projectID)"); 
    113110                setModule(Module.PROJECT_SPACE); 
    114111                setProjectName(projectName); 
     
    132129                                historyContent.setVersionNo(version); 
    133130                                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)); 
    136132                                historyContent.setEditedBy(wikiHistory.getEditedBy()); 
     133                                //added edit description filed 
     134                                historyContent.setCommentText(wikiHistory.getCommentText()); 
    137135                                historyFormatedList.add(historyContent); 
    138136                        } 
     
    142140                } 
    143141        } 
    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         } 
    200142 
    201143        /** 
     
    420362                this.requestGlobals = requestGlobals; 
    421363        } 
    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         } 
    438364} 
  • trunk/core/src/net/project/wiki/ExtWikiModel.java

    r17914 r17951  
    8888                                else 
    8989                                        first = false; 
    90                                 result.append("<span dir=\"ltr \"><a title=\"Category:" + str+ 
     90                                result.append("<span dir=\"ltr\"><a title=\"Category:" + str+ 
    9191                                                "\" href=\"" + urlRoot + "Category:" + str.replace(" ","_") + "\">" + str + 
    9292                                                "</a></span>"); 
     
    113113                append(aTagNode); 
    114114                aTagNode.addAttribute("href", link); 
    115                 aTagNode.addAttribute("class", "externallink"); 
     115                aTagNode.addAttribute("class", "popup");       //"externallink" 
    116116                aTagNode.addAttribute("title", link); 
    117117                aTagNode.addAttribute("rel", "nofollow"); 
     
    149149                                        first = false; 
    150150                                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