diff options
author | Stefan Giehl <stefan@piwik.org> | 2018-03-22 05:38:47 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2018-03-22 05:38:47 +0300 |
commit | 23a458abf86e53c1f2103129f40687f2f0279157 (patch) | |
tree | 2ca6efea0e918f3b306f831ef7415ba1bedc221e /plugins/CorePluginsAdmin | |
parent | 19ed4785db66566befae9ba65956df848825acd8 (diff) |
Export overlay for Datatables (#11958)
* Implements export overlay for datatables
* use popover instead of modal
* use radio instead of select
* fix positioning of popover
* improve popover; translations
* adjust tests
* update ui files
* add options for flatten & expanded
* make export popover work with other popover
- old popover will be recreated when export popover is closed
* improve export url creation
* update ui files
Diffstat (limited to 'plugins/CorePluginsAdmin')
3 files changed, 20 insertions, 2 deletions
diff --git a/plugins/CorePluginsAdmin/angularjs/field/field.directive.js b/plugins/CorePluginsAdmin/angularjs/field/field.directive.js index fb07808201..ccead1ef28 100644 --- a/plugins/CorePluginsAdmin/angularjs/field/field.directive.js +++ b/plugins/CorePluginsAdmin/angularjs/field/field.directive.js @@ -58,7 +58,9 @@ maxlength: '@', required: '@', placeholder: '@', - rows: '@' + rows: '@', + min: '@', + max: '@' }, template: '<div piwik-form-field="field"></div>', link: function(scope, elm, attrs, ctrl) { @@ -97,6 +99,8 @@ field.type = 'boolean'; } else if (field.uiControl === 'site') { field.type = 'object'; + } else if (field.uiControl === 'number') { + field.type = 'integer'; } else { field.type = 'string'; } @@ -118,7 +122,7 @@ } var i = 0, attribute; - var attributes = ['disabled', 'autocomplete', 'tabindex', 'autofocus', 'rows', 'required', 'maxlength', 'placeholder']; + var attributes = ['disabled', 'autocomplete', 'tabindex', 'autofocus', 'rows', 'required', 'maxlength', 'placeholder', 'min', 'max']; for (i; i < attributes.length; i++) { attribute = attributes[i]; if (!!$scope[attribute]) { diff --git a/plugins/CorePluginsAdmin/angularjs/form-field/field-number.html b/plugins/CorePluginsAdmin/angularjs/form-field/field-number.html new file mode 100644 index 0000000000..35b837ba89 --- /dev/null +++ b/plugins/CorePluginsAdmin/angularjs/form-field/field-number.html @@ -0,0 +1,13 @@ +<div> + <input + class="control_{{ formField.uiControl }}" + type="{{ formField.uiControl }}" + id="{{ formField.name }}" + name="{{ formField.name }}" + ng-model="formField.value" + string-to-number + ng-value="formField.value" + piwik-attributes="{{formField.uiControlAttributes}}" + > + <label for="{{ formField.name }}" ng-bind-html="formField.title"></label> +</div>
\ No newline at end of file diff --git a/plugins/CorePluginsAdmin/angularjs/form-field/form-field.directive.js b/plugins/CorePluginsAdmin/angularjs/form-field/form-field.directive.js index ebfc0df6cb..3df7a6ef20 100644 --- a/plugins/CorePluginsAdmin/angularjs/form-field/form-field.directive.js +++ b/plugins/CorePluginsAdmin/angularjs/form-field/form-field.directive.js @@ -132,6 +132,7 @@ || hasUiControl(field, 'textarea') || hasUiControl(field, 'password') || hasUiControl(field, 'email') + || hasUiControl(field, 'number') || hasUiControl(field, 'url') || hasUiControl(field, 'search')) { Materialize.updateTextFields(); |