W Safari/Chrome nie mozna bylo zaznaczyc tekstu po zmianie rozmiaru split.
authorLukasz Rekucki <lrekucki@gmail.com>
Fri, 30 Oct 2009 12:43:54 +0000 (13:43 +0100)
committerLukasz Rekucki <lrekucki@gmail.com>
Fri, 30 Oct 2009 12:43:54 +0000 (13:43 +0100)
platforma/static/css/html.css
platforma/static/css/master.css
platforma/static/js/views/html.js
platforma/static/js/views/split.js [changed mode: 0644->0755]

index c975778..d8010de 100755 (executable)
     margin: 0px;
     display: block;
 
     margin: 0px;
     display: block;
 
+    -moz-user-select: -moz-none;
+    -webkit-user-select: none;
+
     padding: 2px;
     cursor: pointer;
     border-bottom: 1px solid black;
     padding: 2px;
     cursor: pointer;
     border-bottom: 1px solid black;
index f22f45f..8200037 100755 (executable)
@@ -153,9 +153,9 @@ text#commit-dialog-message {
 }
 
 .view-overlay {
 }
 
 .view-overlay {
-    z-index: 1000;
-    background: #FFF;
-    opacity: 0.8;
+    display: none;
+    z-index: 0;
+    background: #FFF;    
     text-align: center;
     vertical-align: middle;
 
     text-align: center;
     vertical-align: middle;
 
@@ -169,6 +169,7 @@ text#commit-dialog-message {
     -webkit-user-select: 'none';
     -khtml-user-select: 'none';
     -moz-user-select: 'none'; */
     -webkit-user-select: 'none';
     -khtml-user-select: 'none';
     -moz-user-select: 'none'; */
+
     overflow: 'hidden';    
 }
 
     overflow: 'hidden';    
 }
 
index d57640b..97db6f0 100755 (executable)
@@ -12,12 +12,12 @@ var HTMLView = View.extend({
         this.model
         .addObserver(this, 'data', this.modelDataChanged.bind(this))        
         .addObserver(this, 'state', this.modelStateChanged.bind(this));
         this.model
         .addObserver(this, 'data', this.modelDataChanged.bind(this))        
         .addObserver(this, 'state', this.modelStateChanged.bind(this));
-      
-        $('.htmlview', this.element).html(this.model.get('data'));
+
 
         this.$menuTemplate = $(render_template('html-view-frag-menu-template', this));
 
         this.$menuTemplate = $(render_template('html-view-frag-menu-template', this));
-        
         this.modelStateChanged('state', this.model.get('state'));
         this.modelStateChanged('state', this.model.get('state'));
+        this.modelDataChanged('data', this.model.get('data'));
+                
         this.model.load();
 
         this.currentOpen = null;
         this.model.load();
 
         this.currentOpen = null;
@@ -33,9 +33,7 @@ var HTMLView = View.extend({
         /* upgrade editable elements */
         $("*[x-editable]").each(function() {
             $(this).append( self.$menuTemplate.clone() );
         /* upgrade editable elements */
         $("*[x-editable]").each(function() {
             $(this).append( self.$menuTemplate.clone() );
-        });
-
-        var n = 5001;
+        });        
 
         var doc_base = $('.htmlview .utwor', this.element);
 
 
         var doc_base = $('.htmlview .utwor', this.element);
 
old mode 100644 (file)
new mode 100755 (executable)
index 30eda4a..a91cab6
@@ -59,6 +59,7 @@ var SplitView = View.extend({
         left: this.element.position().left
       }).appendTo(this.element);
     this.views.css("-webkit-user-select", "none"); // Safari selects A/B text on a move
         left: this.element.position().left
       }).appendTo(this.element);
     this.views.css("-webkit-user-select", "none"); // Safari selects A/B text on a move
+
     this.splitbar.addClass(this.activeClass);
     this.leftViewOffset = this.leftView[0].offsetWidth - event.pageX;
     
     this.splitbar.addClass(this.activeClass);
     this.leftViewOffset = this.leftView[0].offsetWidth - event.pageX;
     
@@ -84,6 +85,11 @@ var SplitView = View.extend({
     $(document)
       .unbind('mousemove.splitview')
       .unbind('mouseup.splitview');
     $(document)
       .unbind('mousemove.splitview')
       .unbind('mouseup.splitview');
+
+   //from beginResize:
+   //    this.views.css("-webkit-user-select", "none"); // Safari selects A/B text on a move
+   // Restore it!
+   this.views.css("-webkit-user-select", "auto");
   },
 
   resized: function(event) {
   },
 
   resized: function(event) {