getCurrentPermissions:function() {
return FileActions.currentFile.parent().data('permissions');
}
-}
+};
$(document).ready(function(){
if($('#allowZipDownload').val() == 1){
} else {
var downloadScope = 'file';
}
- FileActions.register(downloadScope,'Download', OC.PERMISSION_READ, function(){return OC.imagePath('core','actions/download')},function(filename){
+ FileActions.register(downloadScope,'Download', OC.PERMISSION_READ, function(){return OC.imagePath('core','actions/download');},function(filename){
window.location=OC.filePath('files', 'ajax', 'download.php') + encodeURIComponent('?files='+encodeURIComponent(filename)+'&dir='+encodeURIComponent($('#dir').val()));
});
});
-FileActions.register('all','Delete', OC.PERMISSION_DELETE, function(){return OC.imagePath('core','actions/delete')},function(filename){
+FileActions.register('all','Delete', OC.PERMISSION_DELETE, function(){return OC.imagePath('core','actions/delete');},function(filename){
if(Files.cancelUpload(filename)) {
if(filename.substr){
filename=[filename];
$('.tipsy').remove();
});
-FileActions.register('all','Rename', OC.PERMISSION_UPDATE, function(){return OC.imagePath('core','actions/rename')},function(filename){
+FileActions.register('all','Rename', OC.PERMISSION_UPDATE, function(){return OC.imagePath('core','actions/rename');},function(filename){
FileList.rename(filename);
});
});
procesSelection();
}
-}
+};
$(document).ready(function() {
$('#fileList tr').each(function(){
//little hack to set unescape filenames in attribute
$('#enable_encryption').change(function(){
var checked=$('#enable_encryption').is(':checked');
OC.AppConfig.setValue('files_encryption','enable_encryption',(checked)?'true':'false');
- })
-})
\ No newline at end of file
+ });
+});
var app_secret = $(this).find('.configuration [data-parameter="app_secret"]').val();
var config = $(this).find('.configuration');
if (app_key != '' && app_secret != '') {
- var pos = window.location.search.indexOf('oauth_token') + 12
+ var pos = window.location.search.indexOf('oauth_token') + 12;
var token = $(this).find('.configuration [data-parameter="token"]');
if (pos != -1 && window.location.search.substr(pos, $(token).val().length) == $(token).val()) {
var token_secret = $(this).find('.configuration [data-parameter="token_secret"]');
}
});
} else {
- OC.dialogs.alert('Please provide a valid Dropbox app key and secret.', 'Error configuring Dropbox storage')
+ OC.dialogs.alert('Please provide a valid Dropbox app key and secret.', 'Error configuring Dropbox storage');
}
});
return true;
}
}
-}
+};
$(document).ready(function() {
$('.chzn-select').chosen();
}
});
-});
\ No newline at end of file
+});
$(document).ready(function(){
if (typeof FileActions !== 'undefined') {
// Add history button to files/index.php
- FileActions.register('file','History', OC.PERMISSION_UPDATE, function(){return OC.imagePath('core','actions/history')},function(filename){
+ FileActions.register('file','History', OC.PERMISSION_UPDATE, function(){return OC.imagePath('core','actions/history');},function(filename){
if (scanFiles.scanning){return;}//workaround to prevent additional http request block scanning feedback
$('#found_versions').change(function(){
var revision=parseInt($(this).val());
revertFile(files,revision);
- })
+ });
}
});
deleteApp:function(app){
OC.AppConfig.postCall('deleteApp',{app:app});
},
-}
+};
//TODO OC.Preferences
popup.prepend('<span class="arrow '+arrowclass+'"></span><h2>'+t('core', 'Settings')+'</h2><a class="close svg"></a>').show();
popup.find('.close').bind('click', function() {
popup.remove();
- })
+ });
if(typeof props.loadJS !== 'undefined') {
var scriptname;
if(props.loadJS === true) {
html+='<thead>';
html+='</head>';
html+='<tbody>';
- html+'<tr class="template">'
+ html+'<tr class="template">';
$.each(collumns,function(index,collumn){
html+='<th class="'+collumn.toLower()+'"</th>';
});
- html+'</tr>'
+ html+'</tr>';
html+='</tbody>';
html='</table>';
return $(html);
-}
+};
ListView.prototype={
rows:{},
var element=$(html);
element.append($('<img src="'+element.icon+'"/>'));
element.click(element.callback);
- tr.children('td.'+collumn).append(element)
+ tr.children('td.'+collumn).append(element);
});
});
if(this.deleteCallback){
empty:function(){
this.element.children('tr:not(.template)').remove();
}
-}
\ No newline at end of file
+};
-var dbtypes
+var dbtypes;
$(document).ready(function() {
dbtypes={
sqlite:!!$('#hasSQLite').val(),
mysql:!!$('#hasMySQL').val(),
postgresql:!!$('#hasPostgreSQL').val(),
oracle:!!$('#hasOracle').val(),
- }
+ };
$('#selectDbType').buttonset();
$('#datadirContent').hide(250);
html += '<input id="linkText" type="text" readonly="readonly" />';
html += '<div id="linkPass">';
html += '<input id="linkPassText" type="password" placeholder="Password" />';
- html += '</div>'
+ html += '</div>';
html += '</div>';
}
html += '</div>';
var value = 'no';
}
} else {
- var value = $(this).val()
+ var value = $(this).val();
}
OC.AppConfig.setValue('core', $(this).attr('name'), value);
});
-});
\ No newline at end of file
+});
}
return app;
}
-}
+};
$(document).ready(function(){
$('#leftcontent li').each(function(index,li){
});
$('#leftcontent li').keydown(function(event) {
if (event.which == 13 || event.which == 32) {
- $(event.target).click()
+ $(event.target).click();
}
return false;
});
$(selector).html( data.data.message ).addClass('error');
}
}
-}
+};