Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function showAttendMenu(callingControl, guid) {
- var myPnl = $get('" + this.MyPnl.ClientID + @"')
- if(myPnl) {
- var displayIDFld = $get('" + this.AttendanceFld.ClientID + @"');
- var myStyle = myPnl.style;
- if(myStyle.display == 'block' && (guid== '' || guid == displayIDFld.value)) {
- myStyle.display = 'none';
- } else {
- // Get a reference to the PageRequestManager.
- var prm = Sys.WebForms.PageRequestManager.getInstance();
- // Unblock the form when a partial postback ends.
- prm.add_endRequest(function() {
- $('#" + this.MyPnl.ClientID + @"').unblock({ fadeOut: 0});
- });
- var domEl = Sys.UI.DomElement;
- //Move it into position
- var loc = domEl.getLocation(callingControl);
- var width = domEl.getBounds(callingControl).width;
- domEl.setLocation(myPnl, loc.x + width, loc.y - 200);
- //Show it and block it until we finish loading the data
- myStyle.display = 'block';
- $('#" + this.MyPnl.ClientID + @"').block({ message: null, overlayCSS: { backgroundColor:'#fff', opacity: '0.7'} });
- //Load the data
- if(guid != '') { displayIDFld.value = guid; }
- __doPostBack('" + UpdatePanel1.ClientID + @"','');
- }
- }}
- // In your aspx.cs define the server-side method marked with the
- // WebMethod attribute and it must be public static.
- [WebMethod]
- public static string HelloWorld(string name)
- {
- return "Hello World - by " + name;
- }
- // Call the method via javascript
- PageMethods.HelloWorld("Jimmy", callbackMethod, failMethod);
- <script type="text/javascript" src="<%=Response.ApplyAppPathModifier("~/js/jquery-1.2.6.js") %>"></script>
- <script type="text/javascript" src="<%=Response.ApplyAppPathModifier("~/js/jquery.blockUI.js") %>"></script>
- <asp:Panel CssClass="PopOutBox noPrint" ID="MyPnl" style="display: none; z-index:1000; width:230px; position: absolute;" runat="server">
- <cmp:Image MyImageType="SmallCancel" CssClass="fright" runat="server" ID="CloseImg" AlternateText="Close" />
- <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
- <ContentTemplate>
- <asp:HiddenField ID="AttendanceFld" runat="server" />
- <asp:HiddenField ID="DatePickerFld" runat="server" />
- <table width="100%">
- <tr>
- <td valign="top">
- <asp:RadioButtonList EnableViewState="false" ID="AttendRBL" runat="server" RepeatDirection="Vertical">
- <asp:ListItem Selected="True" Text="On Time" Value="" />
- <asp:ListItem Text="Late" Value="Late" />
- <asp:ListItem Text="Absent" Value="Absent" />
- <asp:ListItem Text="Cleaning Flunk" Value="Other" title="This is used for things like cubby flunks" />
- <asp:ListItem Text="Major Cleaning Flunk" Value="Major" title="This is used for things like White Glove flunks" />
- </asp:RadioButtonList>
- </td>
- <td valign="top" style="text-align: center; vertical-align: middle;">
- <asp:CheckBox EnableViewState="false" ID="ExcusedCB" runat="server" />
- <br />
- <asp:Label ID="Label1" EnableViewState="false" AssociatedControlID="ExcusedCB" Text="Excused"
- runat="server" />
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <asp:Label EnableViewState="false" ID="Label2" Text="Notes" runat="server" AssociatedControlID="DataTB" />
- <cmp:HelpPopUp EnableViewState="false" runat="server" Text='Must include "Out Sick" to be counted as ill on reports and progress reports' />
- <br />
- <asp:TextBox ID="DataTB" EnableViewState="false" runat="server" Columns="30" /><br />
- <div style="font-size: 10px; text-align:center;">
- <a href="#" onclick="setAttendVal('<%=this.DataTB.ClientID%>','Out Sick');return false;">
- (Ill)</a> <a href="#" onclick="setAttendVal('<%=this.DataTB.ClientID%>','In Ethics');return false;">
- (Ethics)</a> <a href="#" onclick="setAttendVal('<%=this.DataTB.ClientID %>','Warned');return false;">
- (Warned)</a>
- </div>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <cmp:ImageButton ID="DeleteBtn" OnClientClick="showAttendMenu(this,'');" OnClick="DeleteAttendance" ButtonType="SmallDelete"
- CssClass="fright" runat="server" />
- <cmp:ImageButton ID="SaveBtn" OnClientClick="showAttendMenu(this,'');" OnClick="SaveAttendance" ButtonType="SmallSave" runat="server" />
- </td>
- </tr>
- </table>
- </ContentTemplate>
- </asp:UpdatePanel>
- </asp:Panel>
Add Comment
Please, Sign In to add comment