From 6eab4ff7a68c79cac984c9e9ba3291f4d0e7c5f7 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Mon, 25 Aug 2014 14:35:51 -0700 Subject: [PATCH] Code language nodes that want to skip JavaScript now can. --- app/treema-ext.coffee | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/treema-ext.coffee b/app/treema-ext.coffee index d1f76b9a9..56e91a303 100644 --- a/app/treema-ext.coffee +++ b/app/treema-ext.coffee @@ -37,7 +37,7 @@ class LiveEditingMarkup extends TreemaNode.nodeMap.ace .click(=> filepicker.pick @onFileChosen) ) ) - + addPreviewToggle: (valEl) -> valEl.append($('
').append( $('') @@ -223,7 +223,7 @@ codeLanguages = class CodeLanguagesObjectTreema extends TreemaNode.nodeMap.object childPropertiesAvailable: -> - (key for key in _.keys(codeLanguages) when not @data[key]?) + (key for key in _.keys(codeLanguages) when not @data[key]? and not (key is 'javascript' and @schema.skipJavaScript)) class CodeLanguageTreema extends TreemaNode.nodeMap.string buildValueForEditing: (valEl) -> @@ -316,7 +316,7 @@ class LatestVersionReferenceNode extends TreemaNode input = valEl.find('input') input.focus().keyup @search input.attr('placeholder', @formatDocument(@data)) if @data - + buildSearchURL: (term) -> "#{@url}?term=#{term}&project=true" search: => @@ -351,7 +351,7 @@ class LatestVersionReferenceNode extends TreemaNode getSearchResultsEl: -> @getValEl().find('.treema-search-results') getSelectedResultEl: -> @getValEl().find('.treema-search-selected') - + modelToString: (model) -> model.get('name') formatDocument: (docOrModel) -> @@ -411,7 +411,7 @@ class LatestVersionReferenceNode extends TreemaNode return if @data? selected = @getSelectedResultEl() return not selected.length - + class LevelComponentReferenceNode extends LatestVersionReferenceNode # HACK: this list of properties is needed by the thang components edit view and config views. # need a better way to specify this, or keep the search models from bleeding into those