Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a9cc182f

Von Moritz Bunkus vor fast 11 Jahren hinzugefügt

  • ID a9cc182f3613fd21a698c9f40b8c5908d92c9da5
  • Vorgänger 920773a2
  • Nachfolger 5187eea8

Pflichtenhefte: Statischen JavaScript-Code nach js/requirement_spec.js verschieben

Unterschiede anzeigen:

js/locale/de.js
namespace("kivi").setupLocale({
"Add function block":"Funktionsblock hinzufügen",
"Add linked record":"Verknüpften Beleg hinzufügen",
"Add section":"Abschnitt hinzufügen",
"Add sub function block":"Unterfunktionsblock hinzufügen",
"Add text block":"Textblock erfassen",
"Are you sure?":"Sind Sie sicher?",
"Database Connection Test":"Test der Datenbankverbindung",
"Do you want to set the account number \"#1\" to \"#2\" and the name \"#3\" to \"#4\"?":"Soll die Kontonummer \"#1\" zu \"#2\" und den Name \"#3\" zu \"#4\" geändert werden?",
......
"The name must only consist of letters, numbers and underscores and start with a letter.":"Der Name darf nur aus Buchstaben (keine Umlaute), Ziffern und Unterstrichen bestehen und muss mit einem Buchstaben beginnen.",
"The option field is empty.":"Das Optionsfeld ist leer.",
"The selected database is still configured for client \"#1\". If you delete the database that client will stop working until you re-configure it. Do you still want to delete the database?":"Die auswählte Datenbank ist noch für Mandant \"#1\" konfiguriert. Wenn Sie die Datenbank löschen, wird der Mandanten nicht mehr funktionieren, bis er anders konfiguriert wurde. Wollen Sie die Datenbank trotzdem löschen?"
"Copy":"Kopieren",
"Delete":"Löschen",
"Delete text block":"Textblock löschen",
"Edit":"Bearbeiten",
"Edit text block":"Textblock bearbeiten",
"Paste":"Einfügen",
"Toggle marker":"Markierung umschalten"
});
js/requirement_spec.js
$('#text-block-' + id).show();
}
function ask_delete_text_block(key, opt) {
if (confirm(kivi.t8("Are you sure?")))
standard_text_block_ajax_call(key, opt);
return true;
}
// --------------------------------------------------------------------------------
// ------------------------------ sections and items ------------------------------
// --------------------------------------------------------------------------------
......
if (options.to_hide_if_empty && (1 == $(options.to_hide_if_empty).children().size()))
$(options.to_hide_if_empty).hide();
}
function ask_delete_item(key, opt) {
if (confirm(kivi.t8("Are you sure?")))
standard_item_ajax_call(key, opt);
return true;
}
function create_requirement_spec_context_menus() {
$.contextMenu({
selector: '.text-block-context-menu',
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 }
, sep1: "---------"
, flag: { name: kivi.t8('Toggle marker'), icon: "flag", callback: standard_text_block_ajax_call, disabled: disable_edit_text_block_commands }
, sep2: "---------"
, copy: { name: kivi.t8('Copy'), icon: "copy", disabled: function() { return true; } }
, paste: { name: kivi.t8('Paste'), icon: "paste", disabled: function() { return true; } }
// , copy: { name: kivi.t8('Copy'), icon: "copy", disabled: disable_edit_text_block_commands }
// , paste: { name: kivi.t8('Paste'), icon: "paste", disabled: disable_edit_text_block_commands }
}
});
$.contextMenu({
selector: '.section-context-menu',
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: "---------"
, edit: { name: kivi.t8('Edit'), icon: "edit", callback: standard_item_ajax_call, disabled: disable_edit_item_commands }
, delete: { name: kivi.t8('Delete'), icon: "delete", callback: ask_delete_item, disabled: disable_edit_item_commands }
, sep2: "---------"
, flag: { name: kivi.t8('Toggle marker'), icon: "flag", callback: standard_item_ajax_call, disabled: disable_edit_item_commands }
, sep3: "---------"
, copy: { name: kivi.t8('Copy'), icon: "copy", disabled: function() { return true; } }
, paste: { name: kivi.t8('Paste'), icon: "paste", disabled: function() { return true; } }
// , copy: { name: kivi.t8('Copy'), icon: "copy", disabled: disable_edit_item_commands }
// , paste: { name: kivi.t8('Paste'), icon: "paste", disabled: disable_edit_item_commands }
}
});
$.contextMenu({
selector: '.function-block-context-menu,.sub-function-block-context-menu',
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: "---------"
, edit: { name: kivi.t8('Edit'), icon: "edit", callback: standard_item_ajax_call, disabled: disable_edit_item_commands }
, delete: { name: kivi.t8('Delete'), icon: "delete", callback: ask_delete_item, disabled: disable_edit_item_commands }
, sep2: "---------"
, flag: { name: kivi.t8('Toggle marker'), icon: "flag", callback: standard_item_ajax_call, disabled: disable_edit_item_commands }
, sep3: "---------"
, copy: { name: kivi.t8('Copy'), icon: "copy", disabled: function() { return true; } }
, paste: { name: kivi.t8('Paste'), icon: "paste", disabled: function() { return true; } }
// , copy: { name: kivi.t8('Copy'), icon: "copy", disabled: disable_edit_item_commands }
// , paste: { name: kivi.t8('Paste'), icon: "paste", disabled: disable_edit_item_commands }
}
});
}
templates/webpages/requirement_spec/show.html
[% IF SELF.requirement_spec_item %]
$.jstree._reference("#tree").select_node('#fb-[% SELF.requirement_spec_item.id %]', true);
[% END %]
});
function ask_delete_text_block(key, opt) {
if (confirm("[% LxERP.t8("Are you sure?") %]"))
standard_text_block_ajax_call(key, opt);
return true;
}
function ask_delete_item(key, opt) {
if (confirm("[% LxERP.t8("Are you sure?") %]"))
standard_item_ajax_call(key, opt);
return true;
}
$(function(){
$.contextMenu({
selector: '.text-block-context-menu',
items: {
add: { name: "[% LxERP.t8('Add text block') %]", icon: "add", callback: standard_text_block_ajax_call },
edit: { name: "[% LxERP.t8('Edit text block') %]", icon: "edit", callback: standard_text_block_ajax_call, disabled: disable_edit_text_block_commands },
delete: { name: "[% LxERP.t8('Delete text block') %]", icon: "delete", callback: ask_delete_text_block, disabled: disable_edit_text_block_commands },
sep1: "---------",
flag: { name: "[% LxERP.t8('Toggle marker') %]", icon: "flag", callback: standard_text_block_ajax_call, disabled: disable_edit_text_block_commands },
sep2: "---------",
copy: { name: "[% LxERP.t8('Copy') %]", icon: "copy", disabled: disable_edit_text_block_commands },
paste: { name: "[% LxERP.t8('Paste') %]", icon: "paste", disabled: disable_edit_text_block_commands }
}
});
$.contextMenu({
selector: '.section-context-menu',
items: {
add_section: { name: "[% LxERP.t8('Add section') %]", icon: "add", callback: standard_item_ajax_call },
add_function_block: { name: "[% LxERP.t8('Add function block') %]", icon: "add", callback: standard_item_ajax_call, disabled: disable_add_function_block_command },
sep1: "---------",
edit: { name: "[% LxERP.t8('Edit') %]", icon: "edit", callback: standard_item_ajax_call, disabled: disable_edit_item_commands },
delete: { name: "[% LxERP.t8('Delete') %]", icon: "delete", callback: ask_delete_item, disabled: disable_edit_item_commands },
sep2: "---------",
flag: { name: "[% LxERP.t8('Toggle marker') %]", icon: "flag", callback: standard_item_ajax_call, disabled: disable_edit_item_commands },
sep3: "---------",
copy: { name: "[% LxERP.t8('Copy') %]", icon: "copy", disabled: disable_edit_item_commands },
paste: { name: "[% LxERP.t8('Paste') %]", icon: "paste", disabled: disable_edit_item_commands }
}
});
$.contextMenu({
selector: '.function-block-context-menu,.sub-function-block-context-menu',
items: {
add_function_block: { name: "[% LxERP.t8('Add function block') %]", icon: "add", callback: standard_item_ajax_call },
add_sub_function_block: { name: "[% LxERP.t8('Add sub function block') %]", icon: "add", callback: standard_item_ajax_call },
sep1: "---------",
edit: { name: "[% LxERP.t8('Edit') %]", icon: "edit", callback: standard_item_ajax_call, disabled: disable_edit_item_commands },
delete: { name: "[% LxERP.t8('Delete') %]", icon: "delete", callback: ask_delete_item, disabled: disable_edit_item_commands },
sep2: "---------",
flag: { name: "[% LxERP.t8('Toggle marker') %]", icon: "flag", callback: standard_item_ajax_call, disabled: disable_edit_item_commands },
sep3: "---------",
copy: { name: "[% LxERP.t8('Copy') %]", icon: "copy", disabled: disable_edit_item_commands },
paste: { name: "[% LxERP.t8('Paste') %]", icon: "paste", disabled: disable_edit_item_commands }
}
});
create_requirement_spec_context_menus();
});
-->

Auch abrufbar als: Unified diff