lint clean added a config file for running jsl. run 'jsl -conf jsl.conf' and see that there are no error messages.

This commit is contained in:
Adam Young
2011-01-14 12:16:25 -05:00
committed by Endi Sukma Dewata
parent bd965c92d8
commit d49cf9ee61
28 changed files with 414 additions and 134 deletions

View File

@@ -1,3 +1,5 @@
/*jsl:import ipa.js */
/* Authors: /* Authors:
* Adam Young <ayoung@redhat.com> * Adam Young <ayoung@redhat.com>
* *
@@ -257,6 +259,7 @@ IPA.rights_widget = function(spec){
return that; return that;
}; };
IPA.hidden_widget = function(spec){ IPA.hidden_widget = function(spec){
spec.label = ''; spec.label = '';
var that = IPA.widget(spec); var that = IPA.widget(spec);
@@ -280,6 +283,7 @@ IPA.hidden_widget = function(spec){
return that; return that;
}; };
IPA.rights_section = function () { IPA.rights_section = function () {
var spec = { var spec = {
'name':'rights', 'name':'rights',
@@ -289,7 +293,8 @@ IPA.rights_section = function () {
that.add_field(IPA.rights_widget({name:'permissions'})); that.add_field(IPA.rights_widget({name:'permissions'}));
return that; return that;
} };
IPA.target_section = function () { IPA.target_section = function () {
var spec = { var spec = {
@@ -458,7 +463,7 @@ IPA.target_section = function () {
that.create = function(container) { that.create = function(container) {
dl = $('<dl class="entryattrs"/>').appendTo(container); var dl = $('<dl class="entryattrs"/>').appendTo(container);
display_filter_target(dl); display_filter_target(dl);
display_query_target(dl); display_query_target(dl);
@@ -556,9 +561,7 @@ IPA.target_section = function () {
}); });
}; };
return that; return that;
} };
IPA.permission = function () { IPA.permission = function () {
@@ -590,7 +593,8 @@ IPA.permission = function () {
}; };
return that; return that;
} };
IPA.add_entity(IPA.permission()); IPA.add_entity(IPA.permission());
@@ -621,7 +625,7 @@ IPA.permission_add_dialog = function (spec) {
return that; return that;
} };
IPA.permission_search_facet = function (spec) { IPA.permission_search_facet = function (spec) {
@@ -634,7 +638,7 @@ IPA.permission_search_facet = function (spec) {
that.search_facet_init(); that.search_facet_init();
}; };
return that; return that;
} };
IPA.permission_details_facet = function () { IPA.permission_details_facet = function () {
@@ -672,7 +676,8 @@ IPA.permission_details_facet = function () {
that.superior_update(on_win, on_fail); that.superior_update(on_win, on_fail);
}; };
return that; return that;
} };
IPA.add_entity( function() { IPA.add_entity( function() {
var that = IPA.entity({ var that = IPA.entity({

View File

@@ -1,3 +1,5 @@
/*jsl:import ipa.js */
/* Authors: /* Authors:
* Pavel Zuna <pzuna@redhat.com> * Pavel Zuna <pzuna@redhat.com>
* Endi Sukma Dewata <edewata@redhat.com> * Endi Sukma Dewata <edewata@redhat.com>
@@ -115,5 +117,5 @@ IPA.add_dialog = function (spec) {
that.add_dialog_init = that.init; that.add_dialog_init = that.init;
return that; return that;
} };

View File

@@ -1,3 +1,5 @@
/*jsl:import ipa.js */
/* Authors: /* Authors:
* Adam Young <ayoung@redhat.com> * Adam Young <ayoung@redhat.com>
* *
@@ -43,7 +45,8 @@ IPA.associator = function (spec) {
}; };
return that; return that;
} };
/** /**
*This associator is built for the case where each association requires a separate rpc *This associator is built for the case where each association requires a separate rpc
@@ -202,7 +205,8 @@ IPA.association_adder_dialog = function (spec) {
that.association_adder_dialog_setup = that.setup; that.association_adder_dialog_setup = that.setup;
return that; return that;
} };
/** /**
* This dialog is used for removing associations between two entities. * This dialog is used for removing associations between two entities.
@@ -240,7 +244,8 @@ IPA.association_deleter_dialog = function (spec) {
}; };
return that; return that;
} };
IPA.association_config = function (spec) { IPA.association_config = function (spec) {
@@ -254,7 +259,8 @@ IPA.association_config = function (spec) {
that.remove_method = spec.remove_method; that.remove_method = spec.remove_method;
return that; return that;
} };
IPA.association_table_widget = function (spec) { IPA.association_table_widget = function (spec) {
@@ -554,7 +560,8 @@ IPA.association_table_widget = function (spec) {
that.association_table_widget_init = that.init; that.association_table_widget_init = that.init;
return that; return that;
} };
IPA.association_facet = function (spec) { IPA.association_facet = function (spec) {
@@ -915,7 +922,8 @@ IPA.association_facet = function (spec) {
that.association_facet_init = that.init; that.association_facet_init = that.init;
return that; return that;
} };
IPA.deleter_dialog_setup = function () { IPA.deleter_dialog_setup = function () {
@@ -933,4 +941,4 @@ IPA.deleter_dialog_setup = function () {
$('<p/>', { $('<p/>', {
'text': IPA.messages.search.delete_confirm 'text': IPA.messages.search.delete_confirm
}).appendTo(that.dialog); }).appendTo(that.dialog);
} };

View File

@@ -1,3 +1,5 @@
/*jsl:import ipa.js */
/* Authors: /* Authors:
* Endi Sukma Dewata <edewata@redhat.com> * Endi Sukma Dewata <edewata@redhat.com>
* *

View File

@@ -1,3 +1,5 @@
/*jsl:import ipa.js */
/* Authors: /* Authors:
* Pavel Zuna <pzuna@redhat.com> * Pavel Zuna <pzuna@redhat.com>
* Adam Young <ayoung@redhat.com> * Adam Young <ayoung@redhat.com>
@@ -238,7 +240,8 @@ IPA.details_field = function (spec) {
} }
return that; return that;
} };
IPA.details_section = function (spec){ IPA.details_section = function (spec){
@@ -387,7 +390,8 @@ IPA.details_section = function (spec){
that.section_load = that.load; that.section_load = that.load;
return that; return that;
} };
/** /**
* This class creates a details section formatted as a list of * This class creates a details section formatted as a list of
@@ -453,9 +457,10 @@ IPA.details_list_section = function (spec){
}; };
return that; return that;
} };
// shorthand notation used for declarative definitions of details pages
/* shorthand notation used for declarative definitions of details pages */
IPA.stanza = function (spec) { IPA.stanza = function (spec) {
spec = spec || {}; spec = spec || {};
@@ -474,7 +479,8 @@ IPA.stanza = function (spec) {
}; };
return that; return that;
} };
IPA.details_facet = function (spec) { IPA.details_facet = function (spec) {
@@ -676,7 +682,7 @@ IPA.details_facet = function (spec) {
that.details_facet_load = that.load; that.details_facet_load = that.load;
return that; return that;
} };
IPA.action_button = function(spec) { IPA.action_button = function(spec) {
var button = IPA.button(spec); var button = IPA.button(spec);
@@ -700,7 +706,7 @@ IPA.button = function(spec) {
if (spec.icon) button.append('<span class="ui-icon '+spec.icon+'" ></span> '); if (spec.icon) button.append('<span class="ui-icon '+spec.icon+'" ></span> ');
return button; return button;
} };
IPA.details_refresh = function () { IPA.details_refresh = function () {
@@ -724,7 +730,7 @@ IPA.details_refresh = function () {
IPA.cmd( 'show', params, {all: true, rights: true}, on_success, on_failure, IPA.cmd( 'show', params, {all: true, rights: true}, on_success, on_failure,
that.entity_name ); that.entity_name );
} };
IPA.details_update = function (on_win, on_fail) IPA.details_update = function (on_win, on_fail)
{ {
@@ -783,7 +789,7 @@ IPA.details_update = function (on_win, on_fail)
} }
} }
for (attr in attrs_wo_option) { for (var attr in attrs_wo_option) {
values = attrs_wo_option[attr]; values = attrs_wo_option[attr];
modlist['setattr'].push(attr + '=' + values[0]); modlist['setattr'].push(attr + '=' + values[0]);
for (var k = 1; k < values.length; ++k){ for (var k = 1; k < values.length; ++k){
@@ -799,7 +805,7 @@ IPA.details_update = function (on_win, on_fail)
} }
IPA.cmd('mod', pkey, modlist, update_on_win, null, entity_name); IPA.cmd('mod', pkey, modlist, update_on_win, null, entity_name);
} };
IPA.create_first_dd = function (field_name, content){ IPA.create_first_dd = function (field_name, content){
@@ -809,27 +815,26 @@ IPA.create_first_dd = function (field_name, content){
}); });
if (content) dd.append(content); if (content) dd.append(content);
return dd; return dd;
} };
IPA.create_other_dd = function (field_name, content){ IPA.create_other_dd = function (field_name, content){
return $('<dd/>', { return $('<dd/>', {
'class': 'other', 'class': 'other',
'title': field_name 'title': field_name
}).append(content); }).append(content);
} };
/* creates a Remove link for deleting attribute values */ /* creates a Remove link for deleting attribute values */
function _ipa_create_remove_link(attr, param_info) function _ipa_create_remove_link(attr, param_info)
{ {
if (!param_info) if (param_info){
return (_ipa_a_remove_template.replace('A', attr)); /* check if the param is required or of the Password type
* if it is, then we don't want people to be able to remove it */
/* check if the param is required or of the Password type if ((param_info['required']) || (param_info['class'] == 'Password')){
* if it is, then we don't want people to be able to remove it */ return ('');
if ((param_info['required']) || (param_info['class'] == 'Password')) }
return (''); }
return $('<a/>',{ return $('<a/>',{
href:"jslink", href:"jslink",
click: function (){return (_ipa_remove_on_click(this));}, click: function (){return (_ipa_remove_on_click(this));},
@@ -863,8 +868,7 @@ IPA.details_field_create_add_link = function (title, rights, index) {
}); });
return link; return link;
} };
function _ipa_remove_on_click(obj) function _ipa_remove_on_click(obj)

View File

@@ -1,3 +1,5 @@
/*jsl:import ipa.js */
if (window.location.protocol == 'file:') { if (window.location.protocol == 'file:') {
IPA.json_url = "test/data"; IPA.json_url = "test/data";
IPA.use_static_files = true; IPA.use_static_files = true;

View File

@@ -1,3 +1,6 @@
/*jsl:import ipa.js */
/*jsl:import navigation.js */
/* Authors: /* Authors:
* Pavel Zuna <pzuna@redhat.com> * Pavel Zuna <pzuna@redhat.com>
* Endi S. Dewata <edewata@redhat.com> * Endi S. Dewata <edewata@redhat.com>
@@ -73,7 +76,8 @@ IPA.facet = function (spec) {
that.facet_setup = that.setup; that.facet_setup = that.setup;
return that; return that;
} };
IPA.entity = function (spec) { IPA.entity = function (spec) {
@@ -207,7 +211,8 @@ IPA.entity = function (spec) {
that.entity_init = that.init; that.entity_init = that.init;
return that; return that;
} };
/* use this to track individual changes between two hashchange events */ /* use this to track individual changes between two hashchange events */
var window_hash_cache = {}; var window_hash_cache = {};
@@ -224,7 +229,8 @@ IPA.fetch_entity = function (entity_name) {
IPA.add_entity(entity); IPA.add_entity(entity);
return entity; return entity;
} };
IPA.entity_get_search_facet = function (entity_name) { IPA.entity_get_search_facet = function (entity_name) {
@@ -240,7 +246,8 @@ IPA.entity_get_search_facet = function (entity_name) {
entity.add_facet(facet); entity.add_facet(facet);
return facet; return facet;
} };
IPA.entity_set_search_definition = function (entity_name, data) { IPA.entity_set_search_definition = function (entity_name, data) {
@@ -254,7 +261,8 @@ IPA.entity_set_search_definition = function (entity_name, data) {
'setup': defn[2] 'setup': defn[2]
}); });
} }
} };
IPA.entity_set_add_definition = function (entity_name, data) { IPA.entity_set_add_definition = function (entity_name, data) {
@@ -277,13 +285,15 @@ IPA.entity_set_add_definition = function (entity_name, data) {
} }
dialog.init(); dialog.init();
} };
IPA.entity_get_add_dialog = function (entity_name) { IPA.entity_get_add_dialog = function (entity_name) {
var entity = IPA.fetch_entity(entity_name); var entity = IPA.fetch_entity(entity_name);
return entity.get_add_dialog(); return entity.get_add_dialog();
} };
IPA.entity_get_details_facet = function (entity_name) { IPA.entity_get_details_facet = function (entity_name) {
@@ -299,7 +309,8 @@ IPA.entity_get_details_facet = function (entity_name) {
entity.add_facet(facet); entity.add_facet(facet);
return facet; return facet;
} };
IPA.entity_set_details_definition = function (entity_name, sections) { IPA.entity_set_details_definition = function (entity_name, sections) {
@@ -309,7 +320,8 @@ IPA.entity_set_details_definition = function (entity_name, sections) {
var section = sections[i]; var section = sections[i];
facet.add_section(section); facet.add_section(section);
} }
} };
IPA.entity_set_association_definition = function (entity_name, data) { IPA.entity_set_association_definition = function (entity_name, data) {
@@ -326,7 +338,8 @@ IPA.entity_set_association_definition = function (entity_name, data) {
'remove_method': config.remove_method 'remove_method': config.remove_method
}); });
} }
} };
IPA.entity_set_facet_definition = function (entity_name, list) { IPA.entity_set_facet_definition = function (entity_name, list) {
@@ -336,7 +349,8 @@ IPA.entity_set_facet_definition = function (entity_name, list) {
var facet = list[i]; var facet = list[i];
entity.add_facet(facet); entity.add_facet(facet);
} }
} };
IPA.current_facet = function (entity){ IPA.current_facet = function (entity){
var facet_name = $.bbq.getState(entity.name + '-facet', true); var facet_name = $.bbq.getState(entity.name + '-facet', true);
@@ -344,7 +358,8 @@ IPA.current_facet = function (entity){
facet_name = entity.facets[0].name; facet_name = entity.facets[0].name;
} }
return facet_name; return facet_name;
} };
IPA.entity_setup = function (container) { IPA.entity_setup = function (container) {
@@ -374,8 +389,7 @@ IPA.entity_setup = function (container) {
container.children().last().addClass('client'); container.children().last().addClass('client');
facet.setup(container); facet.setup(container);
facet.refresh(); facet.refresh();
} };
/*Returns the entity requested, as well as: /*Returns the entity requested, as well as:
@@ -434,6 +448,7 @@ IPA.nested_tabs = function(entity_name){
return siblings; return siblings;
}; };
IPA. facet_create_action_panel = function(container) { IPA. facet_create_action_panel = function(container) {
var that = this; var that = this;
@@ -573,4 +588,4 @@ IPA. facet_create_action_panel = function(container) {
$('.entity-facet', action_panel).addClass('entity-facet-disabled'); $('.entity-facet', action_panel).addClass('entity-facet-disabled');
} }
return action_panel; return action_panel;
} };

View File

@@ -1,3 +1,5 @@
/*jsl:import ipa.js */
/* Authors: /* Authors:
* Pavel Zuna <pzuna@redhat.com> * Pavel Zuna <pzuna@redhat.com>
* *
@@ -68,10 +70,12 @@ IPA.group = function () {
}; };
return that; return that;
} };
IPA.add_entity(IPA.group()); IPA.add_entity(IPA.group());
IPA.group_add_dialog = function (spec) { IPA.group_add_dialog = function (spec) {
spec = spec || {}; spec = spec || {};
@@ -94,7 +98,8 @@ IPA.group_add_dialog = function (spec) {
}; };
return that; return that;
} };
IPA.group_search_facet = function (spec) { IPA.group_search_facet = function (spec) {
@@ -110,7 +115,8 @@ IPA.group_search_facet = function (spec) {
}; };
return that; return that;
} };
IPA.group_details_facet = function (spec) { IPA.group_details_facet = function (spec) {
@@ -134,7 +140,8 @@ IPA.group_details_facet = function (spec) {
}; };
return that; return that;
} };
IPA.group_member_user_facet = function (spec) { IPA.group_member_user_facet = function (spec) {
@@ -192,4 +199,4 @@ IPA.group_member_user_facet = function (spec) {
}; };
return that; return that;
} };

View File

@@ -1,3 +1,5 @@
/*jsl:import ipa.js */
/* Authors: /* Authors:
* Endi Sukma Dewata <edewata@redhat.com> * Endi Sukma Dewata <edewata@redhat.com>
* *
@@ -51,10 +53,12 @@ IPA.hbacrule = function () {
}; };
return that; return that;
} };
IPA.add_entity(IPA.hbacrule()); IPA.add_entity(IPA.hbacrule());
IPA.hbacrule_add_dialog = function (spec) { IPA.hbacrule_add_dialog = function (spec) {
spec = spec || {}; spec = spec || {};
@@ -81,7 +85,8 @@ IPA.hbacrule_add_dialog = function (spec) {
}; };
return that; return that;
} };
IPA.hbacrule_search_facet = function (spec) { IPA.hbacrule_search_facet = function (spec) {
@@ -124,7 +129,8 @@ IPA.hbacrule_search_facet = function (spec) {
}; };
return that; return that;
} };
IPA.hbacrule_details_facet = function (spec) { IPA.hbacrule_details_facet = function (spec) {
@@ -535,7 +541,8 @@ IPA.hbacrule_details_facet = function (spec) {
}; };
return that; return that;
} };
IPA.hbacrule_details_general_section = function (spec){ IPA.hbacrule_details_general_section = function (spec){
@@ -676,7 +683,7 @@ IPA.hbacrule_details_general_section = function (spec){
}; };
return that; return that;
} };
IPA.hbacrule_accesstime_widget = function (spec) { IPA.hbacrule_accesstime_widget = function (spec) {
@@ -980,4 +987,4 @@ IPA.hbacrule_accesstime_widget = function (spec) {
}; };
return that; return that;
} };

View File

@@ -1,3 +1,5 @@
/*jsl:import ipa.js */
/* Authors: /* Authors:
* Endi Sukma Dewata <edewata@redhat.com> * Endi Sukma Dewata <edewata@redhat.com>
* *
@@ -51,10 +53,12 @@ IPA.hbacsvc = function () {
}; };
return that; return that;
} };
IPA.add_entity(IPA.hbacsvc()); IPA.add_entity(IPA.hbacsvc());
IPA.hbacsvc_add_dialog = function (spec) { IPA.hbacsvc_add_dialog = function (spec) {
spec = spec || {}; spec = spec || {};
@@ -70,7 +74,8 @@ IPA.hbacsvc_add_dialog = function (spec) {
}; };
return that; return that;
} };
IPA.hbacsvc_search_facet = function (spec) { IPA.hbacsvc_search_facet = function (spec) {
@@ -87,7 +92,7 @@ IPA.hbacsvc_search_facet = function (spec) {
}; };
return that; return that;
} };
IPA.hbacsvc_details_facet = function (spec) { IPA.hbacsvc_details_facet = function (spec) {
@@ -111,4 +116,4 @@ IPA.hbacsvc_details_facet = function (spec) {
}; };
return that; return that;
} };

View File

@@ -1,3 +1,5 @@
/*jsl:import ipa.js */
/* Authors: /* Authors:
* Endi Sukma Dewata <edewata@redhat.com> * Endi Sukma Dewata <edewata@redhat.com>
* *
@@ -57,10 +59,12 @@ IPA.hbacsvcgroup = function () {
}; };
return that; return that;
} };
IPA.add_entity(IPA.hbacsvcgroup()); IPA.add_entity(IPA.hbacsvcgroup());
IPA.hbacsvcgroup_add_dialog = function (spec) { IPA.hbacsvcgroup_add_dialog = function (spec) {
spec = spec || {}; spec = spec || {};
@@ -76,7 +80,8 @@ IPA.hbacsvcgroup_add_dialog = function (spec) {
}; };
return that; return that;
} };
IPA.hbacsvcgroup_search_facet = function (spec) { IPA.hbacsvcgroup_search_facet = function (spec) {
@@ -94,7 +99,7 @@ IPA.hbacsvcgroup_search_facet = function (spec) {
return that; return that;
} };
IPA.hbacsvcgroup_details_facet = function (spec) { IPA.hbacsvcgroup_details_facet = function (spec) {
@@ -132,7 +137,8 @@ IPA.hbacsvcgroup_details_facet = function (spec) {
}; };
return that; return that;
} };
IPA.hbacsvcgroup_member_hbacsvc_table_widget = function (spec) { IPA.hbacsvcgroup_member_hbacsvc_table_widget = function (spec) {
@@ -189,4 +195,4 @@ IPA.hbacsvcgroup_member_hbacsvc_table_widget = function (spec) {
}; };
return that; return that;
} };

View File

@@ -1,3 +1,6 @@
/*jsl:import ipa.js */
/*jsl:import certificate.js */
/* Authors: /* Authors:
* Pavel Zuna <pzuna@redhat.com> * Pavel Zuna <pzuna@redhat.com>
* Endi S. Dewata <edewata@redhat.com> * Endi S. Dewata <edewata@redhat.com>
@@ -71,10 +74,12 @@ IPA.host = function () {
}; };
return that; return that;
} };
IPA.add_entity(IPA.host()); IPA.add_entity(IPA.host());
IPA.host_add_dialog = function (spec) { IPA.host_add_dialog = function (spec) {
spec = spec || {}; spec = spec || {};
@@ -93,7 +98,8 @@ IPA.host_add_dialog = function (spec) {
}; };
return that; return that;
} };
IPA.host_search_facet = function (spec) { IPA.host_search_facet = function (spec) {
@@ -113,7 +119,8 @@ IPA.host_search_facet = function (spec) {
}; };
return that; return that;
} };
IPA.host_details_facet = function (spec) { IPA.host_details_facet = function (spec) {
@@ -200,7 +207,8 @@ IPA.host_details_facet = function (spec) {
}; };
return that; return that;
} };
function host_provisioning_status_widget(spec) { function host_provisioning_status_widget(spec) {
@@ -473,4 +481,4 @@ IPA.host_managedby_host_facet = function (spec) {
}; };
return that; return that;
} };

View File

@@ -1,3 +1,5 @@
/*jsl:import ipa.js */
/* Authors: /* Authors:
* Pavel Zuna <pzuna@redhat.com> * Pavel Zuna <pzuna@redhat.com>
* *

View File

@@ -1,5 +1,7 @@
/* Authors: /* Authors:
* Pavel Zuna <pzuna@redhat.com> * Pavel Zuna <pzuna@redhat.com>
* Adam Young <ayoung@redhat.com>
* Endi Dewata <edewata@redhat.com>
* *
* Copyright (C) 2010 Red Hat * Copyright (C) 2010 Red Hat
* see file 'COPYING' for use and warranty information * see file 'COPYING' for use and warranty information
@@ -201,7 +203,8 @@ IPA.command = function (spec) {
}; };
return that; return that;
} };
IPA.batch_command = function (spec) { IPA.batch_command = function (spec) {
spec = spec || {}; spec = spec || {};
@@ -270,7 +273,7 @@ IPA.batch_command = function (spec) {
}; };
return that; return that;
} };
/* call an IPA command over JSON-RPC /* call an IPA command over JSON-RPC
* arguments: * arguments:
@@ -434,7 +437,7 @@ IPA.cmd = function (name, args, options, win_callback, fail_callback, objname, c
$.ajax(request); $.ajax(request);
return (id); return (id);
} };
/* helper function used to retrieve information about an attribute */ /* helper function used to retrieve information about an attribute */
@@ -457,7 +460,7 @@ IPA.get_param_info = function(obj_name, attr)
} }
return (null); return (null);
} };
/* helper function used to retrieve attr name with members of type `member` */ /* helper function used to retrieve attr name with members of type `member` */
IPA.get_member_attribute = function (obj_name, member) IPA.get_member_attribute = function (obj_name, member)
@@ -476,10 +479,11 @@ IPA.get_member_attribute = function (obj_name, member)
} }
} }
return null; return null;
} }
IPA.create_network_spinner = function(){ IPA.create_network_spinner = function(){
return $('<span />',{ return $('<span />',{
'class':'network-activity-indicator', 'class':'network-activity-indicator',
html: '<img src="spinner_small.gif" />'}); html: '<img src="spinner_small.gif" />'});
} };

153
install/static/jsl.conf Normal file
View File

@@ -0,0 +1,153 @@
#
# Configuration File for JavaScript Lint 0.3.0
# Developed by Matthias Miller (http://www.JavaScriptLint.com)
#
# This configuration file can be used to lint a collection of scripts, or to enable
# or disable warnings for scripts that are linted via the command line.
#
### Warnings
# Enable or disable warnings based on requirements.
# Use "+WarningName" to display or "-WarningName" to suppress.
#
+no_return_value # function {0} does not always return a value
+duplicate_formal # duplicate formal argument {0}
+equal_as_assign # test for equality (==) mistyped as assignment (=)?{0}
+var_hides_arg # variable {0} hides argument
+redeclared_var # redeclaration of {0} {1}
+anon_no_return_value # anonymous function does not always return a value
+missing_semicolon # missing semicolon
+meaningless_block # meaningless block; curly braces have no impact
+comma_separated_stmts # multiple statements separated by commas (use semicolons?)
+unreachable_code # unreachable code
+missing_break # missing break statement
+missing_break_for_last_case # missing break statement for last case in switch
+comparison_type_conv # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==)
+inc_dec_within_stmt # increment (++) and decrement (--) operators used as part of greater statement
+useless_void # use of the void type may be unnecessary (void is always undefined)
+multiple_plus_minus # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs
+use_of_label # use of label
-block_without_braces # block statement without curly braces
+leading_decimal_point # leading decimal point may indicate a number or an object member
+trailing_decimal_point # trailing decimal point may indicate a number or an object member
+octal_number # leading zeros make an octal number
+nested_comment # nested comment
+misplaced_regex # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma
+ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement
+empty_statement # empty statement or extra semicolon
-missing_option_explicit # the "option explicit" control comment is missing
+partial_option_explicit # the "option explicit" control comment, if used, must be in the first script tag
+dup_option_explicit # duplicate "option explicit" control comment
+useless_assign # useless assignment
+ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity
+ambiguous_else_stmt # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent)
+missing_default_case # missing default case in switch statement
+duplicate_case_in_switch # duplicate case in switch statements
+default_not_at_end # the default case is not at the end of the switch statement
+legacy_cc_not_understood # couldn't understand control comment using /*@keyword@*/ syntax
+jsl_cc_not_understood # couldn't understand control comment using /*jsl:keyword*/ syntax
+useless_comparison # useless comparison; comparing identical expressions
+with_statement # with statement hides undeclared variables; use temporary variable instead
+trailing_comma_in_array # extra comma is not recommended in array initializers
+assign_to_function_call # assignment to a function call
+parseint_missing_radix # parseInt missing radix parameter
### Output format
# Customize the format of the error message.
# __FILE__ indicates current file path
# __FILENAME__ indicates current file name
# __LINE__ indicates current line
# __ERROR__ indicates error message
#
# Visual Studio syntax (default):
+output-format __FILE__(__LINE__): __ERROR__
# Alternative syntax:
#+output-format __FILE__:__LINE__: __ERROR__
### Context
# Show the in-line position of the error.
# Use "+context" to display or "-context" to suppress.
#
+context
### Semicolons
# By default, assignments of an anonymous function to a variable or
# property (such as a function prototype) must be followed by a semicolon.
#
+lambda_assign_requires_semicolon
### Control Comments
# Both JavaScript Lint and the JScript interpreter confuse each other with the syntax for
# the /*@keyword@*/ control comments and JScript conditional comments. (The latter is
# enabled in JScript with @cc_on@). The /*jsl:keyword*/ syntax is preferred for this reason,
# although legacy control comments are enabled by default for backward compatibility.
#
+legacy_control_comments
### JScript Function Extensions
# JScript allows member functions to be defined like this:
# function MyObj() { /*constructor*/ }
# function MyObj.prototype.go() { /*member function*/ }
#
# It also allows events to be attached like this:
# function window::onload() { /*init page*/ }
#
# This is a Microsoft-only JavaScript extension. Enable this setting to allow them.
#
-jscript_function_extensions
### Defining identifiers
# By default, "option explicit" is enabled on a per-file basis.
# To enable this for all files, use "+always_use_option_explicit"
#-always_use_option_explicit
+always_use_option_explicit
# Define certain identifiers of which the lint is not aware.
# (Use this in conjunction with the "undeclared identifier" warning.)
#
# Common uses for webpages might be:
+define window
#+define document
+define alert
+define $
+define JSON
### Files
# Specify which files to lint
# Use "+recurse" to enable recursion (disabled by default).
# To add a set of files, use "+process FileName", "+process Folder\Path\*.js",
# or "+process Folder\Path\*.htm".
#
+process ipa.js
+process widget.js
+process search.js
+process details.js
+process add.js
+process associate.js
+process entity.js
+process navigation.js
+process rule.js
+process certificate.js
+process user.js
+process group.js
+process hbacrule.js
+process hbacsvc.js
+process hbacsvcgroup.js
+process host.js
+process hostgroup.js
+process netgroup.js
+process service.js
+process serverconfig.js
+process sudorule.js
+process sudocmd.js
+process sudocmdgroup.js
+process policy.js
+process aci.js
+process develop.js
+process webui.js

View File

@@ -1,3 +1,5 @@
/*jsl:import ipa.js */
/* Authors: /* Authors:
* Pavel Zuna <pzuna@redhat.com> * Pavel Zuna <pzuna@redhat.com>
* *

View File

@@ -1,3 +1,5 @@
/*jsl:import ipa.js */
/* Authors: /* Authors:
* Pavel Zuna <pzuna@redhat.com> * Pavel Zuna <pzuna@redhat.com>
* *

View File

@@ -1,3 +1,6 @@
/*jsl:import ipa.js */
/*jsl:import search.js */
/* Authors: /* Authors:
* Adam Young <ayoung@redhat.com> * Adam Young <ayoung@redhat.com>
* *
@@ -185,7 +188,6 @@ IPA.records_facet = function (spec){
} }
function delete_records(records_table){ function delete_records(records_table){
var zone = $.bbq.getState('dnszone-pkey', true); var zone = $.bbq.getState('dnszone-pkey', true);
@@ -483,7 +485,7 @@ IPA.records_facet = function (spec){
that.refresh = refresh; that.refresh = refresh;
return that; return that;
} };
/**Automount*/ /**Automount*/

View File

@@ -1,3 +1,5 @@
/*jsl:import ipa.js */
/* Authors: /* Authors:
* Endi Sukma Dewata <edewata@redhat.com> * Endi Sukma Dewata <edewata@redhat.com>
* *
@@ -121,7 +123,8 @@ IPA.rule_details_section = function (spec){
}; };
return that; return that;
} };
IPA.rule_association_table_widget = function (spec) { IPA.rule_association_table_widget = function (spec) {
@@ -168,4 +171,4 @@ IPA.rule_association_table_widget = function (spec) {
}; };
return that; return that;
} };

View File

@@ -1,3 +1,5 @@
/*jsl:import ipa.js */
/* Authors: /* Authors:
* Pavel Zuna <pzuna@redhat.com> * Pavel Zuna <pzuna@redhat.com>
* Adam Young <ayoung@redhat.com> * Adam Young <ayoung@redhat.com>
@@ -246,7 +248,7 @@ IPA.search_widget = function (spec) {
}; };
return that; return that;
} };
IPA.search_facet = function (spec) { IPA.search_facet = function (spec) {
@@ -385,7 +387,7 @@ IPA.search_facet = function (spec) {
that.search_facet_setup = that.setup; that.search_facet_setup = that.setup;
return that; return that;
} };
function search_generate_tr(thead, tbody, entry_attrs) function search_generate_tr(thead, tbody, entry_attrs)
{ {

View File

@@ -1,3 +1,5 @@
/*jsl:import ipa.js */
/* Authors: /* Authors:
* Endi Sukma Dewata <edewata@redhat.com> * Endi Sukma Dewata <edewata@redhat.com>
* Adam Young <ayoung@redhat.com> * Adam Young <ayoung@redhat.com>

View File

@@ -1,3 +1,6 @@
/*jsl:import ipa.js */
/*jsl:import certificate.js */
/* Authors: /* Authors:
* Endi Sukma Dewata <edewata@redhat.com> * Endi Sukma Dewata <edewata@redhat.com>
* *
@@ -64,10 +67,12 @@ IPA.service = function () {
}; };
return that; return that;
} };
IPA.add_entity(IPA.service()); IPA.add_entity(IPA.service());
IPA.service_add_dialog = function (spec) { IPA.service_add_dialog = function (spec) {
spec = spec || {}; spec = spec || {};
@@ -151,7 +156,8 @@ IPA.service_add_dialog = function (spec) {
}; };
return that; return that;
} };
IPA.service_search_facet = function (spec) { IPA.service_search_facet = function (spec) {
@@ -166,7 +172,8 @@ IPA.service_search_facet = function (spec) {
}; };
return that; return that;
} };
IPA.service_details_facet = function (spec) { IPA.service_details_facet = function (spec) {
@@ -226,7 +233,8 @@ IPA.service_details_facet = function (spec) {
}; };
return that; return that;
} };
function service_service_load(result) { function service_service_load(result) {
@@ -256,6 +264,7 @@ function service_host_load(result) {
dd.append(host); dd.append(host);
} }
function service_provisioning_status_widget(spec) { function service_provisioning_status_widget(spec) {
spec = spec || {}; spec = spec || {};
@@ -449,4 +458,4 @@ IPA.service_managedby_host_facet = function (spec) {
}; };
return that; return that;
} };

View File

@@ -1,3 +1,5 @@
/*jsl:import ipa.js */
/* Authors: /* Authors:
* Endi Sukma Dewata <edewata@redhat.com> * Endi Sukma Dewata <edewata@redhat.com>
* *
@@ -51,10 +53,12 @@ IPA.sudocmd = function () {
}; };
return that; return that;
} };
IPA.add_entity(IPA.sudocmd()); IPA.add_entity(IPA.sudocmd());
IPA.sudocmd_add_dialog = function (spec) { IPA.sudocmd_add_dialog = function (spec) {
spec = spec || {}; spec = spec || {};
@@ -70,7 +74,8 @@ IPA.sudocmd_add_dialog = function (spec) {
}; };
return that; return that;
} };
IPA.sudocmd_search_facet = function (spec) { IPA.sudocmd_search_facet = function (spec) {
@@ -87,7 +92,7 @@ IPA.sudocmd_search_facet = function (spec) {
}; };
return that; return that;
} };
IPA.sudocmd_details_facet = function (spec) { IPA.sudocmd_details_facet = function (spec) {
@@ -125,7 +130,8 @@ IPA.sudocmd_details_facet = function (spec) {
}; };
return that; return that;
} };
IPA.sudocmd_member_sudocmdgroup_table_widget = function (spec) { IPA.sudocmd_member_sudocmdgroup_table_widget = function (spec) {
@@ -270,4 +276,4 @@ IPA.sudocmd_member_sudocmdgroup_table_widget = function (spec) {
}; };
return that; return that;
} };

View File

@@ -1,3 +1,5 @@
/*jsl:import ipa.js */
/* Authors: /* Authors:
* Endi Sukma Dewata <edewata@redhat.com> * Endi Sukma Dewata <edewata@redhat.com>
* *
@@ -57,10 +59,12 @@ IPA.sudocmdgroup = function () {
}; };
return that; return that;
} };
IPA.add_entity(IPA.sudocmdgroup()); IPA.add_entity(IPA.sudocmdgroup());
IPA.sudocmdgroup_add_dialog = function (spec) { IPA.sudocmdgroup_add_dialog = function (spec) {
spec = spec || {}; spec = spec || {};
@@ -76,7 +80,8 @@ IPA.sudocmdgroup_add_dialog = function (spec) {
}; };
return that; return that;
} };
IPA.sudocmdgroup_search_facet = function (spec) { IPA.sudocmdgroup_search_facet = function (spec) {
@@ -93,7 +98,7 @@ IPA.sudocmdgroup_search_facet = function (spec) {
}; };
return that; return that;
} };
IPA.sudocmdgroup_details_facet = function (spec) { IPA.sudocmdgroup_details_facet = function (spec) {
@@ -131,7 +136,8 @@ IPA.sudocmdgroup_details_facet = function (spec) {
}; };
return that; return that;
} };
IPA.sudocmdgroup_member_sudocmd_table_widget = function (spec) { IPA.sudocmdgroup_member_sudocmd_table_widget = function (spec) {
@@ -189,4 +195,4 @@ IPA.sudocmdgroup_member_sudocmd_table_widget = function (spec) {
}; };
return that; return that;
} };

View File

@@ -1,3 +1,5 @@
/*jsl:import ipa.js */
/* Authors: /* Authors:
* Endi Sukma Dewata <edewata@redhat.com> * Endi Sukma Dewata <edewata@redhat.com>
* *
@@ -51,10 +53,12 @@ IPA.sudorule = function () {
}; };
return that; return that;
} };
IPA.add_entity(IPA.sudorule()); IPA.add_entity(IPA.sudorule());
IPA.sudorule_add_dialog = function (spec) { IPA.sudorule_add_dialog = function (spec) {
spec = spec || {}; spec = spec || {};
@@ -69,7 +73,8 @@ IPA.sudorule_add_dialog = function (spec) {
}; };
return that; return that;
} };
IPA.sudorule_search_facet = function (spec) { IPA.sudorule_search_facet = function (spec) {
@@ -87,7 +92,8 @@ IPA.sudorule_search_facet = function (spec) {
}; };
return that; return that;
} };
IPA.sudorule_details_facet = function (spec) { IPA.sudorule_details_facet = function (spec) {
@@ -369,13 +375,13 @@ IPA.sudorule_details_facet = function (spec) {
return; return;
} }
//alert(JSON.stringify(batch.to_json()));
batch.execute(); batch.execute();
}; };
return that; return that;
} };
IPA.sudorule_details_general_section = function (spec){ IPA.sudorule_details_general_section = function (spec){
@@ -498,7 +504,8 @@ IPA.sudorule_details_general_section = function (spec){
}; };
return that; return that;
} };
IPA.sudorule_details_command_section = function (spec){ IPA.sudorule_details_command_section = function (spec){
@@ -665,7 +672,8 @@ IPA.sudorule_details_command_section = function (spec){
}; };
return that; return that;
} };
IPA.sudorule_details_runas_section = function (spec){ IPA.sudorule_details_runas_section = function (spec){
@@ -857,7 +865,8 @@ IPA.sudorule_details_runas_section = function (spec){
}; };
return that; return that;
} };
IPA.sudorule_association_table_widget = function (spec) { IPA.sudorule_association_table_widget = function (spec) {
@@ -897,7 +906,8 @@ IPA.sudorule_association_table_widget = function (spec) {
}; };
return that; return that;
} };
IPA.sudorule_association_adder_dialog = function (spec) { IPA.sudorule_association_adder_dialog = function (spec) {
@@ -1050,7 +1060,8 @@ IPA.sudorule_association_adder_dialog = function (spec) {
}; };
return that; return that;
} };
IPA.sudorule_command_table_widget = function (spec) { IPA.sudorule_command_table_widget = function (spec) {
@@ -1114,4 +1125,4 @@ IPA.sudorule_command_table_widget = function (spec) {
}; };
return that; return that;
} };

View File

@@ -1,3 +1,5 @@
/*jsl:import ipa.js */
/* Authors: /* Authors:
* Pavel Zuna <pzuna@redhat.com> * Pavel Zuna <pzuna@redhat.com>
* *
@@ -117,7 +119,9 @@ IPA.user = function (){
return that; return that;
} }
return that; return that;
} };
IPA.add_entity(IPA.user()); IPA.add_entity(IPA.user());
/* ATTRIBUTE CALLBACKS */ /* ATTRIBUTE CALLBACKS */

View File

@@ -1,3 +1,6 @@
/*jsl:import ipa.js */
/*jsl:import navigation.js */
/* Authors: /* Authors:
* Pavel Zuna <pzuna@redhat.com> * Pavel Zuna <pzuna@redhat.com>
* *
@@ -137,7 +140,7 @@ $(function() {
nav_create(self_serv_tab_set, navigation, 'tabs'); nav_create(self_serv_tab_set, navigation, 'tabs');
var state = {'user-pkey':IPA.whoami_pkey , var state = {'user-pkey':IPA.whoami_pkey ,
'user-facet': jQuery.bbq.getState('user-facet') || 'user-facet': $.bbq.getState('user-facet') ||
'details'}; 'details'};
$.bbq.pushState(state); $.bbq.pushState(state);
} }
@@ -158,14 +161,12 @@ $(function() {
}); });
/* main loop (hashchange event handler) */ /* main loop (hashchange event handler) */
function window_hashchange(evt) function window_hashchange(evt){
{
nav_update_tabs(); nav_update_tabs();
} }
/* builder function for unimplemented tab content */ /* builder function for unimplemented tab content */
function unimplemented_tab(jobj) function unimplemented_tab(jobj){
{
jobj.text('Not implemented yet!'); jobj.text('Not implemented yet!');
} }

View File

@@ -1,3 +1,4 @@
/*jsl:import ipa.js */
/* Authors: /* Authors:
* Endi Sukma Dewata <edewata@redhat.com> * Endi Sukma Dewata <edewata@redhat.com>
* *
@@ -167,7 +168,7 @@ IPA.widget = function(spec) {
that.widget_reset = that.reset; that.widget_reset = that.reset;
return that; return that;
} };
IPA.text_widget = function(spec) { IPA.text_widget = function(spec) {
@@ -255,7 +256,7 @@ IPA.text_widget = function(spec) {
}; };
return that; return that;
} };
IPA.checkbox_widget = function (spec) { IPA.checkbox_widget = function (spec) {
@@ -311,7 +312,7 @@ IPA.checkbox_widget = function (spec) {
}; };
return that; return that;
} };
IPA.radio_widget = function(spec) { IPA.radio_widget = function(spec) {
@@ -389,7 +390,7 @@ IPA.radio_widget = function(spec) {
that.radio_save = that.save; that.radio_save = that.save;
return that; return that;
} };
IPA.textarea_widget = function (spec) { IPA.textarea_widget = function (spec) {
@@ -448,7 +449,7 @@ IPA.textarea_widget = function (spec) {
}; };
return that; return that;
} };
IPA.button_widget = function (spec) { IPA.button_widget = function (spec) {
@@ -478,8 +479,7 @@ IPA.button_widget = function (spec) {
} }
return that; return that;
} };
IPA.column = function (spec) { IPA.column = function (spec) {
@@ -513,7 +513,7 @@ IPA.column = function (spec) {
} }
return that; return that;
} };
IPA.table_widget = function (spec) { IPA.table_widget = function (spec) {
@@ -835,7 +835,7 @@ IPA.table_widget = function (spec) {
that.table_set_enabled = that.set_enabled; that.table_set_enabled = that.set_enabled;
return that; return that;
} };
/** /**
* This is a base class for dialog boxes. * This is a base class for dialog boxes.
@@ -998,7 +998,7 @@ IPA.dialog = function(spec) {
that.dialog_open = that.open; that.dialog_open = that.open;
return that; return that;
} };
/** /**
* This dialog provides an interface for searching and selecting * This dialog provides an interface for searching and selecting
@@ -1254,7 +1254,7 @@ IPA.adder_dialog = function (spec) {
that.adder_dialog_setup = that.setup; that.adder_dialog_setup = that.setup;
return that; return that;
} };
/** /**
* This dialog displays the values to be deleted. * This dialog displays the values to be deleted.
@@ -1303,4 +1303,4 @@ IPA.deleter_dialog = function (spec) {
}; };
return that; return that;
} };