attach to filelist which is present on .ready()
This commit is contained in:
parent
263c3f3a42
commit
d7823adb07
|
@ -410,7 +410,7 @@ $(document).ready(function() {
|
||||||
firstDay: firstDay
|
firstDay: firstDay
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$('a.share').on('click', function(event) {
|
$('#fileList').on('click', 'a.share', function(event) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
if ($(this).data('item-type') !== undefined && $(this).data('item') !== undefined) {
|
if ($(this).data('item-type') !== undefined && $(this).data('item') !== undefined) {
|
||||||
var itemType = $(this).data('item-type');
|
var itemType = $(this).data('item-type');
|
||||||
|
@ -444,12 +444,12 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#shareWithList').on('mouseenter', 'li', function(event) {
|
$('#fileList').on('mouseenter', '#dropdown #shareWithList li', function(event) {
|
||||||
// Show permissions and unshare button
|
// Show permissions and unshare button
|
||||||
$(':hidden', this).filter(':not(.cruds)').show();
|
$(':hidden', this).filter(':not(.cruds)').show();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#shareWithList').on('mouseleave', 'li', function(event) {
|
$('#fileList').on('mouseleave', '#dropdown #shareWithList li', function(event) {
|
||||||
// Hide permissions and unshare button
|
// Hide permissions and unshare button
|
||||||
if (!$('.cruds', this).is(':visible')) {
|
if (!$('.cruds', this).is(':visible')) {
|
||||||
$('a', this).hide();
|
$('a', this).hide();
|
||||||
|
@ -462,11 +462,11 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.showCruds').on('click', function() {
|
$('#fileList').on('click', '#dropdown .showCruds', function() {
|
||||||
$(this).parent().find('.cruds').toggle();
|
$(this).parent().find('.cruds').toggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.unshare').on('click', function() {
|
$('#fileList').on('click', '#dropdown .unshare', function() {
|
||||||
var li = $(this).parent();
|
var li = $(this).parent();
|
||||||
var itemType = $('#dropdown').data('item-type');
|
var itemType = $('#dropdown').data('item-type');
|
||||||
var itemSource = $('#dropdown').data('item-source');
|
var itemSource = $('#dropdown').data('item-source');
|
||||||
|
@ -483,7 +483,7 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.permissions').on('change', function() {
|
$('#fileList').on('change', '#dropdown .permissions', function() {
|
||||||
if ($(this).attr('name') == 'edit') {
|
if ($(this).attr('name') == 'edit') {
|
||||||
var li = $(this).parent().parent()
|
var li = $(this).parent().parent()
|
||||||
var checkboxes = $('.permissions', li);
|
var checkboxes = $('.permissions', li);
|
||||||
|
@ -510,7 +510,7 @@ $(document).ready(function() {
|
||||||
OC.Share.setPermissions($('#dropdown').data('item-type'), $('#dropdown').data('item-source'), $(li).data('share-type'), $(li).data('share-with'), permissions);
|
OC.Share.setPermissions($('#dropdown').data('item-type'), $('#dropdown').data('item-source'), $(li).data('share-type'), $(li).data('share-with'), permissions);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#linkCheckbox').on('change', function() {
|
$('#fileList').on('change', '#dropdown #linkCheckbox', function() {
|
||||||
var itemType = $('#dropdown').data('item-type');
|
var itemType = $('#dropdown').data('item-type');
|
||||||
var itemSource = $('#dropdown').data('item-source');
|
var itemSource = $('#dropdown').data('item-source');
|
||||||
if (this.checked) {
|
if (this.checked) {
|
||||||
|
@ -532,12 +532,12 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#linkText').on('click', function() {
|
$('#fileList').on('click', '#dropdown #linkText', function() {
|
||||||
$(this).focus();
|
$(this).focus();
|
||||||
$(this).select();
|
$(this).select();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#showPassword').on('click', function() {
|
$('#fileList').on('click', '#dropdown #showPassword', function() {
|
||||||
$('#linkPass').toggle('blind');
|
$('#linkPass').toggle('blind');
|
||||||
if (!$('#showPassword').is(':checked') ) {
|
if (!$('#showPassword').is(':checked') ) {
|
||||||
var itemType = $('#dropdown').data('item-type');
|
var itemType = $('#dropdown').data('item-type');
|
||||||
|
@ -548,7 +548,7 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#linkPassText').on('focusout keyup', function(event) {
|
$('#fileList').on('focusout keyup', '#dropdown #linkPassText', function(event) {
|
||||||
if ( $('#linkPassText').val() != '' && (event.type == 'focusout' || event.keyCode == 13) ) {
|
if ( $('#linkPassText').val() != '' && (event.type == 'focusout' || event.keyCode == 13) ) {
|
||||||
var itemType = $('#dropdown').data('item-type');
|
var itemType = $('#dropdown').data('item-type');
|
||||||
var itemSource = $('#dropdown').data('item-source');
|
var itemSource = $('#dropdown').data('item-source');
|
||||||
|
@ -560,7 +560,7 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#expirationCheckbox').on('click', function() {
|
$('#fileList').on('click', '#dropdown #expirationCheckbox', function() {
|
||||||
if (this.checked) {
|
if (this.checked) {
|
||||||
OC.Share.showExpirationDate('');
|
OC.Share.showExpirationDate('');
|
||||||
} else {
|
} else {
|
||||||
|
@ -575,7 +575,7 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#expirationDate').on('change', function() {
|
$('#fileList').on('change', '#dropdown #expirationDate', function() {
|
||||||
var itemType = $('#dropdown').data('item-type');
|
var itemType = $('#dropdown').data('item-type');
|
||||||
var itemSource = $('#dropdown').data('item-source');
|
var itemSource = $('#dropdown').data('item-source');
|
||||||
$.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'setExpirationDate', itemType: itemType, itemSource: itemSource, date: $(this).val() }, function(result) {
|
$.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'setExpirationDate', itemType: itemType, itemSource: itemSource, date: $(this).val() }, function(result) {
|
||||||
|
@ -586,7 +586,7 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$('#emailPrivateLink').on('submit', function(event) {
|
$('#fileList').on('submit', '#dropdown #emailPrivateLink', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var link = $('#linkText').val();
|
var link = $('#linkText').val();
|
||||||
var itemType = $('#dropdown').data('item-type');
|
var itemType = $('#dropdown').data('item-type');
|
||||||
|
|
Loading…
Reference in New Issue