Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @using IPass.DB.Base
- @using IpassWebApplication.Providers.Profile
- @{
- ProfileIPass profile = ViewBag.profile;
- var detailTemplates = ((Dictionary<string, List<string>>) ViewBag.TagDetailTemplates);
- IEnumerable<SelectListItem> readerList =((List<RfidReader>)ViewBag.RfidReaders).Select(s => new SelectListItem() { Text = s.name, Value = s.id.ToString() }).ToList();
- }
- <div style="width: 225px; float: left; position: relative;">
- @*This is the first window to pop up. It will have the dropdown menu in it*@
- <div id="addRfidCard" style="position: absolute; width: 280px; height: 100px; background-color: #eee;
- padding: 10px; -webkit-box-shadow: 0px 3px 20px #2c2c2c; border: 1px solid black;
- top: 20px; left: 20px; display: none; z-index: 2;">
- <img src="/Content/images/icons/window-close-4.png" style="position: absolute; top: 5px;
- right: 5px; cursor: pointer;" onclick="$(this).parent().fadeOut();" />
- @Html.Label("rfidreaderidlabel", "This is the first page")
- @Html.DropDownList("rfidreaderid", readerList)
- <input type="button" value="Add Rfid Tag" onclick="$('#addRfidCard1').fadeIn(); $(this).parent().fadeOut();" />
- </div>
- @*This is the second window. Currently it is holding the Textbox that I am using as a debug tool to see if the item in the drop down list is being passed*@
- <div id="addRfidCard1" style="position: absolute; width: 280px; height: 100px; background-color: #eee;
- padding: 10px; -webkit-box-shadow: 0px 3px 20px #2c2c2c; border: 1px solid black;
- top: 20px; left: 20px; display: none; z-index: 2;">
- <img src="/Content/images/icons/window-close-4.png" style="position: absolute; top: 5px;
- right: 5px; cursor: pointer;" onclick="$(this).parent().fadeOut();" />
- Scan card now then click next
- @Html.TextBox("Textbox", selectedReader)
- <input type="button" value="Next" onclick="$('#addRfidCard2').fadeIn(); $(this).parent().fadeOut();" />
- </div>
- @*This is the third window. Right now it does nothing but will do something in the future*@
- <div id="addRfidCard2" style="position: absolute; width: 280px; height: 100px; background-color: #eee;
- padding: 10px; -webkit-box-shadow: 0px 3px 20px #2c2c2c; border: 1px solid black;
- top: 20px; left: 20px; display: none; z-index: 2;">
- <img src="/Content/images/icons/window-close-4.png" style="position: absolute; top: 5px;
- right: 5px; cursor: pointer;" onclick="$(this).parent().fadeOut();" />
- <input type="button" value="Add Rfid Tag" onclick="$(this).parent().fadeOut();" />
- </div>
- @*This is the top of the partial view and contains the button that opens the first window*@
- <div style="margin: 10px 0px;">
- <span style="font-weight: bold; text-transform: uppercase; color: #000;">
- <img src="/Content/images/icons/icon-accesscard.png" style="vertical-align: middle;" />
- Rfid Cards
- <img src="/Content/images/icons/edit-add-4.png" style="cursor: pointer; vertical-align: middle;"
- onclick="$('#addRfidCard').fadeIn()" />
- </span>
- </div>
- @*This is a section on the same partial view but is not something I'm working with right now*@
- <div id="tagcontainer">
- @foreach (IPass.DB.Base.RfidTag rfidtag in ViewBag.RfidTags)
- {
- <div class="rfidtag" data="@rfidtag.id" >
- <span class="tagno">@rfidtag.tagNo</span><br />
- <a href="javascript:ShowRfidTagDetails(@rfidtag.id)">edit</a>
- <img src="/Content/images/icons/edit-delete-6.png" class="btnRemove" onclick="User.RfidTagRemoveFromUser('@profile.UserName',@rfidtag.id);" />
- </div>
- }
- </div>
- <div id="tagcontainerDetails">
- @foreach (IPass.DB.Base.RfidTag rfidtag in ViewBag.RfidTags)
- {
- if (detailTemplates.Keys.Contains(rfidtag.id.ToString()))
- {
- <div class="rfidtagDetails" data="@rfidtag.id" >
- <a href="javascript:HideRfidTagDetails(@rfidtag.id)">close</a> | <a href="javascript:SaveRfidTagDetails(@rfidtag.id)">Save</a>
- <br />
- <br />
- @foreach (string detailName in detailTemplates[rfidtag.id.ToString()])
- {
- var detail = rfidtag.Details.Where(w => w.key.Equals(detailName)).FirstOrDefault();
- string value = detail != null ? detail.value : string.Empty;
- <input placeholder="@detailName" name="@detailName" value="@value"/>
- }
- </div>
- }
- }
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement