Update pull request, mostly whitespace and comments.

This commit is contained in:
Dan LaLiberte
2016-05-06 10:35:05 -04:00
parent 73953e9e53
commit f28928db83
8 changed files with 9 additions and 24 deletions

View File

@@ -650,7 +650,6 @@ Blockly.Blocks['lists_sort'] = {
*/
init: function() {
this.jsonInit({
"id": "list_sort",
"message0": Blockly.Msg.LISTS_SORT_TITLE,
"args0": [
{
@@ -676,8 +675,6 @@ Blockly.Blocks['lists_sort'] = {
"check": "Array"
}
],
//"previousStatement": null,
//"nextStatement": null,
"output": "Array",
"colour": Blockly.Blocks.lists.HUE,
"tooltip": Blockly.Msg.LISTS_SORT_TOOLTIP,

View File

@@ -311,12 +311,12 @@ Blockly.JavaScript['lists_sort'] = function(block) {
['function ' + Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_ +
'(type, direction) {',
' var compareFuncs = {',
' "NUMERIC": function(a, b) { ',
' return parseFloat(a) - parseFloat(b); }, ',
' "NUMERIC": function(a, b) {',
' return parseFloat(a) - parseFloat(b); },',
' "TEXT": function(a, b) {',
' return a.toString().localeCompare(b.toString(), "en"); },',
' "IGNORE_CASE": function(a, b) {',
' return a.toString().localeCompare(b.toString(), "en", ',
' return a.toString().localeCompare(b.toString(), "en",',
' {"sensitivity": "base"}); },',
' };',
' var compare = compareFuncs[type];',

View File

@@ -352,7 +352,7 @@ Blockly.Lua['lists_sort'] = function(block) {
'end']);
var code = functionName +
'(' + listCode + ',"' + type + '", ' + direction + ')';
'(' + listCode + ',"' + type + '", ' + direction + ')';
return [code, Blockly.Lua.ORDER_HIGH];
};

View File

@@ -380,7 +380,7 @@ Blockly.PHP['lists_sort'] = function(block) {
' return $list2;',
'}']);
var sortCode = functionName +
'(' + listCode + ', "' + type + '", ' + direction + ')';
'(' + listCode + ', "' + type + '", ' + direction + ')';
return [sortCode, Blockly.PHP.ORDER_FUNCTION_CALL];
};

View File

@@ -337,7 +337,7 @@ Blockly.Python['lists_sort'] = function(block) {
]);
var code = sortFunctionName +
'(' + listCode + ', "' + type + '", ' + reverse + ')';
'(' + listCode + ', "' + type + '", ' + reverse + ')';
return [code, Blockly.Python.ORDER_FUNCTION_CALL];
};

View File

@@ -975,12 +975,12 @@ Blockly.Msg.LISTS_GET_SUBLIST_TAIL = '';
/// [[File:Blockly-get-sublist.png]]
Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP = 'Creates a copy of the specified portion of a list.';
/// url - Infomation describing sorting a list.
/// url - Information describing sorting a list.
Blockly.Msg.LISTS_SORT_HELPURL = 'https://github.com/google/blockly/wiki/Lists#sorting-a-list';
/// Sort as type %1 (numeric or alphabetic) in order %2 a list of items %1.
/// Sort as type %1 (numeric or alphabetic) in order %2 (ascending or descending) a list of items %3.
Blockly.Msg.LISTS_SORT_TITLE = 'sort %1 %2 %3';
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#sorting-a-list].
Blockly.Msg.LISTS_SORT_TOOLTIP = 'Sort a list.';
Blockly.Msg.LISTS_SORT_TOOLTIP = 'Sort a copy of a list.';
/// sorting order or direction from low to high value for numeric, or A-Z for alphabetic.
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = 'ascending';
/// sorting order or direction from high to low value for numeric, or Z-A for alphabetic.

View File

@@ -1,3 +0,0 @@
files.encoding=UTF-8
site.root.folder=
source.folder=

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.web.clientproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/clientside-project/1">
<name>blockly</name>
</data>
</configuration>
</project>