sufia 1.3.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -3
- data/Gemfile +1 -0
- data/Releasing_sufia.md +3 -0
- data/SUFIA_VERSION +1 -0
- data/app/assets/javascripts/sufia.js +22 -24
- data/app/assets/javascripts/sufia/batch_select_all.js +2 -0
- data/app/assets/javascripts/sufia/fileupload.js +6 -0
- data/app/assets/javascripts/sufia/uploader.js +165 -0
- data/app/assets/javascripts/terms_of_service.js +36 -30
- data/app/assets/stylesheets/{scholarsphere-bootstrap.css → application-bootstrap.css} +0 -0
- data/app/assets/stylesheets/sufia.css.scss +1 -1
- data/app/controllers/batch_controller.rb +1 -0
- data/app/controllers/concerns/sufia/users_controller_behavior.rb +2 -1
- data/app/helpers/generic_file_helper.rb +17 -0
- data/{lib/sufia → app}/jobs/content_delete_event_job.rb +0 -0
- data/{lib/sufia → app}/jobs/content_deposit_event_job.rb +0 -0
- data/{lib/sufia → app}/jobs/content_new_version_event_job.rb +0 -0
- data/{lib/sufia → app}/jobs/content_restored_version_event_job.rb +0 -0
- data/{lib/sufia → app}/jobs/content_update_event_job.rb +0 -0
- data/{lib/sufia → app}/jobs/event_job.rb +0 -0
- data/{lib/sufia → app}/jobs/user_edit_profile_event_job.rb +0 -0
- data/{lib/sufia → app}/jobs/user_follow_event_job.rb +0 -0
- data/{lib/sufia → app}/jobs/user_unfollow_event_job.rb +0 -0
- data/app/models/contact_form.rb +2 -2
- data/app/views/_ga.html.erb +2 -2
- data/app/views/batch_edits/_batch_edits_actions.html.erb +1 -0
- data/app/views/batch_edits/_check_all.html.erb +1 -2
- data/app/views/catalog/_sort_and_per_page.html.erb +1 -1
- data/app/views/dashboard/_batch_edits_actions.html.erb +2 -0
- data/app/views/dashboard/_sort_and_per_page.html.erb +1 -1
- data/app/views/generic_files/_breadcrumbs.html.erb +5 -1
- data/app/views/generic_files/_descriptions.html.erb +6 -4
- data/app/views/generic_files/_dropbox_import.html.erb +3 -0
- data/app/views/generic_files/_field_display.html.erb +12 -0
- data/app/views/generic_files/_field_form.html.erb +1 -1
- data/app/views/generic_files/_multiple_upload.html.erb +4 -135
- data/app/views/generic_files/_permission_form.html.erb +5 -5
- data/app/views/generic_files/_show_descriptions.html.erb +6 -14
- data/app/views/generic_files/_show_details.html.erb +2 -2
- data/app/views/generic_files/edit_fields/_resource_type.html.erb +9 -0
- data/app/views/generic_files/edit_fields/_rights.html.erb +1 -1
- data/app/views/generic_files/edit_fields/_type.html.erb +4 -1
- data/app/views/generic_files/new.html.erb +18 -1
- data/app/views/generic_files/show_fields/_default.html.erb +12 -0
- data/app/views/generic_files/upload/_agreement.html.erb +5 -0
- data/app/views/generic_files/upload/_alerts.html.erb +19 -0
- data/app/views/generic_files/upload/_dropbox_chooser.html.erb +39 -0
- data/app/views/generic_files/upload/_form.html.erb +6 -0
- data/app/views/generic_files/upload/_form_fields.html.erb +47 -0
- data/app/views/generic_files/upload/_script_templates.html.erb +61 -0
- data/app/views/generic_files/upload/_tos_checkbox.html.erb +3 -0
- data/app/views/layouts/_head-tag-content.html.erb +22 -0
- data/app/views/layouts/{hydra-head.html.erb → homepage.html.erb} +3 -44
- data/app/views/layouts/sufia-one-column.html.erb +43 -0
- data/app/views/layouts/sufia-two-column.html.erb +45 -0
- data/app/views/static/agreement.html.erb +12 -11
- data/app/views/static/mendeley.html.erb +2 -2
- data/app/views/static/terms.html.erb +11 -11
- data/app/views/static/zotero.html.erb +2 -2
- data/config/initializers/sufia_events.rb +3 -0
- data/config/locales/sufia.en.yml +3 -6
- data/features/step_definitions/{scholarsphere.rb → sufia.rb} +0 -0
- data/lib/generators/sufia/sufia_generator.rb +1 -1
- data/lib/generators/sufia/templates/config/resque_config.rb +1 -1
- data/lib/generators/sufia/templates/config/sufia.rb +3 -0
- data/lib/sufia.rb +1 -50
- data/lib/sufia/batch_edits_controller_behavior.rb +4 -0
- data/lib/sufia/controller.rb +13 -0
- data/lib/sufia/dashboard_controller_behavior.rb +3 -2
- data/lib/sufia/files_controller_behavior.rb +35 -12
- data/lib/sufia/version.rb +1 -1
- data/spec/controllers/batch_edits_controller_spec.rb +2 -2
- data/spec/controllers/generic_files_controller_spec.rb +37 -1
- data/spec/models/generic_file_spec.rb +6 -6
- data/spec/models/properties_datastream_spec.rb +8 -7
- data/spec/models/transcode_audio_job_spec.rb +1 -1
- data/spec/models/transcode_video_job_spec.rb +1 -1
- data/spec/views/batch_edits/check_all_spec.rb +22 -0
- data/sufia-models/.gitignore +17 -0
- data/sufia-models/Gemfile +4 -0
- data/sufia-models/LICENSE.md +177 -0
- data/sufia-models/README.md +39 -0
- data/sufia-models/Rakefile +1 -0
- data/{app → sufia-models/app}/models/batch.rb +2 -4
- data/{app → sufia-models/app}/models/checksum_audit_log.rb +3 -4
- data/{app → sufia-models/app}/models/datastreams/batch_rdf_datastream.rb +0 -0
- data/{app → sufia-models/app}/models/datastreams/file_content_datastream.rb +0 -0
- data/{app → sufia-models/app}/models/datastreams/fits_datastream.rb +0 -0
- data/{app → sufia-models/app}/models/datastreams/generic_file_rdf_datastream.rb +12 -12
- data/{app → sufia-models/app}/models/datastreams/paranoid_rights_datastream.rb +0 -15
- data/{app → sufia-models/app}/models/datastreams/properties_datastream.rb +1 -2
- data/{app → sufia-models/app}/models/domain_term.rb +0 -0
- data/{app → sufia-models/app}/models/follow.rb +0 -0
- data/{app → sufia-models/app}/models/generic_file.rb +0 -0
- data/{app → sufia-models/app}/models/geo_names_resource.rb +0 -0
- data/{app → sufia-models/app}/models/group.rb +0 -0
- data/{app → sufia-models/app}/models/local_authority.rb +0 -0
- data/{app → sufia-models/app}/models/local_authority_entry.rb +0 -0
- data/{app → sufia-models/app}/models/single_use_link.rb +0 -0
- data/{app → sufia-models/app}/models/subject_local_authority_entry.rb +0 -0
- data/{app → sufia-models/app}/models/trophy.rb +0 -0
- data/{app → sufia-models/app}/models/version_committer.rb +0 -0
- data/sufia-models/config/locales/sufia.en.yml +6 -0
- data/sufia-models/lib/sufia/models.rb +34 -0
- data/{lib/sufia → sufia-models/lib/sufia/models}/active_fedora/redis.rb +0 -0
- data/{lib/sufia → sufia-models/lib/sufia/models}/active_record/redis.rb +0 -0
- data/{lib → sufia-models/lib/sufia/models}/active_support/core_ext/marshal.rb +0 -0
- data/sufia-models/lib/sufia/models/engine.rb +61 -0
- data/sufia-models/lib/sufia/models/file_content.rb +9 -0
- data/{lib/sufia → sufia-models/lib/sufia/models}/file_content/extract_metadata.rb +2 -2
- data/{lib/sufia → sufia-models/lib/sufia/models}/file_content/versions.rb +0 -0
- data/{lib/sufia → sufia-models/lib/sufia/models}/generic_file.rb +3 -34
- data/{lib/sufia → sufia-models/lib/sufia/models}/generic_file/actions.rb +16 -1
- data/{lib/sufia → sufia-models/lib/sufia/models}/generic_file/audit.rb +1 -1
- data/{lib/sufia → sufia-models/lib/sufia/models}/generic_file/characterization.rb +1 -2
- data/{lib/sufia → sufia-models/lib/sufia/models}/generic_file/export.rb +0 -0
- data/{lib/sufia → sufia-models/lib/sufia/models}/generic_file/permissions.rb +0 -1
- data/{lib/sufia → sufia-models/lib/sufia/models}/generic_file/thumbnail.rb +3 -3
- data/sufia-models/lib/sufia/models/generic_file/web_form.rb +45 -0
- data/{lib/sufia → sufia-models/lib/sufia/models}/id_service.rb +11 -7
- data/{lib/sufia → sufia-models/lib/sufia/models}/jobs/audit_job.rb +0 -0
- data/{lib/sufia → sufia-models/lib/sufia/models}/jobs/batch_update_job.rb +0 -0
- data/{lib/sufia → sufia-models/lib/sufia/models}/jobs/characterize_job.rb +0 -0
- data/{lib/sufia → sufia-models/lib/sufia/models}/jobs/ffmpeg_transcode_job.rb +3 -3
- data/sufia-models/lib/sufia/models/jobs/import_url_job.rb +55 -0
- data/{lib/sufia → sufia-models/lib/sufia/models}/jobs/resolrize_job.rb +0 -0
- data/{lib/sufia → sufia-models/lib/sufia/models}/jobs/transcode_audio_job.rb +0 -0
- data/{lib/sufia → sufia-models/lib/sufia/models}/jobs/transcode_video_job.rb +0 -0
- data/{lib/sufia → sufia-models/lib/sufia/models}/jobs/unzip_job.rb +16 -4
- data/{lib/sufia → sufia-models/lib/sufia/models}/model_methods.rb +0 -0
- data/{lib/sufia → sufia-models/lib/sufia/models}/noid.rb +1 -1
- data/{lib/sufia/queue → sufia-models/lib/sufia/models}/resque.rb +0 -2
- data/{lib/sufia → sufia-models/lib/sufia/models}/solr_document_behavior.rb +0 -0
- data/{lib/sufia → sufia-models/lib/sufia/models}/user.rb +1 -1
- data/{lib/sufia → sufia-models/lib/sufia/models}/utils.rb +0 -0
- data/sufia-models/lib/sufia/models/version.rb +5 -0
- data/sufia-models/lib/tasks/sufia-models_tasks.rake +7 -0
- data/sufia-models/sufia-models.gemspec +44 -0
- data/sufia.gemspec +2 -12
- data/tasks/release.rake +90 -0
- data/tasks/sufia-dev.rake +1 -1
- data/tasks/sufia.rake +1 -3
- metadata +118 -238
- data/app/views/generic_files/show_fields/_based_near.html.erb +0 -12
- data/app/views/generic_files/show_fields/_contributor.html.erb +0 -12
- data/app/views/generic_files/show_fields/_creator.html.erb +0 -12
- data/app/views/generic_files/show_fields/_date_created.html.erb +0 -12
- data/app/views/generic_files/show_fields/_description.html.erb +0 -12
- data/app/views/generic_files/show_fields/_identifier.html.erb +0 -9
- data/app/views/generic_files/show_fields/_language.html.erb +0 -9
- data/app/views/generic_files/show_fields/_publisher.html.erb +0 -12
- data/app/views/generic_files/show_fields/_related_url.html.erb +0 -11
- data/app/views/generic_files/show_fields/_resource_type.html.erb +0 -9
- data/app/views/generic_files/show_fields/_rights.html.erb +0 -9
- data/app/views/generic_files/show_fields/_subject.html.erb +0 -12
- data/app/views/generic_files/show_fields/_tag.html.erb +0 -9
- data/app/views/generic_files/show_fields/_title.html.erb +0 -12
- data/lib/sufia/file_content.rb +0 -8
- data/lib/sufia/generic_file/web_form.rb +0 -15
- data/vendor/assets/javascripts/fileupload.js +0 -6
- data/vendor/assets/javascripts/fileupload/application.js +0 -185
- data/vendor/assets/javascripts/fileupload/jquery-ui-1.8.14.custom.min.js +0 -76
@@ -1,12 +0,0 @@
|
|
1
|
-
<tr>
|
2
|
-
<th>Location</th>
|
3
|
-
<td>
|
4
|
-
<% @generic_file.based_near.each do |bn| %>
|
5
|
-
<span itemprop="contentLocation" itemscope itemtype="http://schema.org/Place">
|
6
|
-
<span itemprop="name"><%= link_to_facet(bn, Solrizer.solr_name("desc_metadata__based_near", :facetable)) %></span>
|
7
|
-
</span>
|
8
|
-
<br />
|
9
|
-
<% end %>
|
10
|
-
</td>
|
11
|
-
</tr>
|
12
|
-
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<tr>
|
2
|
-
<th>Contributor</th>
|
3
|
-
<td>
|
4
|
-
<% @generic_file.contributor.each do |contributor| %>
|
5
|
-
<span itemprop="contributor" itemscope itemtype="http://schema.org/Thing">
|
6
|
-
<span itemprop="name"><%= link_to_field('contributor', contributor) %></span>
|
7
|
-
</span>
|
8
|
-
<br />
|
9
|
-
<% end %>
|
10
|
-
</td>
|
11
|
-
</tr>
|
12
|
-
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<tr>
|
2
|
-
<th>Creator</th>
|
3
|
-
<td>
|
4
|
-
<% @generic_file.creator.each do |creator| %>
|
5
|
-
<span itemprop="creator" itemscope itemtype="http://schema.org/Thing">
|
6
|
-
<span itemprop="name"><%= link_to_facet(creator, Solrizer.solr_name("desc_metadata__creator", :facetable)) %></span>
|
7
|
-
</span>
|
8
|
-
<br />
|
9
|
-
<% end %>
|
10
|
-
</td>
|
11
|
-
</tr>
|
12
|
-
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<tr>
|
2
|
-
<th>Publisher</th>
|
3
|
-
<td>
|
4
|
-
<% @generic_file.publisher.each do |pub| %>
|
5
|
-
<span itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
|
6
|
-
<span itemprop="name"><%= link_to_facet(pub, Solrizer.solr_name("desc_metadata__publisher", :facetable)) %></span>
|
7
|
-
</span>
|
8
|
-
<br />
|
9
|
-
<% end %>
|
10
|
-
</td>
|
11
|
-
</tr>
|
12
|
-
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<tr>
|
2
|
-
<th>Subject</th>
|
3
|
-
<td>
|
4
|
-
<% @generic_file.subject.each do |sub| %>
|
5
|
-
<span itemprop="about" itemscope itemtype="http://schema.org/Thing">
|
6
|
-
<span itemprop="name"><%= link_to_facet(sub, Solrizer.solr_name("desc_metadata__subject", :facetable)) %></span>
|
7
|
-
</span>
|
8
|
-
<br />
|
9
|
-
<% end %>
|
10
|
-
</td>
|
11
|
-
</tr>
|
12
|
-
|
data/lib/sufia/file_content.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
module Sufia
|
2
|
-
module GenericFile
|
3
|
-
module WebForm
|
4
|
-
|
5
|
-
# override this method if you need to initialize more complex RDF assertions (b-nodes)
|
6
|
-
def initialize_fields
|
7
|
-
terms_for_editing.each do |key|
|
8
|
-
# if value is empty, we create an one element array to loop over for output
|
9
|
-
self[key] = [''] if self[key].empty?
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,185 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* jQuery File Upload Plugin JS Example 5.0.2
|
3
|
-
* https://github.com/blueimp/jQuery-File-Upload
|
4
|
-
*
|
5
|
-
* Copyright 2010, Sebastian Tschan
|
6
|
-
* https://blueimp.net
|
7
|
-
*
|
8
|
-
* Licensed under the MIT license:
|
9
|
-
* http://creativecommons.org/licenses/MIT/
|
10
|
-
*/
|
11
|
-
|
12
|
-
/*jslint nomen: true */
|
13
|
-
/*global $ */
|
14
|
-
|
15
|
-
var filestoupload =0;
|
16
|
-
var files_done =0;
|
17
|
-
var error_string ='';
|
18
|
-
//200 MB max file size
|
19
|
-
var max_file_size = 200000000;
|
20
|
-
var max_file_size_str = "200 MB";
|
21
|
-
//500 MB max total upload size
|
22
|
-
var max_total_file_size = 500000000;
|
23
|
-
var max_file_count = 100;
|
24
|
-
var max_total_file_size_str = "500 MB";
|
25
|
-
var first_file_after_max = '';
|
26
|
-
|
27
|
-
$(function () {
|
28
|
-
'use strict';
|
29
|
-
|
30
|
-
// Initialize the jQuery File Upload widget:
|
31
|
-
$('#fileupload').fileupload();
|
32
|
-
|
33
|
-
// Enable iframe cross-domain access via redirect option:
|
34
|
-
$('#fileupload').fileupload(
|
35
|
-
'option',
|
36
|
-
'redirect',
|
37
|
-
window.location.href.replace(
|
38
|
-
/\/[^\/]*$/,
|
39
|
-
'/cors/result.html?%s'
|
40
|
-
)
|
41
|
-
);
|
42
|
-
|
43
|
-
$('#fileupload').fileupload(
|
44
|
-
'option',
|
45
|
-
'acceptFileTypes',
|
46
|
-
/^[^\.].*$/i
|
47
|
-
///^[^\.][\w\.]*$/i
|
48
|
-
// /(\.|\/)(gif|jpe?g|png)$/i
|
49
|
-
);
|
50
|
-
|
51
|
-
// Load existing files:
|
52
|
-
$('#fileupload').each(function () {
|
53
|
-
var that = this;
|
54
|
-
/*$.getJSON(this.action, function (result) {
|
55
|
-
if (result && result.length) {
|
56
|
-
$(that).fileupload('option', 'done')
|
57
|
-
.call(that, null, {result: result});
|
58
|
-
}
|
59
|
-
});*/
|
60
|
-
});
|
61
|
-
|
62
|
-
|
63
|
-
$('#fileupload').bind("fileuploadstop", function(){
|
64
|
-
if ((files_done == filestoupload)&&(files_done >0)){
|
65
|
-
//var loc = $("#redirect-loc").html()+"?file_count="+filestoupload
|
66
|
-
var loc = $("#redirect-loc").html()
|
67
|
-
$(location).attr('href',loc);
|
68
|
-
// some error occured
|
69
|
-
} else if (error_string.length > 0){
|
70
|
-
if (files_done == 0) {
|
71
|
-
$("#fail").fadeIn('slow')
|
72
|
-
} else {
|
73
|
-
$("#partial_fail").fadeIn('slow')
|
74
|
-
}
|
75
|
-
$("#errmsg").html(error_string);
|
76
|
-
$("#errmsg").fadeIn('slow');
|
77
|
-
}
|
78
|
-
});
|
79
|
-
|
80
|
-
// count the number of uploaded files to send to edit
|
81
|
-
$('#fileupload').bind("fileuploadadd", function(e, data){
|
82
|
-
filestoupload++;
|
83
|
-
if ( $('#terms_of_service').is(':checked') )$('#main_upload_start').attr('disabled', false);
|
84
|
-
});
|
85
|
-
|
86
|
-
|
87
|
-
// check the validation on if the file type is not accepted just click cancel for the user as we do not want them to see all the hidden files
|
88
|
-
$('#fileupload').bind("fileuploadadded", function(e, data){
|
89
|
-
if (data.files[0].error == 'acceptFileTypes'){
|
90
|
-
$($('#fileupload .files .cancel button')[data.context[0].rowIndex]).click();
|
91
|
-
}
|
92
|
-
var total_sz = parseInt($('#total_upload_size').val()) + data.files[0].size;
|
93
|
-
// is file size too big
|
94
|
-
if (data.files[0].size > max_file_size) {
|
95
|
-
$($('#fileupload .files .cancel button')[data.context[0].rowIndex]).click();
|
96
|
-
$("#errmsg").html(data.files[0].name + " is too big. No files over " + max_file_size_str + " can be uploaded.");
|
97
|
-
$("#errmsg").fadeIn('slow');
|
98
|
-
}
|
99
|
-
// cumulative upload file size is too big
|
100
|
-
else if( total_sz > max_total_file_size) {
|
101
|
-
if (first_file_after_max == '') first_file_after_max = data.files[0].name;
|
102
|
-
$($('#fileupload .files .cancel button')[data.context[0].rowIndex]).click();
|
103
|
-
$("#errmsg").html("All files selected from " + first_file_after_max + " and after will not be uploaded because your total upload is too big. You may not upload more than " + max_total_file_size_str + " in one upload.");
|
104
|
-
$("#errmsg").fadeIn('slow');
|
105
|
-
}
|
106
|
-
else if( filestoupload > max_file_count) {
|
107
|
-
if (first_file_after_max == '') first_file_after_max = data.files[0].name;
|
108
|
-
$($('#fileupload .files .cancel button')[data.context[0].rowIndex]).click();
|
109
|
-
$("#errmsg").html("All files selected from " + first_file_after_max + " and after will not be uploaded because your total number of files is too big. You may not upload more than " + max_file_count + " files in one upload.");
|
110
|
-
$("#errmsg").fadeIn('slow');
|
111
|
-
}
|
112
|
-
else {
|
113
|
-
$('#total_upload_size').val( parseInt($('#total_upload_size').val()) + data.files[0].size );
|
114
|
-
}
|
115
|
-
|
116
|
-
});
|
117
|
-
|
118
|
-
// count the number of files completed and ready to send to edit
|
119
|
-
$('#fileupload').bind("fileuploaddone", function(e, data){
|
120
|
-
var file = ($.isArray(data.result) && data.result[0]) || {error: 'emptyResult'};
|
121
|
-
if (!file.error) {
|
122
|
-
files_done++;
|
123
|
-
}else {
|
124
|
-
if (error_string.length > 0) {
|
125
|
-
error_string +='<br/>';
|
126
|
-
}
|
127
|
-
error_string +=file.error;
|
128
|
-
}
|
129
|
-
|
130
|
-
});
|
131
|
-
|
132
|
-
|
133
|
-
// data. takes the contextual values in the file your uploading
|
134
|
-
// so and assign them to a value in the form that is being uploaded
|
135
|
-
// much is based off https://github.com/blueimp/jQuery-File-Upload/wiki/How-to-submit-additional-Form-Data
|
136
|
-
$('#fileupload').bind('fileuploadsubmit', function (e, data) {
|
137
|
-
//var inputs = data.context.find(':input');
|
138
|
-
//$('#fileupload').formData = inputs.serializeArray();
|
139
|
-
//data.form = inputs.serializeArray
|
140
|
-
//$('#relative_path').val(inputs[0].value);
|
141
|
-
$('#relative_path').val(data.files[0].webkitRelativePath)
|
142
|
-
});
|
143
|
-
|
144
|
-
|
145
|
-
// on fail if abort (aka cancel) decrease the number of uploaded files to send
|
146
|
-
$('#fileupload').bind("fileuploadfail", function(e, data){
|
147
|
-
if (data.errorThrown == 'abort') {
|
148
|
-
filestoupload--;
|
149
|
-
if ((files_done == filestoupload)&&(files_done >0)){
|
150
|
-
var loc = $("#redirect-loc").html()+"?file_count="+filestoupload
|
151
|
-
$(location).attr('href',loc);
|
152
|
-
}
|
153
|
-
$('#total_upload_size').val( parseInt($('#total_upload_size').val()) - data.files[0].size );
|
154
|
-
|
155
|
-
} else {
|
156
|
-
if (error_string.length > 0) {
|
157
|
-
error_string +='<br/>';
|
158
|
-
}
|
159
|
-
error_string +=data.errorThrown+": "+data.textStatus;
|
160
|
-
}
|
161
|
-
});
|
162
|
-
/*
|
163
|
-
|
164
|
-
// Load existing files:
|
165
|
-
$.getJSON($('#fileupload form').prop('action'), function (files) {
|
166
|
-
var fu = $('#fileupload').data('fileupload');
|
167
|
-
fu._adjustMaxNumberOfFiles(-files.length);
|
168
|
-
fu._renderDownload(files)
|
169
|
-
.appendTo($('#fileupload .files'))
|
170
|
-
.fadeIn(function () {
|
171
|
-
// Fix for IE7 and lower:
|
172
|
-
$(this).show();
|
173
|
-
});
|
174
|
-
});
|
175
|
-
*/
|
176
|
-
|
177
|
-
// Open download dialogs via iframes,
|
178
|
-
// to prevent aborting current uploads:
|
179
|
-
$(document).on('click', '#fileupload .files a:not([target^=_blank])', function (e) {
|
180
|
-
e.preventDefault();
|
181
|
-
$('<iframe style="display:none;"></iframe>')
|
182
|
-
.prop('src', this.href)
|
183
|
-
.appendTo('body');
|
184
|
-
});
|
185
|
-
});
|
@@ -1,76 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* jQuery UI 1.8.14
|
3
|
-
*
|
4
|
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6
|
-
* http://jquery.org/license
|
7
|
-
*
|
8
|
-
* http://docs.jquery.com/UI
|
9
|
-
*/
|
10
|
-
(function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.14",
|
11
|
-
keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();
|
12
|
-
b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,
|
13
|
-
"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",
|
14
|
-
function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,
|
15
|
-
outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a,"tabindex"),d=isNaN(b);
|
16
|
-
return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=
|
17
|
-
0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)}})}})(jQuery);
|
18
|
-
;/*!
|
19
|
-
* jQuery UI Widget 1.8.14
|
20
|
-
*
|
21
|
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
22
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
23
|
-
* http://jquery.org/license
|
24
|
-
*
|
25
|
-
* http://docs.jquery.com/UI/Widget
|
26
|
-
*/
|
27
|
-
(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)b(d).triggerHandler("remove");k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=function(h){return!!b.data(h,
|
28
|
-
a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):d;if(e&&d.charAt(0)==="_")return h;
|
29
|
-
e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=b.extend(true,{},this.options,
|
30
|
-
this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},
|
31
|
-
widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",c);return this},
|
32
|
-
enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
|
33
|
-
;/*
|
34
|
-
* jQuery UI Button 1.8.14
|
35
|
-
*
|
36
|
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
37
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
38
|
-
* http://jquery.org/license
|
39
|
-
*
|
40
|
-
* http://docs.jquery.com/UI/Button
|
41
|
-
*
|
42
|
-
* Depends:
|
43
|
-
* jquery.ui.core.js
|
44
|
-
* jquery.ui.widget.js
|
45
|
-
*/
|
46
|
-
(function(b){var h,i,j,g,l=function(){var a=b(this).find(":ui-button");setTimeout(function(){a.button("refresh")},1)},k=function(a){var c=a.name,e=a.form,f=b([]);if(c)f=e?b(e).find("[name='"+c+"']"):b("[name='"+c+"']",a.ownerDocument).filter(function(){return!this.form});return f};b.widget("ui.button",{options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",l);if(typeof this.options.disabled!==
|
47
|
-
"boolean")this.options.disabled=this.element.attr("disabled");this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var a=this,c=this.options,e=this.type==="checkbox"||this.type==="radio",f="ui-state-hover"+(!e?" ui-state-active":"");if(c.label===null)c.label=this.buttonElement.html();if(this.element.is(":disabled"))c.disabled=true;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",function(){if(!c.disabled){b(this).addClass("ui-state-hover");
|
48
|
-
this===h&&b(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){c.disabled||b(this).removeClass(f)}).bind("click.button",function(d){if(c.disabled){d.preventDefault();d.stopImmediatePropagation()}});this.element.bind("focus.button",function(){a.buttonElement.addClass("ui-state-focus")}).bind("blur.button",function(){a.buttonElement.removeClass("ui-state-focus")});if(e){this.element.bind("change.button",function(){g||a.refresh()});this.buttonElement.bind("mousedown.button",function(d){if(!c.disabled){g=
|
49
|
-
false;i=d.pageX;j=d.pageY}}).bind("mouseup.button",function(d){if(!c.disabled)if(i!==d.pageX||j!==d.pageY)g=true})}if(this.type==="checkbox")this.buttonElement.bind("click.button",function(){if(c.disabled||g)return false;b(this).toggleClass("ui-state-active");a.buttonElement.attr("aria-pressed",a.element[0].checked)});else if(this.type==="radio")this.buttonElement.bind("click.button",function(){if(c.disabled||g)return false;b(this).addClass("ui-state-active");a.buttonElement.attr("aria-pressed",true);
|
50
|
-
var d=a.element[0];k(d).not(d).map(function(){return b(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)});else{this.buttonElement.bind("mousedown.button",function(){if(c.disabled)return false;b(this).addClass("ui-state-active");h=this;b(document).one("mouseup",function(){h=null})}).bind("mouseup.button",function(){if(c.disabled)return false;b(this).removeClass("ui-state-active")}).bind("keydown.button",function(d){if(c.disabled)return false;if(d.keyCode==b.ui.keyCode.SPACE||
|
51
|
-
d.keyCode==b.ui.keyCode.ENTER)b(this).addClass("ui-state-active")}).bind("keyup.button",function(){b(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(d){d.keyCode===b.ui.keyCode.SPACE&&b(this).click()})}this._setOption("disabled",c.disabled);this._resetButton()},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"||this.type===
|
52
|
-
"radio"){var a=this.element.parents().filter(":last"),c="label[for="+this.element.attr("id")+"]";this.buttonElement=a.find(c);if(!this.buttonElement.length){a=a.length?a.siblings():this.element.siblings();this.buttonElement=a.filter(c);if(!this.buttonElement.length)this.buttonElement=a.find(c)}this.element.addClass("ui-helper-hidden-accessible");(a=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",a)}else this.buttonElement=this.element},
|
53
|
-
widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||this.buttonElement.removeAttr("title");
|
54
|
-
b.Widget.prototype.destroy.call(this)},_setOption:function(a,c){b.Widget.prototype._setOption.apply(this,arguments);if(a==="disabled")c?this.element.attr("disabled",true):this.element.removeAttr("disabled");else this._resetButton()},refresh:function(){var a=this.element.is(":disabled");a!==this.options.disabled&&this._setOption("disabled",a);if(this.type==="radio")k(this.element[0]).each(function(){b(this).is(":checked")?b(this).button("widget").addClass("ui-state-active").attr("aria-pressed",true):
|
55
|
-
b(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)});else if(this.type==="checkbox")this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)},_resetButton:function(){if(this.type==="input")this.options.label&&this.element.val(this.options.label);else{var a=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
|
56
|
-
c=b("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(a.empty()).text(),e=this.options.icons,f=e.primary&&e.secondary,d=[];if(e.primary||e.secondary){if(this.options.text)d.push("ui-button-text-icon"+(f?"s":e.primary?"-primary":"-secondary"));e.primary&&a.prepend("<span class='ui-button-icon-primary ui-icon "+e.primary+"'></span>");e.secondary&&a.append("<span class='ui-button-icon-secondary ui-icon "+e.secondary+"'></span>");if(!this.options.text){d.push(f?"ui-button-icons-only":
|
57
|
-
"ui-button-icon-only");this.hasTitle||a.attr("title",c)}}else d.push("ui-button-text-only");a.addClass(d.join(" "))}}});b.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,c){a==="disabled"&&this.buttons.button("option",a,c);b.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var a=this.element.css("direction")===
|
58
|
-
"ltr";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(a?"ui-corner-left":"ui-corner-right").end().filter(":last").addClass(a?"ui-corner-right":"ui-corner-left").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");
|
59
|
-
b.Widget.prototype.destroy.call(this)}})})(jQuery);
|
60
|
-
;/*
|
61
|
-
* jQuery UI Progressbar 1.8.14
|
62
|
-
*
|
63
|
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
64
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
65
|
-
* http://jquery.org/license
|
66
|
-
*
|
67
|
-
* http://docs.jquery.com/UI/Progressbar
|
68
|
-
*
|
69
|
-
* Depends:
|
70
|
-
* jquery.ui.core.js
|
71
|
-
* jquery.ui.widget.js
|
72
|
-
*/
|
73
|
-
(function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
|
74
|
-
this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*
|
75
|
-
this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.14"})})(jQuery);
|
76
|
-
;
|