组织配置页面 名师列表 热门项目 学霸 精品课程的右上角字样只对超级管理员显示,图片显示时如果已经带了链接则不增加点击弹框效果。

This commit is contained in:
yuanke 2016-06-17 11:23:49 +08:00
parent 70a762220a
commit 3ae26a6530
5 changed files with 26 additions and 12 deletions

View File

@ -14,9 +14,11 @@
<%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :class => "teacher-search-icon fl" %> <%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :class => "teacher-search-icon fl" %>
<!--<a href="javascript:void(0);" onclick='this.parent.submit();return false;' class="searchIcon"></a>--> <!--<a href="javascript:void(0);" onclick='this.parent.submit();return false;' class="searchIcon"></a>-->
<% end %> <% end %>
<div class="sn-font-grey fr"> <% if User.current.admin? %>
<%= link_to "精品课程", courses_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %> <div class="sn-font-grey fr">
</div> <%= link_to "精品课程", courses_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %>
</div>
<% end %>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div id="org_container_list"> <div id="org_container_list">

View File

@ -14,9 +14,11 @@
<%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :class => "teacher-search-icon fl" %> <%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :class => "teacher-search-icon fl" %>
<!--<a href="javascript:void(0);" onclick='this.parent.submit();return false;' class="searchIcon"></a>--> <!--<a href="javascript:void(0);" onclick='this.parent.submit();return false;' class="searchIcon"></a>-->
<% end %> <% end %>
<div class="sn-font-grey fr"> <% if User.current.admin? %>
<%= link_to "热门项目", projects_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %> <div class="sn-font-grey fr">
</div> <%= link_to "热门项目", projects_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %>
</div>
<% end %>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div id="org_container_list"> <div id="org_container_list">

View File

@ -14,9 +14,11 @@
<%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :class => "teacher-search-icon fl" %> <%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :class => "teacher-search-icon fl" %>
<!--<a href="javascript:void(0);" onclick='this.parent.submit();return false;' class="searchIcon"></a>--> <!--<a href="javascript:void(0);" onclick='this.parent.submit();return false;' class="searchIcon"></a>-->
<% end %> <% end %>
<div class="sn-font-grey fr"> <% if User.current.admin? %>
<%= link_to "学霸列表", students_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %> <div class="sn-font-grey fr">
</div> <%= link_to "学霸列表", students_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %>
</div>
<% end %>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div id="org_students_list"> <div id="org_students_list">

View File

@ -22,9 +22,11 @@
<!--<option value="2">学生数</option>--> <!--<option value="2">学生数</option>-->
<!--<option value="3">资源数</option>--> <!--<option value="3">资源数</option>-->
<!--</select>--> <!--</select>-->
<div class="sn-font-grey fr"> <% if User.current.admin? %>
<%= link_to "名师列表", teachers_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %> <div class="sn-font-grey fr">
</div> <%= link_to "名师列表", teachers_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %>
</div>
<% end %>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div id="org_teachers_list"> <div id="org_teachers_list">

View File

@ -1045,6 +1045,12 @@ function showNormalImage(id) {
$(image).attr('src',_src); $(image).attr('src',_src);
return; return;
} }
//已被加链接则不处理
if ($(image).parent() && $(image).parent().attr('href')){
return;
}
//无格式的图片不让点击显示大图,显示的话会有问题 //无格式的图片不让点击显示大图,显示的话会有问题
var tmpsrc = image.attr('src'); var tmpsrc = image.attr('src');
if (tmpsrc.indexOf('.gif') >= 0 || tmpsrc.indexOf('.jpg') >= 0 || tmpsrc.indexOf('.jpeg') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.bmp') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.BMP') >= 0 || tmpsrc.indexOf('.JPEG') >= 0 || tmpsrc.indexOf('.JPG') >= 0 || tmpsrc.indexOf('.PNG') >= 0 || tmpsrc.indexOf('.GIF') >= 0) { if (tmpsrc.indexOf('.gif') >= 0 || tmpsrc.indexOf('.jpg') >= 0 || tmpsrc.indexOf('.jpeg') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.bmp') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.BMP') >= 0 || tmpsrc.indexOf('.JPEG') >= 0 || tmpsrc.indexOf('.JPG') >= 0 || tmpsrc.indexOf('.PNG') >= 0 || tmpsrc.indexOf('.GIF') >= 0) {