以弹框模式显示二级目录
This commit is contained in:
parent
efb91abfb0
commit
8a14ce004f
|
@ -1,10 +1,10 @@
|
|||
class SubDomainsController < ApplicationController
|
||||
layout 'base_org'
|
||||
before_filter :find_org_subfield_and_subdomain, :only => [:show, :index, :new]
|
||||
before_filter :find_org_subfield_and_subdomain, :only => [:show, :index]
|
||||
|
||||
def new
|
||||
@subdomain = SubDomain.new
|
||||
|
||||
@org_subfield = OrgSubfield.find(params[:org_subfield_id])
|
||||
end
|
||||
|
||||
def create
|
||||
|
|
|
@ -140,7 +140,9 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="sn-row">
|
||||
<div class="sn-banner"><img src="/images/sn_banner.jpg" width="1200" height="210" alt="banner image" /></div>
|
||||
<div class="sn-banner"><img src="/images/sn_banner.jpg" width="1200" height="210" alt="banner image" />
|
||||
<a href="#" class="sn-banner-add" title="点击替换图片" ></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
|
|
@ -98,7 +98,8 @@
|
|||
<a href="javascript:void(0);" class="linkGrey fr ml5 mr5" onclick="edit('#subfield_show_<%= field.id %>','#subfield_edit_<%= field.id %>');">编辑</a>
|
||||
<span class="fr">|</span>
|
||||
<!--escape_javascript auto_complete_issues_path(:project_id => @project, :scope => (Setting.cross_project_issue_relations? ? 'all' : nil)-->
|
||||
<a href="javascript:void(0);" class="linkGrey fr mr5" onclick="org_submain_new('<%= escape_javascript new_org_subfield_sub_domain_path(:org_subfield_id => field.id, :field => field) %>');">添加二级目录</a>
|
||||
<!--<a href="javascript:void(0);" class="linkGrey fr mr5" onclick="org_submain_new('<%#= escape_javascript new_org_subfield_sub_domain_path(:org_subfield_id => field.id, :field => field) %>');">添加二级目录</a>-->
|
||||
<%= link_to("添加二级目录", new_org_subfield_sub_domain_path(:org_subfield_id => field.id, :field => field), :class => "linkGrey fr mr5", :remote => true) %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
|
|
|
@ -1,3 +1,29 @@
|
|||
<div class="CodeMirror-cursors">
|
||||
test
|
||||
</div>
|
||||
<div class="org-popup-wrap sn-w300"> <a href="javascript:void(0);" class="org-popup-close"></a>
|
||||
<div class="f16 fb fontBlue mb10">添加二级目录</div>
|
||||
<%= form_tag url_for(:controller => 'sub_domains', :action => 'create', :org_subfield_id => field.id), :id=> 'add_subfield_form_subdomain',:remote => true do %>
|
||||
<span class="fontGrey3 fb mb5 mr10">二级栏目名称</span>
|
||||
<input type="text" id="subfield_name_subdomain" name="name" placeholder="栏目名称" class="orgAddSearch mb10" />
|
||||
<ul class="orgAddRole mb10">
|
||||
<li class="fontGrey3 fb ml24 mr10 fl">栏目类型</li>
|
||||
<li class="fl mr15">
|
||||
<input type="radio" id="orgMng" value="Post" name="field_type" checked="checked"/>
|
||||
<label for="orgMng">帖子</label>
|
||||
</li>
|
||||
<li class="fl mr15">
|
||||
<input type="radio" id="orgMeb" value="Resource" name="field_type" />
|
||||
<label for="orgMeb">资源</label>
|
||||
</li>
|
||||
<li class="cl"></li>
|
||||
</ul>
|
||||
<div class="courseSendSubmit mr15"><a href="javascript:void(0);" class="sendSourceText" onclick="add_org_subfield_subdomain();">确定</a></div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<script type="javascript">
|
||||
function add_org_subfield_subdomain(){
|
||||
if ($("#subfield_name_subdomain").val().trim() != "")
|
||||
alert("Test");
|
||||
$("#add_subfield_form_subdomain").submit();
|
||||
}
|
||||
</script>
|
|
@ -1,6 +0,0 @@
|
|||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'sub_domains/new',:locals => {:course => @course,:course_attachment_type => 1}) %>');
|
||||
showModal('ajax-modal', '513px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
|
||||
$('#ajax-modal').parent().css("top","40%").css("left","50%").css("border","3px solid #269ac9");
|
||||
$('#ajax-modal').parent().addClass("popbox_polls");
|
|
@ -1 +1,6 @@
|
|||
alert("test");
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'sub_domains/new',:locals => {:field => @org_subfield}) %>');
|
||||
showModal('ajax-modal', '513px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
|
||||
$('#ajax-modal').parent().css("top","40%").css("left","50%").css("border","3px solid #269ac9");
|
||||
$('#ajax-modal').parent().addClass("popbox_polls");
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
|
@ -74,6 +74,8 @@ a.sn-search-button {width:53px; height:40px; border:1px solid #ccc; border-left:
|
|||
.sn-sub-nav li a:hover {border-bottom:3px solid #ffbd18; height:37px;}
|
||||
.sn-subnav-slice {margin:12px 5px;}
|
||||
.sn-banner {width:1200px; height:210px; margin:0 auto;}
|
||||
.sn-logo-add{ display:block; top:5px; left:0px; position:absolute; width:20px; height:20px;background:url(../images/default_blank/icons-add.png) 0px -3px no-repeat;}
|
||||
.sn-banner-add{ display:block; position:absolute; top:10px; left:10px;width:27px; height:27px; background:url(../images/default_blank/icons-add.png) -32px -0px no-repeat;}
|
||||
.sn-content-position {width:1200px; height:50px; line-height:50px; vertical-align:middle; font-size:14px; color:#888; margin:0 auto;}
|
||||
/*footer样式*/
|
||||
.sn-footer {width:1200px; height:220px; margin:0 auto; text-align:center; font-size:14px; color:#fff; line-height:normal;}
|
||||
|
|
Loading…
Reference in New Issue