1. 04 Oct, 2019 34 commits
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: Blocks display fixes · ccc2446d
      Cecilia Vela Gurovic authored
      - assessment block: tinymce and the asseesment js
      need to be initialized after the block is loaded
      - signoff block: sing-off modal is showing now
      - embedded media init functions need to be loaded after
      the blocks are added to the grid
      - wall post block initializes the tinyMCE after it's loaded
      and refreshes the content of the block after a new post is made
      - comment block: update block size when adding a comment
      - scrolling to the block when a new one is added
      - modified the text for button to add a new block to the page
        'Drag to add a new block' for normal mode
        'Click to add a new block' for accessibility mode
      - add a block to the bottom of the page by default so it won't
      break the layout
      - add SE annotation to the bottom of the page
      - added 'Add block' button event handlers after trnaslating a view
      - annotation feedback loads the tinyMCE
      
      behatnotneeded
      
      Change-Id: I7642cacde729a2a85b497e077452de792ec72eb7
      ccc2446d
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: Accessibility settings and layout · 25082988
      Cecilia Vela Gurovic authored
      - Added an option to set the profile to accessible.
      This can be set in account preferences and
      enables one extra field in the settings
      of a view, in the basic settings section, to make
      the layout accessible.
      
      - by default, if the user account is accessible then
      the pages will be crated as accessible.
      To have a non accessible page, the option un view settings
      needs to be set as 'No'
      
      - Accessible layout only allows to add blocks with width=12
      that is the same with of the grid.
      This makes the blocks show as a sequence one on top of the other
      like a list. The user can only reorder the position
      they have in the list.
      
      - When a page is accessible, the adding a block
      by drag & drop is disabled
      
      - Reordering of blocks is accessible by keyborad
      
      - The 'add block' button is reachable by keyboard
      
      - add an intro to the page for the screen reader
      to explain how the page works
      
      - add identification to each block for screen reader,
      blocktype and title (if it’s set)
      
      TODO
      * When adding a block to the bottom or the top of the page,
      the page should be scrolled to that block
      
      * Floating menu: should have a way to be recognized as a menu
      by the screen reader. Check the access keys for the menu.
      
      behatnotneeded
      
      Change-Id: I08417f0f11d747a67900c88c2f675ef5f85b7499
      25082988
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: User should confirm before the view is translated · 69916a3d
      Cecilia Vela Gurovic authored
      there is an account preference we can set for showing
      a warning message before translating the layout of an old view.
      
      By default it's true. It can be set to false in the account preferences
      or by selecting the option when the message is displayed.
      if this preference is set to
      true: if we want to edit a view with old layout,
      a message will be displayed to confirm we want to translate the layout.
      false: The view gets translated on edit without asking the user.
      
      The message has the options to accept, cancel  or don't ask again.
      
      cancel: redirects to the displayed view
      don't ask again: sets account preference to false but can be reverted
      in account preferences.
      accept: will redirect to the view edit page with a parameter
      saying the user accepted the translation
      
      behatnotneeded
      
      Change-Id: I84e1a86d3bb494a1955da9cbfbde996b555bb132
      69916a3d
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: Creating a view via tags with gridstack · 1a1d2a69
      Cecilia Vela Gurovic authored
      when creating blocks via tags
      - the position of the copied blocks in the new view
      will be one on top of the other
      - if the block comes from a view with grid layout,
      it will take the width & height from its dimensions
      - if the block comes from an old layout view,
      it will be created with default dimensions
      width = 4
      height = 3
      
      behatnotneeded
      
      Change-Id: I465e09fa4af6742913302c7ef278708c3cb627bc
      1a1d2a69
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: Importing views with grid layout · af08a138
      Cecilia Vela Gurovic authored
      Importing views and collection with new grid layout
      
      - leap2A files containing views/collections with
      new grid layout are imported and created with the new layout
      
      - leap2A files containing collections/view with old layout
      will be created with a grid layout. This new layout is
      the translation of the old layout they had in the leap2A file.
      The heights of the blocks will be updated when the
      views are first displayed in the browser.
      
      behatnotneeded
      
      Change-Id: Ia43b7a5c11109023d3caa65ba16e3b6aebcdbe75
      af08a138
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: Exporting views with grid layout · b6cd876f
      Cecilia Vela Gurovic authored
      In exporting section:
      /export/index.php
      
      - Show preview of page both for old layout pages and
      new grid layout
      - Export views and collections with new grid layout
      in html
      - Export views and collections with new grid layout
      in leap2A
      - views with old layout are exported as before
      
      NOTE
      borrow some code from https://reviews.mahara.org/#/c/10157/
      as an early rebase (the patch is not on master yet)
      
      behatnotneeded
      
      Change-Id: I0c36c110c6b9ef7ae3edc4d0662a0dbab302684a
      b6cd876f
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: Make view versioning work with gridstack · 7b17b833
      Cecilia Vela Gurovic authored
      - Only allow to create a new version if the view
      is using new gridstack layout.
      
      In timeline version section:
      - For view versions that were created with old layout,
      show them as they are
      (we dont translate old view versions to new layout)
      - For view versions that are created with new grid layout,
      they are also displayed in the timeline view with the new grid
      layout
      
      behatnotneeded
      
      Change-Id: I1abdae9e5e547dcc9bce97cac127085786dcac8a
      7b17b833
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: Copying a page (in old or new layout) creates a page with new layout · f342e41b
      Cecilia Vela Gurovic authored
      - Copy a page when original view is using
      grid layout
      - Copy a page when original view is using
      old layout: Translates the original page layout
      without modifying it,
      and creates a new page with new grid layout
      The blocks in the new page will not have height
      assigned. The height of the blocks is updated
      on first load of the page in the browser.
      This can happen when editing the page or displaying it.
      - Copy a collection with old layout: creates the new collection
      with new grid layout pages. Each page needs to be loaded on the
      browser to update the block heights
      
      behatnotneeded
      
      Change-Id: I43b5f9050be192c057cb1803dcd69575c137a9cc
      f342e41b
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: Translate old views to new gridstack layout on edit · 32de0b18
      Cecilia Vela Gurovic authored
      Old layout pages will be displayed as they were
      with the old layout.
      
      New pages are created with the new grid layout.
      
      If we try to edit a page with an old layout,
      the page will be translated into the new grid layout.
      
      To translate from an old layout to a new grid layout,
      we respect the row, column and order of blocks inside each cell.
      
      All blocks in the same row in old layout will be together
      in the new layout, and the first block of each column
      of the same row are displayed at the same level to each other
      in the new layout.
      
      The blocks will respect the column order
      they had in the old layout.
      
      A column of the old layout can have many blocks. In the
      new grid layout they respect the same order they had.
      
      As we have 12 columns in the new grid layout,
      the blocks that where included in a 5 column row,
      will be displayed in smaller columns in the new layout.
      
      TODO:
      confirmation before trnaslating a page to the new grid layout
      
      behatnotneeded
      
      Change-Id: I46f5cdbacb026519631503437c10d33f1b2800e5
      32de0b18
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: Making magic block work with gridstack layout · 66c08ce0
      Cecilia Vela Gurovic authored
      In view edit mode, dragging the button '+' on the
      right top menu, will add a block in the page
      with dimensions height=3 and width=4
      
      behatnotneeded
      
      Change-Id: I5f4334886f6685bd047cb5bfbf0d59dd3880109a
      66c08ce0
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: Upgrade to translate site views to new layout · 15bca1e7
      Cecilia Vela Gurovic authored
      behatnotneeded
      
      Change-Id: Ia4f1fa57d317bc2ab81db4b4e41147e06ecc14f6
      15bca1e7
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: create a block- fixing the saving of a new block · 0772a240
      Cecilia Vela Gurovic authored
      behatnotneeded
      
      Change-Id: Ib20121937f6b7c64df65a620acbca93dd683d18f
      0772a240
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: block resizing to fit content · 565776fb
      Cecilia Vela Gurovic authored
      should not resize blocks in view mode
      
      in view mode, if the content of the block is static,
      then the block dimensions should not change but the
      content of the block should be made smaller
      
      expand the height of a block only if the content is dynamic,
      like the 'Journal' block
      
      behatnotneeded
      
      Change-Id: Ie8183736580e7e592b24e36f4a16618b96a5bf4e
      565776fb
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: remove layout button from navigation · f9295a81
      Cecilia Vela Gurovic authored
      + Also remove not used templates. They should have been deleted
      in commit 84119067
      that unifies layout and settings section
      
      behatnotneeded
      
      Change-Id: Icd90bd4980b9be566f7e20aee6271476edafe321
      f9295a81
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: Display Dashboard and profile page · 6aadcd02
      Cecilia Vela Gurovic authored
      + fix for loading block with ajax
      + also display group page with new layout
      
      behatnotneeded
      
      Change-Id: If93da8afb3069349e5c7612dc41df0faa3394e10
      6aadcd02
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: removing old layout from mahara install · b8afbd15
      Cecilia Vela Gurovic authored
      behatnotneeded
      
      Change-Id: If0e93ba7d1ff49fac57fc3d910c4586c9c23d877
      b8afbd15
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: Make the comment block work · a5fd2d09
      Cecilia Vela Gurovic authored
      added a js event 'blocksloaded' to signal the blocks were
      loaded in the grid and the are available in the DOM
      
      behatnotneeded
      
      Change-Id: I8f54eab5b5b71c712578d8af0f5684497d2f33bc
      a5fd2d09
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: Display a page in view mode · c0f57e7d
      Cecilia Vela Gurovic authored
      The blocks saved with the new layout
      are now displayed in page edit and view mode
      
      behatnotneeded
      
      Change-Id: Ic8c1011745593be552cc1a4377a7351cc9a04bb9
      c0f57e7d
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: allow to choose add block to bottom/top of the grid · 6cee4292
      Cecilia Vela Gurovic authored
      - Also removed code in the pop-up for adding a new block to a page:
      The js functions that update the select to choose the position
      of a new block inside a column were removed.
      
      behatnotneeded
      
      Change-Id: Ie20f7bbfc98c6b9f4a61f291fcaf23d368d077e0
      6cee4292
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: Creating a new page with gristack layout · 2c861ec1
      Cecilia Vela Gurovic authored
      add a new block, place it anywhere in the grid, edit configuration
      and delete it.
      
      It will save it in the db on table block_instance_dimension
      but not display it in view or edit mode yet
      
      Also included a small fix in xmldb postgres class generator
      to handle reserved words in getAlterFieldSQL function
      
      Failing tests:
      
      - most of them are failing when adding a new block to the page
      because they expect to have a modal to choose the position
      where to place block. That modal was removed for this patch but
      there will be a similar one in patch:
       https://reviews.mahara.org/#/c/9952
      and those tests will be fixed there
      
      - a few tests failed when they couldn't find text inside the
      blocks because they are not expanded to fit the content yet.
      This is added in patch:
       https://reviews.mahara.org/#/c/9986
      and they will be fixed there
      
      behatnotneeded
      
      Change-Id: If4521a6315f6e8cc5d88693f536946dace359288
      2c861ec1
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: removing helper functions to reorder cells in old layout · 2a9211b3
      Cecilia Vela Gurovic authored
      they won't be needed anymore
      
      also remove use of properties
      private $dirtyrows;
      private $dirtycolumns;
      
      Change-Id: I31e0c8296e72e9dd6b2381170864bdc52af766b7
      2a9211b3
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: Remove 'addcolumn' functionality when editing a view · 5f57b602
      Cecilia Vela Gurovic authored
      behatnotneeded
      
      Change-Id: I99b248e03ffe5b23e622c46ce14765bdf1e47195
      5f57b602
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: Remove edit layout section · d45aed8d
      Cecilia Vela Gurovic authored
      - also remove the layout pieform
      and the custom layout javascript code
      
      behatnotneeded
      
      Change-Id: I3e2e2b3f09106dd2a341a40d178feca693194e64
      d45aed8d
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: Creating tables for gridstack page blocks · ca51ed79
      Cecilia Vela Gurovic authored
      and remove 'unique constraint' on block_instance table on
      view,row,column and order columns
      
      behatnotneeded
      
      Change-Id: Icee562986422d82506f43748ec968abd9d1d7146
      ca51ed79
    • Cecilia Vela Gurovic's avatar
      Bug 1813987: Adding gristack library · 61acdaa6
      Cecilia Vela Gurovic authored
      Adding gridstack and lodash library
      
      behatnotneeded
      
      Change-Id: I4143d4dcde2f34bce019d6da900253c61ae6e7a5
      61acdaa6
    • Robert Lyon's avatar
      fixing - need to put back removed tasks · 308fae17
      Robert Lyon authored
      but now make them all in the future
      
      Change-Id: I79741ceee5f686cf11947f2a63a14d19c997075f
      Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
      308fae17
    • Robert Lyon's avatar
      Merge "Bug 1844470: Move "Display page" and "Return to pages and collections"... · 77ecb35f
      Robert Lyon authored
      Merge "Bug 1844470: Move "Display page" and "Return to pages and collections" to right-hand side on "Edit" screen"
      77ecb35f
    • Robert Lyon's avatar
    • Robert Lyon's avatar
    • Robert Lyon's avatar
    • Lisa Seeto's avatar
      Bug 1844470: Move "Display page" and "Return to pages and collections" · 466b4a8a
      Lisa Seeto authored
      to right-hand side on "Edit" screen
      
      - create new edit page action buttons for return to <location> button
      - delete references to the old display page link created in file editviewtabs.tpl
      - delete file editviewtabs.tpl
      - change the edit button in editviewpageactions.tpl into a display button
      - change behat tests to reflect the change from Edit to Display page
      - change the Behat instruction for And I display the page to target updated element
      - delete the old display button styling from the style guide
      - move url, title display logic into new func get_return_to_url_and_title in lib/view.php
      - adjust blocks.php, access.php, editlayout.php to assign url, title using new func
      
      behatnotneeded
      
      Change-Id: Iedf2882c42fa1d204e438a23842834fbb9a709f9
      Signed-off-by: default avatarLisa Seeto <lisaseeto@catalyst.net.nz>
      466b4a8a
    • Cecilia Vela Gurovic's avatar
      make property more specific to find link for download_files_block.feature · 49884ff1
      Cecilia Vela Gurovic authored
      behatnotneeded
      Change-Id: I939a84633eda48612e8b0e21342c7e6823144ba3
      49884ff1
    • Cecilia Vela Gurovic's avatar
      Container name changed in html for add_tags.feature · fbfbb80e
      Cecilia Vela Gurovic authored
      Change-Id: Ia9ec91a5a5c93ec4117337d111cdfb97ee8ff720
      fbfbb80e
    • Cecilia Vela Gurovic's avatar
      Button changed from 'No' to 'Cancel' in strict_privacy.feature · c79c0c5e
      Cecilia Vela Gurovic authored
      Change-Id: Ie7bfa072c6adcad8c95f529c64bd7d3572e923a0
      c79c0c5e
  2. 03 Oct, 2019 6 commits