mode

defines the ID of the initially selected mode

string mode;

Values

  • "table"
  • "files"
  • Example

    webix.ui({
        view:"filemanager",
        id:"files",
        mode: "files"
        ...
    });


    Default value:

    "table"
    Details

    You can also define your own "custom" mode and specify its name in the mode property.

    {
        view:"filemanager",
        mode:"list",
        modes:["files","table","list"],
        structure:{
          "list": {
            view: "filelist",
            template: function(obj,common){
              return common.templateIcon(obj,common)+obj.value;
            },
            select: "multiselect",
            // editing options
            editable:true,
            editor:"text",
            editValue:"value",
            // disable editing on double-click
            editaction: false,
            // drag-n-drop
            drag: true,
            // mouse navigation
            navigation: true,
            // tab 'key' navigation
            tabFocus: true,
            // context menu
            onContext:{}
          }
        }
      }

    More detailed information is in the sample below:

    Related sample:  File Manager: Adding New Mode

    Back to top