Slight refactoring of AbstractGetHandler (and derived handlers); message preview implemented

main
Inga 🏳‍🌈 15 years ago
parent ad93ee92f7
commit 87910dba40
  1. 2
      Builder/IISMainHandler/build.txt
  2. 1
      IISMainHandler/IISMainHandler.csproj
  3. 2
      IISMainHandler/handlers/AbstractGetHandler.cs
  4. 2
      IISMainHandler/handlers/BoardHandler.cs
  5. 2
      IISMainHandler/handlers/BoardsHandler.cs
  6. 2
      IISMainHandler/handlers/PostHandler.cs
  7. 2
      IISMainHandler/handlers/RootHandler.cs
  8. 2
      IISMainHandler/handlers/ThreadHandler.cs
  9. 2
      IISMainHandler/handlers/WrongUrlHandler.cs
  10. 2
      IISMainHandler/handlers/request/AbstractNewMessageHandler.cs
  11. 27
      IISMainHandler/handlers/response/AbstractNewMessageHandler.cs
  12. 2
      IISMainHandler/handlers/response/ActiveAccountListHandler.cs
  13. 2
      IISMainHandler/handlers/response/AllPostsHandler.cs
  14. 2
      IISMainHandler/handlers/response/BoardAsThread.cs
  15. 2
      IISMainHandler/handlers/response/ConversationHandler.cs
  16. 2
      IISMainHandler/handlers/response/ConversationsHandler.cs
  17. 2
      IISMainHandler/handlers/response/CreatePollHandler.cs
  18. 4
      IISMainHandler/handlers/response/CreateThreadHandler.cs
  19. 4
      IISMainHandler/handlers/response/EditHandler.cs
  20. 2
      IISMainHandler/handlers/response/LoginHandler.cs
  21. 2
      IISMainHandler/handlers/response/MigrateAccountHandler.cs
  22. 4
      IISMainHandler/handlers/response/PMReplyHandler.cs
  23. 4
      IISMainHandler/handlers/response/PMReplyToPostHandler.cs
  24. 4
      IISMainHandler/handlers/response/PMSendHandler.cs
  25. 2
      IISMainHandler/handlers/response/PollHandler.cs
  26. 2
      IISMainHandler/handlers/response/RedirectGetHandler.cs
  27. 4
      IISMainHandler/handlers/response/ReplyHandler.cs
  28. 2
      IISMainHandler/handlers/response/SettingsHandler.cs
  29. 2
      IISMainHandler/handlers/response/UploadHandler.cs
  30. 2
      IISMainHandler/handlers/response/UploadListHandler.cs
  31. 2
      IISMainHandler/handlers/response/UploadNewHandler.cs
  32. 2
      IISMainHandler/handlers/response/UserInfoHandler.cs
  33. 2
      IISMainHandler/handlers/response/UserListHandler.cs
  34. 2
      IISMainHandler/handlers/response/UserPollsParticipatedHandler.cs
  35. 2
      IISMainHandler/handlers/response/UserPostsHandler.cs
  36. 2
      IISMainHandler/handlers/response/UserRepliesHandler.cs
  37. 2
      IISMainHandler/handlers/response/WhoIsOnlineHandler.cs
  38. 2
      IISMainHandler/handlers/response/maintenance/CleanCacheHandler.cs
  39. 9
      static/js/common.js
  40. 1
      templates/Full/NewPoll.xslt
  41. 9
      templates/Full/NewThread.xslt
  42. 9
      templates/Full/PMReply.xslt
  43. 9
      templates/Full/PMReplyToPost.xslt
  44. 9
      templates/Full/PMSend.xslt
  45. 9
      templates/Full/PostEdit.xslt
  46. 9
      templates/Full/PostReply.xslt
  47. 68
      templates/Full/elems/TextEditor.xslt

@ -75,6 +75,7 @@
<Compile Include="handlers\request\SettingsHandler.cs" /> <Compile Include="handlers\request\SettingsHandler.cs" />
<Compile Include="handlers\request\UploadHandler.cs" /> <Compile Include="handlers\request\UploadHandler.cs" />
<Compile Include="handlers\request\VoteHandler.cs" /> <Compile Include="handlers\request\VoteHandler.cs" />
<Compile Include="handlers\response\AbstractNewMessageHandler.cs" />
<Compile Include="handlers\response\ActiveAccountListHandler.cs" /> <Compile Include="handlers\response\ActiveAccountListHandler.cs" />
<Compile Include="handlers\response\AllPostsHandler.cs" /> <Compile Include="handlers\response\AllPostsHandler.cs" />
<Compile Include="handlers\response\BoardAsThread.cs" /> <Compile Include="handlers\response\BoardAsThread.cs" />

@ -12,7 +12,7 @@ namespace FLocal.IISHandler.handlers {
get; get;
} }
abstract protected XElement[] getSpecificData(WebContext context); abstract protected IEnumerable<XElement> getSpecificData(WebContext context);
private XDocument getData(WebContext context) { private XDocument getData(WebContext context) {
return new XDocument( return new XDocument(

@ -19,7 +19,7 @@ namespace FLocal.IISHandler.handlers {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
Board board = Board.LoadById(int.Parse(context.requestParts[1])); Board board = Board.LoadById(int.Parse(context.requestParts[1]));
PageOuter pageOuter = PageOuter.createFromGet(context.requestParts, context.userSettings.threadsPerPage, 2); PageOuter pageOuter = PageOuter.createFromGet(context.requestParts, context.userSettings.threadsPerPage, 2);
IEnumerable<Thread> threads = board.getThreads(pageOuter); IEnumerable<Thread> threads = board.getThreads(pageOuter);

@ -20,7 +20,7 @@ namespace FLocal.IISHandler.handlers {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
return new XElement[] { return new XElement[] {
new XElement("categories", from category in Category.allCategories select category.exportToXmlForMainPage(context)), new XElement("categories", from category in Category.allCategories select category.exportToXmlForMainPage(context)),
new XElement("totalRegistered", Config.instance.mainConnection.GetCountByConditions(User.TableSpec.instance, new EmptyCondition())), new XElement("totalRegistered", Config.instance.mainConnection.GetCountByConditions(User.TableSpec.instance, new EmptyCondition())),

@ -18,7 +18,7 @@ namespace FLocal.IISHandler.handlers {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
Post post = Post.LoadById(int.Parse(context.requestParts[1])); Post post = Post.LoadById(int.Parse(context.requestParts[1]));
int lastReadId = 0; int lastReadId = 0;

@ -15,7 +15,7 @@ namespace FLocal.IISHandler.handlers {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
return new XElement[0]; return new XElement[0];
} }

@ -20,7 +20,7 @@ namespace FLocal.IISHandler.handlers {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
Thread thread = Thread.LoadById(int.Parse(context.requestParts[1])); Thread thread = Thread.LoadById(int.Parse(context.requestParts[1]));
PageOuter pageOuter = PageOuter.createFromGet( PageOuter pageOuter = PageOuter.createFromGet(
context.requestParts, context.requestParts,

@ -14,7 +14,7 @@ namespace FLocal.IISHandler.handlers {
} }
} }
protected override XElement[] getSpecificData(WebContext context) { protected override IEnumerable<XElement> getSpecificData(WebContext context) {
return new XElement[] { return new XElement[] {
new XElement("path", context.httprequest.Path) new XElement("path", context.httprequest.Path)
}; };

@ -25,7 +25,7 @@ namespace FLocal.IISHandler.handlers.request {
} }
protected string getBody(WebContext context) { protected string getBody(WebContext context) {
string body = context.httprequest.Form["body"].Trim(); string body = context.httprequest.Form["Body"].Trim();
if(body == "") { if(body == "") {
throw new FLocalException("Body is empty"); throw new FLocalException("Body is empty");
} }

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using FLocal.Core;
using FLocal.Common;
namespace FLocal.IISHandler.handlers.response {
abstract class AbstractNewMessageHandler : AbstractGetHandler {
abstract protected IEnumerable<XElement> getSpecificNewMessageData(WebContext context);
protected override IEnumerable<XElement> getSpecificData(WebContext context) {
var result = new List<XElement>();
if(context.httprequest.Form.AllKeys.Contains("title")) {
result.Add(new XElement("title", context.httprequest.Form["title"]));
}
if(context.httprequest.Form.AllKeys.Contains("Body")) {
result.Add(new XElement("bodyUBB", context.httprequest.Form["Body"]));
result.Add(new XElement("bodyIntermediate", context.outputParams.preprocessBodyIntermediate(UBBParser.UBBToIntermediate(context.httprequest.Form["Body"]))));
}
return result.Union(this.getSpecificNewMessageData(context));
}
}
}

@ -19,7 +19,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
//PageOuter pageOuter = PageOuter.createFromGet(context.requestParts, context.userSettings.usersPerPage, 1); //PageOuter pageOuter = PageOuter.createFromGet(context.requestParts, context.userSettings.usersPerPage, 1);
PageOuter pageOuter = PageOuter.createUnlimited(context.userSettings.usersPerPage); PageOuter pageOuter = PageOuter.createUnlimited(context.userSettings.usersPerPage);
IEnumerable<Account> accounts = Account.LoadByIds( IEnumerable<Account> accounts = Account.LoadByIds(

@ -20,7 +20,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
PageOuter pageOuter = PageOuter.createFromGet( PageOuter pageOuter = PageOuter.createFromGet(
context.requestParts, context.requestParts,
context.userSettings.postsPerPage, context.userSettings.postsPerPage,

@ -18,7 +18,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
Board board = Board.LoadById(int.Parse(context.requestParts[1])); Board board = Board.LoadById(int.Parse(context.requestParts[1]));
PageOuter pageOuter = PageOuter.createFromGet(context.requestParts, context.userSettings.postsPerPage, 2); PageOuter pageOuter = PageOuter.createFromGet(context.requestParts, context.userSettings.postsPerPage, 2);
IEnumerable<Thread> threads = board.getThreads( IEnumerable<Thread> threads = board.getThreads(

@ -20,7 +20,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
Account interlocutor = Account.LoadById(int.Parse(context.requestParts[1])); Account interlocutor = Account.LoadById(int.Parse(context.requestParts[1]));
PMConversation conversation = PMConversation.LoadByAccounts(context.session.account, interlocutor); PMConversation conversation = PMConversation.LoadByAccounts(context.session.account, interlocutor);
PageOuter pageOuter = PageOuter.createFromGet( PageOuter pageOuter = PageOuter.createFromGet(

@ -19,7 +19,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
PageOuter pageOuter = PageOuter.createFromGet(context.requestParts, context.userSettings.threadsPerPage, 1); PageOuter pageOuter = PageOuter.createFromGet(context.requestParts, context.userSettings.threadsPerPage, 1);
IEnumerable<PMConversation> conversations = PMConversation.getConversations(context.session.account, pageOuter); IEnumerable<PMConversation> conversations = PMConversation.getConversations(context.session.account, pageOuter);
XElement[] result = new XElement[] { XElement[] result = new XElement[] {

@ -18,7 +18,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
return new XElement[] { return new XElement[] {
}; };
} }

@ -10,7 +10,7 @@ using FLocal.Common.dataobjects;
namespace FLocal.IISHandler.handlers.response { namespace FLocal.IISHandler.handlers.response {
class CreateThreadHandler : AbstractGetHandler { class CreateThreadHandler : AbstractNewMessageHandler {
override protected string templateName { override protected string templateName {
get { get {
@ -18,7 +18,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificNewMessageData(WebContext context) {
Board board = Board.LoadById(int.Parse(context.requestParts[1])); Board board = Board.LoadById(int.Parse(context.requestParts[1]));
return new XElement[] { return new XElement[] {

@ -10,7 +10,7 @@ using FLocal.Common.dataobjects;
namespace FLocal.IISHandler.handlers.response { namespace FLocal.IISHandler.handlers.response {
class EditHandler : AbstractGetHandler { class EditHandler : AbstractNewMessageHandler {
override protected string templateName { override protected string templateName {
get { get {
@ -18,7 +18,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificNewMessageData(WebContext context) {
Post post = Post.LoadById(int.Parse(context.requestParts[1])); Post post = Post.LoadById(int.Parse(context.requestParts[1]));
return new XElement[] { return new XElement[] {

@ -16,7 +16,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
protected override System.Xml.Linq.XElement[] getSpecificData(WebContext context) { protected override IEnumerable<XElement> getSpecificData(WebContext context) {
return new XElement[0]; return new XElement[0];
} }

@ -16,7 +16,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
protected override System.Xml.Linq.XElement[] getSpecificData(WebContext context) { protected override IEnumerable<XElement> getSpecificData(WebContext context) {
string username; string username;
if(context.httprequest.Form["username"] != null && context.httprequest.Form["username"] != "") { if(context.httprequest.Form["username"] != null && context.httprequest.Form["username"] != "") {
username = context.httprequest.Form["username"]; username = context.httprequest.Form["username"];

@ -10,7 +10,7 @@ using FLocal.Common.dataobjects;
namespace FLocal.IISHandler.handlers.response { namespace FLocal.IISHandler.handlers.response {
class PMReplyHandler : AbstractGetHandler { class PMReplyHandler : AbstractNewMessageHandler {
override protected string templateName { override protected string templateName {
get { get {
@ -18,7 +18,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificNewMessageData(WebContext context) {
PMMessage message = PMMessage.LoadById(int.Parse(context.requestParts[1])); PMMessage message = PMMessage.LoadById(int.Parse(context.requestParts[1]));
return new XElement[] { return new XElement[] {

@ -10,7 +10,7 @@ using FLocal.Common.dataobjects;
namespace FLocal.IISHandler.handlers.response { namespace FLocal.IISHandler.handlers.response {
class PMReplyToPostHandler : AbstractGetHandler { class PMReplyToPostHandler : AbstractNewMessageHandler {
override protected string templateName { override protected string templateName {
get { get {
@ -18,7 +18,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificNewMessageData(WebContext context) {
Post post = Post.LoadById(int.Parse(context.requestParts[1])); Post post = Post.LoadById(int.Parse(context.requestParts[1]));

@ -10,7 +10,7 @@ using FLocal.Common.dataobjects;
namespace FLocal.IISHandler.handlers.response { namespace FLocal.IISHandler.handlers.response {
class PMSendHandler : AbstractGetHandler { class PMSendHandler : AbstractNewMessageHandler {
override protected string templateName { override protected string templateName {
get { get {
@ -18,7 +18,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificNewMessageData(WebContext context) {
if(context.requestParts.Length > 1) { if(context.requestParts.Length > 1) {
Account account = Account.LoadById(int.Parse(context.requestParts[1])); Account account = Account.LoadById(int.Parse(context.requestParts[1]));
return new XElement[] { return new XElement[] {

@ -20,7 +20,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
Poll poll = Poll.LoadById(int.Parse(context.requestParts[1])); Poll poll = Poll.LoadById(int.Parse(context.requestParts[1]));
return new XElement[] { return new XElement[] {
poll.exportToXmlWithVotes(context) poll.exportToXmlWithVotes(context)

@ -15,7 +15,7 @@ namespace FLocal.IISHandler.handlers.response {
abstract protected string getRedirectUrl(WebContext context); abstract protected string getRedirectUrl(WebContext context);
protected override XElement[] getSpecificData(WebContext context) { protected override IEnumerable<XElement> getSpecificData(WebContext context) {
throw new RedirectException(this.getRedirectUrl(context)); throw new RedirectException(this.getRedirectUrl(context));
} }

@ -10,7 +10,7 @@ using FLocal.Common.dataobjects;
namespace FLocal.IISHandler.handlers.response { namespace FLocal.IISHandler.handlers.response {
class ReplyHandler : AbstractGetHandler { class ReplyHandler : AbstractNewMessageHandler {
override protected string templateName { override protected string templateName {
get { get {
@ -18,7 +18,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificNewMessageData(WebContext context) {
Post post = Post.LoadById(int.Parse(context.requestParts[1])); Post post = Post.LoadById(int.Parse(context.requestParts[1]));

@ -18,7 +18,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
IUserSettings settings = AccountSettings.LoadByAccount(context.session.account); IUserSettings settings = AccountSettings.LoadByAccount(context.session.account);
return new XElement[] { return new XElement[] {

@ -18,7 +18,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
protected override System.Xml.Linq.XElement[] getSpecificData(WebContext context) { protected override IEnumerable<XElement> getSpecificData(WebContext context) {
Upload upload = Upload.LoadById(int.Parse(context.requestParts[2])); Upload upload = Upload.LoadById(int.Parse(context.requestParts[2]));
throw new RedirectException(Config.instance.UploaderUrl + "Data/" + upload.hash + "." + upload.extension); throw new RedirectException(Config.instance.UploaderUrl + "Data/" + upload.hash + "." + upload.extension);
} }

@ -18,7 +18,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
protected override System.Xml.Linq.XElement[] getSpecificData(WebContext context) { protected override IEnumerable<XElement> getSpecificData(WebContext context) {
if(context.session == null) throw new AccessViolationException(); if(context.session == null) throw new AccessViolationException();
PageOuter pageOuter = PageOuter.createFromGet(context.requestParts, context.userSettings.uploadsPerPage, 2); PageOuter pageOuter = PageOuter.createFromGet(context.requestParts, context.userSettings.uploadsPerPage, 2);
List<Upload> uploads = Upload.LoadByIds( List<Upload> uploads = Upload.LoadByIds(

@ -18,7 +18,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
protected override System.Xml.Linq.XElement[] getSpecificData(WebContext context) { protected override IEnumerable<XElement> getSpecificData(WebContext context) {
return new XElement[0]; return new XElement[0];
} }

@ -20,7 +20,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
User user = User.LoadById(int.Parse(context.requestParts[1])); User user = User.LoadById(int.Parse(context.requestParts[1]));
Account account = null; Account account = null;
if(context.session != null) { if(context.session != null) {

@ -18,7 +18,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
PageOuter pageOuter = PageOuter.createFromGet(context.requestParts, context.userSettings.usersPerPage, 1); PageOuter pageOuter = PageOuter.createFromGet(context.requestParts, context.userSettings.usersPerPage, 1);
IEnumerable<User> users = User.getUsers(pageOuter); IEnumerable<User> users = User.getUsers(pageOuter);
return new XElement[] { return new XElement[] {

@ -20,7 +20,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
User user = User.LoadById(int.Parse(context.requestParts[1])); User user = User.LoadById(int.Parse(context.requestParts[1]));
PageOuter pageOuter = PageOuter.createFromGet( PageOuter pageOuter = PageOuter.createFromGet(
context.requestParts, context.requestParts,

@ -20,7 +20,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
User user = User.LoadById(int.Parse(context.requestParts[1])); User user = User.LoadById(int.Parse(context.requestParts[1]));
PageOuter pageOuter = PageOuter.createFromGet( PageOuter pageOuter = PageOuter.createFromGet(
context.requestParts, context.requestParts,

@ -20,7 +20,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
User user = User.LoadById(int.Parse(context.requestParts[1])); User user = User.LoadById(int.Parse(context.requestParts[1]));
PageOuter pageOuter = PageOuter.createFromGet( PageOuter pageOuter = PageOuter.createFromGet(
context.requestParts, context.requestParts,

@ -20,7 +20,7 @@ namespace FLocal.IISHandler.handlers.response {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
PageOuter pageOuter = PageOuter.createUnlimited(context.userSettings.usersPerPage); PageOuter pageOuter = PageOuter.createUnlimited(context.userSettings.usersPerPage);
IEnumerable<Session> sessions = IEnumerable<Session> sessions =
from stringId in Config.instance.mainConnection.LoadIdsByConditions( from stringId in Config.instance.mainConnection.LoadIdsByConditions(

@ -18,7 +18,7 @@ namespace FLocal.IISHandler.handlers.response.maintenance {
} }
} }
override protected XElement[] getSpecificData(WebContext context) { override protected IEnumerable<XElement> getSpecificData(WebContext context) {
return new XElement[] { return new XElement[] {
new XElement( new XElement(
"tables", "tables",

@ -52,3 +52,12 @@ function submitSelText(url) {
document.getElementById("systemForm").action = url; document.getElementById("systemForm").action = url;
document.getElementById("systemForm").submit(); document.getElementById("systemForm").submit();
} }
function changeActionToSelf(elem) {
if(elem.checked) {
elem.form.newAction = elem.form.action;
elem.form.action = "";
} else {
elem.form.action = elem.form.newAction;
}
}

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="Windows-1251"?> <?xml version="1.0" encoding="Windows-1251"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<xsl:import href="elems\Main.xslt"/> <xsl:import href="elems\Main.xslt"/>
<xsl:import href="elems\TextEditor.xslt"/>
<xsl:template name="specificTitle"> <xsl:template name="specificTitle">
<xsl:text>Íîâûé îïîðîñ</xsl:text> <xsl:text>Íîâûé îïîðîñ</xsl:text>
</xsl:template> </xsl:template>

@ -45,15 +45,6 @@
<br/> <br/>
<br/> <br/>
<xsl:call-template name="textEditor"/> <xsl:call-template name="textEditor"/>
<br/>
<input type="checkbox" name="preview" value="1" class="formboxes" disabled="disabled" />
<xsl:text>ß õî÷ó ïðåäâàðèòåëüíî ïðîñìîòðåòü ñîîáùåíèå ïåðåä îòïðàâêîé</xsl:text>
<br/>
<br/>
<input type="checkbox" name="spellcheck" value="1" class="formboxes" onChange="document.replier.preview.checked=this.checked;" disabled="disabled" />
<xsl:text>Ïðîâåðèòü ïðàâîïèñàíèå</xsl:text>
<br/>
<br/>
<input type="submit" tabindex="3" name="textcont" taborder="2" value="Ïðîäîëæèòü" class="buttons"/> <input type="submit" tabindex="3" name="textcont" taborder="2" value="Ïðîäîëæèòü" class="buttons"/>
</form> </form>
</td> </td>

@ -58,15 +58,6 @@
</xsl:text> </xsl:text>
</xsl:with-param> </xsl:with-param>
</xsl:call-template> </xsl:call-template>
<br/>
<input type="checkbox" name="preview" value="1" class="formboxes" disabled="disabled" />
<xsl:text>ß õî÷ó ïðåäâàðèòåëüíî ïðîñìîòðåòü ñîîáùåíèå ïåðåä îòïðàâêîé</xsl:text>
<br/>
<br/>
<input type="checkbox" name="spellcheck" value="1" class="formboxes" onChange="document.replier.preview.checked=this.checked;" disabled="disabled" />
<xsl:text>Ïðîâåðèòü ïðàâîïèñàíèå</xsl:text>
<br/>
<br/>
<input type="submit" tabindex="3" name="textcont" taborder="2" value="Ïðîäîëæèòü" class="buttons"/> <input type="submit" tabindex="3" name="textcont" taborder="2" value="Ïðîäîëæèòü" class="buttons"/>
</form> </form>
</td> </td>

@ -63,15 +63,6 @@
</xsl:if> </xsl:if>
</xsl:with-param> </xsl:with-param>
</xsl:call-template> </xsl:call-template>
<br/>
<input type="checkbox" name="preview" value="1" class="formboxes" disabled="disabled" />
<xsl:text>ß õî÷ó ïðåäâàðèòåëüíî ïðîñìîòðåòü ñîîáùåíèå ïåðåä îòïðàâêîé</xsl:text>
<br/>
<br/>
<input type="checkbox" name="spellcheck" value="1" class="formboxes" onChange="document.replier.preview.checked=this.checked;" disabled="disabled" />
<xsl:text>Ïðîâåðèòü ïðàâîïèñàíèå</xsl:text>
<br/>
<br/>
<input type="submit" tabindex="3" name="textcont" taborder="2" value="Ïðîäîëæèòü" class="buttons"/> <input type="submit" tabindex="3" name="textcont" taborder="2" value="Ïðîäîëæèòü" class="buttons"/>
</form> </form>
</td> </td>

@ -44,15 +44,6 @@
<br/> <br/>
<br/> <br/>
<xsl:call-template name="textEditor"/> <xsl:call-template name="textEditor"/>
<br/>
<input type="checkbox" name="preview" value="1" class="formboxes" disabled="disabled" />
<xsl:text>ß õî÷ó ïðåäâàðèòåëüíî ïðîñìîòðåòü ñîîáùåíèå ïåðåä îòïðàâêîé</xsl:text>
<br/>
<br/>
<input type="checkbox" name="spellcheck" value="1" class="formboxes" onChange="document.replier.preview.checked=this.checked;" disabled="disabled" />
<xsl:text>Ïðîâåðèòü ïðàâîïèñàíèå</xsl:text>
<br/>
<br/>
<input type="submit" tabindex="3" name="textcont" taborder="2" value="Ïðîäîëæèòü" class="buttons"/> <input type="submit" tabindex="3" name="textcont" taborder="2" value="Ïðîäîëæèòü" class="buttons"/>
</form> </form>
</td> </td>

@ -49,15 +49,6 @@
<xsl:call-template name="textEditor"> <xsl:call-template name="textEditor">
<xsl:with-param name="body"><xsl:value-of select="revision/body"/></xsl:with-param> <xsl:with-param name="body"><xsl:value-of select="revision/body"/></xsl:with-param>
</xsl:call-template> </xsl:call-template>
<br/>
<input type="checkbox" name="preview" value="1" class="formboxes" disabled="disabled" />
<xsl:text>ß õî÷ó ïðåäâàðèòåëüíî ïðîñìîòðåòü ñîîáùåíèå ïåðåä îòïðàâêîé</xsl:text>
<br/>
<br/>
<input type="checkbox" name="spellcheck" value="1" class="formboxes" onChange="document.replier.preview.checked=this.checked;" disabled="disabled" />
<xsl:text>Ïðîâåðèòü ïðàâîïèñàíèå</xsl:text>
<br/>
<br/>
<input type="submit" tabindex="3" name="textcont" taborder="2" value="Ïðîäîëæèòü" class="buttons"/> <input type="submit" tabindex="3" name="textcont" taborder="2" value="Ïðîäîëæèòü" class="buttons"/>
</form> </form>
</td> </td>

@ -66,15 +66,6 @@
</xsl:if> </xsl:if>
</xsl:with-param> </xsl:with-param>
</xsl:call-template> </xsl:call-template>
<br/>
<input type="checkbox" name="preview" value="1" class="formboxes" disabled="disabled" />
<xsl:text>ß õî÷ó ïðåäâàðèòåëüíî ïðîñìîòðåòü ñîîáùåíèå ïåðåä îòïðàâêîé</xsl:text>
<br/>
<br/>
<input type="checkbox" name="spellcheck" value="1" class="formboxes" onChange="document.replier.preview.checked=this.checked;" disabled="disabled" />
<xsl:text>Ïðîâåðèòü ïðàâîïèñàíèå</xsl:text>
<br/>
<br/>
<input type="submit" tabindex="3" name="textcont" taborder="2" value="Ïðîäîëæèòü" class="buttons"/> <input type="submit" tabindex="3" name="textcont" taborder="2" value="Ïðîäîëæèòü" class="buttons"/>
</form> </form>
</td> </td>

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="Windows-1251"?> <?xml version="1.0" encoding="Windows-1251"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<xsl:import href="UserInfoBar.xslt"/>
<xsl:template name="textEditor"> <xsl:template name="textEditor">
<xsl:param name="body"/> <xsl:param name="body"/>
<input type="hidden" name="convert" value="markup"/> <input type="hidden" name="convert" value="markup"/>
@ -10,7 +12,14 @@
<xsl:attribute name="onKeyUp">storeCaret(this);</xsl:attribute> <xsl:attribute name="onKeyUp">storeCaret(this);</xsl:attribute>
<xsl:attribute name="onClick">storeCaret(this);</xsl:attribute> <xsl:attribute name="onClick">storeCaret(this);</xsl:attribute>
<xsl:attribute name="onKeyPress">checkKeyPressed(document.replier,event,false);</xsl:attribute> <xsl:attribute name="onKeyPress">checkKeyPressed(document.replier,event,false);</xsl:attribute>
<xsl:value-of select="$body"/> <xsl:choose>
<xsl:when test="bodyUBB">
<xsl:value-of select="bodyUBB"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$body"/>
</xsl:otherwise>
</xsl:choose>
</textarea> </textarea>
<br/> <br/>
<br/> <br/>
@ -244,6 +253,63 @@ function insertInBody(str) {
</td> </td>
</tr> </tr>
</table> </table>
<br/>
<input type="checkbox" name="preview" value="1" class="formboxes" onClick="changeActionToSelf(this)" />
<xsl:text>ß õî÷ó ïðåäâàðèòåëüíî ïðîñìîòðåòü ñîîáùåíèå ïåðåä îòïðàâêîé</xsl:text>
<xsl:if test="bodyIntermediate">
<br/>
<table width="100%" cellspacing="1" cellpadding="3" border="0">
<tr>
<td width="120" valign="top" class="darktable" rowspan="2">
<xsl:apply-templates select="session/user" mode="userInfoBar"/>
</td>
<td class="subjecttable">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" width="65%" valign="top">
<a target="_blank" class="separate">
<img border="0" alt="" style="vertical-align: text-bottom">
<xsl:attribute name="src">/static/images/message-normal-read.gif</xsl:attribute>
</img>
</a>
<b class="separate"><xsl:value-of select="title"/></b>
<br />
<font class="small" style="padding-left:2em"><xsl:apply-templates select="postDate/date" mode="dateTime"/></font>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="lighttable">
<table width="100%" cellspacing="0" cellpadding="0" style="table-layout: fixed">
<tr>
<td>
<br />
<font class="post">
<xsl:value-of select="bodyIntermediate" disable-output-escaping="yes" />
<br />
<br />
</font>
</td>
</tr>
<xsl:if test="session/user/signature != ''">
<tr>
<td>
<div style="width:100%;max-height:50px;height: expression( this.scrollHeight > 49 ? '50px' : 'auto' );overflow:hidden">
<font size="-2"><xsl:value-of select="poster/user/signature"/><br /></font>
</div>
</td>
</tr>
</xsl:if>
</table>
</td>
</tr>
</table>
</xsl:if>
<br/>
<br/>
</xsl:template> </xsl:template>
<xsl:template match="layer"> <xsl:template match="layer">

Loading…
Cancel
Save