/
ivan
/
ModMas
Обзор
Документация
Войти
/
ivan
/
ModMas
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
ModuleMaster/qc/dms.aspx
183 строки
8 KB
i.krivokon
Initial commit
13 мар 2026, 13:49
13 мар 2026, 13:49
00d9fb6
Код
Авторство
О чём код?
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="dms.aspx.vb" Inherits="Xml_viewTable" EnableEventValidation="false" ValidateRequest="false" MaintainScrollPositionOnPostback="true" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <%@ Register Src="~/UserControls/editableGridNew.ascx" TagPrefix="uc1" TagName="editableGridNew" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Module Master Table Viever</title> <style type="text/css">key .addrequest { margin: 0 auto; } #searchEmployeeForm td { text-align: center; } #detailsBody { text-align: center; } #detailsBody span { font-size: x-large; } .focus { box-shadow: 0 0 5px rgba(0, 0, 255, 1); -webkit-box-shadow: 0 0 5px rgba(0, 0, 255, 1); -moz-box-shadow: 0 0 5px rgba(0, 0, 255, 1); } #approvalSubmitForm { border: 1px solid gray; border-collapse: collapse; } #approvalSubmitForm td { border: 1px solid gray; border-collapse: collapse; padding-bottom: 8px; padding-top: 8px; padding-left: 5px; } .none{ display : none; } </style> </head> <body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> <Scripts> <asp:ScriptReference Path="~/Scripts/jquery-1.9.1.min.js" /> </Scripts> </asp:ScriptManager> <uc1:editableGridNew runat="server" ID="edTableToView" TableId ="1304" /> </div> <div style="width: 350px; border: 1px solid black;" id="requestFormWrapper" class="dialog"> <div class="center">Search PIC</div> <table id="approvalSubmitForm" style="width: 100%; border: 1px solid gray; border-collapse: collapse;"> <tr> <td class="auto-style3">PIC</td> <td class="auto-style4"> <asp:TextBox ID="pic" Enabled="true" runat="server" Width="98%" TextMode="Search" ClientIDMode="Static" Text="Type PIC name or ID to search"></asp:TextBox> <asp:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" DelimiterCharacters="" Enabled="True" ServiceMethod="searchEmployee" ServicePath="dms.aspx" TargetControlID="pic" MinimumPrefixLength="3" UseContextKey="True"> </asp:AutoCompleteExtender> </td> <td> <img src="../Images/Buttons/add.png" id="addApprover" class="click" alt="add approver" /></td> </tr> <tr> <td colspan="3"> <asp:TextBox ID="txtPicList" ClientIdMode="Static" TextMode ="MultiLine" runat ="server" Height ="100px" Width ="325px"></asp:TextBox> </td> </tr> </table> <div class="right"> <img runat="server" src="~/Images/Save.png" class="icon_small action savepic" title="Submit" alt="" /> <img alt="" runat="server" src="../Images/Cancel.png" class="icon_small action canceldoc" title="Cancel" /> <asp:HiddenField ID="projectId" runat="server" /> </div> </div> <asp:PlaceHolder ID="gridcommandhandlerscript" runat="server"></asp:PlaceHolder> <script type="text/javascript"> jQuery.fn.center = function () { this.css("position", "absolute"); this.css("top", (($(window).height() - this.outerHeight()) / 2) + $(window).scrollTop() + "px"); this.css("left", (($(window).width() - this.outerWidth()) / 2) + $(window).scrollLeft() + "px"); return this; } $("#pic").bind('keydown', function (e) { if ((e.which == 13) && (e.shiftKey == false)) { e.preventDefault(); if (($("#pic").val() == '') && ($("#txtPicList").val() != '')) { savepic(); }else { addNewApprover(); }; return false; } }); var currowid; var currow; //Show PIC dialog function showDialog(commandName, rowid) { currowid = rowid; currow = $(".gridrow[rowid=" + currowid + "]"); $("#requestFormWrapper").css("display", "inline"); $("#requestFormWrapper").center(); } $(".canceldoc").click(function () { closeDialog(); }) function closeDialog() { $("#searchResults").html(""); $("#requestFormWrapper").css("display", "none"); } //Manage PIC $("#addApprover").on("click", function(){ addNewApprover(); }) function addNewApprover() { if ($("#pic").val().indexOf('/')!=-1) { var picid = ""; picid = $("#pic").val(); picid = picid.substring(picid.lastIndexOf("/") + 1, picid.length); if ($("#txtPicList").val() != '') { $("#txtPicList").val($("#txtPicList").val() + ';') } $("#txtPicList").val($("#txtPicList").val() + picid); $("#pic").val(''); } } $(".savepic").on("click", function () { savepic(); }); function savepic() { if ($("#txtPicList").val() != '') { var curcell = currow.find("td[field='PIC']") console.log(">:'" + curcell.text() +"'"); if (curcell.text() != " ") { curcell.text(curcell.text() + "; " + $("#txtPicList").val()) console.log(">:1"); } else { curcell.text($("#txtPicList").val()) console.log(">:2"); } var tid = currow.attr("tid"); var rowid = currow.attr("rowid"); SaveDataDirect(tid, rowid, "PIC", "TEXT", curcell.text()); $("#txtPicList").val(''); closeDialog(); } } </script> </form> </body> </html>