Changes

Jump to navigation Jump to search
m
no edit summary
Line 28: Line 28:     
async function pd_edit_render(){
 
async function pd_edit_render(){
var k = idxb.EnqueuePDIO('update record');
+
var orig = wbproc.checkentity( { this_concerns: [ wbEStructure['concernsRelation'], wbEStructure['IDPropLoc'], wbEStructure['IDName'] ] } )['this_concerns'][0];
var m = wbproc.checkentity( { this_concerns: [ wbEStructure['concernsRelation'], wbEStructure['IDPropLoc'], wbEStructure['IDName'] ] } );
+
var plch = wbproc.checkentity( { default_value: [ wbEStructure['defaultValRelation'], wbEStructure['IDPropLoc'] ] } )['default_value'][0]; //defal
var l = wbproc.checkentity( { default_value: [ wbEStructure['defaultValRelation'], wbEStructure['IDPropLoc'] ] } ); //defal
+
var q = idxb.EnqueuePDIO('update record');
k.then( function(result) {
+
q.then( function(result) {
 
console.log("required data from idxb");
 
console.log("required data from idxb");
 
mw.loader.using( 'oojs-ui-core' ).done( function () {
 
mw.loader.using( 'oojs-ui-core' ).done( function () {
Line 41: Line 41:  
textInput = [];
 
textInput = [];
   −
var extrafield = Object-keys(result[m[0]]).length;
+
var extrafield = Object-keys(result[orig]).length;
    
button_save[ extrafield ] = new OO.ui.ButtonWidget( { label: "Save", classes: "pddh" } );
 
button_save[ extrafield ] = new OO.ui.ButtonWidget( { label: "Save", classes: "pddh" } );
 
textInput[ extrafield ] = new OO.ui.TextInputWidget( {  
 
textInput[ extrafield ] = new OO.ui.TextInputWidget( {  
placeholder: l[0],
+
placeholder: plch,
 
classes: "pddh"
 
classes: "pddh"
 
} );
 
} );
button_save[extrafield].onClick = function () {
+
button_save[ extrafield ].onClick = function () {
idxb.EnqueuePDIO('update record', m[0], data, 'holdplace')
+
idxb.EnqueuePDIO('update record', orig, data, 'holdplace')
 
}
 
}
$( '#mw-content-text' ).prepend( textInput[extrafield].$element );
+
$( '#mw-content-text' ).prepend( textInput[ extrafield ].$element );
 
$( '#mw-content-text' ).prepend( '<br>' );
 
$( '#mw-content-text' ).prepend( '<br>' );
$( '#mw-content-text' ).prepend( button_save[extrafield].$element );
+
$( '#mw-content-text' ).prepend( button_save[ extrafield ].$element );
 
$( '#mw-content-text' ).prepend( '<br>' );
 
$( '#mw-content-text' ).prepend( '<br>' );
 
$( '#mw-content-text' ).prepend( '<br>' );
 
$( '#mw-content-text' ).prepend( '<br>' );
    
if ( extrafield > 0) {
 
if ( extrafield > 0) {
Object.keys( result[m[0]] ).forEach( function(data) {
+
Object.keys( result[orig] ).forEach( function(data) {
    
button_save[data] = new OO.ui.ButtonWidget( { label: "Save", classes: "pddh" } );
 
button_save[data] = new OO.ui.ButtonWidget( { label: "Save", classes: "pddh" } );
 
button_delete[data] = new OO.ui.ButtonWidget( { label: "Delete", classes: "pddh" } );
 
button_delete[data] = new OO.ui.ButtonWidget( { label: "Delete", classes: "pddh" } );
 
textInput[data] = new OO.ui.TextInputWidget( {  
 
textInput[data] = new OO.ui.TextInputWidget( {  
value: k[m][data], ///
+
value: q[orig][data], ///
placeholder: l[0],
+
placeholder: plch,
 
classes: "pddh"
 
classes: "pddh"
 
} );
 
} );
 
button_save[data].onClick = function () {
 
button_save[data].onClick = function () {
idxb.EnqueuePDIO('update record', m[0], data, 'holdplace')
+
idxb.EnqueuePDIO('update record', orig, data, 'holdplace')
 
}
 
}
 
$( '#mw-content-text' ).prepend( textInput[data].$element );
 
$( '#mw-content-text' ).prepend( textInput[data].$element );
530

edits

Navigation menu