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

nest options #103

Merged
merged 4 commits into from
Nov 7, 2013
Merged

nest options #103

merged 4 commits into from
Nov 7, 2013

Conversation

purge
Copy link
Collaborator

@purge purge commented Nov 7, 2013

sqwidget-css-moo-baa="gorch" becomes

{ "css": { "moo": { "baa": "gorch } } }

in config


for (key in elData) {
val = elData[key];
if (!(key.match("^sqwidget"))) { continue; }
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm thinking if we should make all the data attributes available to the config? There's no harm in it and may keep embed codes shorter for someone.

I won't want to use something that's not prefixed for my own projects - but someone may.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

w3c recommends prefixing.

On 7 November 2013 at 17:27:17, Adhip Gupta ([email protected]) wrote:

}

  • key = key.replace("sqwidget", "").toLowerCase();
  • data[key || "url"] = val;
  • };
    +
  • for (key in elData) {
  • val = elData[key];
  • if (!(key.match("^sqwidget"))) { continue; }

I'm thinking if we should make all the data attributes available to the config? There's no harm in it and may keep embed codes shorter for someone.

I won't want to use something that's not prefixed for my own projects - but someone may.


Reply to this email directly or view it on GitHub:
https://github.com/premasagar/sqwidget/pull/103/files#r7502938

Copy link
Collaborator

Choose a reason for hiding this comment

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

So should we make this prefix a little more configurable? #97

delete elData.sqwidget;
}

var nest = function( names, data, val ) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This definitely needs to be documented.

adhipg added a commit that referenced this pull request Nov 7, 2013
@adhipg adhipg merged commit ab3619f into feature/optimize Nov 7, 2013
@adhipg adhipg deleted the feature/nest-options branch November 7, 2013 17:41
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