Skip to content

Commit 1f7af43

Browse files
author
Petr Chalupa
committed
Merge pull request #1993 from pitr-ch/quick-fix/ruby-lint
move ruby-linter to a minitest spec
2 parents 048207d + 55a1977 commit 1f7af43

File tree

97 files changed

+2856
-3599
lines changed

Some content is hidden

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

97 files changed

+2856
-3599
lines changed

app/assets/javascripts/activation_keys/activation_key.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ $(document).ready(function() {
8181
});
8282
}
8383
});
84-
84+
8585
KT.system_groups_pane.register_events();
8686
});
8787

app/assets/javascripts/changesets/changeset.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
1212
*/
1313

14-
KT.panel.list.registerPage('changesets',
15-
{ 'extra_params' :
16-
[ { hash_id : 'env_id',
17-
init_func : function(){
18-
var state = $.bbq.getState('env_id');
19-
20-
if( state ){
21-
env_select.set_selected(state);
22-
} else {
23-
$.bbq.pushState({ env_id : env_select.get_selected_env() });
24-
}
25-
}
26-
}
27-
]
28-
});
14+
KT.panel.list.registerPage('changesets',
15+
{ 'extra_params' :
16+
[ { hash_id : 'env_id',
17+
init_func : function(){
18+
var state = $.bbq.getState('env_id');
19+
20+
if( state ){
21+
env_select.set_selected(state);
22+
} else {
23+
$.bbq.pushState({ env_id : env_select.get_selected_env() });
24+
}
25+
}
26+
}
27+
]
28+
});
2929

3030

3131
$(document).ready(function() {
@@ -35,7 +35,7 @@ $(document).ready(function() {
3535
$.bbq.pushState({env_id : env_id});
3636
$('#search_form').trigger('submit');
3737
};
38-
38+
3939
});
4040

4141

app/assets/javascripts/changesets/changeset_edit.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $(document).ready(function() {
1919
$("#changeset_history_tabs .clickable").click(function(){
2020

2121
$(this).parents(".content_group").children(".cs_content").slideToggle();
22-
22+
2323
var arrow = $(this).parent().find('img');
2424
if(arrow.attr("src").indexOf("collapsed") === -1){
2525
arrow.attr("src", "icons/expander-collapsed.png");
@@ -31,7 +31,7 @@ $(document).ready(function() {
3131
$('.edit_textfield').each(function() {
3232
$(this).editable($(this).attr('data-url'), {
3333
type : 'text',
34-
width : 270,
34+
width : 270,
3535
method : 'PUT',
3636
name : $(this).attr('name'),
3737
cancel : i18n.cancel,
@@ -44,7 +44,7 @@ $(document).ready(function() {
4444
var parsed = $.parseJSON(data);
4545
$(this).html(parsed.name);
4646
changeset_page.signal_rename($(this).attr("data-id"));
47-
notices.checkNotices();
47+
notices.checkNotices();
4848
},
4949
onerror : function(settings, original, xhr) {
5050
original.reset();

app/assets/javascripts/common/chosen.jquery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Chosen, a Select Box Enhancer for jQuery and Protoype
22
// by Patrick Filler for Harvest, http://getharvest.com
3-
//
3+
//
44
// Version 0.9.5
55
// Full source at https://github.com/harvesthq/chosen
66
// Copyright (c) 2011 Harvest http://getharvest.com

app/assets/javascripts/common/env_select_scroll.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ KT.env_select_scroll = function(options) {
2121
anchors = trail.find("a, label"),
2222
my_min_size_selected = min_size_selected;
2323
anchors.unbind("mouseout").unbind("mouseover").width('auto');
24-
24+
2525
anchors.each(function() {
2626
combined_width += $(this).width() + anchor_padding;
2727
});
@@ -66,7 +66,7 @@ KT.env_select_scroll = function(options) {
6666

6767
//reset the width to contracted state
6868
$(this).width(my_min_size);
69-
69+
7070
var total_time = (total_width - min_size)/px_per_sec, //total time of animation
7171
num_iterations = total_time*1000/freq, //number of 'frames'
7272
chunk_size = (total_width - min_size)/num_iterations; //how many pixels to move each frame
@@ -128,6 +128,6 @@ KT.env_select_scroll = function(options) {
128128
});
129129
});
130130
};
131-
131+
132132
return {bind:bind};
133133
};

app/assets/javascripts/common/katello.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ KT.utils = _.noConflict();
2929
var i18n = {};
3030

3131
function localize(data) {
32-
for (var key in data) {
33-
i18n[key] = data[key];
34-
}
32+
for (var key in data) {
33+
i18n[key] = data[key];
34+
}
3535
}
3636

3737
function update_status() {
@@ -395,11 +395,11 @@ KT.common = (function() {
395395
getSearchParams : function(val) {
396396
var search_string = $.bbq.getState('list_search');
397397

398-
if( search_string ){
399-
return { 'search' : search_string };
400-
} else {
401-
return false;
402-
}
398+
if( search_string ){
399+
return { 'search' : search_string };
400+
} else {
401+
return false;
402+
}
403403
},
404404
spinner_path : function() {
405405
return KT.common.rootURL() + "assets/icons/spinner.gif";

app/assets/javascripts/common/menu.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ KT.menu = (function(){
7474
var enter = function(){topLevelTab.trigger("mouseenter");};
7575
var leave = function(){topLevelTab.delay("800").trigger("mouseout")};
7676
currentSubnav.hover(function(){enter()},function(){leave()});
77-
77+
7878
topLevelTab.bind("open", function(){
7979
//make the tab "highlight" on hover
8080
$(this).addClass('selected');
@@ -106,7 +106,7 @@ KT.menu = (function(){
106106
}
107107
var ul = li.find('ul');
108108
var options = options || {};
109-
109+
110110
if( options.top ){
111111
ul.css('top', options.top);
112112
}

app/assets/javascripts/common/notices.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var notices = (function() {
1717
if (pollingTimeOut === undefined) {
1818
pollingTimeOut = 45000;
1919
}
20-
20+
2121
notices.checkTimeout = pollingTimeOut;
2222
//start continual checking for new notifications
2323
notices.start();
@@ -28,14 +28,14 @@ var notices = (function() {
2828
displayNotice: function(level, notice, requestType) {
2929
var noticesParsed = $.parseJSON(notice),
3030
options = {
31-
type: level,
31+
type: level,
3232
slideSpeed: 200,
3333
alwaysClosable: true
3434
},
3535
generate_list = function(notices){
3636
var notices_list = '<ul class='+requestType+'>',
3737
i, length = notices.length;
38-
38+
3939
for( i=0; i < length; i += 1) {
4040
notices_list += '<li>' + notices[i] + '</li>';
4141
}
@@ -61,7 +61,7 @@ var notices = (function() {
6161
options["fadeSpeed"] = 600;
6262
} else if( level === "message" ) {
6363
options["sticky"] = true;
64-
options["fadeSpeed"] = 600;
64+
options["fadeSpeed"] = 600;
6565
} else {
6666
options["sticky"] = false;
6767
options["fadeSpeed"] = 600;
@@ -76,8 +76,8 @@ var notices = (function() {
7676
options["fadeSpeed"] = 600;
7777
$.jnotify(validation_html, options);
7878
$('.jnotify-message ul').css({'list-style': 'disc',
79-
'margin-left': '30px'});
80-
}
79+
'margin-left': '30px'});
80+
}
8181
if( noticesParsed['notices'] && noticesParsed['notices'].length !== 0 ){
8282
$.jnotify(generate_list(noticesParsed['notices']), options);
8383
}

app/assets/javascripts/common/panel.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ $(document).ready(function () {
186186
}
187187

188188
KT.panel.copy.initialize();
189-
189+
190190
for( cb in callbacks ){
191191
callbacks[cb]();
192192
}
@@ -365,7 +365,7 @@ KT.panel = (function ($) {
365365
KT.panel.copy.initialize();
366366

367367
for( callback in expand_cb ){
368-
expand_cb[callback](name);
368+
expand_cb[callback](name);
369369
}
370370
// Add a handler for ellipsis
371371
$(".one-line-ellipsis").ellipsis(true);
@@ -391,7 +391,7 @@ KT.panel = (function ($) {
391391
tupane_header = $('.tupane_header').height() || 0,
392392
tupane_footer = $('.tupane_footer').height() || 0,
393393
window_height = $(window).height(),
394-
container_offset = $('#container').offset().top,
394+
container_offset = $('#container').offset().top,
395395
height,
396396
default_height = 565,
397397
default_spacing = header_spacing + subnav_spacing + tupane_header + tupane_footer + 30;
@@ -861,7 +861,7 @@ KT.panel.list = (function () {
861861
results_items_count = 0,
862862
search,
863863
list_section = $('#list section'),
864-
864+
865865
update_counts = function (current, total, results, clear) {
866866
if (clear) {
867867
current_items_count = current;
@@ -953,7 +953,7 @@ KT.panel.list = (function () {
953953
},
954954
registerPage = function (resource_type, options) {
955955
options = options || {};
956-
956+
957957
search = KT.search("search_form", "list", this,
958958
{url: $("#list").attr("data-scroll_url")}, options['extra_params']);
959959

@@ -978,13 +978,13 @@ KT.panel.list = (function () {
978978
}
979979
$(window).trigger('hashchange', [true]);
980980
});
981-
981+
982982
if (options['create']) {
983983
$('#' + options['create']).live('submit', function (e) {
984984
var button = $(this).find('input[type|="submit"]'),
985985
data = KT.common.getSearchParams() || {},
986986
validation = options['validation'] || function(){ return true; };
987-
987+
988988
e.preventDefault();
989989

990990
if( options['extra_create_data'] ){
@@ -993,7 +993,7 @@ KT.panel.list = (function () {
993993

994994
if( validation() ){
995995
button.attr("disabled", "disabled");
996-
996+
997997
$(this).ajaxSubmit({
998998
url: KT.routes[resource_type + '_path'](),
999999
data: data,
@@ -1008,7 +1008,7 @@ KT.panel.list = (function () {
10081008
}
10091009
},
10101010
createSuccess = function(data){
1011-
var id;
1011+
var id;
10121012

10131013
if (data['no_match']) {
10141014
KT.panel.closePanel($('#panel'));
@@ -1036,12 +1036,12 @@ KT.panel.list = (function () {
10361036
}
10371037
};
10381038
return {
1039-
extended_event : function () { if(search){search.extend_event()} },
1040-
registerPage : registerPage,
1041-
createSuccess : createSuccess,
1042-
remove : remove,
1043-
refresh : refresh,
1044-
append : append,
1039+
extended_event : function () { if(search){search.extend_event()} },
1040+
registerPage : registerPage,
1041+
createSuccess : createSuccess,
1042+
remove : remove,
1043+
refresh : refresh,
1044+
append : append,
10451045
replace_list : replace_list,
10461046
update_counts : update_counts,
10471047
full_spinner : full_spinner,

0 commit comments

Comments
 (0)