[Inline Edit / Create] Changes and bug fixes (#4336)

* Open work package on single click when already in split view

* Replace (new) with empty string for new IDs

* Replace trash icon with cancel icon
pull/4355/head
Oliver Günther 9 years ago
parent d9be51c30f
commit 6e61150c1b
  1. 3
      app/assets/stylesheets/content/_work_packages_table.sass
  2. 1
      config/locales/js-en.yml
  3. 2
      frontend/app/components/wp-table/wp-table.directive.html
  4. 11
      frontend/app/components/wp-table/wp-table.directive.js
  5. 2
      frontend/app/components/wp-table/wp-td/wp-td.directive.js

@ -46,9 +46,10 @@
.icon
position: relative
left: 0.25rem
font-size: 12px
&:before
color: $body-font-color
padding: 0 0 0 0.1rem
padding: 0 0 0 0.2rem
&:hover
text-decoration: none

@ -414,7 +414,6 @@ en:
version: "Version"
placeholders:
default: "-"
new_label: '(new)'
description: "Click to enter description..."
query:
column_names: "Columns"

@ -123,7 +123,7 @@
<span>
<a class="wp-table--cancel-create-link"
ng-click="cancelInlineWorkPackage($index, row)">
<i class="icon icon-delete"></i>
<i class="icon icon-cancel"></i>
<span ng-bind="I18n.t('js.button_cancel')"/>
</a>
</span>

@ -151,6 +151,15 @@ function wpTable(WorkPackagesTableService, $window, PathHelper, apiWorkPackages,
WorkPackagesTableService.setRowSelection(row, selected);
}
function openWhenInSplitView(workPackage) {
if ($state.includes('work-packages.list.details')) {
$state.transitionTo(
'work-packages.list.details.overview',
{ workPackageId: workPackage.id }
);
}
}
function mulipleRowsChecked(){
var counter = 0;
for (var i = 0, l = scope.rows.length; i<l; i++) {
@ -185,6 +194,8 @@ function wpTable(WorkPackagesTableService, $window, PathHelper, apiWorkPackages,
} else {
setRowSelectionState(row, multipleChecked ? true : !currentRowCheckState);
}
openWhenInSplitView(row.object);
}
};

@ -70,7 +70,7 @@ function WorkPackageTdController($scope, I18n, PathHelper, WorkPackagesHelper) {
vm.schema.$load().then(function() {
if (vm.object.isNew && vm.attribute === 'id') {
vm.displayText = 'text';
vm.displayText = I18n.t('js.work_packages.placeholders.new_label');
vm.displayText = '';
return;
}

Loading…
Cancel
Save