Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fix Share reload in user dashboard (losing group sorting)
Browse files Browse the repository at this point in the history
Populate countries list with a json file (new json_file: prefix for choices parameter)
Fix FF search result displaying no result.
Last compile
  • Loading branch information
cdujeu committed Oct 29, 2014
1 parent e28811b commit a1b03a4
Show file tree
Hide file tree
Showing 6 changed files with 269 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/src/plugins/action.share/class.ShareCenter.js
Expand Up @@ -918,7 +918,7 @@ Class.create("ShareCenter", {
conn.onComplete = function(){
if(this._dataModel){
hideLightBox(true);
this._dataModel.requireContextChange(this.currentNode, true);
this._dataModel.requireContextChange(this._dataModel.getRootNode(), true);
return;
}
if(removeRow){
Expand Down
245 changes: 245 additions & 0 deletions core/src/plugins/core.conf/countries.json
@@ -0,0 +1,245 @@
[
{"label": "Afghanistan", "key": "AF"},
{"label": "Åland Islands", "key": "AX"},
{"label": "Albania", "key": "AL"},
{"label": "Algeria", "key": "DZ"},
{"label": "American Samoa", "key": "AS"},
{"label": "Andorra", "key": "AD"},
{"label": "Angola", "key": "AO"},
{"label": "Anguilla", "key": "AI"},
{"label": "Antarctica", "key": "AQ"},
{"label": "Antigua and Barbuda", "key": "AG"},
{"label": "Argentina", "key": "AR"},
{"label": "Armenia", "key": "AM"},
{"label": "Aruba", "key": "AW"},
{"label": "Australia", "key": "AU"},
{"label": "Austria", "key": "AT"},
{"label": "Azerbaijan", "key": "AZ"},
{"label": "Bahamas", "key": "BS"},
{"label": "Bahrain", "key": "BH"},
{"label": "Bangladesh", "key": "BD"},
{"label": "Barbados", "key": "BB"},
{"label": "Belarus", "key": "BY"},
{"label": "Belgium", "key": "BE"},
{"label": "Belize", "key": "BZ"},
{"label": "Benin", "key": "BJ"},
{"label": "Bermuda", "key": "BM"},
{"label": "Bhutan", "key": "BT"},
{"label": "Bolivia", "key": "BO"},
{"label": "Bosnia and Herzegovina", "key": "BA"},
{"label": "Botswana", "key": "BW"},
{"label": "Bouvet Island", "key": "BV"},
{"label": "Brazil", "key": "BR"},
{"label": "British Indian Ocean Territory", "key": "IO"},
{"label": "Brunei Darussalam", "key": "BN"},
{"label": "Bulgaria", "key": "BG"},
{"label": "Burkina Faso", "key": "BF"},
{"label": "Burundi", "key": "BI"},
{"label": "Cambodia", "key": "KH"},
{"label": "Cameroon", "key": "CM"},
{"label": "Canada", "key": "CA"},
{"label": "Cape Verde", "key": "CV"},
{"label": "Cayman Islands", "key": "KY"},
{"label": "Central African Republic", "key": "CF"},
{"label": "Chad", "key": "TD"},
{"label": "Chile", "key": "CL"},
{"label": "China", "key": "CN"},
{"label": "Christmas Island", "key": "CX"},
{"label": "Cocos (Keeling) Islands", "key": "CC"},
{"label": "Colombia", "key": "CO"},
{"label": "Comoros", "key": "KM"},
{"label": "Congo", "key": "CG"},
{"label": "Congo, The Democratic Republic of the", "key": "CD"},
{"label": "Cook Islands", "key": "CK"},
{"label": "Costa Rica", "key": "CR"},
{"label": "Cote D\"Ivoire", "key": "CI"},
{"label": "Croatia", "key": "HR"},
{"label": "Cuba", "key": "CU"},
{"label": "Cyprus", "key": "CY"},
{"label": "Czech Republic", "key": "CZ"},
{"label": "Denmark", "key": "DK"},
{"label": "Djibouti", "key": "DJ"},
{"label": "Dominica", "key": "DM"},
{"label": "Dominican Republic", "key": "DO"},
{"label": "Ecuador", "key": "EC"},
{"label": "Egypt", "key": "EG"},
{"label": "El Salvador", "key": "SV"},
{"label": "Equatorial Guinea", "key": "GQ"},
{"label": "Eritrea", "key": "ER"},
{"label": "Estonia", "key": "EE"},
{"label": "Ethiopia", "key": "ET"},
{"label": "Falkland Islands (Malvinas)", "key": "FK"},
{"label": "Faroe Islands", "key": "FO"},
{"label": "Fiji", "key": "FJ"},
{"label": "Finland", "key": "FI"},
{"label": "France", "key": "FR"},
{"label": "French Guiana", "key": "GF"},
{"label": "French Polynesia", "key": "PF"},
{"label": "French Southern Territories", "key": "TF"},
{"label": "Gabon", "key": "GA"},
{"label": "Gambia", "key": "GM"},
{"label": "Georgia", "key": "GE"},
{"label": "Germany", "key": "DE"},
{"label": "Ghana", "key": "GH"},
{"label": "Gibraltar", "key": "GI"},
{"label": "Greece", "key": "GR"},
{"label": "Greenland", "key": "GL"},
{"label": "Grenada", "key": "GD"},
{"label": "Guadeloupe", "key": "GP"},
{"label": "Guam", "key": "GU"},
{"label": "Guatemala", "key": "GT"},
{"label": "Guernsey", "key": "GG"},
{"label": "Guinea", "key": "GN"},
{"label": "Guinea-Bissau", "key": "GW"},
{"label": "Guyana", "key": "GY"},
{"label": "Haiti", "key": "HT"},
{"label": "Heard Island and Mcdonald Islands", "key": "HM"},
{"label": "Holy See (Vatican City State)", "key": "VA"},
{"label": "Honduras", "key": "HN"},
{"label": "Hong Kong", "key": "HK"},
{"label": "Hungary", "key": "HU"},
{"label": "Iceland", "key": "IS"},
{"label": "India", "key": "IN"},
{"label": "Indonesia", "key": "ID"},
{"label": "Iran, Islamic Republic Of", "key": "IR"},
{"label": "Iraq", "key": "IQ"},
{"label": "Ireland", "key": "IE"},
{"label": "Isle of Man", "key": "IM"},
{"label": "Israel", "key": "IL"},
{"label": "Italy", "key": "IT"},
{"label": "Jamaica", "key": "JM"},
{"label": "Japan", "key": "JP"},
{"label": "Jersey", "key": "JE"},
{"label": "Jordan", "key": "JO"},
{"label": "Kazakhstan", "key": "KZ"},
{"label": "Kenya", "key": "KE"},
{"label": "Kiribati", "key": "KI"},
{"label": "Korea, Democratic People\"S Republic of", "key": "KP"},
{"label": "Korea, Republic of", "key": "KR"},
{"label": "Kuwait", "key": "KW"},
{"label": "Kyrgyzstan", "key": "KG"},
{"label": "Lao People\"S Democratic Republic", "key": "LA"},
{"label": "Latvia", "key": "LV"},
{"label": "Lebanon", "key": "LB"},
{"label": "Lesotho", "key": "LS"},
{"label": "Liberia", "key": "LR"},
{"label": "Libyan Arab Jamahiriya", "key": "LY"},
{"label": "Liechtenstein", "key": "LI"},
{"label": "Lithuania", "key": "LT"},
{"label": "Luxembourg", "key": "LU"},
{"label": "Macao", "key": "MO"},
{"label": "Macedonia, The Former Yugoslav Republic of", "key": "MK"},
{"label": "Madagascar", "key": "MG"},
{"label": "Malawi", "key": "MW"},
{"label": "Malaysia", "key": "MY"},
{"label": "Maldives", "key": "MV"},
{"label": "Mali", "key": "ML"},
{"label": "Malta", "key": "MT"},
{"label": "Marshall Islands", "key": "MH"},
{"label": "Martinique", "key": "MQ"},
{"label": "Mauritania", "key": "MR"},
{"label": "Mauritius", "key": "MU"},
{"label": "Mayotte", "key": "YT"},
{"label": "Mexico", "key": "MX"},
{"label": "Micronesia, Federated States of", "key": "FM"},
{"label": "Moldova, Republic of", "key": "MD"},
{"label": "Monaco", "key": "MC"},
{"label": "Mongolia", "key": "MN"},
{"label": "Montserrat", "key": "MS"},
{"label": "Morocco", "key": "MA"},
{"label": "Mozambique", "key": "MZ"},
{"label": "Myanmar", "key": "MM"},
{"label": "Namibia", "key": "NA"},
{"label": "Nauru", "key": "NR"},
{"label": "Nepal", "key": "NP"},
{"label": "Netherlands", "key": "NL"},
{"label": "Netherlands Antilles", "key": "AN"},
{"label": "New Caledonia", "key": "NC"},
{"label": "New Zealand", "key": "NZ"},
{"label": "Nicaragua", "key": "NI"},
{"label": "Niger", "key": "NE"},
{"label": "Nigeria", "key": "NG"},
{"label": "Niue", "key": "NU"},
{"label": "Norfolk Island", "key": "NF"},
{"label": "Northern Mariana Islands", "key": "MP"},
{"label": "Norway", "key": "NO"},
{"label": "Oman", "key": "OM"},
{"label": "Pakistan", "key": "PK"},
{"label": "Palau", "key": "PW"},
{"label": "Palestinian Territory, Occupied", "key": "PS"},
{"label": "Panama", "key": "PA"},
{"label": "Papua New Guinea", "key": "PG"},
{"label": "Paraguay", "key": "PY"},
{"label": "Peru", "key": "PE"},
{"label": "Philippines", "key": "PH"},
{"label": "Pitcairn", "key": "PN"},
{"label": "Poland", "key": "PL"},
{"label": "Portugal", "key": "PT"},
{"label": "Puerto Rico", "key": "PR"},
{"label": "Qatar", "key": "QA"},
{"label": "Reunion", "key": "RE"},
{"label": "Romania", "key": "RO"},
{"label": "Russian Federation", "key": "RU"},
{"label": "RWANDA", "key": "RW"},
{"label": "Saint Helena", "key": "SH"},
{"label": "Saint Kitts and Nevis", "key": "KN"},
{"label": "Saint Lucia", "key": "LC"},
{"label": "Saint Pierre and Miquelon", "key": "PM"},
{"label": "Saint Vincent and the Grenadines", "key": "VC"},
{"label": "Samoa", "key": "WS"},
{"label": "San Marino", "key": "SM"},
{"label": "Sao Tome and Principe", "key": "ST"},
{"label": "Saudi Arabia", "key": "SA"},
{"label": "Senegal", "key": "SN"},
{"label": "Serbia and Montenegro", "key": "CS"},
{"label": "Seychelles", "key": "SC"},
{"label": "Sierra Leone", "key": "SL"},
{"label": "Singapore", "key": "SG"},
{"label": "Slovakia", "key": "SK"},
{"label": "Slovenia", "key": "SI"},
{"label": "Solomon Islands", "key": "SB"},
{"label": "Somalia", "key": "SO"},
{"label": "South Africa", "key": "ZA"},
{"label": "South Georgia and the South Sandwich Islands", "key": "GS"},
{"label": "Spain", "key": "ES"},
{"label": "Sri Lanka", "key": "LK"},
{"label": "Sudan", "key": "SD"},
{"label": "Suriname", "key": "SR"},
{"label": "Svalbard and Jan Mayen", "key": "SJ"},
{"label": "Swaziland", "key": "SZ"},
{"label": "Sweden", "key": "SE"},
{"label": "Switzerland", "key": "CH"},
{"label": "Syrian Arab Republic", "key": "SY"},
{"label": "Taiwan, Province of China", "key": "TW"},
{"label": "Tajikistan", "key": "TJ"},
{"label": "Tanzania, United Republic of", "key": "TZ"},
{"label": "Thailand", "key": "TH"},
{"label": "Timor-Leste", "key": "TL"},
{"label": "Togo", "key": "TG"},
{"label": "Tokelau", "key": "TK"},
{"label": "Tonga", "key": "TO"},
{"label": "Trinidad and Tobago", "key": "TT"},
{"label": "Tunisia", "key": "TN"},
{"label": "Turkey", "key": "TR"},
{"label": "Turkmenistan", "key": "TM"},
{"label": "Turks and Caicos Islands", "key": "TC"},
{"label": "Tuvalu", "key": "TV"},
{"label": "Uganda", "key": "UG"},
{"label": "Ukraine", "key": "UA"},
{"label": "United Arab Emirates", "key": "AE"},
{"label": "United Kingdom", "key": "GB"},
{"label": "United States", "key": "US"},
{"label": "United States Minor Outlying Islands", "key": "UM"},
{"label": "Uruguay", "key": "UY"},
{"label": "Uzbekistan", "key": "UZ"},
{"label": "Vanuatu", "key": "VU"},
{"label": "Venezuela", "key": "VE"},
{"label": "Viet Nam", "key": "VN"},
{"label": "Virgin Islands, British", "key": "VG"},
{"label": "Virgin Islands, U.S.", "key": "VI"},
{"label": "Wallis and Futuna", "key": "WF"},
{"label": "Western Sahara", "key": "EH"},
{"label": "Yemen", "key": "YE"},
{"label": "Zambia", "key": "ZM"},
{"label": "Zimbabwe", "key": "ZW"}
]
2 changes: 1 addition & 1 deletion core/src/plugins/core.conf/manifest.xml
Expand Up @@ -21,7 +21,7 @@
defaultImage="plugins/core.conf/default_avatar.png"
/>
<param name="email" scope="user" description="CONF_MESSAGE[Address used for notifications]" label="CONF_MESSAGE[Email]" type="string" expose="true" editable="true"/>
<param name="country" scope="role,user" description="CONF_MESSAGE[Country]" label="CONF_MESSAGE[Country]" type="select" choices="fr|France,uk|United Kingdom,de|Germany,nl|Nederland,us|USA" expose="true" editable="true"/>
<param name="country" scope="role,user" description="CONF_MESSAGE[Country]" label="CONF_MESSAGE[Country]" type="select" choices="json_file:plugins/core.conf/countries.json" expose="true" editable="true"/>
<param name="lang" scope="role,user" description="CONF_MESSAGE[User Language]" label="CONF_MESSAGE[Language]" type="select" choices="AJXP_AVAILABLE_LANGUAGES" expose="true" editable="true"/>
<param name="DEFAULT_START_REPOSITORY" scope="role,user,group" description="CONF_MESSAGE[Default start repository]" label="CONF_MESSAGE[Default repository]" type="select" default="ajxp_home" choices="AJXP_AVAILABLE_REPOSITORIES" expose="true" editable="true"/>
<param name="USER_LOCK_ACTION" scope="role,group" description="CONF_MESSAGE[If set, this action will be triggered automatically at users login. Can be logout (to lock out the users), pass_change (to force password change), or anything else]" label="CONF_MESSAGE[Users Lock Action]" type="string" default=""/>
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer.js

Large diffs are not rendered by default.

20 changes: 19 additions & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer/class.FormManager.js
Expand Up @@ -205,11 +205,14 @@ Class.create("FormManager", {
element = element + '<input type="radio" data-ajxp_type="'+type+'" class="SF_box" name="'+name+'" id="'+name+'-false" '+(selectFalse?'checked':'')+' value="false"'+disabledString+'><label for="'+name+'-false">'+MessageHash[441] + '</label>';
element = '<div class="SF_input">'+element+'</div>';
}else if(type == 'select'){
var choices, json_list;
var choices, json_list, json_file;
if(Object.isString(param.get("choices"))){
if(param.get("choices").startsWith("json_list:")){
choices = ["loading|"+MessageHash[466]+"..."];
json_list = param.get("choices").split(":")[1];
}else if(param.get("choices").startsWith("json_file:")){
choices = ["loading|"+MessageHash[466]+"..."];
json_file = param.get("choices").split(":")[1];
}else if(param.get("choices") == "AJXP_AVAILABLE_LANGUAGES"){
var object = window.ajxpBootstrap.parameters.get("availableLanguages");
choices = [];
Expand Down Expand Up @@ -431,8 +434,23 @@ Class.create("FormManager", {
element.insert(option);
}
}
element.fire("chosen:updated");
};
conn.sendAsync();
}else if(json_file){
var req = new Connexion(json_file);
req.onComplete = function(transport){
element = div.down("select");
if(defaultValue) element.defaultValue = defaultValue;
element.down('option[value="loading"]').remove();
$A(transport.responseJSON).each(function(entry){
var option = new Element('OPTION', {value:entry.key}).update(entry.label);
if(entry.key == defaultValue) option.setAttribute("selected", "true");
element.insert(option);
});
element.fire("chosen:updated");
};
req.sendAsync();
}

if(param.get('replicationGroup')){
Expand Down
Expand Up @@ -373,8 +373,9 @@ SortableTable = Class.create({

for (var i = 0; i < l; i++){
if(groupColIndex){
var fieldValue = this.getRowValue(a[i].element, groupType, groupColIndex).trim();
var fieldValue = this.getRowValue(a[i].element, groupType, groupColIndex);
if(!fieldValue) fieldValue = "N/A";
fieldValue = fieldValue.trim();
var block;
if(blockType == 'tr'){
block = tBody.down( 'tr[data-groupbyvalue="'+fieldValue+'"]');
Expand Down

0 comments on commit a1b03a4

Please sign in to comment.