• download
  • documentation
  • forums
  • demo
  • contact
  • blog

meteora

javascript widgets

Documentation

  • Autocomplete
  • Bubble
  • Calendar
  • Carousel
  • Datagrid
  • Dialog
  • Editor
  • Effect
  • Filebrowser
  • Form
  • Jsonrpc
  • Menu
  • Notebook
  • Picbox
  • Popup
  • Searchlist
  • Selection
  • Spinbutton
  • Tablesort
  • Toolbox
  • Treeview

Widget demo

HTML source

<div id="filebrowser-demo-div" style="width: 500px"></div>

Javascript source

Meteora.uses('Meteora.Filebrowser');
Meteora.onStart(
  function() {
    new Filebrowser(
      'filebrowser-demo-div',
      // This is the server-side script that will
      // feed the Meteora.Filebrowser widget with
      // specially crafted JSON data.
      '/demo/ajax_filebrowser'
    );
  }
);

JSON response

{
  // the current path we are viewing
  path: '/current/path',
  // current path's data
  info: {
    path: '/current/path',
    ext: 'path',
    name: 'path',
    size: 4096,
    type: {
      dir: true,
      file: false,
      link: false
    }
  },
  // files on this path
  files: [
    {
      path: '/current/path/foo.txt',
      ext: 'txt',
      name: 'foo.txt',
      size: 3445,
      type: {
        dir: false,
        file: true,
        link: false
      },
      html: '<a href="...">...</a>'
    },
    {
      path: '/current/path/bar.txt',
      ext: 'txt',
      name: 'bar.txt',
      size: 18872,
      type: {
        dir: false,
        file: true,
        link: false
      },
      html: '<a href="...">...</a>'
    },
    {
      path: '/current/path/more',
      ext: 'more',
      name: 'more',
      size: 4096,
      type: {
        dir: true,
        file: false,
        link: false
      },
      html: '<a href="...">...</a>'
    }
  ]
}

Documentation

If you're looking for more documentation about this widget, you may want to read Meteora.Filebrowser documentation

Copyright © 2007-2009 Astrata Software.