Permalink
Browse files

Add caret and hover-text options

  • Loading branch information...
bignall committed Oct 5, 2016
1 parent 8c18db1 commit 124bc3dc912eef8566bb9769f8a2785726de2252
Showing with 17 additions and 7 deletions.
  1. +2 −0 README.md
  2. +7 −3 addtocalendar.js
  3. +1 −1 addtocalendar.min.js
  4. +7 −3 addtocalendar/directive.js
View
@@ -79,6 +79,8 @@ For a demo, please [click here](http://jshor.github.io/angular-addtocalendar/dem
| `class-name` | The desired class for the dropdown. See [styling](). | Bootstrap class/plain text. Default `btn btn-sm btn-default dropdown-toggle` | btn btn-sm btn-default dropdown-toggle | No |
| `btn-text` | Text for the button to display | Plain text. Default `Add to calendar` | Add to calendar | No |
| `uib-dropdown` | Whether to use ui-bootstrap dropdown | `null` Default `Add to calendar` | `null` | No |
| `caret` | Whether to use the caret. | String interpreted as boolean Default: `true` | false | No |
| `hover-text` | Text to use as the title of the element. | String Default: value of title attribute | Add to calendar | No |
# Styling
View
@@ -214,11 +214,13 @@ addtocalendar
function getTemplate(prefix) {
return '\
<div class="btn-group dropdown" ' + prefix + ' on-toggle="toggled(open)">\
<div class="btn-group dropdown" ' + prefix + ' on-toggle="toggled(open)" \
title="{{(hoverText == undefined) ? title : hoverText}}">\
<span\
ng-class="className || \'btn btn-sm btn-default ' + prefix + '-toggle\'"\
' + prefix + '-toggle>\
{{(btnText == undefined) ? \'Add to calendar\' : btnText}} <span class="caret"></span>\
{{(btnText == undefined) ? \'Add to calendar\' : btnText}}\
<span ng-if="caret != \'false\'" class="caret"></span>\
</span>\
<ul class="dropdown-menu">\
<li><a ng-click="calendarUrl.dlIcal()" ng-if="calendarUrl.dlIcal">iCalendar</a></li>\
@@ -246,7 +248,9 @@ addtocalendar
description: '@',
location: '@',
className: '@',
btnText: '@'
btnText: '@',
caret: '@',
hoverText: '@'
},
controller: 'AddtocalendarCtrl',
template: resolveTemplate
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -11,11 +11,13 @@ addtocalendar
function getTemplate(prefix) {
return '\
<div class="btn-group dropdown" ' + prefix + ' on-toggle="toggled(open)">\
<div class="btn-group dropdown" ' + prefix + ' on-toggle="toggled(open)" \
title="{{(hoverText == undefined) ? title : hoverText}}">\
<span\
ng-class="className || \'btn btn-sm btn-default ' + prefix + '-toggle\'"\
' + prefix + '-toggle>\
{{(btnText == undefined) ? \'Add to calendar\' : btnText}} <span class="caret"></span>\
{{(btnText == undefined) ? \'Add to calendar\' : btnText}}\
<span ng-if="caret != \'false\'" class="caret"></span>\
</span>\
<ul class="dropdown-menu">\
<li><a ng-click="calendarUrl.dlIcal()" ng-if="calendarUrl.dlIcal">iCalendar</a></li>\
@@ -43,7 +45,9 @@ addtocalendar
description: '@',
location: '@',
className: '@',
btnText: '@'
btnText: '@',
caret: '@',
hoverText: '@'
},
controller: 'AddtocalendarCtrl',
template: resolveTemplate

0 comments on commit 124bc3d

Please sign in to comment.