Browse files

Merge branch 'gh-pages' into yellow-help

  • Loading branch information...
2 parents 94d0238 + ee84049 commit 6b13f8cec450bec0d58e26bc6935e6b74f5c99a6 @toolness toolness committed Jun 8, 2012
View
60 css/editor.css
@@ -12,8 +12,8 @@
*/
html, body {
- margin: 0px;
- padding: 0px;
+ margin: 0;
+ padding: 0;
height: 100%;
color: #414244;
}
@@ -37,15 +37,15 @@ img {
background: #f5f5f5;
background-image: url("../img/header-gradient.png");
- background-position: 0px 0px;
+ background-position: 0 0;
height: 120px; /* height value must correspond with section.top */
width: 100%;
- margin: 0px;
- padding: 0px;
+ margin: 0;
+ padding: 0;
- -webkit-box-shadow: 0px 5px 5px 0px rgba(233,233,233,0.5);
- box-shadow: 0px 5px 5px 0px rgba(233,233,233,0.5);
+ -webkit-box-shadow: 0 5px 5px 0 rgba(233,233,233,0.5);
+ box-shadow: 0 5px 5px 0 rgba(233,233,233,0.5);
border-top: 2px solid white;
border-bottom: 1px solid #D6D6D6;
@@ -66,7 +66,7 @@ img {
#header .logo label {
position: relative;
- height: 0px;
+ height: 0;
top: -3.5em;
left: 3.5em;
font-size: 90%;
@@ -80,13 +80,13 @@ img {
display: block;
top: 79px;
width: 100%;
- height: 0px;
+ height: 0;
}
#editor-pane-nav-options {
position: absolute;
- top: 0px;
- left: 0px;
+ top: 0;
+ left: 0;
width: 50%;
height: 100%;
border-right: 1px solid #D6D6D6;
@@ -96,7 +96,7 @@ img {
#preview-pane-nav-options {
position: absolute;
- top: 0px;
+ top: 0;
left: 50%;
width: 50%;
height: 100%;
@@ -109,7 +109,7 @@ img {
text-align: center;
vertical-align: middle;
color: gray;
- padding: 0px 5px;
+ padding: 0 5px;
padding-right: 2em;
white-space: nowrap;
cursor: default;
@@ -165,7 +165,7 @@ img {
left: 65%;
}
#preview-nav-item .icon {
- margin-right: 0px !important;
+ margin-right: 0 !important;
}
#preview-nav-item {
border-left: 1px solid #D6D6D6 !important;
@@ -176,7 +176,7 @@ img {
right: 30% !important;
}
#hints-nav-item {
- margin-left: 0px !important;
+ margin-left: 0 !important;
left: 310px !important;
}
}
@@ -196,7 +196,7 @@ img {
@media screen and (max-width: 420px) {
#preview-pane-nav-options > div.nav-item.buttons {
- left: 0% !important;
+ left: 0 !important;
right: auto !important;
}
}
@@ -216,7 +216,7 @@ img {
padding: 6px 20px 4px 15px;
margin: auto;
color: white;
- top: 0px;
+ top: 0;
}
#save-draft-button {
@@ -353,8 +353,8 @@ img {
}
#text-nav-item ul {
- margin: 0px;
- padding: 0px;
+ margin: 0;
+ padding: 0;
padding-top: 35px;
}
@@ -365,7 +365,7 @@ img {
padding: 10px;
background-repeat: no-repeat;
- background-position: 0px center;
+ background-position: 0 center;
padding-left: 40px;
width: 60px;
@@ -425,9 +425,9 @@ img {
section {
position: absolute;
top: 110px; /* corresponds to #header.height */
- left: 0px;
- right: 0px;
- bottom: 0px; /* corresponds to 20 + footer.height */
+ left: 0;
+ right: 0;
+ bottom: 0; /* corresponds to 20 + footer.height */
}
#editor.loading, #editor.loading .CodeMirror-cursor {
@@ -451,10 +451,10 @@ footer {
padding-bottom: 12px;
position: absolute;
- height: 0px; /* corresponds to section.bottom - 20 */
- bottom: 0px;
- left: 0px;
- right: 0px;
+ height: 0; /* corresponds to section.bottom - 20 */
+ bottom: 0;
+ left: 0;
+ right: 0;
border-top: 1px solid black;
opacity: 0; /* temporary solution, because the spacing depends on having a footer */
@@ -491,7 +491,7 @@ footer {
-webkit-box-sizing: border-box;
box-sizing: border-box;
position: absolute;
- bottom: 0px;
+ bottom: 0;
top: 10px;
}
@@ -505,7 +505,7 @@ footer {
margin: 5px;
background-color: rgb(255,255,150);
border: 1px solid black;
- /*border-width: 0px 0px 1px 0px;*/
+ /*border-width: 0 0 1px 0;*/
padding-top: 0.3em;
line-height: 1em;
color: #006;
@@ -527,7 +527,7 @@ footer {
#preview-holder {
- right: 0px;
+ right: 0;
border-left: 1px solid #D6D6D6;
background: white;
background-color: #F9F9F9;
View
6 css/errorhelp.css
@@ -22,7 +22,7 @@ html .flipped .down-arrow {
* editing area. CodeMirror.addWidget() will set the left side on the
* style attribute of the widget to be where the relevant character is,
* and we want to override that. */
- left: 0px !important;
+ left: 0 !important;
width: 97%;
height: 140px;
@@ -33,8 +33,8 @@ html .flipped .down-arrow {
white-space: normal;
border: 1px solid rgb(193,193,193);
- -webkit-box-shadow: 0px 0px 5px 1px #C1C1C1;
- box-shadow: 0px 0px 5px 1px #C1C1C1;
+ -webkit-box-shadow: 0 0 5px 1px #C1C1C1;
+ box-shadow: 0 0 5px 1px #C1C1C1;
z-index: 1000;
View
47 css/modals.css
@@ -6,8 +6,8 @@
z-index: 2000;
display: block;
position: absolute;
- top: 0px;
- left: 0px;
+ top: 0;
+ left: 0;
background-color: rgba(0,0,0,0.2);
height: 100%;
width: 100%;
@@ -46,7 +46,7 @@
transform: rotate(45deg);
border: 1px solid #C0C0C0;
- border-width: 1px 0px 0px 1px;
+ border-width: 1px 0 0 1px;
margin-bottom: 1.5em;
}
@@ -69,7 +69,7 @@
}
.thimble-grey-bar #modal-close-button {
- top: 0px;
+ top: 0;
}
.thimble-menu-content {
@@ -96,10 +96,10 @@
}
.thimble-grey-bar .thimble-title {
- top: 0px;
+ top: 0;
text-align: left;
- padding: 1em 1em 0.5em 0em;
- padding-left: 0px;
+ padding: 1em 1em 0.5em 0;
+ padding-left: 0;
}
@@ -150,14 +150,14 @@
.thimble-additionals ul {
list-style: none;
text-align: center;
- margin: 1em 0px;
- padding: 0px;
+ margin: 1em 0;
+ padding: 0;
}
.thimble-additionals ul li {
display: table-cell;
vertical-align: middle;
- padding: 0px 5px;
+ padding: 0 5px;
}
.collapsed .thimble-title:before {
@@ -174,7 +174,7 @@
}
.thimble-grey-bar .thimble-additionals {
- padding: 0px 1em;
+ padding: 0 1em;
}
.thimble-additionals a {
@@ -222,7 +222,7 @@ html.deployment-type-development #confirm-dialog .development-note {
padding-top: 7px;
text-indent: -20px;
width: 60px;
- margin: 0px 1em;
+ margin: 0 1em;
}
.confirmation-button.yes-button {
@@ -232,29 +232,6 @@ html.deployment-type-development #confirm-dialog .development-note {
.confirmation-button.no-button {
background-image: url("../img/no.png");
}
-/*
-.confirmation-button .mark {
- position: relative;
- top: 0px;
- display: inline-block;
- width: 18px;
- height: 18px;
- border-radius: 10px;
- background-color: rgba(0,0,0,0.4);
- color: white;
- margin-right: -9px;
- background-repeat: no-repeat;
- background-position: center center;
-}
-
-.confirmation-button.yes-button .mark {
- background-image: url("../img/yes.png");
-}
-
-.confirmation-button.no-button .mark {
- background-image: url("../img/no.png");
-}
-*/
.accordion {
background-color:inherit;
View
4 css/tabzilla-overrides.css
@@ -1,7 +1,7 @@
#tabzilla-panel {
z-index: 9001;
- -webkit-box-shadow: 0px 5px 25px 0px #444;
- box-shadow: 0px 5px 25px 0px #444;
+ -webkit-box-shadow: 0 5px 25px 0 #444;
+ box-shadow: 0 5px 25px 0 #444;
border-top: 2px solid white;
}
View
2 css/tipsy.css
@@ -15,7 +15,7 @@
.tipsy-arrow-e { border-left-color: #000; }
.tipsy-arrow-w { border-right-color: #000; }
- .tipsy-n .tipsy-arrow { top: 0px; left: 50%; margin-left: -5px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; }
+ .tipsy-n .tipsy-arrow { top: 0; left: 50%; margin-left: -5px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; }
.tipsy-nw .tipsy-arrow { top: 0; left: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;}
.tipsy-ne .tipsy-arrow { top: 0; right: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;}
.tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -5px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
View
BIN img/hint-down-arrow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN img/hint-up-arrow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
55 js/fc/ui/share.js
@@ -1,55 +0,0 @@
-"use strict";
-
-define(["./publish"], function(PublishUI) {
- return function ShareUI(options) {
- var codeMirror = options.codeMirror;
- var dialog = options.dialog;
- var publisher = options.publisher;
- var socialMedia = options.socialMedia;
-
- var self = {
- shareCode: function() {
- dialog.show();
- select.call(dialog.find('a.link')[0]);
- $("#modal-source-code").text(codeMirror.getValue());
- PublishUI({
- codeMirror: codeMirror,
- publisher: publisher,
- dialog: $("#quick-save")
- }).saveCode(function(viewURL,remixURL) {
- $("#share-container a.mailto").attr('href', 'mailto:?subject=Check out the page I just remixed!?body=You can check it out here: '+viewURL);
- });
- }
- };
-
- function select() {
- var target = $(this).attr("data-id");
- var content = dialog.find(".modal-selection." + target);
- dialog.find('#share-buttons a').removeClass("selected");
- dialog.find(".modal-selection").removeClass("selected");
- $(this).addClass("selected");
- content.addClass("selected");
-
- // immediately hotload social media, where applicable
- if (!content.hasClass("hotloaded") && target.indexOf("-widget") > -1) {
- target = target.replace("-widget",'');
- if (socialMedia[target]) {
- socialMedia.hotLoad($, content.find(".content-box"), socialMedia[target]);
- }
- content.addClass("hotloaded");
- }
- }
-
- // clicking the "close" button
- dialog.find('.close-icon').click(function(){ dialog.hide(); });
-
- // content "tabs"
- dialog.find('#share-buttons a').mouseover(select).click(function() {
- // prevent links from being resolved, since the
- // <a> elements have no href content
- return false;
- });
-
- return self;
- };
-});
View
21 js/fc/ui/text.js
@@ -82,7 +82,11 @@ define(function() {
// refesh code mirror
codeMirror.refresh();
// update localstorage
- if (supportsLocalStorage()) { localStorage["ThimbleTextSize"] = size; }
+ if (supportsLocalStorage()) try {
+ // TODO: Consider using lscache here, as it automatically deals
+ // w/ edge cases like out-of-space exceptions.
+ localStorage["ThimbleTextSize"] = size;
+ } catch (e) { /* Out of storage space, no big deal. */ }
// mark text size in drop-down
$("#text-nav-item li").removeClass("selected");
$("#text-nav-item li[data-size="+size+"]").addClass("selected");
@@ -94,14 +98,11 @@ define(function() {
t.click(fn);
});
- /**
- * If there is a thimble text size set, trigger it.
- */
- if (supportsLocalStorage()) {
- if (typeof localStorage["ThimbleTextSize"] !== "undefined") {
- var textSize = localStorage["ThimbleTextSize"];
- $("#text-nav-item li[data-size="+textSize+"]").click();
- }
- }
+ var defaultSize = "normal";
+ var lastSize = supportsLocalStorage() && localStorage["ThimbleTextSize"];
+ if (lastSize && $("#text-nav-item li[data-size="+lastSize+"]").length)
+ defaultSize = lastSize;
+
+ $("#text-nav-item li[data-size="+defaultSize+"]").click();
};
});
View
1 js/main.js
@@ -34,7 +34,6 @@ define("main", function(require) {
HistoryUI = require("fc/ui/history"),
PublishUI = require("fc/ui/publish"),
Relocator = require("fc/ui/relocator"),
- ShareUI = require("fc/ui/share"),
SocialMedia = require("fc/ui/social-media"),
HelpTemplate = require("template!help"),
ErrorTemplate = require("template!error"),

0 comments on commit 6b13f8c

Please sign in to comment.