From 07455a6e0affec9ce53efae6dac027b9531b5b95 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Thu, 26 May 2016 09:44:41 -0500 Subject: [PATCH] Scrollable widgets Remove several javascript:return false; --- html/css/styles.css | 9 ++++++++- html/includes/common/availability-map.inc.php | 2 +- html/pages/front/tiles.php | 11 ++++++----- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/html/css/styles.css b/html/css/styles.css index f480f47733..5f9aaa5587 100644 --- a/html/css/styles.css +++ b/html/css/styles.css @@ -1863,4 +1863,11 @@ label { padding: 5px; border-radius: 4px; box-shadow: 0 5px 15px rgba(0,0,0,.5); -} \ No newline at end of file +} + +.edit-widget, .close-widget { cursor: pointer; } +.widget_body { + overflow-y: auto; + width: 100%; + height: calc(100% - 35px); +} diff --git a/html/includes/common/availability-map.inc.php b/html/includes/common/availability-map.inc.php index fbc82cb926..00656eb43c 100644 --- a/html/includes/common/availability-map.inc.php +++ b/html/includes/common/availability-map.inc.php @@ -15,7 +15,7 @@ if (defined('show_settings')) { $current_mode = isset($widget_settings['mode']) ? $widget_settings['mode'] : 0; $current_width = isset($widget_settings['tile_width']) ? $widget_settings['tile_width'] : 10; $common_output[] = ' -
+
diff --git a/html/pages/front/tiles.php b/html/pages/front/tiles.php index 1b0207bd9d..470f262da7 100644 --- a/html/pages/front/tiles.php +++ b/html/pages/front/tiles.php @@ -169,7 +169,7 @@ foreach (array('Private','Shared (Read)','Shared') as $k=>$v) { @@ -316,7 +316,7 @@ foreach (dbFetchRows("SELECT * FROM `widgets` ORDER BY `widget_title`") as $widg }); }); - $('a[name="place_widget"]').on('click', function(event, state) { + $('.place_widget').on('click', function(event, state) { var widget_id = $(this).data('widget_id'); $.ajax({ type: 'POST', @@ -458,11 +458,11 @@ foreach (dbFetchRows("SELECT * FROM `widgets` ORDER BY `widget_title`") as $widg '
'+data.title+ ''+ ''+ - '  '+ - '  '+ + '  '+ + '  '+ ''+ '
'+ - '
'+data.widget+'
'+ + '
'+data.widget+'
'+ '\var timeout'+data.user_widget_id+' = grab_data('+data.user_widget_id+','+data.refresh+',\''+data.widget+'\');\<\/script\>'+ ''; if (data.hasOwnProperty('col') && data.hasOwnProperty('row')) { @@ -506,6 +506,7 @@ foreach (dbFetchRows("SELECT * FROM `widgets` ORDER BY `widget_title`") as $widg } }); } + return false; } function widget_reload(id,data_type) {