Skip to content

Conversation

@Pilinet
Copy link

@Pilinet Pilinet commented Nov 19, 2012

Hi,

I have added some jQuery so that the permission icons change on-the-fly when changes are made. Check it out and see if you like it!

Regards,
PILAR RODRIGUEZ

@FMCorz
Copy link
Owner

FMCorz commented Nov 19, 2012

Thanks for providing this. I'll try to have a look as soon as I can. First question, is there a nice fallback in can jQuery or JavaScript are turned off?

@Pilinet
Copy link
Author

Pilinet commented Nov 19, 2012

Sorry, but I don't understand your question

2012/11/19 Frédéric Massart [email protected]

Thanks for providing this. I'll try to have a look as soon as I can. First
question, is there a nice fallback in can jQuery or JavaScript are turned
off?


Reply to this email directly or view it on GitHubhttps://github.com//pull/8#issuecomment-10515875.

@FMCorz
Copy link
Owner

FMCorz commented Nov 19, 2012

Oh sorry, I was just wondering what happened in case jQuery was not available within Cake, or if the user has Javascript disabled in his browser.

@Pilinet
Copy link
Author

Pilinet commented Nov 19, 2012

JavaScript needs to be enabled. My code first just checks if jQuery is
present in the project, if it isn't, the jQuery code is not executed. But
you're right, instead of not to execute it, I can add some lines to load
the jQuery files:

*if (typeof jQuery == 'undefined') {
var script = document.createElement('script');
script.type = "text/javascript";
script.src = "http://code.jquery.com/jquery-1.8.3.js";
document.getElementsByTagName('head')[0].appendChild(script);
}
//Code

Better in that way, is not?
*
*Regards

PILAR RODRÍGUEZ
*
2012/11/19 Frédéric Massart [email protected]

Oh sorry, I was just wondering what happened in case jQuery was not
available within Cake, or if the user has Javascript disabled in his
browser.


Reply to this email directly or view it on GitHubhttps://github.com//pull/8#issuecomment-10516391.

@FMCorz
Copy link
Owner

FMCorz commented Nov 21, 2012

I guess my main concerns here are:

  • We need to ensure that the plugin would work just as fine when JavaScript is turned off.
  • I haven't worked on CakePHP for quite some time but I know that there is an API for JavaScript, which does not rely on a specific engine (or should not), I think we should definitely make use of that and not force users to use jQuery if they're already using another engine.
  • Also, I dislike the include of jQuery libraries, again we could make use of the built-in functionalities.
  • Last but not least, I initially developed this plugin for CakePHP 2.0beta and we should make sure that it would still work on CakePHP 2.0+, everyone should be able to use the new features in this plugin without having to update CakePHP itself.

Thanks for your time! Let me know what you think about all that.

Cheers,
Fred

@Pilinet
Copy link
Author

Pilinet commented Nov 22, 2012

Hello,

I will have a look on it at the beginning of next week.

Thank you for your response

PILAR RODRÍGUEZ

2012/11/21 Frédéric Massart [email protected]

I guess my main concerns here are:

  • We need to ensure that the plugin would work just as fine when
    JavaScript is turned off.
  • I haven't worked on CakePHP for quite some time but I know that
    there is an API for JavaScript, which does not rely on a specific engine
    (or should not), I think we should definitely make use of that and not
    force users to use jQuery if they're already using another engine.
  • Also, I dislike the include of jQuery libraries, again we could make
    use of the built-in functionalities.
  • Last but not least, I initially developed this plugin for CakePHP
    2.0beta and we should make sure that it would still work on CakePHP 2.0+,
    everyone should be able to use the new features in this plugin without
    having to update CakePHP itself.

Thanks for your time! Let me know what you think about all that.

Cheers,
Fred


Reply to this email directly or view it on GitHubhttps://github.com//pull/8#issuecomment-10585037.

@FMCorz
Copy link
Owner

FMCorz commented Feb 5, 2013

Hi there,

did you get a chance to work on the patch?

Cheers,
Fred

@Oxicode
Copy link

Oxicode commented Jan 23, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants