refs #61.
authorŁukasz Rekucki <lrekucki@gmail.com>
Tue, 25 Aug 2009 09:59:58 +0000 (11:59 +0200)
committerŁukasz Rekucki <lrekucki@gmail.com>
Tue, 25 Aug 2009 09:59:58 +0000 (11:59 +0200)
project/static/css/master.css
project/static/js/jquery.logging.js [new file with mode: 0644]
project/templates/explorer/panels/htmleditor.html

index 76a5632..caeddda 100644 (file)
@@ -138,8 +138,8 @@ label {
 
 /* Toolbars with select box to change panel contents*/
 .panel-toolbar {
 
 /* Toolbars with select box to change panel contents*/
 .panel-toolbar {
-       position: absolute;
-       top: 0px; left:0px; right: 0px; height: 20px;
+    position: absolute;
+    top: 0px; left:0px; right: 0px; height: 20px;
 
     padding: 0 0 2px 0;
     border-top: 1px solid #AAA;
 
     padding: 0 0 2px 0;
     border-top: 1px solid #AAA;
@@ -174,7 +174,7 @@ label {
 
 .panel-wrap .panel-slider:hover {
     background-color: #999;
 
 .panel-wrap .panel-slider:hover {
     background-color: #999;
-    cursor: col-resize;
+    cursor: hand;
 }
 
 .panel-content-overlay.panel-wrap .panel-slider {
 }
 
 .panel-content-overlay.panel-wrap .panel-slider {
@@ -184,7 +184,7 @@ label {
 /* ================= */
 /* = Gallery panel = */
 /* ================= */
 /* ================= */
 /* = Gallery panel = */
 /* ================= */
-.images-wrap, .htmleditor {
+.images-wrap, .panel-htmleditor {
     overflow-x: hidden;
     overflow-y: scroll;
 }
     overflow-x: hidden;
     overflow-y: scroll;
 }
diff --git a/project/static/js/jquery.logging.js b/project/static/js/jquery.logging.js
new file mode 100644 (file)
index 0000000..02e10e4
--- /dev/null
@@ -0,0 +1,35 @@
+(function($) {
+       const LEVEL_DEBUG = 1;
+       const LEVEL_INFO = 2;
+       const LEVEL_WARN = 3;
+
+       const LOG_LEVEL = LEVEL_DEBUG;
+
+       var mozillaLog = function(msg) {
+               if (console) console.log(msg);
+       };
+
+       var operaLog = function(msg) {
+               opera.postError(msg);
+       };
+
+       var defaultLog = function(msg) { return false; };
+
+       $.log = function(message, level) {
+               if (level == null) level = LEVEL_INFO;
+               if (message == null) message = 'TRACE';
+               if (level < LOG_LEVEL)
+                       return false;
+
+               return $.log.browserLog(message);
+       };
+
+       if ($.browser.mozilla || $.browser.safari)
+               $.log.browserLog = mozillaLog;
+       else if($.browser.opera)
+               $.log.browserLog = operaLog
+       else 
+               $.log.browserLog = defaultLog;
+
+
+})(jQuery);
index 3b1791e..4515677 100644 (file)
@@ -1,18 +1,16 @@
-<div class="panel">
-    <div class="htmleditor">
-        {{ html|safe }}
-    </div>
-</div>
+{{ html|safe }}
 <script type="text/javascript" charset="utf-8">
     (function() {
         var id = Math.ceil(Math.random() * 1000000000);
         
 <script type="text/javascript" charset="utf-8">
     (function() {
         var id = Math.ceil(Math.random() * 1000000000);
         
-        panel(function(event, panel) {
+        panel(function(event, me) {
             $(document).bind('panel:contentChanged.' + id, function(event, p) {
             $(document).bind('panel:contentChanged.' + id, function(event, p) {
-                $('.change-notification', $(panel).parent()).fadeIn();
-            })
-        }, function(event, panel) {
+                $('.change-notification', $(me).parent()).fadeIn();
+            });
+           $(me).addClass('panel-htmleditor');
+        }, function(event, me) {
+           $(me).removeClass('panel-htmleditor');
             $(document).unbind('panel:contentChanged.' + id);
         });
     })()
             $(document).unbind('panel:contentChanged.' + id);
         });
     })()
-</script>
\ No newline at end of file
+</script>