TypeScript Ryan
How do I make an typescript ryan?
What is a typescript ryan? How do you make a typescript ryan? This script and codes were developed by Rpun on 12 August 2022, Friday.
TypeScript Ryan - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>TypeScript Ryan</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"> <div class="row"> <div class="col-sm-4"> <div class="form-group"> <label for="changeType">Change Type</label> <select name="changeType" id="changeType"> <option>Option 1</option> <option>Option 2</option> <option>Option 3</option> </select> <button name="AddEntry" id="AddEntry" class="btn-primary">+</button> <div class="clearfix visible-xs"></div> <!--<textarea class="form-control" rows="5" id="result"></textarea>--> </div> </div> <div class="col-sm-8"> <div class="form-group"> <textarea class="form-control" rows="20" id="result2"></textarea> </div> </div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
TypeScript Ryan - Script Codes CSS Codes
#result2 { width: 400px; height:600px;
}
TypeScript Ryan - Script Codes JS Codes
"use strict";
var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var selfReport;
(function (selfReport) { var ChangeType; (function (ChangeType) { ChangeType[ChangeType["Address"] = 0] = "Address"; ChangeType[ChangeType["Phone"] = 1] = "Phone"; ChangeType[ChangeType["Fax"] = 2] = "Fax"; })(ChangeType = selfReport.ChangeType || (selfReport.ChangeType = {})); var BaseEntity = (function () { function BaseEntity(objectType) { this.ID = this.CreateUUID(); this.EntryType = objectType; } BaseEntity.prototype.CreateUUID = function () { var d = new Date().getTime(); if (window.performance && typeof window.performance.now === "function") { d += performance.now(); } var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { var r = (d + Math.random() * 16) % 16 | 0; d = Math.floor(d / 16); return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16); }); return uuid; }; return BaseEntity; }()); var AddressEntity = (function (_super) { __extends(AddressEntity, _super); function AddressEntity(object) { return _super.call(this, object) || this; } AddressEntity.prototype.ToParameterList = function () { var entries = new Array(); entries['ID'] = this.ID; entries['EntryType'] = this.EntryType; // Populate our vlaues switch (this.EntryType) { case selfReport.ChangeType.Address: if (this.Street !== "undefined") { entries['Street'] = this.Street; } if (this.City !== "undefined") { entries['City'] = this.City; } if (this.State !== "undefined") { entries['State'] = this.State; } if (this.ZipCode !== "undefined") { entries['ZipCode'] = this.ZipCode; } break; case selfReport.ChangeType.Fax: if (this.Fax !== "undefined") { entries['Fax'] = this.Fax; } break; case selfReport.ChangeType.Phone: if (this.Phone !== "undefined") { entries['Phone'] = this.Phone; } break; } return entries; }; return AddressEntity; }(BaseEntity)); selfReport.AddressEntity = AddressEntity; var Changes = (function () { function Changes() { this.entries = new Array(); } Changes.prototype.Add = function (object, args) { switch (object) { case selfReport.ChangeType.Address: var newAddress = new selfReport.AddressEntity(selfReport.ChangeType.Address); if (args['ID']) { newAddress.ID = args['ID']; } if (args['Street']) { newAddress.Street = args['Street']; } if (args['City']) { newAddress.City = args['City']; } if (args['State']) { newAddress.State = args['State']; } if (args['ZipCode']) { newAddress.ZipCode = args['ZipCode']; } this.entries.push(newAddress); break; case selfReport.ChangeType.Fax: var newFax = new selfReport.AddressEntity(selfReport.ChangeType.Fax); if (args['ID']) { newFax.ID = args['ID']; } if (args['Fax']) { newFax.Fax = args['Fax']; } this.entries.push(newFax); break; case selfReport.ChangeType.Phone: var newPhone = new selfReport.AddressEntity(selfReport.ChangeType.Phone); if (args['ID']) { newPhone.ID = args['ID']; } if (args['Phone']) { newPhone.Phone = args['Phone']; } this.entries.push(newPhone); break; } }; Changes.prototype.Delete = function (id) { for (var i in this.entries) { if (this[i]['ID'] == id) { this[i]['ID'].splice(i, 1); } } }; Changes.prototype.Update = function (id, args) { // Iterate through our complete list of changes, find our entry to update for (var i in this.entries) { if (this[i]['ID'] == id) { var myObj = this[i]; // Update based upon the entry type switch (this[i]['EntryType']) { case selfReport.ChangeType.Address: if (args['Street']) { myObj.street = args['Street']; } if (args['City']) { myObj.city = args['City']; } if (args['State']) { myObj.state = args['State']; } if (args['ZipCode']) { myObj.zip = args['ZipCode']; } break; case selfReport.ChangeType.Fax: if (args['Fax']) { myObj.street = args['Fax']; } break; case selfReport.ChangeType.Phone: if (args['Phone']) { myObj.phone = args['Phone']; } break; } } } }; Changes.prototype.GetAll = function () { // return $(this.entries).serializeArray(); return JSON.stringify(this.entries, null, 2); }; return Changes; }()); selfReport.Changes = Changes;
})(selfReport || (selfReport = {}));
/// <reference path="../typings/jquery/jquery.d.ts" />
/// <reference path="../typings/bootstrap-dialog/bootstrap-dialog.d.ts" />
/// <reference path="../typings/modernizr/modernizr.d.ts" />
/// <reference path="../typings/jquery.customselect/jquery.customselect.d.ts" />
/// <reference path="selfreport_changes.ts" />
$(document).ready(function () { var requestedChanges = new selfReport.Changes(); $("#AddEntry").click(function () { // ADDRESS ---------------- // CREATE A NEW ADDRESS var newAddress = new selfReport.AddressEntity(selfReport.ChangeType.Address); newAddress.Street = "601 SW 2nd Ave"; newAddress.City = "Portland"; newAddress.State = "OR"; newAddress.ZipCode = "97229"; // ADD OUR NEW ADDRESS requestedChanges.Add(selfReport.ChangeType.Address, newAddress.ToParameterList()); // PHONE ---------------- // CREATE A NEW PHONE var newPhone = new selfReport.AddressEntity(selfReport.ChangeType.Phone); newPhone.Phone = "(503) 795-1111"; // ADD OUR NEW PHONE requestedChanges.Add(selfReport.ChangeType.Phone, newPhone.ToParameterList()); // FAX ---------------- // CREATE A NEW FAX var newFax = new selfReport.AddressEntity(selfReport.ChangeType.Fax); newFax.Fax = "(503) 795-3094"; // ADD OUR NEW PHONE requestedChanges.Add(selfReport.ChangeType.Fax, newFax.ToParameterList()); var results = requestedChanges.GetAll().toString(); $('#result2').text(results); }); $(function () { $("#changeType").select(); });
});
Developer | Rpun |
Username | echoeCode |
Uploaded | August 12, 2022 |
Rating | 3 |
Size | 5,265 Kb |
Views | 22,264 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Digital brush Mask input | 4,058 Kb |
ShowModalUsingDialog | 1,928 Kb |
Form with div | 1,962 Kb |
How dropdownlist works | 1,857 Kb |
AppendTo | 1,722 Kb |
Kendo multiselect demo | 1,607 Kb |
Ajax loading image experiment | 1,722 Kb |
Divitis Desgin | 2,122 Kb |
JqueryUI Autocomplete | 1,602 Kb |
Collapse bootstrap panel accordion | 2,534 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
SVG Text Masking | JMChristensen | 2,141 Kb |
Drifting Clouds | Benedikte | 2,247 Kb |
WRENCH - STAFF | Lolita-adams | 1,608 Kb |
Siema - add pagination to prototype | Pawelgrzybek | 2,575 Kb |
Large canvas mousemove experiment | Jibbon | 2,885 Kb |
Responsive Section hover effect to show content | Berdejitendra | 2,540 Kb |
A Pen by tugce | Ecgutcnkr | 4,197 Kb |
Realistic Buttons | Stoypenny | 2,248 Kb |
STAR WARS LIGHTSABER | Francoiscoron | 4,420 Kb |
Delete Hover | Chungman93 | 2,557 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!