|
@@ -1,8 +1,7 @@
|
|
|
|
|
|
rectID = 0;
|
|
|
colors = ["#edd400","#73d216","#cc0000","#f57900","#3465a4","#c17d11","#75507b","#fce94f","#8ae234","#ef2929","#fcaf3e","#729fcf","#eeeeec","#e9b96e","#ad7fa8","#888a85","#c4a000","#4e9a06","#a40000","#ce5c00","#204a87","#babdb6","#8f5902","#5c3566","#2e3436"].map(i => i + "70"); //Tango Colors with opacity
|
|
|
-abk = [];
|
|
|
-fullpattern = [];
|
|
|
+
|
|
|
|
|
|
function addRectangle(){
|
|
|
addRectangle1("", 0,0,1000,100)
|
|
@@ -259,50 +258,7 @@ function addRectangle1(id,x,y,w,h,pattern,idtext,assignmentsstation,assignments)
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-function createPatternForm(){
|
|
|
- /* Load pattern config */
|
|
|
- //Create form for WAS/Stations/Pattern and WAS/Slicer
|
|
|
-
|
|
|
- var populate = ["FormPattern","FormPattern2","FormPatternAssignment"]
|
|
|
-
|
|
|
- var first = true;
|
|
|
- populate.forEach(function(populate2){
|
|
|
- $.getJSON( "../server/json/ProductCode.json", function( data ) {
|
|
|
- fullpattern = data;
|
|
|
- $.each( data["pattern"], function(i, item){
|
|
|
- var clone = document.importNode(document.querySelector('#PatternFormInit').content,true);
|
|
|
- $('[data-class=Name]',clone).text(item["name"]);
|
|
|
- $('[data-class=Abkürzung]',clone).text(item["abk"]);
|
|
|
- if(first)
|
|
|
- abk.push(item["abk"])
|
|
|
- $('[data-class=Optionen]',clone).attr("name",item["abk"])
|
|
|
- $.each( item["types"], function(i, item){
|
|
|
- $('[data-class=Optionen]',clone).append('<option value="' + item +'">' + item +'</option>');
|
|
|
- });
|
|
|
- $('[data-class=Optionen]',clone).attr("id", populate2 + "_Form_" + item["abk"]);
|
|
|
-
|
|
|
- $('#' + populate2).append(clone);
|
|
|
- });
|
|
|
- //Add "Text" to abk to show it within rects
|
|
|
- first = false;
|
|
|
-
|
|
|
- //on Patternform2 change trigger assignment default reset
|
|
|
- if(populate2 == "FormPattern2"){
|
|
|
- abk.forEach(function(localabk){
|
|
|
- $("#FormPattern2_Form_" + localabk).change(refreshassignments);
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- abk.length = 0;
|
|
|
-
|
|
|
- //get Save locations
|
|
|
- $.getJSON( "../server/json/SlicerConfig.json", function( data ) {
|
|
|
- $.each( data["saveLocation"], function(i, item){
|
|
|
- $("#savelocation").append('<option value="' + item +'">' + item +'</option>');
|
|
|
- });
|
|
|
- });
|
|
|
-}
|
|
|
+
|
|
|
|
|
|
function updateSlicerPatternForm(){
|
|
|
|