Merge pull request #347 from williamschey/devel-1.5.1

Use Select2 dropdowns on Document/Folder copy/move
This commit is contained in:
Karel Picman 2015-02-13 09:17:39 +01:00
commit a0b028227b
5 changed files with 26 additions and 1 deletions

View File

@ -17,6 +17,11 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
<!--Select2 Files-->
<%= stylesheet_link_tag 'select2.min.css', :plugin => 'redmine_dmsf' %>
<%= javascript_include_tag 'select2.min.js', :plugin => 'redmine_dmsf' %>
<% html_title(l(:dmsf)) %>
<div class="contextual">
@ -54,5 +59,9 @@
jQuery('#target_project_id').change(function () {
jQuery('#content').load("<%= url_for(:action => 'new') %>", jQuery('#copyForm').serialize());
jQuery('#target_folder_id' ).select2({ width: "600px" });
});
jQuery('#target_project_id' ).select2({ width: "600px" });
jQuery('#target_folder_id' ).select2({ width: "600px" });
</script>

View File

@ -17,6 +17,11 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
<!--Select2 Files-->
<%= stylesheet_link_tag 'select2.min.css', :plugin => 'redmine_dmsf' %>
<%= javascript_include_tag 'select2.min.js', :plugin => 'redmine_dmsf' %>
<% html_title(l(:dmsf)) %>
<div class="contextual"></div>
@ -45,5 +50,9 @@
<script type="text/javascript">
jQuery('#target_project_id').change(function () {
jQuery('#content').load("<%= url_for(:action => 'new') %>", jQuery('#copyForm').serialize());
jQuery('#target_folder_id' ).select2({ width: "600px" });
});
jQuery('#target_project_id' ).select2({ width: "600px" });
jQuery('#target_folder_id' ).select2({ width: "600px" });
</script>

2
assets/javascripts/select2.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -355,4 +355,8 @@ label.required:after {
/* Search results */
dt.dmsf-file { background-image: url(../../../images/document.png); }
dt.dmsf-folder { background-image: url(../../../images/folder.png); }
dt.dmsf-folder { background-image: url(../../../images/folder.png); }
.select2-selection{height: 100% !important; min-height: 30px;}
.select2-selection__rendered{overflow: visible !important; min-height: 30px;}
.select2-results__options {max-height: 600px !important;}

1
assets/stylesheets/select2.min.css vendored Normal file

File diff suppressed because one or more lines are too long