sufia 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +12 -1
- data/History.md +10 -0
- data/README.md +1 -6
- data/app/assets/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/app/assets/javascripts/sufia.js +3 -4
- data/app/assets/javascripts/sufia/batch_select_all.js +2 -2
- data/app/controllers/concerns/sufia/users_controller_behavior.rb +133 -0
- data/app/controllers/users_controller.rb +1 -115
- data/app/helpers/trophy_helper.rb +2 -3
- data/app/models/datastreams/properties_datastream.rb +5 -3
- data/app/views/batch/edit.html.erb +7 -3
- data/app/views/batch_edits/edit.html.erb +47 -77
- data/app/views/dashboard/_index_partials/_list_files.html.erb +25 -12
- data/app/views/dashboard/index.html.erb +29 -44
- data/app/views/generic_files/_descriptions.html.erb +17 -17
- data/app/views/generic_files/_permission.html.erb +7 -124
- data/app/views/generic_files/_permission_form.html.erb +123 -0
- data/app/views/generic_files/_versioning.html.erb +1 -1
- data/app/views/generic_files/edit.html.erb +9 -21
- data/app/views/users/_notify_number.html.erb +1 -1
- data/app/views/users/edit.html.erb +1 -1
- data/config/routes.rb +3 -1
- data/lib/sufia.rb +5 -1
- data/lib/sufia/files_controller_behavior.rb +8 -8
- data/lib/sufia/user.rb +4 -8
- data/lib/sufia/version.rb +1 -1
- data/spec/controllers/generic_files_controller_spec.rb +8 -0
- data/spec/controllers/users_controller_spec.rb +22 -0
- data/spec/models/properties_datastream_spec.rb +21 -0
- data/spec/routing/route_spec.rb +1 -0
- data/sufia.gemspec +0 -1
- data/vendor/assets/javascripts/ZeroClipboard.min.js +8 -0
- data/vendor/assets/javascripts/ZeroClipboard.swf +0 -0
- metadata +8 -19
- data/app/assets/javascripts/sufia/tabs.js +0 -58
- data/app/views/catalog/_uva_tabs.html.erb +0 -10
- data/vendor/assets/javascripts/jquery.zclip.min.js +0 -12
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
15
15
|
%>
|
16
16
|
|
17
|
-
<div id="versioning_display">
|
17
|
+
<div id="versioning_display" class="tab-pane">
|
18
18
|
<h2 class="non lower">Versions</h2>
|
19
19
|
<div class="well">
|
20
20
|
<%= form_for @generic_file, :url => sufia.generic_file_path, :html => {:multipart => true, :class => 'form-horizontal'} do |f| %>
|
@@ -33,20 +33,11 @@ function confirmExit(){
|
|
33
33
|
return "Your metadata has not been saved.";
|
34
34
|
}
|
35
35
|
}
|
36
|
-
|
37
|
-
<% if params[:tab] == 'versions' %>
|
38
|
-
versions_tab();
|
39
|
-
<% elsif params[:tab] == 'permissions' %>
|
40
|
-
permissions_tab();
|
41
|
-
<% else %>
|
42
|
-
descriptions_tab();
|
43
|
-
<% end %>
|
44
|
-
|
45
36
|
// only valid for perm tab
|
46
37
|
set_access_levels();
|
47
38
|
|
48
39
|
// initialize popover helpers
|
49
|
-
$("a[rel=popover]").popover();
|
40
|
+
$("a[rel=popover]").popover({ html: true });
|
50
41
|
|
51
42
|
<% end %>
|
52
43
|
|
@@ -62,17 +53,14 @@ $("a[rel=popover]").popover();
|
|
62
53
|
<div class="span68">
|
63
54
|
<%= link_to "<<Browse view".html_safe, sufia.generic_file_path %></li>
|
64
55
|
<ul class="nav nav-tabs">
|
65
|
-
<li id="edit_descriptions_link"><a href="#"><i class="icon-tags"></i> Descriptions</a></li>
|
66
|
-
<li id="edit_versioning_link"><a href="#"><i class="icon-sitemap"></i> Versions</a></li>
|
67
|
-
<li id="edit_permissions_link"><a href="#"><i class="icon-key"></i> Permissions</a></li>
|
56
|
+
<li id="edit_descriptions_link" class="active"><a href="#descriptions_display" data-toggle="tab"><i class="icon-tags"></i> Descriptions</a></li>
|
57
|
+
<li id="edit_versioning_link"><a href="#versioning_display" data-toggle="tab"><i class="icon-sitemap"></i> Versions</a></li>
|
58
|
+
<li id="edit_permissions_link"><a href="#permissions_display" data-toggle="tab"><i class="icon-key"></i> Permissions</a></li>
|
68
59
|
</ul>
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
<%=
|
73
|
-
|
74
|
-
<% end %>
|
75
|
-
|
76
|
-
<%= render :partial => "versioning", :locals => { :generic_file => @generic_file } %>
|
60
|
+
<div class="tab-content">
|
61
|
+
<%= render :partial => "descriptions", :locals => { :generic_file => @generic_file } %>
|
62
|
+
<%= render :partial => "permission", :locals => { :gf => @generic_file} %>
|
63
|
+
<%= render :partial => "versioning", :locals => { :generic_file => @generic_file } %>
|
64
|
+
</div>
|
77
65
|
</div> <!-- /.span68-->
|
78
66
|
</div><!-- /.row -->
|
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
15
15
|
%>
|
16
16
|
|
17
|
-
<i class="icon-bullhorn"
|
17
|
+
<i class="icon-bullhorn"></i>
|
18
18
|
<% if @notify_number > 0 %>
|
19
19
|
<span id="notify_number" class="overlay"> <%=@notify_number%></span>
|
20
20
|
<% end %>
|
data/config/routes.rb
CHANGED
@@ -90,7 +90,9 @@ Sufia::Engine.routes.draw do
|
|
90
90
|
match 'single_use_link/expired' => 'errors#single_use_error'
|
91
91
|
|
92
92
|
# Catch-all (for routing errors)
|
93
|
-
|
93
|
+
unless Rails.env.development? || Rails.env.test?
|
94
|
+
match '*error' => 'errors#routing'
|
95
|
+
end
|
94
96
|
|
95
97
|
end
|
96
98
|
|
data/lib/sufia.rb
CHANGED
@@ -31,7 +31,11 @@ module Sufia
|
|
31
31
|
config.fits_message_length = 5
|
32
32
|
config.temp_file_base = nil
|
33
33
|
|
34
|
-
config.autoload_paths
|
34
|
+
config.autoload_paths += %W(
|
35
|
+
#{config.root}/lib/sufia/jobs
|
36
|
+
#{config.root}/app/controllers/concerns
|
37
|
+
#{config.root}/app/models/concerns
|
38
|
+
)
|
35
39
|
|
36
40
|
initializer "Patch active_fedora" do
|
37
41
|
require 'sufia/active_fedora/redis'
|
@@ -138,14 +138,14 @@ module Sufia
|
|
138
138
|
update_metadata if params[:generic_file]
|
139
139
|
|
140
140
|
#always save the file so the new version or metadata gets recorded
|
141
|
-
@generic_file.save
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
141
|
+
if @generic_file.save
|
142
|
+
# do not trigger an update event if a version event has already been triggered
|
143
|
+
Sufia.queue.push(ContentUpdateEventJob.new(@generic_file.pid, current_user.user_key)) unless version_event
|
144
|
+
@generic_file.record_version_committer(current_user)
|
145
|
+
redirect_to sufia.edit_generic_file_path(:tab => params[:redirect_tab]), :notice => render_to_string(:partial=>'generic_files/asset_updated_flash', :locals => { :generic_file => @generic_file })
|
146
|
+
else
|
147
|
+
render action: 'edit'
|
148
|
+
end
|
149
149
|
end
|
150
150
|
|
151
151
|
protected
|
data/lib/sufia/user.rb
CHANGED
@@ -43,14 +43,10 @@ module Sufia::User
|
|
43
43
|
|
44
44
|
end
|
45
45
|
|
46
|
-
#
|
47
|
-
#
|
48
|
-
def
|
49
|
-
|
50
|
-
end
|
51
|
-
|
52
|
-
def to_s
|
53
|
-
user_key
|
46
|
+
# Format the json for select2 which requires just an id and a field called text.
|
47
|
+
# If we need an alternate format we should probably look at a json template gem
|
48
|
+
def as_json(opts = nil)
|
49
|
+
{id: user_key, text: display_name ? "#{display_name} (#{user_key})" : user_key}
|
54
50
|
end
|
55
51
|
|
56
52
|
def email_address
|
data/lib/sufia/version.rb
CHANGED
@@ -344,6 +344,14 @@ describe GenericFilesController do
|
|
344
344
|
post :update, :id=>@generic_file.pid, :filedata=>file, :Filename=>"The world", :generic_file=>{:tag=>[''], :permissions=>{:new_user_name=>{'archivist1'=>'edit'}}}
|
345
345
|
end
|
346
346
|
|
347
|
+
it "should go back to edit on an error" do
|
348
|
+
GenericFile.any_instance.should_receive(:valid?).and_return(false)
|
349
|
+
post :update, :id=>@generic_file.pid, :generic_file=>{:tag=>['']}
|
350
|
+
response.should be_successful
|
351
|
+
response.should render_template('edit')
|
352
|
+
assigns[:generic_file].should == @generic_file
|
353
|
+
end
|
354
|
+
|
347
355
|
end
|
348
356
|
|
349
357
|
describe "someone elses files" do
|
@@ -41,6 +41,28 @@ describe UsersController do
|
|
41
41
|
flash[:alert].should include ("User 'johndoe666' does not exist")
|
42
42
|
end
|
43
43
|
end
|
44
|
+
describe "#index" do
|
45
|
+
before do
|
46
|
+
@u1 = FactoryGirl.find_or_create(:archivist)
|
47
|
+
@u2 = FactoryGirl.find_or_create(:curator)
|
48
|
+
end
|
49
|
+
describe "requesting html" do
|
50
|
+
it "should test users" do
|
51
|
+
get :index
|
52
|
+
assigns[:users].should include(@u1, @u2)
|
53
|
+
response.should be_successful
|
54
|
+
end
|
55
|
+
end
|
56
|
+
describe "requesting json" do
|
57
|
+
it "should display users" do
|
58
|
+
get :index, format: :json
|
59
|
+
response.should be_successful
|
60
|
+
json = JSON.parse(response.body)
|
61
|
+
json.map{|u| u['id']}.should include(@u1.email, @u2.email)
|
62
|
+
json.map{|u| u['text']}.should include(@u1.email, @u2.email)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
44
66
|
describe "#edit" do
|
45
67
|
it "show edit form when user edits own profile" do
|
46
68
|
get :edit, uid: @user.user_key
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe PropertiesDatastream do
|
4
|
+
it "should have proxy_depositor" do
|
5
|
+
subject.proxy_depositor = 'kim@example.com'
|
6
|
+
subject.proxy_depositor.should == ['kim@example.com']
|
7
|
+
subject.ng_xml.to_xml.should be_equivalent_to "<?xml version=\"1.0\"?><fields><proxyDepositor>kim@example.com</proxyDepositor></fields>"
|
8
|
+
end
|
9
|
+
|
10
|
+
describe "to_solr" do
|
11
|
+
before do
|
12
|
+
@doc = PropertiesDatastream.new.tap do |ds|
|
13
|
+
ds.proxy_depositor = 'kim@example.com'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
subject { @doc.to_solr}
|
17
|
+
it "should have proxy_depositor" do
|
18
|
+
subject['proxy_depositor_ssim'].should == ['kim@example.com']
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/spec/routing/route_spec.rb
CHANGED
@@ -215,6 +215,7 @@ describe 'Routes' do
|
|
215
215
|
|
216
216
|
describe "Catch-all" do
|
217
217
|
it "should route non-existent routes to errors" do
|
218
|
+
pending "The default route is turned off in testing, so that errors are raised"
|
218
219
|
{ get: '/awesome' }.should route_to(controller: 'errors', action: 'routing', error: 'awesome')
|
219
220
|
end
|
220
221
|
end
|
data/sufia.gemspec
CHANGED
@@ -34,7 +34,6 @@ Gem::Specification.new do |gem|
|
|
34
34
|
gem.add_dependency 'rails_autolink', '1.0.9'
|
35
35
|
gem.add_dependency 'acts_as_follower', '0.1.1'
|
36
36
|
gem.add_dependency 'nest', '1.1.1'
|
37
|
-
gem.add_dependency 'sitemap', '0.3.2'
|
38
37
|
gem.add_dependency 'yaml_db', '0.2.3'
|
39
38
|
gem.add_dependency 'mailboxer', '0.8.0'
|
40
39
|
gem.add_dependency 'rainbow', '1.1.4'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/*!
|
2
|
+
* zeroclipboard
|
3
|
+
* The Zero Clipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie, and a JavaScript interface.
|
4
|
+
* Copyright 2012 Jon Rohan, James M. Greene, .
|
5
|
+
* Released under the MIT license
|
6
|
+
* http://jonrohan.github.com/ZeroClipboard/
|
7
|
+
* v1.1.7
|
8
|
+
*/(function(){"use strict";var a=function(a,b){var c=a.style[b];a.currentStyle?c=a.currentStyle[b]:window.getComputedStyle&&(c=document.defaultView.getComputedStyle(a,null).getPropertyValue(b));if(c=="auto"&&b=="cursor"){var d=["a"];for(var e=0;e<d.length;e++)if(a.tagName.toLowerCase()==d[e])return"pointer"}return c},b=function(a){if(!l.prototype._singleton)return;a||(a=window.event);var b;this!==window?b=this:a.target?b=a.target:a.srcElement&&(b=a.srcElement),l.prototype._singleton.setCurrent(b)},c=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)},d=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c)},e=function(a,b){if(a.addClass)return a.addClass(b),a;if(b&&typeof b=="string"){var c=(b||"").split(/\s+/);if(a.nodeType===1)if(!a.className)a.className=b;else{var d=" "+a.className+" ",e=a.className;for(var f=0,g=c.length;f<g;f++)d.indexOf(" "+c[f]+" ")<0&&(e+=" "+c[f]);a.className=e.replace(/^\s+|\s+$/g,"")}}return a},f=function(a,b){if(a.removeClass)return a.removeClass(b),a;if(b&&typeof b=="string"||b===undefined){var c=(b||"").split(/\s+/);if(a.nodeType===1&&a.className)if(b){var d=(" "+a.className+" ").replace(/[\n\t]/g," ");for(var e=0,f=c.length;e<f;e++)d=d.replace(" "+c[e]+" "," ");a.className=d.replace(/^\s+|\s+$/g,"")}else a.className=""}return a},g=function(b){var c={left:0,top:0,width:b.width||b.offsetWidth||0,height:b.height||b.offsetHeight||0,zIndex:9999},d=a(b,"zIndex");d&&d!="auto"&&(c.zIndex=parseInt(d,10));while(b){var e=parseInt(a(b,"borderLeftWidth"),10),f=parseInt(a(b,"borderTopWidth"),10);c.left+=isNaN(b.offsetLeft)?0:b.offsetLeft,c.left+=isNaN(e)?0:e,c.top+=isNaN(b.offsetTop)?0:b.offsetTop,c.top+=isNaN(f)?0:f,b=b.offsetParent}return c},h=function(a){return(a.indexOf("?")>=0?"&":"?")+"nocache="+(new Date).getTime()},i=function(a){var b=[];return a.trustedDomains&&(typeof a.trustedDomains=="string"?b.push("trustedDomain="+a.trustedDomains):b.push("trustedDomain="+a.trustedDomains.join(","))),b.join("&")},j=function(a,b){if(b.indexOf)return b.indexOf(a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},k=function(a){if(typeof a=="string")throw new TypeError("ZeroClipboard doesn't accept query strings.");return a.length?a:[a]},l=function(a,b){a&&(l.prototype._singleton||this).glue(a);if(l.prototype._singleton)return l.prototype._singleton;l.prototype._singleton=this,this.options={};for(var c in o)this.options[c]=o[c];for(var d in b)this.options[d]=b[d];this.handlers={},l.detectFlashSupport()&&p()},m,n=[];l.prototype.setCurrent=function(b){m=b,this.reposition(),b.getAttribute("title")&&this.setTitle(b.getAttribute("title")),this.setHandCursor(a(b,"cursor")=="pointer")},l.prototype.setText=function(a){a&&a!==""&&(this.options.text=a,this.ready()&&this.flashBridge.setText(a))},l.prototype.setTitle=function(a){a&&a!==""&&this.htmlBridge.setAttribute("title",a)},l.prototype.setSize=function(a,b){this.ready()&&this.flashBridge.setSize(a,b)},l.prototype.setHandCursor=function(a){this.ready()&&this.flashBridge.setHandCursor(a)},l.version="1.1.7";var o={moviePath:"ZeroClipboard.swf",trustedDomains:null,text:null,hoverClass:"zeroclipboard-is-hover",activeClass:"zeroclipboard-is-active",allowScriptAccess:"sameDomain"};l.setDefaults=function(a){for(var b in a)o[b]=a[b]},l.destroy=function(){l.prototype._singleton.unglue(n);var a=l.prototype._singleton.htmlBridge;a.parentNode.removeChild(a),delete l.prototype._singleton},l.detectFlashSupport=function(){var a=!1;try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash")&&(a=!0)}catch(b){navigator.mimeTypes["application/x-shockwave-flash"]&&(a=!0)}return a};var p=function(){var a=l.prototype._singleton,b=document.getElementById("global-zeroclipboard-html-bridge");if(!b){var c=' <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="global-zeroclipboard-flash-bridge" width="100%" height="100%"> <param name="movie" value="'+a.options.moviePath+h(a.options.moviePath)+'"/> <param name="allowScriptAccess" value="'+a.options.allowScriptAccess+'"/> <param name="scale" value="exactfit"/> <param name="loop" value="false"/> <param name="menu" value="false"/> <param name="quality" value="best" /> <param name="bgcolor" value="#ffffff"/> <param name="wmode" value="transparent"/> <param name="flashvars" value="'+i(a.options)+'"/> <embed src="'+a.options.moviePath+h(a.options.moviePath)+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="100%" height="100%" name="global-zeroclipboard-flash-bridge" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+i(a.options)+'" scale="exactfit"> </embed> </object>';b=document.createElement("div"),b.id="global-zeroclipboard-html-bridge",b.setAttribute("class","global-zeroclipboard-container"),b.setAttribute("data-clipboard-ready",!1),b.style.position="absolute",b.style.left="-9999px",b.style.top="-9999px",b.style.width="15px",b.style.height="15px",b.style.zIndex="9999",b.innerHTML=c,document.body.appendChild(b)}a.htmlBridge=b,a.flashBridge=document["global-zeroclipboard-flash-bridge"]||b.children[0].lastElementChild};l.prototype.resetBridge=function(){this.htmlBridge.style.left="-9999px",this.htmlBridge.style.top="-9999px",this.htmlBridge.removeAttribute("title"),this.htmlBridge.removeAttribute("data-clipboard-text"),f(m,this.options.activeClass),m=null,this.options.text=null},l.prototype.ready=function(){var a=this.htmlBridge.getAttribute("data-clipboard-ready");return a==="true"||a===!0},l.prototype.reposition=function(){if(!m)return!1;var a=g(m);this.htmlBridge.style.top=a.top+"px",this.htmlBridge.style.left=a.left+"px",this.htmlBridge.style.width=a.width+"px",this.htmlBridge.style.height=a.height+"px",this.htmlBridge.style.zIndex=a.zIndex+1,this.setSize(a.width,a.height)},l.dispatch=function(a,b){l.prototype._singleton.receiveEvent(a,b)},l.prototype.on=function(a,b){var c=a.toString().split(/\s/g);for(var d=0;d<c.length;d++)a=c[d].toLowerCase().replace(/^on/,""),this.handlers[a]||(this.handlers[a]=b);this.handlers.noflash&&!l.detectFlashSupport()&&this.receiveEvent("onNoFlash",null)},l.prototype.addEventListener=l.prototype.on,l.prototype.off=function(a,b){var c=a.toString().split(/\s/g);for(var d=0;d<c.length;d++){a=c[d].toLowerCase().replace(/^on/,"");for(var e in this.handlers)e===a&&this.handlers[e]===b&&delete this.handlers[e]}},l.prototype.removeEventListener=l.prototype.off,l.prototype.receiveEvent=function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");var c=m;switch(a){case"load":if(b&&parseFloat(b.flashVersion.replace(",",".").replace(/[^0-9\.]/gi,""))<10){this.receiveEvent("onWrongFlash",{flashVersion:b.flashVersion});return}this.htmlBridge.setAttribute("data-clipboard-ready",!0);break;case"mouseover":e(c,this.options.hoverClass);break;case"mouseout":f(c,this.options.hoverClass),this.resetBridge();break;case"mousedown":e(c,this.options.activeClass);break;case"mouseup":f(c,this.options.activeClass);break;case"datarequested":var d=c.getAttribute("data-clipboard-target"),g=d?document.getElementById(d):null;if(g){var h=g.value||g.textContent||g.innerText;h&&this.setText(h)}else{var i=c.getAttribute("data-clipboard-text");i&&this.setText(i)}break;case"complete":this.options.text=null}if(this.handlers[a]){var j=this.handlers[a];typeof j=="function"?j.call(c,this,b):typeof j=="string"&&window[j].call(c,this,b)}},l.prototype.glue=function(a){a=k(a);for(var d=0;d<a.length;d++)j(a[d],n)==-1&&(n.push(a[d]),c(a[d],"mouseover",b))},l.prototype.unglue=function(a){a=k(a);for(var c=0;c<a.length;c++){d(a[c],"mouseover",b);var e=j(a[c],n);e!=-1&&n.splice(e,1)}},typeof module!="undefined"?module.exports=l:typeof define=="function"&&define.amd?define(function(){return l}):window.ZeroClipboard=l})();
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sufia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -248,20 +248,6 @@ dependencies:
|
|
248
248
|
- - '='
|
249
249
|
- !ruby/object:Gem::Version
|
250
250
|
version: 1.1.1
|
251
|
-
- !ruby/object:Gem::Dependency
|
252
|
-
name: sitemap
|
253
|
-
requirement: !ruby/object:Gem::Requirement
|
254
|
-
requirements:
|
255
|
-
- - '='
|
256
|
-
- !ruby/object:Gem::Version
|
257
|
-
version: 0.3.2
|
258
|
-
type: :runtime
|
259
|
-
prerelease: false
|
260
|
-
version_requirements: !ruby/object:Gem::Requirement
|
261
|
-
requirements:
|
262
|
-
- - '='
|
263
|
-
- !ruby/object:Gem::Version
|
264
|
-
version: 0.3.2
|
265
251
|
- !ruby/object:Gem::Dependency
|
266
252
|
name: yaml_db
|
267
253
|
requirement: !ruby/object:Gem::Requirement
|
@@ -397,6 +383,7 @@ files:
|
|
397
383
|
- app/assets/images/ui-bg_diagonals-thick_18_b81900_40x40.png
|
398
384
|
- app/assets/images/ui-bg_diagonals-thick_20_666666_40x40.png
|
399
385
|
- app/assets/images/ui-bg_flat_10_000000_40x100.png
|
386
|
+
- app/assets/images/ui-bg_flat_75_ffffff_40x100.png
|
400
387
|
- app/assets/images/ui-bg_glass_100_f6f6f6_1x400.png
|
401
388
|
- app/assets/images/ui-bg_glass_100_fdf5ce_1x400.png
|
402
389
|
- app/assets/images/ui-bg_glass_65_ffffff_1x400.png
|
@@ -415,7 +402,6 @@ files:
|
|
415
402
|
- app/assets/javascripts/sufia/edit_metadata.js
|
416
403
|
- app/assets/javascripts/sufia/multiForm.js
|
417
404
|
- app/assets/javascripts/sufia/permissions.js
|
418
|
-
- app/assets/javascripts/sufia/tabs.js
|
419
405
|
- app/assets/javascripts/sufia/trophy.js
|
420
406
|
- app/assets/javascripts/terms_of_service.js
|
421
407
|
- app/assets/stylesheets/audio-js.css
|
@@ -440,6 +426,7 @@ files:
|
|
440
426
|
- app/controllers/authorities_controller.rb
|
441
427
|
- app/controllers/batch_controller.rb
|
442
428
|
- app/controllers/batch_edits_controller.rb
|
429
|
+
- app/controllers/concerns/sufia/users_controller_behavior.rb
|
443
430
|
- app/controllers/contact_form_controller.rb
|
444
431
|
- app/controllers/dashboard_controller.rb
|
445
432
|
- app/controllers/directory_controller.rb
|
@@ -535,7 +522,6 @@ files:
|
|
535
522
|
- app/views/catalog/_show_tools.html.erb
|
536
523
|
- app/views/catalog/_sms_form.html.erb
|
537
524
|
- app/views/catalog/_sort_and_per_page.html.erb
|
538
|
-
- app/views/catalog/_uva_tabs.html.erb
|
539
525
|
- app/views/catalog/about.html.erb
|
540
526
|
- app/views/catalog/citation.html.erb
|
541
527
|
- app/views/catalog/email.erb
|
@@ -590,6 +576,7 @@ files:
|
|
590
576
|
- app/views/generic_files/_media_display.html.erb
|
591
577
|
- app/views/generic_files/_multiple_upload.html.erb
|
592
578
|
- app/views/generic_files/_permission.html.erb
|
579
|
+
- app/views/generic_files/_permission_form.html.erb
|
593
580
|
- app/views/generic_files/_rights_modal.html.erb
|
594
581
|
- app/views/generic_files/_show_actions.html.erb
|
595
582
|
- app/views/generic_files/_show_descriptions.html.erb
|
@@ -823,6 +810,7 @@ files:
|
|
823
810
|
- spec/models/fits_datastream_spec.rb
|
824
811
|
- spec/models/generic_file_spec.rb
|
825
812
|
- spec/models/local_authority_spec.rb
|
813
|
+
- spec/models/properties_datastream_spec.rb
|
826
814
|
- spec/models/single_use_link_spec.rb
|
827
815
|
- spec/models/solr_document_spec.rb
|
828
816
|
- spec/models/transcode_audio_job_spec.rb
|
@@ -855,6 +843,7 @@ files:
|
|
855
843
|
- vendor/assets/fonts/fontawesome-webfont.woff
|
856
844
|
- vendor/assets/images/player-graphics.gif
|
857
845
|
- vendor/assets/images/video-js.png
|
846
|
+
- vendor/assets/javascripts/ZeroClipboard.min.js
|
858
847
|
- vendor/assets/javascripts/ZeroClipboard.swf
|
859
848
|
- vendor/assets/javascripts/audio.min.js
|
860
849
|
- vendor/assets/javascripts/audiojs.swf
|
@@ -875,7 +864,6 @@ files:
|
|
875
864
|
- vendor/assets/javascripts/jquery-ui-1.9.2/jquery.ui.position.js
|
876
865
|
- vendor/assets/javascripts/jquery-ui-1.9.2/jquery.ui.widget.js
|
877
866
|
- vendor/assets/javascripts/jquery.validate.js
|
878
|
-
- vendor/assets/javascripts/jquery.zclip.min.js
|
879
867
|
- vendor/assets/javascripts/swfobject.js
|
880
868
|
- vendor/assets/javascripts/video.js
|
881
869
|
- vendor/plugins/.gitkeep
|
@@ -996,6 +984,7 @@ test_files:
|
|
996
984
|
- spec/models/fits_datastream_spec.rb
|
997
985
|
- spec/models/generic_file_spec.rb
|
998
986
|
- spec/models/local_authority_spec.rb
|
987
|
+
- spec/models/properties_datastream_spec.rb
|
999
988
|
- spec/models/single_use_link_spec.rb
|
1000
989
|
- spec/models/solr_document_spec.rb
|
1001
990
|
- spec/models/transcode_audio_job_spec.rb
|
@@ -1,58 +0,0 @@
|
|
1
|
-
$(function() {
|
2
|
-
// called from edit object view
|
3
|
-
$('#edit_descriptions_link').on('click', function(e) {
|
4
|
-
e.preventDefault();
|
5
|
-
descriptions_tab();
|
6
|
-
});
|
7
|
-
|
8
|
-
// called from edit object view
|
9
|
-
$('#edit_versioning_link').on('click', function(e) {
|
10
|
-
e.preventDefault();
|
11
|
-
versions_tab();
|
12
|
-
});
|
13
|
-
|
14
|
-
// called from edit object view
|
15
|
-
$('#edit_permissions_link').on('click', function(e) {
|
16
|
-
e.preventDefault();
|
17
|
-
permissions_tab();
|
18
|
-
});
|
19
|
-
});
|
20
|
-
|
21
|
-
// all called from edit object view
|
22
|
-
// when permissions link is clicked on edit object
|
23
|
-
function permissions_tab ()
|
24
|
-
{
|
25
|
-
$('#edit_permissions_link').attr('class', 'active');
|
26
|
-
$('#edit_versioning_link').attr('class', '');
|
27
|
-
$('#edit_descriptions_link').attr('class', '');
|
28
|
-
|
29
|
-
$('#descriptions_display').hide();
|
30
|
-
$('#versioning_display').hide();
|
31
|
-
$('#permissions_display').show();
|
32
|
-
$('#permissions_submit').show();
|
33
|
-
}
|
34
|
-
// when versions link is clicked on edit object
|
35
|
-
function versions_tab()
|
36
|
-
{
|
37
|
-
$('#edit_descriptions_link').attr('class', '');
|
38
|
-
$('#edit_versioning_link').attr('class', 'active');
|
39
|
-
$('#edit_permissions_link').attr('class', '');
|
40
|
-
|
41
|
-
$('#descriptions_display').hide();
|
42
|
-
$('#versioning_display').show();
|
43
|
-
$('#permissions_display').hide();
|
44
|
-
$('#permissions_submit').hide();
|
45
|
-
}
|
46
|
-
// when descriptions link is clicked on edit object
|
47
|
-
function descriptions_tab ()
|
48
|
-
{
|
49
|
-
$('#edit_descriptions_link').attr('class', 'active');
|
50
|
-
$('#edit_versioning_link').attr('class', '');
|
51
|
-
$('#edit_permissions_link').attr('class', '');
|
52
|
-
|
53
|
-
$('#descriptions_display').show();
|
54
|
-
$('#versioning_display').hide();
|
55
|
-
$('#permissions_display').hide();
|
56
|
-
$('#permissions_submit').hide();
|
57
|
-
}
|
58
|
-
|
@@ -1,10 +0,0 @@
|
|
1
|
-
<ul>
|
2
|
-
<li>
|
3
|
-
<% display_class = (!params[:home_context] || params[:home_context]=='authors') ? 'class="selected"' : '' %>
|
4
|
-
<a <%= display_class %> href="/catalog?home_context=authors">Authors</a>
|
5
|
-
</li>
|
6
|
-
<li>
|
7
|
-
<% display_class = params[:home_context]=='journals' ? 'class="selected"' : '' %>
|
8
|
-
<a <%= display_class %> href="/catalog?home_context=journals">Journals</a>
|
9
|
-
</li>
|
10
|
-
</ul>
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* zClip :: jQuery ZeroClipboard v1.1.1
|
3
|
-
* http://steamdev.com/zclip
|
4
|
-
*
|
5
|
-
* Copyright 2011, SteamDev
|
6
|
-
* Released under the MIT license.
|
7
|
-
* http://www.opensource.org/licenses/mit-license.php
|
8
|
-
*
|
9
|
-
* Date: Wed Jun 01, 2011
|
10
|
-
*/
|
11
|
-
|
12
|
-
(function(a){a.fn.zclip=function(c){if(typeof c=="object"&&!c.length){var b=a.extend({path:"ZeroClipboard.swf",copy:null,beforeCopy:null,afterCopy:null,clickAfter:true,setHandCursor:true,setCSSEffects:true},c);return this.each(function(){var e=a(this);if(e.is(":visible")&&(typeof b.copy=="string"||a.isFunction(b.copy))){ZeroClipboard.setMoviePath(b.path);var d=new ZeroClipboard.Client();if(a.isFunction(b.copy)){e.bind("zClip_copy",b.copy)}if(a.isFunction(b.beforeCopy)){e.bind("zClip_beforeCopy",b.beforeCopy)}if(a.isFunction(b.afterCopy)){e.bind("zClip_afterCopy",b.afterCopy)}d.setHandCursor(b.setHandCursor);d.setCSSEffects(b.setCSSEffects);d.addEventListener("mouseOver",function(f){e.trigger("mouseenter")});d.addEventListener("mouseOut",function(f){e.trigger("mouseleave")});d.addEventListener("mouseDown",function(f){e.trigger("mousedown");if(!a.isFunction(b.copy)){d.setText(b.copy)}else{d.setText(e.triggerHandler("zClip_copy"))}if(a.isFunction(b.beforeCopy)){e.trigger("zClip_beforeCopy")}});d.addEventListener("complete",function(f,g){if(a.isFunction(b.afterCopy)){e.trigger("zClip_afterCopy")}else{if(g.length>500){g=g.substr(0,500)+"...\n\n("+(g.length-500)+" characters not shown)"}e.removeClass("hover");alert("Copied text to clipboard:\n\n "+g)}if(b.clickAfter){e.trigger("click")}});d.glue(e[0],e.parent()[0]);a(window).bind("load resize",function(){d.reposition()})}})}else{if(typeof c=="string"){return this.each(function(){var f=a(this);c=c.toLowerCase();var e=f.data("zclipId");var d=a("#"+e+".zclip");if(c=="remove"){d.remove();f.removeClass("active hover")}else{if(c=="hide"){d.hide();f.removeClass("active hover")}else{if(c=="show"){d.show()}}}})}}}})(jQuery);var ZeroClipboard={version:"1.0.7",clients:{},moviePath:"ZeroClipboard.swf",nextId:1,$:function(a){if(typeof(a)=="string"){a=document.getElementById(a)}if(!a.addClass){a.hide=function(){this.style.display="none"};a.show=function(){this.style.display=""};a.addClass=function(b){this.removeClass(b);this.className+=" "+b};a.removeClass=function(d){var e=this.className.split(/\s+/);var b=-1;for(var c=0;c<e.length;c++){if(e[c]==d){b=c;c=e.length}}if(b>-1){e.splice(b,1);this.className=e.join(" ")}return this};a.hasClass=function(b){return !!this.className.match(new RegExp("\\s*"+b+"\\s*"))}}return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(d,b,c){var a=this.clients[d];if(a){a.receiveEvent(b,c)}},register:function(b,a){this.clients[b]=a},getDOMObjectPosition:function(c,a){var b={left:0,top:0,width:c.width?c.width:c.offsetWidth,height:c.height?c.height:c.offsetHeight};if(c&&(c!=a)){b.left+=c.offsetLeft;b.top+=c.offsetTop}return b},Client:function(a){this.handlers={};this.id=ZeroClipboard.nextId++;this.movieId="ZeroClipboardMovie_"+this.id;ZeroClipboard.register(this.id,this);if(a){this.glue(a)}}};ZeroClipboard.Client.prototype={id:0,ready:false,movie:null,clipText:"",handCursorEnabled:true,cssEffects:true,handlers:null,glue:function(d,b,e){this.domElement=ZeroClipboard.$(d);var f=99;if(this.domElement.style.zIndex){f=parseInt(this.domElement.style.zIndex,10)+1}if(typeof(b)=="string"){b=ZeroClipboard.$(b)}else{if(typeof(b)=="undefined"){b=document.getElementsByTagName("body")[0]}}var c=ZeroClipboard.getDOMObjectPosition(this.domElement,b);this.div=document.createElement("div");this.div.className="zclip";this.div.id="zclip-"+this.movieId;$(this.domElement).data("zclipId","zclip-"+this.movieId);var a=this.div.style;a.position="absolute";a.left=""+c.left+"px";a.top=""+c.top+"px";a.width=""+c.width+"px";a.height=""+c.height+"px";a.zIndex=f;if(typeof(e)=="object"){for(addedStyle in e){a[addedStyle]=e[addedStyle]}}b.appendChild(this.div);this.div.innerHTML=this.getHTML(c.width,c.height)},getHTML:function(d,a){var c="";var b="id="+this.id+"&width="+d+"&height="+a;if(navigator.userAgent.match(/MSIE/)){var e=location.href.match(/^https/i)?"https://":"http://";c+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+e+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+d+'" height="'+a+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+b+'"/><param name="wmode" value="transparent"/></object>'}else{c+='<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+d+'" height="'+a+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+b+'" wmode="transparent" />'}return c},hide:function(){if(this.div){this.div.style.left="-2000px"}},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.domElement=null;this.div=null}},reposition:function(c){if(c){this.domElement=ZeroClipboard.$(c);if(!this.domElement){this.hide()}}if(this.domElement&&this.div){var b=ZeroClipboard.getDOMObjectPosition(this.domElement);var a=this.div.style;a.left=""+b.left+"px";a.top=""+b.top+"px"}},setText:function(a){this.clipText=a;if(this.ready){this.movie.setText(a)}},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");if(!this.handlers[a]){this.handlers[a]=[]}this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a;if(this.ready){this.movie.setHandCursor(a)}},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(d,f){d=d.toString().toLowerCase().replace(/^on/,"");switch(d){case"load":this.movie=document.getElementById(this.movieId);if(!this.movie){var c=this;setTimeout(function(){c.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){var c=this;setTimeout(function(){c.receiveEvent("load",null)},100);this.ready=true;return}this.ready=true;try{this.movie.setText(this.clipText)}catch(h){}try{this.movie.setHandCursor(this.handCursorEnabled)}catch(h){}break;case"mouseover":if(this.domElement&&this.cssEffects){this.domElement.addClass("hover");if(this.recoverActive){this.domElement.addClass("active")}}break;case"mouseout":if(this.domElement&&this.cssEffects){this.recoverActive=false;if(this.domElement.hasClass("active")){this.domElement.removeClass("active");this.recoverActive=true}this.domElement.removeClass("hover")}break;case"mousedown":if(this.domElement&&this.cssEffects){this.domElement.addClass("active")}break;case"mouseup":if(this.domElement&&this.cssEffects){this.domElement.removeClass("active");this.recoverActive=false}break}if(this.handlers[d]){for(var b=0,a=this.handlers[d].length;b<a;b++){var g=this.handlers[d][b];if(typeof(g)=="function"){g(this,f)}else{if((typeof(g)=="object")&&(g.length==2)){g[0][g[1]](this,f)}else{if(typeof(g)=="string"){window[g](this,f)}}}}}}};
|