jaunesarmiento / fries

Fries helps you prototype Android apps using HTML, CSS, and JavaScript.
MIT License
1.55k stars 222 forks source link

Implement dialogs #48

Closed jaunesarmiento closed 11 years ago

jaunesarmiento commented 11 years ago

Implemented dialogs. This pull request exposes a Dialog class in the fries namespace with the ff methods:

An example of the options object is as follows:

{
  selector: '#dialog',
  okCallback: function () {
    // this is called when the user presses the "OK" button inside the dialog
    // do something here
    // optionally, you can hide the dialog afterwards
    this.hide(); // "this" refers to the dialog
  },
  cancelCallback: function () {
    // this is called when the user presses the "Cancel" button inside the dialog
    // do something else here
    // usually, you just hide the dialog so:
    this.hide();
  }
}

Notes:

jaunesarmiento commented 11 years ago

TODO: add an example of the dialog on index.html

aboudard commented 11 years ago

Will test that !

Oh I have a question, Since you use scss, why do you implement transitions and other css3 features "by hand" ? Don't you want to use compass mixins ? Just a question, I'm no expert on that really.

jaunesarmiento commented 11 years ago

I still haven't decided on which to use LOL. Now that you've mentioned it, I'll see which available mixins are viable. :)

aboudard commented 11 years ago

That's a good point :)