Like MatrixView?  Try CalendarView!

Features

Examples

Download

MatrixView requires Prototype 1.6 (or later).

You may also access the source code at GitHub.

Release History

Version 1.0.3 — March 27th, 2008

Version 1.0.2 — February 12th, 2008

Version 1.0.1 — November 27th, 2007

Version 1.0.0 — November 16th, 2007

Development Roadmap

The following is a tentative agenda for future development of MatrixView. If you have any feature requests or suggestions, please contact me. Additionally, if you are interested in contributing enhancements to MatrixView, please feel free to submit patches or contact me to request possible repository access.

Version 1.1

Version 2.0 and beyond

Support MatrixView Development

MatrixView is developed in the author's spare time. If you find it to be useful within your web application, please consider making a small donation to support and encourage future development.

Usage Instructions

Options

Option Description
deselectHandler Specify a function will be called when any selection is cleared.
deleteHandler Define a function that will be called upon any captured delete action for any selected items within the view.
openHandler Specify a function that will be called when an item or a selection of items is opened (e.g. by double-click or pressing Enter).
selectHandler Specify a function to be called upon the selection of an item within the view.

Setting up a MatrixView

Example

  <html>
    <head>
      ...
      <script type="text/javascript" href="matrixview.js"></script>
      <script type="text/javascript">
        window.onload = function() {

          var matrixView = new MatrixView(
            $('matrixView'),
            {

              selectHandler : function(photos) {
                selectedItems = window.matrixView.selectedItems.size()
                totalItems    = window.matrixView.element.getElementsBySelector('li').size()
                if (totalItems > 1)
                  $('statusBar').update(selectedItems + ' of ' + totalItems + ' Photos')
                else
                  $('statusBar').update(selectedItems + ' of ' + totalItems + ' Photo')
              },

              deselectHandler : function() {
                totalItems = window.matrixView.element.getElementsBySelector('li').size()
                if (totalItems > 1)
                  $('statusBar').update(totalItems + ' Photos')
                else
                  $('statusBar').update(totalItems + ' Photo')
              },

              openHandler : function(element) {
                alert('No openHandler defined.')
              }

            }
          )
        }
      </script>
      ...
    </head>
    <body>
      ...
    </body>
  </html>
Fork me on GitHub