kopia lustrzana https://github.com/backface/turtlestitch
Merge pull request #1081 from cycomachead/project-sorting
Minor Improvements to Project Open Dialogdev
commit
964a47313f
10
gui.js
10
gui.js
|
@ -5112,7 +5112,10 @@ ProjectDialogMorph.prototype.setSource = function (source) {
|
||||||
this.projectList = [];
|
this.projectList = [];
|
||||||
SnapCloud.getProjectList(
|
SnapCloud.getProjectList(
|
||||||
function (projectList) {
|
function (projectList) {
|
||||||
myself.installCloudProjectList(projectList);
|
// Don't show cloud projects if user has since switch panes.
|
||||||
|
if (myself.source === 'cloud') {
|
||||||
|
myself.installCloudProjectList(projectList);
|
||||||
|
}
|
||||||
msg.destroy();
|
msg.destroy();
|
||||||
},
|
},
|
||||||
function (err, lbl) {
|
function (err, lbl) {
|
||||||
|
@ -5227,7 +5230,7 @@ ProjectDialogMorph.prototype.getLocalProjectList = function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
projects.sort(function (x, y) {
|
projects.sort(function (x, y) {
|
||||||
return x.name < y.name ? -1 : 1;
|
return x.name.toLowerCase() < y.name.toLowerCase() ? -1 : 1;
|
||||||
});
|
});
|
||||||
return projects;
|
return projects;
|
||||||
};
|
};
|
||||||
|
@ -5240,7 +5243,8 @@ ProjectDialogMorph.prototype.installCloudProjectList = function (pl) {
|
||||||
var myself = this;
|
var myself = this;
|
||||||
this.projectList = pl || [];
|
this.projectList = pl || [];
|
||||||
this.projectList.sort(function (x, y) {
|
this.projectList.sort(function (x, y) {
|
||||||
return x.ProjectName < y.ProjectName ? -1 : 1;
|
return x.ProjectName.toLowerCase() < y.ProjectName.toLowerCase() ?
|
||||||
|
-1 : 1;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.listField.destroy();
|
this.listField.destroy();
|
||||||
|
|
Ładowanie…
Reference in New Issue