blacklight_folders 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +15 -0
- data/README.rdoc +50 -0
- data/Rakefile +68 -0
- data/app/assets/javascripts/blacklight_folders/catalog/edit.js +28 -0
- data/app/assets/javascripts/blacklight_folders/catalog/index.js +65 -0
- data/app/assets/javascripts/blacklight_folders/catalog/show.js +27 -0
- data/app/assets/javascripts/blacklight_folders/catalog.js +1 -0
- data/app/assets/javascripts/blacklight_folders/folder_items.js +36 -0
- data/app/assets/javascripts/blacklight_folders/sort.js +10 -0
- data/app/assets/javascripts/blacklight_folders.js +8 -0
- data/app/assets/stylesheets/blacklight_folders/_blacklight_folders.css.scss +4 -0
- data/app/assets/stylesheets/blacklight_folders/_folders.css.scss +56 -0
- data/app/assets/stylesheets/blacklight_folders/_forms.css.scss +11 -0
- data/app/assets/stylesheets/blacklight_folders/_nestable.css.scss +129 -0
- data/app/controllers/blacklight/folders/application_controller.rb +11 -0
- data/app/controllers/blacklight/folders/folders_controller.rb +162 -0
- data/app/controllers/concerns/blacklight/folders/application_controller_behavior.rb +63 -0
- data/app/forms/blacklight/folders/folder_form.rb +74 -0
- data/app/helpers/blacklight/folders/application_helper.rb +29 -0
- data/app/helpers/blacklight/folders/crud_links_helper.rb +29 -0
- data/app/helpers/blacklight/folders/folders_helper.rb +14 -0
- data/app/helpers/blacklight/folders/main_app_helper.rb +30 -0
- data/app/models/ability.rb +4 -0
- data/app/models/blacklight/folders/folder.rb +120 -0
- data/app/models/blacklight/folders/folder_item.rb +21 -0
- data/app/models/blacklight/folders/solr_response.rb +20 -0
- data/app/models/concerns/blacklight/folders/ability.rb +39 -0
- data/app/models/concerns/blacklight/folders/solr_document.rb +3 -0
- data/app/models/concerns/blacklight/folders/user.rb +20 -0
- data/app/views/blacklight/folders/_add_to_folder.html.erb +10 -0
- data/app/views/blacklight/folders/_folder_control.html.erb +1 -0
- data/app/views/blacklight/folders/folders/_folder.html.erb +22 -0
- data/app/views/blacklight/folders/folders/_folder_item.html.erb +2 -0
- data/app/views/blacklight/folders/folders/_form.html.erb +78 -0
- data/app/views/blacklight/folders/folders/_index_header_default.html.erb +20 -0
- data/app/views/blacklight/folders/folders/_marc_tools.html.erb +10 -0
- data/app/views/blacklight/folders/folders/_tools.html.erb +11 -0
- data/app/views/blacklight/folders/folders/edit.html.erb +2 -0
- data/app/views/blacklight/folders/folders/index.html.erb +33 -0
- data/app/views/blacklight/folders/folders/new.html.erb +2 -0
- data/app/views/blacklight/folders/folders/show.endnote.erb +1 -0
- data/app/views/blacklight/folders/folders/show.html.erb +43 -0
- data/app/views/blacklight/folders/show/_add_to_folder.html.erb +18 -0
- data/app/views/blacklight/folders/show/_folder_controls.html.erb +15 -0
- data/app/views/blacklight/nav/_folders.html.erb +14 -0
- data/app/views/catalog/_show_sidebar.html.erb +11 -0
- data/config/jetty.yml +6 -0
- data/config/locales/blacklight_folders.en.yml +73 -0
- data/config/routes.rb +5 -0
- data/db/migrate/1416883534_create_blacklight_folders_folders.rb +12 -0
- data/db/migrate/1416883577_create_blacklight_folders_folder_items.rb +13 -0
- data/lib/blacklight_folders/engine.rb +11 -0
- data/lib/blacklight_folders/version.rb +5 -0
- data/lib/blacklight_folders.rb +4 -0
- data/lib/generators/blacklight_folders/install_generator.rb +53 -0
- data/lib/generators/blacklight_folders/templates/blacklight_folders.rb +12 -0
- data/lib/generators/blacklight_folders/templates/blacklight_folders_helper.rb +3 -0
- data/lib/migration/bookmark_migrator.rb +45 -0
- data/lib/tasks/blacklight_folders_tasks.rake +12 -0
- metadata +269 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 27067bbaefd718b0c485c4c1f13941fcb53a6e8b
|
4
|
+
data.tar.gz: cbb26a51baaed6c6f17f499d1d46b47254f6c669
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5cd3259a5737051c56a80e8346d48b7379062141b285baa1b2abae6917470c8e4c41a1134855627674f16b1745e837f279e1d058265eef06990088fc58c560e5
|
7
|
+
data.tar.gz: d7f809c3483b7c176083f6f5b1cfd6d2fb12a4e578f086289b293e87d44d0e24fe5239b09f8138a265bfbf95fff19979d171122004966ea6822ef878d559b14a
|
data/LICENSE
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
##########################################################################
|
2
|
+
# Copyright 2014 Indiana University, Data Curation Experts
|
3
|
+
# Additional copyright may be held by others, as reflected in the commit log
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
data/README.rdoc
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
{<img src="https://travis-ci.org/projectblacklight/blacklight_folders.svg?branch=master" alt="Build Status" />}[https://travis-ci.org/projectblacklight/blacklight_folders]
|
2
|
+
= Blacklight Folders
|
3
|
+
{<img src="https://cloud.githubusercontent.com/assets/92044/5508092/f2ad37b0-876e-11e4-8f73-f08afe23c17b.png" alt="screenshot" />}[https://cloud.githubusercontent.com/assets/92044/5508092/f2ad37b0-876e-11e4-8f73-f08afe23c17b.png]
|
4
|
+
---
|
5
|
+
{<img src="https://cloud.githubusercontent.com/assets/92044/5416801/a437a8c0-81f8-11e4-9285-01d230caf80c.png" alt="screenshot" />}[https://cloud.githubusercontent.com/assets/92044/5416801/a437a8c0-81f8-11e4-9285-01d230caf80c.png]
|
6
|
+
---
|
7
|
+
{<img src="https://cloud.githubusercontent.com/assets/92044/5416800/a434b49e-81f8-11e4-85a0-d302aa5c7e24.png" alt="screenshot" />}[https://cloud.githubusercontent.com/assets/92044/5416800/a434b49e-81f8-11e4-85a0-d302aa5c7e24.png]
|
8
|
+
---
|
9
|
+
|
10
|
+
== To create a new blacklight application with blacklight_folders
|
11
|
+
|
12
|
+
* Create a new rails application
|
13
|
+
|
14
|
+
* Add the <code>blacklight</code> gem and the <code>blacklight_folders</code> gem to your Gemfile
|
15
|
+
|
16
|
+
* Run <code>bundle install</code>
|
17
|
+
|
18
|
+
* Run the blacklight generator with the <code>--devise</code> switch, following the {instructions on the blacklight wiki}[https://github.com/projectblacklight/blacklight/wiki/Quickstart#creating-a-new-application-the-hard-way] to set up your blacklight app. _NOTE:_ If you're using blacklight_folders for a library catalog, you probably want the <code>--marc</code> switch as well; if you're running it locally (for testing, etc.), you probably want the <code>--jettywrapper</code> switch too.
|
19
|
+
|
20
|
+
$ rails g blacklight:install --devise --marc --jettywrapper
|
21
|
+
|
22
|
+
* Run the blacklight_folders generator
|
23
|
+
|
24
|
+
$ rails g blacklight_folders:install
|
25
|
+
|
26
|
+
== To add blacklight_folders to an existing blacklight application
|
27
|
+
|
28
|
+
* Add the <code>blacklight_folders</code> gem to your Gemfile, and run <code>bundle install</code>
|
29
|
+
|
30
|
+
* Run the blacklight_folders generator
|
31
|
+
|
32
|
+
$ rails g blacklight_folders:install
|
33
|
+
|
34
|
+
==== Migrate Existing Data
|
35
|
+
|
36
|
+
* If your blacklight app has existing users that already have bookmarks saved, run the migration task to add each user's existing bookmarks to their default folder.
|
37
|
+
|
38
|
+
$ rake blacklight_folders:db:migrate_data
|
39
|
+
|
40
|
+
== Configuration
|
41
|
+
|
42
|
+
* By default, the user's 5 most recently updated folders will appear in the drop-down menu in the navigation bar. If you want to change the number of folders that appear in the list, you can set the MENU_LIMIT constant in an initializer (config/initializers/blacklight_folders.rb).
|
43
|
+
|
44
|
+
Blacklight::Folders::Folder::MENU_LIMIT = 5
|
45
|
+
|
46
|
+
* If you wish to change the name of each user's default folder, override the entry for <code>default_folder_name</code> in the localization files, using the <code>config/locales/blacklight_folders.en.yml</code> file as an example.
|
47
|
+
|
48
|
+
---
|
49
|
+
|
50
|
+
{Developers Guide}[https://github.com/projectblacklight/blacklight_folders/wiki/Developer-Guide]
|
data/Rakefile
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
require 'engine_cart/rake_task'
|
9
|
+
|
10
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
11
|
+
rdoc.rdoc_dir = 'rdoc'
|
12
|
+
rdoc.title = 'Blacklight::Folders'
|
13
|
+
rdoc.options << '--line-numbers'
|
14
|
+
rdoc.rdoc_files.include('README.rdoc')
|
15
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
16
|
+
end
|
17
|
+
|
18
|
+
Bundler::GemHelper.install_tasks
|
19
|
+
|
20
|
+
require 'rspec/core/rake_task'
|
21
|
+
RSpec::Core::RakeTask.new(:spec)
|
22
|
+
|
23
|
+
ZIP_URL = "https://github.com/projectblacklight/blacklight-jetty/archive/v4.6.0.zip"
|
24
|
+
require 'jettywrapper'
|
25
|
+
|
26
|
+
task :default => [:spec]
|
27
|
+
|
28
|
+
|
29
|
+
desc "Clean out the test rails app"
|
30
|
+
task :clean => ['engine_cart:clean', 'jetty:clean'] do
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
desc "Run test suite"
|
35
|
+
task :ci => ['clean', 'jetty:add_test_core'] do
|
36
|
+
jetty_params = Jettywrapper.load_config('test')
|
37
|
+
error = Jettywrapper.wrap(jetty_params) do
|
38
|
+
Rake::Task['engine_cart:generate'].invoke
|
39
|
+
Rake::Task['spec'].invoke
|
40
|
+
end
|
41
|
+
raise "test failures: #{error}" if error
|
42
|
+
end
|
43
|
+
|
44
|
+
namespace :jetty do
|
45
|
+
|
46
|
+
desc 'Add test-core to solr for test environment'
|
47
|
+
task :add_test_core do
|
48
|
+
require 'nokogiri'
|
49
|
+
|
50
|
+
# copy config files
|
51
|
+
FileUtils.mkdir_p('jetty/solr/test-core/conf')
|
52
|
+
FileList['jetty/solr/blacklight-core/conf/*'].each do |f|
|
53
|
+
cp_r("#{f}", 'jetty/solr/test-core/conf/', :verbose => true)
|
54
|
+
end
|
55
|
+
|
56
|
+
# add test-core to solr.xml
|
57
|
+
file = File.read("jetty/solr/solr.xml")
|
58
|
+
doc = Nokogiri::XML(file)
|
59
|
+
blacklight = doc.at_css("core[name='blacklight-core']")
|
60
|
+
test = blacklight.clone
|
61
|
+
test['name'] = 'test'
|
62
|
+
test['instanceDir'] = 'test-core'
|
63
|
+
blacklight.add_next_sibling(test)
|
64
|
+
File.open("jetty/solr/solr.xml", "w") do |f|
|
65
|
+
f.write doc.to_xml
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
// This is for the catalog show page
|
2
|
+
BlacklightFolders.FolderEditController = function(elem) {
|
3
|
+
this.$form = $('form.folder-actions', elem);
|
4
|
+
this.$select = $('select', this.$form);
|
5
|
+
|
6
|
+
var addAutocomplete = this.addAutocomplete;
|
7
|
+
$.each(this.$select, function(_, select){
|
8
|
+
addAutocomplete(select);
|
9
|
+
});
|
10
|
+
}
|
11
|
+
|
12
|
+
BlacklightFolders.FolderEditController.prototype = {
|
13
|
+
addAutocomplete: function(select) {
|
14
|
+
select = $(select);
|
15
|
+
|
16
|
+
// Remove the bootstrap class so that select2 can apply its own styles
|
17
|
+
select.removeClass('form-control');
|
18
|
+
|
19
|
+
// The first element has a prompt. We remove it from the list.
|
20
|
+
var element = $('option:first-child', select);
|
21
|
+
var label = element.text();
|
22
|
+
element.empty();
|
23
|
+
|
24
|
+
select.select2({placeholder: label});
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
Blacklight.onLoad(function() { new BlacklightFolders.FolderEditController($('.blacklight-folders-edit')) });
|
@@ -0,0 +1,65 @@
|
|
1
|
+
// This is for the catalog index page
|
2
|
+
BlacklightFolders.CatalogIndexController = function(elem) {
|
3
|
+
if (elem.length == 0) {
|
4
|
+
return null;
|
5
|
+
}
|
6
|
+
|
7
|
+
this.$element = elem
|
8
|
+
this.$checkboxes = $('input[type=checkbox][name="folder_ids[]"]', elem);
|
9
|
+
this.$form = $('form[data-behavior=move-to-folder]', elem);
|
10
|
+
this.$select = $('select', this.$form);
|
11
|
+
this.$hidden = $('input[name="document_ids"]', this.$form);
|
12
|
+
|
13
|
+
this.addControls();
|
14
|
+
this.addAutocomplete();
|
15
|
+
this.attachEvents();
|
16
|
+
}
|
17
|
+
|
18
|
+
BlacklightFolders.CatalogIndexController.prototype = {
|
19
|
+
addControls: function() {
|
20
|
+
this.$checkboxes.show();
|
21
|
+
},
|
22
|
+
|
23
|
+
addAutocomplete: function() {
|
24
|
+
// Remove the bootstrap class so that select2 can apply its own styles
|
25
|
+
this.$select.removeClass('form-control');
|
26
|
+
// The first element has a prompt. We remove it from the list.
|
27
|
+
var element = $('option:first-child', this.$select);
|
28
|
+
var label = element.text();
|
29
|
+
element.empty();
|
30
|
+
this.$select.select2({placeholder: label});
|
31
|
+
},
|
32
|
+
|
33
|
+
|
34
|
+
showForm: function() {
|
35
|
+
this.$form.show();
|
36
|
+
},
|
37
|
+
|
38
|
+
hideForm: function() {
|
39
|
+
this.$form.hide();
|
40
|
+
},
|
41
|
+
|
42
|
+
showOrHideForm: function () {
|
43
|
+
if (this.$checkboxes.is(":checked")) {
|
44
|
+
this.showForm();
|
45
|
+
} else {
|
46
|
+
this.hideForm();
|
47
|
+
}
|
48
|
+
},
|
49
|
+
|
50
|
+
submit: function(event) {
|
51
|
+
var folder_id = $(event.currentTarget).val();
|
52
|
+
var vals = $.map(this.$checkboxes.filter(':checked'), function(e) { return $(e).val(); })
|
53
|
+
this.$hidden.val(vals.join());
|
54
|
+
this.$form.submit();
|
55
|
+
},
|
56
|
+
|
57
|
+
attachEvents: function() {
|
58
|
+
that = this;
|
59
|
+
this.$checkboxes.on('change', function() { that.showOrHideForm(); });
|
60
|
+
this.$select.on('change', function(event) { that.submit(event); });
|
61
|
+
}
|
62
|
+
|
63
|
+
}
|
64
|
+
|
65
|
+
Blacklight.onLoad(function() { new BlacklightFolders.CatalogIndexController($('.blacklight-catalog-index')) });
|
@@ -0,0 +1,27 @@
|
|
1
|
+
// This is for the catalog show page
|
2
|
+
BlacklightFolders.CatalogShowController = function(elem) {
|
3
|
+
if (elem.length == 0) {
|
4
|
+
return null;
|
5
|
+
}
|
6
|
+
|
7
|
+
this.$element = elem
|
8
|
+
this.$form = $('.show-tools .folder form', elem);
|
9
|
+
this.$select = $('select', this.$form);
|
10
|
+
|
11
|
+
this.addAutocomplete();
|
12
|
+
}
|
13
|
+
|
14
|
+
BlacklightFolders.CatalogShowController.prototype = {
|
15
|
+
addAutocomplete: function() {
|
16
|
+
// Remove the bootstrap class so that select2 can apply its own styles
|
17
|
+
this.$select.removeClass('form-control');
|
18
|
+
// The first element has a prompt. We remove it from the list.
|
19
|
+
var element = $('option:first-child', this.$select);
|
20
|
+
var label = element.text();
|
21
|
+
element.empty();
|
22
|
+
this.$select.select2({placeholder: label});
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
Blacklight.onLoad(function() { new BlacklightFolders.CatalogShowController($('.blacklight-catalog-show')) });
|
27
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
BlacklightFolders = {}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
// This is for the folders edit page
|
2
|
+
Blacklight.onLoad(function(){
|
3
|
+
|
4
|
+
// Display the drag handle
|
5
|
+
$('.dd-handle').removeClass('hidden');
|
6
|
+
|
7
|
+
// Initialize drag-and-drop behavior
|
8
|
+
$('.dd').nestable({ maxDepth: 1, dropCallback: function(data){
|
9
|
+
allItemsData = $('.dd').nestable('serialize');
|
10
|
+
itemsContainer = $('.dd');
|
11
|
+
reorderItems(allItemsData, itemsContainer);
|
12
|
+
} });
|
13
|
+
|
14
|
+
var reorderItems = function(data, container) {
|
15
|
+
var folderId = container.data('folder_id');
|
16
|
+
var items = data;
|
17
|
+
for(var i in data){
|
18
|
+
items[i]['position'] = (parseInt(i) + 1).toString();
|
19
|
+
}
|
20
|
+
|
21
|
+
$.ajax({
|
22
|
+
type: "PATCH",
|
23
|
+
url: '/blacklight/folders/' + folderId + '.json',
|
24
|
+
data: { folder: {items_attributes: items}},
|
25
|
+
success: function(data, status){
|
26
|
+
}
|
27
|
+
});
|
28
|
+
|
29
|
+
// Update the position text in the form
|
30
|
+
var textElements = $('.dd .position-input');
|
31
|
+
for(var i in textElements) {
|
32
|
+
textElements[i].value = parseInt(i) + 1;
|
33
|
+
}
|
34
|
+
};
|
35
|
+
|
36
|
+
});
|
@@ -0,0 +1,8 @@
|
|
1
|
+
//= require blacklight_folders/sort
|
2
|
+
//= require blacklight_folders/catalog
|
3
|
+
//= require blacklight_folders/catalog/index
|
4
|
+
//= require blacklight_folders/catalog/show
|
5
|
+
//= require blacklight_folders/catalog/edit
|
6
|
+
//= require blacklight_folders/folder_items
|
7
|
+
//= require jquery.nestable
|
8
|
+
//= require select2
|
@@ -0,0 +1,56 @@
|
|
1
|
+
$table-border-color: #dddddd;
|
2
|
+
$table_border: 1px dotted $table-border-color;
|
3
|
+
|
4
|
+
.folder-index {
|
5
|
+
#sort-tool {
|
6
|
+
margin-top: 30px
|
7
|
+
}
|
8
|
+
}
|
9
|
+
|
10
|
+
.folder-view {
|
11
|
+
.bookmarkTools {
|
12
|
+
margin-top: 20px;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
.blacklight-folders-edit {
|
17
|
+
ol {
|
18
|
+
list-style-type: none;
|
19
|
+
border: 1px solid $table-border-color;
|
20
|
+
padding: 0;
|
21
|
+
margin-top: 20px;
|
22
|
+
|
23
|
+
li {
|
24
|
+
padding: 5px;
|
25
|
+
margin: 0;
|
26
|
+
border-top: $table_border;
|
27
|
+
|
28
|
+
.title {
|
29
|
+
padding-top: 6px;
|
30
|
+
padding-left: 0;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
li:first-child {
|
35
|
+
border-top: none;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
.glyphicon-unlock:before {
|
41
|
+
// The Bootstrap halflings doesn't have the unlock icon, so we'll use the globe
|
42
|
+
// You should be able to override this if you meet the license terms for
|
43
|
+
// glyphicons. See: http://glyphicons.com/license/
|
44
|
+
content: "\e135"
|
45
|
+
}
|
46
|
+
|
47
|
+
#folder-tools {
|
48
|
+
margin-top: 5px;
|
49
|
+
height: 25px;
|
50
|
+
}
|
51
|
+
|
52
|
+
.position-input {
|
53
|
+
width: 40%;
|
54
|
+
text-align: center;
|
55
|
+
}
|
56
|
+
|
@@ -0,0 +1,129 @@
|
|
1
|
+
// Drag and drop elements for 'nestable' gem
|
2
|
+
|
3
|
+
.dd {
|
4
|
+
position: relative;
|
5
|
+
display: block;
|
6
|
+
margin: 0;
|
7
|
+
padding: 0;
|
8
|
+
list-style: none;
|
9
|
+
}
|
10
|
+
|
11
|
+
tbody.dd-list {
|
12
|
+
display: table-row-group;
|
13
|
+
padding-left: 0;
|
14
|
+
}
|
15
|
+
|
16
|
+
tbody.dd-dragel {
|
17
|
+
display: table;
|
18
|
+
}
|
19
|
+
|
20
|
+
li.dd-item {
|
21
|
+
list-style: none;
|
22
|
+
}
|
23
|
+
|
24
|
+
tr.dd-item {
|
25
|
+
display: table-row;
|
26
|
+
position: relative;
|
27
|
+
}
|
28
|
+
|
29
|
+
.dd-list { display: block; position: relative; margin: 0; padding: 0; list-style: none; }
|
30
|
+
.dd-list .dd-list { padding-left: 30px; }
|
31
|
+
.dd-collapsed .dd-list { display: none; }
|
32
|
+
|
33
|
+
.dd-item,
|
34
|
+
.dd-empty,
|
35
|
+
.dd-placeholder { display: block; position: relative; margin: 0; padding: 0; min-height: 20px; line-height: 20px; }
|
36
|
+
|
37
|
+
.dd-handle {
|
38
|
+
display: inline-block;
|
39
|
+
height: 100%;
|
40
|
+
margin: 0 0.2em 0 0;
|
41
|
+
padding: 5px 10px;
|
42
|
+
color: #333;
|
43
|
+
text-decoration: none;
|
44
|
+
text-align: center;
|
45
|
+
font-size: 1.5em;
|
46
|
+
font-weight: bold;
|
47
|
+
border: 1px solid #ccc;
|
48
|
+
background: #fafafa;
|
49
|
+
background: -webkit-linear-gradient(top, #fafafa 0%, #eee 100%);
|
50
|
+
background: -moz-linear-gradient(top, #fafafa 0%, #eee 100%);
|
51
|
+
background: linear-gradient(top, #fafafa 0%, #eee 100%);
|
52
|
+
-webkit-border-radius: 3px;
|
53
|
+
border-radius: 3px;
|
54
|
+
box-sizing: border-box; -moz-box-sizing: border-box;
|
55
|
+
}
|
56
|
+
.dd-handle:hover {
|
57
|
+
color: #2ea8e5;
|
58
|
+
background: #fff;
|
59
|
+
cursor: grab;
|
60
|
+
}
|
61
|
+
|
62
|
+
.dd-item > button { display: block; position: relative; cursor: pointer; float: left; width: 25px; height: 20px; margin: 5px 0; padding: 0; text-indent: 100%; white-space: nowrap; overflow: hidden; border: 0; background: transparent; line-height: 1; text-align: center; font-weight: bold; }
|
63
|
+
.dd-item > button:before { content: '+'; display: block; position: absolute; width: 100%; text-align: center; text-indent: 0; }
|
64
|
+
.dd-item > button[data-action="collapse"]:before { content: '-'; }
|
65
|
+
|
66
|
+
.dd-placeholder,
|
67
|
+
.dd-empty { margin: 5px 0; padding: 0; min-height: 30px; border: 1px dashed #b6bcbf; box-sizing: border-box; -moz-box-sizing: border-box; }
|
68
|
+
.dd-empty { border: 1px dashed #bbb; min-height: 100px;
|
69
|
+
background-image: -webkit-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff),
|
70
|
+
-webkit-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff);
|
71
|
+
background-image: -moz-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff),
|
72
|
+
-moz-linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff);
|
73
|
+
background-image: linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff),
|
74
|
+
linear-gradient(45deg, #fff 25%, transparent 25%, transparent 75%, #fff 75%, #fff);
|
75
|
+
background-size: 60px 60px;
|
76
|
+
background-position: 0 0, 30px 30px;
|
77
|
+
}
|
78
|
+
|
79
|
+
.dd-dragel { position: absolute; pointer-events: none; z-index: 9999; }
|
80
|
+
.dd-dragel > .dd-item .dd-handle { margin-top: 0; }
|
81
|
+
.dd-dragel .dd-handle {
|
82
|
+
-webkit-box-shadow: 2px 4px 6px 0 rgba(0,0,0,.1);
|
83
|
+
box-shadow: 2px 4px 6px 0 rgba(0,0,0,.1);
|
84
|
+
}
|
85
|
+
|
86
|
+
/**
|
87
|
+
* Nestable Extras
|
88
|
+
*/
|
89
|
+
|
90
|
+
.nestable-lists { display: block; clear: both; padding: 30px 0; width: 100%; border: 0; border-top: 2px solid #ddd; border-bottom: 2px solid #ddd; }
|
91
|
+
|
92
|
+
|
93
|
+
.dd-hover > .dd-handle { background: #2ea8e5 !important; }
|
94
|
+
|
95
|
+
/**
|
96
|
+
* Nestable Draggable Handles
|
97
|
+
*/
|
98
|
+
|
99
|
+
.dd3-content { display: block; margin: 5px 0; padding: 0 0 0 30px;
|
100
|
+
background: #fafafa;
|
101
|
+
background: -webkit-linear-gradient(top, #fafafa 0%, #eee 100%);
|
102
|
+
background: -moz-linear-gradient(top, #fafafa 0%, #eee 100%);
|
103
|
+
background: linear-gradient(top, #fafafa 0%, #eee 100%);
|
104
|
+
-webkit-border-radius: 3px;
|
105
|
+
border-radius: 3px;
|
106
|
+
box-sizing: border-box; -moz-box-sizing: border-box;
|
107
|
+
}
|
108
|
+
.dd3-content.page-admin {
|
109
|
+
position: relative;
|
110
|
+
}
|
111
|
+
.dd3-content .panel-body {background: white;}
|
112
|
+
.dd-dragel > .dd3-item > .dd3-content { margin: 0; }
|
113
|
+
|
114
|
+
.dd3-item > button { margin-left: 30px; }
|
115
|
+
|
116
|
+
.dd3-handle {
|
117
|
+
position: absolute; margin: 0; left: 0; top: 0; cursor: pointer; width: 30px;
|
118
|
+
text-indent: 100px;
|
119
|
+
white-space: nowrap; overflow: hidden;
|
120
|
+
border: 1px solid #aaa;
|
121
|
+
background: #ddd;
|
122
|
+
background: -webkit-linear-gradient(top, #ddd 0%, #bbb 100%);
|
123
|
+
background: -moz-linear-gradient(top, #ddd 0%, #bbb 100%);
|
124
|
+
background: linear-gradient(top, #ddd 0%, #bbb 100%);
|
125
|
+
border-top-right-radius: 0;
|
126
|
+
border-bottom-right-radius: 0;
|
127
|
+
}
|
128
|
+
.dd3-handle:before { content: '≡'; display: block; position: absolute; left: 0; top: 9px; width: 100%; text-align: center; text-indent: 0; color: #fff; font-weight: normal; }
|
129
|
+
.dd3-handle:hover { background: #ddd; }
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module Blacklight::Folders
|
2
|
+
|
3
|
+
# Inherit from the main app's ApplicationController
|
4
|
+
# so that we can inherit the main app's layout.
|
5
|
+
class ApplicationController < ::ApplicationController
|
6
|
+
|
7
|
+
include Blacklight::Folders::ApplicationControllerBehavior
|
8
|
+
check_authorization
|
9
|
+
|
10
|
+
end
|
11
|
+
end
|