你好,游客 登录 注册 搜索
背景:
阅读新闻

安装jira4.1.2forLinux并hack富文本编辑器TinyMCE

[日期:2012-03-12] 来源:Linux社区  作者:willvvv [字体:大 中 小]

5.启动tomcat,在浏览器输入:http://10.10.20.170:8899(ip为实际ip,port为tomcat的server.xml配置的,默认8080)开始jira安装页面,获取ServerID

6.破解jira4.1.2,将/usr/local/atlassian-jira-enterprise-4.1.2-standalone/atlassian-jira/WEB-INF/lib/atlassian-extras-2.2.2.jar复制到本地windows机子上,解压附件的crack.rar,双击keygen.bat,输入上一步获取的ServerID信息,点击gen,生成序列号,再 patch一下atlassian-extras-2.2.2.jar,patch成功后将atlassian-extras-2.2.2.jar拷贝覆盖服务器上的jar。

7.如果出现jira安装页面不可以访问,尝试重启,我遇到过第一次安装页面不可访问,重启即可。

8.汉化。下载汉化包,见本文最后,替换原有的简体中文语言包。

9.因为jira的描述官方不支持富文本,被很多用户诟病。现提供一种简单的方式实现,来源自jira官方评论。

  1. 1. Extract tinyMCE to the "\atlassian-jira\includes\js\" folder.   
  2.   
  3. 2. Edit "\atlassian-jira\secure\views\createissue-details.jsp"  
  4. a. Add this under <body>, you may also want to remove the add comment on create (one line of code) if you don’t use it or exempt it using the tinyMCE editor_selector option.   
  5. <script type="text/javascript" src="/includes/js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>   
  6. <script type="text/javascript">   
  7. tinyMCE.init({  mode : "textareas", theme : "advanced", plugins : "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",  theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect", theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor", theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen", theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true });   
  8. </script>   
  9.   
  10. 3. Edit "atlassian-jira\secure\views\issue\editissue.jsp"  
  11. a. Add this just under <body class="type-a">   
  12. <script type="text/javascript" src="/includes/js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>   
  13. <script type="text/javascript">   
  14. tinyMCE.init({ mode : "textareas", theme : "advanced", plugins : "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template", theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect", theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor", theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen", theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true });   
  15. </script>   
  16.   
  17. 4. Edit "atlassian-jira\secure\views\issue\viewissue.jsp"  
  18. a. Add the following below </fieldset>   
  19. <script type="text/javascript" src="/includes/js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>   
  20. <script type="text/javascript">   
  21. tinyMCE.init(   
  22. { mode : "textareas", theme : "advanced", theme_advanced_resizing : true, readonly : true, editor_selector : "mceSimple" });   
  23. </script>   
  24.   
  25. 5. Edit "\atlassian-jira\includes\panels\issue_descriptiontable.jsp"  
  26. a. Replace the contents of <ul class="item-details"> </ul> with the following:   
  27. <li>   
  28. <dl>   
  29. <dt><webwork:text name="'issue.field.description'"/>:</dt>   
  30. <webwork:if test="../string('description')/length > 255">   
  31. <dd class="twixified">   
  32.   
  33. <div class="twixi-wrap verbose">   
  34.   
  35. <a href="#" class="twixi"><span class="icon twixi-opened"><span><webwork:text name="'admin.common.words.hide'"/></span></span></a>   
  36. <textarea name="content" class="mceSimple" style="width:100%;height:100%">   
  37. <div id="description-full" class="flooded">   
  38. <webwork:property value="/renderedContent('description', ../string('description'), @issue)" escape="'false'" />   
  39. </div>   
  40. </textarea>   
  41. </div>   
  42.   
  43. <div class="twixi-wrap concise">   
  44. <a href="#" class="twixi"><span class="icon twixi-closed"><span><webwork:text name="'admin.common.words.show'"/></span></span></a>   
  45. <textarea name="content" class="mceSimple" style="width:100%;height:100%">   
  46. <div class="flooded">   
  47. <webwork:property value="/renderedContentNoBreaks('description', ../string('description'), @issue)" escape="'false'" />   
  48. </div>   
  49. </textarea>   
  50. </div>   
  51. </dd>   
  52. </webwork:if>   
  53. <webwork:else>   
  54. <dd id="description-full">   
  55. <textarea name="content" class="mceSimple" style="width:100%;height:100%">   
  56. <webwork:property value="/renderedContent('description', ../string('description'), @issue)" escape="'false'" />   
  57. </textarea>   
  58. </dd>   
  59. </webwork:else>   
  60. </dl>   
  61. </li>   
  62.   
  63. 6. 记得在修改文件前备份!!!  

 10.jira默认的日期习惯是西方的,我们大概经常使用的是yyyy-mm-dd HH:mm可以在《全局配置》->《系统界面配置》中修改,但是日历选择控件的格式必须直接修改配置文件jira-application.properties

  1. jira.date.picker.java.format = yyyy-MM-dd   
  2. jira.date.picker.javascript.format = %Y-%m-%e   
  3.   
  4. jira.date.time.picker.java.format = yyyy-MM-dd HH:mm   
  5. jira.date.time.picker.javascript.format = %Y-%m-%e %H:%M  

 11.注意:虽然附件破解文件是4.1.1的,对于4.1.2也适用!!!是备忘不是教程,顺序会有点不一致。

汉化包及破解文件下载:

免费下载地址在 http://linux.linuxidc.com/

用户名与密码都是www.linuxidc.com

具体下载目录在 /2012年资料/3月/12日/安装jira4.1.2forLinux并hack富文本编辑器TinyMCE/

linux
相关资讯       TinyMCE 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款