summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2011-01-12 14:47:29 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2011-01-12 21:47:05 -0500
commitb79bf4ab1757eb08f7209f158f1f3a386ace8c96 (patch)
tree53ae8597469de4481d35a36e29172fa2cd4cf17d /install
parent4da9228fb2ac34adab8eb1884ae414236adb84fa (diff)
downloadfreeipa-b79bf4ab1757eb08f7209f158f1f3a386ace8c96.tar.gz
freeipa-b79bf4ab1757eb08f7209f158f1f3a386ace8c96.tar.xz
freeipa-b79bf4ab1757eb08f7209f158f1f3a386ace8c96.zip
javascript lint cleanup
Diffstat (limited to 'install')
-rw-r--r--install/static/aci.js117
-rw-r--r--install/static/associate.js40
-rwxr-xr-xinstall/static/certificate.js3
-rw-r--r--install/static/details.js27
-rw-r--r--install/static/entity.js55
-rw-r--r--install/static/group.js2
-rwxr-xr-xinstall/static/hbacrule.js11
-rwxr-xr-xinstall/static/hbacsvcgroup.js2
-rw-r--r--install/static/host.js4
-rw-r--r--install/static/ipa.js19
-rw-r--r--install/static/policy.js26
-rwxr-xr-xinstall/static/rule.js10
-rw-r--r--install/static/search.js12
-rw-r--r--install/static/service.js2
-rwxr-xr-xinstall/static/sudocmd.js6
-rwxr-xr-xinstall/static/sudocmdgroup.js2
-rwxr-xr-xinstall/static/sudorule.js17
-rw-r--r--install/static/webui.js5
-rwxr-xr-xinstall/static/widget.js10
19 files changed, 177 insertions, 193 deletions
diff --git a/install/static/aci.js b/install/static/aci.js
index 2d70d6ccb..02b9c4be0 100644
--- a/install/static/aci.js
+++ b/install/static/aci.js
@@ -43,8 +43,7 @@ IPA.populate_attribute_table = function (table, entity){
td.append($('<label/>',{
text:aciattrs[a].toLowerCase()}));
}
-}
-
+};
IPA.attribute_table_widget= function (spec){
var id = spec.name;
@@ -93,7 +92,7 @@ IPA.attribute_table_widget= function (spec){
}
return [retval];
- }
+ };
var attrs = [];
that.reset =function(){
@@ -101,7 +100,7 @@ IPA.attribute_table_widget= function (spec){
for (var i = 0; i < attrs.length; i+=1){
$(attrs[i], table).attr('checked','checked');
}
- }
+ };
that.load = function(record){
if (!record.attrs) return;
@@ -110,12 +109,10 @@ IPA.attribute_table_widget= function (spec){
attrs.push('#aciattr-' +record.attrs[i]);
}
that.reset();
- }
+ };
return that;
-}
-
-
+};
IPA.entity_select_widget = function(spec){
@@ -145,7 +142,7 @@ IPA.entity_select_widget = function(spec){
args:[that.entity_filter.val()],
options:{},
on_success:find_success,
- on_error:find_error,
+ on_error:find_error
}).execute();
}
@@ -180,24 +177,24 @@ IPA.entity_select_widget = function(spec){
}
}).appendTo(dd);
populate_select();
- }
+ };
var value = '';
that.reset = function(){
that.entity_filter.val(value );
populate_select(value);
- }
+ };
that.load = function(record){
value = record[that.name];
that.reset();
- }
+ };
that.save = function(){
return [$('option:selected', that.entity_select).val()];
- }
+ };
return that;
-}
+};
IPA.rights_widget = function(spec){
var rights = ['write','add','delete'];
@@ -220,7 +217,7 @@ IPA.rights_widget = function(spec){
appendTo(container);
}
- }
+ };
var values = [];
that.reset = function(){
@@ -232,18 +229,18 @@ IPA.rights_widget = function(spec){
checkboxes.attr('checked','');
}
- for (var i = 0; i < values.length; i +=1){
- var value = values[i];
+ for (var j = 0; j < values.length; j +=1){
+ var value = values[j];
var cb = $('#'+value+ selector);
cb.attr('checked', 'checked');
}
- }
+ };
that.load = function(record) {
values = record[that.name] || [];
that.reset();
- }
+ };
that.save = function(){
var rights_input = $('.'+ that.entity_name +"_"+ that.name);
@@ -255,10 +252,10 @@ IPA.rights_widget = function(spec){
retval += rights_input[i].value;
}
return [retval];
- }
+ };
return that;
-}
+};
IPA.hidden_widget = function(spec){
spec.label = '';
@@ -272,22 +269,22 @@ IPA.hidden_widget = function(spec){
value: value
}).
appendTo(container);
- }
+ };
that.save = function(){
return [value];
- }
+ };
that.reset = function(){
- }
+ };
return that;
-}
-
-
+};
function ipa_rights_section() {
- var spec = {'name':'rights',
- 'label': 'Rights'}
+ var spec = {
+ 'name':'rights',
+ 'label': 'Rights'
+ };
var that = ipa_details_section(spec);
that.add_field(IPA.rights_widget({name:'permissions'}));
@@ -295,8 +292,10 @@ function ipa_rights_section() {
}
function ipa_target_section() {
- var spec = {'name':'target',
- 'label': 'Target'}
+ var spec = {
+ 'name':'target',
+ 'label': 'Target'
+ };
var that = ipa_details_section(spec);
var groupings = ['aci_by_type', 'aci_by_query', 'aci_by_group',
@@ -321,14 +320,14 @@ function ipa_target_section() {
function display_filter_target(dl){
$("<dt/>").
append($("<label/>",{
- text: "Filter",
- })).
+ text: "Filter" })).
append($('<input/>',{
type:"radio",
name:"type",
checked:"true",
id:"aci_by_filter"
- })).appendTo(dl);
+ })).
+ appendTo(dl);
$('<dd/>',{
'class': 'aci_by_filter first'}).
@@ -345,18 +344,17 @@ function ipa_target_section() {
function display_type_target(dl){
$("<dt/>").
append($("<label/>",{
- text: "Object By Type ",
- })).
+ text: "Object By Type " })).
append($('<input/>',{
type:"radio",
name:"type",
checked:"true",
- id:"aci_by_type"
- })).appendTo(dl);
+ id:"aci_by_type" })).
+ appendTo(dl);
var dd = $('<dd/>',{
- "class":"aci_by_type first",
- }).appendTo(dl);
+ "class":"aci_by_type first" }).
+ appendTo(dl);
var type_select = $('<select/>', {
id: 'object_type_select',
@@ -435,8 +433,7 @@ function ipa_target_section() {
that.group_filter = $('<input/>',{
type: 'text',
- id: 'group_filter',
- });
+ id: 'group_filter' });
that.group_select = $('<select/>', {
id: 'aci_target_group_select',
change: function(){
@@ -495,8 +492,7 @@ function ipa_target_section() {
};
that.setup = function(container) {
-
- }
+ };
that.load = function(result) {
if(result.subtree){
@@ -527,8 +523,7 @@ function ipa_target_section() {
}else{
alert('permission with invalid target specification');
}
-
- }
+ };
that.reset = function() {
};
@@ -559,9 +554,7 @@ function ipa_target_section() {
}
record.attributes += id;
});
- }
-
-
+ };
return that;
}
@@ -639,8 +632,7 @@ function ipa_permission_search_facet(spec) {
that.create_column({name:'cn'});
that.create_column({name:'description'});
that.search_facet_init();
- }
-
+ };
return that;
}
@@ -673,13 +665,12 @@ function ipa_permission_details_facet() {
that.load = function(result) {
that.superior_load(result);
- }
+ };
that.superior_update = that.update;
that.update = function(on_win, on_fail){
that.superior_update(on_win, on_fail);
- }
-
+ };
return that;
}
@@ -781,7 +772,7 @@ IPA.add_entity( function() {
that.init = function() {
that.create_column({name:'aciname'});
that.search_facet_init();
- }
+ };
return that;
}());
@@ -796,13 +787,8 @@ IPA.add_entity( function() {
custom_input(IPA.attribute_table_widget({
object_type:'user',
name:'attrs'
- }))
- );
-
- }
-
-
-
+ })));
+ };
return that;
}());
@@ -821,8 +807,7 @@ IPA.add_entity( function() {
name:'attrs'
}));
dialog.init();
- }
-
+ };
return that;
}());
@@ -841,7 +826,7 @@ IPA.add_entity( function() {
that.init = function() {
that.create_column({name:'aciname'});
that.search_facet_init();
- }
+ };
return that;
}());
that.add_facet(function(){
@@ -881,7 +866,7 @@ IPA.add_entity( function() {
dialog.init();
that.create_association_facets();
- }
+ };
return that;
}()); \ No newline at end of file
diff --git a/install/static/associate.js b/install/static/associate.js
index 6173dda09..d4e263531 100644
--- a/install/static/associate.js
+++ b/install/static/associate.js
@@ -77,8 +77,7 @@ function serial_associator(spec) {
options,
that.execute,
that.on_error,
- that.other_entity
- );
+ that.other_entity);
};
return that;
@@ -121,8 +120,7 @@ function bulk_associator(spec) {
options,
that.on_success,
that.on_error,
- that.entity_name
- );
+ that.entity_name);
};
return that;
@@ -293,7 +291,7 @@ function ipa_association_table_widget(spec) {
var entity = IPA.get_entity(that.entity_name);
var association = entity.get_association(that.other_entity);
-
+ var column;
if (association) {
if (association.associator) {
that.associator = association.associator == 'serial' ? serial_associator : bulk_associator;
@@ -313,12 +311,12 @@ function ipa_association_table_widget(spec) {
}
for (var i=0; i<that.columns.length; i++) {
- var column = that.columns[i];
+ column = that.columns[i];
column.entity_name = that.other_entity;
}
- for (var i=0; i<that.adder_columns.length; i++) {
- var column = that.adder_columns[i];
+ for (var j=0; j<that.adder_columns.length; j++) {
+ column = that.adder_columns[j];
column.entity_name = that.other_entity;
}
@@ -353,8 +351,11 @@ function ipa_association_table_widget(spec) {
'label': button.val(),
'icon': 'ui-icon-trash',
'click': function() {
- if ($(this).hasClass('action-button-disabled')) return false;
+ if ($(this).hasClass('action-button-disabled')) {
+ return false;
+ }
that.show_remove_dialog();
+ return false;
}
}));
@@ -365,6 +366,7 @@ function ipa_association_table_widget(spec) {
'click': function() {
if ($(this).hasClass('action-button-disabled')) return false;
that.show_add_dialog();
+ return false;
}
}));
};
@@ -446,7 +448,7 @@ function ipa_association_table_widget(spec) {
'entity_name': that.entity_name,
'pkey': pkey,
'other_entity': that.other_entity,
- 'attribute_member': that.attribute_member,
+ 'attribute_member': that.attribute_member
});
};
@@ -610,6 +612,8 @@ function ipa_association_facet(spec) {
var entity = IPA.get_entity(that.entity_name);
var association = entity.get_association(that.other_entity);
+ var column;
+ var i;
if (association) {
if (association.associator) {
@@ -636,7 +640,7 @@ function ipa_association_facet(spec) {
} else {
- var column = that.table.create_column({
+ column = that.table.create_column({
name: that.table.name,
label: IPA.metadata[that.other_entity].label,
primary_key: true
@@ -658,19 +662,19 @@ function ipa_association_facet(spec) {
state[that.other_entity + '-pkey'] = value;
$.bbq.pushState(state);
return false;
- }
+ };
}(value)
}).appendTo(container);
};
}
- for (var i=0; i<that.columns.length; i++) {
- var column = that.columns[i];
+ for (i=0; i<that.columns.length; i++) {
+ column = that.columns[i];
column.entity_name = that.other_entity;
}
- for (var i=0; i<that.adder_columns.length; i++) {
- var column = that.adder_columns[i];
+ for (i=0; i<that.adder_columns.length; i++) {
+ column = that.adder_columns[i];
column.entity_name = that.other_entity;
}
@@ -752,7 +756,7 @@ function ipa_association_facet(spec) {
button.replaceWith(IPA.action_button({
'label': button.val(),
'icon': 'ui-icon-plus',
- 'click': function() { that.show_add_dialog() }
+ 'click': function() { that.show_add_dialog(); }
}));
};
@@ -767,7 +771,7 @@ function ipa_association_facet(spec) {
'entity_name': that.entity_name,
'pkey': pkey,
'other_entity': that.other_entity,
- 'attribute_member': that.attribute_member,
+ 'attribute_member': that.attribute_member
});
if (that.adder_columns.length) {
diff --git a/install/static/certificate.js b/install/static/certificate.js
index 393983cf9..35b9fdf50 100755
--- a/install/static/certificate.js
+++ b/install/static/certificate.js
@@ -89,8 +89,7 @@ function certificate_get_dialog(spec) {
textarea.val(
BEGIN_CERTIFICATE+'\n'+
that.usercertificate+'\n'+
- END_CERTIFICATE
- );
+ END_CERTIFICATE );
that.open = function() {
dialog.dialog({
diff --git a/install/static/details.js b/install/static/details.js
index 7dfc00430..f0756321d 100644
--- a/install/static/details.js
+++ b/install/static/details.js
@@ -524,17 +524,15 @@ function ipa_details_facet(spec) {
var header = $('h2[name='+section.name+']', that.container);
- var div = $(
- '#'+that.entity_name+'-'+that.name+'-'+section.name,
- that.container
- );
+ var div = $('#'+that.entity_name+'-'+that.name+'-'+section.name,
+ that.container);
header.click(function(section, header, div) {
return function() {
var visible = div.is(":visible");
header.html(that.get_section_header_prefix(!visible) + ' ' + section.label);
div.slideToggle();
- }
+ };
}(section, header, div));
section.setup(div);
@@ -573,7 +571,7 @@ IPA.action_button = function(spec) {
var button = ipa_button(spec);
button.removeClass("ui-state-default").addClass("action-button");
return button;
-}
+};
function ipa_button(spec) {
@@ -613,9 +611,8 @@ function ipa_details_refresh() {
var params = [];
if (that.pkey) params.push(that.pkey);
- ipa_cmd(
- 'show', params, {all: true, rights: true}, on_success, on_failure, that.entity_name
- );
+ ipa_cmd( 'show', params, {all: true, rights: true}, on_success, on_failure,
+ that.entity_name );
}
function ipa_details_update(on_win, on_fail)
@@ -687,8 +684,9 @@ function ipa_details_update(on_win, on_fail)
for (attr in attrs_wo_option) {
values = attrs_wo_option[attr];
modlist['setattr'].push(attr + '=' + values[0]);
- for (var i = 1; i < values.length; ++i)
- modlist['addattr'].push(attr + '=' + values[i]);
+ for (var k = 1; k < values.length; ++k){
+ modlist['addattr'].push(attr + '=' + values[k]);
+ }
}
ipa_cmd('mod', [pkey], modlist, update_on_win, null, entity_name);
@@ -724,7 +722,7 @@ function ipa_insert_first_dd(jobj, content){
function ipa_insert_dd(jobj, content, dd_class){
jobj.after( $('<dd/>',{
"class": dd_class
- }).append(content))
+ }).append(content));
}
@@ -757,8 +755,9 @@ function ipa_details_field_create_input(value,hint,rights, index)
}else if (param_info['primary_key'] ||
('no_update' in param_info['flags'])){
/* check if the param value can be modified */
- /* THis is currently a no-op, as we use this logic for the
+ /* This is currently a no-op, as we use this logic for the
default case as well */
+ return input;
}else{
/* call handler by param class */
var handler = _ipa_param_type_2_handler_map[param_info['class']];
@@ -791,7 +790,7 @@ function _ipa_create_remove_link(attr, param_info)
return $('<a/>',{
href:"jslink",
- click: function (){return (_ipa_remove_on_click(this))},
+ click: function (){return (_ipa_remove_on_click(this));},
title: attr,
text: 'Remove'});
diff --git a/install/static/entity.js b/install/static/entity.js
index 7f8d1ec87..d45858fe2 100644
--- a/install/static/entity.js
+++ b/install/static/entity.js
@@ -141,8 +141,7 @@ function ipa_entity(spec) {
if (!attribute_member) {
attribute_member = ipa_get_member_attribute(
- that.entity_name, other_entity
- );
+ that.entity_name, other_entity);
}
return ipa_association_facet({
@@ -150,7 +149,7 @@ function ipa_entity(spec) {
'label': label,
'other_entity': other_entity,
'facet_group': facet_group,
- 'attribute_member': attribute_member,
+ 'attribute_member': attribute_member
});
};
@@ -180,8 +179,7 @@ function ipa_entity(spec) {
var facet_group = relationship[0];
var facet = that.create_association_facet(
- attribute_member, other_entity, label, facet_group
- );
+ attribute_member, other_entity, label, facet_group);
if (that.get_facet(facet.name)) continue;
@@ -386,6 +384,8 @@ function ipa_entity_setup(container) {
IPA.nested_tabs = function(entity_name){
var siblings = [];
+ var nested_index;
+ var nested_entities;
if (!IPA.tab_set) {
siblings.push(entity_name);
@@ -403,17 +403,17 @@ IPA.nested_tabs = function(entity_name){
if (top_tab.children[subtab_index].name === entity_name){
siblings.push(entity_name);
if (top_tab.children[subtab_index].children){
- var nested_entities = top_tab.children[subtab_index].children;
- for (var nested_index = 0;
- nested_index < nested_entities.length;
- nested_index += 1){
+ nested_entities = top_tab.children[subtab_index].children;
+ for ( nested_index = 0;
+ nested_index < nested_entities.length;
+ nested_index += 1){
siblings.push (nested_entities[nested_index].name);
}
}
}else{
if (top_tab.children[subtab_index].children){
- var nested_entities = top_tab.children[subtab_index].children;
- for (var nested_index = 0;
+ nested_entities = top_tab.children[subtab_index].children;
+ for (nested_index = 0;
nested_index < nested_entities.length;
nested_index += 1){
if (nested_entities[nested_index].name === entity_name){
@@ -431,7 +431,7 @@ IPA.nested_tabs = function(entity_name){
}
}
return siblings;
-}
+};
@@ -478,7 +478,7 @@ function ipa_facet_create_action_panel(container) {
var other_facet = entity.facets[0];
var other_facet_name = other_facet.name;
var nested_tabs = IPA.nested_tabs(entity_name);
- var main_facet = build_link(other_facet,other_facet.label)
+ var main_facet = build_link(other_facet,other_facet.label);
for (var nested_index = 0 ;
nested_index < nested_tabs.length;
nested_index += 1){
@@ -493,16 +493,18 @@ function ipa_facet_create_action_panel(container) {
}else{
main_facet.html(
$('<span />',{
- "class":"input_link"
- }).append(
- $('<span/>',{
- "class":"ui-icon ui-icon-triangle-1-w "
- })
- ).append('Back to List '));
+ "class":"input_link"
+ }).
+ append(
+ $('<span/>',{
+ "class":"ui-icon ui-icon-triangle-1-w "
+ })).
+ append('Back to List '));
main_facet.appendTo(ul);
}
}
var facet_groups = {};
+ var li;
for (var i=1; i<entity.facets.length; i++) {
other_facet = entity.facets[i];
other_facet_name = other_facet.name;
@@ -510,16 +512,16 @@ function ipa_facet_create_action_panel(container) {
if (other_facet.facet_group) {
var facet_group = other_facet.facet_group;
if (!facet_groups[facet_group]) {
- var li = $('<li/>', {
+ li = $('<li/>', {
'class': 'entity-facet-relation-label',
'text': other_facet.facet_group,
- 'title': other_facet.facet_group,
- })
+ 'title': other_facet.facet_group
+ });
ul.append(li);
facet_groups[facet_group] = li;
}
- var li = facet_groups[facet_group];
- var link = build_link(other_facet, other_facet.label)
+ li = facet_groups[facet_group];
+ var link = build_link(other_facet, other_facet.label);
link.addClass('facet-group-member');
li.after(link );
/*
@@ -538,10 +540,9 @@ function ipa_facet_create_action_panel(container) {
})})).
append($('<li/>',{
html:$('<span />',{
- class:"action-controls"
+ 'class':"action-controls"
})
- }))
- );
+ })));
}
facet_groups[facet_group] = li.next();
} else {
diff --git a/install/static/group.js b/install/static/group.js
index c54df26e7..6d11bd564 100644
--- a/install/static/group.js
+++ b/install/static/group.js
@@ -167,7 +167,7 @@ function ipa_group_member_user_facet(spec) {
state[that.other_entity + '-pkey'] = value;
$.bbq.pushState(state);
return false;
- }
+ };
}(value)
}).appendTo(container);
};
diff --git a/install/static/hbacrule.js b/install/static/hbacrule.js
index 0e6d82ccd..16f21108f 100755
--- a/install/static/hbacrule.js
+++ b/install/static/hbacrule.js
@@ -475,11 +475,10 @@ function ipa_hbacrule_details_facet(spec) {
// use setattr/addattr if param_info not available
if (!param_info) {
- for (var k=0; k<values.length; k++) {
+ for (var l=0; l<values.length; l++) {
modify_operation.command.set_option(
- k == 0 ? 'setattr' : 'addattr',
- field.name+'='+values[k]
- );
+ l === 0 ? 'setattr' : 'addattr',
+ field.name+'='+values[l]);
modify_operation.execute = true;
}
continue;
@@ -774,7 +773,7 @@ function ipa_hbacrule_accesstime_widget(spec) {
button.replaceWith(ipa_button({
'label': button.val(),
'icon': 'ui-icon-plus',
- 'click': function() { that.add(that.container) }
+ 'click': function() { that.add(that.container); }
}));
var input = $('input[name="'+that.name+'"]', that.container);
@@ -790,7 +789,7 @@ function ipa_hbacrule_accesstime_widget(spec) {
that.save = function() {
var value = $('input[name="'+that.name+'"]:checked', that.container).val();
- if (value == '') {
+ if (value === '') {
return that.table.save();
} else {
return [];
diff --git a/install/static/hbacsvcgroup.js b/install/static/hbacsvcgroup.js
index e4b1eeacf..6afc58e07 100755
--- a/install/static/hbacsvcgroup.js
+++ b/install/static/hbacsvcgroup.js
@@ -164,7 +164,7 @@ function ipa_hbacsvcgroup_member_hbacsvc_table_widget(spec) {
state[that.other_entity + '-pkey'] = value;
$.bbq.pushState(state);
return false;
- }
+ };
}(value)
}).appendTo(container);
};
diff --git a/install/static/host.js b/install/static/host.js
index 852d0ce06..b6ca404af 100644
--- a/install/static/host.js
+++ b/install/static/host.js
@@ -406,7 +406,7 @@ function host_certificate_status_widget(spec) {
that.get_entity_certificate = function(result) {
var values = result['usercertificate'];
return values ? values[0].__base64__ : null;
- }
+ };
};
return that;
@@ -444,7 +444,7 @@ function ipa_host_managedby_host_facet(spec) {
state[that.other_entity + '-pkey'] = value;
$.bbq.pushState(state);
return false;
- }
+ };
}(value)
}).appendTo(container);
};
diff --git a/install/static/ipa.js b/install/static/ipa.js
index b340d8350..296df05a7 100644
--- a/install/static/ipa.js
+++ b/install/static/ipa.js
@@ -30,7 +30,7 @@ var IPA = ( function () {
that.use_static_files = false;
that.json_url = '/ipa/json';
if (that.use_static_files){
- that.json_url = 'test/data'
+ that.json_url = 'test/data';
}
that.ajax_options = {
@@ -98,8 +98,7 @@ var IPA = ( function () {
},
on_error,
null,
- 'ipa_init'
- );
+ 'ipa_init');
};
that.get_entities = function () {
@@ -172,8 +171,7 @@ function ipa_command(spec) {
that.on_success,
that.on_error,
null,
- that.name
- );
+ that.name);
};
that.to_json = function() {
@@ -263,11 +261,12 @@ function ipa_batch_command(spec) {
},
function(xhr, text_status, error_thrown) {
// TODO: undefined behavior
- if (that.on_error) that.on_error(xhr, text_status, error_thrown)
+ if (that.on_error) {
+ that.on_error(xhr, text_status, error_thrown);
+ }
},
null,
- that.name
- );
+ that.name);
};
return that;
@@ -319,7 +318,7 @@ function ipa_cmd(name, args, options, win_callback, fail_callback, objname, comm
error_thrown = {
name: xhr.responseText || 'Unknown Error',
message: xhr.statusText || 'Unknown Error'
- }
+ };
}
if (xhr.status === 401) {
@@ -332,7 +331,7 @@ function ipa_cmd(name, args, options, win_callback, fail_callback, objname, comm
"Please run kinit and then click 'retry'. "+
"If this is your first time running the IPA Web UI "+
"<a href='/ipa/config/unauthorized.html'>"+
- "follow these directions</a> to configure your browser."
+ "follow these directions</a> to configure your browser.";
}
}
diff --git a/install/static/policy.js b/install/static/policy.js
index e80cd6034..011b6addc 100644
--- a/install/static/policy.js
+++ b/install/static/policy.js
@@ -147,8 +147,6 @@ function ipa_records_facet(spec){
var options = {};
function add_win(data, text_status, xhr) {
reload();
- if (called_from_add_and_edit) {
- }
}
function add_fail(data, text_status, xhr) {
@@ -220,7 +218,7 @@ function ipa_records_facet(spec){
var type = $(tr).find('[title="type"]').
text().toLowerCase();
var data = $(tr).find('[title="data"]').text();
- var rectype=type+"record"
+ var rectype=type+"record";
var options = {};
options[rectype]=data;
@@ -253,9 +251,9 @@ function ipa_records_facet(spec){
}
- if (delete_list.length == 0)
+ if (delete_list.length === 0){
return;
-
+ }
delete_dialog.append($('<P/>',
{text: IPA.messages.search.delete_confirm}));
@@ -296,8 +294,8 @@ function ipa_records_facet(spec){
}).appendTo(that.container);
- var div = $('<div class="search-controls"></div>')
- .appendTo(that.container);
+ var div = $('<div class="search-controls"></div>').
+ appendTo(that.container);
var control_span =$('<span class="record-filter"></span>').appendTo(div);
@@ -324,7 +322,7 @@ function ipa_records_facet(spec){
ipa_button({
'label': IPA.messages.button.find,
'icon': 'ui-icon-search',
- 'click': function(){refresh()}
+ 'click': function(){refresh();}
}).appendTo(control_span);
var action_panel_ul = $('.action-panel ul', that.container);
@@ -367,8 +365,7 @@ function ipa_records_facet(spec){
tbody.find("INPUT[type='checkbox']").
attr('checked', this.checked);
}
- })
- ));
+ })));
tr.append($('<th/>',{
text: ipa_get_param_info("dnsrecord", "idnsname").label }));
tr.append($('<th>Record Type</th>'));
@@ -395,8 +392,8 @@ function ipa_records_facet(spec){
var options = {};
- var resource_filter = that.container.find("#dns-record-resource-filter")
- .val();
+ var resource_filter = that.container.
+ find("#dns-record-resource-filter").val();
if (resource_filter){
options.idnsname = resource_filter;
}
@@ -475,8 +472,7 @@ function ipa_records_facet(spec){
if (data.result.truncated) {
tfoot.text(
'Query returned results than configured size limit will show.' +
- 'First ' + data.result.count + ' results shown.'
- );
+ 'First ' + data.result.count + ' results shown.' );
} else {
tfoot.text(data.result.summary);
}
@@ -529,7 +525,7 @@ IPA.add_entity(function (){
that.create_association_facets();
that.entity_init();
- }
+ };
return that;
}());
diff --git a/install/static/rule.js b/install/static/rule.js
index baf2652a5..58ad3b80b 100755
--- a/install/static/rule.js
+++ b/install/static/rule.js
@@ -70,8 +70,8 @@ function ipa_rule_details_section(spec){
span.append('<br/>');
}
- for (var i=0; i<that.tables.length; i++) {
- var table = that.tables[i];
+ for (var j=0; i<that.tables.length; i++) {
+ var table = that.tables[j];
param_info = ipa_get_param_info(that.entity_name, table.field_name);
@@ -91,7 +91,7 @@ function ipa_rule_details_section(spec){
function update_tables(value) {
- var enabled = '' == value;
+ var enabled = ('' === value);
for (var i=0; i<that.tables.length; i++) {
var table = that.tables[i];
@@ -105,7 +105,9 @@ function ipa_rule_details_section(spec){
category.reset = function() {
category.widget_reset();
var values = category.save();
- if (values.length == 0) return;
+ if (values.length === 0){
+ return;
+ }
var value = values[0];
update_tables(value);
};
diff --git a/install/static/search.js b/install/static/search.js
index 613d24a82..2fb4be13e 100644
--- a/install/static/search.js
+++ b/install/static/search.js
@@ -222,9 +222,9 @@ function ipa_search_widget(spec) {
var summary = $('span[name=summary]', that.tfoot);
if (data.result.truncated) {
summary.text(
- 'Query returned results than configured size limit will show.' +
- 'First ' + data.result.count + ' results shown.'
- );
+ 'Query returned more results than configured size limit '+
+ 'will show. First ' +
+ data.result.count + ' results shown.');
} else {
summary.text(data.result.summary);
}
@@ -239,8 +239,8 @@ function ipa_search_widget(spec) {
var filter = $.bbq.getState(that.entity_name + '-filter', true) || '';
ipa_cmd(
- 'find', [filter], {all: true}, on_success, on_error, that.entity_name
- );
+ 'find', [filter], {all: true}, on_success, on_error,
+ that.entity_name);
};
return that;
@@ -311,7 +311,7 @@ function ipa_search_facet(spec) {
state[that.entity_name + '-pkey'] = value;
$.bbq.pushState(state);
return false;
- }
+ };
}(value)
}).appendTo(container);
};
diff --git a/install/static/service.js b/install/static/service.js
index 02b3c9761..4286469e4 100644
--- a/install/static/service.js
+++ b/install/static/service.js
@@ -427,7 +427,7 @@ function ipa_service_managedby_host_facet(spec) {
state[that.other_entity + '-pkey'] = value;
$.bbq.pushState(state);
return false;
- }
+ };
}(value)
}).appendTo(container);
};
diff --git a/install/static/sudocmd.js b/install/static/sudocmd.js
index 307f09900..ef3c24e5e 100755
--- a/install/static/sudocmd.js
+++ b/install/static/sudocmd.js
@@ -149,7 +149,6 @@ function ipa_sudocmd_member_sudocmdgroup_table_widget(spec) {
$('<a/>', {
'href': '#'+value,
- 'html': value,
'click': function (value) {
return function() {
var state = IPA.tab_state(that.other_entity);
@@ -157,8 +156,9 @@ function ipa_sudocmd_member_sudocmdgroup_table_widget(spec) {
state[that.other_entity + '-pkey'] = value;
$.bbq.pushState(state);
return false;
- }
- }(value)
+ };
+ }(value),
+ 'html': value
}).appendTo(container);
};
diff --git a/install/static/sudocmdgroup.js b/install/static/sudocmdgroup.js
index a78d088b6..121c8b855 100755
--- a/install/static/sudocmdgroup.js
+++ b/install/static/sudocmdgroup.js
@@ -163,7 +163,7 @@ function ipa_sudocmdgroup_member_sudocmd_table_widget(spec) {
state[that.other_entity + '-pkey'] = value;
$.bbq.pushState(state);
return false;
- }
+ };
}(value)
}).appendTo(container);
};
diff --git a/install/static/sudorule.js b/install/static/sudorule.js
index 865abe383..7016ef93e 100755
--- a/install/static/sudorule.js
+++ b/install/static/sudorule.js
@@ -326,9 +326,8 @@ function ipa_sudorule_details_facet(spec) {
if (!param_info) {
for (var k=0; k<values.length; k++) {
modify_operation.command.set_option(
- k == 0 ? 'setattr' : 'addattr',
- field.name+'='+values[k]
- );
+ k === 0 ? 'setattr' : 'addattr',
+ field.name+'='+values[k]);
modify_operation.execute = true;
}
continue;
@@ -639,7 +638,7 @@ function ipa_sudorule_details_command_section(spec){
function update_tables(value) {
- var enabled = '' == value;
+ var enabled = ('' === value);
var field = that.get_field('memberallowcmd_sudocmd');
field.set_enabled(enabled);
@@ -652,7 +651,7 @@ function ipa_sudorule_details_command_section(spec){
cmdcategory.reset = function() {
cmdcategory.widget_reset();
var values = cmdcategory.save();
- if (values.length == 0) return;
+ if (values.length === 0) return;
var value = values[0];
update_tables(value);
};
@@ -807,7 +806,7 @@ function ipa_sudorule_details_runas_section(spec){
function user_update_tables(value) {
- var enabled = '' == value;
+ var enabled = ('' === value);
var field = that.get_field('ipasudorunas_user');
field.set_enabled(enabled);
@@ -820,7 +819,7 @@ function ipa_sudorule_details_runas_section(spec){
user_category.reset = function() {
user_category.widget_reset();
var values = user_category.save();
- if (values.length == 0) return;
+ if (values.length === 0) return;
var value = values[0];
user_update_tables(value);
};
@@ -834,7 +833,7 @@ function ipa_sudorule_details_runas_section(spec){
function group_update_tables(value) {
- var enabled = '' == value;
+ var enabled = ('' === value);
var field = that.get_field('ipasudorunasgroup_group');
field.set_enabled(enabled);
@@ -844,7 +843,7 @@ function ipa_sudorule_details_runas_section(spec){
group_category.reset = function() {
group_category.widget_reset();
var values = group_category.save();
- if (values.length == 0) return;
+ if (values.length === 0) return;
var value = values[0];
group_update_tables(value);
};
diff --git a/install/static/webui.js b/install/static/webui.js
index 964c8cf79..e5e5f57e7 100644
--- a/install/static/webui.js
+++ b/install/static/webui.js
@@ -94,8 +94,9 @@ IPA.tab_state = function(entity_name){
}
}
}
-}
-
+ /*should never reach here*/
+ return null;
+};
/* main (document onready event handler) */
diff --git a/install/static/widget.js b/install/static/widget.js
index 1aa945f26..795cc42a2 100755
--- a/install/static/widget.js
+++ b/install/static/widget.js
@@ -597,7 +597,7 @@ function ipa_table_widget(spec) {
if (that.scrollable && (i == that.columns.length-1)) {
if (column.width) {
- var width = parseInt(column.width.substring(0, column.width.length-2));
+ var width = parseInt(column.width.substring(0, column.width.length-2),10);
width += 16;
th.css('width', width+'px');
}
@@ -640,8 +640,8 @@ function ipa_table_widget(spec) {
'value': 'user'
}).appendTo(td);
- for (var i=0; i<that.columns.length; i++) {
- var column = that.columns[i];
+ for (/* var */ i=0; i<that.columns.length; i++) {
+ /* var */ column = that.columns[i];
td = $('<td/>').appendTo(tr);
if (column.width) {
@@ -1093,12 +1093,12 @@ function ipa_adder_dialog(spec) {
name: 'hidememb',
id: 'hidememb',
checked: 'checked',
- style: 'margin-left: 5px; vertical-align: middle',
+ style: 'margin-left: 5px; vertical-align: middle'
}).appendTo(search_panel);
var label = $('<label/>', {
'for': 'hidememb',
- style: 'margin-left: 3px',
+ style: 'margin-left: 3px'
});
label.text('Hide already enrolled.');