Liberated archaic DOM element styler
* src/ui/ElementStyler.js: Added * src/sort/MultiSort.js: Removed ElementStyler liberation todo * src/ui/field/DomFieldFactory.js: Same * src/ui/step/GeneralStepUi.js: Same * src/ui/step/StepUiBuilder.js: Same This existed when the framework was very long, and has managed to survive numerous refactoring attempts; it used to be a small class abstracting element styling, and it has had crap thrown into it ever since, partially due to time constraints. It needs to go away.master
parent
003d527307
commit
fea4e151cc
|
@ -0,0 +1,101 @@
|
||||||
|
/**
|
||||||
|
* List of US states and codes
|
||||||
|
*
|
||||||
|
* Copyright (C) 2016 LoVullo Associates, Inc.
|
||||||
|
*
|
||||||
|
* This file is part of liza.
|
||||||
|
*
|
||||||
|
* liza is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of states and their codes
|
||||||
|
* @var {Object}
|
||||||
|
*/
|
||||||
|
var states = {
|
||||||
|
'AL': 'Alabama',
|
||||||
|
'AK': 'Alaska',
|
||||||
|
'AZ': 'Arizona',
|
||||||
|
'AR': 'Arkansas',
|
||||||
|
'CA': 'California',
|
||||||
|
'CO': 'Colorado',
|
||||||
|
'CT': 'Connecticut',
|
||||||
|
'DE': 'Delaware',
|
||||||
|
'FL': 'Florida',
|
||||||
|
'GA': 'Georgia',
|
||||||
|
'HI': 'Hawaii',
|
||||||
|
'ID': 'Idaho',
|
||||||
|
'IL': 'Illinois',
|
||||||
|
'IN': 'Indiana',
|
||||||
|
'IA': 'Iowa',
|
||||||
|
'KS': 'Kansas',
|
||||||
|
'KY': 'Kentucky',
|
||||||
|
'LA': 'Louisiana',
|
||||||
|
'ME': 'Maine',
|
||||||
|
'MD': 'Maryland',
|
||||||
|
'MA': 'Massachusetts',
|
||||||
|
'MI': 'Michigan',
|
||||||
|
'MN': 'Minnesota',
|
||||||
|
'MS': 'Mississippi',
|
||||||
|
'MO': 'Missouri',
|
||||||
|
'MT': 'Montana',
|
||||||
|
'NE': 'Nebraska',
|
||||||
|
'NV': 'Nevada',
|
||||||
|
'NH': 'New Hampshire',
|
||||||
|
'NJ': 'New Jersey',
|
||||||
|
'NM': 'New Mexico',
|
||||||
|
'NY': 'New York',
|
||||||
|
'NC': 'North Carolina',
|
||||||
|
'ND': 'North Dakota',
|
||||||
|
'OH': 'Ohio',
|
||||||
|
'OK': 'Oklahoma',
|
||||||
|
'OR': 'Oregon',
|
||||||
|
'PA': 'Pennsylvania',
|
||||||
|
'RI': 'Rhode Island',
|
||||||
|
'SC': 'South Carolina',
|
||||||
|
'SD': 'South Dakota',
|
||||||
|
'TN': 'Tennessee',
|
||||||
|
'TX': 'Texas',
|
||||||
|
'UT': 'Utah',
|
||||||
|
'VT': 'Vermont',
|
||||||
|
'VA': 'Virginia',
|
||||||
|
'WA': 'Washington',
|
||||||
|
'WV': 'West Virginia',
|
||||||
|
'WI': 'Wisconsin',
|
||||||
|
'WY': 'Wyoming',
|
||||||
|
|
||||||
|
// nothing
|
||||||
|
'' : '',
|
||||||
|
0: ''
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the name of the state associated with the given code
|
||||||
|
*
|
||||||
|
* @param {string} code state abbr
|
||||||
|
*
|
||||||
|
* @return {string} name of state
|
||||||
|
*/
|
||||||
|
exports.getName = function( code )
|
||||||
|
{
|
||||||
|
var val = states[ code ];
|
||||||
|
|
||||||
|
// if the value was not found, return the code we were given (which likely
|
||||||
|
// makes no sense at all, since it's not a valid state)
|
||||||
|
return ( val === undefined )
|
||||||
|
? code
|
||||||
|
: val;
|
||||||
|
}
|
|
@ -22,7 +22,6 @@
|
||||||
* - References to "quote" should be replaced with generic terminology
|
* - References to "quote" should be replaced with generic terminology
|
||||||
* representing a document.
|
* representing a document.
|
||||||
* - Dependencies need to be liberated:
|
* - Dependencies need to be liberated:
|
||||||
* - ElementStyler;
|
|
||||||
* - BucketDataValidator.
|
* - BucketDataValidator.
|
||||||
* - Global references (e.g. jQuery) must be removed.
|
* - Global references (e.g. jQuery) must be removed.
|
||||||
* - Checkbox-specific logic must be extracted.
|
* - Checkbox-specific logic must be extracted.
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -17,11 +17,6 @@
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
|
||||||
* @needsLove
|
|
||||||
* - Dependencies need to be liberated:
|
|
||||||
* - ElementStyler.
|
|
||||||
* @end needsLove
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Class = require( 'easejs' ).Class,
|
var Class = require( 'easejs' ).Class,
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
* - References to "quote" should be replaced with generic terminology
|
* - References to "quote" should be replaced with generic terminology
|
||||||
* representing a document.
|
* representing a document.
|
||||||
* - Dependencies need to be liberated:
|
* - Dependencies need to be liberated:
|
||||||
* - ElementStyler;
|
|
||||||
* - BucketDataValidator.
|
* - BucketDataValidator.
|
||||||
* - Global references (e.g. jQuery) must be removed.
|
* - Global references (e.g. jQuery) must be removed.
|
||||||
* - jQuery must be eliminated.
|
* - jQuery must be eliminated.
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
* @needsLove
|
* @needsLove
|
||||||
* - Global references to jQuery must be removed.
|
* - Global references to jQuery must be removed.
|
||||||
* - Dependencies need to be liberated:
|
* - Dependencies need to be liberated:
|
||||||
* - ElementStyler;
|
|
||||||
* - UI.
|
* - UI.
|
||||||
* - This may not be needed, may be able to be handled differently, and
|
* - This may not be needed, may be able to be handled differently, and
|
||||||
* really should load from data rather than a pre-generated template (?)
|
* really should load from data rather than a pre-generated template (?)
|
||||||
|
|
Loading…
Reference in New Issue