Kontextmenü mit Pflichtenheftaktionen überall anzeigen
authorMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 18 Apr 2013 08:37:55 +0000 (10:37 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 1 Apr 2014 11:02:30 +0000 (13:02 +0200)
js/requirement_spec.js
templates/webpages/requirement_spec/_form.html

index 31807f0..b157008 100644 (file)
@@ -331,6 +331,11 @@ function create_requirement_spec_context_menus() {
     , delete_reqspec:  { name: kivi.t8('Delete requirement spec'), icon: "delete", callback: delete_reqspec }
   };
 
+  $.contextMenu({
+    selector: '#content',
+    items:    general_actions
+  });
+
   $.contextMenu({
     selector: '.text-block-context-menu',
     events:   {
@@ -349,7 +354,7 @@ function create_requirement_spec_context_menus() {
     }, general_actions)
   });
 
-  var events = {
+  events = {
     show: requirement_spec_item_popup_menu_shown,
     hide: requirement_spec_item_popup_menu_hidden
   };
index 3f4e0cf..e15d45d 100644 (file)
 [% IF submit_as == 'post' %]
   [% L.hidden_tag("action", "RequirementSpec/dispatch", id=id_prefix _ '_action') %]
   [% L.submit_tag("action_" _ (SELF.requirement_spec.id ? "update" : "create"), LxERP.t8('Save'), id=id_prefix _ '_action_update') %]
-  [%- IF SELF.requirement_spec.id %]
-   [% L.submit_tag("action_destroy", LxERP.t8('Delete'), confirm=LxERP.t8('Do you really want to delete this object?'), id=id_prefix _ '_action_destroy') %]
-  [%- END %]
   <a href="[% SELF.url_for(action="list") %]">[% LxERP.t8('Abort') %]</a>
 [% ELSE %]
   [% L.ajax_submit_tag("controller.pl?action=RequirementSpec/update",  "#" _ id_prefix, LxERP.t8("Save")) %]
-  [% L.ajax_submit_tag("controller.pl?action=RequirementSpec/destroy", "#" _ id_prefix, LxERP.t8("Delete"), confirm=LxERP.t8("Do you really want to delete this object?")) %]
 [% END %]
  </p>
 </form>