Skip to content
This repository has been archived by the owner. It is now read-only.

Port modular javascript framework from transition #3

Merged
merged 2 commits into from May 22, 2014

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented May 22, 2014

  • Originally written in alphagov/transition#192
  • Rename global from GOVUK to GOVUKAdmin to avoid clashes with existing
    JavaScript within applications
  • Using GOVUKAdmin makes it clearer when apps are using the gem’s
    javascript
  • Include documentation in JAVASCRIPT.md
  • Include useful modules:
    • Automatically show bootstrap modals on page load
    • Automatically track Google Analytics events on page load
    • Filter the contents of a table
    • Fix a table’s header when scrolling
    • Select items in a table and perform an action on them
    • A simple toggle for hiding/showing — toggles target elements
fofr added 2 commits May 22, 2014
* Originally written in alphagov/transition#192
* Rename global from GOVUK to GOVUKAdmin to avoid clashes with existing
JavaScript within applications
* Using GOVUKAdmin makes it clearer when apps are using the gem’s
javascript
* Include useful modules:
  * Automatically show bootstrap modals on page load
  * Automatically track Google Analytics events on page load
  * Filter the contents of a table
  * Fix a table’s header when scrolling
  * Select items in a table and perform an action on them
  * A simple toggle for hiding/showing — toggles target elements
@jamiecobbett
Copy link
Contributor

@jamiecobbett jamiecobbett commented May 22, 2014

I really like the JAVASCRIPT.md 👍

jamiecobbett added a commit that referenced this pull request May 22, 2014
Port modular javascript framework from transition
@jamiecobbett jamiecobbett merged commit ad0a832 into master May 22, 2014
1 check passed
1 check passed
default "Build #2 succeeded on Jenkins"
Details
@jamiecobbett jamiecobbett deleted the port-transition-js-framework branch May 22, 2014
fofr added a commit to alphagov/govuk_frontend_toolkit that referenced this pull request Nov 11, 2015
Find and auto-start modules specified using the `data-module=""`
pattern in markup.

Each module must register a constructor with GOVUK.Modules and
have a `start` method. The start method receives the element that
the data attribute is defined on.

This makes it easier to limit modules to their containers and to
start modules within certain elements We can also remove inline
script tags and stop worrying about instantiation.

Based on the govuk_admin_template:
alphagov/govuk_admin_template#3
fofr added a commit to alphagov/govuk_frontend_toolkit that referenced this pull request Nov 11, 2015
Find and auto-start modules specified using the `data-module=""`
pattern in markup.

Each module must register a constructor with GOVUK.Modules and
have a `start` method. The start method receives the element that
the data attribute is defined on.

This makes it easier to limit modules to their containers and to
start modules within certain elements We can also remove inline
script tags and stop worrying about instantiation.

Based on the govuk_admin_template:
alphagov/govuk_admin_template#3
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants