diff options
author | dizzy <diosmosis@users.noreply.github.com> | 2021-12-27 17:07:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-27 17:07:14 +0300 |
commit | 12eecad95200ca00a586e4d7ce6b02fa9da61727 (patch) | |
tree | fe66266c7b3ef1858353323333fc5f82551375aa /plugins/CoreHome/angularjs/common | |
parent | 367fd818134df972fbf653fa2a814865404f8315 (diff) |
[Vue] migrate report export directive and popover (#18440)
* update files
* sidenav start
* make getRef a utility method
* tweak
* add return type
* finish converting side-nav directive
* starting on reporting menu conversion
* remove unused properties
* convert reporting pages service
* migrate report metadata store
* remove angularjs files
* migrating reporting pages store
* make store adapters more immutable
* get service adapters to work
* fix a UI test
* another html fix
* migrate most of reporting menu directive and model
* Use themed font family for input forms to override materialize.css styling
* rebuild vue
* add a missing div
* ui test fixes
* update styling
* get to build
* get to load in the UI w/o error
* clone result of functions
* fix compile issue
* migrate widget loader and get to load in UI
* rebuild vue
* migrate widgetcontainer
* migrate widget bydimension container
* migrate widget + add tooltips directive
* quick fix
* Updating version to 4.6.0
* loading in page
* update expected screenshot
* add wait just in case travis is slow
* fix ordering bug
* add another wait
* rebuild vue
* css tweak
* fix some bugs and tests
* undo screenshot changes
* Menus test passing locally
* [Vue] date picker viewDate property is not kept up to date (#18385)
* viewDate ref is not kept up to date
* rebuild corehome
* reporting menu subcategory items are meant to be normal links
* update some screenshots
* use innerText instead of text() since angularjs maintains newlines in HTML that vue does not add
* trigger angularjs digest after ajaxhelper request
* rebuild vue
* update screenshots, fix bug in link generation in reporting menu and allow syncing multiple screenshot regexes at a time
* undo box-shadow change for UI tests
* fix more issues & update more tests
* update some screenshots
* fix some tests
* rebuild CoreHome
* quick fix
* built vue files
* fix angularjs issue
* add comment
* update umd files
* 4.6.1-rc1
* 4.6.1
* fix field array title
* apply some pr feedback
* apply more pr feedback
* another fix
* tweak
* fix ng-change not executed before ng-model
* fix another set of issues
* fix another issue
* rebuild vue
* better ng-change/ng-model fix
* update some screenshots
* rebuild vue
* remove some TODOs
* initiate initial ng-change ONLY for site selectors where this behavior applies
* emit/broadcast on correct scope in wrapper
* rebuild vue
* fix some issues
* couple more fixes
* fix another title issue
* rebuild vue
* do not report on ajax errors in notifications if not logged in
* migrate reporting page and model
* rebuild vue
* create sites selector model adapter
* fix siteselector vue bug, initial site is only set if there is just one site available
* rebuild vue
* migrate plugin settings directive
* remove TODO
* migrate plugin filter directive
* migrate two more plugins directives
* migrate save button
* fix a bunch of bugs
* fix another widget bug
* allow change event name between angularjs and vue
* rebuild vue
* migrate plugin form directive
* get to work
* migrate select-on-focus directive and start migrating report-export directive
* finish migrating report export directive & popover component + create reusable function to create vue app and add globals to it
* rebuild vue
* remove angularjs files and move less contents to vue dir
* built vue files
* fix function signature
* fix vue warning
* fix ajax request race condition
* rebuild vue
* add new notification type "help" so the help notification is not cleared when clearing transient notifications
* fix some bugs and tests
* update screenshot
* update screenshot & fix a test
* allow using unminified jquery ui + fix bug in last fix
* fix error when enrichedheadline is used in modal
* add polyfill min.js
* remove two todos
* fix widget url logic
* update some screenshots and fix sanitization/escape issue
* update screenshots
* rebuild vue
* fix url location updating regression in MatomoUrl.updateLocation use
* submodule
* update screenshots and fix possible error in json parse
* built vue files
* Merge branch 'vue-period-selector-regression' into vue-reporting-menu
* rebuild vue
* use correct variable
* rebuild vue
* fix widget url logic
* segment parameter can be undefined now for some reason
* fix ngmodel binding in siteselector adapter (for last time hopefully)
* the original site selector only set the first site to the first site in the initial sites query if there was only one site in the entire matomo instance
* fix sitesmanager ui test failure
* fix usersettings test failure
* rebuild vue
* more siteselector tweaks.
* build CoreHome
* more siteselector tweaks.
* another siteselector issue
* update screenshots
* update screenshot and try to fix random failure
* fix some issues in widget.vue when containerid is specified
* fix couple tests
* fix several test failures
* fix string concat
* fix test failure
* extra change
* fix last change and random failure
* styling fix
* fix last fix
* real fix this time
* fix stray request
* proper fix
* update build files
* try to fix random failure
* do not submit form
* check for api errors in promise chain in ajaxhelper.ts
* force a digest after a location change
* use proper abortcontroller method instead of promise hack, have to add new polyfill + try to fix random test failure
* some UI test fixes
* fix some report export issues
* several save button fixes + make replace approximation in createAngularJsAdapter better
* apply after manual click triggering in savebutton
* add names to divs so they can still be queried as they were in angularjs
* rebuild vue
* now that format_metrics checkbox works, need to check it
* fix unintended changes
* updated expected screenshots
* update two more
* go back to previous format_metrics behavior in popover
Co-authored-by: Justin Velluppillai <justin@innocraft.com>
Co-authored-by: justinvelluppillai <justinvelluppillai@users.noreply.github.com>
Co-authored-by: Matthieu Aubry <mattab@users.noreply.github.com>
Diffstat (limited to 'plugins/CoreHome/angularjs/common')
4 files changed, 15 insertions, 74 deletions
diff --git a/plugins/CoreHome/angularjs/common/directives/field-condition.js b/plugins/CoreHome/angularjs/common/directives/field-condition.js index 01431e5d29..3ff3116cf0 100644 --- a/plugins/CoreHome/angularjs/common/directives/field-condition.js +++ b/plugins/CoreHome/angularjs/common/directives/field-condition.js @@ -14,6 +14,10 @@ piwikFieldCondition.$inject = ['piwik', '$timeout']; + /** + * Unused. + * @deprecated + */ function piwikFieldCondition(piwik, $timeout){ function evaluate(scope, condition, element) @@ -85,4 +89,4 @@ }, }; } -})();
\ No newline at end of file +})(); diff --git a/plugins/CoreHome/angularjs/common/directives/ignore-click.js b/plugins/CoreHome/angularjs/common/directives/ignore-click.js index a11c0e29c8..3bb8d724cb 100644 --- a/plugins/CoreHome/angularjs/common/directives/ignore-click.js +++ b/plugins/CoreHome/angularjs/common/directives/ignore-click.js @@ -15,11 +15,14 @@ (function () { angular.module('piwikApp.directive').directive('piwikIgnoreClick', piwikIgnoreClick); - function piwikIgnoreClick() { + /** + * @deprecated + */ + function piwikIgnoreClick() { return function(scope, element, attrs) { $(element).click(function(event) { event.preventDefault(); }); }; } -})();
\ No newline at end of file +})(); diff --git a/plugins/CoreHome/angularjs/common/directives/onenter.js b/plugins/CoreHome/angularjs/common/directives/onenter.js index ce2a73961f..c0b7ed4d51 100644 --- a/plugins/CoreHome/angularjs/common/directives/onenter.js +++ b/plugins/CoreHome/angularjs/common/directives/onenter.js @@ -15,7 +15,10 @@ (function () { angular.module('piwikApp.directive').directive('piwikOnenter', piwikOnenter); - function piwikOnenter() { + /** + * @deprecated + */ + function piwikOnenter() { return function(scope, element, attrs) { element.bind("keydown keypress", function(event) { if(event.which === 13) { @@ -28,4 +31,4 @@ }); }; } -})();
\ No newline at end of file +})(); diff --git a/plugins/CoreHome/angularjs/common/directives/select-on-focus.js b/plugins/CoreHome/angularjs/common/directives/select-on-focus.js deleted file mode 100644 index a76dd30d99..0000000000 --- a/plugins/CoreHome/angularjs/common/directives/select-on-focus.js +++ /dev/null @@ -1,69 +0,0 @@ -/*! - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */ - -/** - * On focus (click, tab) selects the text within the current element - * - * Example: - * <div piwik-select-on-focus>my dialog</div> - */ -(function () { - angular.module('piwikApp.directive').directive('piwikSelectOnFocus', piwikSelectOnFocus); - - function piwikSelectOnFocus(){ - return { - restrict: 'A', - link: function(scope, element, attr, ctrl) { - - var focusedElement = null; - - var tagName = (element.prop('tagName') + '').toLowerCase(); - var elementSupportsSelect = tagName === 'textarea'; - - function onFocusHandler(event) { - if (focusedElement !== this) { - focusedElement = this; - angular.element(this).select(); - } - } - - function onClickHandler(event) { - // .select() + focus and blur seems to not work on pre elements - var range = document.createRange(); - range.selectNode(this); - var selection = window.getSelection(); - if (selection && selection.rangeCount > 0) { - selection.removeAllRanges(); - } - if (selection) { - selection.addRange(range); - } - } - - function onBlurHandler(event) { - focusedElement = null; - } - - if (elementSupportsSelect) { - element.on('focus', onFocusHandler); - element.on('blur', onBlurHandler); - } else { - element.on('click', onClickHandler); - } - - scope.$on('$destroy', function() { - if (elementSupportsSelect) { - element.off('focus', onFocusHandler); - element.off('blur', onBlurHandler); - } else { - element.off('click', onClickHandler); - } - }); - } - }; - } -})(); |