From e925f1c3dd7604190796fa06506f847bd220d4af Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 5 Jun 2013 14:12:52 +0100 Subject: [PATCH] Adjust fields widget to sort fields Making it easier to track .tid files under source code control --- core/modules/widgets/fields.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/modules/widgets/fields.js b/core/modules/widgets/fields.js index df2fa73b2..59a3bad2d 100644 --- a/core/modules/widgets/fields.js +++ b/core/modules/widgets/fields.js @@ -37,7 +37,15 @@ FieldsWidget.prototype.generate = function() { // Compose the template var text = []; if(this.template && tiddler) { + var fields = []; for(var fieldName in tiddler.fields) { + if(exclude.indexOf(fieldName) === -1) { + fields.push(fieldName); + } + } + fields.sort(); + for(var f=0; f