资源库

This commit is contained in:
lizanle 2015-08-18 17:45:14 +08:00
parent 43d57074e5
commit 3836cfb40b
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<%= form_tag( url_for(:controller => 'users',:action => 'resource_search',:id=>user.id),
:remote=>true ,:method => 'post',:class=>'resourcesSearchloadBox',:id=>'resource_search_form') do %>
<input type="text" name="search" placeholder="输入资源关键词进行" class="searchResource" />
<input type="text" name="search" placeholder="输入资源关键词进行搜索" class="searchResource" />
<%= hidden_field_tag(:type,type) %>
<%= submit_tag '',:class=>'searchIcon',:style=>'border-style:none' %>
<!--<a href="javascript:void(0);" onclick='this.parent.submit();return false;' class="searchIcon"></a>-->

View File

@ -216,7 +216,10 @@ $(".resourcesList").click(function(e) {
function restore(){
//上一行不为空 且链接不为空
if( last_line != null && res_link != null && res_link != '') {
name = $("#res_name") ? $("#res_name").val().trim() : $("#res_name") ;
name = $("#res_name").lenght != 0 && $("#res_name").val() != undefined ? $("#res_name").val().trim() : undefined ;
if (name == undefined || name === 'undefined' ){ //只要res_name没有值那么就不是编辑状态
return;
}
if( name && name != res_name.trim()){
if(confirm('确定修改为 '+name)){