diff --git a/Builder/IISMainHandler/build.txt b/Builder/IISMainHandler/build.txt index 7bd7739..a42ae07 100644 --- a/Builder/IISMainHandler/build.txt +++ b/Builder/IISMainHandler/build.txt @@ -1 +1 @@ -713 \ No newline at end of file +725 \ No newline at end of file diff --git a/IISMainHandler/handlers/response/PMReplyToPostHandler.cs b/IISMainHandler/handlers/response/PMReplyToPostHandler.cs index a4530a5..2654e3b 100644 --- a/IISMainHandler/handlers/response/PMReplyToPostHandler.cs +++ b/IISMainHandler/handlers/response/PMReplyToPostHandler.cs @@ -26,6 +26,7 @@ namespace FLocal.IISHandler.handlers.response { post.thread.exportToXml(context, false), post.exportToXmlWithoutThread(context, false), new XElement("receiver", Account.LoadByUser(post.poster).exportToXml(context)), + new XElement("quoted", context.httprequest.Form["data"]), }; } } diff --git a/IISMainHandler/handlers/response/ReplyHandler.cs b/IISMainHandler/handlers/response/ReplyHandler.cs index e5079fc..fdbd8d8 100644 --- a/IISMainHandler/handlers/response/ReplyHandler.cs +++ b/IISMainHandler/handlers/response/ReplyHandler.cs @@ -28,6 +28,7 @@ namespace FLocal.IISHandler.handlers.response { new XElement("layers", from layer in PostLayer.allLayers select layer.exportToXml(context) ), + new XElement("quoted", context.httprequest.Form["data"]), }; } } diff --git a/static/js/common.js b/static/js/common.js index 1d4677f..4ab2e71 100644 --- a/static/js/common.js +++ b/static/js/common.js @@ -31,3 +31,24 @@ function assignArrowsHandlers() { } } } + +function getSelText() { +// alert(typeof(window.getSelection)); +// alert(typeof(document.getSelection)); +// alert(typeof(document.selection)); + if(typeof(window.getSelection) == "function") { + return window.getSelection(); + } else if(typeof(document.getSelection) == "function") { + return document.getSelection(); + } else if(typeof(document.selection) == "object") { + return document.selection.createRange().text; + } else { + return ""; + } +} + +function submitSelText(url) { + document.getElementById("systemForm").data.value = getSelText(); + document.getElementById("systemForm").action = url; + document.getElementById("systemForm").submit(); +} diff --git a/templates/Full/PMReplyToPost.xslt b/templates/Full/PMReplyToPost.xslt index 8a24977..11b5529 100644 --- a/templates/Full/PMReplyToPost.xslt +++ b/templates/Full/PMReplyToPost.xslt @@ -53,7 +53,16 @@

- + + + + [q] + + [/q] + + + +
Я хочу предварительно просмотреть сообщение перед отправкой diff --git a/templates/Full/PostReply.xslt b/templates/Full/PostReply.xslt index e2ad050..d34233e 100644 --- a/templates/Full/PostReply.xslt +++ b/templates/Full/PostReply.xslt @@ -56,7 +56,16 @@

- + + + + [q] + + [/q] + + + +
Я хочу предварительно просмотреть сообщение перед отправкой diff --git a/templates/Full/elems/Main.xslt b/templates/Full/elems/Main.xslt index 41b37bc..f60063f 100644 --- a/templates/Full/elems/Main.xslt +++ b/templates/Full/elems/Main.xslt @@ -20,6 +20,11 @@ +
+
+ +
+

Data used for authoring this XHTML document: diff --git a/templates/Full/elems/PostInfo.xslt b/templates/Full/elems/PostInfo.xslt index ef645a3..a3b372f 100644 --- a/templates/Full/elems/PostInfo.xslt +++ b/templates/Full/elems/PostInfo.xslt @@ -59,6 +59,8 @@ /Post//Reply/ + submitSelText(this.href);return false; + submitSelText(this.href);return false; Ответ на сообщение @@ -91,6 +93,8 @@ /Post//PMReply/ + submitSelText(this.href);return false; + submitSelText(this.href);return false; Ответить приватом