Merge remote-tracking branch 'origin/szzh' into szzh
This commit is contained in:
commit
3fee4211a2
|
@ -1,4 +1,4 @@
|
|||
<html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>
|
||||
|
@ -8,15 +8,15 @@ Client
|
|||
|
||||
<body>
|
||||
<hr />
|
||||
<h2>这是一张图片</h2>
|
||||
<h2>这是一张图片</h2>
|
||||
<p>photo<a href="http://10.0.47.15:3000/shares/new?access_token='2d3dda45dsd'&comment='verygood'&title=davide&share_type=1&url=http://www.baidu.com"> Share A </a></p>
|
||||
<hr />
|
||||
|
||||
<h2>这是一段视频</h2>
|
||||
<h2>这是一段视频</h2>
|
||||
<p>Text<a href="http://10.0.47.15:3000/shares/new?access_token=2d3dda45dsd&comment=verygood&title=kaka&share_type=2&url=http://www.sina.com"> Share B </a></p>
|
||||
<hr />
|
||||
|
||||
<h2>这是一篇文章</h2>
|
||||
<h2>这是一篇文章</h2>
|
||||
<p>Text<a href="http://10.0.47.15:3000/shares/new?access_token=2d3dda45dsd&comment=verygood&title=pepe&share_type=3&url=http://www.sina.com"> Share C </a></p>
|
||||
<hr />
|
||||
|
||||
|
|
|
@ -224,4 +224,11 @@ private
|
|||
referer = request.headers['Referer']
|
||||
require_login unless referer =~ /softapplication/
|
||||
end
|
||||
|
||||
def renderTag
|
||||
@attachmentNew = Attachment.find(params[:attchmentId])
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 255, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") +
|
||||
link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %>
|
||||
<%= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
|
||||
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<%if @attachmentNew != nil%>
|
||||
$("#div-attachments[" + @attachmentNew.id + "]").html('<%= j(render :partial => 'tags/tag', :locals => {:obj => @attachmentNew, :object_flag => "6"})%>');
|
||||
<%end%>
|
|
@ -11,4 +11,6 @@ fileSpan.find('a.remove-upload')
|
|||
"href": '<%= j attachment_path(@attachment, :attachment_id => params[:attachment_id], :format => 'js') %>'
|
||||
})
|
||||
.off('click');
|
||||
var divattach = fileSpan.find('div.div_attachments');
|
||||
divattach.html('<%= j(render :partial => 'tags/tag', :locals => {:obj => @attachment, :object_flag => "6"})%>');
|
||||
<% end %>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!--add by huang-->
|
||||
<div class="clearfix"></div>
|
||||
<div id="footer" style="margin-left:-5px;padding-top: 150px;clear: both;font-size: 12px;">
|
||||
<div id="footer" style="margin-left:-5px;padding-top: 20px;clear: both;font-size: 12px;">
|
||||
<div style="border-top:solid 1px #C6E9F1;"></div>
|
||||
<div class="base_footer">
|
||||
<div align="center">
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<%= form_for "tag_for_save",:remote=>true,:url=>tag_path,
|
||||
:update => "tags_show",
|
||||
:complete => "$(\"#put-tag-form-#{obj.class}-#{obj.id}\").hide();" do |f| %>
|
||||
<%= f.text_field :name ,:id => "name",:size=>"28",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length %>
|
||||
<%= f.text_field :name ,:id => "name",:size=>"28",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length,:style=>"width: 100px;"%>
|
||||
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
||||
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
||||
<%= f.submit l(:button_project_tags_add),:class => "small" %>
|
||||
|
|
|
@ -9,8 +9,23 @@
|
|||
|
||||
$(function(){
|
||||
$("#main").find("a").attr("target", "_blank");
|
||||
setCss();
|
||||
});
|
||||
|
||||
|
||||
//设置div居中
|
||||
function setCss()
|
||||
{
|
||||
var mainBar = $('#main-content-bar')[0];
|
||||
var topHeight = mainBar.offsetHeight;
|
||||
var welcomeLeft = $('#welcome_left')[0];
|
||||
var leftHeight = welcomeLeft.offsetHeight;
|
||||
var searchbar = $('#J_Slide')[0];
|
||||
var searchHeight = searchbar.offsetHeight;
|
||||
welcomeLeft.style.marginTop = (topHeight - leftHeight)/2 + "px";
|
||||
searchbar.style.marginTop = (topHeight - searchHeight)/2 + "px";
|
||||
//alert((topHeight - leftHeight)/2 );
|
||||
}
|
||||
|
||||
function showInfo(id, content) {
|
||||
var text = $('#' + id);
|
||||
if (text.val() == '') {
|
||||
|
@ -96,12 +111,12 @@
|
|||
<%= image_tag '/images/qrweixin.jpg', size: '150x150', alt: 'trustie', class: "weixin" %>
|
||||
<div class="weixin-content">微信扫码</div>
|
||||
</div>
|
||||
<div class="main-content-bar">
|
||||
<div class="main-content-bar" id="main-content-bar">
|
||||
<!--文字-->
|
||||
<div style="float: left">
|
||||
<%= image_tag '/images/transparent.png', size: "75x75" %>
|
||||
</div>
|
||||
<div class="welcome_left" >
|
||||
<div class="welcome_left" id="welcome_left">
|
||||
|
||||
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_contest) %></span> <span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_contest_description) %></span>
|
||||
</div>
|
||||
|
|
|
@ -5,8 +5,22 @@
|
|||
|
||||
$(function(){
|
||||
$("#main").find("a").attr("target", "_blank");
|
||||
setCss();
|
||||
});
|
||||
|
||||
//设置div居中
|
||||
function setCss()
|
||||
{
|
||||
var mainBar = $('#main-content-bar')[0];
|
||||
var topHeight = mainBar.offsetHeight;
|
||||
var welcomeLeft = $('#welcome_left')[0];
|
||||
var leftHeight = welcomeLeft.offsetHeight;
|
||||
var searchbar = $('#search-bar')[0];
|
||||
var searchHeight = searchbar.offsetHeight;
|
||||
welcomeLeft.style.marginTop = (topHeight - leftHeight)/2 + "px";
|
||||
searchbar.style.marginTop = (topHeight - searchHeight)/2 + "px";
|
||||
//alert((topHeight - leftHeight)/2 );
|
||||
}
|
||||
// 给主页用户弹新页面
|
||||
$(document).ready(function($) {
|
||||
$("#loggedas").find("a").attr("target", "_blank");
|
||||
|
@ -19,13 +33,12 @@
|
|||
<%= image_tag '/images/qrweixin.jpg', size: '150x150', alt: 'trustie', class: "weixin" %>
|
||||
<div class="weixin-content">微信扫码</div>
|
||||
</div>
|
||||
<div class="main-content-bar">
|
||||
<div class="main-content-bar" id="main-content-bar">
|
||||
<div style="float: left">
|
||||
<%= image_tag(@logoLink, size:'75x75') %>
|
||||
|
||||
</div>
|
||||
<div class="course welcome_left" >
|
||||
<br />
|
||||
<div class="course welcome_left" id="welcome_left" >
|
||||
<span class="font_welcome_school"> <% if params[:school_id].nil? and User.current.user_extensions.school.nil? %>
|
||||
<% else%>
|
||||
<% if params[:school_id] == "0" %>
|
||||
|
@ -48,7 +61,7 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="search-bar">
|
||||
<div class="search-bar" id="search-bar">
|
||||
<%= render :partial => "search_project", :locals => {:project_type => Project::ProjectType_course}%>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
|
|
|
@ -4,8 +4,21 @@
|
|||
|
||||
$(function(){
|
||||
$("#main").find("a").attr("target", "_blank");
|
||||
setCss();
|
||||
});
|
||||
|
||||
//设置div居中
|
||||
function setCss()
|
||||
{
|
||||
var mainBar = $('#main-content-bar')[0];
|
||||
var topHeight = mainBar.offsetHeight;
|
||||
var welcomeLeft = $('#welcome_left')[0];
|
||||
var leftHeight = welcomeLeft.offsetHeight;
|
||||
var searchbar = $('#search-bar')[0];
|
||||
var searchHeight = searchbar.offsetHeight;
|
||||
welcomeLeft.style.marginTop = (topHeight - leftHeight)/2 + "px";
|
||||
searchbar.style.marginTop = (topHeight - searchHeight)/2 + "px";
|
||||
//alert((topHeight - leftHeight)/2 );
|
||||
}
|
||||
// 给主页用户弹新页面
|
||||
$(document).ready(function($) {
|
||||
$("#loggedas").find("a").attr("target", "_blank");
|
||||
|
@ -18,14 +31,14 @@
|
|||
<%= link_to image_tag('/images/qrweixin.jpg', size: '150x150', alt: 'trustie', class: "weixin" ), home_path %>
|
||||
<div class="weixin-content">微信扫码</div>
|
||||
</div>
|
||||
<div class="main-content-bar">
|
||||
<div class="main-content-bar" id="main-content-bar">
|
||||
<div style="float: left">
|
||||
<%= image_tag '/images/transparent.png', size: "75x75" %>
|
||||
</div>
|
||||
<div class="welcome_left" >
|
||||
<div class="welcome_left" id="welcome_left">
|
||||
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_project) %></span> <span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_project_description) %></span>
|
||||
</div>
|
||||
<div class="search-bar">
|
||||
<div class="search-bar" id="search-bar">
|
||||
<%= render :partial => "search_project", :locals => {:project_type => 0}%>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
|
|
|
@ -40,6 +40,7 @@ RedmineApp::Application.routes.draw do
|
|||
end
|
||||
mount SeemsRateable::Engine => '/rateable', :as => :rateable
|
||||
|
||||
|
||||
namespace :zipdown do
|
||||
match 'assort'
|
||||
end
|
||||
|
@ -461,9 +462,11 @@ RedmineApp::Application.routes.draw do
|
|||
get 'attachments/autocomplete'
|
||||
match 'attachments/autocomplete', :to => 'attachments#autocomplete', via: [:post]
|
||||
post 'attachments/relationfile', to: 'attachments#add_exist_file_to_project', as: 'attach_relation'
|
||||
get 'attachments/renderTag/:attchmentId', :to => 'attachments#renderTag', :attchmentId => /\d+/
|
||||
resources :attachments, :only => [:show, :destroy] do
|
||||
collection do
|
||||
match "updateType" , via: [:get, :post]
|
||||
match "renderTag" , via: [:get, :post]
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
/* Redmine - project management software
|
||||
Copyright (C) 2006-2013 Jean-Philippe Lang */
|
||||
|
||||
function postUpMsg(attachmentId)
|
||||
{
|
||||
$.ajax({
|
||||
url: '/attachments/renderTag',
|
||||
type: "GET",
|
||||
data: {
|
||||
attachmentId: attachmentId
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
function addFile(inputEl, file, eagerUpload) {
|
||||
|
||||
if ($('#attachments_fields').children().length < 10) {
|
||||
|
@ -12,14 +23,15 @@ function addFile(inputEl, file, eagerUpload) {
|
|||
fileSpan.append(
|
||||
$('<input>', { 'type': 'text', 'class': 'filename readonly', 'name': 'attachments[' + attachmentId + '][filename]', 'readonly': 'readonly'} ).val(file.name),
|
||||
$('<input>', { 'type': 'text', 'class': 'description', 'name': 'attachments[' + attachmentId + '][description]', 'maxlength': 255, 'placeholder': $(inputEl).data('description-placeholder') } ).toggle(!eagerUpload),
|
||||
$('<a> </a>').attr({ 'href': "#", 'class': 'remove-upload', 'data-confirm' : "您确定要删除吗?" }).click(removeFile).toggle(!eagerUpload)
|
||||
$('<a> </a>').attr({ 'href': "#", 'class': 'remove-upload', 'data-confirm' : "您确定要删除吗?" }).click(removeFile).toggle(!eagerUpload),
|
||||
$('<div>', { 'class': 'div_attachments', 'name': 'div_'+'attachments_' + attachmentId} )
|
||||
).appendTo('#attachments_fields');
|
||||
|
||||
if(eagerUpload) {
|
||||
ajaxUpload(file, attachmentId, fileSpan, inputEl);
|
||||
}
|
||||
|
||||
return attachmentId;
|
||||
if(eagerUpload) {
|
||||
ajaxUpload(file, attachmentId, fileSpan, inputEl);
|
||||
|
||||
}
|
||||
return attachmentId;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -66,7 +78,7 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) {
|
|||
|
||||
//gcm files count and add delete_all link
|
||||
|
||||
var count=$('#attachments_fields>span').length;
|
||||
var count=$('#attachments_fields>span').length;
|
||||
$('#upload_file_count').html("已上传"+"<span id=\"count\">"+count+"</span>"+"个文件");
|
||||
|
||||
if(count>=1){
|
||||
|
|
|
@ -1829,7 +1829,7 @@ fieldset#notified_events .parent { padding-left: 20px; }
|
|||
span.required {color: #bb0000;}
|
||||
.summary {font-style: italic;}
|
||||
|
||||
#attachments_fields input.description {margin-left:4px; width:340px; }
|
||||
#attachments_fields input.description {margin-left:4px; width:100px; }
|
||||
#attachments_fields span {display:block; white-space:nowrap; font-family:'微软雅黑';}
|
||||
#attachments_fields input.filename {border:0; height:1.8em; width:150px; color:#555; background-color:inherit; background:url(../images/attachment.png) no-repeat 1px 50%; padding-left:18px;}/*Modified by young*/
|
||||
#attachments_fields .ajax-waiting input.filename {background:url(../images/hourglass.png) no-repeat 0px 50%;}
|
||||
|
|
|
@ -312,11 +312,11 @@ a.attachments_list_color {
|
|||
}
|
||||
.main-content-bar{
|
||||
margin: 0;
|
||||
margin-top: 35px;
|
||||
margin-top: 12px;
|
||||
padding: 0;
|
||||
margin-bottom: 35px;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-bottom: 2px;
|
||||
width: 100%;
|
||||
height: 78;
|
||||
}
|
||||
|
||||
.weixin-content{
|
||||
|
|
Loading…
Reference in New Issue