Commit Graph

12 Commits

Author SHA1 Message Date
Ryan Shaw b91fed2744 use relative imports in public/javscripts
Closes:  CNVS-37112

Test plan:
This doesn’t actually change anything. If web pack
builds, it should be fine

Change-Id: Ie356875e8a2a4bdfbefc1482b7e728290b0fe6e5
Reviewed-on: https://gerrit.instructure.com/112972
Tested-by: Jenkins
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-05-25 15:07:48 +00:00
Ryan Shaw b2700d45b6 [ci coverage] convert public/js w/ no ‘export’s to ‘import’
closes: CNVS-35922

now that we pass all of public/javascripts through
babel, istanbul/esprima should not choke on `import`
in our JS tooling.

test plan:
* run `yarn test` w/ COVERAGE=1
* it should work

Change-Id: Ia19deb547350245b7cae54e76e56ae6355f61b2c
Reviewed-on: https://gerrit.instructure.com/105962
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-05-19 19:11:12 +00:00
Landon Wilkins 1649b7e30c da licença part 51
add consistent license headers to all source files

Change-Id: Ie6f2d48e5615052512ee19bf090bcd06bcb8e11f
Reviewed-on: https://gerrit.instructure.com/110162
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-28 19:05:00 +00:00
Jeremy Stanley 1ba5a1f1fc include question bank name in bookmark/edit/delete sr text
test plan:
 - ensure the screenreader reads the question bank name
   in the bookmark / edit / delete buttons
   on the question bank index page
 - also make sure this works for newly added question banks

closes CNVS-35438

Change-Id: I721be07540410540fe4e55b763182ae198b20d21
Reviewed-on: https://gerrit.instructure.com/106004
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2017-03-23 21:18:05 +00:00
Nathan Mills 01104fb448 set correct focus for tab and return on question bank add
fixes CNVS-26255

test plan:

Navigate to the Account Question Banks page of an account
Click on the Add Question Bank button on the right
With the name field text focused, press Tab
Focus should be on the breadcrumbs

Click on the Add Question Bank button on the right
Enter a title and press enter
Focus should be set to the title of the new bank

Change-Id: I38a42757fdf2e033dd05c89a1343e816c5899c7b
Reviewed-on: https://gerrit.instructure.com/70421
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Reviewed-by: Davis McClellan <dmcclellan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
Tested-by: Jenkins
2016-02-04 16:44:31 +00:00
Nathan Mills 930dd4a69f bookmark button should retain focus
fixes CNVS-26257

test plan:

on the question bank page tab to the bookmark icon
next to a QB and press enter

the kb focus should stay on the icon

Change-Id: I3ea57d8e25076fd62989c180e64fe02660618a2a
Reviewed-on: https://gerrit.instructure.com/70433
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Nathan Rogowski <nathan@instructure.com>
2016-01-27 21:33:02 +00:00
Jacob Fugal 24e2f3ab57 goodbye, $.parseFromISO
the vast majority of calls were only to access:

 * the parsed-then-fudged value; this can be accomplished with just
   fudgeDateForProfileTimezone (given an ISO string it will parse it,
   format it relative to the profile timezone (without tz info), then parse
   it relative to the browser timezone. unfudging this result will give
   you back a time accurately representing the original string)

 * one or more formattings of the parsed value; use the appropriate
   formatter (if multiple are used, parse with tz.parse() first for
   efficiency)

one notable exception was in the gradebook (both regular and
screenreader). it was using parseFromISO to parse the ISO string
received from the server, but then only sometimes treating that as a
object while other times assuming (incorrectly) that it had a Date
object or timestamp. we make it always be a Date object, and fix the
places that assumed it needed to be a parseFromISO result object.

Change-Id: I86c077c046e74760a538849ce58f2952ada1fb99
Reviewed-on: https://gerrit.instructure.com/32110
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Anthus Williams <awilliams@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2014-03-27 17:28:27 +00:00
Ryan Florence 5642e3a366 require -> define in public/javascripts
Change-Id: I66f37744c278fac29fcf6f8e85326c84512da468
Reviewed-on: https://gerrit.instructure.com/9174
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-03-05 14:19:50 -07:00
Ryan Florence a1e31c8c9a AMD Conversion
"Trivial" JavaScript / CoffeeScript changes
--------------------------------------------------

For the most part, all javascript was simply
wrapped in `require` or `define`. The dependencies
were found with a script that matched regexes in
the files, it errs on the side of listing too many
dependencies, so its worth double checking each
file's dependencies (over time, anyway).

i18n API changes
--------------------------------------------------

No longer have to do I18n.scoped calls, just
list i18n as a dependency with the scope and it's
imported already scoped

  require ['i18n!some_scope'], (I18n) ->
    I18n.t 'im_scoped', 'I'm scoped!'

JS bundling now done with r.js, not Jammit
--------------------------------------------------

We don't use jammit to bundle JS anymore. Simply
list dependencies for your JS modules in the file
and RequireJS handles the rest.

To optimize the JavaScript, first make sure you
have node.js 0.4.12+ installed and then run:

  $ rake js:build

The app defaults to the optimized build in
production. You can use non-optimized in
production by putting ?debug_assets=true in the
url just like before.

You can also test the optimized JavaScript in
development with ?optimized_js=true.

Significant changes
--------------------------------------------------

These files have "real" changes to them (unlike
the JavaScript that is simply wrapped in require
and define).  Worth taking a really close look at:

- app/helpers/application_helper.rb
- app/views/layouts/application.html.erb
- config/assets.yml
- config/build.js
- lib/handlebars/handlebars.rb
- lib/i18n_extraction/js_extractor.rb
- lib/tasks/canvas.rake
- lib/tasks/i18n.rake
- lib/tasks/js.rake

Change-Id: I4bc5ecb1231f331aaded0fef2bcc1f3a9fe482a7
Reviewed-on: https://gerrit.instructure.com/6986
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-02-06 16:41:40 -07:00
Bracken Mosbacker 69a0bc4ffe i18n js question banks
Change-Id: If83122d76f36a24570e7dfd6a6a3f63abe79f2eb
Reviewed-on: https://gerrit.instructure.com/4415
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Bracken Mosbacker <bracken@instructure.com>
2011-06-30 08:04:21 -06:00
Zach Wily 3456f07105 don't create 2 question banks when hitting enter; fixes #4105
Change-Id: I2c17559abf4f403dcbb853d7504f709af657fd00
Reviewed-on: https://gerrit.instructure.com/2979
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-04-07 15:50:57 -06:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00