Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8" />
- <title>Прва задача</title>
- <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" />
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
- <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
- <style>
- * {
- font-family: Verdana;
- }
- h1{
- margin-top: 0px !important;
- }
- input {
- display: block;
- margin-bottom: 10px;
- }
- .wizard_tab{
- border: solid 1px black;
- padding: 20px;
- }
- .content {
- width: 100%;
- height: auto;
- min-height: 100px;
- display: block;
- margin-bottom: 10px;
- background: #A9F5BC;
- }
- .container {
- width: 400px;
- height: 400px;
- padding: 20px;
- /*overflow: scroll;*/
- }
- .navbar, .buttons {
- width: 400px;
- padding: 20px;
- background: #A9D0F5;
- }
- .navbar, .buttons, #sent_items, #done_end{
- display: none;
- }
- .buttons {
- text-align: center;
- }
- .buttons button {
- width: 180px !important;
- }
- #sent_items {
- height: 100%;
- /*overflow: scroll;*/
- }
- .nav {
- /*position: relative;*/
- vertical-align: top;
- width: auto;
- height: 40px;
- padding: 8px;
- font-size: 22px;
- color: white;
- text-align: center;
- margin-right: 10px !important;
- background: #0174DF;
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
- border: 0;
- border-bottom: 2px solid #e2b607;
- -webkit-box-shadow: inset 0 -2px #e2b607;
- box-shadow: inset 0 -2px #e2b607;
- }
- .button {
- position: relative;
- vertical-align: top;
- width: auto;
- height: 40px;
- padding: 8px;
- font-size: 22px;
- color: white;
- text-align: center;
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
- background: #f1c40f;
- border: 0;
- border-bottom: 2px solid #e2b607;
- cursor: pointer;
- -webkit-box-shadow: inset 0 -2px #e2b607;
- box-shadow: inset 0 -2px #e2b607;
- }
- #send{
- background: #64CB42;
- border-bottom: 2px solid #045FB4;
- -webkit-box-shadow: inset 0 -2px #45862F;
- box-shadow: inset 0 -2px #45862F;
- }
- .dialog{
- padding: 5px !important;
- min-width: 330px !important;
- }
- #content{
- min-height: 100px;
- width: 290px !important;
- max-width: 290px !important;
- margin: 5px;
- }
- #error, #error2{
- color: red;
- display:none ;
- margin-bottom: 5px !important;
- }
- #sent, #email, #done {
- border-bottom: 2px solid #045FB4;
- -webkit-box-shadow: inset 0 -2px #045FB4;
- box-shadow: inset 0 -2px #045FB4;
- margin-right: 10px;
- }
- #done_end {
- text-align: center;
- vertical-align: middle;
- }
- .passed {
- background: #BDBDBD;
- }
- .active {
- background: #FF8000;
- }
- .pending {
- background: #81DAF5;
- }
- #feedback { font-size: 1.4em; }
- #selectable .ui-selecting { background: #FECA40; }
- #selectable .ui-selected { background: #F39814; color: white; }
- #selectable { list-style-type: none; margin: 0; padding: 0; min-width: 200px !important; overflow: scroll; }
- #selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: auto; min-width: 200px !important; }
- </style>
- <script>
- var password = "";
- function isValid(pass){
- return (pass.length >= 6 && !/^[a-zA-Z0-9- ]*$/.test(pass));
- }
- $(document).ready(function(){
- $(".password_insert").dialog({
- modal:true,
- closeOnEscape: false,
- open: function(event, ui) { $(".ui-dialog-titlebar-close", ui.dialog | ui).hide();},
- buttons: {
- Ok: function() {
- password = $("#ins_pass").val();
- if(password == $("#rep_pass").val() && isValid(password)) {
- $(this).dialog("close");
- }
- else{
- $("#error").show();
- }
- }
- }
- });
- $(".password_prompt").dialog({
- autoOpen: false,
- modal:true,
- closeOnEscape: false,
- open: function(event, ui) { $(".ui-dialog-titlebar-close", ui.dialog | ui).hide();},
- buttons: {
- Ok: function() {
- if(password == $("#pass").val()){
- $(".content").text($("#content").val());
- $("#pass").val("");
- $(this).dialog("close");
- }
- else{
- $("#error2").show();
- }
- }
- }
- });
- $(".dialog").dialog({
- autoOpen: false,
- minWidth: 330,
- open: function(){
- $("#to_transfer").text("To: " + $("#to").val());
- $("#subject_transfer").text("Subject: " + $("#subject").val());
- $("#cc_transfer").text("Cc: " + $("#cc").val());
- }
- });
- $("#clear").click(function(){
- $("#content").val("");
- });
- $("#send").click(function(){
- $("#content").val("");
- $(".content").text("");
- $("#to").val("");
- $("#subject").val("")
- $("#cc").val("")
- });
- $("#insert").click(function(){
- $(".dialog").dialog("close");
- $(".password_prompt").dialog('open');
- });
- $("#insert2").click(function(){
- $(".dialog").dialog("open");
- });
- });
- </script>
- </head>
- <body>
- <div class="navbar">
- <span class="nav active" id="email">Email</span>
- <span class="nav" id="sent">Sent</span>
- <span class="nav" id="done">Done</span>
- </div>
- <div class="container">
- <div class="wizard_tab" id="compose_message">
- <h1><b>New message:</b></h1>
- <span>To:</span> <input type="text" name="to" id="to"/>
- <span>Cc:</span> <input type="text" name="cc" id="cc"/>
- <span>Subject:</span> <input type="text" name="subject" id="subject"/>
- <span>Content:</span><span class="content"></span>
- <button class="button" id="insert2">Insert</button>
- <button class="button" id="send" >Send</button>
- <div class="dialog" title="Message Content">
- <span id="to_transfer"></span></br>
- <span id="subject_transfer"></span></br>
- <span id="cc_transfer"></span></br></br>
- <span>Content:</span></br>
- <textarea cols="25" rows="7" type="text" id="content" ></textarea></br>
- <button id="insert">Insert</button>
- <button id="clear">Clear</button>
- </div>
- <div class="password_prompt" title="Password">
- <span id="error2"><b>Password error!</b><br></span>
- <span>Password: </span></br>
- <input type="password" id="pass"/>
- </div>
- <div class="password_insert" title="Set your password">
- <span id="error"><b>Passwords error!</b><br></span>
- <span>New Password: </span></br>
- <input type="password" id="ins_pass"/>
- <span>Repeat Password: </span></br>
- <input type="password" id="rep_pass"/>
- </div>
- </div>
- <div class="wizard_tab" id="sent_items">
- <h1><b>Sent Items:</b></h1>
- <ol id="selectable">
- <li class="ui-widget-content"><span>To: somebody@whocares.com </span><div><span>Subject: LAB 06</span></div></li>
- </ol>
- <button class="button" id="delete">Delete</button>
- </div>
- <div class="wizard_tab" id="done_end">
- <h1>DONE</h1>
- </div>
- </div>
- <div class="buttons">
- <button class="button" id="previos">Previous</button>
- <button class="button" id="next">Next</button>
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment