Hi  Christian:

Thanks again for your help!
It looks like that I need to learn some JSON  to do the frond end
development of Sakai.



Rebecca Juan Wang

On Wed, Jun 27, 2012 at 3:11 AM, Christian Vuerings <
[email protected]> wrote:

> Hey Rebecca,
>
> It can be a bit confusing at first but this is pure JavaScript.
> You can find the source file at [1].
>
> We use that file to set configuration options for Sakai OAE.
> For instance to enable/disable certain languages, load special skin CSS
> and which roles you want in the system.
>
> At first it actually looks a bit like JSON [2], but it's in fact a
> JavaScript object.
> JSON is the language we use to communicate between the client and server.
>
> As for this line:
>
> {if widgets.main}<div id="widget_${widgets.main}
>>
> This is Trimpath [3] syntax, which is a template engine written in
> JavaScript.
>
>
> - Christian
>
> [1]
> https://github.com/sakaiproject/3akai-ux/blob/master/dev/configuration/config.js
> [2] https://developer.mozilla.org/en/JSON
> [3] http://code.google.com/p/trimpath/wiki/JavaScriptTemplates
>
> On Jun 26, 2012, at 6:55 PM, juan wang wrote:
>
> Hi Christian:
>
> Thanks for your explanation about how these widget work on the Sakai
> system. It really help me a lot.
> I have one question about the code:
>  explore : {
>             oneRow: false,
>             widgets: {
>                 rightColumn: "recentactivity",
>                 main: "welcome",
>                 bottom: "featuredcontent"
>             }
>         }
> I wonder which kind of code is used? It doesn't look like js or jQuery to
> me.
>
> Regards
>
> Rebecca Juan Wang
>
>
> On Mon, Jun 25, 2012 at 11:06 PM, Christian Vuerings <
> [email protected]> wrote:
>
>> Hey Harry,
>>
>> They will indeed have the same effect, but ${widgets.main} will be
>> replaced by the configuration files (config.js/custom_config.js)
>>
>> Right now it's under
>> sakai.config.explore.widgets
>> and looks like this:
>>
>> explore : {
>>             oneRow: false,
>>             widgets: {
>>                 rightColumn: "recentactivity",
>>                 main: "welcome",
>>                 bottom: "featuredcontent"
>>             }
>>         }
>>
>> This allows institutions which widgets they want to show.
>> In this particular case it would probably have been better to do the
>> following:
>>
>> {if widgets.main}<div id="widget_${widgets.main}"
>> class="widget_inline"></div>{/if}
>>
>> That way, we would only load the main widget if it was actually defined
>> and we wouldn't need to change the html file.
>> I opened a jira to address this at [1].
>>
>> Hope this helps
>> - Christian
>>
>> [1] https://jira.sakaiproject.org/browse/SAKIII-5854
>>
>> On Jun 25, 2012, at 6:44 PM, Harry Wang wrote:
>>
>> I think Rebecca is trying to remove the welcome widget instead of
>> revising the widget.
>>
>> To do that, just remove the following inline from the index.html:
>>
>>  <div id="widget_${widgets.main}" class="widget_inline"></div>
>>
>> This leads to another question: what ${widgets.main} is trying to do? I
>> replace the above line with the line below and got the same effect:
>> <div id="widget_welcome" class="widget_inline"></div>
>>
>> Thanks,
>>
>> Harry
>>
>>
>> On Mon, Jun 25, 2012 at 10:26 PM, Max Whitney <[email protected]> wrote:
>>
>>> Hello Rebecca:
>>>
>>> Here's an extract from the new Sakai OAE O'Reilly book on the welcome
>>> widget. The full book is available at oreilly.com
>>>
>>> =====begin extract====
>>> Change the Landing Page
>>>
>>> When people first visit Sakai OAE, the landing page introduces some key
>>> themes about
>>> OAE. The area which displays the Permeable / Social / Personal /
>>> Remixable image is
>>> actually a widget, a small block of customized code which runs inside
>>> the Sakai OAE
>>> environment. In order to start customizing a widget, OAE needs to know
>>> where to find
>>> the revised widget. Just like the CSS and JavaScript file location
>>> indication done in
>>> section “Configure OAE for CSS, Property and JavaScript Changes” on page
>>> 35, the
>>> widget location is indicated with a new Filesystem Resource Provider.
>>>
>>> Open your browser to http://localhost:8080/system/console  and login
>>> again with the
>>> default username and password admin/admin. Click the Configuration
>>>  button to get over
>>> to the Sling configuration manager. Click the plus (+) button next to
>>> Apache Sling
>>> Filesystem Resource Provider  to create an entry overriding the
>>> devwidget location.
>>>
>>> For Provider root , enter: /devwidgets
>>>  For Filesystem root , enter: /Users/username/source/sakai-ux/devwidgets
>>>
>>> Leave the other values at their defaults and click Save. Refresh your
>>> browser and scroll
>>> back down to the Apache Sling Filesystem Resource Provider. Under the
>>> Filesystem
>>> Resource Provider heading there are now two entries for
>>> org.apache.sling.fsprovider.internal.FsResourceProvider  with unique
>>> sufffix strings:
>>> one for your local
>>> dev  location and now another for your local devwidgets  location.
>>> The welcome screen widget is located in sakai-ux/devwidgets/welcome .
>>> In the welcome.html  file, substitute a new image for the landing page:
>>>
>>> <img src="/devwidgets/welcome/images/sakai_default.png"
>>> alt="__MSG__KEYWORDS__">
>>>
>>> change to
>>> <img src="
>>> http://farm8.staticflickr.com/7013/6620145495_c5208b58de_n_d.jpg";
>>> alt="__MSG__KEYWORDS__">
>>>
>>> In the default.properties  file, provide some new keywords for the
>>> alternate text for screen
>>> readers:
>>>
>>> KEYWORDS = Sakai: Permeable, Social, Personal, Remixable
>>> change to
>>> KEYWORDS = St. Paul's doorway image courtesy of Ian Dolphin, used under
>>> the Creative
>>> Commons Attribution, Noncommercial, No Derivative works license.
>>>
>>> Also change the first set of display text and link:
>>> WELCOME_ITEM1_TITLE = Permeable
>>> WELCOME_ITEM1_LINK = /create#l=group
>>> WELCOME_ITEM1_LINK_TEXT = Form various types of groups
>>> WELCOME_ITEM1_OTHER_TEXT = to work with people in your way
>>> change to
>>> WELCOME_ITEM1_TITLE = Open
>>> WELCOME_ITEM1_LINK = /categories
>>> WELCOME_ITEM1_LINK_TEXT = Explore
>>> WELCOME_ITEM1_OTHER_TEXT = all the public work at our institution
>>>
>>> Fnally, make a quick and dirty change to make this first link active for
>>> anyone who
>>> visits OAE, not just to people who are currently logged in. In
>>> welcome.html , modify the
>>> two if  statements associated with the first welcome link to always be
>>> true by changing
>>> {if !anon}  to {if true} .
>>>
>>> This section of code will now look like
>>>
>>> <h2>__MSG__WELCOME_ITEM1_TITLE__</h2>
>>> {if true}
>>> {if '__MSG__WELCOME_ITEM1_LINK__'.substr(0,1) === '#'}
>>> <button class="s3d-link-button"
>>> data-trigger="${'__MSG__WELCOME_ITEM1_LINK__'.substr(1)}">
>>> {else}
>>> <a class="s3d-regular-links" href="__MSG__WELCOME_ITEM1_LINK__">
>>> {/if}
>>> {else}
>>> <span class="s3d-regular-links">
>>> {/if}
>>> __MSG__WELCOME_ITEM1_LINK_TEXT__
>>> {if true}
>>> {if '__MSG__WELCOME_ITEM1_LINK__'.substr(0,1) === '#'}
>>> </button>
>>> {else}
>>> </a>
>>> {/if}
>>> {else}
>>> </span>
>>> {/if}
>>> <span> __MSG__WELCOME_ITEM1_OTHER_TEXT__</span>
>>>
>>> Sign out of OAE (if you’re signed in) and refresh the landing page at
>>> http://localhost:8080 . (see Figure 4-11).
>>>
>>> =====end of extract====
>>>
>>>
>>> On Jun 23, 2012, at 7:58 PM, juan wang wrote:
>>>
>>> > Hi:
>>> >
>>> >  I am trying to delete the attached images "welcome" widget on the
>>> index.html page. But I didn't find the html code of the welcome widget
>>> there.
>>> >
>>> > I am very appreciate it if you could tell me how to delete it on the
>>> index.html.
>>> >
>>> > Thanks!
>>> > Rebecca
>>> > <1.jpg>_______________________________________________
>>> > oae-dev mailing list
>>> > [email protected]
>>> > http://collab.sakaiproject.org/mailman/listinfo/oae-dev
>>>
>>> _______________________________________________
>>> oae-dev mailing list
>>> [email protected]
>>> http://collab.sakaiproject.org/mailman/listinfo/oae-dev
>>>
>>
>> _______________________________________________
>> oae-dev mailing list
>> [email protected]
>> http://collab.sakaiproject.org/mailman/listinfo/oae-dev
>>
>>
>>
>> _______________________________________________
>> oae-dev mailing list
>> [email protected]
>> http://collab.sakaiproject.org/mailman/listinfo/oae-dev
>>
>>
>
>
_______________________________________________
oae-dev mailing list
[email protected]
http://collab.sakaiproject.org/mailman/listinfo/oae-dev

Reply via email to