Index: sweaver.module =================================================================== --- sweaver.module (revision 3056) +++ sweaver.module (working copy) @@ -22,6 +22,11 @@ define('SWEAVER_CLASSES_EXCLUDE', "clear\nclear-fix\nclear-block\nsweaver\nsweaver-hovered\nsweaver-clicked\nsweaver-clicked-temp"); /** + * Default properties that can be used in custom css. + */ +define('SWEAVER_CTOOLS_ALLOWED_PROPERTIES', "-moz-border-radius\n-webkit-border-radius\nborder-top-right-radius\nborder-bottom-right-radius\nborder-bottom-left-radius\nborder-top-left-radius\nwebkit-border-top-right-radius\nwebkit-border-bottom-right-radius\nwebkit-border-bottom-left-radius\nwebkit-border-top-left-radius\nmoz-border-radius-topright\nmoz-border-radius-bottomright\nmoz-border-radius-bottomleft\nmoz-border-radius-topleft\nposition\ntop\nleft\nbottom\nright\nborder-collapse\nborder-spacing\nlist-style-image\nlist-style-type\nmin-width\nmax-width\nmin-height\nmax-height\nvisibility"); + +/** * Default skin. */ define('SWEAVER_SKIN', "default"); Index: plugins/sweaver_plugin_editor/sweaver_plugin_editor.admin.inc =================================================================== --- plugins/sweaver_plugin_editor/sweaver_plugin_editor.admin.inc (revision 3056) +++ plugins/sweaver_plugin_editor/sweaver_plugin_editor.admin.inc (working copy) @@ -72,6 +72,14 @@ '#wysiwyg' => FALSE, ); + $form['sweaver_ctools_allowed_properties'] = array( + '#type' => 'textarea', + '#title' => t('Allowed Properties'), + '#default_value' => variable_get('sweaver_ctools_allowed_properties', SWEAVER_CTOOLS_ALLOWED_PROPERTIES), + '#description' => t('Define which properties can be used in custom css. Enter one selector per line.'), + '#wysiwyg' => FALSE, + ); + $form = system_settings_form($form); $form['#submit'][] = 'sweaver_settings_submit'; return $form; Index: plugins/sweaver_plugin_styles/sweaver_plugin_styles.inc =================================================================== --- plugins/sweaver_plugin_styles/sweaver_plugin_styles.inc (revision 3056) +++ plugins/sweaver_plugin_styles/sweaver_plugin_styles.inc (working copy) @@ -439,30 +439,16 @@ */ function sweaver_ctools_allowed_properties() { $allowed = ctools_css_filter_default_allowed_properties(); - $allowed_sweaver = array( - '-moz-border-radius', - '-webkit-border-radius', - 'border-top-right-radius', - 'border-bottom-right-radius', - 'border-bottom-left-radius', - 'border-top-left-radius', - 'webkit-border-top-right-radius', - 'webkit-border-bottom-right-radius', - 'webkit-border-bottom-left-radius', - 'webkit-border-top-left-radius', - 'moz-border-radius-topright', - 'moz-border-radius-bottomright', - 'moz-border-radius-bottomleft', - 'moz-border-radius-topleft', - 'position', - 'top', - 'left', - 'bottom', - 'right', - 'border-collapse', - 'border-spacing', - ); - return array_merge($allowed, $allowed_sweaver); + $allowed_properties = array(); + $exploded = explode("\n", variable_get('sweaver_ctools_allowed_properties', SWEAVER_CTOOLS_ALLOWED_PROPERTIES)); + foreach ($exploded as $key => $class) { + $trimmed = trim($class); + if (!empty($trimmed)) { + $allowed_properties[] = $trimmed; + } + } + + return array_merge($allowed, $allowed_properties); } /**