From a83361982f3fa6117716efa3e7823c30b70c49f5 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Wed, 30 Nov 2016 15:41:13 -0500 Subject: minifaction of most external resources where possible --- www/external/origjs/ionRadio.js | 55 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 www/external/origjs/ionRadio.js (limited to 'www/external/origjs/ionRadio.js') diff --git a/www/external/origjs/ionRadio.js b/www/external/origjs/ionRadio.js new file mode 100644 index 00000000..cb240b76 --- /dev/null +++ b/www/external/origjs/ionRadio.js @@ -0,0 +1,55 @@ +/** + * ionRadioFix - fixes a bug in iOS 9 UIWebView that breaks the tilde selector in CSS. To + * use this fix, include it after your Ionic bundle JS. + * + * Note: due to Angular directive override limitations, you'll need to change any reference + * to to to apply this patched radio button. + * + * Also, make sure to add the new CSS from the second part of this gist. + */ +angular.module('ionic').directive('ionRadioFix', function() { + return { + restrict: 'E', + replace: true, + require: '?ngModel', + transclude: true, + template: + '', + + compile: function(element, attr) { + if (attr.icon) { + var iconElm = element.find('i'); + iconElm.removeClass('ion-checkmark').addClass(attr.icon); + } + + var input = element.find('input'); + angular.forEach({ + 'name': attr.name, + 'value': attr.value, + 'disabled': attr.disabled, + 'ng-value': attr.ngValue, + 'ng-model': attr.ngModel, + 'ng-disabled': attr.ngDisabled, + 'ng-change': attr.ngChange, + 'ng-required': attr.ngRequired, + 'required': attr.required + }, function(value, name) { + if (angular.isDefined(value)) { + input.attr(name, value); + } + }); + + return function(scope, element, attr) { + scope.getValue = function() { + return scope.ngValue || attr.value; + }; + }; + } + }; +}); \ No newline at end of file -- cgit v1.2.3