Skip to content

Latest commit

 

History

History
93 lines (85 loc) · 1.68 KB

README.md

File metadata and controls

93 lines (85 loc) · 1.68 KB

Backbone Vertebres

Includes the following ui patterns:

DialogView

An extensible, reusable, customizable dialog view built on top of Twitter bootstrap modals plugin.

###requirements

  • jQuery >= 1.7.1
  • Bootstrap modal plugin

###options

Param name Type Description
customClass String A custom class to be attached to the DOM
title String The dialog title
message String The dialog message
buttons Array An array holding buttons that fires callbacks
onAction Function Callback invoked when user click buttons. It passes the event object
var options = {
  buttons : [{'label' : 'ok', 'class' : 'primary'}]
}

###example var dialog = DialogView.show('title', { onAction : function(ev) { console.log(ev.currentTarget.className) } }) dialog.title('reset the title') dialog.message('reset the message') dialog.close() // close the dialog