Skip to content

Commit

Permalink
Merge pull request #310 from zeckdude/button-data-attributes-example
Browse files Browse the repository at this point in the history
Add Examples of data attributes on buttons
  • Loading branch information
nakupanda authored Dec 15, 2016
2 parents 2b9fcd4 + 09ae129 commit 2ead628
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ <h3>Buttons</h3>
label: 'Button 2',
// no title as it is optional
cssClass: 'btn-primary',
data: {
js: 'btn-confirm',
'user-id': '3'
},
action: function(){
alert('Hi Orange!');
}
Expand Down Expand Up @@ -996,7 +1000,11 @@ <h2>Available options</h2>
id: 'btn-ok',
icon: 'glyphicon glyphicon-check',
label: 'OK',
cssClass: 'btn-primary',
cssClass: 'btn-primary',
data: {
js: 'btn-confirm',
'user-id': '3'
},
autospin: false,
action: function(dialogRef){
dialogRef.close();
Expand All @@ -1007,7 +1015,8 @@ <h2>Available options</h2>
<strong>id</strong>: optional, if id is set, you can use dialogInstance.getButton(id) to get the button later. <br />
<strong>icon</strong>: optional, if set, the specified icon will be added to the button. <br />
<strong>cssClass</strong>: optional, additional css class to be added to the button. <br />
<strong>autospin</strong>: optinal, if it's true, after clicked the button a spinning icon appears. <br />
<strong>data</strong>: optional, object containing data attributes to be added to the button. <br />
<strong>autospin</strong>: optional, if it's true, after clicked the button a spinning icon appears. <br />
<strong>action</strong>: optional, if provided, the callback will be invoked after the button is clicked, and the dialog instance will be passed to the callback function.
</td>
</tr>
Expand Down

0 comments on commit 2ead628

Please # to comment.