From c248a977f40da666a69eeec4df7abb87a21fe9db Mon Sep 17 00:00:00 2001 From: Flo Edelmann Date: Fri, 13 Oct 2017 09:15:55 +0200 Subject: [PATCH 01/17] Link to Open Fixture Library closes #127 --- templates/display_model.tmpl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/display_model.tmpl b/templates/display_model.tmpl index 51663ca8..87f7162d 100644 --- a/templates/display_model.tmpl +++ b/templates/display_model.tmpl @@ -47,6 +47,10 @@ {% endif %} + + Fixture definitions + View in Open Fixture Library +
-{% endblock %} \ No newline at end of file +{% endblock %} From 065aabda84d1b2cfb123be2167028ee502b3137b Mon Sep 17 00:00:00 2001 From: Florian Edelmann Date: Sun, 15 Oct 2017 21:03:01 +0200 Subject: [PATCH 02/17] add links to each OFL mode --- js_src/app.js | 20 +++++++++++++++++--- templates/display_model.tmpl | 4 +++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/js_src/app.js b/js_src/app.js index ceb9d729..95f55e51 100644 --- a/js_src/app.js +++ b/js_src/app.js @@ -25,10 +25,12 @@ goog.require('app.MessageStructure'); goog.provide('app.setup'); -var app = app || {} +var app = app || {}; -// Empty list, this is populated in the page -app.SOFTWARE_VERSIONS = [] +// These are populated in the page +app.MANUFACTURER_ID = null; +app.MODEL_ID = null; +app.SOFTWARE_VERSIONS = []; /** * Sort hex values @@ -112,6 +114,15 @@ app.makeModelTable = function(table_id) { goog.exportSymbol('app.makeModelTable', app.makeModelTable); +/** + * Set manufacturer and model ID + */ +app.setIds = function(manufacturer_id, model_id) { + app.MANUFACTURER_ID = manufacturer_id; + app.MODEL_ID = model_id; +}; +goog.exportSymbol('app.setIds', app.setIds); + /** * Set the software versions */ @@ -143,6 +154,8 @@ app.changeSoftwareVersion = function(element) { goog.dom.removeChildren(tbody); for (var i = 0; i < personalities.length; ++i) { var personality = personalities[i]; + var oflLink = 'https://open-fixture-library.herokuapp.com/rdm?manufacturerId=' + app.MANUFACTURER_ID + '&modelId=' + app.MODEL_ID + '&personalityIndex=' + personality['index'] + '&source=olp'; + var tr = goog.dom.createDom('tr'); // add the cells goog.dom.appendChild(tr, app.newTD(personality['index'])); @@ -152,6 +165,7 @@ app.changeSoftwareVersion = function(element) { goog.dom.appendChild(tr, app.newTD('Unknown')); } goog.dom.appendChild(tr, app.newTD(personality['description'])); + goog.dom.appendChild(tr, app.newTD('View in Open Fixture Library')); goog.dom.appendChild(tbody, tr); } app.showBlock(personality_fieldset); diff --git a/templates/display_model.tmpl b/templates/display_model.tmpl index 87f7162d..925b7aad 100644 --- a/templates/display_model.tmpl +++ b/templates/display_model.tmpl @@ -48,7 +48,7 @@ {% endif %} - Fixture definitions + Fixture definition View in Open Fixture Library @@ -84,6 +84,7 @@ Index Slot Count Description + Channel List @@ -137,6 +138,7 @@ }(document, 'script', 'facebook-jssdk'));