Browse Source

* Dialogs / Multistep

dev
RubaXa 11 years ago
parent
commit
b271a2260e
  1. 71
      index.html
  2. 2
      ply.css
  3. 3
      st/app.css
  4. BIN
      st/you-win.gif

71
index.html

@ -27,6 +27,7 @@
<h1 title="Try demo!"><u>Ply</u></h1> <h1 title="Try demo!"><u>Ply</u></h1>
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<h2>Alert</h2> <h2>Alert</h2>
@ -41,9 +42,9 @@
</div> </div>
<div class="col-right"> <div class="col-right">
<code> <pre class="javascript"><code>
Ply.dialog("alert", "Hello %username%!"); Ply.dialog("alert", "Hello %username%!");
</code> </code></pre>
</div> </div>
</div> </div>
@ -60,13 +61,13 @@
</div> </div>
<div class="col-right"> <div class="col-right">
<code> <pre class="javascript"><code>
Ply.dialog( Ply.dialog(
"confirm", "confirm",
{ effect: "3d-sign" }, { effect: "3d-sign" },
"Continue?" "Continue?"
); );
</code> </code></pre>
</div> </div>
</div> </div>
@ -86,15 +87,59 @@
</div> </div>
<div class="col-right"> <div class="col-right">
<code> <pre class="javascript"><code>
Ply.dialog("prompt", { Ply.dialog("prompt", {
title: "Spam subscribe", title: "Spam subscribe",
form: { email: "E-mail" } form: { email: "E-mail" }
}); });
</code> </code></pre>
</div>
</div>
<br/>
<div class="row">
<h2>Dialogs / Multistep</h2>
<div class="col-left">
<div class="ply-layer confirm example">
<div class="ply-inside">
<div class="ply-content">You want to win?</div>
<div class="ply-footer"><button class="ply-ctrl ply-ok">Yes</button><button class="ply-ctrl ply-cancel">No</button></div>
</div>
</div>
</div>
<div class="col-right">
<pre class="javascript"><code>
Ply.dialog({
"intro": {
ui: "confirm",
data: {
text: "You want to win?",
ok: "Yes",
cancel: "No"
},
next: "congratulations",
nextEffect: "3d-flip[180,-180]"
},
"congratulations": {
data: {
children: [{
tag: "img",
src: "st/you-win.gif"
}],
ok: "Okay"
}
}
});
</code></pre>
</div> </div>
</div> </div>
</div>
<div class="container">
<div class="row"> <div class="row">
<div style="margin-top: 80px;"> <div style="margin-top: 80px;">
<div id="rubaxa-repos">Loading&hellip;</div> <div id="rubaxa-repos">Loading&hellip;</div>
@ -124,7 +169,7 @@
</script> </script>
<script> <script>
jQuery(function ($) { (function ($) {
hljs.configure({ classPrefix: '' }); hljs.configure({ classPrefix: '' });
$('.example') $('.example')
@ -138,17 +183,13 @@
code[i] = code[i].substr(offset); code[i] = code[i].substr(offset);
}); });
code = code.slice(+(code.length > 1)).join('\n'); code = code.slice(+(code.length > 1)).join('\n').replace(/\t/g, ' ');
$el.data('code', code); $el.data('code', code);
var $codeEl = $('<pre class="javascript"/>') $code.html(code);
.insertBefore($code)
.append('<code>' + code + '</code>')
;
$code.remove();
try { try {
hljs.highlightBlock($codeEl[0]); hljs.highlightBlock($code.parent()[0]);
} catch (err) {} } catch (err) {}
}) })
.on('click', function () { .on('click', function () {
@ -255,7 +296,7 @@
} }
}); });
}); });
}); })(jQuery);
</script> </script>

2
ply.css

@ -149,7 +149,7 @@
border: 2px solid #ccc; border: 2px solid #ccc;
outline: 0; outline: 0;
padding: 5px 10px; padding: 5px 10px;
margin-top: 10px; margin-top: 15px;
font-size: 16px; font-size: 16px;
font-family: "Arial", Helvetica; font-family: "Arial", Helvetica;
box-sizing: border-box; box-sizing: border-box;

3
st/app.css

@ -46,6 +46,7 @@ h2 {
.row { .row {
margin-bottom: 30px; margin-bottom: 30px;
clear: both;
} }
.row:after { .row:after {
clear: both; clear: both;
@ -151,6 +152,8 @@ pre code {
font-family: Menlo, Monaco, Consolas, monospace; font-family: Menlo, Monaco, Consolas, monospace;
line-height: 1.5; line-height: 1.5;
padding: 30px; padding: 30px;
overflow: scroll;
max-height: 220px;
} }

BIN
st/you-win.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Loading…
Cancel
Save