From 61517139f02df2ce417f465dfabdbf5dbe8f4063 Mon Sep 17 00:00:00 2001 From: Sebastian Silva Date: Wed, 09 Nov 2011 05:24:34 +0000 Subject: IDE+Documentation Redesign --- 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 @@ - - - - ]> - - - - - - - - - - - - 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 @@ - - - - - - - - - - - - - - - - - - - - Part of the Flat Icon Collection (Thu Aug 26 14:40:13 2004) - - - -
  • - - - - - - </Agent> - </publisher> - <creator - id="creator27"> - <Agent - about="" - id="Agent28"> - <title - id="title29">Danny Allen - - - - - Danny Allen - - - - image/svg+xml - - - - - en - - - - - image/svg+xml - - - - - 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 @@ - - -]> - - - - - - - - - \ 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 @@ - - -]> - - - - - - - - - - - - - - - - - - \ 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 @@ - - -]> - - - - - - - - - - \ 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 @@ - -image/svg+xml - - - - - - - - - - \ 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 @@

    Welcome to jQuery UI!

    - View the source of this document. + View the source of this document.

    YOUR COMPONENTS:

    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 @@ - - - - + + + + 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/') @@ -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/') @@ -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 @@ - +

    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 @@ - - - - - -
    -

    WebSDK Studio Tech Preview 2
    "craftsmanship"

    -
    -
    -
    -
    -

    Start with your Logic

    -
    -

    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.

    -

    The controller is implemented in the studio.py file. -

    - - - -
    -
    -
    -

    Build your User Experience

    -
    -

    Animation, advanced effects and widgets, built using HTML, CSS and Javascript, that you can use to build highly interactive Sugar Activities.

    -

    The initial screen for an activity is in index.html. You can browse the templates directory for other views.

    - -
    -
    -

    Deeper in Sugar

    -
    -

    This is where you set up your toolbars. If you need further system interaction at a lower level you'll start here.

    -

    activity.py contains the browser loader for Sugar.

    - -
    -
    -
    -
    -
    -
    -
    -

    ${name}

    -
    -
    - Frequent actions -
    -
    - -
    -

    Running on port ${port}.

    -
    -
    -
    - -
    -
    -
    -
    - - - 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 @@ basic frameset - - - - + + + -- cgit v0.9.1