diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-08-29 08:42:49 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-08-29 20:29:43 +0200 |
commit | 0e58800016419daf3b2d032136415a5fe9d6331f (patch) | |
tree | c842a8c9104b3c9f2ceab2d505fe01a25f7d0dda /apps/files_versions/js | |
parent | 52f2e7112ea985203eca16aa787bd75a7cf92194 (diff) | |
download | nextcloud-server-0e58800016419daf3b2d032136415a5fe9d6331f.tar.gz nextcloud-server-0e58800016419daf3b2d032136415a5fe9d6331f.zip |
Whitespace fixes in apps
Diffstat (limited to 'apps/files_versions/js')
-rw-r--r-- | apps/files_versions/js/settings-personal.js | 28 | ||||
-rw-r--r-- | apps/files_versions/js/versions.js | 30 |
2 files changed, 29 insertions, 29 deletions
diff --git a/apps/files_versions/js/settings-personal.js b/apps/files_versions/js/settings-personal.js index 6ea8c1a950f..1e6b036fdab 100644 --- a/apps/files_versions/js/settings-personal.js +++ b/apps/files_versions/js/settings-personal.js @@ -2,16 +2,16 @@ $( document ).ready(function(){ // - $( '#expireAllBtn' ).click( - + $( '#expireAllBtn' ).click( + function( event ) { - + // Prevent page from reloading event.preventDefault(); - + // Show loading gif $('.expireAllLoading').show(); - + $.getJSON( OC.filePath('files_versions','ajax','expireAll.php'), function(result){ @@ -19,20 +19,20 @@ $( document ).ready(function(){ $('.expireAllLoading').hide(); $('#expireAllBtn').html('Expiration successful'); } else { - + // Cancel loading $('#expireAllBtn').html('Expiration failed'); - + // Show Dialog OC.dialogs.alert( - 'Something went wrong, your files may not have been expired', - 'An error has occurred', - function(){ - $('#expireAllBtn').html(t('files_versions', 'Expire all versions')+'<img style="display: none;" class="loading" src="'+OC.filePath('core','img','loading.gif')+'" />'); - } - ); + 'Something went wrong, your files may not have been expired', + 'An error has occurred', + function(){ + $('#expireAllBtn').html(t('files_versions', 'Expire all versions')+'<img style="display: none;" class="loading" src="'+OC.filePath('core','img','loading.gif')+'" />'); + } + ); } - } + } ); } ); diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js index c5c1553f1a8..e34a6f50cac 100644 --- a/apps/files_versions/js/versions.js +++ b/apps/files_versions/js/versions.js @@ -14,7 +14,7 @@ $(document).ready(function(){ FileActions.register('file','History', FileActions.PERMISSION_UPDATE, 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; // Check if drop down is already visible for a different file if (($('#dropdown').length > 0)) { @@ -35,7 +35,7 @@ $(document).ready(function(){ function createVersionsDropdown(filename, files) { 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+'">'; html += '<div id="private">'; html += '<select data-placeholder="Saved versions" id="found_versions" class="chzen-select" style="width:16em;">'; @@ -45,14 +45,14 @@ function createVersionsDropdown(filename, files) { //html += '<input type="button" value="Revert file" onclick="revertFile()" />'; html += '<input type="button" value="All versions..." onclick="window.location=\''+historyUrl+'\'" name="makelink" id="makelink" />'; html += '<input id="link" style="display:none; width:90%;" />'; - + if (filename) { $('tr').filterAttr('data-file',filename).addClass('mouseOver'); $(html).appendTo($('tr').filterAttr('data-file',filename).find('td.filename')); } else { $(html).appendTo($('thead .share')); } - + $.ajax({ type: 'GET', url: OC.filePath('files_versions', 'ajax', 'getVersions.php'), @@ -60,9 +60,9 @@ function createVersionsDropdown(filename, files) { data: { source: files }, async: false, success: function( versions ) { - + //alert("helo "+OC.linkTo('files_versions', 'ajax/getVersions.php')); - + if (versions) { $.each( versions, function(index, row ) { addVersion( row ); @@ -79,9 +79,9 @@ function createVersionsDropdown(filename, files) { }) } }); - + function revertFile(file, revision) { - + $.ajax({ type: 'GET', url: OC.linkTo('files_versions', 'ajax/rollbackVersion.php'), @@ -99,16 +99,16 @@ function createVersionsDropdown(filename, files) { }); } } - }); - + }); + } - + function addVersion(revision ) { name=formatDate(revision.version*1000); var version=$('<option/>'); version.attr('value',revision.version); version.text(name); - + // } else { // var checked = ((permissions > 0) ? 'checked="checked"' : 'style="display:none;"'); // var style = ((permissions == 0) ? 'style="display:none;"' : ''); @@ -119,11 +119,11 @@ function createVersionsDropdown(filename, files) { // user += '<label for="'+uid_shared_with+'" '+style+'>can edit</label>'; // user += '</li>'; // } - + version.appendTo('#found_versions'); } $('#dropdown').show('blind'); - - + + } |