Git Product home page Git Product logo

scripty2's Introduction

scripty2: for a more delicious web

scripty2 is an open source JavaScript framework for advanced HTML-based user interfaces. Or simply put, scripty2 helps you build a more delicious web:

  • Visual effects: scripty2’s heartpiece is an versatile real-time effects framework

  • CSS utilities

  • UI components (experimental)

And there’s more coming! scripty2 is currently in alpha status, so APIs can change and there’s still a lot more functionality planned.

scripty2 is a complete rewrite and reimplementation of script.aculo.us, with are modular structure intended to ease the development of highly customized user interface effects and behaviours.

Please use groups.google.com/group/scripty2 for any development questions for scripty2. Patches, tests, demos, updates and documentation are always welcome.

Build

For building, development and testing, you need to have a working Ruby setup. You’ll need the bluecloth, treetop and coderay gems installed.

To build the distribution, run:

rake && rake package

This will build the documentation (in /doc) and provides ready-to-deploy JavaScript packages in /dist.

The build process uses the YUI Compressor to build a minified version of the library file. This requires Java to be installed and available.

After the build process is done, you’ll find two files in /dist:

  • s2.js (for debugging)

  • s2.min.js (minified version for production use)

Though scripty2 has been used to great effect on several high-volume websites, keep in mind that scripty2 effects are in beta. APIs are subject to change before final release.

Build with UI

The scripty2 UI controls are under heavy development and are still in alpha. They’re not included when you run the standard rake tasks. To build a distributable with UI controls included, run:

rake dist:experimental

There are several other *:experimental tasks corresponding to common actions. Run rake -T to see the list of tasks.

Usage

scripty2 is dependent on the Prototype JavaScript framework. The download and source comes with a compatible version, or grab the latest version yourself from prototypejs.org/.

Put prototype.js and s2.js in a folder of your website, and include them as follows:

<script src="/javascripts/prototype.js" type="text/javascript"></script>
<script src="/javascripts/s2.js" type="text/javascript"></script>

You’re ready to go! Now look at the documentation and demos (see below!).

Documentation

To build the documentation, run:

rake doc

The documentation is built with PDoc, which uses specially formatted source code comments to build a fully interactive HTML documentation set.

Navigate a browser to /doc/index.html to view and browse the documentation.

Tests

To run the unit tests, use:

rake test

You can run specific tests, or use only specific browsers:

rake test BROWSERS=safari TESTS=css,heartbeat

License

scripty2 is is licensed under the terms of the MIT License, see the included MIT-LICENSE file.

scripty2's People

Contributors

charettes avatar disassemblyline avatar eric1234 avatar kommen avatar madrobby avatar philippamarkovics avatar rafalwrzeszcz avatar rstankov avatar savetheclocktower avatar sgruhier avatar smith avatar stepheneb avatar tomk32 avatar zencocoon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scripty2's Issues

S2.FX.Parallel fail to implement options

The documentation on this page http://scripty2.com/doc/scripty2%20fx/s2/fx/parallel.html suggests that effects within a parallel can have individual delay and duration properties.

In the example shown you would expect the first effect to run for 0.9 seconds after a delay of 0.1 second and the second effect to run for 0.75 seconds after a delay of 0.25 seconds.

Running the code results in both effects running for a duration of 1 second with no delay on either.

Also worth noting that the individual 'after' functions from each effect also fail to run.

Is this a bug in the implementation of S2.FX.Parallel, or a bug in the documentation. If it is a bug in the documentation, then could this parallel be extended to use these options?

Thanks.

Broken VENDOR_PREFIX detection on Minefield

It looks like firefox is dropping the style.MozBorderRadius in favor of style.borderRadius which breaks VENDOR_PREFIX detection AND VENDOR_MAP.

We should try to find another way of populating the VENDOR_MAP. Maybe by iterating through a list of style properties scripty2 depends on by testing the presence of the property and fallback appending possible prefixes (webkit Moz) and cache it.

I'll have a look at it tomorrow.

Icons/buttons on titleBar.

I've created windowing system based on S2.UI.Dialog. You can see the demo here:
http://wrzasq.pl/chilldev.js/application.html

I'm trying to implement as many features in original S2.UI.DIalog class as I can and commit it to upstream to contribute with Scripty2, but I don't want to provide code with such a nasty "hacks". The problem is with additional icons on title bar (those to iconize and collapse dialogs). We follow jQuery UI styles, but unfortunately they do not support multiple icons there (just a closing element). Does anyone have an idea how to put additional items there in celever way? At the moment i'm just setting "right" style for each element. If we work that out, I could commit at least toggling/collapsing mechanism.

setContent for a dialog box

Hi everybody
I'm not shure if it correspond to the project philosophy
but i think it could be very cool to have a method "setContent" to refresh the content of dialog box.
is it a good idea ? i've made some code to illustrate :

setContent: function(new_content) {
    if(new_content){
      this.content = Object.isElement(new_content) ? new_content :
      new Element('div').update(new_content);
    }else{
      new_content = new Element('div');
    }
    this.element.select('.ui-widget-content').first().update(new_content);
},

Dialog no transmit "memo" var with the "ui:dialog:before:close" event

there is no "memo" var when you capture the "ui:dialog:before:close" event.

it can be fixed with a copy/paste the line memo, before the element.fire "ui:dialog:before:close"

var memo = { dialog: this, success: success };

and replace

var result = this.element.fire("ui:dialog:before:close", {dialog: this);

with
var result = this.element.fire("ui:dialog:before:close", memo);

thx a lot for the fix

Hardware Acceleration Demo Incorrectly Reports that Chrome 7.0.554.0 dev Does Not Support Acceleration

http://scripty2.com/hardware-acceleration/ displays the following message, "NOTE: Your browser supports CSS transitions, but not accelerated compositing. The demonstrations on this page will work properly, but cannot take advantage of hardware-accelerated animation."

Hardware acceleration was added Sept. 30 2010 in the dev build. http://googlechromereleases.blogspot.com/2010/09/dev-channel-update_30.html

Autocompleter zIndex

Autocompleter.js
The zIndex are not set at the creation time so the list could appears behind other elements :

// Position the menu to appear directly below the input.
(function() {
var iLayout = this.input.getLayout();
this.menu.element.setStyle({
left: iLayout.get('left') + 'px',
top: (iLayout.get('top') + iLayout.get('margin-box-height')) + 'px' ,
----------->>> zIndex : 9999 <<<------------ just add this line here to fix it
});

Transition.bouncePast can be improved..

... by making the first curve an inverted parabola instead of a parabola, and merging with the second curve. The movement will then model a ball being thrown onto a high ledge and bouncing, giving the effect a more natural feel.

error when building S2 with rake task

hello,
I've checked out S2 today and try to build it.
I've found some errors because build system search file in SCRIPTY2_DEBUG_DIR but theses files are now in SCRIPTY2_DIST_DIR since commit 81e0e05

I've generated a patch but don't know how to to send it here ?
in case here the gist of the patch http://gist.github.com/234479

Button can still be clicked after setEnabled(false)

On form submit I disable all button on the page with:

$$('.ui-button').each(function(button){ button.retrieve('ui.button').setEnabled(false); });

For buttons that are <a> elements, they have the correct visual style but can still be clicked as if they were enabled.

Minefield Error on Beta1 Demo

When I try the demo in Minefield I get the following error:
$("panel").morph is not a function from line 87 on the html page:

Auto-complete Problems in IE

When trying to use the auto-complete I encountered a number of IE errors. I have forked the project on github and committed fixes to each of the issues. They are:

  • Error sending custom event to anonymous menu element - eric1234/scripty2@8e1d4e411a84039b40101db8365289fe02689cb0
  • Placement of auto-complete menu needs deferment to get accurate layout - eric1234/scripty2@12dacf62fa335363dfe3f44cd27c601bfafb7947
  • Check for selected item when setting input -
    eric1234/scripty2@96b63c63b4d76d385c4f4639a24001dccc659854

I am putting this all under one ticket as it is really just about getting Auto-complete to work in IE. But each change is as a separate commit so you can cherry-pick the commits you want and/or provide a different implementation if you prefer.

I will also send a pull request to this project.

Animation breaks when combining S2.FX.SlideUp & morph (w. CSS transitions enabled)

I noticed interesting issue with combining slideUp and morph, which breaks following animations when they're css-transition -based.

I stripped it down to this simple test case — http://jsfiddle.net/xBgtm/6/

Notice 2 implementations and how 1st one (slideUp + morph) breaks when CSS-transitions -based effects are enabled, whereas 2nd one works as expected.

I didn't look deep down into it, to see what exactly is going on, but I did notice transition-related styles (-transition-property, -transition-duration, etc.) NOT being removed from an element after animation is finished. This happens only when combining morph and slideUp/Down. When using standalone morph, transitions styles are removed properly. That's probably what makes the following animation fail.

Finally, I'm not fully sure, but it also looks like only morph uses CSS transitions for animation, and slideUp/Down doesn't. Is that so? And if yes, what's the reason?

Thanks!

Multitouch less responsive in a5

I'm working on an app that uses multitouch transforms heavily. I was developing with a3 and not having any problems. When I moved over to the master a5 (with no changes to multitouch, just lots of extra UI features), I see the manipulate:update events coming much more slowly. As a result, the scaling becomes wildly inappropriate. This is on a fairly new Mac 10.5 with both the latest WebKit and FF3.6. I would appreciate if someone else could reproduce the bug to make me feel I'm not crazy.

How to reproduce the issue:

Download the source of the flickr demo ( http://scripty2.com/demos/touch/touchshow/ ) and run it with a local copy of scripty2_a3. When you resize an image, note that it resizes proportional to the distance dragged, and can be resized smaller by dragging back toward where you started. Now run the page against a local copy of scripty_a5. When resizing an image, notice that it gets bigger much faster, and when you drag back toward the starting-point, it still gets bigger.

Dead?

Is this project discontinued? If so, what alternative would you suggest?

Cannot pass button options to dialog buttons

Simple solution:
if a button "options" property exists then pass it to the UI.Button constructor. Resulting example for API would be something like:

new S2.UI.Dialog({
   ...,
   buttons:[ {
      primary:true,
      label:'OK',
      action:someAction,
      options:{icons:{primary:'ui-icon-check'}}
   } ]
}

Dialog content not selectable

This behavior could be a bug if the content of the Dialog is a form. You only could focus the form elements using tabs, click on they using the mouse is impossible.

Need more flexibility with dialog return keypress

Dialog by default closes on return keypress with success status. However, there doesn't seem to be a good way to prevent this if you want to use an ajax request to determine the success.

Example: I have a sign-in dialog that I want to appear throughout the site and have different success callbacks in some cases so I observe the container's ui:dialog:close:after event and success means the sign-in was successful and otherwise not. But if the user presses enter the dialog is closed with success and there is no way for my callback to distinguish a success from my ajax callback versus the return keypress.

Suggestion: at minimum, add a closeOnReturn option so this behavior can be easily disabled. Otherwise, it seems like the most logical action for the return keypress would be to trigger the click action of the primary button so that the actions attached to the button are executed instead of just always closing the window.

default rake task fails running :package, :package works fine in isolation

Using git clone of repo and ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0].

Running the default rake task which executes:

[:clean, :dist, :unified, :doc, :package, :clean_package_source]

fails running the :package task with this error:

** Invoke package (first_time)
** Invoke /Users/stephen/dev/javascript/scripty2-git/pkg/scripty2-2.0.0_a4.tar.gz (first_time)
** Invoke /Users/stephen/dev/javascript/scripty2-git/pkg/scripty2-2.0.0_a4 (first_time)
rake aborted!
Don't know how to build task 'README.rdoc'

Running:

rake package

by itself works fine.

Scripty2 not working in firefox?

Scripty2 's morph() function is not working in firefox while in webkit (tried Comodo Dragon and Chrome Canary) it works fine. In Opera also it works perfect.

In firefox, console reports " $('main').morph is not a function " error all the time.

Can anyone tell me what's going on??

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.