Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a202449b

Von Moritz Bunkus vor fast 11 Jahren hinzugefügt

  • ID a202449b1b075b708ec4c68e0be1faf02ce2d031
  • Vorgänger e3f3d500
  • Nachfolger 48d73a85

Pflichtenheftitems & Textblöcke: Selektion bei Popupmenü durch Markierung links anzeigen

Unterschiede anzeigen:

css/requirement_spec.css
/* Sections & function blocks */
/* ------------------------------------------------------------ */
.function-block {
border-bottom: 1px solid #bbb;
.section {
border-left: 0;
margin-left: 0;
}
.section-description-heading {
......
margin-bottom: 15px;
}
.sub-function-block {
border-bottom: 1px solid #ccc;
background-color: #fff;
}
.sub-function-block-container {
margin: 10px 0px 10px 20px;
border: 1px solid #ccc;
}
.sub-function-block-header {
padding: 5px;
font-weight: bold;
color: #fff;
background: #ccc;
.function-block {
border-bottom: 1px solid #bbb;
border-left: 0;
margin-left: 0;
}
.function-block-form {
......
padding: 5px;
}
/* Flagged sections, function blocks, text blocks */
.sub-function-block {
background-color: #fff;
border-bottom: 1px solid #ccc;
border-left: 0;
margin-left: 0;
}
.section.flagged .section-description {
background-color: #feece3;
border: 1px solid #fe5f14;
.sub-function-block-container {
margin: 10px 0px 10px 20px;
border: 1px solid #ccc;
}
.section.flagged .section-description > .section-description-heading {
background-color: #fe5f14;
.sub-function-block-header {
padding: 5px;
font-weight: bold;
color: #fff;
background: #ccc;
}
/* Flagged sections, function blocks, text blocks */
.function-block.flagged {
.section.flagged .section-description,
.function-block.flagged,
.sub-function-block.flagged {
background-color: #feece3;
border: 1px solid #fe5f14;
}
.function-block.flagged > .function-block-content > div > .function-block-number {
.section.flagged .section-description > .section-description-heading,
.function-block.flagged > .function-block-content > div > .function-block-number,
.sub-function-block.flagged > .sub-function-block-content > div > .function-block-number {
background-color: #fe5f14;
color: #fff;
}
.sub-function-block.flagged {
background-color: #feece3;
border: 1px solid #fe5f14;
}
/* Selected sections, function blocks, text blocks */
.sub-function-block.flagged > .sub-function-block-content > div > .function-block-number {
background-color: #fe5f14;
color: #fff;
.section.selected, .function-block.selected, .sub-function-block.selected {
margin-left: -3px;
border-left: 3px solid #cbb120;
}
/* ------------------------------------------------------------ */
......
/* ------------------------------------------------------------ */
.requirement-spec-text-block {
border-left: 0;
margin-left: 3px;
margin-top: 10px;
}
......
.requirement-spec-text-block.flagged {
background-color: #feece3;
border: 1px solid #fe5f14;
/* border: 1px solid #fe5f14; */
}
.requirement-spec-text-block.flagged > h2 {
background-color: #fe5f14;
color: #fff;
}
.requirement-spec-text-block.selected {
border-left: 3px solid #cbb120;
margin-left: 0;
}
js/requirement_spec.js
return true;
}
function handle_text_block_popup_menu_markings(opt, add) {
var id = find_text_block_id(opt.$trigger);
if (id)
$('#text-block-' + id).toggleClass('selected', add);
return true;
}
function requirement_spec_text_block_popup_menu_shown(opt) {
return handle_text_block_popup_menu_markings(opt, true);
}
function requirement_spec_text_block_popup_menu_hidden(opt) {
return handle_text_block_popup_menu_markings(opt, false);
}
function handle_item_popup_menu_markings(opt, add) {
var id = find_item_id(opt.$trigger);
if (id)
$('#section-' + id + ',#function-block-' + id + ',#sub-function-block-' + id).toggleClass('selected', add);
return true;
}
function requirement_spec_item_popup_menu_shown(opt) {
return handle_item_popup_menu_markings(opt, true);
}
function requirement_spec_item_popup_menu_hidden(opt) {
return handle_item_popup_menu_markings(opt, false);
}
function create_requirement_spec_context_menus() {
var events = {
show: requirement_spec_text_block_popup_menu_shown,
hide: requirement_spec_text_block_popup_menu_hidden
};
$.contextMenu({
selector: '.text-block-context-menu',
items: {
events: {
show: requirement_spec_text_block_popup_menu_shown
, hide: requirement_spec_text_block_popup_menu_hidden
},
items: {
add: { name: kivi.t8('Add text block'), icon: "add", callback: standard_text_block_ajax_call }
, edit: { name: kivi.t8('Edit text block'), icon: "edit", callback: standard_text_block_ajax_call, disabled: disable_edit_text_block_commands }
, delete: { name: kivi.t8('Delete text block'), icon: "delete", callback: ask_delete_text_block, disabled: disable_edit_text_block_commands }
......
}
});
var events = {
show: requirement_spec_item_popup_menu_shown,
hide: requirement_spec_item_popup_menu_hidden
};
$.contextMenu({
selector: '.section-context-menu',
items: {
events: events,
items: {
add_section: { name: kivi.t8('Add section'), icon: "add", callback: standard_item_ajax_call }
, add_function_block: { name: kivi.t8('Add function block'), icon: "add", callback: standard_item_ajax_call, disabled: disable_add_function_block_command }
, sep1: "---------"
......
$.contextMenu({
selector: '.function-block-context-menu,.sub-function-block-context-menu',
items: {
events: events,
items: {
add_function_block: { name: kivi.t8('Add function block'), icon: "add", callback: standard_item_ajax_call }
, add_sub_function_block: { name: kivi.t8('Add sub function block'), icon: "add", callback: standard_item_ajax_call }
, sep1: "---------"

Auch abrufbar als: Unified diff