From 09dd4d3192073ba9ecc7feb8a5dfcd213affd525 Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Mon, 24 Sep 2018 17:27:12 -0400 Subject: Bug 1493500 - Remove all trailing whitespaces from all files --- js/TUI.js | 16 ++++++++-------- js/change-columns.js | 8 ++++---- js/create_bug.js | 4 ++-- js/custom-search.js | 12 ++++++------ js/expanding-tree.js | 12 ++++++------ js/field.js | 50 +++++++++++++++++++++++++------------------------- js/instant-search.js | 18 +++++++++--------- js/productform.js | 12 ++++++------ js/util.js | 8 ++++---- 9 files changed, 70 insertions(+), 70 deletions(-) (limited to 'js') diff --git a/js/TUI.js b/js/TUI.js index 2dee8ab2e..e3b8483cd 100644 --- a/js/TUI.js +++ b/js/TUI.js @@ -2,19 +2,19 @@ * License Version 1.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.mozilla.org/MPL/ - * + * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. - * + * * The Original Code is the Bugzilla Bug Tracking System. - * + * * The Initial Developer of the Original Code is Netscape Communications * Corporation. Portions created by Netscape are * Copyright (C) 1998 Netscape Communications Corporation. All * Rights Reserved. - * + * * Contributor(s): Dennis Melentyev * Max Kanat-Alexander */ @@ -22,7 +22,7 @@ /* This file provides JavaScript functions to be included when one wishes * to show/hide certain UI elements, and have the state of them being * shown/hidden stored in a cookie. - * + * * TUI stands for Tweak UI. * * Requires js/util.js and the YUI Dom and Cookie libraries. @@ -35,8 +35,8 @@ var TUI_COOKIE_NAME = 'TUI'; var TUI_alternates = new Array(); -/** - * Hides a particular class of elements if they are shown, +/** + * Hides a particular class of elements if they are shown, * or shows them if they are hidden. Then it stores whether that * class is now hidden or shown. * @@ -55,7 +55,7 @@ function TUI_toggle_class(className) { /** * Specifies that a certain class of items should be hidden by default, * if the user doesn't have a TUI cookie. - * + * * @param className The class to hide by default. */ function TUI_hide_default(className) { diff --git a/js/change-columns.js b/js/change-columns.js index e70cfd560..9d7b2dcfe 100644 --- a/js/change-columns.js +++ b/js/change-columns.js @@ -21,7 +21,7 @@ function initChangeColumns() { var av_select = document.getElementById("available_columns"); var sel_select = document.getElementById("selected_columns"); YAHOO.util.Dom.removeClass( - ['avail_header', av_select, 'select_button', + ['avail_header', av_select, 'select_button', 'deselect_button', 'up_button', 'down_button'], 'bz_default_hidden'); switch_options(sel_select, av_select, false); sel_select.selectedIndex = -1; @@ -37,7 +37,7 @@ function switch_options(from_box, to_box, selected) { from_box.options[i] = null; i = i - 1; } - + } } @@ -68,7 +68,7 @@ function move_up() { } else{ last = opt; - } + } } updateView(); } @@ -86,7 +86,7 @@ function move_down() { } else{ last = opt; - } + } } updateView(); } diff --git a/js/create_bug.js b/js/create_bug.js index 62d24a642..3716f2aef 100644 --- a/js/create_bug.js +++ b/js/create_bug.js @@ -1,6 +1,6 @@ function toggleAdvancedFields() { TUI_toggle_class('expert_fields'); - var elements = YAHOO.util.Dom.getElementsByClassName('expert_fields'); + var elements = YAHOO.util.Dom.getElementsByClassName('expert_fields'); if (YAHOO.util.Dom.hasClass(elements[0], TUI_HIDDEN_CLASS)) { handleWantsBugFlags(false); } @@ -47,7 +47,7 @@ YAHOO.util.Event.onDOMReady(function() { } // force field widths - + var width = document.getElementById('short_desc').clientWidth + 'px'; var el; diff --git a/js/custom-search.js b/js/custom-search.js index e5c172d3b..21b0660e1 100644 --- a/js/custom-search.js +++ b/js/custom-search.js @@ -11,10 +11,10 @@ * The Original Code is the Bugzilla Bug Tracking System. * * The Initial Developer of the Original Code is BugzillaSource, Inc. - * Portions created by the Initial Developer are Copyright (C) 2011 + * Portions created by the Initial Developer are Copyright (C) 2011 * the Initial Developer. All Rights Reserved. * - * Contributor(s): + * Contributor(s): * Max Kanat-Alexander */ @@ -39,9 +39,9 @@ function custom_search_not_changed(id) { function custom_search_new_row() { var row = document.getElementById('custom_search_last_row'); var clone = row.cloneNode(true); - + _cs_fix_row_ids(clone); - + // We only want one copy of the buttons, in the new row. So the old // ones get deleted. var op_button = document.getElementById('op_button'); @@ -124,7 +124,7 @@ function custom_search_open_paren() { function custom_search_close_paren() { var new_row = custom_search_new_row(); - + // We need to up the new row's id by one more, because we're going // to insert a "CP" before it. var id = _cs_fix_row_ids(new_row); @@ -138,7 +138,7 @@ function custom_search_close_paren() { paren_row.id = null; paren_row.innerHTML = ')'; - + new_row.parentNode.insertBefore(paren_row, new_row); if (new_margin == 0) { diff --git a/js/expanding-tree.js b/js/expanding-tree.js index d210a629c..e86bff865 100644 --- a/js/expanding-tree.js +++ b/js/expanding-tree.js @@ -2,22 +2,22 @@ * License Version 1.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.mozilla.org/MPL/ - * + * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. - * + * * The Original Code is the Bugzilla Bug Tracking System. - * + * * The Initial Developer of the Original Code is Netscape Communications * Corporation. Portions created by Netscape are * Copyright (C) 1998 Netscape Communications Corporation. All * Rights Reserved. - * + * * Contributor(s): Mike Shaver * Christian Reis - * André Batosti + * André Batosti */ if (!Node) { @@ -130,7 +130,7 @@ function duplicated(element) { highlighted = 0; return; } - } + } highlighted = element; var elem = document.getElementById(element); highlightedclass = elem.className; diff --git a/js/field.js b/js/field.js index ddf6b8b1c..db2f9ac39 100644 --- a/js/field.js +++ b/js/field.js @@ -19,7 +19,7 @@ * Reed Loden */ -/* This library assumes that the needed YUI libraries have been loaded +/* This library assumes that the needed YUI libraries have been loaded already. */ var bz_no_validate_enter_bug = false; @@ -97,7 +97,7 @@ function _errorFor(field, name) { } function createCalendar(name) { - var cal = new YAHOO.widget.Calendar('calendar_' + name, + var cal = new YAHOO.widget.Calendar('calendar_' + name, 'con_calendar_' + name); YAHOO.bugzilla['calendar_' + name] = cal; var field = document.getElementById(name); @@ -129,7 +129,7 @@ function showCalendar(field_name) { }; // If somebody clicks outside the calendar, hide it. - YAHOO.util.Event.addListener(document.body, 'click', + YAHOO.util.Event.addListener(document.body, 'click', calendar.bz_myBodyCloser, calendar, true); // Make Esc close the calendar. @@ -152,14 +152,14 @@ function hideCalendar(field_name) { YAHOO.util.Event.removeListener(document.body, 'keydown', cal.bz_escCal); } -/* This is the selectEvent for our Calendar objects on our custom +/* This is the selectEvent for our Calendar objects on our custom * DateTime fields. */ function setFieldFromCalendar(type, args, date_field) { var dates = args[0]; var setDate = dates[0]; - // We can't just write the date straight into the field, because there + // We can't just write the date straight into the field, because there // might already be a time there. var timeRe = /\b(\d{1,2}):(\d\d)(?::(\d\d))?/; var currentTime = timeRe.exec(date_field.value); @@ -195,8 +195,8 @@ function setFieldFromCalendar(type, args, date_field) { hideCalendar(date_field.id); } -/* Sets the calendar based on the current field value. - */ +/* Sets the calendar based on the current field value. + */ function updateCalendarFromField(date_field) { var dateRe = /(\d\d\d\d)-(\d\d?)-(\d\d?)/; var pieces = dateRe.exec(date_field.value); @@ -205,7 +205,7 @@ function updateCalendarFromField(date_field) { cal.select(new Date(pieces[1], pieces[2] - 1, pieces[3])); var selectedArray = cal.getSelectedDates(); var selected = selectedArray[0]; - cal.cfg.setProperty("pagedate", (selected.getMonth() + 1) + '/' + cal.cfg.setProperty("pagedate", (selected.getMonth() + 1) + '/' + selected.getFullYear()); cal.render(); } @@ -242,7 +242,7 @@ function hideEditableField( container, input, action, field_id, original_value, */ function showEditableField (e, ContainerInputArray) { var inputs = new Array(); - var inputArea = YAHOO.util.Dom.get(ContainerInputArray[1]); + var inputArea = YAHOO.util.Dom.get(ContainerInputArray[1]); if ( ! inputArea ){ YAHOO.util.Event.preventDefault(e); return; @@ -292,10 +292,10 @@ function showEditableField (e, ContainerInputArray) { * var ContainerInputArray: An array containing the (edit) and text area and the input being displayed * var ContainerInputArray[0]: the container that will be hidden usually shows the (edit) text * var ContainerInputArray[1]: the input area and label that will be displayed - * var ContainerInputArray[2]: the field that is on the page, might get changed by browser autocomplete + * var ContainerInputArray[2]: the field that is on the page, might get changed by browser autocomplete * var ContainerInputArray[3]: the original value from the page loading. * - */ + */ function checkForChangedFieldValues(e, ContainerInputArray ) { var el = document.getElementById(ContainerInputArray[2]); var unhide = false; @@ -327,7 +327,7 @@ function checkForChangedFieldValues(e, ContainerInputArray ) { function hideAliasAndSummary(short_desc_value, alias_value) { // check the short desc field hideEditableField( 'summary_alias_container','summary_alias_input', - 'editme_action','short_desc', short_desc_value); + 'editme_action','short_desc', short_desc_value); // check that the alias hasn't changed var bz_alias_check_array = new Array('summary_alias_container', 'summary_alias_input', 'alias', alias_value); @@ -369,9 +369,9 @@ function initDefaultCheckbox(field_id){ new Array( 'bz_' + field_id + '_edit_container', 'bz_' + field_id + '_input', 'set_default_' + field_id ,'1')); - + YAHOO.util.Event.addListener( window, 'load', boldOnChange, - 'set_default_' + field_id ); + 'set_default_' + field_id ); } function showHideStatusItems(e, dupArrayInfo) { @@ -398,11 +398,11 @@ function showHideStatusItems(e, dupArrayInfo) { if ( (el.value == dupArrayInfo[1] && dupArrayInfo[0] == "is_duplicate") - || bz_isValueInArray(close_status_array, el.value) ) + || bz_isValueInArray(close_status_array, el.value) ) { - YAHOO.util.Dom.removeClass('resolution_settings', + YAHOO.util.Dom.removeClass('resolution_settings', 'bz_default_hidden'); - YAHOO.util.Dom.removeClass('resolution_settings_warning', + YAHOO.util.Dom.removeClass('resolution_settings_warning', 'bz_default_hidden'); // Remove the blank option we inserted. @@ -425,7 +425,7 @@ function showDuplicateItem(e) { if (resolution) { if (resolution.value == 'DUPLICATE' && bz_isValueInArray( close_status_array, bug_status.value) ) { // hide resolution show duplicate - YAHOO.util.Dom.removeClass('duplicate_settings', + YAHOO.util.Dom.removeClass('duplicate_settings', 'bz_default_hidden'); YAHOO.util.Dom.addClass('dup_id_discoverable', 'bz_default_hidden'); // check to make sure the field is visible or IE throws errors @@ -436,7 +436,7 @@ function showDuplicateItem(e) { } else { YAHOO.util.Dom.addClass('duplicate_settings', 'bz_default_hidden'); - YAHOO.util.Dom.removeClass('dup_id_discoverable', + YAHOO.util.Dom.removeClass('dup_id_discoverable', 'bz_default_hidden'); dup_id.blur(); } @@ -493,7 +493,7 @@ function updateCommentTagControl(checkbox, field) { function setClassification() { var classification = document.getElementById('classification'); var product = document.getElementById('product'); - var selected_product = product.value; + var selected_product = product.value; var select_classification = all_classifications[selected_product]; classification.value = select_classification; bz_fireEvent(classification, 'change'); @@ -513,15 +513,15 @@ function showFieldWhen(controlled_id, controller_id, values) { } /** - * Called by showFieldWhen when a field's visibility controller - * changes values. + * Called by showFieldWhen when a field's visibility controller + * changes values. */ function handleVisControllerValueChange(e, args) { var controlled_id = args[0]; var controller = args[1]; var values = args[2]; - var label_container = + var label_container = document.getElementById('field_label_' + controlled_id); var field_container = document.getElementById('field_container_' + controlled_id); @@ -543,11 +543,11 @@ function handleVisControllerValueChange(e, args) { } } -function showValueWhen(controlled_field_id, controlled_value_ids, +function showValueWhen(controlled_field_id, controlled_value_ids, controller_field_id, controller_value_id) { var controller_field = document.getElementById(controller_field_id); - // Note that we don't get an object for the controlled field here, + // Note that we don't get an object for the controlled field here, // because it might not yet exist in the DOM. We just pass along its id. YAHOO.util.Event.addListener(controller_field, 'change', handleValControllerChange, [controlled_field_id, controlled_value_ids, diff --git a/js/instant-search.js b/js/instant-search.js index 6e8f104f2..6ce3516a7 100644 --- a/js/instant-search.js +++ b/js/instant-search.js @@ -57,7 +57,7 @@ YAHOO.bugzilla.instantSearch = { }; // DataSource can't understand a JSON-RPC error response, so // we have to modify the result data if we get one. - dataSource.doBeforeParseData = + dataSource.doBeforeParseData = function(oRequest, oFullResponse, oCallback) { if (oFullResponse.error) { oFullResponse.result = {}; @@ -67,17 +67,17 @@ YAHOO.bugzilla.instantSearch = { } return oFullResponse; }; - dataSource.subscribe('dataErrorEvent', + dataSource.subscribe('dataErrorEvent', function() { YAHOO.bugzilla.instantSearch.currentSearchQuery = ''; } ); this.dataTable = new YAHOO.widget.DataTable( - 'results', - this.dataTableColumns, - dataSource, - { + 'results', + this.dataTableColumns, + dataSource, + { initialLoad: false, MSG_EMPTY: 'No matching bugs found.', MSG_ERROR: 'An error occurred while searching for bugs, please try again.' @@ -138,7 +138,7 @@ YAHOO.bugzilla.instantSearch = { YAHOO.bugzilla.instantSearch.dataTable.showTableMessage( 'Searching...   ' + - '', YAHOO.widget.DataTable.CLASS_LOADING ); @@ -158,12 +158,12 @@ YAHOO.bugzilla.instantSearch = { } YAHOO.bugzilla.instantSearch.dataTable.getDataSource().sendRequest( - YAHOO.lang.JSON.stringify(jsonObject), + YAHOO.lang.JSON.stringify(jsonObject), { success: YAHOO.bugzilla.instantSearch.onSearchResults, failure: YAHOO.bugzilla.instantSearch.onSearchResults, scope: YAHOO.bugzilla.instantSearch.dataTable, - argument: YAHOO.bugzilla.instantSearch.dataTable.getState() + argument: YAHOO.bugzilla.instantSearch.dataTable.getState() } ); diff --git a/js/productform.js b/js/productform.js index f9b420c31..12ac63e76 100644 --- a/js/productform.js +++ b/js/productform.js @@ -2,19 +2,19 @@ * License Version 1.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.mozilla.org/MPL/ - * + * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. - * + * * The Original Code is the Bugzilla Bug Tracking System. - * + * * The Initial Developer of the Original Code is Netscape Communications * Corporation. Portions created by Netscape are * Copyright (C) 1998 Netscape Communications Corporation. All * Rights Reserved. - * + * * Contributor(s): Christian Reis */ @@ -52,7 +52,7 @@ function selectClassification(classfield, product, component, version, milestone first_load = false; return; } - + // Don't reset first_load as done in selectProduct. That's because we // want selectProduct to handle the first_load attribute. @@ -69,7 +69,7 @@ function selectClassification(classfield, product, component, version, milestone if (!findall) { // Save sel for the next invocation of selectClassification(). var tmp = sel; - + // This is an optimization: if we have just added classifications to an // existing selection, no need to clear the form elements and add // everything again; just merge the new ones with the existing diff --git a/js/util.js b/js/util.js index c27dc2b11..781fd3c67 100644 --- a/js/util.js +++ b/js/util.js @@ -121,7 +121,7 @@ function bz_getFullWidth(fromObj) /** * Causes a block to appear directly underneath another block, * overlaying anything below it. - * + * * @param item The block that you want to move. * @param parent The block that it goes on top of. * @return nothing @@ -272,7 +272,7 @@ function bz_preselectedOptions(aSelect) { /** * Tells you whether or not a particular value is selected in a select, - * whether it's a multi-select or a single-select. The check is + * whether it's a multi-select or a single-select. The check is * case-sensitive. * * @param aSelect The select you're checking. @@ -306,9 +306,9 @@ function bz_optionIndex(aSelect, aValue) { /** * Used to fire an event programmatically. - * + * * @param anElement The element you want to fire the event of. - * @param anEvent The name of the event you want to fire, + * @param anEvent The name of the event you want to fire, * without the word "on" in front of it. */ function bz_fireEvent(anElement, anEvent) { -- cgit v1.2.3-24-g4f1b