Commit fd96cb7f authored by Jörn Völker's avatar Jörn Völker
Browse files

Neue des.js Version erstellt

parent 68376d05
......@@ -3,7 +3,7 @@
<head>
<title>${page.list.name}</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<g:set var="version" value="2"/>
<g:set var="version" value="3"/>
<g:set var="editable" value="${page.isEditableForUser(sec.loggedInUserInfo(field: 'id').toInteger())}"/>
<script src="${resource(dir: 'js/des', file: 'des-lib.js?v=' + version)}" type="text/javascript"></script>
<r:require modules="scan2"/>
......
......@@ -8536,10 +8536,11 @@ module.exports = deleteEntry;
/**
* editEntry action
*/
function editEntry(entry) {
function editEntry(entry, options) {
if(typeof global.window.openEditForm == 'function') {
$('#entry' + entry.id).addClass('des-entry-selected');
global.window.openEditForm(entry.id);
global.window.openEditForm(entry.id, options);
} else {
console.log('Missing global function openEditForm');
}
......@@ -8637,6 +8638,11 @@ function init() {
function correctCase(obj) {
var inValue = $(obj).val();
// Wenn Wert === ('?') dann nicht weiterbehandeln und Wert zurückgeben
if (inValue === '(?)') {
return inValue
}
// Wenn ein Wert mit einer Zahl anfängt, diesen unverändert lassen
if (inValue.charAt(0) >= "0" && inValue.charAt(0) <= "9") {
return inValue;
......@@ -8843,6 +8849,7 @@ function init() {
$fields.each(function () {
initSources(this);
initKeyStrokes(this);
removeFromTabOrder(this);
});
}
......@@ -8932,6 +8939,11 @@ function initKeyStrokes(targetField) {
}
function removeFromTabOrder(targetField) {
var $field = $(targetField);
$field.prop('tabindex', -1);
}
module.exports = init;
}).call(this,require("b55mWE"),typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/des/common/combine.js","/des/common")
......@@ -9327,7 +9339,9 @@ function getActions() {
$('#inputErrors').html('Achtung: an dieser Seite arbeitet ein anderer Benutzer!').show();
}
editEntry(entry);
editEntry(entry, {
viaContextMenu: true
});
}
};
......@@ -9404,7 +9418,6 @@ function registerCloseHandlers() {
module.exports = init;
}).call(this,require("b55mWE"),typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/des/components/context-menu.js","/des/components")
},{"../actions/entry/delete-entry":99,"../actions/entry/edit-entry":100,"../actions/entry/move-entry":101,"../actions/entry/show-user-entries":102,"../actions/entry/show-user-info":103,"../actions/entry/toggle-correctness":104,"b55mWE":60,"bootstrap-menu":46,"buffer":58,"jquery":"eeO1y8"}],114:[function(require,module,exports){
(function (process,global,Buffer,__argument0,__argument1,__argument2,__argument3,__filename,__dirname){
......@@ -9424,7 +9437,7 @@ const specialchars = require('./specialchars');
const Draggable = require('draggy');
const ELEMENT_ID = 'inputForm';
function init(page, callback) {
function init(page, callback, options) {
var $form = $('#' + ELEMENT_ID);
// Auskommentieren, wenn inputForm bei zoom nicht vollständig im Bild bleiben soll.
......@@ -9437,12 +9450,14 @@ function init(page, callback) {
specialchars();
initialFocus();
if (page.activeMode.name === 'add') {
var $fields = $('input, select', $form);
$fields.attr('autocomplete', 'off');
if (page.activeMode.name === 'add' || (options && options.viaContextMenu)) {
remember();
tabStop();
combine();
} else if(page.activeMode.name === 'edit') {
var $fields = $('input, select', $form);
highlightMissingFields($fields);
updateTabOrder($fields);
hideCombineSources($form);
......@@ -9648,9 +9663,9 @@ Des.prototype.showCreateForm = function (x, y) {
inputForm(page, config.onInputFormReady);
};
Des.prototype.showEditForm = function (x, y, entry) {
Des.prototype.showEditForm = function (x, y, entry, options) {
populateEditForm(entry);
inputForm(page, config.onInputFormReady);
inputForm(page, config.onInputFormReady, options);
};
function populateEditForm(entry) {
......@@ -9692,5 +9707,5 @@ module.exports = exports = new Des();
*/
global.DES = require('./des/des.js');
}).call(this,require("b55mWE"),typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_ae818a6a.js","/")
}).call(this,require("b55mWE"),typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_ad989b2e.js","/")
},{"./des/des.js":116,"b55mWE":60,"buffer":58}]},{},[117])
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment