rails4 removed the automatic initialization of a local variable
matching the name of a partial view
(e.g. setting `course` to nil in _course.html.erb)
also helper methods are protected so they cannot simply be
delegated to the spec controller anymore
refs #CNVS-21596
Change-Id: I7ce8b8a0084602a93f8ac571ee5c98740cb861d1
Reviewed-on: https://gerrit.instructure.com/58718
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
closes CNVS-19321
Was going to make the datepickers here more accessible, but it
looks like this file just doesn't get used anymore (because I can't
turn on "old files" anymore, the featureflag is hard-wired off).
TEST PLAN:
1) file browsing should not break
Change-Id: I8916cc0d88a1b444b0d7bf3da13856072ec25be0
Reviewed-on: https://gerrit.instructure.com/56572
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
Fixes CNVS-15542
Test plan:
- Visit all date picker fields in canvas in Canvas using a screen reader,
including the following:
- Calendar
- Assignments
- Files
- Assignment Peer review
- Quizzes
- Verify that each field's label (as read by the screen reader) makes it clear that the field takes a date.
Change-Id: Ib681168ef571c47994f0f834987d4a5861c7c3a1
Reviewed-on: https://gerrit.instructure.com/47933
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
Bug Description: If a teacher marked a file in a course
as unpublished, the user could still access that file by
going to their legacy user files /files/:id (show) URL.
fixes CNVS-18256
Test Plan:
* Enable "Better File Browsing" Feature Flag
* Open two browser windows; one as a teacher
and one as a student in a course that the
teacher is enrolled in
* As the teacher, go to a course's Files page
* Select a file or upload a new one
* Make sure the file is unpublished
* Preview the file, then copy the number after
"?preview=" in the URL that's in the address bar
* Go to /files/THAT_NUMBER_THAT_YOU_JUST_COPIED
* You should see a preview of the file
* As the student, go to:
/files/THAT_NUMBER_THAT_YOU_JUST_COPIED
* You should see a message stating that the file
is locked
Change-Id: I85759ec4d1642effbfdc98131238338b25ba598d
Reviewed-on: https://gerrit.instructure.com/48020
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
fixes: CNVS-16393
/dashboard/files did the same thing as /files
in old files. we don't want to continue to support
the /dashboard prefixed url and prefer to just
use /files.
test plan:
* with newfiles turned off:
* click your name in very top (next to "inbox settings logout")
* click the "Files" tab on the left
* it should render the oldfiles browsing interface
* now, with: User.find(<your_user_id>).account.enable_feature!(:better_file_browsing)
* do the same thing, and it should render newfiles
* they both should go to /files. not /dashboard/files
Change-Id: Ic18e6d93031b9ebc6798849cadc441c2a664e1f0
Reviewed-on: https://gerrit.instructure.com/44337
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
closes CNVS-13380
closes CNVS-8057
closes CNVS-5156
Test plan:
* scribd should no longer exist
* document previews should work in canvadocs
Change-Id: I5ac60c3e986f030c3aea88e32d2992ec7b1c7a08
Reviewed-on: https://gerrit.instructure.com/37895
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Fixes CNVS-14293
Test plan:
Visit the following pages and verify that each:
- has an unaltered visual appearance
- has exactly one level 1 heading which can be navigated to by screen readers
- When appropriate (I.E. when the length or organization of the page warrents
it) has lower level headings which can be navigated to by screen readers
- when lower level headings are present, heading levels proceed in order, and
logically
The following pages should be verified to confirm they meet the above criteria.
Note that the URL fragments provided may not be reachable on all installs,
and should be modified appropriately.
- /courses/1/assignments
- /courses/1/assignments/18
- /courses/1/discussion_topics (Sections should be level 2, individual
discussions level 3.)
- /courses/1/users/prior
- /courses/1/pages/front-page
- /courses/1/pages/front-page/revisions
- /courses/1/assignments/syllabus
- /courses/1/outcomes
- /courses/1/rubrics
- /courses/1/quizzes/11/take?preview=1
- /courses/1/quizzes/11/moderate
- /courses/1/question_banks
- /courses/1/modules
- /courses/1/statistics
- /courses/1/confirm_action?event=conclude
- /courses/1/copy
- /courses/1/content_migrations
- /courses/1/content_exports
- /courses/1/content_exports
- /profile/communication
- /users/2/user_notes
- /courses/1/users/1/usage
- /courses/1/announcements
- An additional heading can be seen by loading the page when no
announcements exist.
- /courses/1/pages
- /courses/1/files
- /courses/1/quizzes
- /courses/1/settings
- /dashboard/files
- /courses/1/outcomes/users/1
Change-Id: I26d7dba115105c36026758cf55644139116224ec
Reviewed-on: https://gerrit.instructure.com/37669
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
test plan:
- create a course with each type of module item
(assignment, quiz, file, page, discussion, external url,
and external tool)
(and put the file into the sequence in two places)
- with draft state off, ensure the old module item sequence footer
appears and works properly for each item
- with draft state on, ensure the new module item sequence footer
appears and works properly for each item
- and the old footer does not temporarily appear first
- and the file shows the correct sequence each place it's used
fixes CNVS-11809
fixes CNVS-11978
fixes CNVS-11977
Change-Id: I52f07a8026cb6697aac24bc4027f6bf696a87239
Reviewed-on: https://gerrit.instructure.com/32352
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
We need to hide the preview button from screenreaders in the Files
section
fixes: CNVS-9249
Test Plan
With VO and JAWS:
1. Go to the files section of a course
2. Upload a PDF file, or any other file supported by the previewer
3. Using the screenreader, navigate to the file name
4. From the file name, try to navigate to the "Preview" link;
it should skip over it and not read it
Change-Id: I5c5c0d2aa6385981346562fda7d1fe4d2057c1e8
Reviewed-on: https://gerrit.instructure.com/25932
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
- create a course in a sub-account
- in the sub-account's scribd plugin settings, check the
"Enable HTML5 Document Viewer" checkbox
- verify a document in a course outside this sub-account
renders with the Flash scribd viewer
- verify a document in a course inside this sub-account
renders with the HTML5 scribd viewer
- verify that the Attachment's last_inline_view attribute
is set either way
- verify that viewing a document from the files page
in HTML5 mode, entering full-screen, and then leaving
full-screen returns to the files page and not to
a wall of JSON
refs CNVS-6370
fixes CNVS-8605
Change-Id: Iaf486feb3dd29548df32b1876975b20eb94668d0
Reviewed-on: https://gerrit.instructure.com/24121
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
test plan:
1. work in an account with scribd enabled
and google doc previews disabled
(in console, add "-google_docs_previews" to the
Accounts's allowed_services)
2. upload a scribd-previewable file type in the files tab
(it needs to be a new file that is not already in
the canvas instance)
3. make sure it previews properly (it may take a minute
after uploading for the scribd rendering to complete)
4. delete the file
5. undelete the file (/courses/X/undelete)
6. reload the files tab, and click on the filename on the
left side.
- on the right, you should see a message like
"the preview for this document is unavailable;
please try again later".
7. reload the files tab again, then click on the filename.
- if the scribd rendering has completed, you should see
a scribd preview. if you don't, wait a few minutes and
reload the files page again, to give scribd some time.
8. test other areas documents can be previewed. (it's
permissible to simply delete the scribd_doc in the console
via attachment.delete_scribd_doc, then try to preview,
see that a "try again later" message appears, and the
scribd preview appears in later page views.)
a. documents embedded in rich text via the wiki sidebar
b. student submissions, as viewed by the student
("submission details" button, "preview" icon)
c. student submissions, as viewed by the teacher
in SpeedGrader(TM)
fixes CNVS-7019
Change-Id: I37be820a776637252e14b6a28a1be389b718ff9f
Reviewed-on: https://gerrit.instructure.com/22438
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
test plan:
* upload a media file (video/audio) to a course
* when either:
* linking the file to a module item and
clicking on the item link
* or, directly going to the file show page
(e.g. '/courses/:course_id/files/:attachment_id')
* confirm that the media preview appears (rather
than a failed document preview), just as on
the main 'Files' page
fixes #CNVS-2529
Change-Id: Ic8701c28a7ea0382de84e36fc363c0cff8cc2ac6
Reviewed-on: https://gerrit.instructure.com/21616
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
to collect data about when scribd (or crocodoc) documents
are not being used and can be purged from third party servers
to save money
fixes CNVS-5310
note: this data is not yet exposed; it can only be queried
from the database manually for now
test plan: make sure the last_inline_view attribute for an
Attachment is updated whenever the attachment is viewed via
scribd or crocodoc. this can be done in several ways:
- via the preview icon that appears next to a document link
in rich text
- on the files page
- for student submissions on SpeedGrader
the easiest way to check this is in the Rails console.
get the attachment id from the canvas url, then,
in the console (after switching to the correct shard),
do
Attachment.find(id).last_inline_view
Change-Id: I137ab631ad4eefdf4d9af353dd11191b7f2ca140
Reviewed-on: https://gerrit.instructure.com/20810
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
* visit the files page
* confirm that the dialog for locking a folder
and the dialog for locking a file have checkboxes
that are properly aligned.
fixes #CNVS-4874
Change-Id: I64cdd479a3d7027384b3b3eb1eaf66f0b2ed7d31
Reviewed-on: https://gerrit.instructure.com/18940
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
Files needed the clear fix class added.
Steps:
1. View a course or personal files page.
2. When there are multiple files, it should all
be formatted correct.
3. Preview and image on the files page.
4. The header should be formatted correctly.
Change-Id: I54de8758a0f169695a0e2c6066c13bbc19615b91
fixes: CNVS-4305
Reviewed-on: https://gerrit.instructure.com/18219
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
viewing and editing collaborations on the files page has
been broken for some time now (although it still slows down
the page load by including a complete list of enrollees in
the HTML). this functionality is redundant with the
"Collaborations" tab anyhow, so consensus is it should be
removed instead of fixed
fixes CNVS-4464
fixes CNVS-4469
test plan:
- files page should no longer have a "collaborations" folder
(this is no loss, because it was broken before)
- files page should not embed the names and IDs of every
student in the course in invisible HTML elements
(inspect/search source to confirm; this vestigial data
added over 3MB to the page and ~30 seconds to the page
load in a course with 10,000 students)
- other files page functionality should still work
- collaborations tab should be unaffected
Change-Id: I389d351d3988e8aed9b9ddd6c353082441f5d9f7
Reviewed-on: https://gerrit.instructure.com/18399
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
this commit does the following:
* upgrade bootstrap-sass gem to most recent version
* switches to using bootstrap's normalize.css and forms.css
which fixes a whole bunch of misformatting of how bootstrap
stuff is supposed to look, but changing those 2 affects
a lot of our old stylesheets.
* gets rid of unified_buttons.sass and just uses bootstraps buttons.
.ui-button @extends these because we still have to support .ui-button
for modals & buttonsets. but .button is no longer supported.
* a lot of css file reorganization (there's no more 'blue' and
'normal canvas', there's just canvas)
* a bunch of files had to be tweaked to look good with these changes.
test plan:
This change touches every page in canvas so, no kidding, we need to make
sure every page looks OK. In order to do that:
1. each sprint team needs to give a +1 after they make sure all the
pages in the features they are over look good.
2. the QA person on each team needs to look at the pages for their
teams features for a QA +1
things to look for specifically when testing:
* buttons: this gets rid of all those red 'cancel' links
that are actually buttons, make sure all the buttons you see
look right. if you see 2 plain gray buttons next to each other
like [Save] [Cancel], we should make the primary one blue (by
adding the .btn-primary class)
* Forms: a lot of this change has to do with how form elements look,
especially <select>s, <input>s and <label>s. look at the diffs
for the ones that have the most changes and make sure those look
good, but also check for the ones I missed and make sure those
look good too.
* and just random style changes, if something looks ugly or broken
(and it didn't before), we should fix that.
Also:
just use a link instead of a drop-menu for adding event from sidebar
we used to have a drop down menu for adding events
to cal2 from the sidebar where you'd hit a cog
and it'd ask you if you wanted to add an event or
an assignment. this just simplifies it to an add
icon.
this: http://cl.ly/image/133a2A3q3q1M
instead of: http://cl.ly/image/46463o2s3W0g
Change-Id: I384fe273934bca96bf28423afb1402c7792d8766
Reviewed-on: https://gerrit.instructure.com/15422
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
fixes CNVS-3404
test plan:
* navigate to course files page and click the
collaborations folder;
* verify that 'Manage collaborations' link is present in
the files interface header;
* click the link and verify that it links to the
collaborations page.
Change-Id: Id1a67ced14d220f98b10c1e63b6b651c97d2b473
Reviewed-on: https://gerrit.instructure.com/17633
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
in order to not have to support buttons with .ui-button AND
.button AND .btn classes this simplifies and and makes our
codebase more consistent by deprecating the .button class
with .btn
Change-Id: I4802d785a47b36aa477f302e6ac8c87715db8a62
Reviewed-on: https://gerrit.instructure.com/15194
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
fixes#10236
test plan:
check each updated form to ensure it looks correct and works
Change-Id: I073c3bff5860bab0b892fecbf61a41a8e9c5ec76
Reviewed-on: https://gerrit.instructure.com/13904
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Google previews weren't being shown
Test Plan:
* only enable google docs locally
* upload a pdf to the course
* link a module to that file
* click the module link
* the file should be previewed with google docs
refs #11219
Change-Id: I75da7ba9fbfbd4051f3d5493a4bbb99c076cddc5
Reviewed-on: https://gerrit.instructure.com/14653
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
when I switched scribd previews from using
the flash viewer to html5 I forgot to clean up
references to scribd.view.js
Change-Id: Iee01271699afa29e728b6fd87f7f388326223e02
Reviewed-on: https://gerrit.instructure.com/14560
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
fixes#11054
test plan:
1. login as a teacher
2. go to a course and click Files in
the left hand nav
3. click Add Folder
4. verify that the name text box does not overflow out
of the right hand frame
Change-Id: I07e9f87a101091f74a8e23a1d38de9667554f801
Reviewed-on: https://gerrit.instructure.com/14400
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
test plan:
1. login as a teacher
2. go to a course
3. click on files on the left nav
4. click 'Add Folder'
5. try to give it a name over 255 characters
6. text stops at 255 characters, press enter to add
the folder
7. folder is saved with no DB error
Change-Id: I1da8595350b3d0c6f23e3052e514bcb55446f141
Reviewed-on: https://gerrit.instructure.com/13982
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
fixes#10036
This commit removes the ability to sort files and folders by
dragging and replaces it with a default of alphabetizing every
item.
Test plan:
*Folder
1. Go the to files page http://localhost:3000/dashboard/files
2. Create a folder named "d_folder" then add a folder named "a_folder"
3. Ensure "a_folder" is before "d_folder"
*Files
1. Go the to files page http://localhost:3000/dashboard/files
2. Upload a file named "d_file.txt" then add a file named
"a_file.txt" (must have characters in the file"
3. Ensure "a_file.txt" is before "d_file.txt"
Change-Id: I3776ff996e338f8aa6fc3858b59e1460b8b1cdf0
Reviewed-on: https://gerrit.instructure.com/13554
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Adds support for optionally viewing documents with Crocodoc.
closes#9865
Test plan:
* configure the crocodoc plugin
* add an assignment that allows file uploads
* make a submission for that assignment with a pdf or doc or ppt
- on the 'submission details' page, opening a preview of the
assignment should display it in crocodoc
- speedgrader should display the submission in crocodoc too
* make a submission with odt or rtf
- the submission should be displayed with scribd or google docs
* if you disable the crocodoc plugin, submissions could continue being
previewed in google docs or scribd
Change-Id: I7dd2547f8e2d907c98ebe894a7f1ee9d58f1e030
Reviewed-on: https://gerrit.instructure.com/13668
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
this commit marks up the file list as a tree and makes it
keyboard navigable. it also adds labels to each of the file
sections to make them easier to understand.
test plan:
* using a screen reader, navigate to the files page and
attempt to click a file in the tree navigation;
* verify that it opens in the preview pane as expected;
* do the same with a folder and verify that it displays as
expected.
Change-Id: Icc9ad33973882f35d6aca0219a2b77e0358d3cb3
Reviewed-on: https://gerrit.instructure.com/13638
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
aka: no more .dialog('close').dialog({}).dialog('open')
(does not actually change any behavior visible to end user)
test plan:
as far as manual testing goes, try to go to a bunch of pages that have dialogs
and open and close them.
For engineers, if you can think of other places where we might try to set options
on a UI widget before we initialize one (like sortables or something), check that too.
Change-Id: I7415c00d8c15b562ac12eeef83fa041aff1dfb35
Reviewed-on: https://gerrit.instructure.com/12810
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
test plan:
1. Go to a course files page
2. Upload an html file
3. click edit content
4. note the tinymce editor
5. toggle back and forth between views
6. save changes
7. make sure it changed
Change-Id: I4950b87728c728008ee548bc41d09513b80caed6
Reviewed-on: https://gerrit.instructure.com/12557
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
when you require ['jquery'] you are now getting the
version of jquery that has our patches applied to it
you should not need to think about the patching as
you write code.
this also applies to jqueryui/dialog, that will return
the patched version of it.
test plan:
make sure javascript still works on our site ;)
Change-Id: I237fa8da5f93167140c4d42b80eb3ef17d95c1e6
Reviewed-on: https://gerrit.instructure.com/9878
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
change hard height of 500px for swf files to a 600px min height
and change height to 80% of the container to allow larger browser
windows to display larger swf files.
all of this is to hopefully avoid or delay having to determine the
height and width of swf files on upload (because we'd have to read
the swf into memory and store it somewhere and it's nasty).
Change-Id: I6686dd7291e659599e8a84720e1c2717ab60afab
Reviewed-on: https://gerrit.instructure.com/9152
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
also fix/enable zip file uploads in group and user contexts -- they were
partially enabled, but broken. This required generalizing
UnzipAttachment to work for any context, not just courses, though that
was mostly just a matter of renaming things.
The zip file uploads in accounts are still not enabled, as the accounts
file section is not implemented yet, though it's referenced in the
routes file.
fixes#5913fixes#5728fixes#5463fixes#5012
test plan:
* upload a zip file to a course, to a group, and to a user's files. in
each case, try uploading the zip both through the button in the file
browser, and by dragging a zip file into the file browser (in a
capable web browser)
Change-Id: I6c648ef677d2bd61ae41a2b8fe0f89be43d63375
Reviewed-on: https://gerrit.instructure.com/7402
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
"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>
if we're redirecting to safe files and it's not for download, it's for
inline and we need to include that in the redirect url. also, be
explicit about wanting to download when clicking a link labeled
"Download".
fixes#5433
test-plan:
- have s3 storage enabled and a safe files domain
- upload an image as a file submission
- view the submission in speedgrader; image should be displayed
inline rather than being downloaded
- upload an image on the files tab
- click the download link; should download the image rather than
being shown in browser
- preview the uploaded image from the files tab; it should display
inline
- upload a flash file on the files tab
- preview the uploaded image from the files tab; it should display
inline (independent check necessary because flash is touchy about
content-disposition headers)
- click the download link; should download the file rather than
being shown in browser
Change-Id: Ibd48eb4629aa26052d3d1bce90444146033b9eeb
Reviewed-on: https://gerrit.instructure.com/8275
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Added a step to the flash upload process in the Files section to do a
preflight check to see if there are any duplicate filenames. If there are, the
user gets the option to either rename the new files, or overwrite the existing
ones. (Overwrite means deleting them - we already have code that will redirect
to new files with the same name as deleted files if they're linked directly by
id.)
Change-Id: I926631aadcebec3cae1607f818044f7cd4b74cea
Reviewed-on: https://gerrit.instructure.com/5091
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
added checks to extractor for some common typos/oversights (and more line numbers)
Change-Id: I7a2b080cf2a26cb6711539220fe2486a1a4f04b5
Reviewed-on: https://gerrit.instructure.com/4581
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>