2
2
3
3
// Data functions (insert, update, delete, form) for table assignments
4
4
5
- // This script and data application were generated by AppGini 22.11
5
+ // This script and data application were generated by AppGini 22.12
6
6
// Download AppGini for free from https://bigprof.com/appgini/download/
7
7
8
8
function assignments_insert (&$ error_message = '' ) {
@@ -323,7 +323,7 @@ function ProjectId_reload__RAND__() {
323
323
text: resp.results[0].text
324
324
});
325
325
$j('[name="ProjectId"]').val(resp.results[0].id);
326
- $j('[id=ProjectId-container-readonly__RAND__]').html('<span id="ProjectId-match-text">' + resp.results[0].text + '</span>');
326
+ $j('[id=ProjectId-container-readonly__RAND__]').html('<span class="match-text" id="ProjectId-match-text">' + resp.results[0].text + '</span>');
327
327
if(resp.results[0].id == '<?php echo empty_lookup_value; ?> ') { $j('.btn[id=projects_view_parent]').hide(); } else { $j('.btn[id=projects_view_parent]').show(); }
328
328
329
329
@@ -360,7 +360,7 @@ function ProjectId_reload__RAND__() {
360
360
data: { id: AppGini.current_ProjectId__RAND__.value, t: 'assignments', f: 'ProjectId' },
361
361
success: function(resp) {
362
362
$j('[name="ProjectId"]').val(resp.results[0].id);
363
- $j('[id=ProjectId-container-readonly__RAND__]').html('<span id="ProjectId-match-text">' + resp.results[0].text + '</span>');
363
+ $j('[id=ProjectId-container-readonly__RAND__]').html('<span class="match-text" id="ProjectId-match-text">' + resp.results[0].text + '</span>');
364
364
if(resp.results[0].id == '<?php echo empty_lookup_value; ?> ') { $j('.btn[id=projects_view_parent]').hide(); } else { $j('.btn[id=projects_view_parent]').show(); }
365
365
366
366
if(typeof(ProjectId_update_autofills__RAND__) == 'function') ProjectId_update_autofills__RAND__();
@@ -375,7 +375,7 @@ function ProjectId_reload__RAND__() {
375
375
dataType: 'json',
376
376
data: { id: AppGini.current_ProjectId__RAND__.value, t: 'assignments', f: 'ProjectId' },
377
377
success: function(resp) {
378
- $j('[id=ProjectId-container__RAND__], [id=ProjectId-container-readonly__RAND__]').html('<span id="ProjectId-match-text">' + resp.results[0].text + '</span>');
378
+ $j('[id=ProjectId-container__RAND__], [id=ProjectId-container-readonly__RAND__]').html('<span class="match-text" id="ProjectId-match-text">' + resp.results[0].text + '</span>');
379
379
if(resp.results[0].id == '<?php echo empty_lookup_value; ?> ') { $j('.btn[id=projects_view_parent]').hide(); } else { $j('.btn[id=projects_view_parent]').show(); }
380
380
381
381
if(typeof(ProjectId_update_autofills__RAND__) == 'function') ProjectId_update_autofills__RAND__();
@@ -400,7 +400,7 @@ function ResourceId_reload__RAND__() {
400
400
text: resp.results[0].text
401
401
});
402
402
$j('[name="ResourceId"]').val(resp.results[0].id);
403
- $j('[id=ResourceId-container-readonly__RAND__]').html('<span id="ResourceId-match-text">' + resp.results[0].text + '</span>');
403
+ $j('[id=ResourceId-container-readonly__RAND__]').html('<span class="match-text" id="ResourceId-match-text">' + resp.results[0].text + '</span>');
404
404
if(resp.results[0].id == '<?php echo empty_lookup_value; ?> ') { $j('.btn[id=resources_view_parent]').hide(); } else { $j('.btn[id=resources_view_parent]').show(); }
405
405
406
406
@@ -437,7 +437,7 @@ function ResourceId_reload__RAND__() {
437
437
data: { id: AppGini.current_ResourceId__RAND__.value, t: 'assignments', f: 'ResourceId' },
438
438
success: function(resp) {
439
439
$j('[name="ResourceId"]').val(resp.results[0].id);
440
- $j('[id=ResourceId-container-readonly__RAND__]').html('<span id="ResourceId-match-text">' + resp.results[0].text + '</span>');
440
+ $j('[id=ResourceId-container-readonly__RAND__]').html('<span class="match-text" id="ResourceId-match-text">' + resp.results[0].text + '</span>');
441
441
if(resp.results[0].id == '<?php echo empty_lookup_value; ?> ') { $j('.btn[id=resources_view_parent]').hide(); } else { $j('.btn[id=resources_view_parent]').show(); }
442
442
443
443
if(typeof(ResourceId_update_autofills__RAND__) == 'function') ResourceId_update_autofills__RAND__();
@@ -452,7 +452,7 @@ function ResourceId_reload__RAND__() {
452
452
dataType: 'json',
453
453
data: { id: AppGini.current_ResourceId__RAND__.value, t: 'assignments', f: 'ResourceId' },
454
454
success: function(resp) {
455
- $j('[id=ResourceId-container__RAND__], [id=ResourceId-container-readonly__RAND__]').html('<span id="ResourceId-match-text">' + resp.results[0].text + '</span>');
455
+ $j('[id=ResourceId-container__RAND__], [id=ResourceId-container-readonly__RAND__]').html('<span class="match-text" id="ResourceId-match-text">' + resp.results[0].text + '</span>');
456
456
if(resp.results[0].id == '<?php echo empty_lookup_value; ?> ') { $j('.btn[id=resources_view_parent]').hide(); } else { $j('.btn[id=resources_view_parent]').show(); }
457
457
458
458
if(typeof(ResourceId_update_autofills__RAND__) == 'function') ResourceId_update_autofills__RAND__();
@@ -557,12 +557,12 @@ function ResourceId_reload__RAND__() {
557
557
558
558
// process foreign key links
559
559
if ($ pt_perm ['view ' ] || $ pt_perm ['edit ' ]) {
560
- $ templateCode = str_replace ("<%%PLINK( {$ luf })%%> " , '<button type="button" class="btn btn-default view_parent hspacer-md " id=" ' . $ ptfc [0 ] . '_view_parent" title=" ' . html_attr ($ Translation ['View ' ] . ' ' . $ ptfc [1 ]) . '"><i class="glyphicon glyphicon-eye-open"></i></button> ' , $ templateCode );
560
+ $ templateCode = str_replace ("<%%PLINK( {$ luf })%%> " , '<button type="button" class="btn btn-default view_parent" id=" ' . $ ptfc [0 ] . '_view_parent" title=" ' . html_attr ($ Translation ['View ' ] . ' ' . $ ptfc [1 ]) . '"><i class="glyphicon glyphicon-eye-open"></i></button> ' , $ templateCode );
561
561
}
562
562
563
563
// if user has insert permission to parent table of a lookup field, put an add new button
564
564
if ($ pt_perm ['insert ' ] /* && !Request::val('Embedded')*/ ) {
565
- $ templateCode = str_replace ("<%%ADDNEW( {$ ptfc [0 ]})%%> " , '<button type="button" class="btn btn-success add_new_parent hspacer-md " id=" ' . $ ptfc [0 ] . '_add_new" title=" ' . html_attr ($ Translation ['Add New ' ] . ' ' . $ ptfc [1 ]) . '"><i class="glyphicon glyphicon-plus-sign "></i></button> ' , $ templateCode );
565
+ $ templateCode = str_replace ("<%%ADDNEW( {$ ptfc [0 ]})%%> " , '<button type="button" class="btn btn-default add_new_parent" id=" ' . $ ptfc [0 ] . '_add_new" title=" ' . html_attr ($ Translation ['Add New ' ] . ' ' . $ ptfc [1 ]) . '"><i class="glyphicon glyphicon-plus text-success "></i></button> ' , $ templateCode );
566
566
}
567
567
}
568
568
@@ -588,10 +588,10 @@ function ResourceId_reload__RAND__() {
588
588
if ( $ dvprint ) $ templateCode = str_replace ('<%%VALUE(Commitment)%%> ' , safe_html ($ urow ['Commitment ' ]), $ templateCode );
589
589
if (!$ dvprint ) $ templateCode = str_replace ('<%%VALUE(Commitment)%%> ' , html_attr ($ row ['Commitment ' ]), $ templateCode );
590
590
$ templateCode = str_replace ('<%%URLVALUE(Commitment)%%> ' , urlencode ($ urow ['Commitment ' ]), $ templateCode );
591
- $ templateCode = str_replace ('<%%VALUE(StartDate)%%> ' , @ date ( ' d/m/Y ' , @ strtotime ( html_attr ( $ row ['StartDate ' ])) ), $ templateCode );
592
- $ templateCode = str_replace ('<%%URLVALUE(StartDate)%%> ' , urlencode (@ date ( ' d/m/Y ' , @ strtotime ( html_attr ( $ urow ['StartDate ' ])) )), $ templateCode );
593
- $ templateCode = str_replace ('<%%VALUE(EndDate)%%> ' , @ date ( ' d/m/Y ' , @ strtotime ( html_attr ( $ row ['EndDate ' ])) ), $ templateCode );
594
- $ templateCode = str_replace ('<%%URLVALUE(EndDate)%%> ' , urlencode (@ date ( ' d/m/Y ' , @ strtotime ( html_attr ( $ urow ['EndDate ' ])) )), $ templateCode );
591
+ $ templateCode = str_replace ('<%%VALUE(StartDate)%%> ' , app_datetime ( $ row ['StartDate ' ]), $ templateCode );
592
+ $ templateCode = str_replace ('<%%URLVALUE(StartDate)%%> ' , urlencode (app_datetime ( $ urow ['StartDate ' ])), $ templateCode );
593
+ $ templateCode = str_replace ('<%%VALUE(EndDate)%%> ' , app_datetime ( $ row ['EndDate ' ]), $ templateCode );
594
+ $ templateCode = str_replace ('<%%URLVALUE(EndDate)%%> ' , urlencode (app_datetime ( $ urow ['EndDate ' ])), $ templateCode );
595
595
} else {
596
596
$ templateCode = str_replace ('<%%VALUE(Id)%%> ' , '' , $ templateCode );
597
597
$ templateCode = str_replace ('<%%URLVALUE(Id)%%> ' , urlencode ('' ), $ templateCode );
@@ -646,8 +646,8 @@ function ResourceId_reload__RAND__() {
646
646
$ templateCode .= "\t\t\turl: 'assignments_autofill.php?rnd1= $ rnd1&mfk=ProjectId&id=' + encodeURIComponent(AppGini.current_ProjectId {$ rnd1 }.value), \n" ;
647
647
$ templateCode .= "\t\t\tcontentType: 'application/x-www-form-urlencoded; charset= " . datalist_db_encoding . "', \n" ;
648
648
$ templateCode .= "\t\t\ttype: 'GET', \n" ;
649
- $ templateCode .= "\t\t\tbeforeSend: function() { \$j('#ProjectId $ rnd1').prop('disabled', true); \$ j('#ProjectIdLoading').html('<img src=loading.gif align=top>'); }, \n" ;
650
- $ templateCode .= "\t\t\tcomplete: function() { " . (($ arrPerm [1 ] || (($ arrPerm [3 ] == 1 && $ ownerMemberID == getLoggedMemberID ()) || ($ arrPerm [3 ] == 2 && $ ownerGroupID == getLoggedGroupID ()) || $ arrPerm [3 ] == 3 )) ? "\$j('#ProjectId $ rnd1').prop('disabled', false); " : "\$j('#ProjectId $ rnd1').prop('disabled', true); " )."\$ j('#ProjectIdLoading').html(''); \$j(window).resize(); } \n" ;
649
+ $ templateCode .= "\t\t\tbeforeSend: function() { \$j('#ProjectId $ rnd1').prop('disabled', true); }, \n" ;
650
+ $ templateCode .= "\t\t\tcomplete: function() { " . (($ arrPerm [1 ] || (($ arrPerm [3 ] == 1 && $ ownerMemberID == getLoggedMemberID ()) || ($ arrPerm [3 ] == 2 && $ ownerGroupID == getLoggedGroupID ()) || $ arrPerm [3 ] == 3 )) ? "\$j('#ProjectId $ rnd1').prop('disabled', false); " : "\$j('#ProjectId $ rnd1').prop('disabled', true); " )." \$j(window).resize(); } \n" ;
651
651
}
652
652
$ templateCode .= "\t\t}); \n" ;
653
653
$ templateCode .= "\t}; \n" ;
0 commit comments