User Tools

Site Tools


recipes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
recipes [2020/06/01 14:43] – [Using recipe on the dashboard] emozolyakrecipes [2021/08/05 13:35] emozolyak
Line 1: Line 1:
 +{{ ::menu-icon-recipes.png?nolink&40|}}
 ======Recipes====== ======Recipes======
  
Line 44: Line 45:
 When placing a recipes selection listbox on a dashboard, there are some specific attributes you must specify: When placing a recipes selection listbox on a dashboard, there are some specific attributes you must specify:
  
-  * //__Category__// of recipes, or a full list.  +  * //Category// of recipes, or a full list.  
-  * The //__register__// accosiated with the dropdown list which will keep the //id// of the selected recipe. +  * The //register// accosiated with the dropdown list which will keep the //id// of the selected recipe. 
   * '//Allow change value//' checkbox. If you want the user be able to expand the list, check it, otherwise the user won't be able to select and expand the list. With unchecked option, the recipes can be itereated with the lua script and extra buttons which return next/previous selection event (register value coding the action)    * '//Allow change value//' checkbox. If you want the user be able to expand the list, check it, otherwise the user won't be able to select and expand the list. With unchecked option, the recipes can be itereated with the lua script and extra buttons which return next/previous selection event (register value coding the action) 
   * '//Apply immediately//' checkbox. The values from the set will be written at once after selection, or you can check register change in a lua script and first do some steps before applying a recipe.    * '//Apply immediately//' checkbox. The values from the set will be written at once after selection, or you can check register change in a lua script and first do some steps before applying a recipe. 
Line 52: Line 53:
 {{ ::recipe_on_the_dashboard.png?direct&600 |}} {{ ::recipe_on_the_dashboard.png?direct&600 |}}
  
-To apply recipes within scripts, the **ApplyRecipe (recipeId, userId)** function is used. [[working_with_recipes|See here]]. After it is executed, if a list is displayed on one of the dashboards, the contents of the recipe from the ApplyRecipe function, you must also write the recipe number in the register tied to the list - to synchronize the display of the list.+If the user has right to edit the recipe, he can do this right in the selectoin box: 
 + 
 +{{ quick_rcp_apply_edit.gif |}} 
 + 
 +===== Using recipes in scripts ===== 
 + 
 +To apply recipes within scripts, the **ApplyRecipe (recipeId, userId)** function is used. [[working_with_recipes|See here]]. The example of such script: 
 + 
 +<code lua> 
 +function main (userId) 
 +    local id = GetReg("rcpSelector"
 +    ApplyRecipe(iduserId) 
 +    AddInfoMessage("The recipe with id = " .. id .. " was applied!"
 +end 
 +</code> 
 + 
 +{{ recipe_in_scripts.gif |}}
recipes.txt · Last modified: 2022/01/15 15:41 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki