Giter Club home page Giter Club logo

chico's People

Contributors

atma avatar battaglr avatar cuanini avatar djanowski avatar dudesl avatar eridal avatar ffelixml avatar hgarzon avatar hmammana avatar ignacioribes avatar lean8086 avatar natos avatar ndevalle avatar pazguille avatar tauchter 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  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

chico's Issues

Add a core method "delete" to erase instances from memory

And a mechanism to erase instances from the instances map to free browser memory on heavy works.

  • Erase a component from itself:
    modal.erase( null );
  • Erase a instance and his family:
    ch.eraser( 0 ); // uid
  • Erase a type of component:
    ch.eraser( "tooltip" );
  • Erase all:
    ch.eraser( "meltdown" );

With these things done

We need a delete method in every component to:

  • Unbind events
  • Remove HTML Snippets
  • Erase variables

Make a plan.

Watcher: URL validation is too permissive

The URL validator seem to be too permisive in Chico 0.5.7. For example the string "foo" is a valid URL, as well as any string with at least one non-whitespace character, like the string "½" or even "uʍop-ǝpısdn" or "☠".

The problem (probably) lies in the regex that Chico uses to validate URL's:

/((ftp|http|https):\/\/)?(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/

As all the groups are optional except (\S+), it makes every string a valid URL except the empty ones:

>>> /((ftp|http|https):\/\/)?(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test('|@#~½¬')
true
>>> /((ftp|http|https):\/\/)?(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test('   ')
false

Maybe the regex should check that the characters are valid ones. Or use the jQuery Validation plugin.

Los labels no dan foco al campo

Estuve viendo que los labels no dan foco al campo input.
Probé agregarle overflow:hidden; ya que los elementos internos están flotados y comenzó a tomar el evento.

FF 3.6.13 Ubuntu

Over lupa en Picture Viewer

Al ingresar en el picture viewer se muestra la lupa, aunque no se este sobre la imagen para abrir el modal.

Improvement: Add telephone validator

As of now, there is no built-in mechanism to validate telephones in Chico. It would be neat to have one :)

Probably just a simple regex to validate that input consists of just numbers, spaces, and some symbols, like + - * ( )

Watcher.reset() disables all handlers attached to "blur" event

If I have an element with a handler attached to the "blur" event:

$(element).blur(someHandler);

And a watcher for that element:

watcher = $(element).required();

When calling watcher.reset() the event handler someHandler gets unbound from the "blur" event.

This is quite annoying, as I have to remember to re-bind the handlers after calling reset, which makes the Chico-related code highly coupled with the rest of the application.

Taking a look at Chico's code, I noticed that the reset method is calling .unbind("blur") on the element, which unbinds all the blur handlers attached to it, when it probably should only unbind the handlers that Chico has attached, calling unbind with a second argument: unbind(event, handler).

Carrousel: Elastic width + redraw method

Carrousel: Add support to elastics widths and add a redraw method so carrousel data can be re-processed. Maybe is a good idea subscribe to the global event CHANGE_LAYOUT or something.

Viewer: Use only one instance of modals

We have a serious issue with performance here. Viewer is creating a lot of modals and using a lot of memory.
We need to handle a singleton instance of a modal component.

Error not revalidated on blur when field is empty

Given a a watcher with validations other than required, on blur event it's not revalidated, hence validation errors don't go away.
This is due to pre-validation of ch.watcher.validate() method:
if ( !that.validations.hasOwnProperty("required") && that.isEmpty() ) { return; }
When the field isn't required and is empty, it just returns but it doesn't change watcher's active satus nor hides the helper message

tablas!!!

Algo para tablas! tipo el admin de mercadoclics :)

Bug: Required watcher doesn't work on selects

After upgrading our project from Chico 0.5.4 to 0.5.6 the Required watcher stopped working on select tags.

This is a sample page that shows the unexpected behavior:

<!doctype html>
<!--[if IE]><![endif]-->
<!--[if lt IE 7 ]> <html lang="es" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]>    <html lang="es" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]>    <html lang="es" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]>    <html lang="es" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="es" class="no-js"> <!--<![endif]-->
<head>
    <script></script>
    <meta charset="utf-8">
    <title>Chico UI</title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
    <script src="http://download.chico-ui.com.ar/chico-min-0.5.6.js"></script>
    <link rel="stylesheet" href="http://download.chico-ui.com.ar/chico-min-0.5.6.css">
</head>
<body>
<div class="box">
    <form action="#">
        <fieldset>
            <ul>
                <li class="fieldBox">
                    <label class="required" for="field">
                        <span>Skub? <em>*</em></span>
                        <select id="field" required="required">
                            <option value="">-- Choose --</option>
                            <option value="1">Pro Skub</option>
                            <option value="2">Anti Skub</option>
                        </select>
                    </label>
                    <p class="help">Why is this not working?</p>
                </li>
            </ul>
        </fieldset>
        <p class="actions">
            <input type="submit" value="Send" class="btn primary">
        </p>
    </form>
</div>
<script>
var form = $('form').form({
    messages: {
        required: "It's required",
    }
});
$('#field').required();
</script>

</body>
</html>

No error message is shown when the form is submitted with the "-1" value.

With prevoius versions of Chico, the value "-1" is treated as a no selection and causes a validation error when trying to submit the form, but it doesn't seem to be the case anymore. Now the empty string value "" is the one that triggers the validation error.

LoadContent: Add headers to ajax request

Actually we are sending a querystring x=x to let the server know when is an ajax request. There is a better way to do this, by creating a header in the request. Available with jQuery 1.5

Don't remove the query string for backwards compatibility.

Watcher: Improve merge instances

Today Watchers are merging a lot of data and processing a lot of things without any particular reason. We need to improve the merge instances process.

Keyboard support

Create a small keyboard event handler so components can lisent keyboard events and subscribe to call actions.
This handler should trigger friendly keyword event like "enter" or "esc" so in a component you could:
$(document).bind("enter", function(){ component.send(); });
$(document).bind("esc", function(){ component.close(); });
The handler should trigger like:
$(document).trigger(ch.events.KEY.ENTER);

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.