Source: site.view [edit]
Function name: intents
Arguments: intent
Description:
Page type: html
Render function:  
Module: demavu

Page source:

<webl>
WubCall("demavu.top", []);</webl> 

        <!-- partial -->
        <div class="main-panel">
          <div class="content-wrapper">


            <div class="row">
              <div class="col-sm-12 grid-margin">
                <div class="card">
                  <div class="card-body">
                    <h5>Intent</h5>
                    <div class="row">
                      <div class="col-8 col-sm-12 col-xl-8 my-auto">
                        <div id="divIcon" class="preview-icon">
                          <i class="bg-success <webl>WubCall("demavu.data2", ["-","-","games","-","intents",intent,"icon"]);</webl>"></i>
                        </div>
                        <small class="text-muted"><a onclick="addHtmlBefore('divIcon','<input id=&quot;editIcon&quot; type=&quot;text&quot; class=&quot;form-control editable&quot; title=&quot;-,games,-,intents,<webl>intent</webl>,icon&quot; value=&quot;<webl>WubCall("demavu.data2", ["-","-","games","-","intents",intent,"icon"])</webl>&quot;> <a href=&quot;/pages/icons/mdi.html&quot; target=&quot;_blank&quot;>Icon list</a>')">(Edit Icon)</a></small>

                        <h1 id="name" class="mb-0"><webl>WubCall("demavu.data2", ["-","-","games","-","intents",intent,"name"]);</webl></h1>
                        <small class="text-muted"><a onclick="addHtmlBefore('name','<input id=&quot;editName&quot; type=&quot;text&quot; class=&quot;form-control editable&quot; title=&quot;-,games,-,intents,<webl>intent</webl>,name&quot; value=&quot;<webl>WubCall("demavu.data2", ["-","-","games","-","intents",intent,"name"])</webl>&quot;>')">(Edit Name)</a></small>
                      </div>
                    </div>
                  </div>
                </div>

                <div class="card">
                  <div class="card-body">

                    <h5>Description</h5>
                    <div class="form-group">
                      <textarea class="form-control editable" title="-,games,-,intents,<webl>intent</webl>,description" id="description" rows="8"><webl>WubCall("demavu.data2", ["-","-","games","-","intents",intent,"description"]);</webl></textarea>
                    </div>

                    <h5>Arguments</h5>
<webl>

   var args = WubCall("demavu.data2", ["-","-","games","-","intents",intent,"arguments","*","expectedValue"]);
   var s = "";
   var i = 1;
   if Listp(args) and Size(args) > 0 then
      every arg in Sort(args, fun(a, b) if a.lev6 > b.lev6 then 1 elsif a.lev6 == b.lev6 then 0 else -1 end end) do
         var name = WubCall("demavu.data2", ["-","-","games","-","intents",intent,"arguments",arg.lev6,"name"]);

                         s = s + `
                    <div class="form-group row">
                        <label for="arg.` + ToString(i) + `" class="col-sm-3 col-form-label">Argument</label>
                        <div class="col-sm-9">
                             <input type="txtArgument" class="form-control editable" 
                                    title="-,games,-,intents,` + intent + `,arguments,` + arg.lev6 + `,name" id="arg.` + ToString(i) + `" placeholder="Argument" 
                                     value="` + name + `">
                        </div>
                    </div>
                    <div class="form-group row"> 
                         <label for="argExpVal.` + ToString(i) + `" class="col-sm-3 col-form-label">ExpectedValue</label>
                         <div class="col-sm-9">
                             <input type="txtExpected" class="form-control editable" placeholder="Expected Args" 
                                    title="-,games,-,intents,` + intent + `,arguments,` + arg.lev6 + `,expectedValue" id="argExpVal.` + ToString(i) + 
                                    `" placeholder="Expected Value" 
                                    value="` + arg.value + `">
                         </div>
                    </div>`;
                         i = i + 1;
      end
   end;

   var newS = `<div class="form-group row"><label for="Zarg.` + ToString(i) + `" class="col-sm-3 col-form-label">Argument</label><div class="col-sm-9"><input type="txtArgument" class="form-control editable" title="-,games,-,intents,` 
               + intent + `,arguments,Zarg` + ToString(i) + `,name" id="Zarg.` + ToString(i) + `" placeholder="Argument Name" value=""></div></div><div class="form-group row"><label for="ZargExpVal.` 
               + ToString(i) + `" class="col-sm-3 col-form-label">ExpectedValue</label><div class="col-sm-9"><input type="txtExpected" class="form-control editable" placeholder="Expected Args" title="-,games,-,intents,` 
               + intent + `,arguments,Zarg` + ToString(i) + `,expectedValue" id="ZargExpVal.` + ToString(i) + `" placeholder="Expected Value" value=""></div></div>`;

   newS = Wub_ReplaceAll(newS, `"`, `&quot;`);
   s = s + `
                  <li id="addBefore" class="nav-item dropdown d-none d-lg-block">
                     <a class="nav-link btn btn-primary create-new-button" id="addVariationBtn" data-toggle="dropdown" aria-expanded="false" 
                        onclick="addHtmlBefore('addBefore', '` + newS + `')">+Add</a>
                  </li>`;
   s;

</webl>


                    <p>&nbsp;</p>
                    <div class="form-group">
                      <label for="exampleSelectGender">Priority</label>
                      <select class="form-control editable" title="-,games,-,intents,<webl>intent</webl>,priority" id="priority">
                <webl>
                   var s = "";
                   var priority = WubCall("demavu.data2", ["-","-","games","-","intents",intent,"priority"]);
                   var i = 1;
                   while i < 5 do
                      s = s + "<option";
                      if ToString(i) == ToString(priority) then
                         s = s + " selected"
                      end;
                      s = s + ">" + ToString(i) + "</option>\n";
                      i = i + 1
                   end;
                   s; 
                   </webl>
                      </select>
                    </div>
                  </div>
                </div>

              </div>

            </div>
          </div>
          <!-- content-wrapper ends -->

<webl>WubCall("demavu.footer", []);</webl>