Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activity/activity.info2
-rw-r--r--icons/document-generic.pngbin722 -> 0 bytes
-rw-r--r--icons/document-generic.svg25
-rw-r--r--icons/folder.pngbin1132 -> 0 bytes
-rw-r--r--icons/folder.svg149
-rw-r--r--icons/image-x-generic.pngbin1172 -> 0 bytes
-rw-r--r--icons/image-x-generic.svg13
-rw-r--r--icons/text-uri-list.pngbin1445 -> 0 bytes
-rw-r--r--icons/text-uri-list.svg22
-rw-r--r--icons/text-x-generic.pngbin761 -> 0 bytes
-rw-r--r--icons/text-x-generic.svg14
-rw-r--r--icons/text-x-python.pngbin1601 -> 0 bytes
-rw-r--r--icons/text-x-python.svg91
-rw-r--r--studio/static/doc/sugar-theme.html2
l---------studio/static/icons1
-rw-r--r--studio/static/init.html8
l---------studio/static/static1
-rw-r--r--studio/studio.py18
-rw-r--r--studio/templates/editor.html2
-rw-r--r--studio/templates/filer.html9
-rw-r--r--studio/templates/index.html128
-rw-r--r--studio/templates/split-view.html7
22 files changed, 29 insertions, 463 deletions
diff --git a/activity/activity.info b/activity/activity.info
index c01e7bc..2ad594a 100644
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -1,6 +1,6 @@
[Activity]
name = WebSDK
-activity_version = 1
+activity_version = 2
bundle_id = org.sugarlabs.WebSDK
exec = websdk-launcher
icon = activity-helloworld
diff --git a/icons/document-generic.png b/icons/document-generic.png
deleted file mode 100644
index 1518d8a..0000000
--- a/icons/document-generic.png
+++ /dev/null
Binary files differ
diff --git a/icons/document-generic.svg b/icons/document-generic.svg
deleted file mode 100644
index a724766..0000000
--- a/icons/document-generic.svg
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN'
- 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [
- <!ENTITY stroke_color "#010101">
- <!ENTITY fill_color "#FFFFFF">
- ]>
-
-<svg enable-background="new 0 0 55 55" height="55px" version="1.1"
- viewBox="0 0 55 55" width="55px" x="0px" xml:space="preserve"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
-
- <g display="block" id="activity-write">
- <g display="inline">
- <g>
- <path
- d="M 43.82,6.088 L 22.876,6.088 L 10.932,18.027 L
- 10.932,48.914 L 43.819,48.914 L 43.82,6.088 z"
- fill="&fill_color;" stroke="&stroke_color;" stroke-width="3.5" />
- </g>
- <polyline fill="none" points="10.932,18.027 22.876,18.027 22.876,6.088"
- stroke="&stroke_color;" stroke-width="3.5"/>
- </g>
- </g>
-</svg>
diff --git a/icons/folder.png b/icons/folder.png
deleted file mode 100644
index bc757d4..0000000
--- a/icons/folder.png
+++ /dev/null
Binary files differ
diff --git a/icons/folder.svg b/icons/folder.svg
deleted file mode 100644
index c3f6dc8..0000000
--- a/icons/folder.svg
+++ /dev/null
@@ -1,149 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="60"
- width="60"
- _SVGFile__filename="oldscale/filesystems/folder.svg"
- version="1.0"
- y="0"
- x="0"
- id="svg1"
- sodipodi:version="0.32"
- inkscape:version="0.48.1 r9760"
- sodipodi:docname="folder.svg">
- <sodipodi:namedview
- id="base"
- pagecolor="#494949"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:zoom="8.7000021"
- inkscape:cx="21.97746"
- inkscape:cy="29.627911"
- inkscape:window-width="1024"
- inkscape:window-height="548"
- inkscape:window-x="0"
- inkscape:window-y="28"
- inkscape:current-layer="svg1"
- showgrid="false"
- inkscape:window-maximized="1" />
- <defs
- id="defs3">
- <linearGradient
- id="linearGradient900">
- <stop
- style="stop-color: #000000;stop-opacity: 1.0;"
- id="stop901"
- offset="0" />
- <stop
- style="stop-color:#ffffff;stop-opacity:1;"
- id="stop902"
- offset="1" />
- </linearGradient>
- <linearGradient
- xlink:href="#linearGradient900"
- id="linearGradient903" />
- <linearGradient
- xlink:href="#linearGradient900"
- id="linearGradient904" />
- <linearGradient
- xlink:href="#linearGradient900"
- id="linearGradient905" />
- <linearGradient
- xlink:href="#linearGradient900"
- id="linearGradient906" />
- <linearGradient
- xlink:href="#linearGradient900"
- id="linearGradient907" />
- </defs>
- <path
- style="font-size:12.000000;fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:3.2209184;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1.0000000;"
- d="M 8.2323190,8.4866780 C 7.7060710,8.4866780 7.2635690,8.9291800 7.2635690,9.4554280 L 7.2323190,51.392930 C 7.2323190,52.276720 7.9422750,52.986680 8.8260690,52.986680 L 46.107320,52.986680 C 46.991110,52.986680 47.701070,52.276720 47.701070,51.392930 L 47.701070,14.392930 C 47.701070,13.509130 46.991110,12.799180 46.107320,12.799180 L 31.388570,12.799180 L 31.388570,9.4554280 C 31.388570,8.9291800 30.946070,8.4866780 30.419820,8.4866780 L 8.2323190,8.4866780 z "
- transform="matrix(0.970220,0.000000,0.000000,0.970220,0.519335,0.150613)"
- id="path938" />
- <path
- style="font-size:12.000000;fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:3.3344083;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1.0000000;"
- d="M 26.627560,23.398020 C 25.743760,23.398020 25.032260,24.109520 25.032260,24.993320 L 25.032260,55.253090 C 25.032260,56.136880 25.743760,56.848390 26.627560,56.848390 L 63.913400,56.848390 C 64.797190,56.848390 65.508690,56.136880 65.508690,55.253090 L 65.508690,24.993320 C 65.508690,24.109520 64.797190,23.398020 63.913400,23.398020 L 26.627560,23.398020 z "
- id="rect922"
- transform="matrix(0.970220,0.000000,-0.163982,0.905300,-7.018060,0.150613)" />
- <metadata
- id="metadata15">
- <RDF
- id="RDF16">
- <Work
- about=""
- id="Work17">
- <title
- id="title18">Part of the Flat Icon Collection (Thu Aug 26 14:40:13 2004)</title>
- <description
- id="description20" />
- <subject
- id="subject21">
- <Bag
- id="Bag22">
- <li
- id="li23" />
- </Bag>
- </subject>
- <publisher
- id="publisher24">
- <Agent
- about=""
- id="Agent25">
- <title
- id="title26" />
- </Agent>
- </publisher>
- <creator
- id="creator27">
- <Agent
- about=""
- id="Agent28">
- <title
- id="title29">Danny Allen</title>
- </Agent>
- </creator>
- <rights
- id="rights31">
- <Agent
- about=""
- id="Agent32">
- <title
- id="title33">Danny Allen</title>
- </Agent>
- </rights>
- <date
- id="date35" />
- <format
- id="format36">image/svg+xml</format>
- <type
- id="type38"
- resource="http://purl.org/dc/dcmitype/StillImage" />
- <license
- id="license39"
- resource="http://creativecommons.org/licenses/LGPL/2.1/">
- <date
- id="date40" />
- </license>
- <language
- id="language41">en</language>
- </Work>
- </RDF>
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
-</svg>
diff --git a/icons/image-x-generic.png b/icons/image-x-generic.png
deleted file mode 100644
index 962b684..0000000
--- a/icons/image-x-generic.png
+++ /dev/null
Binary files differ
diff --git a/icons/image-x-generic.svg b/icons/image-x-generic.svg
deleted file mode 100644
index ac387f2..0000000
--- a/icons/image-x-generic.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [
- <!ENTITY stroke_color "#010101">
- <!ENTITY fill_color "#FFFFFF">
-]><svg enable-background="new 0 0 55 55" height="55px" version="1.1" viewBox="0 0 55 55" width="55px" x="0px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px"><g display="block" id="clipping-image">
- <g display="inline">
- <g>
- <polygon fill="&fill_color;" points="48.788,43.944 48.788,23.002 36.849,11.058 5.962,11.058 5.962,43.944 " stroke="&stroke_color;" stroke-width="3.5"/>
- <polyline fill="none" points="36.849,11.058 36.849,23.002 48.788,23.002 " stroke="&stroke_color;" stroke-width="3.5"/>
- </g>
- </g>
- <path d="M27.504,23.342c-6.258,0-11.471,6.241-11.471,6.241s5.213,6.271,11.471,6.267 c6.259-0.005,11.475-6.274,11.475-6.274S33.763,23.338,27.504,23.342z M27.504,33.984c-2.423,0-4.387-1.966-4.387-4.389 c0-2.419,1.964-4.388,4.387-4.388c2.42,0,4.386,1.969,4.386,4.388C31.89,32.019,29.924,33.984,27.504,33.984z" display="inline" fill="&stroke_color;"/>
- <circle cx="27.504" cy="29.597" display="inline" fill="&stroke_color;" r="1.991"/>
-</g></svg> \ No newline at end of file
diff --git a/icons/text-uri-list.png b/icons/text-uri-list.png
deleted file mode 100644
index 64e848d..0000000
--- a/icons/text-uri-list.png
+++ /dev/null
Binary files differ
diff --git a/icons/text-uri-list.svg b/icons/text-uri-list.svg
deleted file mode 100644
index fbd5276..0000000
--- a/icons/text-uri-list.svg
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [
- <!ENTITY stroke_color "#010101">
- <!ENTITY fill_color "#FFFFFF">
-]><svg enable-background="new 0 0 55 55" height="55px" version="1.1" viewBox="0 0 55 55" width="55px" x="0px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px"><g display="block" id="clipping-url_1_">
- <g display="inline">
- <g>
- <polygon fill="&fill_color;" points="10.932,6.088 31.874,6.088 43.818,18.027 43.818,48.914 10.932,48.914 " stroke="&stroke_color;" stroke-width="3.5"/>
- <polyline fill="none" points="43.818,18.027 31.874,18.027 31.874,6.088 " stroke="&stroke_color;" stroke-width="3.5"/>
- </g>
- </g>
- <g display="inline">
- <circle cx="27.375" cy="33.5" fill="&stroke_color;" r="9.951"/>
- <g>
- <path d="M27.376,23.549c0,0-5.603,4.197-5.603,9.988s5.603,9.914,5.603,9.914" fill="none" stroke="&fill_color;" stroke-width="1.5"/>
- <path d="M27.376,23.549c0,0,5.532,4.57,5.532,9.988 c0,5.419-5.532,9.914-5.532,9.914" fill="none" stroke="&fill_color;" stroke-width="1.5"/>
- <line fill="none" stroke="&fill_color;" stroke-width="1.5" x1="27.376" x2="27.376" y1="23.549" y2="43.451"/>
- <line fill="none" stroke="&fill_color;" stroke-width="1.5" x1="27.376" x2="27.376" y1="23.549" y2="43.451"/>
- <line fill="none" stroke="&fill_color;" stroke-width="1.5" x1="27.376" x2="27.376" y1="23.549" y2="43.451"/>
- <line fill="none" stroke="&fill_color;" stroke-width="1.5" x1="17.423" x2="37.326" y1="33.5" y2="33.5"/>
- </g>
- </g>
-</g></svg> \ No newline at end of file
diff --git a/icons/text-x-generic.png b/icons/text-x-generic.png
deleted file mode 100644
index 0eaf1f1..0000000
--- a/icons/text-x-generic.png
+++ /dev/null
Binary files differ
diff --git a/icons/text-x-generic.svg b/icons/text-x-generic.svg
deleted file mode 100644
index ae37e77..0000000
--- a/icons/text-x-generic.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [
- <!ENTITY stroke_color "#010101">
- <!ENTITY fill_color "#FFFFFF">
-]><svg enable-background="new 0 0 55 55" height="55px" version="1.1" viewBox="0 0 55 55" width="55px" x="0px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px"><g display="block" id="clipping-text">
- <g display="inline">
- <g>
- <polygon fill="&fill_color;" points="10.932,6.088 31.874,6.088 43.818,18.027 43.818,48.914 10.932,48.914 " stroke="&stroke_color;" stroke-width="3.5"/>
- <polyline fill="none" points="43.818,18.027 31.874,18.027 31.874,6.088 " stroke="&stroke_color;" stroke-width="3.5"/>
- </g>
- </g>
- <line display="inline" fill="none" stroke="&stroke_color;" stroke-width="3.5" x1="17.875" x2="36.875" y1="26.25" y2="26.25"/>
- <line display="inline" fill="none" stroke="&stroke_color;" stroke-width="3.5" x1="17.875" x2="36.875" y1="33.25" y2="33.25"/>
- <line display="inline" fill="none" stroke="&stroke_color;" stroke-width="3.5" x1="17.875" x2="36.875" y1="40.25" y2="40.25"/>
-</g></svg> \ No newline at end of file
diff --git a/icons/text-x-python.png b/icons/text-x-python.png
deleted file mode 100644
index a5f7984..0000000
--- a/icons/text-x-python.png
+++ /dev/null
Binary files differ
diff --git a/icons/text-x-python.svg b/icons/text-x-python.svg
deleted file mode 100644
index 5629940..0000000
--- a/icons/text-x-python.svg
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- enable-background="new 0 0 55 55"
- height="55px"
- version="1.1"
- viewBox="0 0 55 55"
- width="55px"
- x="0px"
- xml:space="preserve"
- y="0px"
- id="svg2"
- inkscape:version="0.48.1 r9760"
- sodipodi:docname="text-x-python.svg"><metadata
- id="metadata17"><rdf:RDF><cc:Work
- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
- id="defs15" /><sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1024"
- inkscape:window-height="548"
- id="namedview13"
- showgrid="false"
- inkscape:zoom="5.2545455"
- inkscape:cx="30.735294"
- inkscape:cy="27.690312"
- inkscape:window-x="0"
- inkscape:window-y="28"
- inkscape:window-maximized="1"
- inkscape:current-layer="svg2"
- inkscape:snap-global="true" />
-
- <g
- display="block"
- id="activity-write">
- <g
- display="inline"
- id="g5">
- <g
- id="g7">
- <path
- d="M 43.82,6.088 L 22.876,6.088 L 10.932,18.027 L 10.932,48.914 L 43.819,48.914 L 43.82,6.088 z"
- id="path9"
- stroke-width="3.5"
- stroke="#010101"
- fill="#FFFFFF" />
- </g>
- <polyline
- points="10.932,18.027 22.876,18.027 22.876,6.088"
- id="polyline11"
- stroke-width="3.5"
- stroke="#010101"
- fill="none" />
- </g>
- </g>
-<g
- id="g2993"><path
- id="path2209"
- d="m 16.384116,30.072698 c 0.804896,-1.395585 4.511037,-3.091831 7.624656,-2.766888 1.62132,0.169206 3.60107,1.698624 3.681698,2.443779 0.07856,0.789396 0.997753,2.858085 2.39703,2.814298 1.145918,-0.03586 1.613231,-0.96864 1.965262,-2.011995 0,0 -0.399105,-4.61965 2.711442,-6.60763 0.87614,-0.559951 3.647707,-0.888457 4.993647,-0.13255 1.34594,0.755905 0.372534,3.988454 -0.432364,5.384038 -0.804897,1.395586 -3.562687,3.723038 -3.562687,3.723038 -1.609796,2.791169 -3.482464,3.284082 -6.18606,2.992418 -2.313896,-0.249623 -3.643598,-1.921753 -4.200724,-3.246916 -0.479047,-1.139449 -1.669854,-2.037274 -3.218506,-2.04021 -1.0913,-0.0021 -3.297534,0.46227 -2.030025,2.891796 0.442705,0.848562 2.525534,3.076584 4.543849,3.640531 1.715033,0.479206 5.255278,1.587899 8.602148,1.769434 -3.293835,1.720751 -7.968917,1.038163 -10.629399,0.224034 -1.444865,-0.719626 -9.214557,-4.671598 -6.259967,-9.077177 z"
- nodetypes="cscscssscsssssccc"
- inkscape:connector-curvature="0"
- style="fill:#ffffff;stroke:#000000;stroke-width:1.86633408" /><path
- transform-center-x="-0.50601649"
- transform-center-y="-3.6171625"
- id="path2211"
- d="m 40.302025,27.240441 c -1.247703,0.891922 -3.55947,2.987895 -5.11319,2.028822"
- inkscape:connector-curvature="0"
- style="fill:#ffffff;stroke:#000000;stroke-width:0.93316704" /><circle
- transform="matrix(0.2511227,-0.43541349,-0.44123776,-0.24780781,29.730157,42.836365)"
- id="circle2213"
- r="1.927"
- cy="6.073"
- cx="33.926998"
- sodipodi:cx="33.926998"
- sodipodi:cy="6.073"
- sodipodi:rx="1.927"
- sodipodi:ry="1.927"
- style="fill:#000000;stroke:none" /></g></svg> \ No newline at end of file
diff --git a/studio/static/doc/sugar-theme.html b/studio/static/doc/sugar-theme.html
index ac09754..b90d88e 100644
--- a/studio/static/doc/sugar-theme.html
+++ b/studio/static/doc/sugar-theme.html
@@ -75,7 +75,7 @@
<body>
<h1>Welcome to jQuery UI!</h1>
<p style="font-size: 1.3em; line-height: 1.5; margin: 1em 0; width: 50%;">
- <a href="/edit/websdk/static/doc/sugar-theme.html">View the source of this document.</a>
+ <a target="frame1" href="/edit/studio/static/doc/sugar-theme.html">View the source of this document.</a>
</p>
<p style="font-weight: bold; margin: 2em 0 1em; font-size: 1.3em;">YOUR COMPONENTS:</p>
diff --git a/studio/static/icons b/studio/static/icons
deleted file mode 120000
index 9a5906b..0000000
--- a/studio/static/icons
+++ /dev/null
@@ -1 +0,0 @@
-../../icons/ \ No newline at end of file
diff --git a/studio/static/init.html b/studio/static/init.html
index 069b021..651b886 100644
--- a/studio/static/init.html
+++ b/studio/static/init.html
@@ -3,10 +3,10 @@
<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>
+ <link rel="stylesheet" href="css/main.css" type="text/css" />
+ <link rel="stylesheet" href="css/sugar-theme/jquery-ui-1.8.15.custom.css" />
+ <script src="js/jquery-1.6.2.js" type="text/javascript"></script>
+ <script src="js/jquery-ui-1.8.15.custom.min.js" type="text/javascript"></script>
<!--script src="js/websdk-1.js" type="text/javascript"></script-->
</head>
<body>
diff --git a/studio/static/static b/studio/static/static
deleted file mode 120000
index 945c9b4..0000000
--- a/studio/static/static
+++ /dev/null
@@ -1 +0,0 @@
-. \ No newline at end of file
diff --git a/studio/studio.py b/studio/studio.py
index 586bf2d..d3c9fe9 100644
--- a/studio/studio.py
+++ b/studio/studio.py
@@ -1,7 +1,7 @@
import os
import sys
-from flaskext.genshi import Genshi, render_response
from flask import Flask,request,url_for,redirect
+from flaskext.genshi import Genshi, render_response
studio = Flask(__name__)
studio.debug = True
@@ -39,15 +39,14 @@ def identify(filename):
if os.path.isdir(filename):
icon = 'folder.png'
href = '/files/%s' % filename
+ mode = 'dir'
if filename.endswith('.xo'):
href = '#'
return icon,mode,href
@studio.route('/')
def index():
- port = request.environ.get('SERVER_PORT')
- return render_response('index.html', dict(name="WebSDK Activity",
- port=port))
+ return vsplit()
@studio.route('/edit/')
@studio.route('/edit/<path:filename>')
@@ -69,7 +68,7 @@ def save():
print "saving content: %s" % filename
f.close()
directory = os.path.dirname(filename)
- return redirect(url_for('browse', directory=directory))
+ return redirect(url_for('help'))
@studio.route('/files/')
@studio.route('/files/<path:directory>')
@@ -79,6 +78,7 @@ def browse(directory="."):
if not os.path.abspath(directory)==os.path.abspath("."):
files.append( { 'name': '..',
'icon': 'folder.png',
+ 'mode': 'dir',
'href': '/files/%s' % os.path.join(directory,"..") })
for filename in sorted(filelist):
icon, mode, href = identify(directory + "/" + filename)
@@ -88,6 +88,7 @@ def browse(directory="."):
continue
files.append( { 'name': filename,
'icon': icon,
+ 'mode': mode,
'href': href } )
return render_response('filer.html', dict(files=files, absdir=os.path.normpath(directory)))
@@ -102,7 +103,12 @@ def shutdown():
shutdown_server()
return 'Goodbye'
-def vsplit(frame1='/files/studio', frame2='/files/studio/templates'):
+@studio.route('/help')
+def help():
+ port = request.environ.get('SERVER_PORT')
+ return render_response('help.html', dict(port=port))
+
+def vsplit(frame1='/help', frame2='/files/studio'):
return render_response('split-view.html', dict(frame1=frame1, frame2=frame2))
@studio.route('/split')
diff --git a/studio/templates/editor.html b/studio/templates/editor.html
index 88e45cb..721a2fb 100644
--- a/studio/templates/editor.html
+++ b/studio/templates/editor.html
@@ -30,7 +30,7 @@
<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"' />
+<!--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}"' />
diff --git a/studio/templates/filer.html b/studio/templates/filer.html
index 5ca87e7..f03f3ac 100644
--- a/studio/templates/filer.html
+++ b/studio/templates/filer.html
@@ -39,10 +39,15 @@
<div id="filer" class="bling">
<ul>
<li py:for="file in files">
- <a href="${file.href}" class="file">
+ <a py:if="file.mode == 'dir'" href="${file.href}" class="file">
<img src="/static/icons/${file.icon}" style="border:none;"/>
<br/>${file.name}
- </a></li>
+ </a>
+ <a py:if="file.mode != 'dir'" target="frame1" href="${file.href}" class="file">
+ <img src="/static/icons/${file.icon}" style="border:none;"/>
+ <br/>${file.name}
+ </a>
+ </li>
</ul>
</div>
<script>
diff --git a/studio/templates/index.html b/studio/templates/index.html
deleted file mode 100644
index 1dd74e5..0000000
--- a/studio/templates/index.html
+++ /dev/null
@@ -1,128 +0,0 @@
-<!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/split-view.html b/studio/templates/split-view.html
index e23b696..444a460 100644
--- a/studio/templates/split-view.html
+++ b/studio/templates/split-view.html
@@ -2,9 +2,8 @@
<head>
<title>basic frameset</title>
</head>
-
-<frameset rows="50%, *">
- <frame src="${frame1}" />
- <frame src="${frame2}" />
+<frameset rows="*, 155px">
+ <frame name="frame1" src="${frame1}" />
+ <frame name="frame2" src="${frame2}" />
</frameset>
</html>