Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 02e0bbb

Browse files
author
Jamie Snape
committed
Fix various ESLint errors
1 parent 19655c2 commit 02e0bbb

File tree

73 files changed

+646
-685
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+646
-685
lines changed

core/public/js/admin/admin.index.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ midas.admin.initModulesConfigLinks = function () {
2020
/** On assetstore add response */
2121
midas.admin.assetstoreAddCallback = function (responseText, statusText, xhr, $form) {
2222
'use strict';
23-
$(".assetstoreLoading").hide();
23+
$('.assetstoreLoading').hide();
2424
if (responseText.error) {
25-
$(".addAssetstoreFormError").html('Error: ' + responseText.error).show();
25+
$('.addAssetstoreFormError').html('Error: ' + responseText.error).show();
2626
}
2727
else if (responseText.msg) {
2828
$(document).trigger('hideCluetip');
@@ -41,25 +41,25 @@ midas.admin.assetstoreSubmit = function (formData, jqForm, options) {
4141
// Add the type is the one in the main page (because it's hidden in the assetstore add page)
4242
var assetstoretype = {};
4343
assetstoretype.name = 'type';
44-
assetstoretype.value = $("#importassetstoretype").val();
44+
assetstoretype.value = $('#importassetstoretype').val();
4545
formData.push(assetstoretype);
46-
$(".assetstoreLoading").show();
47-
$(".addAssetstoreFormError").html('').hide();
46+
$('.assetstoreLoading').show();
47+
$('.addAssetstoreFormError').html('').hide();
4848
}; // end assetstoreBeforeSubmit
4949

5050
/** When the cancel is clicked in the new assetstore window */
5151
midas.admin.newAssetstoreShow = function () {
5252
'use strict';
5353
var assetstoretype = $('select#importassetstoretype option:selected').val();
54-
$('#assetstoretype').find('option:selected').removeAttr("selected");
55-
$('#assetstoretype').find('option[value=' + assetstoretype + ']').attr("selected", "selected");
54+
$('#assetstoretype').find('option:selected').removeAttr('selected');
55+
$('#assetstoretype').find('option[value=' + assetstoretype + ']').attr('selected', 'selected');
5656
}; // end function newAssetstoreShow
5757

5858
/** When the cancel is clicked in the new assetstore window */
5959
midas.admin.newAssetstoreHide = function () {
6060
'use strict';
6161
$(document).trigger('hideCluetip');
62-
}; // end function newAssetstoreHide
62+
};
6363

6464
midas.admin.validateConfig = function (formData, jqForm, options) {};
6565

@@ -70,7 +70,7 @@ midas.admin.successConfig = function (responseText, statusText, xhr, form) {
7070
jsonResponse = $.parseJSON(responseText);
7171
}
7272
catch (e) {
73-
midas.createNotice("An error occured. Please check the logs.", 4000, 'error');
73+
midas.createNotice('An error occured. Please check the logs.', 4000, 'error');
7474
return false;
7575
}
7676
if (jsonResponse === null) {
@@ -87,15 +87,15 @@ midas.admin.successConfig = function (responseText, statusText, xhr, form) {
8787

8888
$(document).ready(function () {
8989
'use strict';
90-
midas.admin.tabs = $("#tabsGeneric").tabs({});
91-
$("#tabsGeneric").show();
90+
midas.admin.tabs = $('#tabsGeneric').tabs({});
91+
$('#tabsGeneric').show();
9292
$('img.tabsLoading').hide();
9393

9494
$('.defaultAssetstoreLink').click(function () {
9595
$.post(json.global.webroot + '/assetstore/defaultassetstore', {
96-
submitDefaultAssetstore: true,
97-
element: $(this).attr('element')
98-
},
96+
submitDefaultAssetstore: true,
97+
element: $(this).attr('element')
98+
},
9999
function (data) {
100100
var jsonResponse = $.parseJSON(data);
101101
if (jsonResponse === null) {
@@ -126,9 +126,9 @@ $(document).ready(function () {
126126
midas.showDialogWithContent('Remove Assetstore', html, false);
127127

128128
$('input.deleteAssetstoreYes').unbind('click').click(function () {
129-
$("div.MainDialog").dialog('close');
129+
$('div.MainDialog').dialog('close');
130130
midas.ajaxSelectRequest = $.ajax({
131-
type: "POST",
131+
type: 'POST',
132132
url: json.global.webroot + '/assetstore/delete',
133133
data: {
134134
assetstoreId: element
@@ -144,7 +144,7 @@ $(document).ready(function () {
144144
});
145145
});
146146
$('input.deleteAssetstoreNo').unbind('click').click(function () {
147-
$("div.MainDialog").dialog('close');
147+
$('div.MainDialog').dialog('close');
148148
});
149149
});
150150

@@ -163,7 +163,7 @@ $(document).ready(function () {
163163

164164
$('input#assetstoreSubmit').unbind('click').click(function () {
165165
midas.ajaxSelectRequest = $.ajax({
166-
type: "POST",
166+
type: 'POST',
167167
url: json.global.webroot + '/assetstore/edit',
168168
data: {
169169
assetstoreId: element,
@@ -184,7 +184,7 @@ $(document).ready(function () {
184184
});
185185
});
186186
$('input.deleteAssetstoreNo').unbind('click').click(function () {
187-
$("div.MainDialog").dialog('close');
187+
$('div.MainDialog').dialog('close');
188188
});
189189
});
190190

@@ -224,7 +224,7 @@ $(document).ready(function () {
224224
modulename: l,
225225
modulevalue: modulevalue
226226
});
227-
midas.createNotice("Dependancy: Enabling module " + l, 1500);
227+
midas.createNotice('Dependancy: Enabling module ' + l, 1500);
228228
}
229229
$('input[module=' + l + ']').attr('checked', true);
230230
}
@@ -248,7 +248,7 @@ $(document).ready(function () {
248248
$.each(moduleDependencies, function (i, l) {
249249
if (l != '') {
250250
found = true;
251-
midas.createNotice("Dependency: The module " + l + " requires " + mainModule + ". You must disable it first.", 4000, 'warning');
251+
midas.createNotice('Dependency: The module ' + l + ' requires ' + mainModule + '. You must disable it first.', 4000, 'warning');
252252
}
253253
});
254254
if (found) {
@@ -258,10 +258,10 @@ $(document).ready(function () {
258258
}
259259

260260
$.post(json.global.webroot + '/admin/index', {
261-
submitModule: true,
262-
modulename: $(this).attr('module'),
263-
modulevalue: modulevalue
264-
},
261+
submitModule: true,
262+
modulename: $(this).attr('module'),
263+
modulevalue: modulevalue
264+
},
265265
function (data) {
266266
var jsonResponse = $.parseJSON(data);
267267
if (jsonResponse === null) {

core/public/js/admin/admin.migrate.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ function startMigrate() {
4040
function migrateCallback(responseText, statusText, xhr, form) {
4141
'use strict';
4242
if (responseText.error) {
43-
$(".viewNotice").html(responseText.error);
44-
$(".viewNotice").fadeIn(100).delay(2000).fadeOut(300);
43+
$('.viewNotice').html(responseText.error);
44+
$('.viewNotice').fadeIn(100).delay(2000).fadeOut(300);
4545
}
4646
else if (responseText.message) {
47-
$(".viewNotice").html(responseText.message);
48-
$(".viewNotice").fadeIn(100).delay(2000).fadeOut(300);
47+
$('.viewNotice').html(responseText.message);
48+
$('.viewNotice').fadeIn(100).delay(2000).fadeOut(300);
4949
}
5050
}
5151

@@ -55,26 +55,26 @@ function assetstoreSubmit(formData, jqForm, options) {
5555
// Add the type is the one in the main page (because it's hidden in the assetstore add page)
5656
var assetstoretype = {};
5757
assetstoretype.name = 'type';
58-
assetstoretype.value = $("#importassetstoretype").val();
58+
assetstoretype.value = $('#importassetstoretype').val();
5959
formData.push(assetstoretype);
60-
$(".assetstoreLoading").show();
60+
$('.assetstoreLoading').show();
6161
} // end assetstoreBeforeSubmit
6262

6363
/** On assetstore add success */
6464
function assetstoreAddCallback(responseText, statusText, xhr, $form) {
6565
'use strict';
66-
$(".assetstoreLoading").hide();
66+
$('.assetstoreLoading').hide();
6767
if (responseText.error) {
68-
$(".viewNotice").html(responseText.error);
69-
$(".viewNotice").fadeIn(100).delay(2000).fadeOut(100);
68+
$('.viewNotice').html(responseText.error);
69+
$('.viewNotice').fadeIn(100).delay(2000).fadeOut(100);
7070
}
7171
else if (responseText.msg) {
7272
$(document).trigger('hideCluetip');
7373

7474
// It worked, we add the assetstore to the list and we select it by default
7575
if (responseText.assetstore_id) {
76-
$("#assetstore").append($("<option></option>").attr("value", responseText.assetstore_id).text(responseText.assetstore_name)
77-
.attr("selected", "selected"));
76+
$('#assetstore').append($('<option></option>').attr('value', responseText.assetstore_id).text(responseText.assetstore_name)
77+
.attr('selected', 'selected'));
7878

7979
// Add to JSON
8080
var newassetstore = {};
@@ -84,8 +84,8 @@ function assetstoreAddCallback(responseText, statusText, xhr, $form) {
8484
assetstores.push(newassetstore);
8585
}
8686

87-
$(".viewNotice").html(responseText.msg);
88-
$(".viewNotice").fadeIn(100).delay(2000).fadeOut(100);
87+
$('.viewNotice').html(responseText.msg);
88+
$('.viewNotice').fadeIn(100).delay(2000).fadeOut(100);
8989
}
9090
} // end assetstoreAddCallback
9191

core/public/js/admin/admin.upgrade.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@ $('#upgradeMIDAS').ajaxForm({
99
success: successUpgrade
1010
});
1111

12-
function validateUpgrade(formData, jqForm, options) {
13-
14-
}
12+
function validateUpgrade(formData, jqForm, options) {}
1513

1614
function successUpgrade(responseText, statusText, xhr, form) {
1715
'use strict';
1816
var jsonResponse;
1917
try {
2018
jsonResponse = $.parseJSON(responseText);
2119
} catch (e) {
22-
alert("An error occured. Please check the logs.");
20+
alert('An error occured. Please check the logs.');
2321
return false;
2422
}
2523
if (jsonResponse === null) {

core/public/js/apikey/apikey.usertab.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ midas.apikey.successApiConfig = function (responseText, statusText, xhr, form) {
1414
jsonResponse = $.parseJSON(responseText);
1515
}
1616
catch (e) {
17-
midas.createNotice("An error occured. Please check the logs.", 4000, 'error');
17+
midas.createNotice('An error occured. Please check the logs.', 4000, 'error');
1818
return false;
1919
}
2020
if (jsonResponse === null) {
@@ -40,10 +40,10 @@ $(document).ready(function () {
4040
$('a.deleteApiKeyLink').click(function () {
4141
var obj = $(this);
4242
$.post(json.global.webroot + '/apikey/usertab', {
43-
deleteAPIKey: true,
44-
element: $(this).attr('element'),
45-
userId: $('#apiUserId').val()
46-
},
43+
deleteAPIKey: true,
44+
element: $(this).attr('element'),
45+
userId: $('#apiUserId').val()
46+
},
4747
function (data) {
4848
var jsonResponse = $.parseJSON(data);
4949
if (jsonResponse === null) {

core/public/js/browse/browse.index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,30 @@ var midas = midas || {};
66
$(document).ready(
77
function () {
88
'use strict';
9-
$("#browseTable").treeTable();
10-
$("img.tableLoading").hide();
11-
$("table#browseTable").show();
9+
$('#browseTable').treeTable();
10+
$('img.tableLoading').hide();
11+
$('table#browseTable').show();
1212

13-
$('div.feedThumbnail img').fadeTo("slow", 0.4);
13+
$('div.feedThumbnail img').fadeTo('slow', 0.4);
1414
$('div.feedThumbnail img').mouseover(
1515
function () {
16-
$(this).fadeTo("fast", 1);
16+
$(this).fadeTo('fast', 1);
1717
});
1818

1919
$('div.feedThumbnail img').mouseout(
2020
function () {
21-
$(this).fadeTo("fast", 0.4);
21+
$(this).fadeTo('fast', 0.4);
2222
});
2323

2424
$('a.createCommunity').click(
2525
function () {
2626
if (json.global.logged) {
27-
midas.loadDialog("createCommunity", "/community/create");
27+
midas.loadDialog('createCommunity', '/community/create');
2828
midas.showDialog(json.community.createCommunity, false);
2929
}
3030
else {
3131
midas.createNotice(json.community.contentCreateLogin, 4000);
32-
$("div.TopDynamicBar").show('blind');
32+
$('div.TopDynamicBar').show('blind');
3333
midas.loadAjaxDynamicBar('login', '/user/login');
3434
}
3535
});

core/public/js/browse/browse.movecopy.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ midas.browse.moveCopyCallbackSelect = function (node) {
1919
parent = null;
2020
var classNames = current[0].className.split(' ');
2121
for (var key in classNames) {
22-
if (classNames[key].match("child-of-")) {
23-
parent = $("#moveCopyTable #" + classNames[key].substring(9));
22+
if (classNames[key].match('child-of-')) {
23+
parent = $('#moveCopyTable #' + classNames[key].substring(9));
2424
}
2525
}
2626
if (parent !== null) {
@@ -39,6 +39,7 @@ midas.browse.moveCopyCallbackSelect = function (node) {
3939
id: node.attr('element')
4040
};
4141
$.post(json.global.webroot + '/browse/getmaxpolicy', params, function (retVal) {
42+
'use strict';
4243
var resp = $.parseJSON(retVal);
4344
node.attr('policy', resp.policy);
4445
midas.browse.checkMoveDestinationValid(node, resp.policy);
@@ -85,9 +86,9 @@ midas.browse.moveCopyCallbackCustomElements = function (node, elements, first) {
8586
var padding = parseInt(node.find('td:first').css('padding-left').slice(0, -2));
8687
var html = '';
8788
$.each(elements.folders, function (index, value) {
88-
html += "<tr id='" + id + "-" + i + "' class='parent child-of-" + id + "' ajax='" + value.folder_id + "'type='folder' element='" + value.folder_id + "'>";
89-
html += " <td><span class='folder'>" + trimName(value.name, padding) + "</span></td>";
90-
html += "</tr>";
89+
html += '<tr id="' + id + '-' + i + '" class="parent child-of-' + id + '" ajax="' + value.folder_id + '"type="folder" element="' + value.folder_id + '">';
90+
html += ' <td><span class="folder">' + trimName(value.name, padding) + '</span></td>';
91+
html += '</tr>';
9192
i++;
9293
});
9394
return html;
@@ -100,15 +101,15 @@ $(document).ready(function () {
100101
return true;
101102
});
102103

103-
$("#moveCopyTable").treeTable({
104+
$('#moveCopyTable').treeTable({
104105
callbackSelect: midas.browse.moveCopyCallbackSelect,
105106
callbackCheckboxes: midas.browse.moveCopyCallbackCheckboxes,
106107
callbackDblClick: midas.browse.moveCopyCallbackDblClick,
107108
callbackCustomElements: midas.browse.moveCopyCallbackCustomElements,
108109
pageLength: 99999 // do not page this table (preserves old functionality)
109110
});
110-
$("img.tableLoading").hide();
111-
$("table#moveCopyTable").show();
111+
$('img.tableLoading').hide();
112+
$('table#moveCopyTable').show();
112113

113114
$('.uploadApplet').hide();
114115

@@ -120,7 +121,7 @@ $(document).ready(function () {
120121
$('#destinationId').val(destValue);
121122
$('.destinationUpload').html(destHtml);
122123
$('.destinationId').val(destValue);
123-
$("div.MainDialog").dialog('close');
124+
$('div.MainDialog').dialog('close');
124125
$('.uploadApplet').show();
125126
return false;
126127
});

0 commit comments

Comments
 (0)