Fix a syntax error & have if-conds in an own line

This commit is contained in:
kondou 2013-08-01 18:44:01 +02:00
parent aaf0fec9f5
commit 1348330c7d
5 changed files with 31 additions and 11 deletions

View file

@ -156,7 +156,9 @@ $(document).ready(function() {
// http://stackoverflow.com/a/6700/11236
var size = 0, key;
for (key in obj) {
if (obj.hasOwnProperty(key)) { size++; }
if (obj.hasOwnProperty(key)) {
size++;
}
}
return size;
};

View file

@ -131,7 +131,9 @@ var Files = Files || {};
return;
}
var preventDefault = false;
if ($.inArray(event.keyCode, keys) === -1) { keys.push(event.keyCode); }
if ($.inArray(event.keyCode, keys) === -1) {
keys.push(event.keyCode);
}
if (
$.inArray(keyCodes.n, keys) !== -1 && ($.inArray(keyCodes.cmdFirefox, keys) !== -1 || $.inArray(keyCodes.cmdOpera, keys) !== -1 || $.inArray(keyCodes.leftCmdWebKit, keys) !== -1 || $.inArray(keyCodes.rightCmdWebKit, keys) !== -1 || $.inArray(keyCodes.ctrl, keys) !== -1 || event.ctrlKey)) {
preventDefault = true; //new file/folder prevent browser from responding

View file

@ -51,7 +51,7 @@ $(document).ready(function() {
}
// Add some form data to the upload handler
var file_upload_param.formData = {
file_upload_param.formData = {
MAX_FILE_SIZE: $('#uploadMaxFilesize').val(),
requesttoken: $('#publicUploadRequestToken').val(),
dirToken: $('#dirToken').val(),

View file

@ -79,9 +79,15 @@ var OCdialogs = {
title: title
}).data('path', '');
if (modal === undefined) { modal = false; }
if (multiselect === undefined) { multiselect = false; }
if (mimetype_filter === undefined) { mimetype_filter = ''; }
if (modal === undefined) {
modal = false;
}
if (multiselect === undefined) {
multiselect = false;
}
if (mimetype_filter === undefined) {
mimetype_filter = '';
}
$('body').append(self.$filePicker);
@ -155,7 +161,9 @@ var OCdialogs = {
message: content,
type: dialog_type
});
if (modal === undefined) { modal = false; }
if (modal === undefined) {
modal = false;
}
$('body').append($dlg);
var buttonlist = [];
switch (buttons) {
@ -163,7 +171,9 @@ var OCdialogs = {
buttonlist = [{
text: t('core', 'Yes'),
click: function(){
if (callback !== undefined) { callback(true); }
if (callback !== undefined) {
callback(true);
}
$(dialog_id).ocdialog('close');
},
defaultButton: true
@ -171,7 +181,9 @@ var OCdialogs = {
{
text: t('core', 'No'),
click: function(){
if (callback !== undefined) { callback(false); }
if (callback !== undefined) {
callback(false);
}
$(dialog_id).ocdialog('close');
}
}];
@ -179,7 +191,9 @@ var OCdialogs = {
case OCdialogs.OK_BUTTON:
var functionToCall = function() {
$(dialog_id).ocdialog('close');
if(callback !== undefined) { callback(); }
if(callback !== undefined) {
callback();
}
};
buttonlist[0] = {
text: t('core', 'Ok'),

View file

@ -166,7 +166,9 @@ var UserList = {
var c = Number(aa[x]), d = Number(bb[x]);
if (c === aa[x] && d === bb[x]) {
return c - d;
} else { return (aa[x] > bb[x]) ? 1 : -1; }
} else {
return (aa[x] > bb[x]) ? 1 : -1;
}
}
}
return aa.length - bb.length;