Index: plugins/sweaver_plugin_editor/sweaver_plugin_editor.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/sweaver/plugins/sweaver_plugin_editor/sweaver_plugin_editor.admin.inc,v
retrieving revision 1.1.2.25
diff -u -r1.1.2.25 sweaver_plugin_editor.admin.inc
--- plugins/sweaver_plugin_editor/sweaver_plugin_editor.admin.inc	30 Sep 2010 13:54:03 -0000	1.1.2.25
+++ plugins/sweaver_plugin_editor/sweaver_plugin_editor.admin.inc	14 Oct 2010 07:57:22 -0000
@@ -26,6 +26,13 @@
     '#description' => t('Enable the preview selector so you see what you are going to change.'),
   );
 
+  $form['sweaver_combined_selectors'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Enable combined selectors'),
+    '#default_value' => variable_get('sweaver_combined_selectors', FALSE),
+    '#description' => t('Show combined tag and id or class selectors in the selectors dropdown.'),
+  );
+
   $skins = array();
   $ignore = array('.', '..', '.svn', 'CVS', '.git');
   $directories = scandir(drupal_get_path('module', 'sweaver') .'/skins');
Index: plugins/sweaver_plugin_editor/sweaver_plugin_editor.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/sweaver/plugins/sweaver_plugin_editor/sweaver_plugin_editor.inc,v
retrieving revision 1.1.2.22
diff -u -r1.1.2.22 sweaver_plugin_editor.inc
--- plugins/sweaver_plugin_editor/sweaver_plugin_editor.inc	30 Sep 2010 13:54:03 -0000	1.1.2.22
+++ plugins/sweaver_plugin_editor/sweaver_plugin_editor.inc	14 Oct 2010 08:00:52 -0000
@@ -430,6 +430,7 @@
     $inline_settings['sweaver']['exclude_classes'] = $js_excluded_classes;
     $inline_settings['sweaver']['invokes'][] = 'sweaver_plugin_editor';
     $inline_settings['sweaver']['preview_selector'] = variable_get('sweaver_preview_selection', TRUE);
+    $inline_settings['sweaver']['combined_selectors'] = variable_get('sweaver_combined_selectors', FALSE);
   }
 
   /**
Index: plugins/sweaver_plugin_editor/sweaver_plugin_editor.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/sweaver/plugins/sweaver_plugin_editor/sweaver_plugin_editor.js,v
retrieving revision 1.1.2.52
diff -u -r1.1.2.52 sweaver_plugin_editor.js
--- plugins/sweaver_plugin_editor/sweaver_plugin_editor.js	13 Oct 2010 12:12:37 -0000	1.1.2.52
+++ plugins/sweaver_plugin_editor/sweaver_plugin_editor.js	14 Oct 2010 08:00:31 -0000
@@ -335,7 +335,7 @@
 
   // When an element is hovered, add a class 'sweaver-hovered'.
   if (Drupal.settings.sweaver['preview_selector']) {
-    tempSelectors
+    /*tempSelectors
     .bind('mouseenter', function(event){
       // Only do something when the content area is visible.
       if (Drupal.Sweaver.visible()) {
@@ -378,7 +378,7 @@
           tempObject.addClass('sweaver-hovered');
         }
       }
-    });
+    });*/
   }
 
   // When an element is clicked, add a class and build the entire path.
@@ -805,13 +805,22 @@
 Drupal.Sweaver.objectToReadable = function(object) {
 
   var translation = new Array();
-  var css = new Array();
+  var id_translation = new Array();
+  var class_translation = new Array();
+  var tag_translation = new Array();
+  
+  var css = new Array();  
+  var id_css = new Array();
+  var class_css = new Array();
+  var tag_css = new Array();
+    
   var selector = '';
   var description = '';
   var tempSelectors = new Array();
 
+  var i = 0;
+
   // Traverse all selectors defined in the backend and return an array with the description.
-  // TODO: move translation.push en tempSelectors to seperate function.
   $.each(Drupal.Sweaver.selectors, function() {
     selector = this.selector;
     name = this.name;
@@ -819,48 +828,91 @@
 
     if (name == 'allids') {
       if (object.id && $.inArray('#' + object.id, tempSelectors) < 0) {
-        translation.push('the ' + object.id + ' region');
-        css.push('#' + object.id);
+        id_translation[i] = 'the ' + object.id + ' region';
+        id_css[i] = '#' + object.id;
         tempSelectors.push('#' + object.id);
+        i++;          
       }
     }
     else if (name == 'allclasses') {
       if (object.classes && object.classes[0]) {
         $.each(object.classes, function(index, tempClass) {
           if ($.inArray(tempClass, Drupal.Sweaver.excludeClasses) < 0 && $.inArray('.' + tempClass, tempSelectors) < 0) {
-            translation.push('all ' + tempClass);
-            css.push('.' + tempClass);
+            class_translation[i] = 'all ' + tempClass;
+            class_css[i] = '.' + tempClass;
             tempSelectors.push('.' + tempClass);
+            i++;            
           }
         });
       }
     }
     else if (name == 'alltags' && $.inArray(object.tag, tempSelectors) < 0) {
-      translation.push(object.tag);
-      css.push(object.tag);
+      tag_translation[i] = object.tag;
+      tag_css[i] = object.tag;
       tempSelectors.push(object.tag);
+      i++;      
     }
     else {
       if (selector == '#' + object.id && $.inArray('#' + object.id, tempSelectors) < 0) {
-        translation.push(description);
-        css.push('#' + object.id);
+        id_translation[i] = description;
+        id_css[i] = '#' + object.id;
         tempSelectors.push('#' + object.id);
+        i++;        
       } else if (selector == object.tag && $.inArray(object.tag, tempSelectors) < 0) {
-        translation.push(description);
-        css.push(object.tag);
+        tag_translation[i] = description;
+        tag_css[i] = object.tag;
         tempSelectors.push(object.tag);
+        i++;        
       } else {
         $.each(object.classes, function(index, tempClass) {
           if (selector == '.' + tempClass  && $.inArray(tempClass, Drupal.Sweaver.excludeClasses) < 0 && $.inArray('.' + tempClass, tempSelectors) < 0) {
-            translation.push(description);
-            css.push('.' + tempClass);
+            class_translation[i] = description;
+            class_css[i] = '.' + tempClass;
             tempSelectors.push('.' + tempClass);
+            i++;            
           }
         });
       }
     }
   });
 
+  // Merge the translation arrays.
+  for (var j = 0; j < i; j++) {
+    var k = id_translation[j] ? id_translation[j] : class_translation[j] ? class_translation[j] : tag_translation[j];
+    translation[j] = k;
+  }
+
+  // Merge the css arrays.
+  for (var j = 0; j < i; j++) {
+    var k = id_css[j] ? id_css[j] : class_css[j] ? class_css[j] : tag_css[j];
+    css[j] = k;
+  } 
+  if (Drupal.settings.sweaver['combined_selectors']) {
+	  // Add combinations of classes, ids and tags.
+	  t = i;
+	  if (tag_translation.length > 0) {
+	    $.each(tag_translation, function(index, tag) {
+	      if (tag) {
+			    $.each(id_translation, function(index, trans) {
+			      if (trans) {
+			        translation[t] = tag + ' + ' + trans;
+			        css[t] = tag + id_css[index];
+			        t++;
+			      }
+			    });
+		      $.each(class_translation, function(index, trans) {
+		        if (trans) {
+		          translation[t] = tag + ' + ' + trans;
+              css[t] = tag + class_css[index];		          
+		          t++;
+		        }
+		      });	 
+		    }   
+		  });
+	  }
+  }
+
   // If a prefered selector was set in the object, return that one instead of the default first one.
   index = object.preferredSelector ? object.preferredSelector : 0;
   translation.splice(0, 0, translation[index]);
Index: skins/default/default.css
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/sweaver/skins/default/Attic/default.css,v
retrieving revision 1.1.2.20
diff -u -r1.1.2.20 default.css
--- skins/default/default.css	30 Sep 2010 09:15:33 -0000	1.1.2.20
+++ skins/default/default.css	14 Oct 2010 07:51:37 -0000
@@ -717,7 +717,7 @@
   -webkit-border-radius: 3px !important;
   border-radius: 3px !important;
   display: none;
-  z-index: 2 !important;
+  z-index: 1113 !important;
   width: auto !important;
   white-space: nowrap !important;
 }
Index: skins/grey/grey.css
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/sweaver/skins/grey/Attic/grey.css,v
retrieving revision 1.1.2.20
diff -u -r1.1.2.20 grey.css
--- skins/grey/grey.css	30 Sep 2010 09:15:33 -0000	1.1.2.20
+++ skins/grey/grey.css	14 Oct 2010 07:51:53 -0000
@@ -729,7 +729,7 @@
   -webkit-border-radius: 3px !important;
   border-radius: 3px !important;
   display: none;
-  z-index: 2 !important;
+  z-index: 1113 !important;
   width: auto !important;
   white-space: nowrap !important;
 }

