Skip to content

Commit

Permalink
Fix to Java Error
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewste committed Mar 16, 2013
1 parent a9eea41 commit 37e6f5e
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 30 deletions.
9 changes: 7 additions & 2 deletions WebUI/objects.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
var intS = strCook.indexOf("$~");
var intE = strCook.indexOf("~$");
var strPos = strCook.substring(intS + 2, intE);
document.getElementById("propGrid").scrollTop = strPos;
var grid = document.getElementById("propGrid");
if (grid != null) {
grid.scrollTop = strPos;
}
}
}
function SetDivPosition() {
Expand Down Expand Up @@ -96,7 +99,9 @@
<asp:CheckBox runat="server" ID="chkEnabled" /> Enabled
</div>
<div class="span4" style="text-align:right;" >
<asp:Button runat="server" ID="btnAdd" Text="Add" class="btn" OnClick="btnAdd_Click"/>&nbsp<asp:Button runat="server" ID="btnUpdate" Text="Update" class="btn" OnClick="btnUpdate_Click"/>&nbsp<asp:Button runat="server" ID="btnDelete" Text="Delete" class="btn" OnClick="btnDelete_Click"/>
<asp:Button runat="server" ID="btnAdd" Text="Add" class="btn" OnClick="btnAdd_Click"/>&nbsp
<asp:Button runat="server" ID="btnUpdate" Text="Update" class="btn" OnClick="btnUpdate_Click"/>&nbsp
<asp:Button runat="server" ID="btnDelete" Text="Delete" class="btn" OnClick="btnDelete_Click" OnClientClick="return confirm('Are you sure you want to delete the object?');" />
</div>
</div>
</div>
Expand Down
19 changes: 15 additions & 4 deletions WebUI/objtypes.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,28 @@
var intS = strCook.indexOf("$~");
var intE = strCook.indexOf("~$");
var strPos = strCook.substring(intS + 2, intE);
document.getElementById("propGrid").scrollTop = strPos;
var grid = document.getElementById("propGrid");
if (grid != null) {
grid.scrollTop = strPos;
}
}
if (strCook.indexOf("#~") != 0) {
var intS = strCook.indexOf("#~");
var intE = strCook.indexOf("~#");
var strPos = strCook.substring(intS + 2, intE);
document.getElementById("stateGrid").scrollTop = strPos;
var grid = document.getElementById("stateGrid");
if (grid != null) {
grid.scrollTop = strPos;
}
}
if (strCook.indexOf("@~") != 0) {
var intS = strCook.indexOf("@~");
var intE = strCook.indexOf("~@");
var strPos = strCook.substring(intS + 2, intE);
document.getElementById("methodGrid").scrollTop = strPos;
var grid = document.getElementById("methodGrid");
if (grid != null) {
grid.scrollTop = strPos;
}
}
}
function SetDivPosition() {
Expand Down Expand Up @@ -109,7 +118,9 @@
<asp:CheckBox runat="server" ID="chkHideEvents" /> Hide Redundant Events &nbsp;
</div>
<div class="span4" style="text-align:right;" >
<asp:Button runat="server" ID="btnAdd" Text="Add" class="btn" OnClick="btnAdd_Click"/>&nbsp<asp:Button runat="server" ID="btnUpdate" Text="Update" class="btn" OnClick="btnUpdate_Click"/>&nbsp<asp:Button runat="server" ID="btnDelete" Text="Delete" class="btn" OnClick="btnDelete_Click"/>
<asp:Button runat="server" ID="btnAdd" Text="Add" class="btn" OnClick="btnAdd_Click"/>&nbsp
<asp:Button runat="server" ID="btnUpdate" Text="Update" class="btn" OnClick="btnUpdate_Click"/>&nbsp
<asp:Button runat="server" ID="btnDelete" Text="Delete" class="btn" OnClick="btnDelete_Click" OnClientClick="return confirm('Are you sure you want to delete the object type?');"/>
</div>
</div>
</div>
Expand Down
55 changes: 31 additions & 24 deletions WebUI/scripts.aspx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="scripts.aspx.cs" Inherits="scripts" EnableEventValidation="false" MaintainScrollPositionOnPostback="true"%>
<%@ Implements Interface="System.Web.UI.IPostBackEventHandler" %>


<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" Runat="Server">
<%@ Implements Interface="System.Web.UI.IPostBackEventHandler" %>


<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" Runat="Server">
<script>
window.onload = function () {
var strCook = document.cookie;
Expand All @@ -16,13 +16,19 @@
var intS = strCook.indexOf("$~");
var intE = strCook.indexOf("~$");
var strPos = strCook.substring(intS + 2, intE);
document.getElementById("eventScriptGrid").scrollTop = strPos;
var grid = document.getElementById("eventScriptGrid");
if (grid != null) {
grid.scrollTop = strPos;
}
}
if (strCook.indexOf("#~") != 0) {
var intS = strCook.indexOf("#~");
var intE = strCook.indexOf("~#");
var strPos = strCook.substring(intS + 2, intE);
document.getElementById("objTypeScriptGrid").scrollTop = strPos;
var grid = document.getElementById("objTypeScriptGrid");
if (grid != null) {
grid.scrollTop = strPos;
}
}
}
Expand All @@ -46,16 +52,16 @@
function SetObjTypeEventScriptDivPosition() {
var intY = document.getElementById("objTypeScriptGrid").scrollTop;
document.cookie = "yPos=#~" + intY + "~#";
}
}
</script>
<style type="text/css" media="screen">
#editor {
position:relative;
width: 100%;
height: 100%;
}
</style>

</style>

<div class="row-fluid">
<div class="span3">
<div ID="ScriptPanel">
Expand All @@ -77,8 +83,9 @@
<div class="span9">
<div class="row-fluid">
<div class="span12">
Name: <asp:TextBox runat="server" ID="txtName" class="input-xlarge"></asp:TextBox>
<div style="float:right;">Script Processor: <asp:DropDownList runat="server" ID="ddlScriptProcessor" datatextfield="Text" datavaluefield="Value" style="width:300px"></asp:DropDownList></div>
Name: <asp:TextBox runat="server" ID="txtName" class="input-xlarge" />
<div style="float:right;">
Script Processor: <asp:DropDownList runat="server" ID="ddlScriptProcessor" datatextfield="Text" datavaluefield="Value" style="width:300px"></asp:DropDownList></div>
</div>
</div>
<div class="row-fluid">
Expand All @@ -94,7 +101,7 @@
<div class="alert alert-warning" runat="server" id="deleteAlert" visible="false" >Deleted!</div> &nbsp;
<asp:Button runat="server" ID="btnAdd" class="btn" OnClientClick="saveScriptAdd();" Text="Add" /> &nbsp;
<asp:Button runat="server" ID="btnUpdate" class="btn" OnClientClick="saveScriptUpdate();" Text="Update" /> &nbsp;
<asp:Button runat="server" ID="btnDelete" class="btn" OnClick="btnDelete_Click" Text="Delete"/>
<asp:Button runat="server" ID="btnDelete" class="btn" OnClick="btnDelete_Click" Text="Delete" OnClientClick="return confirm('Are you sure you want to delete the script?');"/>
<asp:Button runat="server" ID="btnAdd2" OnClick="btnAdd_Click" style="display:none;" /> &nbsp;
<asp:Button runat="server" ID="btnUpdate2" OnClick="btnUpdate_Click" style="display:none;" /> &nbsp;

Expand Down Expand Up @@ -220,20 +227,20 @@
</div>
</div>
</div>

<asp:HiddenField runat="server" ID="hdnScript"></asp:HiddenField>

<asp:HiddenField runat="server" ID="hdnScript"></asp:HiddenField>
<asp:Label runat="server" ID="hdnSelectedRow" Visible="false"></asp:Label>
<asp:Label runat="server" ID="hdnSelectedScriptName" Visible="false"></asp:Label>
<asp:Label runat="server" ID="hdnSelectedEventScriptRow" Visible="false"></asp:Label>
<asp:Label runat="server" ID="hdnSelectedEventScriptID" Visible="false"></asp:Label>
<asp:Label runat="server" ID="hdnSelectedObjTypeEventScriptRow" Visible="false"></asp:Label>
<asp:Label runat="server" ID="hdnSelectedObjTypeEventScriptID" Visible="false"></asp:Label>
<script src="js/ace.js" type="text/javascript" charset="utf-8"></script>
<script>
var editor = ace.edit("editor");
editor.setTheme("ace/theme/tomorrow");
//editor.getSession().setMode("ace/mode/javascript");
editor.setValue(document.getElementById('<%=hdnScript.ClientID%>').value);
</script>
</asp:Content>

<asp:Label runat="server" ID="hdnSelectedObjTypeEventScriptID" Visible="false"></asp:Label>
<script src="js/ace.js" type="text/javascript" charset="utf-8"></script>
<script>
var editor = ace.edit("editor");
editor.setTheme("ace/theme/tomorrow");
//editor.getSession().setMode("ace/mode/javascript");
editor.setValue(document.getElementById('<%=hdnScript.ClientID%>').value);
</script>
</asp:Content>

0 comments on commit 37e6f5e

Please sign in to comment.