Changes

Jump to navigation Jump to search
m
no edit summary
Line 6: Line 6:  
personal_data_id = 421,
 
personal_data_id = 421,
 
interface_button_id = 487,
 
interface_button_id = 487,
 +
 
language = "en";
 
language = "en";
 
wbEStruct = {
 
wbEStruct = {
 
         subclassOfRelations: 'claims.P4', // location of P4 relations in wbEntity
 
         subclassOfRelations: 'claims.P4', // location of P4 relations in wbEntity
 
         defaultValRelation: 'claims.P108',
 
         defaultValRelation: 'claims.P108',
 +
        concernsRelation: 'claims.P110',
 
         instanceOfRelations: 'claims.P3',
 
         instanceOfRelations: 'claims.P3',
 
         IDPropLoc:  'mainsnak.datavalue.value', // location of ID properties in related entity
 
         IDPropLoc:  'mainsnak.datavalue.value', // location of ID properties in related entity
Line 25: Line 27:  
       var CurrentPerson = {id: 0, name: {user: mw.user.getName(), first: "", last: ""}, age: 0};
 
       var CurrentPerson = {id: 0, name: {user: mw.user.getName(), first: "", last: ""}, age: 0};
   −
       recordAdd(PersonalDataDataBaseName, CurrentPerson);
+
       CurrentPerson = recordAdd(PersonalDataDataBaseName, CurrentPerson);
 
/*
 
/*
 
       recordUpdate(PersonalDataDataBaseName, CurrentPerson, '', value);
 
       recordUpdate(PersonalDataDataBaseName, CurrentPerson, '', value);
Line 81: Line 83:  
   var string_temporary_store_1 = get_Y_from_X( obj, wbEStruct['standardValue'] );  // input name
 
   var string_temporary_store_1 = get_Y_from_X( obj, wbEStruct['standardValue'] );  // input name
 
   var string_temporary_store_2 = get_Y_from_X ( get_Y_from_X ( get_Y_from_X( obj, wbEStruct['defaultValRelation'] ), '0'), wbEStruct['IDPropLoc'] ); //placeholder_text
 
   var string_temporary_store_2 = get_Y_from_X ( get_Y_from_X ( get_Y_from_X( obj, wbEStruct['defaultValRelation'] ), '0'), wbEStruct['IDPropLoc'] ); //placeholder_text
   var string_temporary_store_3 = 0; //get user value & relevant object parts here
+
   var string_temporary_store_3 = get_Y_from_X ( get_Y_from_X ( get_Y_from_X( obj, wbEStruct['concernsRelation'] ), '0'), wbEStruct['IDPropLoc'] ); //placeholder_text
 
   interface_media( PersonalDataDataBaseName, CurrentPerson, string_temporary_store_1, string_temporary_store_2, string_temporary_store_3 );
 
   interface_media( PersonalDataDataBaseName, CurrentPerson, string_temporary_store_1, string_temporary_store_2, string_temporary_store_3 );
 
}
 
}
Line 87: Line 89:  
// repeating code patterns
 
// repeating code patterns
   −
function interface_media( db /* database */, prs /* user */ , rel_A /* current value location */, rel_B /* placeholder value */, rel_C /* which attribute it is in the inddb database */ ) {
+
function interface_media( db /* database */, prs /* user */ , rel_A /* current value location */, rel_B /* placeholder value */, rel_C /* which attribute it is in the inddb database - concerns for input item */ ) {
 
   mw.loader.using( 'oojs-ui-core' ).done( function () {
 
   mw.loader.using( 'oojs-ui-core' ).done( function () {
 
     $( function () {
 
     $( function () {
Line 257: Line 259:  
         inp_obj = record;
 
         inp_obj = record;
 
         store.put(inp_obj);
 
         store.put(inp_obj);
 +
        return inp_obj;
 
       }
 
       }
 
       var sanitycheck = index.get([inp_obj.name.user]);
 
       var sanitycheck = index.get([inp_obj.name.user]);
530

edits

Navigation menu