Fix bad commit (adding files)

This commit is contained in:
Carl Eberhard
2015-03-17 10:47:31 -04:00
parent 9a7f5fc17b
commit ba20f5f6e1
185 changed files with 553 additions and 115988 deletions
+2 -48
View File
@@ -1,48 +1,2 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define([], factory);
} else {
root.faIconButton = factory();
}
}(this, function () {
//============================================================================
/** Returns a jQuery object containing a clickable font-awesome button.
* options:
* tooltipConfig : option map for bootstrap tool tip
* classes : array of class names (will always be classed as icon-btn)
* disabled : T/F - add the 'disabled' class?
* title : tooltip/title string
* target : optional href target
* href : optional href
* faIcon : which font awesome icon to use
* onclick : function to call when the button is clicked
*/
var faIconButton = function( options ){
options = options || {};
options.tooltipConfig = options.tooltipConfig || { placement: 'bottom' };
options.classes = [ 'icon-btn' ].concat( options.classes || [] );
if( options.disabled ){
options.classes.push( 'disabled' );
}
var html = [
'<a class="', options.classes.join( ' ' ), '"',
(( options.title )?( ' title="' + options.title + '"' ):( '' )),
(( !options.disabled && options.target )? ( ' target="' + options.target + '"' ):( '' )),
' href="', (( !options.disabled && options.href )?( options.href ):( 'javascript:void(0);' )), '">',
// could go with something less specific here - like 'html'
'<span class="fa ', options.faIcon, '"></span>',
'</a>'
].join( '' );
var $button = $( html ).tooltip( options.tooltipConfig );
if( _.isFunction( options.onclick ) ){
$button.click( options.onclick );
}
return $button;
};
//============================================================================
return faIconButton;
}));
!function(a,b){"function"==typeof define&&define.amd?define([],b):a.faIconButton=b()}(this,function(){var a=function(a){a=a||{},a.tooltipConfig=a.tooltipConfig||{placement:"bottom"},a.classes=["icon-btn"].concat(a.classes||[]),a.disabled&&a.classes.push("disabled");var b=['<a class="',a.classes.join(" "),'"',a.title?' title="'+a.title+'"':"",!a.disabled&&a.target?' target="'+a.target+'"':"",' href="',!a.disabled&&a.href?a.href:"javascript:void(0);",'">','<span class="fa ',a.faIcon,'"></span>',"</a>"].join(""),c=$(b).tooltip(a.tooltipConfig);return _.isFunction(a.onclick)&&c.click(a.onclick),c};return a});
//# sourceMappingURL=../../maps/ui/fa-icon-button.js.map