# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: /Users/jurgenhaas/Development/MAMP/dev_girotrans/htdocs/sites/all/modules/live_css
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: css.js
--- css.js Base (BASE)
+++ css.js Locally Modified (Based On LOCAL)
@@ -55,8 +55,13 @@
             }
             title = title.substr(0, title.length - 1);
             
+            //limit to just the custom css if necessary
+            if(Drupal.settings.live_css.custommode){
+                if(title != Drupal.settings.live_css.customfile)
+                    return;
+            }
             //limit to just theme css if necessary
-            if(Drupal.settings.live_css.hidemodules){
+            else if(Drupal.settings.live_css.hidemodules){
                 if(!title.match(/sites\/all\/themes\//))
                     return;
             }
@@ -91,6 +96,9 @@
             for(var i = 0; i < this.sList.length; i++)
                 addItem(this.sList[i]);
         }
+        if ($('#csidebar .stylelist option').length == 1) {
+          $('#csidebar .stylelist').hide();
+        }
     },
     saveCSS: function(){
       $('#csidebar .save').html('...');
@@ -267,11 +275,11 @@
             $.get(href, function(data){
                 self.setStyle(data);
                 complete(data);
-            }).error(function(){
+            })/*.error(function(){
                 if(console)
                   console.log("Couldn't load css file " + filename + "!");
                 complete('');
-            });
+            })*/;
             
             self.setStyle = function(css){
                 self.link.html(self.fullUri(css));
Index: live_css.module
--- live_css.module Base (BASE)
+++ live_css.module Locally Modified (Based On LOCAL)
@@ -90,6 +90,12 @@
     '#title' => t('Soft Tabs'),
     '#default_value' => variable_get('live_css_softtabs', 1)
   );
+  $form['live_css_custommode'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Customer mode'),
+    '#default_value' => variable_get('live_css_custommode', 0),
+    '#description' => t('Add an initially empty CSS file and only allow to edit that file.')
+  );
   
   return system_settings_form($form);
 }
@@ -120,6 +126,13 @@
   return $results;
 }
 
+function live_css_custom_filename() {
+  $filename = variable_get('file_public_path', 'sites/default/files') . '/custom.css';
+  if (!file_exists($filename)) {
+    file_put_contents($filename, '');
+  }
+  return $filename;
+}
 
 /**
  * Implements hook_init().
@@ -138,6 +151,8 @@
     $settings['fontsize'] = variable_get('live_css_fontsize', '12px');
     $settings['tabsize'] = (int)variable_get('live_css_tabsize', 2);
     $settings['softtabs'] = (boolean)variable_get('live_css_softtabs', 1);
+    $settings['custommode'] = (boolean)variable_get('live_css_custommode', 0);
+    $settings['customfile'] = live_css_custom_filename();
     drupal_add_js(array('live_css' => $settings), 'setting');
     
     drupal_add_js(drupal_get_path('module', 'live_css') . '/ace/src/ace.js');
@@ -149,6 +164,9 @@
     //load the list of stylesheets
     drupal_add_css(drupal_get_path('module', 'live_css') . '/css.css', 'module', 'all', FALSE);
     drupal_add_js(drupal_get_path('module', 'live_css') . '/css.js');
+
+    //add customer css file
+    drupal_add_css(live_css_custom_filename(), array('group' => CSS_THEME, 'weight' => CSS_THEME + 1, 'preprocess' => FALSE));
   }
 }
 
