From: zuber Date: Sat, 26 Sep 2009 19:11:50 +0000 (+0200) Subject: Merge branch 'master' into view-refactor X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/07b09d489ecbc789a096e53d98070c286c286101?ds=sidebyside;hp=--cc Merge branch 'master' into view-refactor Conflicts: project/static/js/lib/codemirror/codemirror.js --- 07b09d489ecbc789a096e53d98070c286c286101 diff --cc project/static/js/lib/codemirror/codemirror.js index 5567f66f,25da6f74..f63ed07e --- a/project/static/js/lib/codemirror/codemirror.js +++ b/project/static/js/lib/codemirror/codemirror.js @@@ -132,8 -149,44 +132,9 @@@ var CodeMirror = (function() var node = place; place = function(n){node.appendChild(n);}; } - - var iframe_container = document.createElement("DIV"); - iframe_container.appendChild(frame); - - var content_wrapper = document.createElement("DIV"); - content_wrapper.appendChild(iframe_container); - content_wrapper.style.position = 'relative'; - content_wrapper.className = 'CodeMirror-content-wrapper'; - content_wrapper.style.width = options.width; - content_wrapper.style.height = options.height; - - iframe_container.style.position = 'absolute'; - iframe_container.style.top = '0px'; - iframe_container.style.right = '0px'; - iframe_container.style.bottom = '0px'; - iframe_container.style.left = '0px'; - - if (options.lineNumbers) { - iframe_container.style.left = '28px'; - - var nums = document.createElement("DIV"), - scroller = document.createElement("DIV"); - - nums.style.position = "absolute"; - nums.style.height = "100%"; - - nums.style.top = "0px"; - nums.style.left = "0px"; - nums.style.overflow = "hidden"; - - scroller.className = "CodeMirror-line-numbers"; - nums.appendChild(scroller); - content_wrapper.appendChild(nums); - - iframe_container.style.right = nums.width; - } + - place(content_wrapper); + if (options.lineNumbers) place = wrapLineNumberDiv(place); + place(frame); // Link back to this object, so that the editor can fetch options // and add a reference to itself.