Prevent Versions click handler from closing sharing dropdown
This commit is contained in:
parent
2bd4035076
commit
f29f1cad1d
|
@ -21,7 +21,7 @@ $(document).ready(function(){
|
||||||
}
|
}
|
||||||
,function(filename){
|
,function(filename){
|
||||||
// Action to perform when clicked
|
// Action to perform when clicked
|
||||||
if (scanFiles.scanning){return;}//workaround to prevent additional http request block scanning feedback
|
if (scanFiles.scanning || !$('#dropdown').hasClass('drop-versions')){return;}//workaround to prevent additional http request block scanning feedback
|
||||||
|
|
||||||
var file = $('#dir').val()+'/'+filename;
|
var file = $('#dir').val()+'/'+filename;
|
||||||
// Check if drop down is already visible for a different file
|
// Check if drop down is already visible for a different file
|
||||||
|
@ -45,7 +45,7 @@ function createVersionsDropdown(filename, files) {
|
||||||
|
|
||||||
var historyUrl = OC.linkTo('files_versions', 'history.php') + '?path='+encodeURIComponent( $( '#dir' ).val() ).replace( /%2F/g, '/' )+'/'+encodeURIComponent( filename );
|
var historyUrl = OC.linkTo('files_versions', 'history.php') + '?path='+encodeURIComponent( $( '#dir' ).val() ).replace( /%2F/g, '/' )+'/'+encodeURIComponent( filename );
|
||||||
|
|
||||||
var html = '<div id="dropdown" class="drop" data-file="'+files+'">';
|
var html = '<div id="dropdown" class="drop drop-versions" data-file="'+files+'">';
|
||||||
html += '<div id="private">';
|
html += '<div id="private">';
|
||||||
html += '<select data-placeholder="Saved versions" id="found_versions" class="chzen-select" style="width:16em;">';
|
html += '<select data-placeholder="Saved versions" id="found_versions" class="chzen-select" style="width:16em;">';
|
||||||
html += '<option value=""></option>';
|
html += '<option value=""></option>';
|
||||||
|
@ -137,8 +137,7 @@ function createVersionsDropdown(filename, files) {
|
||||||
|
|
||||||
$(this).click(
|
$(this).click(
|
||||||
function(event) {
|
function(event) {
|
||||||
|
if ($('#dropdown').has(event.target).length === 0 && $('#dropdown').hasClass('drop-versions')) {
|
||||||
if ($('#dropdown').has(event.target).length === 0) {
|
|
||||||
$('#dropdown').hide('blind', function() {
|
$('#dropdown').hide('blind', function() {
|
||||||
$('#dropdown').remove();
|
$('#dropdown').remove();
|
||||||
$('tr').removeClass('mouseOver');
|
$('tr').removeClass('mouseOver');
|
||||||
|
|
Loading…
Reference in New Issue