From: Lukasz Rekucki Date: Fri, 30 Oct 2009 12:43:54 +0000 (+0100) Subject: W Safari/Chrome nie mozna bylo zaznaczyc tekstu po zmianie rozmiaru split. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/f0e275b6eeffa2bee768e42ba5528308f81af228?ds=inline;hp=-c W Safari/Chrome nie mozna bylo zaznaczyc tekstu po zmianie rozmiaru split. --- f0e275b6eeffa2bee768e42ba5528308f81af228 diff --git a/platforma/static/css/html.css b/platforma/static/css/html.css index c975778d..d8010def 100755 --- a/platforma/static/css/html.css +++ b/platforma/static/css/html.css @@ -385,6 +385,9 @@ margin: 0px; display: block; + -moz-user-select: -moz-none; + -webkit-user-select: none; + padding: 2px; cursor: pointer; border-bottom: 1px solid black; diff --git a/platforma/static/css/master.css b/platforma/static/css/master.css index f22f45f6..8200037c 100755 --- a/platforma/static/css/master.css +++ b/platforma/static/css/master.css @@ -153,9 +153,9 @@ text#commit-dialog-message { } .view-overlay { - z-index: 1000; - background: #FFF; - opacity: 0.8; + display: none; + z-index: 0; + background: #FFF; 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'; */ + overflow: 'hidden'; } diff --git a/platforma/static/js/views/html.js b/platforma/static/js/views/html.js index d57640bc..97db6f07 100755 --- a/platforma/static/js/views/html.js +++ b/platforma/static/js/views/html.js @@ -12,12 +12,12 @@ var HTMLView = View.extend({ 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.modelStateChanged('state', this.model.get('state')); + this.modelDataChanged('data', this.model.get('data')); + 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() ); - }); - - var n = 5001; + }); var doc_base = $('.htmlview .utwor', this.element); diff --git a/platforma/static/js/views/split.js b/platforma/static/js/views/split.js old mode 100644 new mode 100755 index 30eda4ab..a91cab60 --- a/platforma/static/js/views/split.js +++ b/platforma/static/js/views/split.js @@ -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 + 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'); + + //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) {