Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Update extension warning dialog to match others
Browse files Browse the repository at this point in the history
Also clean up the unnecessary stuff in the dialog JS/CSS now that it's working better
  • Loading branch information
Ray Schamp committed Aug 11, 2015
1 parent e3afc2f commit b70f58a
Show file tree
Hide file tree
Showing 5 changed files with 149 additions and 168 deletions.
207 changes: 110 additions & 97 deletions css/scratchx.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions index.html
Expand Up @@ -456,18 +456,18 @@ <h2>Scratch Family</h2>
<div class="scratch_loading"></div>
</section>
<script type="text/template" id="template-warning">
<div>
<header><a class="modal-close" href="#"></a></header>
<section class="warning">
<h2>Warning: all extensions are experimental</h2>
<p><strong>Warning:</strong> The extensions on this site are experimental</p>
<p>The Scratch Team is <strong>not</strong> responsible for the extensions and projects on this site. Please use caution when using these extensions. <a href="#faq">Learn More.</a></p>
<dialog class="extension-warning with-icon">
<section>
<h2>Warning</h2>
<p>The extensions on this site are experimental</p>
</section>
<section>
<p>The Scratch Team is <strong>not</strong> responsible for the extensions and projects on this site. Please use caution when using these extensions. <a href="#faq">Learn More</a></p>

<button data-action="show" data-target="home">Back to ScratchX home</button>
<button class="success">I understand, continue</button>
</section>
</div>
</dialog>
</script>
<script type="text/template" id="template-short-url">
<dialog class="single">
Expand All @@ -484,7 +484,7 @@ <h2>Short URL</h2>
</dialog>
</script>
<script type="text/template" id="template-extension-url">
<dialog class="single extension-url">
<dialog class="extension-url with-icon">
<section>
<h2>Open an Extension URL</h2>
<p>Paste the web address below</p>
Expand All @@ -499,7 +499,7 @@ <h2>Open an Extension URL</h2>
</dialog>
</script>
<script type="text/template" id="template-extension-file">
<dialog class="single extension-file">
<dialog class="extension-file with-icon">
<section>
<h2>Open an Extension Project</h2>
<p>Choose a .sbx file from your local drive</p>
Expand Down
10 changes: 2 additions & 8 deletions js/scratchx.js
Expand Up @@ -228,16 +228,10 @@ function showModal(templateId, data) {

var zIndex = 100;
var modalId = ("modal-" + templateId).replace(",", "-");
$modalwrapper = $("<div class='modal-fade-screen'><div class='modal-inner'><div class='modal-content'></div></div></div>");
$modalwrapper = $("<div class='modal-fade-screen'><div class='modal-inner'></div></div>");
var $modal = getOrCreateFromTemplate(modalId, templateId, "dialog", "body", $modalwrapper, data);
$(".modal-inner", $modal).append('<div class="modal-close" for="'+modalId+'"></div>');
$modal.addClass("modal");

if (typeof(templateId) != "string") {
$modal.addClass("n-children-" + templateId.length);
} else {
$modal.addClass("n-children-1");
}
$modal.addClass("modal");

$(".modal-fade-screen", $modal)
.addClass("visible")
Expand Down
38 changes: 0 additions & 38 deletions sass/base/_base.scss
Expand Up @@ -128,41 +128,3 @@ body > main > article > section {
color: $white;
}
}

#modal-template-warning {
.modal-inner {
border: 1px solid $light-gray;
padding: 0;
width: 50%;
text-align: center;
}
section {
padding: 2em;
overflow: hidden;
}

header {
background: $light-gray;
text-align: right;
line-height: 1.5;
position: relative;
height: 3em;
}

.modal-close {
background: $light-gray;

&:before, &:after {
background: darken($light-gray, 50%);
}

&:hover:before, &:hover:after {
background: darken($light-gray, 60%);
}
}

button {
width: auto;
}

}

0 comments on commit b70f58a

Please sign in to comment.