Changeset 165 for Dev/trunk/js


Ignore:
Timestamp:
11/22/11 18:10:47 (13 years ago)
Author:
fpvanagthoven
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/js/sequencerScripts.js

    r164 r165  
    2525}
    2626
     27/*
    2728function SubmitToolbox() {
    2829    document.forms['toolbox'].submit();
     30}
     31*/
     32function SubmitToolbox(type) {
     33    var c = "objectToCreate="+type;
     34    var u = "createObject.php";
     35    var a = true;
     36    var pipeline = document.getElementById("pipelineStringField");
     37    var pipelineType = document.getElementById("pipelineTypeField");
     38    var pipelineUpdated = document.getElementById("pipelineUpdatedField");
     39   
     40    newAjaxRequest(c, u, function(result){
     41        var resultUid = result.responseText;
     42        console.log(resultUid);
     43        console.log("lol");
     44        console.log(resultUid);
     45        pipeline.value += ","+resultUid;
     46        pipelineType += ","+type;
     47        pipelineUpdated += ",0";
     48        updateSequencer();
     49    }, a);
    2950}
    3051
     
    138159 */
    139160
    140 function ajaxStepRequest(UIDS) {
     161function ajaxStepRequest(UIDS, types) {
    141162    var c = "uids="+UIDS;
     163    if (types != "") {
     164        c += "&types="+types;
     165    }
    142166    var u = "returnStep.php";
    143167    newAjaxRequest(c, u, function(result) {
     
    158182    var content = document.getElementById("seqContent");
    159183    var pipeline = document.getElementById("pipelineStringField").value;
     184    var pipelineTypes = document.getElementById("pipelineTypeField").value;
    160185    pipeline = pipeline.replace(/,/g , ",divider,");    //regex search for commas, global (repeat), to represent them with visual dividers.
    161     ajaxStepRequest(pipeline);
     186    pipelineTypes = pipelineTypes.replace(/,/g, ",divider,");
     187    ajaxStepRequest(pipeline, pipelineTypes);
    162188}
    163189
     
    261287        newUpdatedString += plUpdated[i]+",";
    262288    }
    263     alert(newUpdatedString+": OLD");
    264289    if (newUpdatedString.substring(newUpdatedString.length-1) == ",") {
    265290        newUpdatedString = newUpdatedString.substring(0, newUpdatedString.length-1);
    266291    }
    267     alert(newUpdatedString+": NEW!");
     292   
    268293   
    269294    document.getElementById("pipelineUpdatedField").value = newUpdatedString;
Note: See TracChangeset for help on using the changeset viewer.