kivi.run_once_for('.row_entry', 'on_kbd_click_show_hide', function(elt) {
$(elt).keydown(function(event) {
+ var row;
if(event.keyCode == 40 && event.shiftKey == true) {
// shift arrow down
event.preventDefault();
- var row = $(event.target).parents(".row_entry").first();
+ row = $(event.target).parents(".row_entry").first();
$(row).children().not(':first').show();
return false;
}
if(event.keyCode == 38 && event.shiftKey == true) {
// shift arrow up
event.preventDefault();
- var row = $(event.target).parents(".row_entry").first();
+ row = $(event.target).parents(".row_entry").first();
$(row).children().not(':first').hide();
return false;
}
};
ns.t8 = function(text, params) {
- var text = ns._locale[text] || text;
+ text = ns._locale[text] || text;
+ var key, value
if( Object.prototype.toString.call( params ) === '[object Array]' ) {
var len = params.length;
for(var i=0; i<len; ++i) {
- var key = i + 1;
- var value = params[i];
+ key = i + 1;
+ value = params[i];
text = text.split("#"+ key).join(value);
}
}
else if( typeof params == 'object' ) {
- for(var key in params) {
- var value = params[key];
+ for(key in params) {
+ value = params[key];
text = text.split("#{"+ key +"}").join(value);
}
}
// -------------------------------------------------------------------------
ns.create_context_menus = function(data) {
+ var general_actions;
if (data.is_template) {
- var general_actions = {
+ general_actions = {
sep98: "---------"
, general_actions: { name: kivi.t8('Requirement spec template actions'), className: 'context-menu-heading' }
// , sep99: "---------"
});
} else { // if (is_template)
- var general_actions = {
+ general_actions = {
sep98: "---------"
, general_actions: { name: kivi.t8('Requirement spec actions'), className: 'context-menu-heading' }
, create_pdf: { name: kivi.t8('Create PDF'), icon: "pdf", callback: kivi.requirement_spec.create_reqspec_pdf }
, create_version: { name: kivi.t8('Create new version'), icon: "new", callback: kivi.requirement_spec.create_version, disabled: kivi.requirement_spec.disable_commands }
, copy_reqspec: { name: kivi.t8('Copy requirement spec'), icon: "copy", callback: kivi.requirement_spec.copy_reqspec }
, delete_reqspec: { name: kivi.t8('Delete requirement spec'), icon: "delete", callback: kivi.requirement_spec.delete_reqspec }
- , sep_paste_template: "---------"
+ , sep_renumber: "---------"
, renumber: { name: kivi.t8('Renumber sections and function blocks'), icon: "renumber", callback: kivi.requirement_spec.renumber }
, sep_paste_template: "---------"
, paste_template: { name: kivi.t8('Paste template'), icon: "paste", callback: kivi.requirement_spec.paste_template }