Browse Source

ctools modal css + description white on black

Signed-off-by: bachy <git@g-u-i.net>
bachy 13 years ago
parent
commit
746109f079
5 changed files with 113 additions and 187 deletions
  1. 0 0
      css/guibik.css
  2. BIN
      images/popup.png
  3. 4 185
      images/popup.svg
  4. 25 2
      less/guibik.less
  5. 84 0
      template.php

File diff suppressed because it is too large
+ 0 - 0
css/guibik.css


BIN
images/popup.png


File diff suppressed because it is too large
+ 4 - 185
images/popup.svg


+ 25 - 2
less/guibik.less

@@ -83,8 +83,10 @@ select.form-select {
 
 /** popup description */
 .page-content .form-item .description {
-  color:#0092D2;
+  color:#fff;
   border-top:1px solid #E0E0E0;
+/*	background: #1A1A1A url() no-repeat scroll top left;*/
+	background:url(../images/popup.png) 50% 100% no-repeat;
 	a{text-decoration: underline;}
 }
 
@@ -131,7 +133,7 @@ li{list-style: none inside url();}
   border:1px solid #BFBFBF;
   margin:0px 0px 10px;
   position:relative;
-  }
+}
 
 .vertical-tabs .fieldset-content,
 .vertical-tabs fieldset.titled .fieldset-content {
@@ -398,3 +400,24 @@ body.admin-vertical.admin-expanded #admin-menu-wrapper{border-left:1px solid #32
 
 }
 
+
+#modalContent{
+		
+}
+
+#modalContent div.ctools-modal-content{
+	padding:5px;
+	-moz-border-radius: 10px;
+		-webkit-border-radius: 10px;
+		border-radius: 10px;
+		
+	border: 1 solid #999;
+	
+}
+#modalContent div.ctools-modal-content .modal-header,
+#modalContent div.ctools-modal-content .modal-header a,
+#modalContent div.ctools-modal-content .modal-header span{
+	background-color: transparent; color:#000!important;
+}
+
+

+ 84 - 0
template.php

@@ -123,3 +123,87 @@ function guibik_preprocess_html(&$vars){
 	
 	
 }
+
+/**
+ * Implements theme_form_element().
+ */
+function OUT_guibik_form_element($variables) {
+  $element = &$variables['element'];
+  // This is also used in the installer, pre-database setup.
+  $t = get_t();
+	
+	dsm($element);
+
+  // This function is invoked as theme wrapper, but the rendered form element
+  // may not necessarily have been processed by form_builder().
+  $element += array(
+    '#title_display' => 'before',
+  );
+
+  // Add element #id for #type 'item'.
+  if (isset($element['#markup']) && !empty($element['#id'])) {
+    $attributes['id'] = $element['#id'];
+  }
+  // Add element's #type and #name as class to aid with JS/CSS selectors.
+	if(!isset($element["#attributes"]['class']))
+		$element["#attributes"]['class'] = array();
+		
+	$attributes['class'] = $element["#attributes"]['class'] + array('form-item');
+  if (!empty($element['#type'])) {
+    $attributes['class'][] = 'form-type-' . strtr($element['#type'], '_', '-');
+  }
+  if (!empty($element['#name'])) {
+    $attributes['class'][] = 'form-item-' . strtr($element['#name'], array(' ' => '-', '_' => '-', '[' => '-', ']' => ''));
+  }
+  // Add a class for disabled elements to facilitate cross-browser styling.
+  if (!empty($element['#attributes']['disabled'])) {
+    $attributes['class'][] = 'form-disabled';
+  }
+  $output = '<div' . drupal_attributes($attributes) . '>' . "\n";
+
+  // If #title is not set, we don't display any label or required marker.
+  if (!isset($element['#title'])) {
+    $element['#title_display'] = 'none';
+  }
+  $prefix = isset($element['#field_prefix']) ? '<span class="field-prefix">' . $element['#field_prefix'] . '</span> ' : '';
+  $suffix = isset($element['#field_suffix']) ? ' <span class="field-suffix">' . $element['#field_suffix'] . '</span>' : '';
+
+  switch ($element['#title_display']) {
+    case 'before':
+    case 'invisible':
+      $output .= ' ' . theme('form_element_label', $variables);
+      $output .= ' ' . $prefix . $element['#children'] . $suffix . "\n";
+      break;
+
+    case 'after':
+      $output .= ' ' . $prefix . $element['#children'] . $suffix;
+      $output .= ' ' . theme('form_element_label', $variables) . "\n";
+      break;
+
+    case 'none':
+    case 'attribute':
+      // Output no label and no required marker, only the children.
+      $output .= ' ' . $prefix . $element['#children'] . $suffix . "\n";
+      break;
+  }
+
+  if (!empty($element['#description'])) {
+    $output .= '<div class="description">' . $element['#description'] . "</div>\n";
+  }
+
+  $output .= "</div>\n";
+
+  return $output;
+}
+
+
+
+function guibik_form_node_form_alter(&$form, &$form_state){
+	// dsm($form, 'guibik_form_node_form_alter | $form');
+	// dsm($form_state, '$form_state');
+	
+	if(!isset($form['language']['#description']))
+		$form['language']['#description'] = t('Please consider to leave language in neutral state <strong>if you dont plan to translate this node</strong>, even if your content is (obviously) writed in some non neutral language. Then this node will always be visible.');
+	
+}
+

Some files were not shown because too many files changed in this diff