Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui_system: modified system prefs page #15

Open
wants to merge 16 commits into
base: gsoc2013
Choose a base branch
from
Open

Conversation

sdaityari
Copy link
Owner

No description provided.

@@ -1,379 +1,399 @@
<?php global $_config, $languageManager, $_config_defaults, $stripslashes;?>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is file changed so drastically?

}).appendTo(toggleSwitch);

toggleSwitch.click(function () {
var anchor = inputs[0].checked ? inputs[1] : inputs[0];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are using inputs[0] and inputs[1] all over the code. First of all, it makes sense to use a separate variable for those cases. Secondly, you want to give a meaningful names for those variables because it is very hard to understand for a developer what those inputs[0] and inputs[1] represent. And lastly, in the case (if for any reason) your
inputs = toggleSwitch.find("input") returns and empty jQuery array you will have JavaScript exceptions for inputs[0] and inputs[1]

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.

2 participants