From d49cf9ee614f1d42ae06468e43e4214ad2fca9df Mon Sep 17 00:00:00 2001 From: Adam Young Date: Fri, 14 Jan 2011 12:16:25 -0500 Subject: lint clean added a config file for running jsl. run 'jsl -conf jsl.conf' and see that there are no error messages. --- install/static/aci.js | 23 ++++--- install/static/add.js | 4 +- install/static/associate.js | 22 ++++-- install/static/certificate.js | 2 + install/static/details.js | 48 +++++++------ install/static/develop.js | 2 + install/static/entity.js | 45 ++++++++---- install/static/group.js | 17 +++-- install/static/hbacrule.js | 19 +++-- install/static/hbacsvc.js | 13 ++-- install/static/hbacsvcgroup.js | 16 +++-- install/static/host.js | 18 +++-- install/static/hostgroup.js | 2 + install/static/ipa.js | 14 ++-- install/static/jsl.conf | 153 +++++++++++++++++++++++++++++++++++++++++ install/static/navigation.js | 2 + install/static/netgroup.js | 2 + install/static/policy.js | 6 +- install/static/rule.js | 7 +- install/static/search.js | 6 +- install/static/serverconfig.js | 2 + install/static/service.js | 19 +++-- install/static/sudocmd.js | 16 +++-- install/static/sudocmdgroup.js | 16 +++-- install/static/sudorule.js | 33 ++++++--- install/static/user.js | 6 +- install/static/webui.js | 11 +-- install/static/widget.js | 24 +++---- 28 files changed, 414 insertions(+), 134 deletions(-) create mode 100644 install/static/jsl.conf (limited to 'install') diff --git a/install/static/aci.js b/install/static/aci.js index 9d3ee546f..77f147c16 100644 --- a/install/static/aci.js +++ b/install/static/aci.js @@ -1,3 +1,5 @@ +/*jsl:import ipa.js */ + /* Authors: * Adam Young * @@ -257,6 +259,7 @@ IPA.rights_widget = function(spec){ return that; }; + IPA.hidden_widget = function(spec){ spec.label = ''; var that = IPA.widget(spec); @@ -280,6 +283,7 @@ IPA.hidden_widget = function(spec){ return that; }; + IPA.rights_section = function () { var spec = { 'name':'rights', @@ -289,7 +293,8 @@ IPA.rights_section = function () { that.add_field(IPA.rights_widget({name:'permissions'})); return that; -} +}; + IPA.target_section = function () { var spec = { @@ -458,7 +463,7 @@ IPA.target_section = function () { that.create = function(container) { - dl = $('
').appendTo(container); + var dl = $('
').appendTo(container); display_filter_target(dl); display_query_target(dl); @@ -556,9 +561,7 @@ IPA.target_section = function () { }); }; return that; -} - - +}; IPA.permission = function () { @@ -590,7 +593,8 @@ IPA.permission = function () { }; return that; -} +}; + IPA.add_entity(IPA.permission()); @@ -621,7 +625,7 @@ IPA.permission_add_dialog = function (spec) { return that; -} +}; IPA.permission_search_facet = function (spec) { @@ -634,7 +638,7 @@ IPA.permission_search_facet = function (spec) { that.search_facet_init(); }; return that; -} +}; IPA.permission_details_facet = function () { @@ -672,7 +676,8 @@ IPA.permission_details_facet = function () { that.superior_update(on_win, on_fail); }; return that; -} +}; + IPA.add_entity( function() { var that = IPA.entity({ diff --git a/install/static/add.js b/install/static/add.js index fd3f6055e..69e0ad79b 100644 --- a/install/static/add.js +++ b/install/static/add.js @@ -1,3 +1,5 @@ +/*jsl:import ipa.js */ + /* Authors: * Pavel Zuna * Endi Sukma Dewata @@ -115,5 +117,5 @@ IPA.add_dialog = function (spec) { that.add_dialog_init = that.init; return that; -} +}; diff --git a/install/static/associate.js b/install/static/associate.js index bcf81a13b..9fc907230 100644 --- a/install/static/associate.js +++ b/install/static/associate.js @@ -1,3 +1,5 @@ +/*jsl:import ipa.js */ + /* Authors: * Adam Young * @@ -43,7 +45,8 @@ IPA.associator = function (spec) { }; return that; -} +}; + /** *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; return that; -} +}; + /** * This dialog is used for removing associations between two entities. @@ -240,7 +244,8 @@ IPA.association_deleter_dialog = function (spec) { }; return that; -} +}; + IPA.association_config = function (spec) { @@ -254,7 +259,8 @@ IPA.association_config = function (spec) { that.remove_method = spec.remove_method; return that; -} +}; + IPA.association_table_widget = function (spec) { @@ -554,7 +560,8 @@ IPA.association_table_widget = function (spec) { that.association_table_widget_init = that.init; return that; -} +}; + IPA.association_facet = function (spec) { @@ -915,7 +922,8 @@ IPA.association_facet = function (spec) { that.association_facet_init = that.init; return that; -} +}; + IPA.deleter_dialog_setup = function () { @@ -933,4 +941,4 @@ IPA.deleter_dialog_setup = function () { $('

', { 'text': IPA.messages.search.delete_confirm }).appendTo(that.dialog); -} +}; diff --git a/install/static/certificate.js b/install/static/certificate.js index 3325fb485..f8e77dd4f 100644 --- a/install/static/certificate.js +++ b/install/static/certificate.js @@ -1,3 +1,5 @@ +/*jsl:import ipa.js */ + /* Authors: * Endi Sukma Dewata * diff --git a/install/static/details.js b/install/static/details.js index 2b163423b..041947b8c 100644 --- a/install/static/details.js +++ b/install/static/details.js @@ -1,3 +1,5 @@ +/*jsl:import ipa.js */ + /* Authors: * Pavel Zuna * Adam Young @@ -238,7 +240,8 @@ IPA.details_field = function (spec) { } return that; -} +}; + IPA.details_section = function (spec){ @@ -387,7 +390,8 @@ IPA.details_section = function (spec){ that.section_load = that.load; return that; -} +}; + /** * This class creates a details section formatted as a list of @@ -453,9 +457,10 @@ IPA.details_list_section = function (spec){ }; return that; -} +}; + -// shorthand notation used for declarative definitions of details pages +/* shorthand notation used for declarative definitions of details pages */ IPA.stanza = function (spec) { spec = spec || {}; @@ -474,7 +479,8 @@ IPA.stanza = function (spec) { }; return that; -} +}; + IPA.details_facet = function (spec) { @@ -676,7 +682,7 @@ IPA.details_facet = function (spec) { that.details_facet_load = that.load; return that; -} +}; IPA.action_button = function(spec) { var button = IPA.button(spec); @@ -700,7 +706,7 @@ IPA.button = function(spec) { if (spec.icon) button.append(' '); return button; -} +}; IPA.details_refresh = function () { @@ -724,7 +730,7 @@ IPA.details_refresh = function () { IPA.cmd( 'show', params, {all: true, rights: true}, on_success, on_failure, that.entity_name ); -} +}; 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]; modlist['setattr'].push(attr + '=' + values[0]); 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.create_first_dd = function (field_name, content){ @@ -809,27 +815,26 @@ IPA.create_first_dd = function (field_name, content){ }); if (content) dd.append(content); return dd; -} +}; IPA.create_other_dd = function (field_name, content){ return $('

', { 'class': 'other', 'title': field_name }).append(content); -} +}; /* creates a Remove link for deleting attribute values */ function _ipa_create_remove_link(attr, 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 */ - if ((param_info['required']) || (param_info['class'] == 'Password')) - return (''); - + if (param_info){ + /* 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 */ + if ((param_info['required']) || (param_info['class'] == 'Password')){ + return (''); + } + } return $('',{ href:"jslink", click: function (){return (_ipa_remove_on_click(this));}, @@ -863,8 +868,7 @@ IPA.details_field_create_add_link = function (title, rights, index) { }); return link; -} - +}; function _ipa_remove_on_click(obj) diff --git a/install/static/develop.js b/install/static/develop.js index 251be0faf..462253500 100644 --- a/install/static/develop.js +++ b/install/static/develop.js @@ -1,3 +1,5 @@ +/*jsl:import ipa.js */ + if (window.location.protocol == 'file:') { IPA.json_url = "test/data"; IPA.use_static_files = true; diff --git a/install/static/entity.js b/install/static/entity.js index 96849e780..908263a26 100644 --- a/install/static/entity.js +++ b/install/static/entity.js @@ -1,3 +1,6 @@ +/*jsl:import ipa.js */ +/*jsl:import navigation.js */ + /* Authors: * Pavel Zuna * Endi S. Dewata @@ -73,7 +76,8 @@ IPA.facet = function (spec) { that.facet_setup = that.setup; return that; -} +}; + IPA.entity = function (spec) { @@ -207,7 +211,8 @@ IPA.entity = function (spec) { that.entity_init = that.init; return that; -} +}; + /* use this to track individual changes between two hashchange events */ var window_hash_cache = {}; @@ -224,7 +229,8 @@ IPA.fetch_entity = function (entity_name) { IPA.add_entity(entity); return entity; -} +}; + IPA.entity_get_search_facet = function (entity_name) { @@ -240,7 +246,8 @@ IPA.entity_get_search_facet = function (entity_name) { entity.add_facet(facet); return facet; -} +}; + 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] }); } -} +}; + IPA.entity_set_add_definition = function (entity_name, data) { @@ -277,13 +285,15 @@ IPA.entity_set_add_definition = function (entity_name, data) { } dialog.init(); -} +}; + IPA.entity_get_add_dialog = function (entity_name) { var entity = IPA.fetch_entity(entity_name); return entity.get_add_dialog(); -} +}; + IPA.entity_get_details_facet = function (entity_name) { @@ -299,7 +309,8 @@ IPA.entity_get_details_facet = function (entity_name) { entity.add_facet(facet); return facet; -} +}; + 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]; facet.add_section(section); } -} +}; + 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 }); } -} +}; + 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]; entity.add_facet(facet); } -} +}; + IPA.current_facet = function (entity){ var facet_name = $.bbq.getState(entity.name + '-facet', true); @@ -344,7 +358,8 @@ IPA.current_facet = function (entity){ facet_name = entity.facets[0].name; } return facet_name; -} +}; + IPA.entity_setup = function (container) { @@ -374,8 +389,7 @@ IPA.entity_setup = function (container) { container.children().last().addClass('client'); facet.setup(container); facet.refresh(); -} - +}; /*Returns the entity requested, as well as: @@ -434,6 +448,7 @@ IPA.nested_tabs = function(entity_name){ return siblings; }; + IPA. facet_create_action_panel = function(container) { var that = this; @@ -573,4 +588,4 @@ IPA. facet_create_action_panel = function(container) { $('.entity-facet', action_panel).addClass('entity-facet-disabled'); } return action_panel; -} +}; diff --git a/install/static/group.js b/install/static/group.js index aef5ca000..30e29e3d6 100644 --- a/install/static/group.js +++ b/install/static/group.js @@ -1,3 +1,5 @@ +/*jsl:import ipa.js */ + /* Authors: * Pavel Zuna * @@ -68,10 +70,12 @@ IPA.group = function () { }; return that; -} +}; + IPA.add_entity(IPA.group()); + IPA.group_add_dialog = function (spec) { spec = spec || {}; @@ -94,7 +98,8 @@ IPA.group_add_dialog = function (spec) { }; return that; -} +}; + IPA.group_search_facet = function (spec) { @@ -110,7 +115,8 @@ IPA.group_search_facet = function (spec) { }; return that; -} +}; + IPA.group_details_facet = function (spec) { @@ -134,7 +140,8 @@ IPA.group_details_facet = function (spec) { }; return that; -} +}; + IPA.group_member_user_facet = function (spec) { @@ -192,4 +199,4 @@ IPA.group_member_user_facet = function (spec) { }; return that; -} +}; diff --git a/install/static/hbacrule.js b/install/static/hbacrule.js index 70c4eba9f..966d86b78 100644 --- a/install/static/hbacrule.js +++ b/install/static/hbacrule.js @@ -1,3 +1,5 @@ +/*jsl:import ipa.js */ + /* Authors: * Endi Sukma Dewata * @@ -51,10 +53,12 @@ IPA.hbacrule = function () { }; return that; -} +}; + IPA.add_entity(IPA.hbacrule()); + IPA.hbacrule_add_dialog = function (spec) { spec = spec || {}; @@ -81,7 +85,8 @@ IPA.hbacrule_add_dialog = function (spec) { }; return that; -} +}; + IPA.hbacrule_search_facet = function (spec) { @@ -124,7 +129,8 @@ IPA.hbacrule_search_facet = function (spec) { }; return that; -} +}; + IPA.hbacrule_details_facet = function (spec) { @@ -535,7 +541,8 @@ IPA.hbacrule_details_facet = function (spec) { }; return that; -} +}; + IPA.hbacrule_details_general_section = function (spec){ @@ -676,7 +683,7 @@ IPA.hbacrule_details_general_section = function (spec){ }; return that; -} +}; IPA.hbacrule_accesstime_widget = function (spec) { @@ -980,4 +987,4 @@ IPA.hbacrule_accesstime_widget = function (spec) { }; return that; -} +}; diff --git a/install/static/hbacsvc.js b/install/static/hbacsvc.js index b8340dc4f..eacdf8683 100644 --- a/install/static/hbacsvc.js +++ b/install/static/hbacsvc.js @@ -1,3 +1,5 @@ +/*jsl:import ipa.js */ + /* Authors: * Endi Sukma Dewata * @@ -51,10 +53,12 @@ IPA.hbacsvc = function () { }; return that; -} +}; + IPA.add_entity(IPA.hbacsvc()); + IPA.hbacsvc_add_dialog = function (spec) { spec = spec || {}; @@ -70,7 +74,8 @@ IPA.hbacsvc_add_dialog = function (spec) { }; return that; -} +}; + IPA.hbacsvc_search_facet = function (spec) { @@ -87,7 +92,7 @@ IPA.hbacsvc_search_facet = function (spec) { }; return that; -} +}; IPA.hbacsvc_details_facet = function (spec) { @@ -111,4 +116,4 @@ IPA.hbacsvc_details_facet = function (spec) { }; return that; -} \ No newline at end of file +}; \ No newline at end of file diff --git a/install/static/hbacsvcgroup.js b/install/static/hbacsvcgroup.js index 1d8b832ce..c437768d7 100644 --- a/install/static/hbacsvcgroup.js +++ b/install/static/hbacsvcgroup.js @@ -1,3 +1,5 @@ +/*jsl:import ipa.js */ + /* Authors: * Endi Sukma Dewata * @@ -57,10 +59,12 @@ IPA.hbacsvcgroup = function () { }; return that; -} +}; + IPA.add_entity(IPA.hbacsvcgroup()); + IPA.hbacsvcgroup_add_dialog = function (spec) { spec = spec || {}; @@ -76,7 +80,8 @@ IPA.hbacsvcgroup_add_dialog = function (spec) { }; return that; -} +}; + IPA.hbacsvcgroup_search_facet = function (spec) { @@ -94,7 +99,7 @@ IPA.hbacsvcgroup_search_facet = function (spec) { return that; -} +}; IPA.hbacsvcgroup_details_facet = function (spec) { @@ -132,7 +137,8 @@ IPA.hbacsvcgroup_details_facet = function (spec) { }; return that; -} +}; + IPA.hbacsvcgroup_member_hbacsvc_table_widget = function (spec) { @@ -189,4 +195,4 @@ IPA.hbacsvcgroup_member_hbacsvc_table_widget = function (spec) { }; return that; -} \ No newline at end of file +}; diff --git a/install/static/host.js b/install/static/host.js index 6cd6f7bcf..6b84f87de 100644 --- a/install/static/host.js +++ b/install/static/host.js @@ -1,3 +1,6 @@ +/*jsl:import ipa.js */ +/*jsl:import certificate.js */ + /* Authors: * Pavel Zuna * Endi S. Dewata @@ -71,10 +74,12 @@ IPA.host = function () { }; return that; -} +}; + IPA.add_entity(IPA.host()); + IPA.host_add_dialog = function (spec) { spec = spec || {}; @@ -93,7 +98,8 @@ IPA.host_add_dialog = function (spec) { }; return that; -} +}; + IPA.host_search_facet = function (spec) { @@ -113,7 +119,8 @@ IPA.host_search_facet = function (spec) { }; return that; -} +}; + IPA.host_details_facet = function (spec) { @@ -200,7 +207,8 @@ IPA.host_details_facet = function (spec) { }; return that; -} +}; + function host_provisioning_status_widget(spec) { @@ -473,4 +481,4 @@ IPA.host_managedby_host_facet = function (spec) { }; return that; -} \ No newline at end of file +}; \ No newline at end of file diff --git a/install/static/hostgroup.js b/install/static/hostgroup.js index 6e5095098..f8590cc37 100644 --- a/install/static/hostgroup.js +++ b/install/static/hostgroup.js @@ -1,3 +1,5 @@ +/*jsl:import ipa.js */ + /* Authors: * Pavel Zuna * diff --git a/install/static/ipa.js b/install/static/ipa.js index ed43d550a..6600328f6 100644 --- a/install/static/ipa.js +++ b/install/static/ipa.js @@ -1,5 +1,7 @@ /* Authors: * Pavel Zuna + * Adam Young + * Endi Dewata * * Copyright (C) 2010 Red Hat * see file 'COPYING' for use and warranty information @@ -201,7 +203,8 @@ IPA.command = function (spec) { }; return that; -} +}; + IPA.batch_command = function (spec) { spec = spec || {}; @@ -270,7 +273,7 @@ IPA.batch_command = function (spec) { }; return that; -} +}; /* call an IPA command over JSON-RPC * arguments: @@ -434,7 +437,7 @@ IPA.cmd = function (name, args, options, win_callback, fail_callback, objname, c $.ajax(request); return (id); -} +}; /* helper function used to retrieve information about an attribute */ @@ -457,7 +460,7 @@ IPA.get_param_info = function(obj_name, attr) } return (null); -} +}; /* helper function used to retrieve attr name with members of type `member` */ IPA.get_member_attribute = function (obj_name, member) @@ -476,10 +479,11 @@ IPA.get_member_attribute = function (obj_name, member) } } return null; + } IPA.create_network_spinner = function(){ return $('',{ 'class':'network-activity-indicator', html: ''}); -} +}; diff --git a/install/static/jsl.conf b/install/static/jsl.conf new file mode 100644 index 000000000..1d7190e43 --- /dev/null +++ b/install/static/jsl.conf @@ -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 diff --git a/install/static/navigation.js b/install/static/navigation.js index 57190b432..7ae5b656e 100644 --- a/install/static/navigation.js +++ b/install/static/navigation.js @@ -1,3 +1,5 @@ +/*jsl:import ipa.js */ + /* Authors: * Pavel Zuna * diff --git a/install/static/netgroup.js b/install/static/netgroup.js index ab69c1b3f..cfc65b0f7 100644 --- a/install/static/netgroup.js +++ b/install/static/netgroup.js @@ -1,3 +1,5 @@ +/*jsl:import ipa.js */ + /* Authors: * Pavel Zuna * diff --git a/install/static/policy.js b/install/static/policy.js index f8d8a9634..7984a2e54 100644 --- a/install/static/policy.js +++ b/install/static/policy.js @@ -1,3 +1,6 @@ +/*jsl:import ipa.js */ +/*jsl:import search.js */ + /* Authors: * Adam Young * @@ -185,7 +188,6 @@ IPA.records_facet = function (spec){ } - function delete_records(records_table){ var zone = $.bbq.getState('dnszone-pkey', true); @@ -483,7 +485,7 @@ IPA.records_facet = function (spec){ that.refresh = refresh; return that; -} +}; /**Automount*/ diff --git a/install/static/rule.js b/install/static/rule.js index e54aa27ef..f625f8535 100644 --- a/install/static/rule.js +++ b/install/static/rule.js @@ -1,3 +1,5 @@ +/*jsl:import ipa.js */ + /* Authors: * Endi Sukma Dewata * @@ -121,7 +123,8 @@ IPA.rule_details_section = function (spec){ }; return that; -} +}; + IPA.rule_association_table_widget = function (spec) { @@ -168,4 +171,4 @@ IPA.rule_association_table_widget = function (spec) { }; return that; -} +}; diff --git a/install/static/search.js b/install/static/search.js index 535ad3fcf..934000b9f 100644 --- a/install/static/search.js +++ b/install/static/search.js @@ -1,3 +1,5 @@ +/*jsl:import ipa.js */ + /* Authors: * Pavel Zuna * Adam Young @@ -246,7 +248,7 @@ IPA.search_widget = function (spec) { }; return that; -} +}; IPA.search_facet = function (spec) { @@ -385,7 +387,7 @@ IPA.search_facet = function (spec) { that.search_facet_setup = that.setup; return that; -} +}; function search_generate_tr(thead, tbody, entry_attrs) { diff --git a/install/static/serverconfig.js b/install/static/serverconfig.js index f33a8e987..6c0a824b4 100644 --- a/install/static/serverconfig.js +++ b/install/static/serverconfig.js @@ -1,3 +1,5 @@ +/*jsl:import ipa.js */ + /* Authors: * Endi Sukma Dewata * Adam Young diff --git a/install/static/service.js b/install/static/service.js index 39c7ae2fd..de583bde1 100644 --- a/install/static/service.js +++ b/install/static/service.js @@ -1,3 +1,6 @@ +/*jsl:import ipa.js */ +/*jsl:import certificate.js */ + /* Authors: * Endi Sukma Dewata * @@ -64,10 +67,12 @@ IPA.service = function () { }; return that; -} +}; + IPA.add_entity(IPA.service()); + IPA.service_add_dialog = function (spec) { spec = spec || {}; @@ -151,7 +156,8 @@ IPA.service_add_dialog = function (spec) { }; return that; -} +}; + IPA.service_search_facet = function (spec) { @@ -166,7 +172,8 @@ IPA.service_search_facet = function (spec) { }; return that; -} +}; + IPA.service_details_facet = function (spec) { @@ -226,7 +233,8 @@ IPA.service_details_facet = function (spec) { }; return that; -} +}; + function service_service_load(result) { @@ -256,6 +264,7 @@ function service_host_load(result) { dd.append(host); } + function service_provisioning_status_widget(spec) { spec = spec || {}; @@ -449,4 +458,4 @@ IPA.service_managedby_host_facet = function (spec) { }; return that; -} \ No newline at end of file +}; \ No newline at end of file diff --git a/install/static/sudocmd.js b/install/static/sudocmd.js index d4f981ad4..f9759ba3d 100644 --- a/install/static/sudocmd.js +++ b/install/static/sudocmd.js @@ -1,3 +1,5 @@ +/*jsl:import ipa.js */ + /* Authors: * Endi Sukma Dewata * @@ -51,10 +53,12 @@ IPA.sudocmd = function () { }; return that; -} +}; + IPA.add_entity(IPA.sudocmd()); + IPA.sudocmd_add_dialog = function (spec) { spec = spec || {}; @@ -70,7 +74,8 @@ IPA.sudocmd_add_dialog = function (spec) { }; return that; -} +}; + IPA.sudocmd_search_facet = function (spec) { @@ -87,7 +92,7 @@ IPA.sudocmd_search_facet = function (spec) { }; return that; -} +}; IPA.sudocmd_details_facet = function (spec) { @@ -125,7 +130,8 @@ IPA.sudocmd_details_facet = function (spec) { }; return that; -} +}; + IPA.sudocmd_member_sudocmdgroup_table_widget = function (spec) { @@ -270,4 +276,4 @@ IPA.sudocmd_member_sudocmdgroup_table_widget = function (spec) { }; return that; -} \ No newline at end of file +}; \ No newline at end of file diff --git a/install/static/sudocmdgroup.js b/install/static/sudocmdgroup.js index 256b8fc55..ef93de9b4 100644 --- a/install/static/sudocmdgroup.js +++ b/install/static/sudocmdgroup.js @@ -1,3 +1,5 @@ +/*jsl:import ipa.js */ + /* Authors: * Endi Sukma Dewata * @@ -57,10 +59,12 @@ IPA.sudocmdgroup = function () { }; return that; -} +}; + IPA.add_entity(IPA.sudocmdgroup()); + IPA.sudocmdgroup_add_dialog = function (spec) { spec = spec || {}; @@ -76,7 +80,8 @@ IPA.sudocmdgroup_add_dialog = function (spec) { }; return that; -} +}; + IPA.sudocmdgroup_search_facet = function (spec) { @@ -93,7 +98,7 @@ IPA.sudocmdgroup_search_facet = function (spec) { }; return that; -} +}; IPA.sudocmdgroup_details_facet = function (spec) { @@ -131,7 +136,8 @@ IPA.sudocmdgroup_details_facet = function (spec) { }; return that; -} +}; + IPA.sudocmdgroup_member_sudocmd_table_widget = function (spec) { @@ -189,4 +195,4 @@ IPA.sudocmdgroup_member_sudocmd_table_widget = function (spec) { }; return that; -} \ No newline at end of file +}; \ No newline at end of file diff --git a/install/static/sudorule.js b/install/static/sudorule.js index c3cd5821d..43ae267e8 100644 --- a/install/static/sudorule.js +++ b/install/static/sudorule.js @@ -1,3 +1,5 @@ +/*jsl:import ipa.js */ + /* Authors: * Endi Sukma Dewata * @@ -51,10 +53,12 @@ IPA.sudorule = function () { }; return that; -} +}; + IPA.add_entity(IPA.sudorule()); + IPA.sudorule_add_dialog = function (spec) { spec = spec || {}; @@ -69,7 +73,8 @@ IPA.sudorule_add_dialog = function (spec) { }; return that; -} +}; + IPA.sudorule_search_facet = function (spec) { @@ -87,7 +92,8 @@ IPA.sudorule_search_facet = function (spec) { }; return that; -} +}; + IPA.sudorule_details_facet = function (spec) { @@ -369,13 +375,13 @@ IPA.sudorule_details_facet = function (spec) { return; } - //alert(JSON.stringify(batch.to_json())); batch.execute(); }; return that; -} +}; + IPA.sudorule_details_general_section = function (spec){ @@ -498,7 +504,8 @@ IPA.sudorule_details_general_section = function (spec){ }; return that; -} +}; + IPA.sudorule_details_command_section = function (spec){ @@ -665,7 +672,8 @@ IPA.sudorule_details_command_section = function (spec){ }; return that; -} +}; + IPA.sudorule_details_runas_section = function (spec){ @@ -857,7 +865,8 @@ IPA.sudorule_details_runas_section = function (spec){ }; return that; -} +}; + IPA.sudorule_association_table_widget = function (spec) { @@ -897,7 +906,8 @@ IPA.sudorule_association_table_widget = function (spec) { }; return that; -} +}; + IPA.sudorule_association_adder_dialog = function (spec) { @@ -1050,7 +1060,8 @@ IPA.sudorule_association_adder_dialog = function (spec) { }; return that; -} +}; + IPA.sudorule_command_table_widget = function (spec) { @@ -1114,4 +1125,4 @@ IPA.sudorule_command_table_widget = function (spec) { }; return that; -} +}; diff --git a/install/static/user.js b/install/static/user.js index 58304d365..d8c493db4 100644 --- a/install/static/user.js +++ b/install/static/user.js @@ -1,3 +1,5 @@ +/*jsl:import ipa.js */ + /* Authors: * Pavel Zuna * @@ -117,7 +119,9 @@ IPA.user = function (){ return that; } return that; -} +}; + + IPA.add_entity(IPA.user()); /* ATTRIBUTE CALLBACKS */ diff --git a/install/static/webui.js b/install/static/webui.js index e5e5f57e7..1f45f0b1e 100644 --- a/install/static/webui.js +++ b/install/static/webui.js @@ -1,3 +1,6 @@ +/*jsl:import ipa.js */ +/*jsl:import navigation.js */ + /* Authors: * Pavel Zuna * @@ -137,7 +140,7 @@ $(function() { nav_create(self_serv_tab_set, navigation, 'tabs'); var state = {'user-pkey':IPA.whoami_pkey , - 'user-facet': jQuery.bbq.getState('user-facet') || + 'user-facet': $.bbq.getState('user-facet') || 'details'}; $.bbq.pushState(state); } @@ -158,14 +161,12 @@ $(function() { }); /* main loop (hashchange event handler) */ -function window_hashchange(evt) -{ +function window_hashchange(evt){ nav_update_tabs(); } /* builder function for unimplemented tab content */ -function unimplemented_tab(jobj) -{ +function unimplemented_tab(jobj){ jobj.text('Not implemented yet!'); } diff --git a/install/static/widget.js b/install/static/widget.js index f26ee2a1e..9221e499c 100644 --- a/install/static/widget.js +++ b/install/static/widget.js @@ -1,3 +1,4 @@ +/*jsl:import ipa.js */ /* Authors: * Endi Sukma Dewata * @@ -167,7 +168,7 @@ IPA.widget = function(spec) { that.widget_reset = that.reset; return that; -} +}; IPA.text_widget = function(spec) { @@ -255,7 +256,7 @@ IPA.text_widget = function(spec) { }; return that; -} +}; IPA.checkbox_widget = function (spec) { @@ -311,7 +312,7 @@ IPA.checkbox_widget = function (spec) { }; return that; -} +}; IPA.radio_widget = function(spec) { @@ -389,7 +390,7 @@ IPA.radio_widget = function(spec) { that.radio_save = that.save; return that; -} +}; IPA.textarea_widget = function (spec) { @@ -448,7 +449,7 @@ IPA.textarea_widget = function (spec) { }; return that; -} +}; IPA.button_widget = function (spec) { @@ -478,8 +479,7 @@ IPA.button_widget = function (spec) { } return that; -} - +}; IPA.column = function (spec) { @@ -513,7 +513,7 @@ IPA.column = function (spec) { } return that; -} +}; IPA.table_widget = function (spec) { @@ -835,7 +835,7 @@ IPA.table_widget = function (spec) { that.table_set_enabled = that.set_enabled; return that; -} +}; /** * This is a base class for dialog boxes. @@ -998,7 +998,7 @@ IPA.dialog = function(spec) { that.dialog_open = that.open; return that; -} +}; /** * This dialog provides an interface for searching and selecting @@ -1254,7 +1254,7 @@ IPA.adder_dialog = function (spec) { that.adder_dialog_setup = that.setup; return that; -} +}; /** * This dialog displays the values to be deleted. @@ -1303,4 +1303,4 @@ IPA.deleter_dialog = function (spec) { }; return that; -} +}; -- cgit