don't try to register file actions when we're not in the files app
This commit is contained in:
parent
47081a2471
commit
4ba527625f
|
@ -9,30 +9,30 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
if (typeof FileActions !== 'undefined') {
|
||||||
// Add history button to files/index.php
|
// Add history button to files/index.php
|
||||||
FileActions.register('file','History',function(){return OC.imagePath('core','actions/history')},function(filename){
|
FileActions.register('file','History',function(){return OC.imagePath('core','actions/history')},function(filename){
|
||||||
|
|
||||||
if (scanFiles.scanning){return;}//workaround to prevent additional http request block scanning feedback
|
|
||||||
|
|
||||||
var file = $('#dir').val()+'/'+filename;
|
|
||||||
|
|
||||||
createVersionsDropdown(filename, file)
|
|
||||||
|
|
||||||
$.ajax({
|
if (scanFiles.scanning){return;}//workaround to prevent additional http request block scanning feedback
|
||||||
type: 'GET',
|
|
||||||
url: OC.linkTo('files_versions', 'ajax/getVersions.php'),
|
var file = $('#dir').val()+'/'+filename;
|
||||||
dataType: 'json',
|
|
||||||
data: {source: file},
|
createVersionsDropdown(filename, file)
|
||||||
async: false,
|
|
||||||
success: function(versions) {
|
$.ajax({
|
||||||
if (versions) {
|
type: 'GET',
|
||||||
|
url: OC.linkTo('files_versions', 'ajax/getVersions.php'),
|
||||||
|
dataType: 'json',
|
||||||
|
data: {source: file},
|
||||||
|
async: false,
|
||||||
|
success: function(versions) {
|
||||||
|
if (versions) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function createVersionsDropdown(filename, files) {
|
function createVersionsDropdown(filename, files) {
|
||||||
|
|
Loading…
Reference in New Issue