Permalink
Browse files

Switching to filename suffix for output files.

  • Loading branch information...
1 parent fcdba8c commit 9b2412a664dd724f5462958c6fdfcae3a4de5741 @cpojer cpojer committed Nov 19, 2012
Showing with 4 additions and 16 deletions.
  1. +1 −13 JavaScript/App/OutputFiles.js
  2. +1 −1 JavaScript/Templates.js
  3. +2 −2 Templates/form-new-output-file-detail.handlebars
@@ -64,19 +64,7 @@ var createUIData = exports.createUIData = function(content) {
};
var parseFromContainer = function(container) {
- var outputFiles = API.getInfo('output_files');
- return container.getChildren(':not(.item-removed)').retrieve('value').clean().map(function(outputFile) {
- // Add filename if necessary
- var file = outputFile.filename;
- var endings = outputFiles[outputFile.format].endings;
- var check = function(ending) {
- return file.lastIndexOf('.' + ending) == file.length - 1 - ending.length;
- };
- if (file && endings && !endings.some(check))
- outputFile.filename += '.' + endings[0];
-
- return outputFile;
- });
+ return container.getChildren(':not(.item-removed)').retrieve('value').clean();
};
var showAction = function(object, id) {
@@ -1185,7 +1185,7 @@ function program4(depth0,data) {
stack1 = depth0.has_options;
stack1 = helpers['if'].call(depth0, stack1, {hash:{},inverse:self.noop,fn:self.program(1, program1, data)});
if(stack1 || stack1 === 0) { buffer += stack1; }
- buffer += "\n<li>\n <label class=\"left\">\n <input type=\"text\" name=\"filename\" placeholder=\"optional\" class=\"right\" />\n Filename\n </label>\n</li>\n";
+ buffer += "\n<li>\n <label class=\"left\">\n <input type=\"text\" name=\"suffix\" placeholder=\"optional\" class=\"right\" />\n Suffix\n </label>\n</li>\n";
return buffer;});
templates['form-new-output-file'] = template(function (Handlebars,depth0,helpers,partials,data) {
helpers = helpers || Handlebars.helpers;
@@ -28,7 +28,7 @@
{{/if}}
<li>
<label class="left">
- <input type="text" name="filename" placeholder="optional" class="right" />
- Filename
+ <input type="text" name="suffix" placeholder="optional" class="right" />
+ Suffix
</label>
</li>

0 comments on commit 9b2412a

Please sign in to comment.