Revision dd180620

View differences:

src/sunstone/public/js/plugins/templates-tab.js
1749 1749
            vm_json["CONTEXT"][name]=value;
1750 1750
        });
1751 1751

  
1752
		//placement -> fetch with value
1753
		scope = section_placement;
1754
		addSectionJSON(vm_json,scope);
1752
        //placement -> fetch with value, escape double quotes
1753
        scope = section_placement;
1754
        var requirements = $('input#REQUIREMENTS',scope).val();
1755
        requirements = escapeDoubleQuotes(requirements);
1756
        $('input#REQUIREMENTS',scope).val(requirements);
1757
        var rank = $('input#RANK',scope).val();
1758
        rank = escapeDoubleQuotes(rank);
1759
        $('input#RANK',scope).val(rank);
1760
        addSectionJSON(vm_json,scope);
1755 1761

  
1756 1762
		//raw -> if value set type to driver and fetch
1757 1763
		scope = section_raw;
src/sunstone/public/js/sunstone-util.js
405 405
    return select;
406 406
}
407 407

  
408
//Escape " in a string and return it
409
function escapeDoubleQuotes(string){
410
    string = string.replace(/\\"/g,'"');
411
    return string.replace(/"/g,'\\"');
412
}
413

  
408 414
//functions that used as true and false conditions for testing mainly
409 415
function True(){
410 416
    return true;

Also available in: Unified diff