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.

syllabus.js 3.3 kB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
10 years ago
​
​
10 years ago
​
10 years ago
​
​
​
​
​
​
​
​
​
10 years ago
​
​
10 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
10 years ago
​
​
​
​
​
​
​
10 years ago
​
​
​
10 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. //显示更多的班级
  2. function show_more_course(url){
  3. $.get(
  4. url,
  5. function (data) {
  6. }
  7. );
  8. }
  9. function regex_sylla_description() {
  10. syllabus_description_editor.sync();
  11. var name = syllabus_description_editor.html();
  12. if (name.length == 0) {
  13. $("#description_notice_span").text("描述不能为空");
  14. $("#description_notice_span").css('color', '#ff0000');
  15. $("#description_notice_span").focus();
  16. return false;
  17. }
  18. else {
  19. $("#description_notice_span").text("填写正确");
  20. $("#description_notice_span").css('color', '#008000');
  21. return true;
  22. }
  23. }
  24. function submit_syllabus() {
  25. if (regex_sylla_description()) {
  26. $("#syllabus-form").submit();
  27. }
  28. }
  29. //编辑英文名称
  30. function show_edit_eng_name(str) {
  31. EngEdit = true;
  32. $("#syllabus_eng_name_show").hide();
  33. $("#syllabus_eng_name_edit").show();
  34. $("#syllabus_eng_name_edit").val(str);
  35. $("#syllabus_eng_name_edit").focus();
  36. }
  37. //编辑英文名称之后提交
  38. function edit_syllabus_eng_name(url){
  39. if(EngEdit) {
  40. EngEdit = false;
  41. $.get(
  42. url,
  43. { eng_name: $("#syllabus_eng_name_edit").val() },
  44. function (data) {
  45. }
  46. );
  47. }
  48. }
  49. //编辑课程名称
  50. function show_edit_title(str) {
  51. IsEdit = true;
  52. $("#syllabus_title_show").hide();
  53. $("#syllabus_title_edit").show();
  54. $("#syllabus_title_edit").val(str);
  55. $("#syllabus_title_edit").focus();
  56. }
  57. //编辑课程名称之后提交
  58. function edit_syllabus_title(url){
  59. if(IsEdit) {
  60. IsEdit = false;
  61. $.get(
  62. url,
  63. { title: $("#syllabus_title_edit").val().trim() },
  64. function (data) {
  65. }
  66. );
  67. }
  68. }
  69. //展开所有属性
  70. function toggle_all_syllabus_attr(){
  71. var btn = $("#show_all_syllabus_attr");
  72. var target = $("#all_syllabus_attr li");
  73. var none = $("#all_syllabus_attr li.none_attr");
  74. if(btn.data('init')=='0'){
  75. btn.data('init',1);
  76. btn.removeClass('homepageLeftMenuMoreIcon2');
  77. btn.addClass('homepageLeftMenuHideIcon2');
  78. target.show();
  79. }else{
  80. btn.data('init',0);
  81. btn.addClass('homepageLeftMenuMoreIcon2');
  82. btn.removeClass('homepageLeftMenuHideIcon2');
  83. none.hide();
  84. }
  85. }
  86. function update_syllabus_info(){
  87. if(regex_syllabus_credit('credit') && regex_syllabus_credit('hours') && regex_syllabus_credit('theory_hours') && regex_syllabus_credit('practice_hours')) {
  88. $("#submit_edit_info").parent().submit();
  89. }
  90. }
  91. function regex_syllabus_credit(str){
  92. var num = $.trim($("#syllabus_"+str+"_input").val());
  93. var regex = /^\d*$/;
  94. if(num.length > 0)
  95. {
  96. if (regex.test(num)) {
  97. if(parseInt(num) > 0)
  98. {
  99. $("#syllabus_"+str+"_notice").hide();
  100. return true;
  101. } else
  102. {
  103. $("#syllabus_"+str+"_notice").show();
  104. $("#syllabus_"+str+"_input").focus();
  105. return false;
  106. }
  107. } else {
  108. $("#syllabus_"+str+"_notice").show();
  109. $("#syllabus_"+str+"_input").focus();
  110. return false;
  111. }
  112. } else {
  113. return true;
  114. }
  115. }

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