From: <gem...@li...> - 2011-10-11 15:59:56
|
Revision: 89 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=89&view=rev Author: matijsdejong Date: 2011-10-11 15:59:49 +0000 (Tue, 11 Oct 2011) Log Message: ----------- Extended autofocus to skip readonly inputs. ModelTableSnippetAbstract now has sortableLinks as an option and a caption variable. Removed gems__countries table. Modified Paths: -------------- trunk/library/changelog.txt trunk/library/classes/MUtil/Form/Decorator/AutoFocus.php trunk/library/classes/MUtil/Snippets/ModelTableSnippetAbstract.php trunk/library/configs/db/tables/gems__respondents.30.sql Removed Paths: ------------- trunk/library/configs/db/tables/gems__countries.10.sql Modified: trunk/library/changelog.txt =================================================================== --- trunk/library/changelog.txt 2011-10-11 12:59:41 UTC (rev 88) +++ trunk/library/changelog.txt 2011-10-11 15:59:49 UTC (rev 89) @@ -1,6 +1,7 @@ Important changes from 1.4.2 => 1.4.3 ============================================================ * gtr_organisations renamed to gtr_organizations + * table gems__countries is no longer in use Important changes from 1.4.1 => 1.4.2 ============================================================ Modified: trunk/library/classes/MUtil/Form/Decorator/AutoFocus.php =================================================================== --- trunk/library/classes/MUtil/Form/Decorator/AutoFocus.php 2011-10-11 12:59:41 UTC (rev 88) +++ trunk/library/classes/MUtil/Form/Decorator/AutoFocus.php 2011-10-11 15:59:49 UTC (rev 89) @@ -58,6 +58,7 @@ } elseif ($element instanceof Zend_Form_Element) { if (($element instanceof Zend_Form_Element_Hidden) || ($element instanceof MUtil_Form_Element_NoFocusInterface) || + ($element->getAttrib('readonly')) || ($element->helper == 'Button') || ($element->helper == 'formSubmit') || ($element->helper == 'SubmitButton')) { Modified: trunk/library/classes/MUtil/Snippets/ModelTableSnippetAbstract.php =================================================================== --- trunk/library/classes/MUtil/Snippets/ModelTableSnippetAbstract.php 2011-10-11 12:59:41 UTC (rev 88) +++ trunk/library/classes/MUtil/Snippets/ModelTableSnippetAbstract.php 2011-10-11 15:59:49 UTC (rev 89) @@ -59,7 +59,7 @@ /** * Functional extension: optionally use this function to add the browse columns * - * @var callable With signature: function(MUtil_Model_TableBridge $bridge, MUtil_Model_ModelAbstract $model) + * @var callable With signature: function(MUtil_Model_TableBridge $bridge, MUtil_Model_ModelAbstract $model, MUtil_Snippets_ModelTableSnippetAbstract $snippet) */ public $addTableColumns; @@ -78,6 +78,13 @@ public $browse = false; /** + * Optional table caption. + * + * @var string + */ + public $caption; + + /** * Content to show when there are no rows. * * Null shows '…' @@ -94,6 +101,13 @@ public $removePost = false; /** + * When true (= default) the headers get sortable links. + * + * @var boolean + */ + public $sortableLinks = true; + + /** * Adds columns from the model to the bridge that creates the browse table. * * Overrule this function to add different columns to the browse table, without @@ -105,10 +119,18 @@ */ protected function addBrowseTableColumns(MUtil_Model_TableBridge $bridge, MUtil_Model_ModelAbstract $model) { - foreach($model->getItemsOrdered() as $name) { - if ($label = $model->get($name, 'label')) { - $bridge->addSortable($name, $label); + if ($this->sortableLinks) { + foreach($model->getItemsOrdered() as $name) { + if ($label = $model->get($name, 'label')) { + $bridge->addSortable($name, $label); + } } + } else { + foreach($model->getItemsOrdered() as $name) { + if ($label = $model->get($name, 'label')) { + $bridge->addColumn($bridge->$name, $label); + } + } } } @@ -137,6 +159,9 @@ public function getBrowseTable(MUtil_Model_ModelAbstract $model) { $bridge = new MUtil_Model_TableBridge($model); + if ($this->caption) { + $bridge->caption($this->caption); + } if ($this->onEmpty) { $bridge->setOnEmpty($this->onEmpty); } else { @@ -147,7 +172,7 @@ } if (is_callable($this->addTableColumns)) { - call_user_func($this->addTableColumns, $bridge, $model); + call_user_func($this->addTableColumns, $bridge, $model, $this); } else { $this->addBrowseTableColumns($bridge, $model); } Deleted: trunk/library/configs/db/tables/gems__countries.10.sql =================================================================== --- trunk/library/configs/db/tables/gems__countries.10.sql 2011-10-11 12:59:41 UTC (rev 88) +++ trunk/library/configs/db/tables/gems__countries.10.sql 2011-10-11 15:59:49 UTC (rev 89) @@ -1,266 +0,0 @@ - -CREATE TABLE if not exists gems__countries ( - gct_code varchar(2) not null, - gct_description varchar(50) not null, - gct_in_eu boolean not null default 0, - - gct_extra varchar(255) null, - - gct_changed timestamp not null default current_timestamp on update current_timestamp, - gct_changed_by bigint unsigned not null, - gct_created timestamp not null, - gct_created_by bigint unsigned not null, - - PRIMARY KEY (gct_code) - ) - ENGINE=InnoDB - CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'; - - -INSERT INTO gems__countries - (gct_code, gct_description, gct_in_eu, gct_extra, gct_changed, gct_changed_by, gct_created, gct_created_by) - VALUES - ('AD', 'Andorra', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('AE', 'United Arab Emirates', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('AF', 'Afghanistan', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('AG', 'Antigua and Barbuda', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('AI', 'Anguilla', 0, 'AI previously represented French Territory of the Afars and the Issas', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('AL', 'Albania', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('AM', 'Armenia', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('AN', 'Netherlands Antilles', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('AO', 'Angola', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('AQ', 'Antarctica', 0, 'Code taken from "Antarctique", its French name Consisting of all territory south of latitude 60\xB0S', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('AR', 'Argentina', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('AS', 'American Samoa', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('AT', 'Austria', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('AU', 'Australia', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('AW', 'Aruba', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('AX', '\xC5land Islands', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('AZ', 'Azerbaijan', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('BA', 'Bosnia and Herzegovina', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('BB', 'Barbados', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('BD', 'Bangladesh', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('BE', 'Belgium', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('BF', 'Burkina Faso', 0, 'Previously named "Upper Volta" HV', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('BG', 'Bulgaria', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('BH', 'Bahrain', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('BI', 'Burundi', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('BJ', 'Benin', 0, 'Previously named "Dahomey" DY', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('BM', 'Bermuda', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('BN', 'Brunei Darussalam', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('BO', 'Bolivia', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('BR', 'Brazil', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('BS', 'Bahamas', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('BT', 'Bhutan', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('BV', 'Bouvet Island', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('BW', 'Botswana', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('BY', 'Belarus', 0, 'Previously named "Byelorussian S.S.R." Code taken from "Byelorussia", its former name', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('BZ', 'Belize', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('CA', 'Canada', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('CC', 'Cocos (Keeling) Islands', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('CD', 'Congo, the Democratic Republic of the', 0, 'Previously named "Zaire" ZR', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('CF', 'Central African Republic', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('CG', 'Congo', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('CH', 'Switzerland', 0, 'Code taken from "Confoederatio Helvetica", its official Latin name', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('CI', 'C\xF4te d''Ivoire', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('CK', 'Cook Islands', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('CL', 'Chile', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('CM', 'Cameroon', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('CN', 'China', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('CO', 'Colombia', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('CR', 'Costa Rica', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('CU', 'Cuba', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('CV', 'Cape Verde', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('CX', 'Christmas Island', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('CY', 'Cyprus', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('CZ', 'Czech Republic', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('DE', 'Germany', 1, 'Code taken from "Deutschland", its German name', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('DJ', 'Djibouti', 0, 'Previously named "French Territory of the Afars and the Issas" AI', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('DK', 'Denmark', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('DM', 'Dominica', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('DO', 'Dominican Republic', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('DZ', 'Algeria', 0, 'Code taken from "Ledzayer", its Berber name', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('EC', 'Ecuador', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('EE', 'Estonia', 1, 'Code taken from "Eesti", its Estonian name', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('EG', 'Egypt', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('EH', 'Western Sahara', 0, 'Previously named "Spanish Sahara" Code taken from "S\xE1hara Espa\xF1ol", its former Spanish name', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('ER', 'Eritrea', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('ES', 'Spain', 1, 'Includes Canary Islands, Ceuta and Melilla, Code taken from "Espa\xF1a", its Spanish name', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('ET', 'Ethiopia', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('FI', 'Finland', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('FJ', 'Fiji', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('FK', 'Falkland Islands (Malvinas)', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('FM', 'Micronesia, Federated States of', 0, 'Previously named "Micronesia"', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('FO', 'Faroe Islands', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('FR', 'France', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('GA', 'Gabon', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('GB', 'United Kingdom', 1, 'Code taken from "Great Britain", part of the United Kingdom', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('GD', 'Grenada', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('GE', 'Georgia', 0, 'GE previously represented Gilbert and Ellice Islands', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('GF', 'French Guiana', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('GG', 'Guernsey', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('GH', 'Ghana', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('GI', 'Gibraltar', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('GL', 'Greenland', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('GM', 'Gambia', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('GN', 'Guinea', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('GP', 'Guadeloupe', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('GQ', 'Equatorial Guinea', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('GR', 'Greece', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('GS', 'South Georgia and the South Sandwich Islands', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('GT', 'Guatemala', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('GU', 'Guam', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('GW', 'Guinea-Bissau', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('GY', 'Guyana', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('HK', 'Hong Kong', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('HM', 'Heard Island and McDonald Islands', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('HN', 'Honduras', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('HR', 'Croatia', 0, 'Code taken from "Hrvatska", its Croatian name', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('HT', 'Haiti', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('HU', 'Hungary', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('ID', 'Indonesia', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('IE', 'Ireland', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('IL', 'Israel', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('IM', 'Isle of Man', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('IN', 'India', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('IO', 'British Indian Ocean Territory', 0, 'Includes Diego Garcia', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('IQ', 'Iraq', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('IR', 'Iran, Islamic Republic of', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('IS', 'Iceland', 0, 'Code taken from "\xCDsland", its Icelandic name', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('IT', 'Italy', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('JE', 'Jersey', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('JM', 'Jamaica', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('JO', 'Jordan', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('JP', 'Japan', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('KE', 'Kenya', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('KG', 'Kyrgyzstan', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('KH', 'Cambodia', 0, 'Previously named "Kampuchea", Code taken from "Kampuchea", its former name', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('KI', 'Kiribati', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('KM', 'Comoros', 0, 'Code taken from "Komori", its Comorian name', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('KN', 'Saint Kitts and Nevis', 0, 'Previously named "Saint Kitts-Nevis-Anguilla"', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('KP', 'Korea, Democratic People''s Republic of', 0, 'i.e., North Korea', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('KR', 'Korea, Republic of''', 0, 'i.e., South Korea', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('KW', 'Kuwait', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('KY', 'Cayman Islands', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('KZ', 'Kazakhstan', 0, 'Previously named "Kazakstan"', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('LA', 'Lao People''s Democratic Republic', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('LB', 'Lebanon', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('LC', 'Saint Lucia', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('LI', 'Liechtenstein', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('LK', 'Sri Lanka', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('LR', 'Liberia', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('LS', 'Lesotho', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('LT', 'Lithuania', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('LU', 'Luxembourg', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('LV', 'Latvia', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('LY', 'Libyan Arab Jamahiriya', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('MA', 'Morocco', 0, 'Code taken from "Maroc", its French name', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('MC', 'Monaco', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('MD', 'Moldova, Republic of', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('ME', 'Montenegro', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('MG', 'Madagascar', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('MH', 'Marshall Islands', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('MK', 'Macedonia, the former Yugoslav Republic of', 0, 'Designated as such due to naming dispute, Code taken from "Makedonija", its Macedonian name', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('ML', 'Mali', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('MM', 'Myanmar', 0, 'Previously named "Burma" BU', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('MN', 'Mongolia', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('MO', 'Macao', 0, 'Previously named "Macau"', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('MP', 'Northern Mariana Islands', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('MQ', 'Martinique', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('MR', 'Mauritania', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('MS', 'Montserrat', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('MT', 'Malta', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('MU', 'Mauritius', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('MV', 'Maldives', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('MW', 'Malawi', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('MX', 'Mexico', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('MY', 'Malaysia', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('MZ', 'Mozambique', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('NA', 'Namibia', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('NC', 'New Caledonia', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('NE', 'Niger', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('NF', 'Norfolk Island', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('NG', 'Nigeria', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('NI', 'Nicaragua', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('NL', 'Netherlands', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('NO', 'Norway', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('NP', 'Nepal', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('NR', 'Nauru', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('NU', 'Niue', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('NZ', 'New Zealand', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('OM', 'Oman', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('PA', 'Panama', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('PE', 'Peru', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('PF', 'French Polynesia', 0, 'Includes Clipperton Island', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('PG', 'Papua New Guinea', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('PH', 'Philippines', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('PK', 'Pakistan', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('PL', 'Poland', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('PM', 'Saint Pierre and Miquelon', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('PN', 'Pitcairn', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('PR', 'Puerto Rico', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('PS', 'Palestinian Territory, Occupied', 0, 'Consisting of the West Bank and the Gaza Strip', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('PT', 'Portugal', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('PW', 'Palau', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('PY', 'Paraguay', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('QA', 'Qatar', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('RE', 'R\xE9union', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('RO', 'Romania', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('RS', 'Serbia', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('RU', 'Russian Federation', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('RW', 'Rwanda', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('SA', 'Saudi Arabia', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('SB', 'Solomon Islands', 0, 'Code taken from "British Solomon Islands", its former name', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('SC', 'Seychelles', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('SD', 'Sudan', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('SE', 'Sweden', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('SG', 'Singapore', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('SH', 'Saint Helena', 0, 'Includes Ascension Island and Tristan da Cunha', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('SI', 'Slovenia', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('SJ', 'Svalbard and Jan Mayen', 0, 'Consisting of Svalbard and Jan Mayen', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('SK', 'Slovakia', 1, 'SK previously represented Sikkim', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('SL', 'Sierra Leone', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('SM', 'San Marino', 1, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('SN', 'Senegal', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('SO', 'Somalia', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('SR', 'Suriname', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('ST', 'Sao Tome and Principe', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('SV', 'El Salvador', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('SY', 'Syrian Arab Republic', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('SZ', 'Swaziland', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('TC', 'Turks and Caicos Islands', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('TD', 'Chad', 0, 'Code taken from "Tchad", its French name', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('TF', 'French Southern Territories', 0, 'Covers the current jurisdiction of the French Southern and Antarctic Lands except Ad\xE9lie Land', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('TG', 'Togo', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('TH', 'Thailand', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('TJ', 'Tajikistan', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('TK', 'Tokelau', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('TL', 'Timor-Leste', 0, 'Previously used the code TP, Previously named "East Timor"', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('TM', 'Turkmenistan', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('TN', 'Tunisia', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('TO', 'Tonga', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('TR', 'Turkey', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('TT', 'Trinidad and Tobago', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('TV', 'Tuvalu', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('TW', 'Taiwan, Province of China', 0, 'Covers the current jurisdiction of the Republic of China except Kinmen and Lienchiang, Designated as such due to its political status within the UN', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('TZ', 'Tanzania, United Republic of', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('UA', 'Ukraine', 0, 'Previously named "Ukrainian S.S.R."', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('UG', 'Uganda', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('UM', 'United States Minor Outlying Islands', 0, 'Consisting of Baker Island, Howland Island, Jarvis Island, Johnston Atoll, Kingman Reef, Midway Atoll, Navassa Island, Palmyra Atoll, and Wake Island', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('US', 'United States', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('UY', 'Uruguay', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('UZ', 'Uzbekistan', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('VA', 'Holy See (Vatican City State)', 0, 'Administered by the Holy See, Previously named "Vatican City State (Holy See)"', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('VC', 'Saint Vincent and the Grenadines', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('VE', 'Venezuela', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('VG', 'Virgin Islands, British', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('VI', 'Virgin Islands, U.S.', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('VN', 'Viet Nam', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('VU', 'Vanuatu', 0, 'Previously named "New Hebrides" NH', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('WF', 'Wallis and Futuna', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('WS', 'Samoa', 0, 'Code taken from "Western Samoa", its former name', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('YE', 'Yemen', 0, 'Previously named "Yemen, Republic of"', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('YT', 'Mayotte', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('ZA', 'South Africa', 0, 'Code taken from "Zuid-Afrika", its Dutch name', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('ZM', 'Zambia', 0, NULL, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1), - ('ZW', 'Zimbabwe', 0, 'Previously named "Rhodesia" RH', CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1); Modified: trunk/library/configs/db/tables/gems__respondents.30.sql =================================================================== --- trunk/library/configs/db/tables/gems__respondents.30.sql 2011-10-11 12:59:41 UTC (rev 88) +++ trunk/library/configs/db/tables/gems__respondents.30.sql 2011-10-11 15:59:49 UTC (rev 89) @@ -49,8 +49,7 @@ grs_zipcode varchar(10) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', grs_city varchar(40) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', -- grs_region varchar(40) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', - grs_iso_country char(2) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' - not null default 'NL' references gems__countries (gct_code), + grs_iso_country char(2) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null default 'NL', grs_phone_1 varchar(25) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', -- grs_phone_2 varchar(25) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', -- grs_phone_3 varchar(25) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |