Commit Graph

10 Commits

Author SHA1 Message Date
Jon Willesen db9191c9dc new avatars upload image function
fixes CNVS-9759

test plan:
  * navigate to the user settings page, and click your
    avatar;
  * verify that you can click the "select a photo" view to
    pick an image, or that you can drag a photo directly
    onto it;
  * crop the picture using the crop tool and press the
    "select image" button;
  * verify that the button becomes disabled and that the
    dialog then closes and your new avatar is displayed.
  * refresh the page and make sure the new avatar sticks.

Change-Id: Ic33cc89e66ce3bf2bed834f2aac2f37029008ec1
Reviewed-on: https://gerrit.instructure.com/26890
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2014-03-07 18:52:28 +00:00
Aaron Shafovaloff fa189a98cd clean up JS tests and integrate karma
- js:generate_runner now generates common files to be used by different test runners
- js spec file order now shuffled to better expose dependencies
- fakeENV now returns two methods: setup and teardown
- stock tinymce 3 files are now wrapped for AMD

test plan:

- tinymce should work the same
- js:test rake task should run tests
- js:build task should work as normal (using new location of r.js)
- test results should successfully send to firework

Change-Id: Ic09647f55dae57130fa0fe3d6a9168d2b67b89a2
Reviewed-on: https://gerrit.instructure.com/29297
QA-Review: Shawn Meredith <shawn@instructure.com>
Tested-by: Shawn Meredith <shawn@instructure.com>
Tested-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
2014-02-07 19:40:37 +00:00
Shawn Meredith 31bae12475 js fixture issues
Change-Id: Ic91185b9e4a25ad704bf001722b580b67debbb9f
Reviewed-on: https://gerrit.instructure.com/21471
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
2013-06-17 20:00:50 +00:00
Jon Jensen 6627d128f2 conversations refactor part 2, ajax loading, fixes #7062
refactored conversations pane, implemented ajaxy scrollable list widget,
partially backbone.js'ed conversation items, re-did fragment hash fu, and
made filter/scope changes update the page via ajax.

from an end-user perspective, the noticeable changes are:
1. filters/scopes update the page via ajax
2. the conversations pane appears to load more quickly now (we set it to
   the full height from the outset, and things load in as you scroll)

test plan:
1. general regression test of conversations, specifically focusing on:
   1. actions that remove a conversation from the list, e.g.
      1. deleting it
      2. deleting all messages from it
      3. marking it as read when in the unread filter
      4. archiving/unarchiving (depending on the view)
   2. actions that update a conversation in the list, e.g.
      1. adding a message should update the preview and move it to the top
      2. deleting the most recent message should move it down in the list
      3. sending a new message to an existing conversation should update
         it (and possibly reposition it)
   3. actions that should add a conversation to the list
      1. starting a new conversation, provided that it should be visible
         under the current filter/scope
      2. if the conversation should not be visible (e.g. start a new
         conversation under the archived scope), simply display the
         "Message Sent" notification but don't show the conversation
2. test ajax loading of filters and scopes. confirm that back button works
3. test scrollable list component
   1. confirm the scrollable list is big enough for all items in the view
   2. confirm that items load as you scroll
   3. confirm that jumping to the very bottom loads those items in a
      timely manner (they should load before the skipped middle stuff
      does)

Change-Id: Icb1e09f34c653b55c62de0c82ac0cfc172827520
Reviewed-on: https://gerrit.instructure.com/9612
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-04-19 13:20:09 -06:00
Zach Pendleton a021c08b19 add option for completed courses on course import. fixes #2184
affects: /courses/:course_id/imports/copy

now provide an "include completed courses?" checkbox that allows
user to also list concluded courses that he/she has permissions
to.

load course dropdown via ajax call, and cache both results for the
select box and the course search autocomplete.

test plan:
  * create two courses;
  * create a user and enroll them as a teacher in both courses (user
    should not be an admin);
  * conclude one of the courses;
  * go to the course copy page of the unconcluded course;
  * verify that the concluded course is not in the dropdown and cannot
    be searched for;
  * check the 'include completed courses?' checkbox;
  * verify that the concluded course now appears in the dropdown and
    can be searched for.

  * create a course in a different term and set the same user as
    teacher;
  * set enrollment start dates for each term;
  * view the copy course page and verify that the terms are ordered
    by start date DESC.

  * create a course in a different account in a term that shares the
    same name as the term in the original account;
  * view the copy course page and verify that the account name is
    appended to the term name in the dropdown menu.

Change-Id: I0af2907e130ae1e0ce6048cac4743234fd0e1fd6
Reviewed-on: https://gerrit.instructure.com/8943
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-03-12 12:06:53 -06:00
Zach Pendleton bd02baee59 paginate enrollments on SectionController#show. fixes #6022
paginate enrollments by loading them through the api. load
new pages by clicking 'View More Enrollments' link.

affects: sections controller
test plan:
  * create course with large number of students (~ 500);
  * visit course section page (/courses/:course_id/sections/:id);
  * verify that page loads first 15 of both current and completed
    enrollments;
  * verify that if no enrollments exist in a category, a 'no enrollments
    found' message is displayed;
  * verify that clicking 'Load More Enrollments' loads another page
    of enrollments;
  * load a course with < 15 enrollments, verify that no 'View More
    Enrollments' link is displayed.

Change-Id: Ied7ccdd8e59a56bef44ffbb07292ecfc0cb97ec5
Reviewed-on: https://gerrit.instructure.com/8365
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-02-17 16:18:50 -07:00
Ryan Florence 718f9f34ea qunit + AMD javascript specs
new stuff
---------

- added curl.js AMD module loader
- converted existing js specs to use QUnit
- removed jasmine stuff
- added rake task to run js specs

dependencies!
-------------

you'll need to install http://www.phantomjs.org/
if you want to run the specs.

next step is to incorporate curl.js into our app
environment.


Change-Id: I0ba97bc9abe1494f87fdfc0eca51d987a759bc85
Reviewed-on: https://gerrit.instructure.com/6477
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-10-27 12:58:47 -06:00
Ryan Florence 8e3067e44b added favorite courses option to main menu
Features
--------

- The course menu shows the top 12 courses in
  alphabetical order

- Users with > 12 courses will get a button to
  edit the courses in their menu.  Any courses
  they add become favorites and will remain
  in the course menu, and visa versa for those
  they remove

- Users can reset the menu to the default 12

Noteworthy Ruby changes:
------------------------

- Added Favorites model
  Favorites are polymorphic so we can save other
  contexts as favorites in the future.

- Added FavoritesController

- Added User#menu_courses
  This opens up some room to remove lots of code
  that's used to build the main menu, but that
  isn't in this commit.  Gives a list of all the
  courses that show up in the user's menu.

- Added User#favorites

- Added User#favorite_courses

- Refactored Enrollment::readable_type to cache


Noteworthy JavaScript changes:
------------------------------

- Jasmine specs are totally working

- Added CustomList constructor

- Added courseList (CustomList instance)

- Added objectCollection
  Utility function that extends an array with
  methods useful for collections of objects.
  Used to manage the data state in CustomList

Fixes #4827

Change-Id: I59468e517ad07678741402bf9cf479cba1dfeaa1
Reviewed-on: https://gerrit.instructure.com/5982
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-10-24 15:50:34 -06:00
JT Olds 9d4a4944b6 allow sis imports to make things sticky or clear stickiness altogether
* adds ui

Change-Id: Id8f3639457879d23125c0fb04ef5038d91826f21
Reviewed-on: https://gerrit.instructure.com/6050
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-10-13 10:54:58 -06:00
Ryan Florence 0f9d86d0d8 Added JavaScript Specs and Client-side Templates
- New rake task `rake jst:compile` to precompile
  JavaScript templates into functions.

  Add handlebars templates to app/views/jst and
  they'll get compiled to public/javascripts/jst

- New rake task `rake jasmine` and `jasmine:ci` to
  run JavaScript specs.

  Add specs to spec/coffeescripts and they'll get
  compiled into spec/javascripts

- Added Guard gem `$ guard` that watches
  coffeescript and handlebars files and compiles
  them when changes are made.

- Created Handlebars Ruby class that precompiles
  the templates into JavaScript functions

- Added JS Template constructor to abstract
  our tempting API



Change-Id: Ie993d0fc50d49b161ed94dbc066c4475cefdc427
Reviewed-on: https://gerrit.instructure.com/5813
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-09-26 16:49:18 -06:00