You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

project.js 21 kB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
11 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
11 years ago
​
​
​
​
​
​
11 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
11 years ago
​
​
​
11 years ago
11 years ago
​
​
​
​
​
11 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
11 years ago
​
​
​
​
​
​
​
​
​
11 years ago
​
11 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
10 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
10 years ago
​
​
10 years ago
​
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697
  1. //验证搜索时输入字
  2. function regexName(content) {
  3. var name = $.trim($("#name").val());
  4. if (name.length == 0) {
  5. $("#project_name_span").text(content);
  6. $("#project_name_span").css('color', '#ff0000');
  7. $("#project_name_span").focus();
  8. return false;
  9. }
  10. else {
  11. $("#project_name_span").text("");
  12. return true;
  13. }
  14. }
  15. function submitSerch(content) {
  16. if (regexName(content)) {
  17. $("#project_search_form").submit();
  18. }
  19. }
  20. // 项目描述超过展开
  21. //$(function(){
  22. // $(".subNav").click(function(){
  23. //
  24. // })
  25. //})
  26. function expand_tools_expand(content) {
  27. if (content == "invit") {
  28. $("#expand_tools_expand_invit").toggleClass("currentDd").siblings(".subNav").removeClass("currentDd");
  29. $("#expand_tools_expand_invit").toggleClass("currentDt").siblings(".subNav").removeClass("currentDt");
  30. $("#expand_tools_expand_invit").next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500);
  31. }
  32. else {
  33. // $("#expand_tools_expand").toggleClass("currentDd").siblings(".subNav").removeClass("currentDd");
  34. // $("#expand_tools_expand").toggleClass("currentDt").siblings(".subNav").removeClass("currentDt");
  35. // $("#expand_tools_expand").next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500);
  36. $("#navContent").toggle(500);
  37. }
  38. // 修改数字控制速度, slideUp(500)控制卷起速度
  39. }
  40. // 描述显示更多信息
  41. function show_more_msg() {
  42. $("#course_description").toggleClass("course_description_none");
  43. var information = $("#expend_more_information");
  44. var arrow = $("#arrow");
  45. var val = information.attr("value");
  46. if (val == "show_more") {
  47. $("#expend_more_information").text("收起描述信息");
  48. information.attr("value", "hide_more");
  49. arrow.attr("src", "/images/jiantouup.jpg")
  50. }
  51. else {
  52. $("#expend_more_information").text("展开更多信息");
  53. information.attr("value", "show_more");
  54. arrow.attr("src", "/images/jiantou.jpg")
  55. }
  56. }
  57. function show_more_reply(contentid, id2, id3) {
  58. $(contentid).toggleClass("course_description_none");
  59. var information = $(id2);
  60. var arrow = $(id3);
  61. var val = information.attr("value");
  62. if (val == "show_more") {
  63. $(id2).text("[收起]");
  64. information.attr("value", "hide_more");
  65. information.attr("style", "color:#3ca5c6");
  66. arrow.attr("src", "/images/jiantouup.jpg")
  67. }
  68. else {
  69. $(id2).text("[展开]");
  70. information.attr("value", "show_more");
  71. arrow.attr("src", "/images/jiantou.jpg")
  72. information.attr("style", "color:#0781b4;");
  73. }
  74. }
  75. function show_more_reply1(contentid, id2, id3) {
  76. $(contentid).toggleClass("course_description_none");
  77. var information = $(id2);
  78. var arrow = $(id3);
  79. var val = information.attr("value");
  80. if (val == "show_more") {
  81. $(id2).text("[收起]");
  82. information.attr("value", "hide_more");
  83. information.attr("style", "color:#3ca5c6");
  84. arrow.attr("src", "/images/jiantouup.jpg")
  85. }
  86. else {
  87. $(id2).text("[展开]");
  88. information.attr("value", "show_more");
  89. arrow.attr("src", "/images/jiantou.jpg")
  90. information.attr("style", "color:#0781b4;");
  91. }
  92. }
  93. //项目版本库git帮助文档显示
  94. //function showhelpAndScrollTo(id) {
  95. // $('#' + id).toggle();
  96. // if(cookieget("repositories_visiable") == "true")
  97. // {
  98. // cookiesave("repositories_visiable", false,'','','');
  99. // }
  100. // else
  101. // {
  102. // cookiesave("repositories_visiable", true,'','','');
  103. // }
  104. // var information = $("#showgithelp");
  105. // var val = information.attr("value");
  106. // if(val=="show_help")
  107. // {
  108. // $("#showgithelp").text("收起Git操作指南");
  109. // information.attr("value", "hide_help");
  110. // }
  111. // else
  112. // {
  113. // $("#showgithelp").text("展开Git操作指南");
  114. // information.attr("value", "show_help");
  115. // }
  116. //}
  117. function showhelpAndScrollToMessage(id, id1, count) {
  118. $('#' + id).toggle();
  119. if(cookieget("repositories_visiable") == "true")
  120. {
  121. cookiesave("repositories_visiable", false,'','','');
  122. }
  123. else
  124. {
  125. cookiesave("repositories_visiable", true,'','','');
  126. }
  127. var information = $(id1);
  128. var val = information.attr("value");
  129. if(val=="show_help")
  130. {
  131. $(id1).text("收起回复(" + count + ")" );
  132. information.attr("value", "hide_help");
  133. information.attr("style", "color:#3ca5c6");
  134. }
  135. else
  136. {
  137. $(id1).text("展开回复(" + count + ")");
  138. information.attr("value", "show_help");
  139. information.attr("style", "color:#0781b4;");
  140. }
  141. }
  142. $(function(){
  143. var information = $("#showgithelp");
  144. var val = information.attr("value");
  145. if(cookieget("repositories_visiable") == "true")
  146. {
  147. $('#repos_git_more').hide();
  148. }
  149. else
  150. {
  151. $('#repos_git_more').show();
  152. $("#showgithelp").text("收起Git操作指南");
  153. information.attr("value", "hide_help");
  154. }
  155. });
  156. ///////////////////////////////////////////////////////////////
  157. //////////////////////////////////////////////////////////////项目讨论区
  158. function regexSubject(id) {
  159. var subjectid = "#message_subject" + id ;
  160. var content = $.trim($(subjectid).val());
  161. var message = "#subject_span" + id;
  162. if (content.length == 0) {
  163. $(message).text("主题不能为空");
  164. $(message).css('color', '#ff0000');
  165. return false;
  166. }
  167. else {
  168. $(message).text("填写正确");
  169. $(message).css('color', '#008000');
  170. return true;
  171. }
  172. return false;
  173. }
  174. function regexContent(){
  175. }
  176. function regexContentxx(id) {
  177. var contentid = "#message_content" + id;
  178. var message = "#message_content_span"+ id;
  179. var ps=document.getElementById('message_content' + id).previousElementSibling.children[1].children[0];
  180. alert(ps);
  181. document.getElementById('message_content' + id).value = ps.value;
  182. var content = $.trim($(contentid).val());
  183. alert(content);
  184. if (content.length == 0) {
  185. $(message).text("描述不能为空");
  186. $(message).css('color', '#ff0000');
  187. return false;
  188. }
  189. else {
  190. $(message).text("填写正确");
  191. $(message).css('color', '#008000');
  192. return true;
  193. }
  194. return false;
  195. }
  196. // 项目讨论区编辑和提交
  197. function submitProjectsBoard(id) {
  198. var formid = "#message-form" + id;
  199. if (regexSubject(id) && regexContent(id)) {
  200. $(formid).submit();
  201. }
  202. }
  203. // 提交新闻
  204. function regexTitle() {
  205. var name = $("#news_title").val();
  206. if (name.length == 0) {
  207. $("#title_notice_span").text("标题不能为空");
  208. $("#title_notice_span").css('color', '#ff0000');
  209. $("#title_notice_span").focus();
  210. return false;
  211. }
  212. else if (name.length <= 60) {
  213. $("#title_notice_span").text("填写正确");
  214. $("#title_notice_span").css('color', '#008000');
  215. return true;
  216. }
  217. else {
  218. $("#title_notice_span").text("标题超过60个字符");
  219. $("#title_notice_span").css('color', '#ff0000');
  220. $("#title_notice_span").focus();
  221. return false;
  222. }
  223. }
  224. function regexDescription() {
  225. project_news_description_editor.sync();
  226. var name = project_news_description_editor.html();
  227. if (name.length == 0) {
  228. $("#description_notice_span").text("描述不能为空");
  229. $("#description_notice_span").css('color', '#ff0000');
  230. $("#description_notice_span").focus();
  231. return false;
  232. }
  233. /*else if (name.length > 10000)
  234. {
  235. $("#description_notice_span").text("描述超过10000个字符");
  236. $("#description_notice_span").css('color', '#ff0000');
  237. $("#description_notice_span").focus();
  238. return false;
  239. }*/
  240. else {
  241. $("#description_notice_span").text("填写正确");
  242. $("#description_notice_span").css('color', '#008000');
  243. return true;
  244. }
  245. }
  246. function submitNews() {
  247. if (regexTitle() && regexDescription()) {
  248. $("#news-form").submit();
  249. }
  250. }
  251. function submitFocus(obj) {
  252. $(obj).focus();
  253. }
  254. function submitComment()
  255. {
  256. if (newsReplyVerify()) {
  257. comment_editor.sync();
  258. $("#add_comment_form").submit();
  259. }
  260. }
  261. function newsReplyVerify() {
  262. var content = comment_editor.html();
  263. if(comment_editor.isEmpty()) {
  264. $("#add_reply_news").text("评论不能为空");
  265. $("#add_reply_news").css('color', '#ff0000');
  266. $("#news_submit_comment").one('click',function(){
  267. submitComment();
  268. });
  269. return false;
  270. } else {
  271. $("#add_reply_news").text("填写正确");
  272. $("#add_reply_news").css('color', '#008000');
  273. return true;
  274. }
  275. }
  276. //当项目描述长度小于112px时,不显示更多按钮
  277. $(function () {
  278. // alert($("#course_description_content").height());
  279. if ($("#course_description_content").height() > 400) {
  280. $("#lg-foot").show();
  281. }
  282. });
  283. //配置项目信息
  284. function course_setting(id) {
  285. //alert(id);
  286. $('#tb_' + id).removeClass().addClass("hwork_hovertab");
  287. $('#tbc_0' + id).removeClass().addClass("dis");
  288. $('#tb_' + (3 - id)).removeClass().addClass("hwork_normaltab");
  289. $('#tbc_0' + (3 - id)).removeClass().addClass("undis");
  290. }
  291. //项目类型(朋友圈、开发组、科研组)
  292. function show_window() {
  293. $('#light').css('display', 'block');
  294. $('#fade').css('display', 'block');
  295. }
  296. function close_window(type) {
  297. $('#light').css('display', 'none');
  298. $('#fade').css('display', 'none');
  299. $("#" + type).attr("checked", "checked");
  300. }
  301. //弹框l
  302. /////////////////////////////////////////////
  303. //项目配置
  304. function project_setting(n) {
  305. for (var i = 1; i < 9; i++) {
  306. if (i == n) {
  307. $("#pro_st_tb_" + i).removeClass().addClass("active");
  308. $("#pro_st_tbc_0" + i).removeClass().addClass("pro_st_dis");
  309. }
  310. else {
  311. $("#pro_st_tb_" + i).removeClass().addClass("pro_st_normaltab");
  312. $("#pro_st_tbc_0" + i).removeClass().addClass("pro_st_undis");
  313. }
  314. }
  315. }
  316. //配置-验证项目名称
  317. function regex_project_name() {
  318. var name = $.trim($("#project_name").val());
  319. if (name.length == 0) {
  320. $("#project_name_notice").show();
  321. return false;
  322. }
  323. else {
  324. $("#project_name_notice").hide();
  325. return true;
  326. }
  327. }
  328. //配置-信息提交
  329. function submit_edit_project(id) {
  330. project_setting_editor.sync();
  331. if (regex_project_name()) {
  332. $("#edit_project_" + id).submit();
  333. }
  334. }
  335. //配置--成员---申请列表--拒绝
  336. function refusal_applied_member() {
  337. $('#new_membership').append("<input name = 'refusal_button' style='display: none;'>");
  338. $('#new_membership').submit();
  339. }
  340. //新闻描述显示更多信息
  341. function news_show_more_des(id) {
  342. $('#news_description_' + id).toggleClass("news_description_none");
  343. }
  344. $(document).ready(function () {
  345. $("#issue_project_id").css("width", "100%");
  346. $("#issue_project_id").css("overflow ", "hidden");
  347. // $(".jstEditor").css("margin-left ","80px");
  348. //issue_project_id
  349. });
  350. function showAndScrollTo(id, focus) {
  351. $('#' + id).show();
  352. if (focus !== null) {
  353. $('#' + focus).focus();
  354. issue_journal_kind_reply.focus();
  355. }
  356. $('html, body').animate({scrollTop: $('#' + id).offset().top}, 400);
  357. }
  358. function quote_issue_journal(){
  359. alert("test");
  360. issue_journal_kind_reply.focus();
  361. issue_journal_kind_reply.cmd.range.setStart(issue_journal_kind_reply.cmd.range.startOffset)
  362. }
  363. /*缺陷完成度决定缺陷状态*/
  364. function PrecentChange(obj) {
  365. var _v = obj;
  366. if (_v == 100) {
  367. //var select=$("select[id='issue_status_id']");
  368. $("select[id='issue_status_id']").find("option[value='3']").attr("selected", "selected");
  369. }
  370. else if (_v == 0) {
  371. //alert(1);
  372. $("select[id='issue_status_id']").find("option[value='1']").attr("selected", "selected");
  373. }
  374. else if (_v != 100 && _v != 0) {
  375. // alert(2);
  376. $("select[id='issue_status_id']").find("option[value='2']").attr("selected", "selected");
  377. }
  378. }
  379. // Can't use Rails' remote select because we need the form data
  380. // 根据缺陷状态值改变完成度状态
  381. function updateIssueFrom(url) {
  382. $.ajax({
  383. url: url,
  384. type: 'post',
  385. data: $('#issue-form').serialize()
  386. });
  387. }
  388. // firefox pre标签换行
  389. $(document).ready(function () {
  390. var userAgent = navigator.userAgent.toLowerCase();
  391. var browser = {
  392. version: (userAgent.match(/.+(?:rv|it|ra|ie)[/: ]([d.]+)/) || [])[1],
  393. safari: /webkit/.test(userAgent),
  394. opera: /opera/.test(userAgent),
  395. msie: /msie/.test(userAgent) && !/opera/.test(userAgent),
  396. mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent)
  397. };
  398. if (browser.mozilla || browser.opera) {
  399. $("pre").addClass("break_word_firefox");
  400. }
  401. else {
  402. $("pre").addClass("break_word");
  403. }
  404. });
  405. //论坛提交
  406. function submitProjectBoard()
  407. {
  408. if(regexSubject()&&regexContent())
  409. {
  410. $("#message-form").submit();
  411. }
  412. }
  413. //cookie记忆html区块 显示/隐藏 的代码 start
  414. $(function(){
  415. var personalized_expand_key = "personalized_expand";
  416. function personalized_init(){
  417. var personalized_map = cookieget(personalized_expand_key);
  418. if(personalized_map!=false){
  419. personalized_map = JSON.parse(personalized_map);
  420. $("*[nhtype='toggle4cookie']").each(function(){
  421. var personalized_id=$(this).data('id');
  422. var val = personalized_map[personalized_id];
  423. if(val!=undefined && val!=$(this).data('val')){
  424. personalized_click($(this),0);
  425. }
  426. });
  427. }
  428. }
  429. function personalized_click(obj,timeout){
  430. var target = $(obj.data('target'));
  431. var oldval = obj.data('val');
  432. var val='';
  433. if(oldval=='expand'){val='retract';}else{val='expand';}
  434. obj.data('val',val);
  435. var personalized_map = cookieget(personalized_expand_key);
  436. if(personalized_map == false){
  437. personalized_map={};
  438. }else{
  439. personalized_map = JSON.parse(personalized_map);
  440. }
  441. var personalized_id=obj.data('id');
  442. personalized_map[personalized_id]=val;
  443. cookiesave(personalized_expand_key,JSON.stringify(personalized_map));
  444. target.toggle(timeout);
  445. }
  446. $("*[nhtype='toggle4cookie']").on('click',function(){
  447. personalized_click($(this),500);
  448. });
  449. personalized_init();
  450. });
  451. //cookie记忆html区块 显示/隐藏 的代码 end
  452. // 新建项目的时候判断是否与我已有的项目重复
  453. function judgeprojectname(){
  454. $('#new_project').validate({
  455. errorPlacement: function(error, element){
  456. alert('error')
  457. },
  458. success: function(label){
  459. alert('ok')
  460. },
  461. onkeyup: false,
  462. rules : {
  463. name:{required : true,
  464. remote : {
  465. url : 'projects/judge_same_projectname',
  466. type:'get',
  467. dataType:'text',
  468. data:{
  469. name : function(){ return $.trim( $("#name").val() ); }
  470. },
  471. dataFilter:function( data ){
  472. if( data=='true')return false; else return true;
  473. }
  474. }
  475. }
  476. },
  477. messages : {
  478. name:{required : "请填写项目名称!",remote:'您已新建过同名项目,请修改项目名称!'}
  479. }
  480. });
  481. }
  482. //用户反馈
  483. function submitProjectFeedback() {
  484. $("#project_feedback_form").submit();
  485. }
  486. // 点击按钮复制功能
  487. function jsCopy(){
  488. var e=document.getElementById("copy_rep_content");
  489. e.select();
  490. document.execCommand("Copy");
  491. }
  492. function jsCopy2(id){
  493. //alert("copy_rep_content2_" + id);
  494. var e=document.getElementById("copy_rep_content2_" + id);
  495. e.select();
  496. document.execCommand("Copy");
  497. }
  498. function zip(){
  499. alert("该功能正在紧张的开发中,我们会争取在最短时间内上线,如若对您工作造成不便敬请谅解!")
  500. }
  501. //取消关联
  502. function cancel_relation(orgId,projectId){
  503. if(confirm("确定取消关联吗?") == false) return;
  504. $.ajax({
  505. url:'/org_projects/'+orgId+"?project_id="+projectId,
  506. type:'DELETE',
  507. success:function(data) {
  508. $.ajax({
  509. url: ' /projects/'+projectId+'/search_public_orgs_not_in_project?hint_flag=true',
  510. type:'get'
  511. });
  512. }
  513. });
  514. }
  515. function issueEditShow(){
  516. $("#issue_detail").hide();
  517. $(".resources ").hide();
  518. $("#issue_edit").show();
  519. $("#project_issue_info_show").hide();
  520. }
  521. function issueDetailShow(){
  522. $("#issue_edit").hide();
  523. $("#issue_detail").show();
  524. $(".resources ").show();
  525. $("#project_issue_info_show").show();
  526. }
  527. //项目讨论区提交
  528. function regexTopicSubject() {
  529. var name = $("#message_subject").val();
  530. if(name.length ==0)
  531. {
  532. $("#subjectmsg").text("标题不能为空");
  533. $("#subjectmsg").css('color','#ff0000');
  534. $("#message_subject").focus();
  535. return false;
  536. }
  537. else if(name.length <= 255)
  538. {
  539. $("#subjectmsg").text("填写正确");
  540. $("#subjectmsg").css('color','#008000');
  541. return true;
  542. }
  543. else
  544. {
  545. $("#subjectmsg").text("标题超过255个字符");
  546. $("#subjectmsg").css('color','#ff0000');
  547. $("#message_subject").focus();
  548. return false;
  549. }
  550. }
  551. function regexTopicDescription()
  552. {
  553. var name = message_content_editor.html();
  554. if(message_content_editor.isEmpty())
  555. {
  556. $("#message_content_span").text("描述不能为空");
  557. $("#message_content_span").css('color','#ff0000');
  558. return false;
  559. }
  560. // else if(name.length >=6000){
  561. // $("#message_content_span").text("描述最多3000个汉字(或6000个英文字符)");
  562. // $("#message_content_span").css('color','#ff0000');
  563. // return false;
  564. // }
  565. else
  566. {
  567. $("#message_content_span").text("填写正确");
  568. $("#message_content_span").css('color','#008000');
  569. return true;
  570. }
  571. }
  572. function submit_topic_project()
  573. {
  574. if(regexTopicSubject() && regexTopicDescription())
  575. {
  576. message_content_editor.sync();
  577. $("#message-form-project").submit();
  578. }
  579. }
  580. function reset_topic(){
  581. }
  582. //查找TAG资源
  583. var clickFunction = null; //单击事件函数
  584. var isdb = false; //是否双击
  585. function search_tag_attachment(url,tag_name,q,course_id,sort)
  586. {
  587. //alert("111");
  588. //clearTimeout(clickFunction);
  589. clickFunction = setTimeout(function() {
  590. search_func()
  591. }, 500);
  592. function search_func(){
  593. if(isdb!= false ) return;
  594. $.get(
  595. url,
  596. {
  597. tag_name: tag_name,
  598. q: q,
  599. course_id:course_id
  600. },
  601. function (data) {
  602. }
  603. );
  604. }
  605. }
  606. function choice_branch(name, branch, source_rev, forked_rev, project_id, project_forked_from_id) {
  607. if (name==project_id){
  608. var branchOptions = source_rev;
  609. }
  610. else if (name == project_forked_from_id){
  611. var branchOptions = forked_rev;
  612. }
  613. else{
  614. var branchOptions = source_rev;
  615. }
  616. // switch (name) {
  617. // case project_id :
  618. // alert("project_id" + project_id);
  619. // var branchOptions = source_rev;
  620. // break;
  621. // case project_forked_from_id :
  622. // alert("project_forked_from_id"+project_forked_from_id);
  623. // var branchOptions = forked_rev;
  624. // break;
  625. // default:
  626. // var branchOptions = source_rev;
  627. // break;
  628. // }
  629. branch.options.length = 0;
  630. for (var i = 0; i < branchOptions.length; i++) {
  631. branch.options[i] = new Option(branchOptions[i]);
  632. }
  633. }

软件技术创新是当今国家整体创新能力的重要基础和发展引擎。近年来,大众参与的软件创新与创业活动已经成为网络时代软件开发和应用的新形态,正在快速改变着全球软件创新模式和软件产业格局。 ...