Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a202449b

Von Moritz Bunkus vor mehr als 10 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
50 50
/* Sections & function blocks */
51 51
/* ------------------------------------------------------------ */
52 52

  
53
.function-block {
54
  border-bottom: 1px solid #bbb;
53
.section {
54
  border-left: 0;
55
  margin-left: 0;
55 56
}
56 57

  
57 58
.section-description-heading {
......
65 66
  margin-bottom: 15px;
66 67
}
67 68

  
68
.sub-function-block {
69
  border-bottom: 1px solid #ccc;
70
  background-color: #fff;
71
}
72

  
73
.sub-function-block-container {
74
  margin: 10px 0px 10px 20px;
75
  border: 1px solid #ccc;
76
}
77

  
78
.sub-function-block-header {
79
  padding: 5px;
80
  font-weight: bold;
81
  color: #fff;
82
  background: #ccc;
69
.function-block {
70
  border-bottom: 1px solid #bbb;
71
  border-left: 0;
72
  margin-left: 0;
83 73
}
84 74

  
85 75
.function-block-form {
......
95 85
  padding: 5px;
96 86
}
97 87

  
98
/* Flagged sections, function blocks, text blocks */
88
.sub-function-block {
89
  background-color: #fff;
90
  border-bottom: 1px solid #ccc;
91
  border-left: 0;
92
  margin-left: 0;
93
}
99 94

  
100
.section.flagged .section-description {
101
  background-color: #feece3;
102
  border: 1px solid #fe5f14;
95
.sub-function-block-container {
96
  margin: 10px 0px 10px 20px;
97
  border: 1px solid #ccc;
103 98
}
104 99

  
105
.section.flagged .section-description > .section-description-heading {
106
  background-color: #fe5f14;
100
.sub-function-block-header {
101
  padding: 5px;
102
  font-weight: bold;
107 103
  color: #fff;
104
  background: #ccc;
108 105
}
109 106

  
107
/* Flagged sections, function blocks, text blocks */
110 108

  
111
.function-block.flagged {
109
.section.flagged .section-description,
110
.function-block.flagged,
111
.sub-function-block.flagged {
112 112
  background-color: #feece3;
113
  border: 1px solid #fe5f14;
114 113
}
115 114

  
116
.function-block.flagged > .function-block-content > div > .function-block-number {
115
.section.flagged .section-description > .section-description-heading,
116
.function-block.flagged > .function-block-content > div > .function-block-number,
117
.sub-function-block.flagged > .sub-function-block-content > div > .function-block-number {
117 118
  background-color: #fe5f14;
118 119
  color: #fff;
119 120
}
120 121

  
121
.sub-function-block.flagged {
122
  background-color: #feece3;
123
  border: 1px solid #fe5f14;
124
}
122
/* Selected sections, function blocks, text blocks */
125 123

  
126
.sub-function-block.flagged > .sub-function-block-content > div > .function-block-number {
127
  background-color: #fe5f14;
128
  color: #fff;
124
.section.selected, .function-block.selected, .sub-function-block.selected {
125
  margin-left: -3px;
126
  border-left: 3px solid #cbb120;
129 127
}
130 128

  
131 129
/* ------------------------------------------------------------ */
......
133 131
/* ------------------------------------------------------------ */
134 132

  
135 133
.requirement-spec-text-block {
134
  border-left: 0;
135
  margin-left: 3px;
136 136
  margin-top: 10px;
137 137
}
138 138

  
......
142 142

  
143 143
.requirement-spec-text-block.flagged {
144 144
  background-color: #feece3;
145
  border: 1px solid #fe5f14;
145
  /* border: 1px solid #fe5f14; */
146 146
}
147 147

  
148 148
.requirement-spec-text-block.flagged > h2 {
149 149
  background-color: #fe5f14;
150 150
  color: #fff;
151 151
}
152

  
153
.requirement-spec-text-block.selected {
154
  border-left: 3px solid #cbb120;
155
  margin-left: 0;
156
}
js/requirement_spec.js
237 237
  return true;
238 238
}
239 239

  
240
function handle_text_block_popup_menu_markings(opt, add) {
241
  var id = find_text_block_id(opt.$trigger);
242
  if (id)
243
    $('#text-block-' + id).toggleClass('selected', add);
244
  return true;
245
}
246

  
247
function requirement_spec_text_block_popup_menu_shown(opt) {
248
  return handle_text_block_popup_menu_markings(opt, true);
249
}
250

  
251
function requirement_spec_text_block_popup_menu_hidden(opt) {
252
  return handle_text_block_popup_menu_markings(opt, false);
253
}
254

  
255

  
256
function handle_item_popup_menu_markings(opt, add) {
257
  var id = find_item_id(opt.$trigger);
258
  if (id)
259
    $('#section-' + id + ',#function-block-' + id + ',#sub-function-block-' + id).toggleClass('selected', add);
260
  return true;
261
}
262

  
263
function requirement_spec_item_popup_menu_shown(opt) {
264
  return handle_item_popup_menu_markings(opt, true);
265
}
266

  
267
function requirement_spec_item_popup_menu_hidden(opt) {
268
  return handle_item_popup_menu_markings(opt, false);
269
}
270

  
240 271
function create_requirement_spec_context_menus() {
272
  var events = {
273
    show: requirement_spec_text_block_popup_menu_shown,
274
    hide: requirement_spec_text_block_popup_menu_hidden
275
  };
276

  
241 277
  $.contextMenu({
242 278
    selector: '.text-block-context-menu',
243
    items: {
279
    events:   {
280
        show: requirement_spec_text_block_popup_menu_shown
281
      , hide: requirement_spec_text_block_popup_menu_hidden
282
    },
283
    items:    {
244 284
        add:    { name: kivi.t8('Add text block'),    icon: "add",    callback: standard_text_block_ajax_call }
245 285
      , edit:   { name: kivi.t8('Edit text block'),   icon: "edit",   callback: standard_text_block_ajax_call, disabled: disable_edit_text_block_commands }
246 286
      , delete: { name: kivi.t8('Delete text block'), icon: "delete", callback: ask_delete_text_block,         disabled: disable_edit_text_block_commands }
......
254 294
    }
255 295
  });
256 296

  
297
  var events = {
298
    show: requirement_spec_item_popup_menu_shown,
299
    hide: requirement_spec_item_popup_menu_hidden
300
  };
301

  
257 302
  $.contextMenu({
258 303
    selector: '.section-context-menu',
259
    items: {
304
    events:   events,
305
    items:    {
260 306
        add_section:        { name: kivi.t8('Add section'),        icon: "add",    callback: standard_item_ajax_call }
261 307
      , add_function_block: { name: kivi.t8('Add function block'), icon: "add",    callback: standard_item_ajax_call, disabled: disable_add_function_block_command }
262 308
      , sep1:               "---------"
......
274 320

  
275 321
  $.contextMenu({
276 322
    selector: '.function-block-context-menu,.sub-function-block-context-menu',
277
    items: {
323
    events:   events,
324
    items:    {
278 325
        add_function_block:     { name: kivi.t8('Add function block'),     icon: "add",    callback: standard_item_ajax_call }
279 326
      , add_sub_function_block: { name: kivi.t8('Add sub function block'), icon: "add",    callback: standard_item_ajax_call }
280 327
      , sep1:                   "---------"

Auch abrufbar als: Unified diff