Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions public_html/vue_components/shex-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -250,21 +250,20 @@ <h3 tt='last_items_created'></h3>
} ;

widar.run ( params , function ( d ) {
if ( d.error != 'OK' || typeof d.last_res == 'undefined' ) {
console.log ( JSON.parse(JSON.stringify(me.creation_data)) ) ;
me.warning_messages = [ d.error ] ;
$('#working').hide() ;
if ( d.error != 'OK' || !d.res || !d.res.entity || !d.res.entity.id ) {
me.warning_messages = [ d.error != 'OK' ? d.error : 'No item ID was returned. Check recent changes before retrying.' ] ;
me.can_create_new_item = true ;
return ;
}
me.warning_messages = [ 'Item created!' ] ;
me.created_items.push ( d.last_res.entity.id ) ;
me.created_items.push ( d.res.entity.id ) ;
me.can_create_new_item = true ;

// Logging
$.getJSON ( 'https://tools.wmflabs.org/magnustools/logger.php?tool=cradle&method=item from shex&callback=?' , function(j){} ) ;

// console.log ( d ) ;
$('#working').hide() ;
} ) ;
} ,
initializeDataFromItem : function ( q ) {
Expand Down
9 changes: 4 additions & 5 deletions public_html/vue_components/subject-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,21 +171,20 @@ <h3 tt='last_items_created'></h3>
} ;

widar.run ( params , function ( d ) {
if ( d.error != 'OK' || typeof d.last_res == 'undefined' ) {
console.log ( JSON.parse(JSON.stringify(me.creation_data)) ) ;
me.warning_messages = [ d.error ] ;
$('#working').hide() ;
if ( d.error != 'OK' || !d.res || !d.res.entity || !d.res.entity.id ) {
me.warning_messages = [ d.error != 'OK' ? d.error : 'No item ID was returned. Check recent changes before retrying.' ] ;
me.can_create_new_item = true ;
return ;
}
me.warning_messages = [ 'Item created!' ] ;
me.created_items.push ( d.last_res.entity.id ) ;
me.created_items.push ( d.res.entity.id ) ;
me.can_create_new_item = true ;

// Logging
$.getJSON ( 'https://tools.wmflabs.org/magnustools/logger.php?tool=cradle&method=item from subject&callback=?' , function(j){} ) ;

// console.log ( d ) ;
$('#working').hide() ;
} ) ;
} ,
initializeDataFromItem : function ( q ) {
Expand Down
Loading