From 79fb388be6474bbcc2c2306bf229aca6d97bcd2a Mon Sep 17 00:00:00 2001
From: Szymon Olewniczak <szymon.olewniczak@rid.pl>
Date: Fri, 7 Feb 2014 18:06:23 +0100
Subject: [PATCH] megre changes

---
 lib/scripts/edit.js    | 6 +++---
 lib/scripts/toolbar.js | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js
index 2400103e1..76e6d124b 100644
--- a/lib/scripts/edit.js
+++ b/lib/scripts/edit.js
@@ -151,7 +151,7 @@ function addBtnActionSignature($btn, props, edid) {
 function currentHeadlineLevel(textboxId){
     var field = jQuery('#' + textboxId)[0],
         s = false,
-        opts = [field.value.substr(0,getSelection(field).start)];
+        opts = [field.value.substr(0,DWgetSelection(field).start)];
     if (field.form.prefix) {
         // we need to look in prefix context
         opts.push(field.form.prefix.value);
@@ -220,10 +220,10 @@ jQuery(function () {
         }
 
         // set focus and place cursor at the start
-        var sel = getSelection($edit_text[0]);
+        var sel = DWgetSelection($edit_text[0]);
         sel.start = 0;
         sel.end   = 0;
-        setSelection(sel);
+        DWsetSelection(sel);
         $edit_text.focus();
     }
 
diff --git a/lib/scripts/toolbar.js b/lib/scripts/toolbar.js
index 47f5c0df7..cb478fdb1 100644
--- a/lib/scripts/toolbar.js
+++ b/lib/scripts/toolbar.js
@@ -101,7 +101,7 @@ function tb_format(btn, props, edid) {
 function tb_formatln(btn, props, edid) {
     var sample = props.sample || props.title,
         opts,
-        selection = getSelection(jQuery('#'+edid)[0]);
+        selection = DWgetSelection(jQuery('#'+edid)[0]);
 
     sample = fixtxt(sample);
     props.open  = fixtxt(props.open);
-- 
GitLab