| @@ -262,9 +262,9 @@ | ||
| 262 | 262 | JText::script('VBO_STICKYN_CUSTOMURI'); |
| 263 | 263 | JText::script('VBO_WIDGETS_CONFRMELEM'); |
| 264 | 264 | } |
| 265 | 265 | |
| 266 | - public function render(VBOMultitaskData $data = null) | |
| 266 | + public function render(?VBOMultitaskData $data = null) | |
| 267 | 267 | { |
| 268 | 268 | // increase widget's instance counter |
| 269 | 269 | static::$instance_counter++; |
| 270 | 270 | |
| @@ -286,20 +286,8 @@ | ||
| 286 | 286 | $needs_settings = true; |
| 287 | 287 | } |
| 288 | 288 | } |
| 289 | 289 | |
| 290 | - /** | |
| 291 | - * This widget requires the jQuery UI Sortable library, but we do not preload it | |
| 292 | - * in order to save resources. We only load this JS asset when the widget is saved. | |
| 293 | - * The page Dashboard always loads the Sortable library, but not the Multitask panel. | |
| 294 | - * | |
| 295 | - * @since 1.15.0 (J) - 1.5.0 (WP) | |
| 296 | - */ | |
| 297 | - if (!$is_ajax) { | |
| 298 | - // load assets (with no "preloading") | |
| 299 | - JHtml::fetch('script', VBO_SITE_URI.'resources/jquery-ui.sortable.min.js'); | |
| 300 | - } | |
| 301 | - | |
| 302 | 290 | // generate a unique ID for the sticky notes wrapper instance |
| 303 | 291 | $wrapper_instance = !$is_ajax ? static::$instance_counter : rand(); |
| 304 | 292 | $wrapper_id = 'vbo-widget-sticky-' . $wrapper_instance; |
| 305 | 293 | |
| @@ -692,13 +680,13 @@ | ||
| 692 | 680 | * settings have been loaded, and if AJAX + multitask rendering is detected. |
| 693 | 681 | * It's assumed that the AJAX rendering of a multitask widget takes place one |
| 694 | 682 | * second before the AJAX event that updates the multitask map to push the widget. |
| 695 | 683 | * |
| 696 | - * @param VBOMultitaskData $data the data object injected to the widget. | |
| 684 | + * @param ?VBOMultitaskData $data the data object injected to the widget. | |
| 697 | 685 | * |
| 698 | 686 | * @return bool|int false on failure, guessed settings index otherwise. |
| 699 | 687 | */ |
| 700 | - protected function guessMultitaskStickyInstance(VBOMultitaskData $data = null) | |
| 688 | + protected function guessMultitaskStickyInstance(?VBOMultitaskData $data = null) | |
| 701 | 689 | { |
| 702 | 690 | if (!is_array($this->widgetSettings) || !count($this->widgetSettings)) { |
| 703 | 691 | // nothing to guess if this widget has got no saved settings |
| 704 | 692 | return false; |