PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.16
VikBooking Hotel Booking Engine & PMS v1.8.16
1.8.16 1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 All 37 releases
← All changes | admin/helpers/widgets/sticky_notes.php +3 -15 1.6.9 → 1.8.16 View file →
@@ -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;