Permalink
Browse files

fix new button to point to root

  • Loading branch information...
thomaspark committed Jun 30, 2012
1 parent 1ae9011 commit d0b06ee48216e996bb3e8bf810e26990965e91bb
Showing with 19 additions and 19 deletions.
  1. +14 −14 index.php
  2. +5 −5 js/chrome/app.js
View
@@ -1,6 +1,6 @@
-<?php
+<?php
-include('app.php');
+include('app.php');
if (false && (@$_POST['html'] || @$_POST['javascript'])) {
$jsonReplaces = array(array("\\", "/", "\n", "\t", "\r", "\b", "\f", '"'), array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"'));
@@ -30,7 +30,7 @@
list($latest_revision, $html, $javascript) = getCode($code_id, $revision, true);
} else {
list($latest_revision, $html, $javascript) = defaultCode();
- }
+ }
}
$latest_revision = getMaxRevision($code_id);
@@ -53,15 +53,15 @@
<title>openHTML</title>
<link rel="stylesheet" href="<?php echo ROOT?>css/style.css?<?php echo VERSION?>" type="text/css" />
</head>
-<!--[if lt IE 7 ]><body class="source ie ie6"><![endif]-->
-<!--[if lt IE 8 ]><body class="source ie ie7"><![endif]-->
-<!--[if gte IE 8 ]><body class="source ie"><![endif]-->
-<!--[if !IE]><!--><body class="source"><!--<![endif]-->
+<!--[if lt IE 7 ]><body class="source ie ie6"><![endif]-->
+<!--[if lt IE 8 ]><body class="source ie ie7"><![endif]-->
+<!--[if gte IE 8 ]><body class="source ie"><![endif]-->
+<!--[if !IE]><!--><body class="source"><!--<![endif]-->
<div id="control">
<div class="control">
<div class="buttons">
<a id="account" class="tab button group light left" href="<?php echo ROOT?>list">Page List<?php echo $is_owner?></a>
- <a id="account" class="tab button group light right gap" href="../">New</a>
+ <a id="account" class="tab button group light right gap" href="<?php echo ROOT?>">New</a>
<!--<a class="tab button source group left" accesskey="1" href="#source">Code</a>
<a class="tab button preview group right gap" accesskey="2" href="#preview">Preview</a>-->
<a title="Revert" class="button light group left" id="revert" href="#"><img class="enabled" src="<?php echo ROOT?>images/revert.png" /><img class="disabled" src="<?php echo ROOT?>images/revert-disabled.png" /></a>
@@ -74,13 +74,13 @@
<a href="<?php echo ROOT?>save" class="save title">Save</a>
<a id="save" title="Save a new revision" class="button light save group" href="<?php echo $code_id_path?>save">Save</a>
<a id="clone" title="Create a new copy" class="button clone group light" href="<?php echo ROOT?>clone">Copy</a>
-
+
<?php else : ?>
-
- <div class="button group gap right short">
+
+ <div class="button group gap right short">
<a title="Create a new copy" class="clone title" href="<?php echo ROOT?>clone">Copy</a>
<a id="clone" title="Create a new copy" class="button clone group light" href="<?php echo ROOT?>clone">Copy</a>
-
+
<?php endif ?>
<?php else : ?>
<div class="button group gap left right">
@@ -91,7 +91,7 @@
<!-- <a id="startingpoint" title="Set as starting code" class="button group" href="<?php echo ROOT?>save">As template</a> -->
</div>
- <span id="panelsvisible" class="gap">View:
+ <span id="panelsvisible" class="gap">View:
<input type="checkbox" data-panel="javascript" data-uri="css" id="showjavascript"><label for="showjavascript">CSS</label>
<input type="checkbox" data-panel="html" data-uri="html" id="showhtml"><label for="showhtml">HTML</label>
<input type="checkbox" data-panel="live" data-uri="live" id="showlive"><label for="showlive">Live</label>
@@ -147,7 +147,7 @@
<script src="<?php echo ROOT?>js/<?php echo VERSION?>/jsbin.js"></script>
<!-- <script>
- window.onbeforeunload = function() {
+ window.onbeforeunload = function() {
if (document.title.substr(-9) == '[unsaved]'){
return 'You have unsaved changes. You should save first.';
}
View
@@ -16,9 +16,9 @@ var debug = jsbin.settings.debug === undefined ? false : jsbin.settings.debug,
sessionStorage.setItem('javascript', editors.javascript.getCode());
sessionStorage.setItem('html', editors.html.getCode());
sessionStorage.setItem('url', template.url);
-
+
localStorage.setItem('settings', JSON.stringify(jsbin.settings));
-
+
var panel = getFocusedPanel();
sessionStorage.setItem('panel', panel);
try { // this causes errors in IE9 - so we'll use a try/catch to get through it
@@ -82,10 +82,10 @@ $document.one('jsbinReady', function () {
$('#show' + panel).removeAttr('checked')[0].checked = false;
}
}
-
+
var $sp1 = $('.code.html').splitter().data('splitter');
var $sp2 = $live.splitter().data('splitter');
-
+
updatePanel('html', jsbin.settings.show.html);
updatePanel('javascript', jsbin.settings.show.javascript);
updatePanel('live', jsbin.settings.show.live);
@@ -104,7 +104,7 @@ if (/gist\/\d+/.test(window.location.pathname) && (!sessionStorage.getItem('java
window.gist = new Gist(window.location.pathname.replace(/.*?(\d+).*/, "$1"));
});
};
-
+
if (editors.ready) {
loadGist();
} else {

0 comments on commit d0b06ee

Please sign in to comment.