OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/app/assets/stylesheets/content/_in_place_editing.lsg

220 lines
8.2 KiB

# In place editing
## In place editing: Title
```
<div class="toolbar-container -editable">
<div class="toolbar">
Boards module (#7008) * Hack spike to show D&D use case [ci skip] * Add ordered work packages * Save order on existing work packages * Boards WIP * CDK drag * Add dragula handler [ci skip] * Add filter to return all manual sorted work packages * Print icon on hover * Boards routing and list components * Better loading indicator on list with streaming result [ci skip] * Add new board and list buttons [ci skip] * Post new query [ci skip] * Added creation of new board lists with persisted queries [ci skip] * Render placeholder row in empty queries [ci skip] * Push boards on grid * Use base class in scope [ci skip] * Extend api for options * Hack spike to show D&D use case [ci skip] * Add ordered work packages * Save order on existing work packages * Boards WIP * CDK drag * Add dragula handler [ci skip] * Add filter to return all manual sorted work packages * Print icon on hover * Boards routing and list components * Better loading indicator on list with streaming result [ci skip] * Add new board and list buttons [ci skip] * Post new query [ci skip] * Added creation of new board lists with persisted queries [ci skip] * Render placeholder row in empty queries [ci skip] * Save queries in grids [ci skip] * Renaming queries [ci skip] * Add existing work packages to board [ci skip] * Introduce card view component for work packages * Extend grids to allow project scope for boards (#7025) Extends the grid backend to also be able to handle boards. In particular, it adds the ability of boards to be attached to projects and changes the page property of grids to a scope property that better describes that more than one board can belong to the same scope (e.g. /projects/:project_id/boards). For a fully featured board, though, widgets need to be able to store options, so that they can store queries. Those widgets might also need to have custom processing and validation. That part has not been implemented. * introduce project association for boards * have dedicated grid registration classes * update and create form for board grids * extract defaults into grid registration [ci skip] * Add drag and drop to card view [ci skip] * Add options to grid * Fix option migration name * Renaming boards [ci skip] * Frontend deletion of boards * Avoid map on NodeList which doesnt exist [ci skip] * Add inline create to boards [ci skip] * Smaller create button [ci skip] * Add navigation for boards * Make inner grid same height * Replace index page with table * Workaround for widget registration [ci skip] * Fixed height for cards and tables [ci skip] * Implement escape as cancel d&d action [ci skip] * Fix and extend grid specs for name and options * Extend board specs for required name * Fix migration for MySQL references https://stackoverflow.com/a/45825566/420614 * Make board list extend from widget Since we cannot configure widgets yet, it's not yet possible to use a board-list widget anywhere. * Fix specs * Fix escape listener removal [ci skip] * Fix renamed to_path in relation spec [ci skip] * Allow deletion of grids for boards * Avoid reloading resource multiple times with replays * Frontend synchronization on deletion [ci skip] * Delete through table * Use work packages board path * Use work packages board path * Fix augmented columns breaking re-rendering * Fix duplicated permission with forums * Strengthen tab switch in specs * Add hidden flag for project-context queries Allows the API to create a hidden query that will not be rendered to the user even if it is within a project context. * private queries * Add hidden flag for project-context queries Allows the API to create a hidden query that will not be rendered to the user even if it is within a project context. * Move boards below work packages * Add Board configuration modal * Fix reloading with onPush * Saving / Switching of display mode [ci skip] * Extract wp-query-selectable-title into common component * Fix renaming of board-list * Fix auto-hide notifications in boards * Add permissions to seeders * Reorder lists in board * Linting * Remove default gravatar from settings * Show assignees avatar in the card view of WPs * Fix specs * Add missing method * Fix timeline icon * Use URL as input to be able to show avatars for groups, too * Fix test * Add further specs * Use correct data attribute to avoid unnecessary data base calls * Add further specs * Deletion of board lists * Pass permission via gon to decide whether we can create boards * Fix rename spec * Cherry-pick of 7873d59 and 30abc7f
6 years ago
<editable-toolbar-title class="title-container">
<div class="editable-toolbar-title--container">
<input class="wp-query--selectable-title -border-on-hover-only toolbar--editable-toolbar ellipsis"
placeholder="Page title"
aria-label="Page title"
type="text"
name="foobar" />
</div>
Boards module (#7008) * Hack spike to show D&D use case [ci skip] * Add ordered work packages * Save order on existing work packages * Boards WIP * CDK drag * Add dragula handler [ci skip] * Add filter to return all manual sorted work packages * Print icon on hover * Boards routing and list components * Better loading indicator on list with streaming result [ci skip] * Add new board and list buttons [ci skip] * Post new query [ci skip] * Added creation of new board lists with persisted queries [ci skip] * Render placeholder row in empty queries [ci skip] * Push boards on grid * Use base class in scope [ci skip] * Extend api for options * Hack spike to show D&D use case [ci skip] * Add ordered work packages * Save order on existing work packages * Boards WIP * CDK drag * Add dragula handler [ci skip] * Add filter to return all manual sorted work packages * Print icon on hover * Boards routing and list components * Better loading indicator on list with streaming result [ci skip] * Add new board and list buttons [ci skip] * Post new query [ci skip] * Added creation of new board lists with persisted queries [ci skip] * Render placeholder row in empty queries [ci skip] * Save queries in grids [ci skip] * Renaming queries [ci skip] * Add existing work packages to board [ci skip] * Introduce card view component for work packages * Extend grids to allow project scope for boards (#7025) Extends the grid backend to also be able to handle boards. In particular, it adds the ability of boards to be attached to projects and changes the page property of grids to a scope property that better describes that more than one board can belong to the same scope (e.g. /projects/:project_id/boards). For a fully featured board, though, widgets need to be able to store options, so that they can store queries. Those widgets might also need to have custom processing and validation. That part has not been implemented. * introduce project association for boards * have dedicated grid registration classes * update and create form for board grids * extract defaults into grid registration [ci skip] * Add drag and drop to card view [ci skip] * Add options to grid * Fix option migration name * Renaming boards [ci skip] * Frontend deletion of boards * Avoid map on NodeList which doesnt exist [ci skip] * Add inline create to boards [ci skip] * Smaller create button [ci skip] * Add navigation for boards * Make inner grid same height * Replace index page with table * Workaround for widget registration [ci skip] * Fixed height for cards and tables [ci skip] * Implement escape as cancel d&d action [ci skip] * Fix and extend grid specs for name and options * Extend board specs for required name * Fix migration for MySQL references https://stackoverflow.com/a/45825566/420614 * Make board list extend from widget Since we cannot configure widgets yet, it's not yet possible to use a board-list widget anywhere. * Fix specs * Fix escape listener removal [ci skip] * Fix renamed to_path in relation spec [ci skip] * Allow deletion of grids for boards * Avoid reloading resource multiple times with replays * Frontend synchronization on deletion [ci skip] * Delete through table * Use work packages board path * Use work packages board path * Fix augmented columns breaking re-rendering * Fix duplicated permission with forums * Strengthen tab switch in specs * Add hidden flag for project-context queries Allows the API to create a hidden query that will not be rendered to the user even if it is within a project context. * private queries * Add hidden flag for project-context queries Allows the API to create a hidden query that will not be rendered to the user even if it is within a project context. * Move boards below work packages * Add Board configuration modal * Fix reloading with onPush * Saving / Switching of display mode [ci skip] * Extract wp-query-selectable-title into common component * Fix renaming of board-list * Fix auto-hide notifications in boards * Add permissions to seeders * Reorder lists in board * Linting * Remove default gravatar from settings * Show assignees avatar in the card view of WPs * Fix specs * Add missing method * Fix timeline icon * Use URL as input to be able to show avatars for groups, too * Fix test * Add further specs * Use correct data attribute to avoid unnecessary data base calls * Add further specs * Deletion of board lists * Pass permission via gon to decide whether we can create boards * Fix rename spec * Cherry-pick of 7873d59 and 30abc7f
6 years ago
</editable-toolbar-title>
</div>
</div>
```
## In place editing: Attributes
```
<div class="attributes-group">
<div class="attributes-group--header">
<div class="attributes-group--header-container">
<h3 class="attributes-group--header-text">
Details
</h3>
</div>
</div>
<div class="attributes-key-value">
<div class="attributes-key-value--key">
Custom Field
</div>
<div class="attributes-key-value--value-container">
<wp-edit-field class="wp-edit-field--text">
<div class="wp-edit-field--container -small">
<span title="Editable text field" class="wp-table--cell-span inplace-edit -editable">
Editable text field
</span>
</div>
</wp-edit-field>
</div>
</div>
</div>
```
## In place editing: Single line of text
### Read mode
```
<div class="work-package--details--long-field work-packages--activity--add-comment">
<div class="inplace-edit--read">
<accessible-by-keyboard class="inplace-editing--trigger-container">
<a href="" class="inplace-editing--trigger-link">
<span class="inplace-editing--container wp-edit-field--display-field">
<span class="inplace-edit--read-value -default">
<span>Comment and type @ to notify other people</span>
</span>
<span class="inplace-edit--icon-wrapper">
<op-icon class="op-icon--wrapper">
<i aria-hidden="true" class="icon-edit" title="Comment and type @ to notify other people"></i>
</op-icon>
</span>
</span>
</a>
</accessible-by-keyboard>
</div>
</div>
```
## In place editing: Multiple lines of text
### Read mode
```
<div class="attributes-group">
<div class="attributes-group--header">
<div class="attributes-group--header-container">
<div class="attributes-group--header-container">
<h3 class="attributes-group--header-text">Description</h3>
</div>
</div>
</div>
<wp-edit-field>
<div class="wp-edit-field--container description -no-label">
<div>
<span class="wp-table--cell-span inplace-edit -editable">
<div class="read-value--html wiki highlight -multiline">
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor.
Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim
</p>
</div>
</span>
</div>
</div>
</wp-edit-field>
</div>
```
### Edit mode
```
<div class="attributes-group ">
<div class="attributes-group--header">
<div class="attributes-group--header-container">
<h3 class="attributes-group--header-text ">
Description
</h3>
</div>
</div>
<div class="single-attribute wiki">
<span inplace-editor="" placeholder="Click to enter description..." autocomplete-path="/work_packages/auto_complete.json?project_id=undefined" >
<div class="inplace-edit type-wiki_textarea attribute-description textarea-wrapper" aria-busy="false" >
<div class="inplace-edit--write " >
<form class="inplace-edit--form " name="editForm" novalidate="">
<div class="inplace-edit--write-value">
<div class="jstElements">
<button type="button" class="jstb_strong" title="Strong">
<span>Strong</span>
</button>
<button type="button" class="jstb_em" title="Italic">
<span>Italic</span>
</button>
<button type="button" class="jstb_ins" title="Underline">
<span>Underline</span>
</button>
<button type="button" class="jstb_del" title="Deleted">
<span>Deleted</span></button><button type="button" class="jstb_code" title="Inline Code">
<span>Inline Code</span></button><span id="space1" class="jstSpacer">&nbsp;</span>
<button type="button" class="jstb_h1" title="Heading 1">
<span>Heading 1</span>
</button>
<button type="button" class="jstb_h2" title="Heading 2">
<span>Heading 2</span>
</button>
<button type="button" class="jstb_h3" title="Heading 3">
<span>Heading 3</span>
</button>
<span id="space2" class="jstSpacer">&nbsp;</span>
<button type="button" class="jstb_ul" title="Unordered List">
<span>Unordered List</span>
</button>
<button type="button" class="jstb_ol" title="Ordered List">
<span>Ordered List</span>
</button>
<span id="space3" class="jstSpacer">&nbsp;</span>
<button type="button" class="jstb_bq" title="Quote">
<span>Quote</span></button>
<button type="button" class="jstb_unbq" title="Unquote">
<span>Unquote</span>
</button>
<button type="button" class="jstb_pre" title="Preformatted Text">
<span>Preformatted Text</span></button><span id="space4" class="jstSpacer">&nbsp;</span>
<button type="button" class="jstb_link" title="Link to a Wiki page">
<span>Link to a Wiki page</span>
</button>
<button type="button" class="jstb_img" title="Image">
<span>Image</span>
</button>
<div class="jstb_help">
<a href="/help/wiki_syntax" title="Text formatting" class="icon icon-help1">
<span class="hidden-for-sighted">
Text formatting
</span>
</a>
</div>
<button class="jstb_preview icon-preview" type="button" title="Preview">
</button>
</div>
<div class="jstEditor">
<textarea wiki-toolbar="" class="focus-input inplace-edit--textarea " name="value" title="Description: Edit" aria-multiline="true" tabindex="0" aria-hidden="false" aria-disabled="false" aria-invalid="false" rows="5">
</textarea>
</div>
<div class="jstHandle"></div>
</div>
<div class="inplace-edit--dashboard">
<div class="inplace-edit--controls">
<accessible-by-keyboard class="inplace-edit--control inplace-edit--control--save">
<a href="" role="link" title="Description: Save">
<span>
<op-icon class="op-icon--wrapper">
<i class="icon-checkmark" title="Description: Save"></i>
<span class="hidden-for-sighted">Description: Save</span>
</op-icon>
</span>
</a>
</accessible-by-keyboard>
<accessible-by-keyboard class="inplace-edit--control inplace-edit--control--cancel">
<a href="" role="link" title="Description: Cancel">
<span>
<op-icon class="op-icon--wrapper">
<i class="icon-close" title="Description: Cancel"></i>
<span class="hidden-for-sighted">Description: Cancel</span>
</op-icon>
</span>
</a>
</accessible-by-keyboard>
</div>
</div>
</form>
</div>
</div>
</span>
</div>
</div>
```