Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/studio/templates
diff options
context:
space:
mode:
Diffstat (limited to 'studio/templates')
-rw-r--r--studio/templates/editor.html67
-rw-r--r--studio/templates/filer.html60
-rw-r--r--studio/templates/index.html128
-rw-r--r--studio/templates/skel.html21
-rw-r--r--studio/templates/split-view.html10
-rw-r--r--studio/templates/wysiwyg-editor.html54
6 files changed, 340 insertions, 0 deletions
diff --git a/studio/templates/editor.html b/studio/templates/editor.html
new file mode 100644
index 0000000..88e45cb
--- /dev/null
+++ b/studio/templates/editor.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:py="http://genshi.edgewall.org/">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+ <title>Editor</title>
+ <link rel="stylesheet" href="/static/css/main.css" type="text/css" />
+ <link rel="stylesheet" href="/static/css/sugar-theme/jquery-ui-1.8.16.sugar.css" />
+ <script src="/static/js/jquery-1.6.2.js" type="text/javascript"></script>
+ <script src="/static/js/jquery-ui-1.8.16.sugar.min.js" type="text/javascript"></script>
+ <script src="/static/js/websdk-1.js" type="text/javascript"></script>
+<!-- <script src="js/jquery-plugins/json.js" type="text/javascript"></script>
+ <script src="js/jquery-plugins/jquery.hotkeys-0.7.8.js" type="text/javascript"></script>
+ <script src="js/jquery-plugins/jquery.intercept.js" type="text/javascript"></script> -->
+</head>
+<body>
+<script src="/static/js/ace/ace-uncompressed.js" type="text/javascript" charset="utf-8"></script>
+<script src="/static/js/ace/theme-twilight.js" type="text/javascript" charset="utf-8"></script>
+<script py:if="mode" src="/static/js/ace/mode-${mode}.js" type="text/javascript" charset="utf-8"></script>
+<pre id="editor">$content</pre>
+<div id="editor-sidebar" class="bling">
+<div class="file">
+ <img src="/static/icons/${icon}" /><br/>
+ ${absdir}/<br/>
+ <strong>${basename}</strong><br/>
+</div>
+<hr />
+<form action="/save" method="post">
+<input type="hidden" name="filename" id="filename" value="$filename" />
+<input type="hidden" name="directory" id="directory" value="$directory" />
+<input type="hidden" name="content" id="content" value="ñññ" />
+<input type="button" class="btn" value="Browse" onclick='location.href="/files/$directory"' />
+<br/>
+<input type="submit" value="Save file" /><br/>
+<input type="button" class="btn" value="Delete file" onclick='location.href="/delete/${filename}"' />
+<!-- save a magic cookie for security here TODO -->
+<input type="button" class="btn" value="Return" onclick='top.location.href="/"' />
+<!--input type="button" class="btn" value="edit wysiwyg" onclick='top.location.href=top.location.href+"&amp;editor=wysiwyg"' /-->
+</form>
+</div>
+<script>
+window.onload = function() {
+ var aceEditor = ace.edit("editor");
+ aceEditor.setTheme("ace/theme/twilight");
+ document.getElementById('editor').style.fontSize='14px';
+ aceEditor.getSession().setUseSoftTabs(true);
+ // we can assume we're on unix
+ aceEditor.getSession().setNewLineMode("unix");
+
+ if ("${mode}"!="") {
+ var thisMode = require("ace/mode/${mode}").Mode;
+ aceEditor.getSession().setMode(new thisMode());
+ }
+
+ function dispatch() {
+ var c = $('#content');
+ c.val(aceEditor.getSession().getValue());
+ }
+ dispatch()
+
+ aceEditor.getSession().on('change', dispatch);
+ $('.bling').slideDown("slow");
+};
+</script>
+</body>
+</html>
diff --git a/studio/templates/filer.html b/studio/templates/filer.html
new file mode 100644
index 0000000..5ca87e7
--- /dev/null
+++ b/studio/templates/filer.html
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:py="http://genshi.edgewall.org/">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+ <title>Filer</title>
+ <link rel="stylesheet" href="/static/css/main.css" type="text/css" />
+ <link rel="stylesheet" href="/static/css/sugar-theme/jquery-ui-1.8.16.sugar.css" />
+<script src="/static/js/jquery-1.6.2.js" type="text/javascript"></script>
+<script src="/static/js/jquery-ui-1.8.16.sugar.min.js" type="text/javascript"></script>
+<script src="/static/js/jquery.corner.js" type="text/javascript"></script>
+<script src="/static/js/websdk-1.js" type="text/javascript"></script>
+<!-- <script src="/static/js/jquery.plugin.svgimg.js" type="text/javascript"></script>
+ <script src="js/jquery-plugins/json.js" type="text/javascript"></script>
+ <script src="js/jquery-plugins/jquery.hotkeys-0.7.8.js" type="text/javascript"></script>
+ <script src="js/jquery-plugins/jquery.intercept.js" type="text/javascript"></script> -->
+ <style type="text/css">
+ .demoHeaders { margin-top: 2em; }
+ #dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;}
+ #dialog_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;}
+ ul#icons {margin: 0; padding: 0;}
+ ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left; list-style: none;}
+ ul#icons span.ui-icon {float: left; margin: 0 4px;}
+ </style>
+</head>
+<body>
+ <div style="height:24px;" id="filer-header">
+ <ul id="icons" style="float:left" class="ui-widget ui-helper-clearfix">
+ <li onclick="top.location='/'" class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-w"><span class="ui-icon ui-icon-circle-arrow-w"></span></li>
+ </ul>
+ <div style="margin-left:15px; padding-top:7px">
+ ${absdir}/
+ </div>
+ <!-- ul id="icons" class="ui-widget ui-helper-clearfix">
+ <li class="ui-state-default ui-corner-all" title=".ui-icon-home"><span class="ui-icon ui-icon-home"></span></li>
+ </ul-->
+ </div>
+ <div id="filer" class="bling">
+ <ul>
+ <li py:for="file in files">
+ <a href="${file.href}" class="file">
+ <img src="/static/icons/${file.icon}" style="border:none;"/>
+ <br/>${file.name}
+ </a></li>
+</ul>
+ </div>
+<script>
+window.onload = function() {
+ $('.file').corner("15px");
+ $('.bling').show("slow");
+ /*if ($.browser.mozilla) {
+ $('#filer img').hide();
+ $('#filer span').show();
+ }*/
+ $( "input:button" ).button();
+};
+</script>
+</body>
+</html>
diff --git a/studio/templates/index.html b/studio/templates/index.html
new file mode 100644
index 0000000..1dd74e5
--- /dev/null
+++ b/studio/templates/index.html
@@ -0,0 +1,128 @@
+<!DOCTYPE HTML>
+<html lang="en-US">
+<head>
+ <meta charset="UTF-8" />
+ <title></title>
+ <link rel="stylesheet" href="/static/css/main.css" type="text/css" />
+ <link rel="stylesheet" href="/static/css/sugar-theme/jquery-ui-1.8.16.sugar.css" />
+ <script src="/static/js/jquery-1.6.2.js" type="text/javascript"></script>
+ <script src="/static/js/jquery-ui-1.8.16.sugar.min.js" type="text/javascript"></script>
+ <script src="/static/js/jquery.corner.js" type="text/javascript"></script>
+ <script src="/static/js/websdk-1.js" type="text/javascript"></script>
+</head>
+<body>
+ <div id="content" class="bling">
+ <header><h1>WebSDK Studio <span id="beta">Tech Preview 2</span><br /><em style="font-size: 10pt;"> "craftsmanship" </em></h1></header>
+ <section>
+ <div style="float:left; width:60%;">
+ <div id="accordion">
+ <div>
+ <h3><a href="#">Start with your Logic</a></h3>
+ <div style="text-align:right"><div style="float:left; padding-right: 15px;"><img src="/static/images/logo-flask-s.png" /></div>
+ <p>You can build Sugar Activities using standard web technologies with WebSDK.
+ The controller is where the logic of your Activity is expressed.
+ At the core of WebSDK there is Flask: a microframework built with good intentions.</p>
+ <p>The controller is implemented in the <a href="/edit/studio/studio.py">studio.py</a> file.
+ </p>
+ <input type="button"
+ value="Quick Start" onclick='location.href="/static/doc/flask-docs/quickstart.html#quickstart"' />
+ <input type="button"
+ value="Documentation Index" onclick='location.href="/static/doc/flask-docs/index.html"' />
+ <input type="button"
+ value="API" onclick='location.href="/static/doc/flask-docs/api.html#api"' />
+ </div>
+ </div>
+ <div>
+ <h3><a href="#">Build your User Experience</a></h3>
+ <div style="text-align:right"><div style="float:left; padding-right: 15px;"><img src="/static/images/logo-jqueryui.gif" /></div>
+ <p>Animation, advanced effects and widgets, built using HTML, CSS and Javascript, that you can use to build highly interactive Sugar Activities.</p>
+ <p>The initial screen for an activity is in <a href="/edit/studio/templates/index.html">index.html</a>. You can browse the <a href="/files/studio/templates">templates</a> directory for other views.</p>
+ <input type="button"
+ value="Sugar Web Widgets" onclick='location.href="/static/doc/sugar-theme.html"' />
+ </div>
+ <div>
+ <h3><a href="#">Deeper in Sugar</a></h3>
+ <div style="text-align:right"><div style="float:left; padding-right: 15px;"><img src="/static/images/logo-sugar-trans.png" /></div>
+ <p>This is where you set up your toolbars. If you need further system interaction at a lower level you'll start here.</p>
+ <p><a href="/edit/activity.py">activity.py</a> contains the browser loader for Sugar.</p>
+ <input type="button"
+ value="Make Your Own Sugar Activities" onclick='location.href="static/doc/myosa/ch000_table_of_contents.xhtml"' />
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="accordion2" style="width:38%; float:right">
+ <div>
+ <h3><a href="#">${name}</a></h3>
+ <div>
+ <div id="filer-header" style="padding-top: 5px; padding-bottom: 5px">
+ Frequent actions
+ </div>
+ <div id="filer" style="display:inline;">
+ <ul>
+ <li>
+ <a href="/edit/studio/studio.py" class="file">
+ <img src="/static/icons/text-x-python.png" />
+ <br />studio.py
+ </a>
+ </li>
+ <li>
+ <a href="/edit/studio/templates/index.html" class="file">
+ <img src="/static/icons/text-uri-list.png" />
+ <br />index.html
+ </a>
+ </li>
+ <li>
+ <a href="/files/studio/templates" class="file">
+ <img src="/static/icons/folder.png" />
+ <br />templates
+ </a>
+ </li>
+ <li>
+ <a href="/files/studio/static" class="file">
+ <img src="/static/icons/folder.png" />
+ <br />static
+ </a>
+ </li>
+ <li>
+ <a href="/edit/./activity.py" class="file">
+ <img src="/static/icons/text-x-python.png" />
+ <br />activity.py
+ </a>
+ </li>
+ <li>
+ <a href="/edit/studio/static/css/main.css" class="file">
+ <img src="/static/icons/text-uri-list.png" />
+ <br />main.css
+ </a>
+ </li>
+ </ul>
+ <div style="float:both; width:100%">
+ <p style="font-size:8pt;">Running on port ${port}.</p>
+ </div>
+ </div>
+ </div>
+ <input type="button" value="Split view" onclick='location.href="/split"' />
+ </div>
+ </div>
+ </section>
+ </div>
+ <script>
+ window.onload = function() {
+ $('#content').fadeIn(700);
+ $('.file').corner("15px");
+ $('#filer-header').corner("15px");
+ $('.bling').show("slow");
+ /* if ($.browser.mozilla) {
+ $('#filer img').hide();
+ $('#filer span').show();
+ } This was SVG workaround but is broken in older
+ gecko anyway*/
+ $('#beta').delay(1500).fadeIn("slow");
+ $("#accordion").accordion({ header: "h3" });
+ $("#accordion2").accordion({ header: "h3" });
+ }
+ </script>
+</body>
+</html>
diff --git a/studio/templates/skel.html b/studio/templates/skel.html
new file mode 100644
index 0000000..447ae4b
--- /dev/null
+++ b/studio/templates/skel.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML>
+<html lang="en-US">
+<head>
+ <meta charset="UTF-8" />
+ <title></title>
+ <link rel="stylesheet" href="/static/css/main.css" type="text/css" />
+ <link rel="stylesheet" href="/static/css/sugar-theme/jquery-ui-1.8.15.custom.css" />
+ <script src="/static/js/jquery-1.6.2.js" type="text/javascript"></script>
+ <script src="/static/js/jquery-ui-1.8.15.custom.min.js" type="text/javascript"></script>
+ <script src="/static/js/websdk-1.js" type="text/javascript"></script>
+</head>
+<body>
+ <div id="content" class="bling">
+ </div>
+ <script>
+ window.onload = function() {
+ $('#content').fadeIn(700);
+ }
+ </script>
+</body>
+</html>
diff --git a/studio/templates/split-view.html b/studio/templates/split-view.html
new file mode 100644
index 0000000..e23b696
--- /dev/null
+++ b/studio/templates/split-view.html
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title>basic frameset</title>
+</head>
+
+<frameset rows="50%, *">
+ <frame src="${frame1}" />
+ <frame src="${frame2}" />
+</frameset>
+</html>
diff --git a/studio/templates/wysiwyg-editor.html b/studio/templates/wysiwyg-editor.html
new file mode 100644
index 0000000..3f162c9
--- /dev/null
+++ b/studio/templates/wysiwyg-editor.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:py="http://genshi.edgewall.org/">
+<head>
+ <meta charset="UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+ <title>Editor</title>
+ <link rel="stylesheet" href="/www/css/main.css" type="text/css" />
+<script src="/www/js/jquery-1.6.2.js" type="text/javascript"></script>
+<!-- <script src="js/jquery-plugins/json.js" type="text/javascript"></script>
+ <script src="js/jquery-plugins/jquery.hotkeys-0.7.8.js" type="text/javascript"></script>
+ <script src="js/jquery-plugins/jquery.intercept.js" type="text/javascript"></script> -->
+</head>
+<body>
+<script type="text/javascript" src="/www/js/wymeditor/jquery.wymeditor.pack.js"></script>
+ <script type="text/javascript" src="/www/js/wymeditor/plugins/fullscreen/jquery.wymeditor.fullscreen.js"></script>
+<form action="/save" method="post">
+<div id="editor">
+<textarea class="wymeditor">$content</textarea>
+</div>
+<div id="editor-sidebar" class="bling">
+<div class="file">
+ <img src="/www/icons/${icon}" /><br/>
+ ${absdir}/<br/>
+ <strong>${basename}</strong><br/>
+</div>
+<hr />
+<input type="hidden" name="filename" id="filename" value="$filename" />
+<input type="hidden" name="directory" id="directory" value="$directory" />
+<input type="button" class="btn" value="Browse directory" onclick='location.href="/browse?directory=${directory}"' />
+<br/>
+<input type="submit" class="btn" value="Save file" /><br/>
+<input type="button" class="btn" value="Delete file" onclick='location.href="/delete?filename=${filename}"' />
+<!-- save a magic cookie for security here TODO -->
+<input type="button" class="btn" value="Return to main" onclick='top.location.href="/www/index.html"' />
+</div>
+</form>
+<script>
+jQuery(function() {
+ jQuery(".wymeditor").wymeditor({
+ logoHtml: '',
+ skin: 'silver',
+ stylesheet: 'main.css',
+ postInit: function(wym) {
+ wym.fullscreen();
+ }
+ });
+});
+window.onload = function() {
+ $('.bling').slideDown("slow");
+};
+</script>
+</body>
+</html>