HSLayers.FileDialog (class)

class HSLayers.FileDialog(config)

HSLayers File dialog is used for opening the file from local disc as well as from remote servers. The file dialog should be similar to standard desktop file pickers.

param Object config:
 
param String config.url:
 Url, which points to JSON file with available files
param Boolean config.multiSelect:
 indicates, if more then one file can be selected
param String config.action:
 “save” | “open”
param String config.title:
 panel’s title

Example usage:

// initialize the file dialog
     var fd =  new HSLayers.FileDialog({
                             type:"open",
                             title:"Choose Image",
                             url:HSLayers.WMCManager.getImagesURL
                         });
     fd.show();

     // example respones from url:
     {records: [
          {
              id: "id",
              title:"file title",
              abstract: "file absract",
              link: "http://path/to/file,
              imgURL: "http://path/to/icon/url"
          },
          {
                  ....
          }, ...
     ]}

Events

<static>

HSLayers.FileDialog.

open
Called no Save button is clicked
fd.on("open",function(){},this);
param record:
param origin:origin of the file - server or local

<static>

HSLayers.FileDialog.

save
Called no Open button is clicked
fd.on("save",function(){},this);
param record:
param origin:origin of the file - server or local

Main Menu


Table Of Contents

Previous topic

HSLayers.FeaturesGrid (class)

Next topic

HSLayers.Format.Context (class)

This Page