项目新建的时候加入Kindedit及标题为空样式调整

This commit is contained in:
huang 2016-10-31 15:14:52 +08:00
parent a2a40558f1
commit dfbc2657d2
3 changed files with 6 additions and 13 deletions

View File

@ -18,7 +18,7 @@
# Author lizanle # Author lizanle
# Description 封装代码,简化代码,格式化代码, # Description 封装代码,简化代码,格式化代码,
class ProjectsController < ApplicationController class ProjectsController < ApplicationController
layout :select_project_layout layout 'base_projects'
before_filter :authorize1, :only => [:show] before_filter :authorize1, :only => [:show]
menu_item :overview, :only => :show menu_item :overview, :only => :show
menu_item :roadmap, :only => :roadmap menu_item :roadmap, :only => :roadmap

View File

@ -8,12 +8,12 @@
<div class="hwork_new"> <div class="hwork_new">
<ul> <ul>
<%= labelled_form_for @project do |f| %> <%= labelled_form_for @project do |f| %>
<li class="ml45"> <li class="ml45 mb10">
<input type="text" style="display: none"/> <!--阻止表单自动填充 --> <input type="text" style="display: none"/> <!--阻止表单自动填充 -->
<input type="password" style="display: none"/> <!--阻止表单自动填充 --> <input type="password" style="display: none"/> <!--阻止表单自动填充 -->
<label><span class="c_red">*</span>&nbsp;<%= l(:label_projects_new_name)%>&nbsp;&nbsp;:</label> <label><span class="c_red">*</span>&nbsp;<%= l(:label_projects_new_name)%>&nbsp;&nbsp;:</label>
<input type="text" name="project[name]" id="project_name" class="project_new_input" maxlength="100" placeholder="例如:团队协作方法与机制研究" onkeyup="regex_project_name();"> <input type="text" name="project[name]" id="project_name" class="project_new_input" maxlength="100" placeholder="例如:团队协作方法与机制研究" onkeyup="regex_project_name();">
<span class="c_red" id="project_name_notice" style="display: none;">项目名称不能为空</span> <p class="c_orange ml70" id="project_name_notice" style="display: none;">项目名称不能为空</p>
</li> </li>
<div class="cl"></div> <div class="cl"></div>
<!-- <li class="ml45 mb10"> <!-- <li class="ml45 mb10">
@ -24,7 +24,7 @@
<div class="cl"></div>--> <div class="cl"></div>-->
<li class="ml45 mb10"> <li class="ml45 mb10">
<label class="fl mr5">&nbsp;&nbsp;<%= l(:label_tags_project_description) %>&nbsp;&nbsp;:</label> <label class="fl mr5">&nbsp;&nbsp;<%= l(:label_tags_project_description) %>&nbsp;&nbsp;:</label>
<%= f.kindeditor :description, :editor_id => 'project_create_id', <%= f.kindeditor :description, :editor_id => 'project_create_editor',
:owner_id => @project.nil? ? 0: @project.id, :owner_id => @project.nil? ? 0: @project.id,
:owner_type => OwnerTypeHelper::PROJECT, :owner_type => OwnerTypeHelper::PROJECT,
:width => '86%', :width => '86%',
@ -55,14 +55,6 @@
<span class="c_grey">(打钩为公开项目,不打钩为私有项目;私有项目仅项目成员可见。)</span> <span class="c_grey">(打钩为公开项目,不打钩为私有项目;私有项目仅项目成员可见。)</span>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<li>
<p style="display:none;">
<%= f.text_field :project_type, :value => 0 %>
</p>
</li>
<li>
<%= render :partial => 'form_new', :locals => { :f => f } %>
</li>
<li class=" ml90" > <li class=" ml90" >
<a href="javascript:void(0)" class="blue_btn fl c_white" onclick="submit_new_project();" >提交</a> <a href="javascript:void(0)" class="blue_btn fl c_white" onclick="submit_new_project();" >提交</a>
<%= link_to "取消",user_activities_path(User.current.id),:class => "grey_btn fl c_white ml10"%> <%= link_to "取消",user_activities_path(User.current.id),:class => "grey_btn fl c_white ml10"%>
@ -97,6 +89,7 @@
//提交新建项目 //提交新建项目
function submit_new_project() function submit_new_project()
{ {
project_create_editor.sync();
if(regex_project_name()) if(regex_project_name())
{ {
$("#new_project").submit(); $("#new_project").submit();

View File

@ -1523,4 +1523,4 @@ a.syllabusbox_a_blue{
/*模拟title*/ /*模拟title*/
.simulation-title {position:absolute; background-color:#fff; padding:5px 10px; z-index:99; white-space:nowrap; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); display:none; color:#666; border:1px solid #666; line-height:1;} .simulation-title {position:absolute; background-color:#fff; padding:5px 10px; z-index:99; white-space:nowrap; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); display:none; color:#666; border:1px solid #666; line-height:1;}
/*项目创建*/ /*项目创建*/
.project_new_input {border: 1px solid #ddd;height: 20px;width: 794px;background: #fff;margin-bottom: 10px;padding: 5px;} .project_new_input {border: 1px solid #ddd;height: 20px;width: 794px;background: #fff;padding: 5px;}