at_guange
cxt 10 years ago
commit 3847d4bc5e

@ -73,8 +73,7 @@
<td class="w150"><span class="rep_history_grey"><%=h repository.scm_name %></span></td> <td class="w150"><span class="rep_history_grey"><%=h repository.scm_name %></span></td>
<%if repository.scm_name=="Git"%> <%if repository.scm_name=="Git"%>
<% rep_url = "http://" + repository.login.to_s + '_'+ repository.identifier.to_s + "@" + ip.to_s + h( repository.url.slice(project_path_cut, repository.url.length)) %> <% rep_url = "http://" + repository.login.to_s + '_'+ repository.identifier.to_s + "@" + ip.to_s + h( repository.url.slice(project_path_cut, repository.url.length)) %>
<td class="w362 pl5" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis; text-align: left" title="http://<%= repository.login.to_s %>_<%= repository.identifier.to_s%>@<%= ip %> <td class="w362 pl5" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis; text-align: left">
<%=h repository.url.slice(project_path_cut, repository.url.length) %>">
<span class="rep_history_grey"> <span class="rep_history_grey">
<textarea id="copy_rep_content2_<%= repository.id %>" class="cloneUrl2 fl" type="input" ><%= rep_url %></textarea> <textarea id="copy_rep_content2_<%= repository.id %>" class="cloneUrl2 fl" type="input" ><%= rep_url %></textarea>
<a href="javascript:void(0);" onclick="jsCopy2(<%= repository.id %>)"><span class="vl_copy2" title="点击复制版本库地址"></span></a> <a href="javascript:void(0);" onclick="jsCopy2(<%= repository.id %>)"><span class="vl_copy2" title="点击复制版本库地址"></span></a>

@ -5,7 +5,7 @@
<!--</p>--> <!--</p>-->
<% else %> <% else %>
<% attachments.each do |attach| %> <% attachments.each do |attach| %>
<ul class="resourcesList"> <ul class="resourcesList" onmouseover="$(this).children().css('background-color', '#e1e1e1')" onmouseout="$(this).children().css('background-color', 'white')">
<li class="resourcesListCheckbox fl"> <li class="resourcesListCheckbox fl">
<input name="checkbox1[]" type="checkbox" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="resourcesCheckbox" /> <input name="checkbox1[]" type="checkbox" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="resourcesCheckbox" />
</li> </li>

@ -145,7 +145,6 @@
var id; //资源id var id; //资源id
var sendType; //发送到课程 1 发送到项目 2 var sendType; //发送到课程 1 发送到项目 2
var lastSendType; //保存上次发送的发送类型 var lastSendType; //保存上次发送的发送类型
var last_op
$("#resources_list").mousedown(function(e) { $("#resources_list").mousedown(function(e) {
//如果是右键的话 //如果是右键的话
if (3 == e.which) { if (3 == e.which) {
@ -180,28 +179,6 @@
last_line = line; last_line = line;
} }
}); });
//鼠标经过时,背景颜色设为灰色
$("#resources_list").mouseover(function(e){
pageX = e.clientX;
pageY = e.clientY;
var ele = document.elementFromPoint(pageX,pageY);
line = $(ele).parent();
if(last_op != null){
last_op.children().css("background-color", 'white');
restore();
last_op == null;
}
//如果当前的tag是li那么还要li的父级元素
if(line.get(0).tagName === 'LI'){
line = line.parent();
}
//将当前的元素的所有子元素的背景色改为蓝色
line.children().css("background-color", '#e1e1e1');
//将当前元素赋给 上一个对象 保存起来。
last_op = line;
});
//元素包含关系计算 //元素包含关系计算
var contains = function(root, el) { var contains = function(root, el) {
if (root.compareDocumentPosition) if (root.compareDocumentPosition)

Loading…
Cancel
Save