Skip to content

Commit

Permalink
Upd
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanmir committed Jul 15, 2019
1 parent 961625c commit c4bed80
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 54 deletions.
22 changes: 19 additions & 3 deletions packages/style/src/demo/full-demo.css
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,7 @@ a:hover {
height: 20px;
min-width: 25px;
margin-right: 6px;
margin-top: 3px;
}

.dp-po-related-list li {
Expand Down Expand Up @@ -1565,6 +1566,7 @@ a:hover {
border: 0;
max-width: 100%;
padding: 14px 29px;
margin-bottom: 39px;
}

.dp-Template .dp-po-Info-wrap .dp-po-info-txt {
Expand All @@ -1584,7 +1586,7 @@ a:hover {
}

.dp-po-form-registration .dp-po-title-tab,
.dp-po-list.comment--item,
/*.dp-po-autorization-wrap .dp-po-list.comment--item,*/
.dp-po-d-none {
display: none;
}
Expand All @@ -1595,12 +1597,18 @@ a:hover {
display: flex;
}

.dp-po-comments-wrap .dp-po-list.comment--item {
/*.dp-po-comments-wrap .dp-po-list.comment--item {
padding-top: 40px;
}
}*/

/* mobile -v */

@media (max-width: 1280px) {
.subscribe--dropdown .dp-po-dropdown-atom .dp-po-Icon {
margin: 0 10px 0 15px;
}
}

@media (max-width: 992px) {
.dp-po-nav .dp-po-Logo-descript,
.dp-po-Logo-wrap .dp-po-Icon::after,
Expand Down Expand Up @@ -1970,6 +1978,14 @@ a:hover {
margin: 0;
}

.dp-po-comments.comments-list .dp-po-sort {
display: none;
}

.dp-po-comments.comments-list.is-active .dp-po-sort {
display: block;
}

.dp-po-md-collapse-content {
padding: 10px 0;
display: none;
Expand Down
67 changes: 55 additions & 12 deletions packages/style/website/static/demos/kb-view.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ <h2 class="dp-po-Title-page"><span class="dp-po-Icon Icon--book dp-po-hidden-md"
<div class="dp-po-Icon Icon--Dots Icon--grey-darkest"></div>
<ul class="dp-po-dropdown-menu Dropdown-share">
<li class="dp-po-dropdown-menu-item dp-po-close"><span class="dp-po-Icon Icon--close"></span></li>
<li class="dp-po-dropdown-menu-item"><span class="dp-po-Icon Icon--share"></span>Share<span class="dp-po-Icon Icon--caret-right dp-po-share-btn"></span>
<li class="dp-po-dropdown-menu-item dp-po-share"><span class="dp-po-Icon Icon--share"></span>Share<span class="dp-po-Icon Icon--caret-right dp-po-share-btn"></span>
<ul class="dp-po-dropdown-menu">
<li class="dp-po-dropdown-menu-item dp-po-back-btn"><span class="dp-po-Icon Icon--back"></span></li>
<li class="dp-po-dropdown-menu-item"><span class="dp-po-Icon Icon--ticket"></span>Email</li>
Expand Down Expand Up @@ -386,7 +386,7 @@ <h6 class="dp-po-title">Attachments</h6>
<div class="dp-po-comments dp-po-add-comments">
Add comment <span class="dp-po-Icon Icon--caret-down Icon--primary dp-po-hidden-md"></span>
</div>
<div class="dp-po-comments-wrap">
<div class="dp-po-comments-wrap dp-po-autorization-wrap">

<!-- valid tooltip -->
<div class="dp-po-registration-step dp-po-Info-wrap">
Expand All @@ -399,7 +399,7 @@ <h6 class="dp-po-title">Attachments</h6>
<span class="dp-po-info-txt">Please validate your email address by following the link in the email sent to you. <a href="#" class="Resend--Link">Resend link?</a></span>
</div>
</div>
<form class="dp-po-list comment--item">
<!-- <form class="dp-po-list comment--item">
<span class="dp-po-subtitle">
<span class="dp-po-username">
<img class="dp-po-Avatar-icon" src="../img/docs/avatar.png" alt="">
Expand Down Expand Up @@ -439,7 +439,7 @@ <h6 class="dp-po-title">Attachments</h6>
<label for="DemoPublishCheckbox-04">Subscribe</label>
</span>
</div>
</form>
</form> -->

<!-- </div> -->

Expand All @@ -459,8 +459,8 @@ <h6 class="dp-po-title">Attachments</h6>
<!-- step one -->
<form class="dp-po-registration-step dp-po-step-one Form--login is-active">
<div class="dp-po-input-wrap">
<input type="email" name="email" placeholder="Email">
<input type="password" name="password" placeholder="Password">
<input type="email" required name="email" placeholder="Email">
<input type="password" required name="password" placeholder="Password">
<span class="dp-po-CustomCheckbox">
<input type="checkbox" class="dp-po-ControlInput" id="loginCheckbox-01"></input>
<label for="loginCheckbox-01">Stay logged in</label>
Expand All @@ -482,13 +482,13 @@ <h6 class="dp-po-title">Attachments</h6>
<h4 class="dp-po-title dp-po-hidden-md-up">Register</h4>
<div class="dp-po-input-wrap">
<label class="dp-po-hidden-md-up">Name</label>
<input type="" name="" placeholder="Name">
<input type="" name="name" required placeholder="Name">
<label class="dp-po-hidden-md-up">Email</label>
<input type="email" name="" placeholder="Email">
<input type="email" required name="email" placeholder="Email">
<label class="dp-po-hidden-md-up">Password</label>
<input type="password" name="" placeholder="Password">
<input type="password" required name="password" placeholder="Password">
<label class="dp-po-hidden-md-up">Confirm password</label>
<input type="password" name="" placeholder="Confirm password">
<input type="password" required name="passwordconfirm" placeholder="Confirm password">

<label class="dp-po-hidden-md-up">Timezone</label>
<select name="timezone" class="as-dp-po-Dropdown-container" placeholder="Select timezone">
Expand All @@ -501,16 +501,59 @@ <h4 class="dp-po-title dp-po-hidden-md-up">Register</h4>

<label>Captcha</label>
<div class="dp-po-captcha">
<input type="" name="" placeholder="" class="dp-po-textarea-captcha">
<input type="" name="captcha1" placeholder="" class="dp-po-textarea-captcha">
<span class="dp-po-Icon Icon--refresh Icon--primary"></span>
<input type="" name="" placeholder="Insert text" class="dp-po-text-captcha">
<input type="" name="captcha2" placeholder="Insert text" class="dp-po-text-captcha">
</div>

<a href="" class="dp-po-description">To prove you are human, please insert the text you can see in the box above.</a>
<button class="dp-po-Button Button--large">Register</button>
</div>
</form>

<!-- Demo -->
<form class="dp-po-list comment--item">
<span class="dp-po-subtitle">
<span class="dp-po-username">
<img class="dp-po-Avatar-icon" src="../img/docs/avatar.png" alt="">
Nick Green
</span>
</span>
<span class="dp-po-Forms Forms--Textarea">
<div class="dp-po-Textarea">
<span class="dp-po-comment-subtitle">Your comment<i class="Color--primary">*</i></span>
<span class="dp-po-Icon-resizer"></span>
<textarea name="text" placeholder="Enter comment"></textarea>
</div>
</span>

<div class="dp-po-Upload-wrapper">
<span class="dp-po-comment-subtitle">Add attachment</span>
<span class="dp-po-Upload">
<span class="dp-po-Upload-item dp-po-Choose-btn">
<label for="file-upload">
<span class="dp-po-Icon Icon--file Icon--grey-dark"></span>
Choose a file
</label>
<input id="file-upload" type="file"/>
</span>
or
<span class="dp-po-Upload-item dp-po-Dragdrop-btn">
<span class="dp-po-Icon Icon--dragdrop"></span>
Drag and drop
</span>
</span>
</div>

<div class="dp-po-button-wrap">
<button class="dp-po-Button">Publish</button>
<span class="dp-po-CustomCheckbox CustomCheckbox--medium">
<input type="checkbox" class="dp-po-ControlInput" id="DemoPublishCheckbox-04"></input>
<label for="DemoPublishCheckbox-04">Subscribe</label>
</span>
</div>
</form>

</div>
</div>

Expand Down
61 changes: 22 additions & 39 deletions packages/style/website/static/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,31 +99,14 @@ $(document).ready(function(){
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(email);
}
$('body').on('click', '.Resend--Link', function(event) {
var form = $(this).attr('data-form-display');
// console.log(form);
$('.dp-po-Info.Info--danger').addClass('dp-po-d-none');
$('.dp-po-title-tab').addClass('is-active');
$(form).addClass('is-active');
return false;
});
$('body').on('submit', '.Form--login', function(event) {
$(this).removeClass('is-active');
var email = $(this).find('[name="email"]').val();
var is_valid_email = validateEmail(email);
var password = $(this).find('[name="password"]').val();
$('.dp-po-Info.Info--success').addClass('dp-po-d-none');
$('.dp-po-Info.Info--danger').addClass('dp-po-d-none');
$('.dp-po-title-tab').removeClass('is-active');
if(is_valid_email == true && password.trim() != ''){
$('.dp-po-Info.Info--success').removeClass('dp-po-d-none');
$('.comment--item').addClass('is-active');
}else{
$('.dp-po-Info.Info--danger a').attr('data-form-display','.Form--login');
$('.dp-po-Info.Info--danger').removeClass('dp-po-d-none');
}
return false;
});
// $('body').on('click', '.Resend--Link', function(event) {
// var form = $(this).attr('data-form-display');
// // console.log(form);
// $('.dp-po-Info.Info--danger').addClass('dp-po-d-none');
// $('.dp-po-title-tab').addClass('is-active');
// $(form).addClass('is-active');
// return false;
// });
$('body').on('click', '.dp-po-Dropdown-container .dp-po-dropdown-atom', function(event) {
$(this).toggleClass('is-active');
});
Expand Down Expand Up @@ -166,32 +149,30 @@ $(document).ready(function(){
var email = $(this).find('[name="email"]').val();
var is_valid_email = validateEmail(email);
var password = $(this).find('[name="password"]').val();
$('.dp-po-Info.Info--success').addClass('dp-po-d-none');
$('.dp-po-Info.Info--danger').addClass('dp-po-d-none');
$('.dp-po-title-tab').removeClass('is-active');
if(is_valid_email == true && password.trim() != ''){
$('.dp-po-Info.Info--success').addClass('dp-po-d-none');
$('.dp-po-Info.Info--danger').addClass('dp-po-d-none');
$('.dp-po-title-tab').removeClass('is-active');
$('.dp-po-Info.Info--success').removeClass('dp-po-d-none');
$('.comment--item').addClass('is-active');
}else{
$('.dp-po-Info.Info--danger a').attr('data-form-display','.Form--login');
$('.dp-po-Info.Info--danger').removeClass('dp-po-d-none');
// }else{
}
return false;
});
$('body').on('submit', '.Form--Registration', function(event) {
$(this).removeClass('is-active');
var email = $(this).find('[name="email"]').val();
var is_valid_email = validateEmail(email);
var password = $(this).find('[name="password"]').val();
$('.dp-po-Info.Info--success').addClass('dp-po-d-none');
$('.dp-po-Info.Info--danger').addClass('dp-po-d-none');
$('.dp-po-title-tab').removeClass('is-active');
if(is_valid_email == true && password.trim() != ''){
$('.dp-po-Info.Info--success').removeClass('dp-po-d-none');
$('.comment--item').addClass('is-active');
}else{
$('.dp-po-Info.Info--danger a').attr('data-form-display','.Form--Registration');
if(email.trim() != '' && password.trim() != ''){
$('.dp-po-title-tab').removeClass('is-active');
// $('.dp-po-Info.Info--danger a').attr('data-form-display','.Form--login');
$('.dp-po-Info.Info--danger').removeClass('dp-po-d-none');
//$('.dp-po-Info.Info--success.dp-po-d-none').removeClass('dp-po-d-none');
//}else{
// $('.dp-po-Info.Info--danger a').attr('data-form-display','.Form--Registration');
// $('.dp-po-Info.Info--danger').removeClass('dp-po-d-none');
}
return false;
});
Expand Down Expand Up @@ -239,12 +220,14 @@ $(document).ready(function(){
$(this).find('.dp-po-dropdown-menu').slideDown(200);
})

$('body').on('click', '.dp-po-share-btn', function(event) {
$('body').on('click', '.dp-po-share', function(event) {
$('body').find('.Dropdown-share .dp-po-dropdown-menu').addClass('is-active');
return false;
})

$('body').on('click', '.dp-po-dropdown-menu .dp-po-back-btn', function(event) {
$('body').find('.Dropdown-share .dp-po-dropdown-menu').removeClass('is-active');
return false;
})
$('body').on('click', '.dp-po-md-collapse-title', function(event) {
if($('body').outerWidth() < 992){
Expand Down

0 comments on commit c4bed80

Please sign in to comment.